Skip to contentSkip to conversation

kasan-restructure-kasan_report.patch removed from -mm tree

merged Andrew Morton 1 participant 1 message Mar 25, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The patch titled
Subject: kasan: restructure kasan_report
has been removed from the -mm tree. Its filename was
kasan-restructure-kasan_report.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Andrey Konovalov <[email protected]>
Subject: kasan: restructure kasan_report

Restructure kasan_report() to make reviewing the subsequent patches easier.

---

 mm/kasan/report.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
mm/kasan/report.c renamed from mm/kasan/report.c~kasan-restructure-kasan_report +9 -6
@@ -457,15 +457,18 @@ static void __kasan_report(void *addr, s
 bool kasan_report(unsigned long addr, size_t size, bool is_write,
 			unsigned long ip)
 {
-	unsigned long flags = user_access_save();
-	bool ret = false;
+	unsigned long ua_flags = user_access_save();
+	bool ret = true;
 
-	if (likely(report_enabled())) {
-		__kasan_report((void *)addr, size, is_write, ip);
-		ret = true;
+	if (unlikely(!report_enabled())) {
+		ret = false;
+		goto out;
 	}
 
-	user_access_restore(flags);
+	__kasan_report((void *)addr, size, is_write, ip);
+
+out:
+	user_access_restore(ua_flags);
 
 	return ret;
 }

_

Patches currently in -mm which might be from [email protected] are

stacktrace-add-interface-based-on-shadow-call-stack.patch arm64-scs-save-scs_sp-values-per-cpu-when-switching-stacks.patch arm64-implement-stack_trace_save_shadow.patch kasan-use-stack_trace_save_shadow.patch