Re: [RFC PATCH 01/11] x86: kernel FineIBT

From: Sami Tolvanen
Date: Wed May 04 2022 - 20:29:38 EST


On Wed, May 4, 2022 at 11:17 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> __cfi_\sym: __cfi_\sym:
> int3; int3 # 2
> endbr # 4 mov \hash, %eax # 5
> call __fineibt_\hash # 5 int3; int3 # 2
> \sym: \sym:

OK, that looks reasonable to me.

> It seems to preserve the properties of the last one in that direct calls
> will already be correct and we don't need linker fixups, and objtool can
> simply parse the preamble as regular instructions without needing
> further help.

Wouldn't objtool still print out unreachable instruction warnings here?

Sami