Re: [RFC][PATCH 0/6] x86: Kernel IBT beginnings

Nick Desaulniers
2022-02-09T00:09:26Z

On Mon, Nov 22, 2021 at 9:14 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> Hi,
>
> So I hacked this up on Friday night / Saturday morning and spend all of today
> cleaning it up.
>
> It is the very bare beginnings of kernel IBT support. Since I'm lacking any
> sort of actual hardware it even lacks fun things like code to write to the MSRs
> to enable the IBT tracker etc..
>
> However, it should have most of the ENDBR instructions in the right place -- I
> hope :-) That said; I would *really* like compiler support for this stuff to be
> improved, the amount of fixups done by objtool is obscene.
>
> The end result still boots on ancient x86-64 hardware, for whatever that's
> worth (when built with the below turd included that is).

Thanks for the patches!

Are there recommended command line args for qemu emulation to test
this with? Tigerlake and Alderlake should be required for IBT support
IIRC from our IRC discussion?
https://qemu.readthedocs.io/en/latest/system/qemu-cpu-models.html#preferred-cpu-models-for-intel-x86-hosts
No hits for:
$ qemu-system-x86_64 -cpu help | grep -e tiger -e alder
$ qemu-system-x86_64 --version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

--
Thanks,
~Nick Desaulniers