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

Sami Tolvanen samitolvanen at google.com
Mon May 16 15:03:02 PDT 2022


On Mon, May 16, 2022 at 2:44 PM Peter Zijlstra <peterz at infradead.org> wrote:
>
> On Mon, May 16, 2022 at 09:32:55PM +0000, David Laight wrote:
>
> > > 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.

Sami



More information about the linux-arm-kernel mailing list