[PATCH 1/9] lib: stackprot: fix type for %pS
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue May 27 13:13:51 PDT 2025
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 at 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
More information about the barebox
mailing list