From: Ryan Roberts <ryan.roberts@arm.com>
To: sashiko-reviews@lists.linux.dev
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v1] arm64: Mitigate Spectre v1 in the BPF interpreter
Date: Wed, 18 Nov 2026 09:26:42 +0000 [thread overview]
Message-ID: <66972dce-b645-4083-bae4-dc8109ff5fe2@arm.com> (raw)
In-Reply-To: <sashiko-outbox-219240@kernel.org>
On 17/11/2026 17:34, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Low] bpf: non-standard multi-line comment style in ___bpf_prog_run()
> --
>
> commit ac6a06b7dc1000d82907323434c2003bed5a8873
> Author: Ryan Roberts <ryan.roberts@arm.com>
>
> arm64: Mitigate Spectre v1 in the BPF interpreter
>
> This commit renames spec_bar() to barrier_nospec() on arm64 so that the BPF
> interpreter emits a speculation barrier for BPF_NOSPEC, while avoiding
> unnecessary barriers in uaccess paths where user pointers are already masked.
>
>> diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
>> index fc8b133c15f90..adf7ba0cdb06c 100644
>> --- a/kernel/bpf/core.c
>> +++ b/kernel/bpf/core.c
>> @@ -2251,14 +2251,7 @@ static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn)
>> /* ST, STX and LDX*/
>> ST_NOSPEC:
>> /* Speculation barrier for mitigating Speculative Store Bypass,
>> - * Bounds-Check Bypass and Type Confusion. In case of arm64, we
>> - * rely on the firmware mitigation as controlled via the ssbd
>> - * kernel parameter. Whenever the mitigation is enabled, it
>> - * works for all of the kernel code with no need to provide any
>> - * additional instructions here. In case of x86, we use 'lfence'
>> - * insn for mitigation. We reuse preexisting logic from Spectre
>> - * v1 mitigation that happens to produce the required code on
>> - * x86 for v4 as well.
>> + * Bounds-Check Bypass and Type Confusion.
>> */
>
> [Severity: Low]
> This isn't a bug, but BPF code uses the multi-line comment style where the
> opening /* goes on its own line with the comment text starting on the next
> line.
All other multi-line comments in this file use this more compact style; I was
trying to be consistent.
Thanks,
Ryan
next prev parent reply other threads:[~2026-11-18 9:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 17:23 [PATCH v1] arm64: Mitigate Spectre v1 in the BPF interpreter Ryan Roberts
2026-11-17 17:34 ` sashiko-bot
2026-11-18 9:26 ` Ryan Roberts [this message]
2026-11-18 14:27 ` Luis Gerhorst
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=66972dce-b645-4083-bae4-dc8109ff5fe2@arm.com \
--to=ryan.roberts@arm.com \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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