Re: [PATCH v2] x86/mm: Do not verify W^X at boot up on ftrace trampolines

From: Steven Rostedt
Date: Mon Oct 24 2022 - 21:12:59 EST


On Mon, 24 Oct 2022 16:58:58 -0700
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Mon, Oct 24, 2022 at 3:25 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> >
> > From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
> >
> > Adding on the kernel command line "ftrace=function" triggered:
>
> This one I *really* detest.
>
> If we have to have a special case, make it just be the simple
> "system_state == SYSTEM_BOOTING", don't make it even nastier.
>
> Special cases are bad. Making them these kinds of "this is
> super-magical and special" is even worse.
>

I was just trying to narrow down the one special case that allows the
one exception to get pass the security check. It's what they taught me in
security school. Only allow what you know is allowable and block everything
else.

But anyway, I'll just let anyone take the v1 patch. I'll add it to my tests
so that I can at least get my tests to finish.

-- Steve