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: <CAPhsuW7PEUKyOCYctTy6K3v0m+-UA83cvYpFS3-Ur0rU9LoNxg@mail.gmail.com>
Date: Wed, 7 Aug 2024 07:40:22 -0700
From: Song Liu <song@...nel.org>
To: Jiri Olsa <olsajiri@...il.com>
Cc: bpf@...r.kernel.org, linux-fsdevel@...r.kernel.org, 
	linux-kernel@...r.kernel.org, kernel-team@...a.com, andrii@...nel.org, 
	eddyz87@...il.com, ast@...nel.org, daniel@...earbox.net, martin.lau@...ux.dev, 
	viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz, kpsingh@...nel.org, 
	liamwisehart@...a.com, lltang@...a.com, shankaran@...a.com
Subject: Re: [PATCH v4 bpf-next 3/3] selftests/bpf: Add tests for bpf_get_dentry_xattr

On Wed, Aug 7, 2024 at 2:33 AM Jiri Olsa <olsajiri@...il.com> wrote:
>
> On Tue, Aug 06, 2024 at 04:09:04PM -0700, Song Liu wrote:
> > Add test for bpf_get_dentry_xattr on hook security_inode_getxattr.
> > Verify that the kfunc can read the xattr. Also test failing getxattr
> > from user space by returning non-zero from the LSM bpf program.
> >
> > Acked-by: Christian Brauner <brauner@...nel.org>
> > Signed-off-by: Song Liu <song@...nel.org>
> > ---
> >  tools/testing/selftests/bpf/bpf_kfuncs.h      |  9 +++++
> >  .../selftests/bpf/prog_tests/fs_kfuncs.c      |  9 ++++-
> >  .../selftests/bpf/progs/test_get_xattr.c      | 37 ++++++++++++++++---
> >  3 files changed, 49 insertions(+), 6 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/bpf_kfuncs.h b/tools/testing/selftests/bpf/bpf_kfuncs.h
> > index 3b6675ab4086..efed458a3c0a 100644
> > --- a/tools/testing/selftests/bpf/bpf_kfuncs.h
> > +++ b/tools/testing/selftests/bpf/bpf_kfuncs.h
> > @@ -78,4 +78,13 @@ extern int bpf_verify_pkcs7_signature(struct bpf_dynptr *data_ptr,
> >
> >  extern bool bpf_session_is_return(void) __ksym __weak;
> >  extern __u64 *bpf_session_cookie(void) __ksym __weak;
> > +
> > +struct dentry;
> > +/* Description
> > + *  Returns xattr of a dentry
> > + * Returns__bpf_kfunc
>
> nit, extra '__bpf_kfunc' suffix?

Good catch.. I somehow got it from bpf_sock_addr_set_sun_path.

Please let me if we need to respin for this change.

Thanks,
Song

> jirka

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ