From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu-cheng Yu Subject: Re: [PATCH 2/9] x86/cet: Add Kconfig option for user-mode shadow stack Date: Thu, 07 Jun 2018 08:58:57 -0700 Message-ID: <1528387137.4636.6.camel@2b52.sc.intel.com> References: <20180607143705.3531-1-yu-cheng.yu@intel.com> <20180607143705.3531-3-yu-cheng.yu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Andy Lutomirski Cc: LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "H. J. Lu" , "Shanbhogue, Vedvyas" , "Ravi V. Shankar" , Dave Hansen , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , mike.kravetz@oracle.com List-Id: linux-arch.vger.kernel.org On Thu, 2018-06-07 at 08:47 -0700, Andy Lutomirski wrote: > On Thu, Jun 7, 2018 at 7:40 AM Yu-cheng Yu wrote: > > > > Introduce Kconfig option X86_INTEL_SHADOW_STACK_USER. > > > > An application has shadow stack protection when all the following are > > true: > > > > (1) The kernel has X86_INTEL_SHADOW_STACK_USER enabled, > > (2) The running processor supports the shadow stack, > > (3) The application is built with shadow stack enabled tools & libs > > and, and at runtime, all dependent shared libs can support shadow > > stack. > > > > If this kernel config option is enabled, but (2) or (3) above is not > > true, the application runs without the shadow stack protection. > > Existing legacy applications will continue to work without the shadow > > stack protection. > > > > The user-mode shadow stack protection is only implemented for the > > 64-bit kernel. Thirty-two bit applications are supported under the > > compatibility mode. > > > > The 64-bit only part seems entirely reasonable. So please make the > code 64-bit only :) Yes, I will remove changes in "arch/x86/entry/entry32.S". We still want to support x32/ia32 in the 64-bit kernel, right? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com ([134.134.136.126]:15647 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932903AbeFGQCI (ORCPT ); Thu, 7 Jun 2018 12:02:08 -0400 Message-ID: <1528387137.4636.6.camel@2b52.sc.intel.com> Subject: Re: [PATCH 2/9] x86/cet: Add Kconfig option for user-mode shadow stack From: Yu-cheng Yu Date: Thu, 07 Jun 2018 08:58:57 -0700 In-Reply-To: References: <20180607143705.3531-1-yu-cheng.yu@intel.com> <20180607143705.3531-3-yu-cheng.yu@intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andy Lutomirski Cc: LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "H. J. Lu" , "Shanbhogue, Vedvyas" , "Ravi V. Shankar" , Dave Hansen , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , mike.kravetz@oracle.com Message-ID: <20180607155857.JgEDlebGCAmwHt3JLTNH8dB12wVlXKnwxLslsFOvXnU@z> On Thu, 2018-06-07 at 08:47 -0700, Andy Lutomirski wrote: > On Thu, Jun 7, 2018 at 7:40 AM Yu-cheng Yu wrote: > > > > Introduce Kconfig option X86_INTEL_SHADOW_STACK_USER. > > > > An application has shadow stack protection when all the following are > > true: > > > > (1) The kernel has X86_INTEL_SHADOW_STACK_USER enabled, > > (2) The running processor supports the shadow stack, > > (3) The application is built with shadow stack enabled tools & libs > > and, and at runtime, all dependent shared libs can support shadow > > stack. > > > > If this kernel config option is enabled, but (2) or (3) above is not > > true, the application runs without the shadow stack protection. > > Existing legacy applications will continue to work without the shadow > > stack protection. > > > > The user-mode shadow stack protection is only implemented for the > > 64-bit kernel. Thirty-two bit applications are supported under the > > compatibility mode. > > > > The 64-bit only part seems entirely reasonable. So please make the > code 64-bit only :) Yes, I will remove changes in "arch/x86/entry/entry32.S". We still want to support x32/ia32 in the 64-bit kernel, right?