From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH v10 05/26] x86/cet/shstk: Add Kconfig option for user-mode Shadow Stack Date: Thu, 7 May 2020 08:55:18 -0700 Message-ID: References: <20200429220732.31602-1-yu-cheng.yu@intel.com> <20200429220732.31602-6-yu-cheng.yu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20200429220732.31602-6-yu-cheng.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Content-Language: en-US Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Yu-cheng Yu , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz List-Id: linux-arch.vger.kernel.org On 4/29/20 3:07 PM, Yu-cheng Yu wrote: > +config X86_INTEL_SHADOW_STACK_USER > + prompt "Intel Shadow Stacks for user-mode" > + def_bool n > + depends on CPU_SUP_INTEL && X86_64 > + depends on AS_HAS_SHADOW_STACK > + select ARCH_USES_HIGH_VMA_FLAGS > + select X86_INTEL_CET > + select ARCH_HAS_SHADOW_STACK I called protection keys: X86_INTEL_MEMORY_PROTECTION_KEYS AMD recently posted documentation which shows them implementing it as well. The "INTEL_" is feeling now like a mistake. Going forward, we should probably avoid sticking the company name on them, if for no other reason than avoiding confusion and/or churn in the future. Shadow stacks, for instance, seem like something that another vendor might implement one day. So, let's at least remove the "INTEL_" from the config option names themselves. Mentioning Intel in the changelog and the Kconfig help text is fine. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH v10 05/26] x86/cet/shstk: Add Kconfig option for user-mode Shadow Stack References: <20200429220732.31602-1-yu-cheng.yu@intel.com> <20200429220732.31602-6-yu-cheng.yu@intel.com> From: Dave Hansen Message-ID: Date: Thu, 7 May 2020 08:55:18 -0700 MIME-Version: 1.0 In-Reply-To: <20200429220732.31602-6-yu-cheng.yu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-doc-owner@vger.kernel.org To: Yu-cheng Yu , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang List-ID: Message-ID: <20200507155518.hs4qI17huLJrzEK61zTilC5378C3xNNrVz08TZnAHK0@z> On 4/29/20 3:07 PM, Yu-cheng Yu wrote: > +config X86_INTEL_SHADOW_STACK_USER > + prompt "Intel Shadow Stacks for user-mode" > + def_bool n > + depends on CPU_SUP_INTEL && X86_64 > + depends on AS_HAS_SHADOW_STACK > + select ARCH_USES_HIGH_VMA_FLAGS > + select X86_INTEL_CET > + select ARCH_HAS_SHADOW_STACK I called protection keys: X86_INTEL_MEMORY_PROTECTION_KEYS AMD recently posted documentation which shows them implementing it as well. The "INTEL_" is feeling now like a mistake. Going forward, we should probably avoid sticking the company name on them, if for no other reason than avoiding confusion and/or churn in the future. Shadow stacks, for instance, seem like something that another vendor might implement one day. So, let's at least remove the "INTEL_" from the config option names themselves. Mentioning Intel in the changelog and the Kconfig help text is fine.