[PATCH bpf 0/2] bpf: Limit writable registers in uprobe context

patchwork-bot+netdevbpf at kernel.org patchwork-bot+netdevbpf at kernel.org
Thu Nov 19 18:40:06 PST 2026


Hello:

This series was applied to bpf/bpf.git (master)
by Alexei Starovoitov <ast at kernel.org>:

On Wed, 18 Nov 2026 09:44:48 +0100 you wrote:
> Hi,
> a uprobe BPF program can currently write fields in struct pt_regs that
> are loaded directly by the architecture’s return-to-user path. Some of
> these fields are restricted by ptrace, but the BPF verifier does not
> apply the same restrictions.
> 
> This series limits uprobe context writes to registers that ptrace can
> set to arbitrary values. It adds architecture-specific writable-register
> checks for arm64, riscv, and x86-64; other architectures default to
> allowing no writes. Reads are unchanged.
> 
> [...]

Here is the summary with links:
  - [bpf,1/2] bpf: Restrict uprobe ctx writes to the registers ptrace can set
    https://git.kernel.org/bpf/bpf/c/ca44731a7009
  - [bpf,2/2] selftests/bpf: Test which ctx registers a uprobe prog can write
    https://git.kernel.org/bpf/bpf/c/c21b0f82ca96

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





More information about the linux-riscv mailing list