Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp763132ybf; Sat, 29 Feb 2020 15:34:01 -0800 (PST) X-Google-Smtp-Source: APXvYqwnRB1WILKzsPGAPZ1HLw0Wo+ssVVgGUb91pyLKyqHsbBScFijQfsljJhwWTJkiYGZERGfg X-Received: by 2002:aca:3189:: with SMTP id x131mr7578062oix.33.1583019241240; Sat, 29 Feb 2020 15:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583019241; cv=none; d=google.com; s=arc-20160816; b=xHE6d0cOz1J6CDI8lsTOZg389KVfOXbXdXiwFEYO4IqCM8Y0wzBUHyYYPIusRbcsE2 ppFQ8ZehwRDg8PBCMO74rDcXCGr6E41satdPbMDZRVrPP0rJYKNk9mYEdFdcInedvxzX ek1qnopQ9fj+rM7ODX1nSVECJ3V5a23fjryJeIzeyXXUAxotuypL7b+76/DAnaOXnR5/ h0MMgurVA8nsfqoNH1GdRIC49exsWLNB+2J5wOsN+sqaBbC+27uSg3ftnnCWMlAROy+1 PJQ+Uo2djjEDNvDe4knuUWKxCmBB7tkHbZ89X2FbXPmq8SxkuTJ21vEjPSYxWyUZ2zAe EYUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sC3t5GcfT+mcs+Zl2p6smFfDxG3Nl3S/QcoxnFPIWpo=; b=CABysaLjFQlLknUAcAfhevdEee3yqc8PVpCf24rOWEoHhwhQwR1zKVj46aTwirQKZH ZUjTGKypW0aYszWkrS7mJfWn17NdtWeiHwWoyoEPJteq4r90r70WsgCsSd990jh4efI7 Fsmo6YuMlN63l6K1ouurEEo1/3+FbC2rtVRZqPKLVxUOZMfylxGZ0lhZAac3ji1tKpbl oEWGWN1GEeP+xoSkek4zlSDu06A0yeSm5U11wq6Ww0vpWPsoX2zDwPeX9yMgjAn3k9o7 GOC4PFs8z3IJM2L77KiHjhowWnWgbsSsnYRjEdGcC8NssMhBuMLjt4FEb69WHtT5h1xW BDWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UmXHXH52; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14si3792435otr.131.2020.02.29.15.33.49; Sat, 29 Feb 2020 15:34:01 -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=@chromium.org header.s=google header.b=UmXHXH52; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727556AbgB2XXO (ORCPT + 99 others); Sat, 29 Feb 2020 18:23:14 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:35267 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbgB2XXO (ORCPT ); Sat, 29 Feb 2020 18:23:14 -0500 Received: by mail-pj1-f67.google.com with SMTP id s8so1014285pjq.0 for ; Sat, 29 Feb 2020 15:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=sC3t5GcfT+mcs+Zl2p6smFfDxG3Nl3S/QcoxnFPIWpo=; b=UmXHXH52+3Ibq5SY+DNh7RIg8T1q46HbakkJRAP/XErovTGr0KFi97JvUqadnH/Qjr L9w/0j4cC3oBKseA4rV+Y+oVI7+M4QrrFFuTVNOB7SlkP9qTSvM7MpXqakjP/ekXwrrQ TiWSi5ZIHMZ5aUBf8/dCfcojIKCdtRQ/4geaw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sC3t5GcfT+mcs+Zl2p6smFfDxG3Nl3S/QcoxnFPIWpo=; b=QwEpbcYcjHCGZGwiIt5nUMphPyd6SSYGVaEkZuF6u5Qos0ARRB0Hz0E4DtXu/Jqnd6 h0XFzhoZemBwi4ONxfkpND/pc7JEpEG4A0J+W7lqSetjIDbrEZhNmXFSiuHflR9vbvP5 GhpzspWReU7huZTd9VQRYPyf+QbiNqXQ9UC+AJtvXhW8Qrs1DdlVLOix7qpdoRUW0VDw a12VN8PCZp1fbcJQ+uWqYlZHZgpDV9181QgZAB+VsriRuPvyDOAESQy1xUZNtuRkp7/6 shFMsKtSQ5P2LzqNseldQgVRRiawik+/9cyGvHYaQ5/Y1+ZtsDZ/eQmv5wRbk7FF7/+V iG0g== X-Gm-Message-State: APjAAAX8oDVx2LpPQKrpd1hfjEu4BBzUShc/xNTuPgZ4sGVs0OJzrqvi Zj301xxF34047uowfU8EnOiMxg== X-Received: by 2002:a17:902:44d:: with SMTP id 71mr10571774ple.95.1583018593161; Sat, 29 Feb 2020 15:23:13 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f19sm8278912pgf.33.2020.02.29.15.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Feb 2020 15:23:12 -0800 (PST) Date: Sat, 29 Feb 2020 15:23:10 -0800 From: Kees Cook To: x86@kernel.org Cc: Arvind Sankar , "Tobin C . Harding" , Tycho Andersen , kernel-hardening@lists.openwall.com, Dave Hansen , Andy Lutomirski , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/mm/init: Stop printing pgt_buf addresses Message-ID: <202002291522.0EDB380@keescook> References: <20200229231120.1147527-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200229231120.1147527-1-nivedita@alum.mit.edu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 29, 2020 at 06:11:20PM -0500, Arvind Sankar wrote: > This currently leaks kernel physical addresses into userspace. > > Signed-off-by: Arvind Sankar Acked-by: Kees Cook -Kees > --- > arch/x86/mm/init.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c > index e7bb483557c9..dc4711f09cdc 100644 > --- a/arch/x86/mm/init.c > +++ b/arch/x86/mm/init.c > @@ -121,8 +121,6 @@ __ref void *alloc_low_pages(unsigned int num) > } else { > pfn = pgt_buf_end; > pgt_buf_end += num; > - printk(KERN_DEBUG "BRK [%#010lx, %#010lx] PGTABLE\n", > - pfn << PAGE_SHIFT, (pgt_buf_end << PAGE_SHIFT) - 1); > } > > for (i = 0; i < num; i++) { > -- > 2.24.1 > -- Kees Cook