Patch "x86/alternative: Print unadorned pointers" has been added to the 4.14-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.14-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:
x86alternative_Print_unadorned_pointers.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Subject: x86/alternative: Print unadorned pointers
From: Borislav Petkov [email protected]
Date: Fri Jan 26 13:11:36 2018 +0100
From: Borislav Petkov [email protected]
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 )
@@ -355,7 +355,7 @@ static void __init_or_module noinline opadd_nops (instr + (a->instrlen - a->padlen), a->padlen);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); }
@@ -376,7 +376,7 @@ void __init_or_module noinline apply_altu8 *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.
@@ -400,14 +400,14 @@ void __init_or_module noinline apply_altcontinue ; } -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;
@@ -433,7 +433,7 @@ void __init_or_module noinline apply_alt 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.14/x86pti_Do_not_enable_PTI_on_CPUs_which_are_not_vulnerable_to_Meltdown.patch queue-4.14/x86cpufeatures_Add_Intel_feature_bits_for_Speculation_Control.patch queue-4.14/x86alternative_Print_unadorned_pointers.patch queue-4.14/x86cpufeatures_Add_CPUID_7_EDX_CPUID_leaf.patch queue-4.14/x86bugs_Drop_one_mitigation_from_dmesg.patch queue-4.14/x86speculation_Simplify_indirect_branch_prediction_barrier().patch queue-4.14/x86nospec_Fix_header_guards_names.patch queue-4.14/x86retpoline_Simplify_vmexit_fill_RSB().patch queue-4.14/x86cpufeatures_Clean_up_Spectre_v2_related_CPUID_flags.patch