Received: by 10.223.176.5 with SMTP id f5csp2826419wra; Mon, 5 Feb 2018 10:29:55 -0800 (PST) X-Google-Smtp-Source: AH8x226sOX3oroaNz/ydvQaBDLPaJX9s3mBK0gKSXyG74t+Q/ZVpHXghMls1eEfLUDhgX6sGBmXO X-Received: by 10.101.71.129 with SMTP id e1mr2555624pgs.430.1517855395631; Mon, 05 Feb 2018 10:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517855395; cv=none; d=google.com; s=arc-20160816; b=jb7HiprQGjb6x9WtkwshMLbhCSxp/Y0653CzuhJ90Kk6snhUCsbjdjw+6YlkO4tQtJ QSyqfGnlvhDaTIw/5g1jWUMrO4+oN0fPM8KPiTUKaQdyweVuCsitLS1Rc3UMlCpa4Mdc SJ3gAG3GXqe0esyzkzanZLqFYcLpX5TVbG6+HhaNluSJhb4fsUrbeo/jD/NzsyxzW3ik Lw8+JaD+l7q74c4CjZmeYx536Bt4o5bKVcwsikVjUS1zHpRFuOF6A6LWaj0zYktPUTzI /OHcIUmAsGv68/MPxn8yUclvr6oShA5rxOB8uSmK22hnPMeBRK649DDE+qWeGT4Ofc57 sMlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YoXPp7RhRi70Bz1EZwfmF9kShonOvlCtwQnvzfJCH10=; b=TCQCTizWveJCrnR45o8HpfKiL/KAg5oGbs5La6HW+i99uaITL+7lJVWAtBMhtvvqUd CouKnS4mJ/JpCIF96Lrd2RuNUqxboqfji4H3Z0NOREk6nub2jN+VsUnhkdyiJ+8sG7dL 71MXpaMqx0aQj1mYL+aWMTvhxShXpGc3a0DvgugPq5a8id4IBJ2ghn+IMbgBEdX6GfNs GVkBd1Bnu34QhRhyA+waOxSirJdLTh5mFHTyvwsKeLdrZ/UwHaYSHPnedBtcy+v9mRpO mslwqy95x5d3QkTNEIo84ac5AJlRSHXR4znE32DBwDzauPA2MSuNAPMObEm9POF2GRar 1W3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s197si5463642pgc.300.2018.02.05.10.29.41; Mon, 05 Feb 2018 10:29:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753740AbeBES2i (ORCPT + 99 others); Mon, 5 Feb 2018 13:28:38 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51868 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753638AbeBESYw (ORCPT ); Mon, 5 Feb 2018 13:24:52 -0500 Received: from localhost (unknown [104.132.1.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B438A10F2; Mon, 5 Feb 2018 18:24:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Borislav Petkov , Thomas Gleixner , riel@redhat.com, ak@linux.intel.com, peterz@infradead.org, David Woodhouse , jikos@kernel.org, luto@amacapital.net, dave.hansen@intel.com, torvalds@linux-foundation.org, keescook@google.com, Josh Poimboeuf , tim.c.chen@linux.intel.com, pjt@google.com, gregkh@linux-foundation.org Subject: [PATCH 4.15 11/60] x86/alternative: Print unadorned pointers Date: Mon, 5 Feb 2018 10:22:44 -0800 Message-Id: <20180205182214.391249322@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180205182213.902626065@linuxfoundation.org> References: <20180205182213.902626065@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Borislav Petkov bp@suse.de 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. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: riel@redhat.com Cc: ak@linux.intel.com Cc: peterz@infradead.org Cc: David Woodhouse Cc: jikos@kernel.org Cc: luto@amacapital.net Cc: dave.hansen@intel.com Cc: torvalds@linux-foundation.org Cc: keescook@google.com Cc: Josh Poimboeuf Cc: tim.c.chen@linux.intel.com Cc: gregkh@linux-foundation.org Cc: pjt@google.com Link: https://lkml.kernel.org/r/20180126121139.31959-2-bp@alien8.de Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/alternative.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -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 op add_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_alt u8 *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_alt continue; } - 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); }