lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BB9CFBA8-8339-4C49-9D8E-6D01B8DBA0FC@fb.com>
Date:   Wed, 4 Nov 2020 00:16:50 +0000
From:   Song Liu <songliubraving@...com>
To:     KP Singh <kpsingh@...omium.org>
CC:     open list <linux-kernel@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin Lau <kafai@...com>, Paul Turner <pjt@...gle.com>,
        Jann Horn <jannh@...gle.com>, Hao Luo <haoluo@...gle.com>
Subject: Re: [PATCH bpf-next v2 6/8] bpf: Update selftests for local_storage
 to use vmlinux.h



> On Nov 3, 2020, at 7:31 AM, KP Singh <kpsingh@...omium.org> wrote:
> 
> From: KP Singh <kpsingh@...gle.com>
> 
> With the fixing of BTF pruning of embedded types being fixed, the test
> can be simplified to use vmlinux.h
> 
> Signed-off-by: KP Singh <kpsingh@...gle.com>

Acked-by: Song Liu <songliubraving@...com>

> ---
> .../selftests/bpf/progs/local_storage.c       | 20 +------------------
> 1 file changed, 1 insertion(+), 19 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/progs/local_storage.c b/tools/testing/selftests/bpf/progs/local_storage.c
> index 09529e33be98..ef3822bc7542 100644
> --- a/tools/testing/selftests/bpf/progs/local_storage.c
> +++ b/tools/testing/selftests/bpf/progs/local_storage.c
> @@ -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)
> {
> -- 
> 2.29.1.341.ge80a0c044ae-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ