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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251018170521.3355738-1-hi@josie.lol>
Date: Sat, 18 Oct 2025 19:05:21 +0200
From: Josephine Pfeiffer <hi@...ie.lol>
To: agordeev@...ux.ibm.com,
	gerald.schaefer@...ux.ibm.com
Cc: hca@...ux.ibm.com,
	gor@...ux.ibm.com,
	linux-s390@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 4/4] s390: 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).

The macro is used in dump_pagetables.c:67-68 and 131 to output
constant strings. Using seq_printf() adds unnecessary overhead for
format string parsing.

This bug was introduced in commit 6bf9a639e76e1 ("s390/mm,ptdump: make
page table dumping seq_file optional") in 2020, which explicitly stated
it was the "s390 version of commit ae5d1cf358a5 ("arm64: dump: Make the
page table dumping seq_file optional")", copying the buggy arm64
implementation.

Fixes: 6bf9a639e76e1 ("s390/mm,ptdump: make page table dumping seq_file optional")
Signed-off-by: Josephine Pfeiffer <hi@...ie.lol>
---
 arch/s390/mm/dump_pagetables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c
index 9af2aae0a515..3692f9d20f0d 100644
--- a/arch/s390/mm/dump_pagetables.c
+++ b/arch/s390/mm/dump_pagetables.c
@@ -51,7 +51,7 @@ struct pg_state {
 	struct seq_file *__m = (m);		\
 						\
 	if (__m)				\
-		seq_printf(__m, fmt);		\
+		seq_puts(__m, fmt);		\
 })
 
 static void print_prot(struct seq_file *m, unsigned int pr, int level)
-- 
2.51.1.dirty


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ