Skip to content

Commit c7fcb6e

Browse files
sinkapkernel-patches-bot
authored andcommitted
bpf: Update selftests for local_storage to use vmlinux.h
With the fixing of BTF pruning of embedded types being fixed, the test can be simplified to use vmlinux.h Acked-by: Song Liu <[email protected]> Signed-off-by: KP Singh <[email protected]>
1 parent b528b5c commit c7fcb6e

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

tools/testing/selftests/bpf/progs/local_storage.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
* Copyright 2020 Google LLC.
55
*/
66

7+
#include "vmlinux.h"
78
#include <errno.h>
8-
#include <linux/bpf.h>
9-
#include <stdbool.h>
109
#include <bpf/bpf_helpers.h>
1110
#include <bpf/bpf_tracing.h>
1211

@@ -36,23 +35,6 @@ struct {
3635
__type(value, struct dummy_storage);
3736
} sk_storage_map SEC(".maps");
3837

39-
/* TODO Use vmlinux.h once BTF pruning for embedded types is fixed.
40-
*/
41-
struct sock {} __attribute__((preserve_access_index));
42-
struct sockaddr {} __attribute__((preserve_access_index));
43-
struct socket {
44-
struct sock *sk;
45-
} __attribute__((preserve_access_index));
46-
47-
struct inode {} __attribute__((preserve_access_index));
48-
struct dentry {
49-
struct inode *d_inode;
50-
} __attribute__((preserve_access_index));
51-
struct file {
52-
struct inode *f_inode;
53-
} __attribute__((preserve_access_index));
54-
55-
5638
SEC("lsm/inode_unlink")
5739
int BPF_PROG(unlink_hook, struct inode *dir, struct dentry *victim)
5840
{

0 commit comments

Comments
 (0)