]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
uprobes/x86: Accept more NOP forms
authorPeter Zijlstra <peterz@infradead.org>
Wed, 20 Aug 2025 10:55:14 +0000 (12:55 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 21 Aug 2025 18:09:21 +0000 (20:09 +0200)
commit7c2bfc183b05103287cc32ad68184f7d4312c06d
treeb166a2d5eda6f90ef3e24ac90816e2d4222d13d0
parentfd54052b60cf6e73cf918fd8653cd7a5c84b0cc3
uprobes/x86: Accept more NOP forms

Instead of only accepting the x86_64 nop5 chosen by the kernel, accept
any x86_64 NOP or NOPL instruction that is 5 bytes.

Notably, the x86_64 nop5 pattern is valid in 32bit apps and could get
compiler generated when build for i686 (which introduced NOPL). Since
the trampoline is x86_64 only, make sure to limit to x86_64 code.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250821123656.935559566@infradead.org
arch/x86/kernel/uprobes.c