diff options
| author | Kees Cook <kees@kernel.org> | 2025-09-03 20:46:41 -0700 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-09-04 21:59:07 +0200 |
| commit | 628a15e0536abb7658cd243553312d3f65c0aff2 (patch) | |
| tree | 9db0b6cf22369af0ab0351c3914dafea64ac65c2 | |
| parent | 038c7dc66e2744e5df57163b8f957745ae10d23e (diff) | |
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 <kees@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250904034656.3670313-2-kees@kernel.org
| -rw-r--r-- | arch/x86/kernel/cfi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cfi.c b/arch/x86/kernel/cfi.c index 77086cf565ec..638eb5c933e0 100644 --- a/arch/x86/kernel/cfi.c +++ b/arch/x86/kernel/cfi.c @@ -27,7 +27,7 @@ static bool decode_cfi_insn(struct pt_regs *regs, unsigned long *target, * for indirect call checks: * * movl -<id>, %r10d ; 6 bytes - * addl -4(%reg), %r10d ; 4 bytes + * addl -<pos>(%reg), %r10d; 4 bytes * je .Ltmp1 ; 2 bytes * ud2 ; <- regs->ip * .Ltmp1: |
