Messages in this thread | | | Date | Tue, 14 Sep 2021 12:40:08 -0700 | From | Kees Cook <> | Subject | Re: [PATCH v3 15/16] x86, kprobes: Fix optprobe_template_func type mismatch |
| |
On Tue, Sep 14, 2021 at 12:10:44PM -0700, Sami Tolvanen wrote: > The optprobe_template_func symbol is defined in inline assembly, > but it's not marked global, which conflicts with the C declaration > needed for STACK_FRAME_NON_STANDARD and confuses the compiler when > CONFIG_CFI_CLANG is enabled. > > Marking the symbol global would make the compiler happy, but as the > compiler also generates a CFI jump table entry for all address-taken > functions, the jump table ends up containing a jump to the .rodata > section where optprobe_template_func resides, which results in an > objtool warning. > > Use ASM_STACK_FRAME_NON_STANDARD instead to avoid both issues. > > Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
-- Kees Cook
| |