x86/retpoline: Fix crash printing warning
Subsystems (2)
PATCH 1/1 x86/retpoline: Fix crash printing warning
The first argument of WARN() is a condition, so this will use "addr" as the format string and possibly crash.
--- arch/x86/kernel/alternative.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/alternative.c +1 -1
@@ -418,7 +418,7 @@ static int emit_call_track_retpoline(void *addr, struct insn *insn, int reg, u8break ;default : -WARN ("%pS %px %*ph\n" , addr, addr,6 , addr); +WARN (1 ,"%pS %px %*ph\n" , addr, addr,6 , addr);return -1 ; }
Signature · 1 line
2.35.1
Quoted 5 lines · Dan Carpenter
The first argument of
WARN()is a condition, so this will use "addr" as the format string and possibly crash.Fixes 3b6c1747da48 ("x86/retpoline: Add SKL retthunk retpolines")Signed-off-by Dan Carpenter <[email protected]>
Hello x86 maintainers,
I found this patch in the tip tree with the following commit message:
x86/retpoline: Fix crash printing warningx86/core
The first argument of WARN() is a condition, so this will use "addr" as the format string and possibly crash.
When I visited that lkml link, it shows "message ID not found". The problem seems to be coming from the tool used to pick up the patch.
That message ID contains a URL special char '/'. Thus it should be URL-encoded like this:
https://lore.kernel.org/r/Y1gBoUZrRK5N%2FlCB%40kili
Anyway, lkml.kernel.org doesn't work for such a message ID, even with URL-encoded message ID like this:
https://lkml.kernel.org/r/Y1gBoUZrRK5N%2FlCB%40kili (not found)
Signature · 1 line
Ammar Faizi
Quoted 2 lines · Ammar Faizi
When I visited that lkml link, it shows "message ID not found". The problem seems to be coming from the tool used to pick up the patch.
Thanks for the heads-up! That link is indeed generated by tooling. I'll go fix it up.