[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250825142603.1907143-2-kees@kernel.org>
Date: Mon, 25 Aug 2025 07:25:49 -0700
From: Kees Cook <kees@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Kees Cook <kees@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
David Woodhouse <dwmw2@...radead.org>,
Linus Walleij <linus.walleij@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Puranjay Mohan <puranjay@...nel.org>,
Jonathan Corbet <corbet@....net>,
Nathan Chancellor <nathan@...nel.org>,
x86@...nel.org,
linux-doc@...r.kernel.org,
linux-kbuild@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org,
llvm@...ts.linux.dev,
linux-hardening@...r.kernel.org
Subject: [PATCH 2/5] 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@...nel.org>
---
arch/x86/kernel/cfi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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:
--
2.34.1
Powered by blists - more mailing lists