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: <20211219030128.2s23lzhup6et4rsu@apollo.legion>
Date:   Sun, 19 Dec 2021 08:31:28 +0530
From:   Kumar Kartikeya Dwivedi <memxor@...il.com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org,
        netfilter-devel@...r.kernel.org,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        Maxim Mikityanskiy <maximmi@...dia.com>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Florian Westphal <fw@...len.de>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH bpf-next v4 05/10] bpf: Add reference tracking support to
 kfunc

On Sun, Dec 19, 2021 at 07:52:48AM IST, Alexei Starovoitov wrote:
> On Fri, Dec 17, 2021 at 07:20:26AM +0530, Kumar Kartikeya Dwivedi wrote:
> >
> > diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> > index 965fffaf0308..015cb633838b 100644
> > --- a/include/linux/bpf.h
> > +++ b/include/linux/bpf.h
> > @@ -521,6 +521,9 @@ struct bpf_verifier_ops {
> >  				 enum bpf_access_type atype,
> >  				 u32 *next_btf_id);
> >  	bool (*check_kfunc_call)(u32 kfunc_btf_id, struct module *owner);
> > +	bool (*is_acquire_kfunc)(u32 kfunc_btf_id, struct module *owner);
> > +	bool (*is_release_kfunc)(u32 kfunc_btf_id, struct module *owner);
> > +	bool (*is_kfunc_ret_type_null)(u32 kfunc_btf_id, struct module *owner);
>
> Same feedback as before...
>
> Those callbacks are not necessary.
> The existing check_kfunc_call() is just as inconvenient.
> When module's BTF comes in could you add it to mod's info instead of
> introducing callbacks for every kind of data the module has.
> Those callbacks don't server any purpose other than passing the particular
> data set back. The verifier side should access those data sets directly.

Ok, interesting idea. So these then go into the ".modinfo" section? I think then
we can also drop the check_kfunc_call callback?

--
Kartikeya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ