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  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]
Date:   Fri, 7 Aug 2020 10:35:28 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     KP Singh <kpsingh@...omium.org>
Cc:     Jiri Olsa <jolsa@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andriin@...com>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Martin KaFai Lau <kafai@...com>,
        David Miller <davem@...hat.com>,
        John Fastabend <john.fastabend@...il.com>,
        Wenbo Zhang <ethercflow@...il.com>,
        Brendan Gregg <bgregg@...flix.com>,
        Florent Revest <revest@...omium.org>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH v9 bpf-next 10/14] bpf: Add d_path helper

On Fri, Aug 07, 2020 at 02:31:52AM +0200, KP Singh wrote:
> On Sat, Aug 1, 2020 at 7:04 PM Jiri Olsa <jolsa@...nel.org> wrote:
> >
> > Adding d_path helper function that returns full path for
> 
> [...]
> 
> > +}
> > +
> > +BTF_SET_START(btf_allowlist_d_path)
> > +BTF_ID(func, vfs_truncate)
> > +BTF_ID(func, vfs_fallocate)
> > +BTF_ID(func, dentry_open)
> > +BTF_ID(func, vfs_getattr)
> > +BTF_ID(func, filp_close)
> > +BTF_SET_END(btf_allowlist_d_path)
> > +
> 
> > +static bool bpf_d_path_allowed(const struct bpf_prog *prog)
> > +{
> > +       return btf_id_set_contains(&btf_allowlist_d_path, prog->aux->attach_btf_id);
> > +}
> 
> Can we allow it for LSM programs too?

yes, that's why I used struct bpf_prog as argument, so we could reach the
program type.. but I was hoping we could do that in follow up patchset,
because I assume there might be still some discussion about that?

I plan to post new version today

jirka

> 
> - KP
> 
> > +
> > +BTF_ID_LIST(bpf_d_path_btf_ids)
> > +BTF_ID(struct, path)
> > +
> 
> [...]
> 
> >
> >  /* integer value in 'imm' field of BPF_CALL instruction selects which helper
> > --
> > 2.25.4
> >
> 

Powered by blists - more mailing lists