lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250712192202.707192-10-gatlin.newhouse@gmail.com>
Date: Sat, 12 Jul 2025 19:21:54 +0000
From: Gatlin Newhouse <gatlin.newhouse@...il.com>
To: linux-hardening@...r.kernel.org
Cc: Gatlin Newhouse <gatlin.newhouse@...il.com>
Subject: [RFC v1 09/17] exit: add destruction of SafeFetch caches and debug info to do_exit()

---
 kernel/exit.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/kernel/exit.c b/kernel/exit.c
index bb184a67ac73..c712cd11a2c7 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -951,6 +951,22 @@ void __noreturn do_exit(long code)
 
 	exit_mm();
 
+#ifdef CONFIG_SAFEFETCH
+	#include <linux/safefetch.h>
+	#include <linux/region_allocator.h>
+	#include <linux/safefetch_static_keys.h>
+//        if (!(tsk->flags & PF_KTHREAD))
+//        df_task_destroy(tsk);
+	IF_SAFEFETCH_STATIC_BRANCH_UNLIKELY_WRAPPER(safefetch_hooks_key) {
+		if (!(tsk->flags & PF_KTHREAD)) {
+			destroy_regions();
+#ifdef SAFEFETCH_DEBUG
+			df_debug_task_destroy(tsk);
+#endif
+		}
+	}
+#endif
+
 	if (group_dead)
 		acct_process();
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ