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: <a083506e-12e3-e39b-086f-fd03f2cf367e@iogearbox.net>
Date:   Thu, 26 Dec 2019 10:44:18 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Yonghong Song <yhs@...com>, Andrii Nakryiko <andriin@...com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>
Cc:     "andrii.nakryiko@...il.com" <andrii.nakryiko@...il.com>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH v2 bpf-next] libbpf: support CO-RE relocations for
 LDX/ST/STX instructions

On 12/23/19 7:10 PM, Yonghong Song wrote:
> On 12/23/19 10:03 AM, Andrii Nakryiko wrote:
>> Clang patch [0] enables emitting relocatable generic ALU/ALU64 instructions
>> (i.e, shifts and arithmetic operations), as well as generic load/store
>> instructions. The former ones are already supported by libbpf as is. This
>> patch adds further support for load/store instructions. Relocatable field
>> offset is encoded in BPF instruction's 16-bit offset section and are adjusted
>> by libbpf based on target kernel BTF.
>>
>> These Clang changes and corresponding libbpf changes allow for more succinct
>> generated BPF code by encoding relocatable field reads as a single
>> ST/LDX/STX instruction. It also enables relocatable access to BPF context.
>> Previously, if context struct (e.g., __sk_buff) was accessed with CO-RE
>> relocations (e.g., due to preserve_access_index attribute), it would be
>> rejected by BPF verifier due to modified context pointer dereference. With
>> Clang patch, such context accesses are both relocatable and have a fixed
>> offset from the point of view of BPF verifier.
>>
>>     [0] https://reviews.llvm.org/D71790
>>
>> Signed-off-by: Andrii Nakryiko <andriin@...com>
> Acked-by: Yonghong Song <yhs@...com>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ