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]
Date:   Tue, 4 Apr 2023 17:16:27 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     David Vernet <void@...ifault.com>,
        "David S. Miller" <davem@...emloft.net>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...nel.org>,
        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>,
        Yonghong Song <yhs@...a.com>, Song Liu <song@...nel.org>
Subject: Re: [PATCH bpf-next 0/8] bpf: Follow up to RCU enforcement in the verifier.

On Tue, Apr 4, 2023 at 5:02 PM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Tue, Apr 4, 2023 at 7:51 AM David Vernet <void@...ifault.com> wrote:
> >
> > On Mon, Apr 03, 2023 at 09:50:21PM -0700, Alexei Starovoitov wrote:
> > > From: Alexei Starovoitov <ast@...nel.org>
> > >
> > > The patch set is addressing a fallout from
> > > commit 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.")
> > > It was too aggressive with PTR_UNTRUSTED marks.
> > > Patches 1-6 are cleanup and adding verifier smartness to address real
> > > use cases in bpf programs that broke with too aggressive PTR_UNTRUSTED.
> > > The partial revert is done in patch 7 anyway.
> > >
> > > Alexei Starovoitov (8):
> > >   bpf: Invoke btf_struct_access() callback only for writes.
> > >   bpf: Remove unused arguments from btf_struct_access().
> > >   bpf: Refactor btf_nested_type_is_trusted().
> > >   bpf: Teach verifier that certain helpers accept NULL pointer.
> > >   bpf: Refactor NULL-ness check in check_reg_type().
> > >   bpf: Allowlist few fields similar to __rcu tag.
> > >   bpf: Undo strict enforcement for walking untagged fields.
> > >   selftests/bpf: Add tracing tests for walking skb and req.
> >
> > For whole series:
> >
> > Acked-by: David Vernet <void@...ifault.com>
>
> Added David's acks manually (we really need to teach pw-apply to do
> this automatically...) and applied.

+1
I was hoping that patchwork will add this feature eventually,
but it seems faster to hack the pw-apply script instead.

> I've added a single sentence to
> patch #1 with why (I think) btf_struct_access() callback
> simplification was done, I didn't want to hold the patch set just due
> to that, as the rest looked good. But please do consider renaming the
> callback to more write-access implying name as a follow up, as current
> situation with the same name but different semantics is confusing.
>
> Applied to bpf-next, thanks.

Thanks.
Renaming either the btf_struct_access() function or (*btf_struct_access) field
was on the todo list as a potential workaround,
since this name caused a weird issue with clang in LTO build.
For some reason two global symbols were generated.
Yonghong is investigating.

fwiw btf_struct_write_access sounds fine as a new name.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ