From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 4DDA56B0003 for ; Mon, 23 Jul 2018 18:07:33 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id b9-v6so1294499pla.19 for ; Mon, 23 Jul 2018 15:07:33 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTPS id p2-v6si10736819pli.289.2018.07.23.15.07.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 15:07:32 -0700 (PDT) Subject: Re: [PATCH 0/3] PTI for x86-32 Fixes and Updates References: <1532103744-31902-1-git-send-email-joro@8bytes.org> <20180723140925.GA4285@amd> <20180723213830.GA4632@amd> <20180723215958.jozblzq4sv7gp7uj@treble> From: Dave Hansen Message-ID: Date: Mon, 23 Jul 2018 15:07:13 -0700 MIME-Version: 1.0 In-Reply-To: <20180723215958.jozblzq4sv7gp7uj@treble> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Josh Poimboeuf , Pavel Machek Cc: Linus Torvalds , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Peter Anvin , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andrew Lutomirski , =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg Kroah-Hartman , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , "David H . Gutteridge" , Joerg Roedel , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim On 07/23/2018 02:59 PM, Josh Poimboeuf wrote: > On Mon, Jul 23, 2018 at 11:38:30PM +0200, Pavel Machek wrote: >> But for now I'd like at least "global" option of turning pti on/off >> during runtime for benchmarking. Let me see... >> >> Something like this, or is it going to be way more complex? Does >> anyone have patch by chance? > RHEL/CentOS has a global PTI enable/disable, which uses stop_machine(). Let's not forget PTI's NX-for-userspace in the kernel page tables. That provides Spectre V2 mitigation as well as Meltdown.