Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934269AbeAJPoH (ORCPT + 1 other); Wed, 10 Jan 2018 10:44:07 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:39390 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753400AbeAJPoG (ORCPT ); Wed, 10 Jan 2018 10:44:06 -0500 Date: Wed, 10 Jan 2018 16:43:18 +0100 From: Willy Tarreau To: Borislav Petkov Cc: Ingo Molnar , Andy Lutomirski , LKML , X86 ML , Brian Gerst , Dave Hansen , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf , "H. Peter Anvin" , Kees Cook Subject: Re: [RFC PATCH v2 2/6] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI Message-ID: <20180110154318.GC14178@1wt.eu> References: <1515502580-12261-1-git-send-email-w@1wt.eu> <1515502580-12261-3-git-send-email-w@1wt.eu> <20180109141713.ngqrf6weyiy2q3in@pd.tnic> <20180109143653.GA12976@1wt.eu> <20180109145157.5ltqbz4o5sqkcggb@pd.tnic> <20180109145422.GD12976@1wt.eu> <20180109212940.ffvqb6wmehmxre4i@pd.tnic> <20180110072508.rhrhnwktbl7g5oxm@gmail.com> <20180110144506.mh7kvqnjyk5b4dvx@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180110144506.mh7kvqnjyk5b4dvx@pd.tnic> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 10, 2018 at 03:45:06PM +0100, Borislav Petkov wrote: > On Wed, Jan 10, 2018 at 08:25:08AM +0100, Ingo Molnar wrote: > > We could taint the kernel and warn prominently in the syslog when PTI is disabled > > globally on the boot line though, if running on affected CPUs. > > > > Something like: > > > > "x86/intel: Page Table Isolation (PTI) is disabled globally. This allows unprivileged, untrusted code to exploit the Meltdown CPU bug to read kernel data." > > > > I think we should warn in the per-mm disabling case too. Not the same > text but a similar blurb about the trusted process becoming a high-value > target. Well, we don't warn when /dev/mem is opened read-only, even not when it's opened R/W, and it exposes the contents much better. Tainting is first a support help so that developers don't waste time debugging something that might have been altered. In this case nothing got altered. At best(worst?) things might have been disclosed. That said I'm all for at least tainting when running with pti=off at least to educate users. Willy