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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 28 Sep 2021 14:12:21 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Kees Cook <keescook@...omium.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH 0/2] bpf: Build with -Wcast-function-type

On Mon, Sep 27, 2021 at 10:24 PM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Mon, Sep 27, 2021 at 11:27 AM Kees Cook <keescook@...omium.org> wrote:
> >
> > Hi,
> >
> > In order to keep ahead of cases in the kernel where Control Flow Integrity
> > (CFI) may trip over function call casts, enabling -Wcast-function-type
> > is helpful. To that end, replace BPF_CAST_CALL() as it triggers warnings
> > with this option and is now one of the last places in the kernel in need
> > of fixing.
> >
> > Thanks,
> >
> > -Kees
> >
> > Kees Cook (2):
> >   bpf: Replace "want address" users of BPF_CAST_CALL with BPF_CALL_IMM
> >   bpf: Replace callers of BPF_CAST_CALL with proper function typedef
> >
>
> Both patches look good to me. For the series:
>
> Acked-by: Andrii Nakryiko <andrii@...nel.org>

It needs a rebase to bpf-next:
In file included from ../lib/test_bpf.c:12:
../lib/test_bpf.c: In function ‘prepare_tail_call_tests’:
../lib/test_bpf.c:12442:27: error: implicit declaration of function
‘BPF_CAST_CALL’; did you mean ‘BPF_EMIT_CALL’?
[-Werror=implicit-function-declaration]
     *insn = BPF_EMIT_CALL(BPF_CAST_CALL(addr));

Please mark the patches as [PATCH bpf-next v2] to help CI pick the right tree.

Powered by blists - more mailing lists