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: <CAADnVQ+z0ZLwo=rCSa=TrS-NFkgHy8r=nK38wgA5vmz4u2iyUA@mail.gmail.com>
Date:   Tue, 4 Apr 2023 17:17:10 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Martin KaFai Lau <martin.lau@...ux.dev>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...nel.org>,
        David Vernet <void@...ifault.com>,
        Dave Marchevsky <davemarchevsky@...a.com>,
        Tejun Heo <tj@...nel.org>,
        Kumar Kartikeya Dwivedi <memxor@...il.com>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, Kernel Team <kernel-team@...com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH bpf-next 4/8] bpf: Teach verifier that certain helpers
 accept NULL pointer.

On Tue, Apr 4, 2023 at 5:10 PM Martin KaFai Lau <martin.lau@...ux.dev> wrote:
>
> On 4/3/23 9:50 PM, Alexei Starovoitov wrote:
> > diff --git a/net/core/filter.c b/net/core/filter.c
> > index 1f2abf0f60e6..727c5269867d 100644
> > --- a/net/core/filter.c
> > +++ b/net/core/filter.c
> > @@ -4998,7 +4998,7 @@ const struct bpf_func_proto bpf_get_socket_ptr_cookie_proto = {
> >       .func           = bpf_get_socket_ptr_cookie,
> >       .gpl_only       = false,
> >       .ret_type       = RET_INTEGER,
> > -     .arg1_type      = ARG_PTR_TO_BTF_ID_SOCK_COMMON,
> > +     .arg1_type      = ARG_PTR_TO_BTF_ID_SOCK_COMMON | PTR_MAYBE_NULL,
>
> I think the bpf_skc_to_* helpers (eg. bpf_skc_to_tcp_sock) also need similar
> change. They are available to tracing also. It can be a follow-up. The patch set
> lgtm.

Ok. I'll take a look.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ