Patch "x86/alternative: Print unadorned pointers" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
x86/alternative: Print unadorned pointers
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-alternative-print-unadorned-pointers.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Feb 8 03:30:27 CET 2018
From: Borislav Petkov <[email protected]>
Date: Fri, 26 Jan 2018 13:11:36 +0100
Subject: x86/alternative: Print unadorned pointers
From: Borislav Petkov <[email protected]>
(cherry picked from commit 0e6c16c652cadaffd25a6bb326ec10da5bcec6b4)
After commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers are being hashed when printed. However, this makes the alternative debug output completely useless. Switch to %px in order to see the unadorned kernel pointers.
--- arch/x86/kernel/alternative.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/x86/kernel/alternative.c +7 -7
@@ -298,7 +298,7 @@ recompute_jump(struct alt_instr *a, u8 * tgt_rip = next_rip + o_dspl; n_dspl = tgt_rip - orig_insn; -DPRINTK ("target RIP: %p, new_displ: 0x%x" , tgt_rip, n_dspl); +DPRINTK ("target RIP: %px, new_displ: 0x%x" , tgt_rip, n_dspl);if (tgt_rip - orig_insn >=0 ) {if (n_dspl -2 <=127 )
@@ -352,7 +352,7 @@ static void __init_or_module optimize_nosync_core ();local_irq_restore (flags); -DUMP_BYTES (instr, a->instrlen,"%p: [%d:%d) optimized NOPs: " , +DUMP_BYTES (instr, a->instrlen,"%px: [%d:%d) optimized NOPs: " , instr, a->instrlen - a->padlen, a->padlen); }
@@ -370,7 +370,7 @@ void __init_or_module apply_alternativesu8 *instr, *replacement;u8 insnbuf[MAX_PATCH_LEN ]; -DPRINTK ("alt table %p -> %p" , start, end); +DPRINTK ("alt table %px, -> %px" , start, end);/* * The scan order should be from start to end. A later scanned * alternative code can overwrite previously scanned alternative code.
@@ -394,14 +394,14 @@ void __init_or_module apply_alternativescontinue ; } -DPRINTK ("feat: %d*32+%d, old: (%p, len: %d), repl: (%p, len: %d), pad: %d" , +DPRINTK ("feat: %d*32+%d, old: (%px len: %d), repl: (%px, len: %d), pad: %d" , a->cpuid >>5 , a->cpuid &0x1f , instr, a->instrlen, replacement, a->replacementlen, a->padlen); -DUMP_BYTES (instr, a->instrlen,"%p: old_insn: " , instr); -DUMP_BYTES (replacement, a->replacementlen,"%p: rpl_insn: " , replacement); +DUMP_BYTES (instr, a->instrlen,"%px: old_insn: " , instr); +DUMP_BYTES (replacement, a->replacementlen,"%px: rpl_insn: " , replacement);memcpy (insnbuf, replacement, a->replacementlen); insnbuf_sz = a->replacementlen;
@@ -422,7 +422,7 @@ void __init_or_module apply_alternatives a->instrlen - a->replacementlen); insnbuf_sz += a->instrlen - a->replacementlen; } -DUMP_BYTES (insnbuf, insnbuf_sz,"%p: final_insn: " , instr); +DUMP_BYTES (insnbuf, insnbuf_sz,"%px: final_insn: " , instr);text_poke_early (instr, insnbuf, insnbuf_sz); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/x86-cpufeatures-add-intel-feature-bits-for-speculation-control.patch queue-4.9/x86-retpoline-simplify-vmexit_fill_rsb.patch queue-4.9/x86-cpufeatures-clean-up-spectre-v2-related-cpuid-flags.patch queue-4.9/x86-cpufeatures-add-cpuid_7_edx-cpuid-leaf.patch queue-4.9/x86-microcode-amd-do-not-load-when-running-on-a-hypervisor.patch queue-4.9/x86-nospec-fix-header-guards-names.patch queue-4.9/x86-alternative-print-unadorned-pointers.patch queue-4.9/x86-spectre-fix-spelling-mistake-vunerable-vulnerable.patch queue-4.9/x86-pti-mark-constant-arrays-as-__initconst.patch queue-4.9/x86-bugs-drop-one-mitigation-from-dmesg.patch queue-4.9/x86-pti-do-not-enable-pti-on-cpus-which-are-not-vulnerable-to-meltdown.patch