01 Dec, 2020

1 commit

  • my_tramp[12]? are declared as global functions in C, but they are not
    marked global in the inline assembly definition. This mismatch confuses
    Clang's Control-Flow Integrity checking. Fix the definitions by adding
    .globl.

    Link: https://lkml.kernel.org/r/20201113183414.1446671-1-samitolvanen@google.com

    Fixes: 9d907f1ae80b8 ("ftrace/samples: Add a sample module that implements modify_ftrace_direct()")
    Reviewed-by: Kees Cook
    Signed-off-by: Sami Tolvanen
    Signed-off-by: Steven Rostedt (VMware)

    Sami Tolvanen
     

20 May, 2020

1 commit

  • Enable objtool coverage for the sample ftrace modules by adding ELF
    annotations to the asm trampoline functions.

    samples/ftrace/ftrace-direct.o: warning: objtool: .text+0x0: unreachable instruction
    samples/ftrace/ftrace-direct-modify.o: warning: objtool: .text+0x0: unreachable instruction
    samples/ftrace/ftrace-direct-too.o: warning: objtool: .text+0x0: unreachable instruction

    Reported-by: Randy Dunlap
    Signed-off-by: Josh Poimboeuf

    Josh Poimboeuf
     

15 Nov, 2019

1 commit