Skip to contentSkip to conversation

kernel-panic-increase-buffer-size-for-verbose-taint-logging.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Mar 28

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kernel/panic: increase buffer size for verbose taint logging
has been removed from the -mm tree. Its filename was
kernel-panic-increase-buffer-size-for-verbose-taint-logging.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: Rio <[email protected]>
Subject: kernel/panic: increase buffer size for verbose taint logging
Date: Fri, 20 Feb 2026 20:45:00 +0530

The verbose 'Tainted: ...' string in print_tainted_seq can total to 327 characters while the buffer defined in _print_tainted is 320 bytes. Increase its size to 350 characters to hold all flags, along with some headroom.

---

 kernel/panic.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
kernel/panic.c renamed from kernel/panic.c~kernel-panic-increase-buffer-size-for-verbose-taint-logging +6 -2
@@ -801,6 +801,8 @@ EXPORT_SYMBOL(panic);
  * Documentation/admin-guide/tainted-kernels.rst, including its
  * small shell script that prints the TAINT_FLAGS_COUNT bits of
  * /proc/sys/kernel/tainted.
+ *
+ * Also, update TAINT_BUF_MAX below.
  */
 const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
 	TAINT_FLAG(PROPRIETARY_MODULE,		'P', 'G'),
@@ -854,10 +856,12 @@ static void print_tainted_seq(struct seq
 	}
 }
 
+/* 350 can accommodate all taint flags in verbose mode, with some headroom */
+#define TAINT_BUF_MAX 350
+
 static const char *_print_tainted(bool verbose)
 {
-	/* FIXME: what should the size be? */
-	static char buf[sizeof(taint_flags)];
+	static char buf[TAINT_BUF_MAX];
 	struct seq_buf s;
 
 	BUILD_BUG_ON(ARRAY_SIZE(taint_flags) != TAINT_FLAGS_COUNT);

_

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