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: <CAPhsuW5Aui-DquaZQGM0EgJXei9UCweB8bqv7KOhegVJR-fKZA@mail.gmail.com>
Date:   Tue, 6 Sep 2022 15:07:04 -0700
From:   Song Liu <song@...nel.org>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        Kumar Kartikeya Dwivedi <memxor@...il.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next v2 3/3] bpf: Use 64-bit return value for bpf_prog_run

On Mon, Sep 5, 2022 at 12:34 PM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> From: Kumar Kartikeya Dwivedi <memxor@...il.com>
>
> BPF ABI always uses 64-bit return value, but so far __bpf_prog_run and
> higher level wrappers always truncated the return value to 32-bit. We want
> to be able to introduce a new BPF program type that returns a PTR_TO_BTF_ID
> or NULL from the BPF program to the caller context in the kernel. To be
> able to use this returned pointer value, the bpf_prog_run invocation needs
> to be able to return a 64-bit value, so update the definitions to allow
> this.
>
> To avoid code churn in the whole kernel, we let the compiler handle
> truncation normally, and allow new call sites to utilize the 64-bit
> return value, by receiving the return value as a u64.
>
> Reviewed-by: Stanislav Fomichev <sdf@...gle.com>
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>

Acked-by: Song Liu <song@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ