Skip to content

Commit 628a15e

Browse files
keesPeter Zijlstra
authored andcommitted
x86/traps: Clarify KCFI instruction layout
Just a nit-picky change to the KCFI indirect call check instruction documentation. The addl offset isn't always -4 (it depends on patchable function entry configuration). Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 038c7dc commit 628a15e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cfi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static bool decode_cfi_insn(struct pt_regs *regs, unsigned long *target,
2727
* for indirect call checks:
2828
*
2929
*   movl -<id>, %r10d ; 6 bytes
30-
* addl -4(%reg), %r10d ; 4 bytes
30+
* addl -<pos>(%reg), %r10d; 4 bytes
3131
* je .Ltmp1 ; 2 bytes
3232
* ud2 ; <- regs->ip
3333
* .Ltmp1:

0 commit comments

Comments
 (0)