Commit d5ba86298b45 for kernel
commit d5ba86298b45e1a81c578c499e9a222a3b734d5d
Merge: 7543d8d314b2 c21b0f82ca96
Author: Alexei Starovoitov <ast@kernel.org>
Date: Fri Nov 20 02:30:59 2026 +0000
Merge branch 'bpf-limit-writable-registers-in-uprobe-context'
Jiri Olsa says:
====================
bpf: Limit writable registers in uprobe context
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.
The second patch adds verifier tests for writable and read-only registers
on x86-64, arm64, and riscv.
Patch 1 fixes the issue reported by rtm and is marked for stable consideration.
Patch 2 adds the regression tests.
thanks,
jirka
====================
Link: https://patch.msgid.link/20261118084451.12590-1-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>