bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Puranjay Mohan <puranjay12@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	 Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	 Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	 Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	 Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	 KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	 Jiri Olsa <jolsa@kernel.org>, Zi Shen Lim <zlim.lnx@gmail.com>,
	 Mark Rutland <mark.rutland@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	 Mark Brown <broonie@kernel.org>,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	 open list <linux-kernel@vger.kernel.org>,
	 "open list:BPF [GENERAL] (Safe Dynamic Programs and Tools)"
	<bpf@vger.kernel.org>, Josh Poimboeuf <jpoimboe@kernel.org>
Subject: Re: [PATCH bpf-next 0/1] Support kCFI + BPF on arm64
Date: Mon, 11 Mar 2024 18:26:11 -0700	[thread overview]
Message-ID: <CAADnVQLPf2-saMJxv65zqDAjc8JX-08dRUP3hbrAh=q+2xiqzg@mail.gmail.com> (raw)
In-Reply-To: <20240227151115.4623-1-puranjay12@gmail.com>

On Tue, Feb 27, 2024 at 7:11 AM Puranjay Mohan <puranjay12@gmail.com> wrote:
>
> On ARM64 with CONFIG_CFI_CLANG, CFI warnings can be triggered by running
> the bpf selftests. This is because the JIT doesn't emit proper CFI prologues
> for BPF programs, callbacks, and struct_ops trampolines.
>
> Example Warning:
>
>  CFI failure at bpf_rbtree_add_impl+0x120/0x1d4 (target: bpf_prog_fb8b097ab47d164a_less+0x0/0x98; expected type: 0x9e4709a9)
>  WARNING: CPU: 0 PID: 1488 at bpf_rbtree_add_impl+0x120/0x1d4

...

> Running the selftests causes no CFI warnings:
> ---------------------------------------------
>
> test_progs: Summary: 454/3613 PASSED, 62 SKIPPED, 74 FAILED
> test_tag: OK (40945 tests)
> test_verifier: Summary: 789 PASSED, 0 SKIPPED, 0 FAILED

Catalin, Mark,

Could you please review and hopefully ack arm64 generic bits ?

The JIT changes largely mimic x86 changes and look correct to me.

      parent reply	other threads:[~2024-03-12  1:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 15:11 [PATCH bpf-next 0/1] Support kCFI + BPF on arm64 Puranjay Mohan
2024-02-27 15:11 ` [PATCH bpf-next 1/1] arm64/cfi,bpf: " Puranjay Mohan
2024-03-12  1:26 ` Alexei Starovoitov [this message]

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='CAADnVQLPf2-saMJxv65zqDAjc8JX-08dRUP3hbrAh=q+2xiqzg@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=martin.lau@linux.dev \
    --cc=puranjay12@gmail.com \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yonghong.song@linux.dev \
    --cc=zlim.lnx@gmail.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).