Skip to contentSkip to conversation

arch-remove-get_task_comm-and-print-task-comm-directly.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Jan 13, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: arch: remove get_task_comm() and print task comm directly
has been removed from the -mm tree. Its filename was
arch-remove-get_task_comm-and-print-task-comm-directly.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Yafang Shao <[email protected]>
Subject: arch: remove get_task_comm() and print task comm directly
Date: Thu, 19 Dec 2024 10:34:49 +0800

Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations.

Cc Vineet Gupta <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc "André Almeida" <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Danilo Krummrich <[email protected]>
Cc Darren Hart <[email protected]>
Cc David Airlie <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc James Morris <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jiri Slaby <[email protected]>
Cc Johannes Berg <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Kalle Valo <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Kees Cook <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Lyude Paul <[email protected]>
Cc Oded Gabbay <[email protected]>
Cc Paul Moore <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc "Serge E. Hallyn" <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Tvrtko Ursulin <[email protected]>

---

 arch/arc/kernel/unaligned.c |    5 ++---
 arch/x86/kernel/vm86_32.c   |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
arch/arc/kernel/unaligned.c renamed from arch/arc/kernel/unaligned.c~arch-remove-get_task_comm-and-print-task-comm-directly +2 -3
@@ -200,7 +200,6 @@ int misaligned_fixup(unsigned long addre
 		     struct callee_regs *cregs)
 {
 	struct disasm_state state;
-	char buf[TASK_COMM_LEN];
 
 	/* handle user mode only and only if enabled by sysadmin */
 	if (!user_mode(regs) || !unaligned_enabled)
@@ -212,11 +211,11 @@ int misaligned_fixup(unsigned long addre
 			     " performance significantly\n. To enable further"
 			     " logging of such instances, please \n"
 			     " echo 0 > /proc/sys/kernel/ignore-unaligned-usertrap\n",
-			     get_task_comm(buf, current), task_pid_nr(current));
+			     current->comm, task_pid_nr(current));
 	} else {
 		/* Add rate limiting if it gets down to it */
 		pr_warn("%s(%d): unaligned access to/from 0x%lx by PC: 0x%lx\n",
-			get_task_comm(buf, current), task_pid_nr(current),
+			current->comm, task_pid_nr(current),
 			address, regs->ret);
 
 	}
arch/x86/kernel/vm86_32.c renamed from arch/x86/kernel/vm86_32.c~arch-remove-get_task_comm-and-print-task-comm-directly +2 -3
@@ -246,9 +246,8 @@ static long do_sys_vm86(struct vm86plus_
 
 	/* VM86_SCREEN_BITMAP had numerous bugs and appears to have no users. */
 	if (v.flags & VM86_SCREEN_BITMAP) {
-		char comm[TASK_COMM_LEN];
-
-		pr_info_once("vm86: '%s' uses VM86_SCREEN_BITMAP, which is no longer supported\n", get_task_comm(comm, current));
+		pr_info_once("vm86: '%s' uses VM86_SCREEN_BITMAP, which is no longer supported\n",
+			     current->comm);
 		return -EINVAL;
 	}
 

_

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