Thread (81 messages) flat view 81 messages, 8 authors, 2022-05-25

Re: [RFC PATCH v2 20/21] x86: Add support for CONFIG_CFI_CLANG

From: Sami Tolvanen <samitolvanen@google.com>
Date: 2022-05-17 20:36:59
Also in: linux-hardening, lkml, llvm

On Mon, May 16, 2022 at 11:44 PM Peter Zijlstra [off-list ref] wrote:
On Mon, May 16, 2022 at 03:03:02PM -0700, Sami Tolvanen wrote:
quoted
On Mon, May 16, 2022 at 2:44 PM Peter Zijlstra [off-list ref] wrote:
quoted
On Mon, May 16, 2022 at 09:32:55PM +0000, David Laight wrote:
quoted
quoted
The compiler always generates this specific instruction sequence.
Yes, but there are several ways to encode 'cmpl imm,-6(reg)'.
Yes, but we don't care. This *always* uses the 32bit immediate form.
Even if the immediate is small.
Yes, that part is not a problem, but it's a valid point that LLVM
might not always use r8-r15 here, so I will have to check for the REX
prefix before blindly attempting to decode the instruction.
LLVM has always used r11 for indirect calls, will that change?
No, this won't change register allocation, but I will have to ensure
that the compiler won't do any unnecessary register shuffling for the
check itself.

Sami

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help