summaryrefslogtreecommitdiffstats
path: root/scripts/check-git
diff options
context:
space:
mode:
authorLeon Hwang <leon.hwang@linux.dev>2026-09-30 13:36:18 +0800
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-10-02 15:51:57 +0900
commit7a39c732a22ec4a369af9e19fbe3d666ec83eec4 (patch)
tree58fdbe99f1eb36067d3bc2cce87313c46d894a47 /scripts/check-git
parente0a6249190402a28f1e2925a81acf573157d55ef (diff)
downloadlinux-stable-7a39c732a22ec4a369af9e19fbe3d666ec83eec4.tar.gz
linux-stable-7a39c732a22ec4a369af9e19fbe3d666ec83eec4.zip
kprobes: Skip disarmed probes when checking optkprobe overlap
On x86, an optkprobe at A replaces five bytes with a jump. If a disabled probe B is at A+2, get_optimized_kprobe() stops at B when arming a new probe C at A+4. It leaves A optimized: A A+1 A+2 A+3 A+4 A's jump | e9 | d0 | d1 | d2 | d3 | after C | e9 | d0 | d1 | d2 | cc | The INT3 for C overwrites the last byte of A's jump displacement, so execution can jump to the wrong address. B can have prepared optinsns while disarmed, but has no jump to unoptimize. Continue past disarmed and unprepared probes to find the active optimized probe before arming a probe in its jump. Link: https://lore.kernel.org/all/20260930053618.104498-1-leon.hwang@linux.dev/ Fixes: afd66255b9a4 ("kprobes: Introduce kprobes jump optimization") Cc: stable@vger.kernel.org Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'scripts/check-git')
0 files changed, 0 insertions, 0 deletions