[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251018170442.3355403-1-hi@josie.lol>
Date: Sat, 18 Oct 2025 19:04:42 +0200
From: Josephine Pfeiffer <hi@...ie.lol>
To: linux@...linux.org.uk
Cc: linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/4] ARM: ptdump: use seq_puts() in pt_dump_seq_puts() macro
The pt_dump_seq_puts() macro incorrectly uses seq_printf() instead of
seq_puts(). This is both a performance issue and conceptually wrong,
as the macro name suggests plain string output (puts) but the
implementation uses formatted output (printf).
While there are no current call sites in the ARM implementation that
trigger this code path, fixing the macro ensures correctness and
prevents potential issues if new call sites are added in the future.
This bug was introduced in commit d02ca6d76ba7 ("ARM: 8736/1: mm: dump:
make the page table dumping seq_file") in 2017, which explicitly copied
the implementation from the buggy arm64 version (ae5d1cf358a5).
Fixes: d02ca6d76ba7 ("ARM: 8736/1: mm: dump: make the page table dumping seq_file")
Signed-off-by: Josephine Pfeiffer <hi@...ie.lol>
---
arch/arm/mm/dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c
index cd032522d902..bc90cf2404d2 100644
--- a/arch/arm/mm/dump.c
+++ b/arch/arm/mm/dump.c
@@ -42,7 +42,7 @@ static struct addr_marker address_markers[] = {
#define pt_dump_seq_puts(m, fmt) \
({ \
if (m) \
- seq_printf(m, fmt); \
+ seq_puts(m, fmt); \
})
struct pg_state {
--
2.51.1.dirty
Powered by blists - more mailing lists