Sami Tolvanen
983df5f269
samples/ftrace: Mark my_tramp[12]? global
...
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: 9d907f1ae8
("ftrace/samples: Add a sample module that implements modify_ftrace_direct()")
Reviewed-by: Kees Cook <keescook@chromium.org >
Signed-off-by: Sami Tolvanen <samitolvanen@google.com >
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
2020-11-30 21:42:48 -05:00
Josh Poimboeuf
9d907f1ae8
samples/ftrace: Fix asm function ELF annotations
...
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 <rdunlap@infradead.org >
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com >
2020-05-20 08:30:43 -05:00
Colin Ian King
760f8bc7c8
ftrace/selftests: Fix spelling mistake "wakeing" -> "waking"
...
There is a spelling mistake in a trace_printk message. As well as in
the selftests that search for this string.
Link: http://lkml.kernel.org/r/20191115085938.38947-1-colin.king@canonical.com
Link: http://lkml.kernel.org/r/20191115090356.39572-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
2019-11-15 11:30:38 -05:00
Steven Rostedt (VMware)
b06457c83a
ftrace: Add sample module that uses register_ftrace_direct()
...
Add a sample module that shows a simple use case for
regsiter_ftrace_direct(), and how to use it.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
2019-11-13 09:36:49 -05:00