Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation

From: Steven Rostedt
Date: Wed Jul 20 2022 - 15:43:54 EST


On Wed, 20 Jul 2022 12:36:38 -0700
Kees Cook <keescook@xxxxxxxxxxxx> wrote:

> I'd rather not remove it (or do it dynamically) since the point is to
> test what has been generated by the toolchain/build process and stuffed
> into the .rodata section. i.e. making sure gadgets there can't be
> executed, that the boot-time section permission-setting works correctly,
> etc. Before the retbleed mitigation, this test worked for all
> architectures; I'd hate to regress it. :(

If you haven't noticed my reply, I wasn't able to come up with a one line
workaround, but I was able to come up with a two line workaround. Hopefully
that will be good enough to keep your little feature.

https://lore.kernel.org/all/20220720151123.0e5bf61e@xxxxxxxxxxxxxxxxxx/

I'm currently running it under my entire ftrace test suite. If it passes,
I'll submit a formal patch.

-- Steve