From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Kees Cook <keescook@chromium.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH 0/2] bpf: Build with -Wcast-function-type
Date: Mon, 27 Sep 2021 22:24:32 -0700 [thread overview]
Message-ID: <CAEf4Bzb46=-J5Fxc3mMZ8JQPtK1uoE0q6+g6WPz53Cvx=CBEhw@mail.gmail.com> (raw)
In-Reply-To: <20210927182700.2980499-1-keescook@chromium.org>
On Mon, Sep 27, 2021 at 11:27 AM Kees Cook <keescook@chromium.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@kernel.org>
> include/linux/bpf.h | 4 +++-
> include/linux/filter.h | 7 +++----
> kernel/bpf/arraymap.c | 7 +++----
> kernel/bpf/hashtab.c | 13 ++++++-------
> kernel/bpf/helpers.c | 5 ++---
> kernel/bpf/verifier.c | 26 +++++++++-----------------
> 6 files changed, 26 insertions(+), 36 deletions(-)
>
> --
> 2.30.2
>
next prev parent reply other threads:[~2021-09-28 5:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 18:26 [PATCH 0/2] bpf: Build with -Wcast-function-type Kees Cook
2021-09-27 18:26 ` [PATCH 1/2] bpf: Replace "want address" users of BPF_CAST_CALL with BPF_CALL_IMM Kees Cook
2021-09-27 18:27 ` [PATCH 2/2] bpf: Replace callers of BPF_CAST_CALL with proper function typedef Kees Cook
2021-09-28 5:24 ` Andrii Nakryiko [this message]
2021-09-28 21:12 ` [PATCH 0/2] bpf: Build with -Wcast-function-type Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEf4Bzb46=-J5Fxc3mMZ8JQPtK1uoE0q6+g6WPz53Cvx=CBEhw@mail.gmail.com' \
--to=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gustavoars@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=keescook@chromium.org \
--cc=kpsingh@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).