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] [day] [month] [year] [list]
Message-ID: <CAADnVQ+zGtr-3SKygs-bHfSf=+Oq93U8tV3WN6ywb0GfFv853g@mail.gmail.com>
Date:   Mon, 27 Feb 2023 09:52:10 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     "David S. Miller" <davem@...emloft.net>
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>
Subject: Re: [PATCH v2 bpf-next 2/4] bpf: Introduce kptr_rcu.

On Wed, Feb 22, 2023 at 7:07 PM Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
>
> diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
> index 7d12d3e620cc..affc0997f937 100644
> --- a/tools/lib/bpf/bpf_helpers.h
> +++ b/tools/lib/bpf/bpf_helpers.h
> @@ -176,6 +176,7 @@ enum libbpf_tristate {
>  #define __ksym __attribute__((section(".ksyms")))
>  #define __kptr_untrusted __attribute__((btf_type_tag("kptr_untrusted")))
>  #define __kptr __attribute__((btf_type_tag("kptr")))
> +#define __kptr_rcu __attribute__((btf_type_tag("kptr_rcu")))

Realized that the mechanism can work without requiring bpf prog
to use this new tag.
The kernel can determine whether __kptr is RCU or not
via rcu_protected_object().
So BPF_KPTR_RCU vs BPF_KPTR_REF will be kernel internal distinction.
Eventually all __kptr kernel objects will be RCU anyway.
I'll respin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ