From: patchwork-bot+netdevbpf@kernel.org
To: Puranjay Mohan <puranjay@kernel.org>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
memxor@gmail.com, song@kernel.org, yonghong.song@linux.dev,
tj@kernel.org
Subject: Re: [PATCH bpf-next v5 0/3] bpf, x86: Support fetching AND/OR/XOR atomics in arena
Date: Fri, 16 Oct 2026 19:00:05 +0000 [thread overview]
Message-ID: <179217720501.923903.6746374630856915617.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20261016171319.1623447-1-puranjay@kernel.org>
Hello:
This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Fri, 16 Oct 2026 10:13:11 -0700 you wrote:
> Changelog:
> v1: https://lore.kernel.org/all/20260923165301.3463007-1-puranjay@kernel.org/
> v2: https://lore.kernel.org/all/20260924160354.531101-1-puranjay@kernel.org/
> v3: https://lore.kernel.org/all/20260925134828.2012199-2-puranjay@kernel.org/
> v4: https://lore.kernel.org/all/20261014125017.1426212-1-puranjay@kernel.org/
>
> Changes in v5:
> - Patch 1: support these ops for accesses through a number too, instead of
> refusing them, per Alexei. BPF_F_ARENA_SCALAR accesses keep their
> address in BPF_REG_AX, where the loop saves R0, so for those R0 is
> saved on the stack with push and pop, as the div and mod lowering does.
> An R0 operand stays in that stack slot: the new value is built from it,
> RAX ends up holding the old value that R0 is to return, and the slot is
> dropped instead of popped. Both exception table entries resume before
> the pop, so a fault leaves the stack balanced. Accesses through an
> arena pointer are emitted exactly as in v4. The refusal in v4 also hid
> the reason: programs passed the verifier and then failed to load with
> ENOTSUPP and an empty log, where the verifier used to say the atomic is
> not allowed.
> - Patch 2: the fetching and/or/xor tests in verifier_arena_scalar now
> have to load and pass on x86-64 as well as arm64, at both widths and
> with the operand in a register and in R0. Two more run a fetching or
> against a freed page, with the operand in a register and in R0, so that
> the access faults, and check that the fetched register comes back 0 and
> that R0 is left alone. The page holds a nonzero value first, so that an
> access which did not fault would show, and R0 is compared with a value
> derived from the page address, as a constant comparison would be decided
> by the verifier and dropped. The 32-bit operands have bits set above 32.
> - Patch 2: read the address back after the faulting access, in both the
> freed-page tests and uaf. A fault that missed the JIT's exception table
> entry would be recovered by the arena mapping its zeroed scratch page and
> the access would succeed, which the checks on the registers alone could
> not tell apart. uaf now faults on the page after the freed one, as the
> freed page's 32-bit address is 0 and the address check was empty.
> - Patch 2: skip the uaf register checks on powerpc64, whose JIT does not
> clear the fetched register of a faulting atomic yet.
> - Rebased.
>
> [...]
Here is the summary with links:
- [bpf-next,v5,1/3] bpf, x86: Support fetching AND/OR/XOR atomics in arena
https://git.kernel.org/bpf/bpf-next/c/d9efbaed7e61
- [bpf-next,v5,2/3] selftests/bpf: Test fetching AND/OR/XOR atomics in arena
https://git.kernel.org/bpf/bpf-next/c/9e35f216e5c5
- [bpf-next,v5,3/3] sched_ext: Use fetching atomics for cmask instead of a cmpxchg loop
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2026-10-16 19:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 17:13 [PATCH bpf-next v5 0/3] bpf, x86: Support fetching AND/OR/XOR atomics in arena Puranjay Mohan
2026-10-16 17:13 ` [PATCH bpf-next v5 1/3] " Puranjay Mohan
2026-10-16 17:49 ` Tejun Heo
2026-10-16 17:13 ` [PATCH bpf-next v5 2/3] selftests/bpf: Test " Puranjay Mohan
2026-10-16 17:21 ` sashiko-bot
2026-10-16 17:46 ` Puranjay Mohan
2026-10-16 17:49 ` Tejun Heo
2026-10-16 17:13 ` [PATCH bpf-next v5 3/3] sched_ext: Use fetching atomics for cmask instead of a cmpxchg loop Puranjay Mohan
2026-10-16 17:43 ` bot+bpf-ci
2026-10-16 19:00 ` patchwork-bot+netdevbpf [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=179217720501.923903.6746374630856915617.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=puranjay@kernel.org \
--cc=song@kernel.org \
--cc=tj@kernel.org \
--cc=yonghong.song@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