[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221025191741.69a2196f@gandalf.local.home>
Date: Tue, 25 Oct 2022 19:17:40 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>, dave.hansen@...el.com,
linux-kernel@...r.kernel.org, x86@...nel.org,
keescook@...omium.org, seanjc@...gle.com
Subject: Re: [PATCH 0/5] x86/ftrace: Cure boot time W+X mapping
On Tue, 25 Oct 2022 16:07:25 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> The slowness is probably not the trampilines, but just the regular
> "text_poke of kernel text" that we probably want to keep special just
> because otherwise it's _so_ slow to do for every alternative etc.
Yes. That's why I recommended to change patch 4 to:
if (unlikely(system_state == SYSTEM_BOOTING) &&
core_kernel_text((unsigned long)addr)) {
text_poke_early(addr, opcode, len);
return;
}
The only special case we had was the ftrace trampoline that was dynamically
allocated, and there's paths that require updating it (when you add two
function callbacks to the same location).
-- Steve
Powered by blists - more mailing lists