linux/arch
Josephine Pfeiffer f8d974a0e8 riscv: ptdump: use seq_puts() in pt_dump_seq_puts() macro
[ Upstream commit a74f038fa5 ]

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 ptdump.c:301 to output a newline character. Using
seq_printf() adds unnecessary overhead for format string parsing when
outputting this constant string.

This bug was introduced in commit 59c4da8640 ("riscv: Add support to
dump the kernel page tables") in 2020, which copied the implementation
pattern from other architectures that had the same bug.

Fixes: 59c4da8640 ("riscv: Add support to dump the kernel page tables")
Signed-off-by: Josephine Pfeiffer <hi@josie.lol>
Link: https://lore.kernel.org/r/20251018170451.3355496-1-hi@josie.lol
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-12-07 06:09:25 +09:00
..
alpha sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
arc arc: Fix __fls() const-foldability via __builtin_clzl() 2025-12-07 06:09:16 +09:00
arm ARM: at91: pm: save and restore ACR during PLL disable/enable 2025-12-07 06:09:24 +09:00
arm64 arm64: errata: Apply workarounds for Neoverse-V3AE 2025-10-29 14:03:13 +01:00
csky sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
h8300 sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
hexagon sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
ia64 sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
m68k m68k: bitops: Fix find_*_bit() signatures 2025-10-29 14:03:10 +01:00
microblaze sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
mips mips: lantiq: xway: sysctrl: rename stp clock 2025-12-07 06:09:20 +09:00
nds32 sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
nios2 nios2: ensure that memblock.current_limit is set when setting pfn limits 2025-10-29 14:03:10 +01:00
openrisc sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
parisc arch: back to -std=gnu89 in < v5.18 2025-12-07 06:09:15 +09:00
powerpc powerpc/eeh: Use result of error_detected() in uevent 2025-12-07 06:09:19 +09:00
riscv riscv: ptdump: use seq_puts() in pt_dump_seq_puts() macro 2025-12-07 06:09:25 +09:00
s390 arch: back to -std=gnu89 in < v5.18 2025-12-07 06:09:15 +09:00
sh sh: Do not use hyphen in exported variable name 2025-08-28 16:24:11 +02:00
sparc sparc/module: Add R_SPARC_UA64 relocation handling 2025-12-07 06:09:23 +09:00
um um: Fix help message for ssl-non-raw 2025-12-07 06:09:24 +09:00
x86 x86/kvm: Prefer native qspinlock for dedicated vCPUs irrespective of PV_UNHALT 2025-12-07 06:09:21 +09:00
xtensa sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:24:48 +02:00