summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorJiayuan Chen <jiayuan.chen@linux.dev>2026-08-25 23:04:33 +0800
committerAndrii Nakryiko <andrii@kernel.org>2026-08-25 11:39:12 -0700
commit8b94878b2572f0f41e6002d0fe2cc4086ddc2a47 (patch)
treef230cbef6df35aa89d2ead835131cfeeb425de71 /scripts/Makefile.thinlto
parent05ea1b6e2a5d008c24b7a2c6eaa3f708d9026994 (diff)
downloadlinux-next-8b94878b2572f0f41e6002d0fe2cc4086ddc2a47.tar.gz
linux-next-8b94878b2572f0f41e6002d0fe2cc4086ddc2a47.zip
libbpf: Fix usdt attach failure when nop10 crosses page boundary
The kernel refuses to attach to a nop10 that crosses a page boundary, since it can't be atomically rewritten: /* can_optimize(), arch/x86/kernel/uprobes.c */ /* We can't do cross page atomic writes yet. */ return PAGE_SIZE - (vaddr & ~PAGE_MASK) >= OPT_INSN_SIZE; Whether the nop10 crosses a page is purely up to the binary layout, so this does happen in practice. libbpf doesn't check for it and blindly shifts the uprobe onto the nop10, and the attach then fails with -ENOTSUPP. Just keep the uprobe on the preceding 1-byte nop in that case, it works everywhere as a regular int3 uprobe. Fixes: ee2862439e5c ("libbpf: Change has_nop_combo to work on top of nop10") Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20260825150444.31603-1-jiayuan.chen@linux.dev
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions