Messages in this thread | | | Date | Wed, 13 Oct 2021 13:11:35 -0700 | From | Josh Poimboeuf <> | Subject | Re: [PATCH 1/9] objtool,x86: Replace alternatives with .retpoline_sites |
| |
On Wed, Oct 13, 2021 at 02:22:18PM +0200, Peter Zijlstra wrote: > Instead of writing complete alternatives, simply provide a list of all > the retpoline thunk calls. Then the kernel is free to do with them as > it pleases. Simpler code all-round. > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+1, let the kernel patch its own damn self ;-)
> +int arch_rewrite_retpolines(struct objtool_file *file)
Guess it shouldn't be called arch_rewrite_retpolines() anymore. And it can be moved to check.c next to create_static_call_sections().
Also is it possible to remove the arch_is_retpoline() check in get_alt_entry()? I'm having trouble remembering why that was needed in the first place.
-- Josh
| |