Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1188439imu; Tue, 11 Dec 2018 14:25:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/UJRb1shBJnw/cepPOszwaSUbF9F2jvUTVTGAcUdYFOxq3pnlnUVnH+H4VmDwtivNFhL76N X-Received: by 2002:a17:902:f64:: with SMTP id 91mr17595923ply.132.1544567131250; Tue, 11 Dec 2018 14:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544567131; cv=none; d=google.com; s=arc-20160816; b=EHuERJQMDhAJPsREAHkQ/Vm/b1j/micxm9T3lZTDGwQ1309Gz8HDWYAOtmkM/I0uWe nvalKbnc32uMth8JVlu4m8h19pkEVHDwP9scxR85OHZxuOsO8PKXhbgQx+qYKSfnXnvK 18aIu0jwGbmpu1Y/dYyk/iph7SLvzY/cwCt1Q+aKYmHZS3E5nJCVrbP1rKhQl5cnzf9j x8c1HU1tW56QnxxQWsfq1CgnOTON3Ljo2b3e7sY8/PuFLOguEYJew8S4EGICG4JdzhRl hXEXfcCWsE2tnp/Yn4xFICqCNauWFNJcP0bY56Kfg9ZKGZ/wscvitzvWQDYQYctQkMFp kmxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ICYBXFaJIVLNHQr0eO8+1a7LQhPda4hKCJimxgnVvfY=; b=sS3wqDdQESPRUkTlbLFZskkDZ4wydA+m/BdbpFfmFEiKvA/K+v5DJsBLPNACluqQ1k 3qp0bWE0GaNSuyFXAgu5Jd4T2C23K+/wKyH06bGLnLZiPAy6Wkg6TkiU9ELlNDvnQknn lQ8Nt5wtOgVdL5UGAtRNh3T4g9lcgRJUeFuaAHvB5iFeR3mW6kdlE5f3CeTqCAPlK3Z/ OEgIlji1hD59vmdEw4VMAIwN1wGNwr70+IUlGgbS8puG+OMz4+Snw3mS2JkjEjEdUT/+ KS2ev/TaEc/j6E/irmomfXYT9fhTegByvQkWrklfsgvY7SazX7b5at0u1y9ynjVwTTQ+ 3ewg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Qi+DHPqO; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si12852106pgl.16.2018.12.11.14.25.16; Tue, 11 Dec 2018 14:25:31 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=Qi+DHPqO; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbeLKWXs (ORCPT + 99 others); Tue, 11 Dec 2018 17:23:48 -0500 Received: from mail.skyhub.de ([5.9.137.197]:46218 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726300AbeLKWXd (ORCPT ); Tue, 11 Dec 2018 17:23:33 -0500 Received: from zn.tnic (p200300EC2BCD2B0010F6E1EC68D6BA6C.dip0.t-ipconnect.de [IPv6:2003:ec:2bcd:2b00:10f6:e1ec:68d6:ba6c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 2CDE61EC0C01; Tue, 11 Dec 2018 23:23:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1544567011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ICYBXFaJIVLNHQr0eO8+1a7LQhPda4hKCJimxgnVvfY=; b=Qi+DHPqOwVaI4OUBLuiX+fOZxDG4vel48u/0A3cT0XU+BNorvFLsRDolcTAEc63AjsBw+S YcN2+bstlJyLTHTmi660mVTvELwq+N6nm1D3qUe81tqCVUF8QbRGdUDZ/E1lW3E2InOnwZ 0yDc6jaM5fkzoqu3w0aQcACqnAfmLyA= From: Borislav Petkov To: LKML Cc: X86 ML , Andy Lutomirski , "H. Peter Anvin" , Josh Poimboeuf , Peter Zijlstra , Tom Lendacky Subject: [RFC PATCH 2/4] x86/alternatives: Print containing function Date: Tue, 11 Dec 2018 23:23:24 +0100 Message-Id: <20181211222326.14581-3-bp@alien8.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181211222326.14581-1-bp@alien8.de> References: <20181211222326.14581-1-bp@alien8.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov ... in the "debug-alternative" output so that one can find her way easier when staring at the vmlinux disassembly. For example: apply_alternatives: feat: 3*32+18, old: (read_tsc+0x0/0x10 (ffffffff8101d1c0) len: 5), repl: (ffffffff824e6d33, len: 5) ^^^^^^^^^^^^^^^^^ ffffffff8101d1c0: old_insn: 0f 31 90 90 90 ffffffff824e6d33: rpl_insn: 0f ae e8 0f 31 ffffffff8101d1c0: final_insn: 0f ae e8 0f 31 No functional changes. Signed-off-by: Borislav Petkov --- arch/x86/kernel/alternative.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index ebeac487a20c..d458c7973c56 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -393,10 +393,10 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start, continue; } - DPRINTK("feat: %d*32+%d, old: (%px len: %d), repl: (%px, len: %d), pad: %d", + DPRINTK("feat: %d*32+%d, old: (%pS (%px) len: %d), repl: (%px, len: %d), pad: %d", a->cpuid >> 5, a->cpuid & 0x1f, - instr, a->instrlen, + instr, instr, a->instrlen, replacement, a->replacementlen, a->padlen); DUMP_BYTES(instr, a->instrlen, "%px: old_insn: ", instr); -- 2.19.1