From: Alexander Potapenko Date: Fri, 26 Feb 2021 01:19:47 +0000 (-0800) Subject: kfence: use error_report_end tracepoint X-Git-Tag: accepted/tizen/unified/20230118.172025~7728^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2b84d2e40eb1a17f72dc4a1da463ec8de649f19;p=platform%2Fkernel%2Flinux-rpi.git kfence: use error_report_end tracepoint Make it possible to trace KFENCE error reporting. A good usecase is watching for trace events from the userspace to detect and process memory corruption reports from the kernel. Link: https://lkml.kernel.org/r/20210121131915.1331302-3-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Marco Elver Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Petr Mladek Cc: Steven Rostedt Cc: Sergey Senozhatsky Cc: Vlastimil Babka Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/kfence/report.c b/mm/kfence/report.c index 4a424de..ab83d5a 100644 --- a/mm/kfence/report.c +++ b/mm/kfence/report.c @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -248,6 +249,7 @@ void kfence_report_error(unsigned long address, bool is_write, struct pt_regs *r show_regs(regs); else dump_stack_print_info(KERN_ERR); + trace_error_report_end(ERROR_DETECTOR_KFENCE, address); pr_err("==================================================================\n"); lockdep_on();