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: <3363644.unjjqdaQx2@wuerfel>
Date:	Fri, 18 Dec 2015 15:21:27 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	akpm@...ux-foundation.org
Cc:	Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] printk-nmi: use %zu format string for size_t

Newly added code in vprintk_nmi prints a size_t using %lu, which causes
a warning on architectures like ARM where it is defined as unsigned int:

kernel/printk/nmi.c: In function '__printk_nmi_flush':
kernel/printk/nmi.c:143:10: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=]

This uses the format string that works on all architectures.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: 0dcfca2060ee ("printk-nmi-generic-solution-for-safe-printk-in-nmi-v4")
---
Found on arm randconfig builds

Please fold this into the patch that caused the warning

diff --git a/kernel/printk/nmi.c b/kernel/printk/nmi.c
index 92c61e960c4a..cdee2707a1f2 100644
--- a/kernel/printk/nmi.c
+++ b/kernel/printk/nmi.c
@@ -140,7 +140,7 @@ more:
 	 * @len must only increase.
 	 */
 	if (i && i >= len)
-		pr_err("printk_nmi_flush: internal error: i=%d >= len=%lu\n",
+		pr_err("printk_nmi_flush: internal error: i=%d >= len=%zu\n",
 		       i, len);
 
 	if (!len)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ