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  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:   Fri, 11 Sep 2020 21:50:55 +0200
From:   Toke Høiland-Jørgensen <>
To:     Andrii Nakryiko <>
Cc:     Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Martin KaFai Lau <>,
        Song Liu <>, Yonghong Song <>,
        Andrii Nakryiko <>,
        John Fastabend <>,
        Jiri Olsa <>,
        Eelco Chaudron <>,
        KP Singh <>,
        Networking <>, bpf <>
Subject: Re: [PATCH RESEND bpf-next v3 2/9] bpf: verifier: refactor

Andrii Nakryiko <> writes:

> On Fri, Sep 11, 2020 at 3:00 AM Toke Høiland-Jørgensen <> wrote:
>> From: Toke Høiland-Jørgensen <>
>> The check_attach_btf_id() function really does three things:
>> 1. It performs a bunch of checks on the program to ensure that the
>>    attachment is valid.
>> 2. It stores a bunch of state about the attachment being requested in
>>    the verifier environment and struct bpf_prog objects.
>> 3. It allocates a trampoline for the attachment.
>> This patch splits out (1.) and (3.) into separate functions in preparation
>> for reusing them when the actual attachment is happening (in the
>> raw_tracepoint_open syscall operation), which will allow tracing programs
>> to have multiple (compatible) attachments.
>> No functional change is intended with this patch.
>> Signed-off-by: Toke Høiland-Jørgensen <>
>> ---
> I can't tell if there are any functional changes or not, tbh. The
> logic is quite complicated and full of intricate details. I did leave
> some suggestions on hopefully simplifying code flow in some places
> (and ensuring it's harder to break it on future changes), but I hope
> Alexei will give it a very thorough review and check that none of the
> subtle details broke.

Yeah, totally agree this is gnarly... :/
Which is also why I chickened out of doing any further changes in an
attempt to simplify the flow, but rather kept as much as the existing
structure as possible (with somewhat mixed results, I suppose).

Let's see what Alexei thinks. I guess I can take another crack at it, in
which case, thank you for the suggestions for simplifying things!


Powered by blists - more mailing lists