Re: [PATCH] x86/kprobes: Fix boundary check in insn_jump_into_range()

From: Dave Hansen

Date: Thu Nov 19 2026 - 14:42:09 EST


On 11/17/26 04:25, Jinke Han wrote:
> The range checked by insn_jump_into_range() is half-open:
> [start, start + len). However, the current check treats the upper
> bound as inclusive, so a jump target at `probe address +
> JMP32_INSN_SIZE` is incorrectly considered to jump into the
> optimized region.
>
> A valid jump target must be an instruction boundary. A target at
> `probe address + JMP32_INSN_SIZE` lies just outside the overwritten
> region, so allow the jmp optimization in this case.

What is the end user visible effect of this issue, and of fixing it?