Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4464968img; Tue, 26 Mar 2019 09:54:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNG0X+p0NaKsCAim2uhhTh8mOeKlXFA1Uwn5at2EFSNx8T+v/rpw90prF/95yVh7kha53B X-Received: by 2002:a17:902:968a:: with SMTP id n10mr32696816plp.283.1553619260854; Tue, 26 Mar 2019 09:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553619260; cv=none; d=google.com; s=arc-20160816; b=gQS4XIyE6GxqyqXRKXskUGL6denvPuud7DwnO3JBfLGcZyL6GNhEJTGweHCcoUTHt2 69EoiL+bwYW8x6jE0BCI6k2o0znOqquwRcSae0sUCLWI9E6vwmlnjNka9dS7T57cIgMY wJ8w7wdX/0A2WexDH4H8FC7LO0ZNl/mJ2CZIeX21jHgrRlKV3KoZi+Kn/zB4WzEu7Vcl AQLXZyQk730ogNjMbZOlkQm8cw6e5rG47wYtU6jqu7g/t3t4nvZsH7CygqYfdwTbuxpX 1vqyytvw+Ak/6s+NKDyPA5FfwzZFma2EMKPES2OzT33LNi6OmQyzG1idJH0Z7LnwRpKn 42Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=b/gCcZgzVAA1WNoDlPofXTpn+e8ViF+hTKidsSCP7rE=; b=vK5wjoopc40e/UZJdg+8goQhKtpgoBC8vsKkrn+1l9/IqsVfLOGUcbwt2h1mAj71jb UXY9bZphICTHGFByIi9vXVvn8s1x76Kermqi3ljnmapwZy/hM2DEKD/6kpQHRlKw/pVo C2okWusEseNyD97rE2TbwDzTCSr/oys7lSn6jGRHy64p1XF0NVmDW7eMGYv2MvO8iXsM /whU8LFe56Ug4mFTY8ofDAjpXEAjc444zG4aAuXpVTqM/Yy1KuwMUarAf0QrWR8sE446 E5+tYJgoBBlNh+llQLYTwzzeeWK0J14EHpyO9MgHVoC6LQKG3+4b1eVdEWsZeN54U2wG 338Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=cg5TkqZB; 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=NONE sp=NONE 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 k5si1234030plt.179.2019.03.26.09.54.05; Tue, 26 Mar 2019 09:54:20 -0700 (PDT) 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=cg5TkqZB; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731997AbfCZQP2 (ORCPT + 99 others); Tue, 26 Mar 2019 12:15:28 -0400 Received: from mail.skyhub.de ([5.9.137.197]:44104 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730458AbfCZQP2 (ORCPT ); Tue, 26 Mar 2019 12:15:28 -0400 Received: from zn.tnic (p200300EC2F098000329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f09:8000:329c:23ff:fea6:a903]) (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 45F551EC014B; Tue, 26 Mar 2019 17:15:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1553616926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=b/gCcZgzVAA1WNoDlPofXTpn+e8ViF+hTKidsSCP7rE=; b=cg5TkqZBl/c06Am7mg1KAb5+KTYFv2BtgJqBXMPVTXUWQh7hhLpWoSEqWiFqa+6sa9uXw+ G2xhAJzaijOA7HZ0Em0JogPizQHbOrNjmCC68L40Gn9g83Qm/VXI7UmaPp0XjgeeJbjuDy CI6iPPHgHeOGKAh/9bz9dBhGRLxmUZk= Date: Tue, 26 Mar 2019 17:15:29 +0100 From: Borislav Petkov To: Matteo Croce Cc: x86@kernel.org, "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , lkml Subject: Re: [PATCH v2] x86/realmode: don't leak kernel addresses Message-ID: <20190326161457.GN1867@zn.tnic> References: <20190324190504.29906-1-mcroce@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190324190504.29906-1-mcroce@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 24, 2019 at 08:05:04PM +0100, Matteo Croce wrote: > Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), > at boot "____ptrval____" is printed instead of the trampoline addresses: > > Base memory trampoline at [(____ptrval____)] 99000 size 24576 > > Remove the address from the print as we don't want to leak kernel > addresses. > > Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") > Signed-off-by: Matteo Croce > --- > arch/x86/realmode/init.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c > index d10105825d57..d76a1380ec37 100644 > --- a/arch/x86/realmode/init.c > +++ b/arch/x86/realmode/init.c > @@ -20,8 +20,8 @@ void __init set_real_mode_mem(phys_addr_t mem, size_t size) > void *base = __va(mem); > > real_mode_header = (struct real_mode_header *) base; > - printk(KERN_DEBUG "Base memory trampoline at [%p] %llx size %zu\n", > - base, (unsigned long long)mem, size); > + printk(KERN_DEBUG "Base memory trampoline at %llx size %zu\n", > + (unsigned long long)mem, size); In case this wasn't clear, please remove the whole printk. And don't forget to CC lkml on your submissions. CCed now. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.