From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753103AbdK0SWz (ORCPT ); Mon, 27 Nov 2017 13:22:55 -0500 Received: from mga03.intel.com ([134.134.136.65]:19724 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbdK0SWy (ORCPT ); Mon, 27 Nov 2017 13:22:54 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,465,1505804400"; d="scan'208";a="10200801" Subject: Re: [patch V2 5/5] x86/kaiser: Add boottime disable switch To: Thomas Gleixner , LKML References: <20171126231403.657575796@linutronix.de> <20171126232414.645128754@linutronix.de> Cc: Andy Lutomirski , Ingo Molnar , Borislav Petkov , Brian Gerst , Denys Vlasenko , "H. Peter Anvin" , Josh Poimboeuf , Linus Torvalds , Peter Zijlstra , Rik van Riel , daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, linux-mm@kvack.org, michael.schwarz@iaik.tugraz.at, moritz.lipp@iaik.tugraz.at, richard.fellner@student.tugraz.at From: Dave Hansen Message-ID: <24359653-5b93-7146-8f65-ac38c3af0069@linux.intel.com> Date: Mon, 27 Nov 2017 10:22:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171126232414.645128754@linutronix.de> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/26/2017 03:14 PM, Thomas Gleixner wrote: > --- a/security/Kconfig > +++ b/security/Kconfig > @@ -56,7 +56,7 @@ config SECURITY_NETWORK > > config KAISER > bool "Remove the kernel mapping in user mode" > - depends on X86_64 && SMP && !PARAVIRT > + depends on X86_64 && SMP && !PARAVIRT && JUMP_LABEL > help > This feature reduces the number of hardware side channels by > ensuring that the majority of kernel addresses are not mapped One of the reasons for doing the runtime-disable was to get rid of the !PARAVIRT dependency. I can add a follow-on here that will act as if we did "nokaiser" whenever Xen is in play so we can remove this dependency. I just hope Xen is detectable early enough to do the static patching.