mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/9] lib: stackprot: fix type for %pS
@ 2025-05-27 20:13 Ahmad Fatoum
  2025-05-27 20:13 ` [PATCH 2/9] fastboot: use correct format specifier for size_t Ahmad Fatoum
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2025-05-27 20:13 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Adding __printf to the panic definition in the follow up commit will
make it evident that we are using a long value for a %pS format
specifier, which is not correct, albeit they have the same size.

Fix this by adding the missing cast.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 lib/stackprot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/stackprot.c b/lib/stackprot.c
index 7a8d0a4c1064..1bf4f7e7a5b4 100644
--- a/lib/stackprot.c
+++ b/lib/stackprot.c
@@ -24,7 +24,8 @@ volatile ulong __stack_chk_guard = (ulong)(0xfeedf00ddeadbeef & ~0UL);
  */
 noinstr void __stack_chk_fail(void)
 {
-	panic("stack-protector: " STAGE " stack is corrupted in: %pS\n", _RET_IP_);
+	panic("stack-protector: " STAGE " stack is corrupted in: %pS\n",
+	      (void *)_RET_IP_);
 }
 EXPORT_SYMBOL(__stack_chk_fail);
 
-- 
2.39.5




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-05-27 20:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-27 20:13 [PATCH 1/9] lib: stackprot: fix type for %pS Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 2/9] fastboot: use correct format specifier for size_t Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 3/9] Makefile: don't warn over zero-size format string Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 4/9] scripts: define __printf attribute macro Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 5/9] treewide: specify __printf attribute directly on static definition Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 6/9] treewide: replace attribute with shorter __printf macro Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 7/9] treewide: add missing __printf attributes Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 8/9] vsprintf: add %ps format specifier for symbols without offset Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 9/9] lib: random: print get_crypto_bytes caller when no HWRNG is registered Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox