s390-ftrace-unpoison-ftrace_regs-in-kprobe_ftrace_handler.patch removed from -mm tree
The quilt patch titled
Subject: s390/ftrace: unpoison ftrace_regs in kprobe_ftrace_handler()
has been removed from the -mm tree. Its filename was
s390-ftrace-unpoison-ftrace_regs-in-kprobe_ftrace_handler.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Ilya Leoshkevich <[email protected]>
Subject: s390/ftrace: unpoison ftrace_regs in kprobe_ftrace_handler()
Date: Fri, 21 Jun 2024 13:35:13 +0200
s390 uses assembly code to initialize ftrace_regs and call kprobe_ftrace_handler(). Therefore, from the KMSAN's point of view, ftrace_regs is poisoned on kprobe_ftrace_handler() entry. This causes KMSAN warnings when running the ftrace testsuite.
Fix by trusting the assembly code and always unpoisoning ftrace_regs in kprobe_ftrace_handler().
---
arch/s390/kernel/ftrace.c | 2 ++ 1 file changed, 2 insertions(+)
arch/s390/kernel/ftrace.c renamed from arch/s390/kernel/ftrace.c~s390-ftrace-unpoison-ftrace_regs-in-kprobe_ftrace_handler +2 -0
@@ -12,6 +12,7 @@#include <linux/ftrace.h> #include <linux/kernel.h> #include <linux/types.h> +#include <linux/kmsan-checks.h> #include <linux/kprobes.h> #include <linux/execmem.h> #include <trace/syscall.h>
@@ -303,6 +304,7 @@ void kprobe_ftrace_handler(unsigned longif (bit <0 )return ; +kmsan_unpoison_memory (fregs,sizeof (*fregs)); regs =ftrace_get_regs (fregs); p =get_kprobe ((kprobe_opcode_t *)ip);if (!regs ||unlikely (!p) ||kprobe_disabled (p))
_
Patches currently in -mm which might be from [email protected] are