Commit a367efa7 authored by KP Singh's avatar KP Singh Committed by Alexei Starovoitov

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
Signed-off-by: default avatarKP Singh <kpsingh@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201106103747.2780972-8-kpsingh@chromium.org
parent f0e5ba0b
......@@ -4,9 +4,8 @@
* Copyright 2020 Google LLC.
*/
#include "vmlinux.h"
#include <errno.h>
#include <linux/bpf.h>
#include <stdbool.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
......@@ -36,23 +35,6 @@ struct {
__type(value, struct dummy_storage);
} sk_storage_map SEC(".maps");
/* TODO Use vmlinux.h once BTF pruning for embedded types is fixed.
*/
struct sock {} __attribute__((preserve_access_index));
struct sockaddr {} __attribute__((preserve_access_index));
struct socket {
struct sock *sk;
} __attribute__((preserve_access_index));
struct inode {} __attribute__((preserve_access_index));
struct dentry {
struct inode *d_inode;
} __attribute__((preserve_access_index));
struct file {
struct inode *f_inode;
} __attribute__((preserve_access_index));
SEC("lsm/inode_unlink")
int BPF_PROG(unlink_hook, struct inode *dir, struct dentry *victim)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment