From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [RFC PATCH v9 05/27] x86/cet/shstk: Add Kconfig option for user-mode Shadow Stack protection Date: Fri, 6 Mar 2020 11:02:08 -0800 Message-ID: References: <20200205181935.3712-1-yu-cheng.yu@intel.com> <20200205181935.3712-6-yu-cheng.yu@intel.com> <070d9d78981f0aad2baf740233e8dfc32ecd29d7.camel@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mga17.intel.com ([192.55.52.151]:1470 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbgCFTCL (ORCPT ); Fri, 6 Mar 2020 14:02:11 -0500 In-Reply-To: <070d9d78981f0aad2baf740233e8dfc32ecd29d7.camel@intel.com> Content-Language: en-US Sender: linux-arch-owner@vger.kernel.org List-ID: 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 On 3/6/20 10:37 AM, Yu-cheng Yu wrote: > We used to do this for CET instructions, but after adding kernel-mode > instructions and inserting ENDBR's, the code becomes cluttered. I also > found an earlier discussion on the ENDBR: > > https://lore.kernel.org/lkml/CALCETrVRH8LeYoo7V1VBPqg4WS0Enxtizt=T7dPvgoeWfJrdzA@mail.gmail.com/ > > It makes sense to let the user know early on that the system cannot support > CET and cannot build a CET-enabled kernel. > > One thing we can do is to disable CET in Kconfig and not in kernel > build, which I will do in the next version. I'll go on the record and say I think we should allow building CET-enabled kernels on old toolchains. We need it for build test coverage. We can spit out a warning, but we need to allow building it. Andy L, do you have any heartburn with that? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com ([192.55.52.151]:1470 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbgCFTCL (ORCPT ); Fri, 6 Mar 2020 14:02:11 -0500 Subject: Re: [RFC PATCH v9 05/27] x86/cet/shstk: Add Kconfig option for user-mode Shadow Stack protection References: <20200205181935.3712-1-yu-cheng.yu@intel.com> <20200205181935.3712-6-yu-cheng.yu@intel.com> <070d9d78981f0aad2baf740233e8dfc32ecd29d7.camel@intel.com> From: Dave Hansen Message-ID: Date: Fri, 6 Mar 2020 11:02:08 -0800 MIME-Version: 1.0 In-Reply-To: <070d9d78981f0aad2baf740233e8dfc32ecd29d7.camel@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org List-ID: 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 , x86-patch-review@intel.com Message-ID: <20200306190208.lGgL12cEydKSzJJtkVLWIUPU_L10u65QuvpnIh4hzYE@z> On 3/6/20 10:37 AM, Yu-cheng Yu wrote: > We used to do this for CET instructions, but after adding kernel-mode > instructions and inserting ENDBR's, the code becomes cluttered. I also > found an earlier discussion on the ENDBR: > > https://lore.kernel.org/lkml/CALCETrVRH8LeYoo7V1VBPqg4WS0Enxtizt=T7dPvgoeWfJrdzA@mail.gmail.com/ > > It makes sense to let the user know early on that the system cannot support > CET and cannot build a CET-enabled kernel. > > One thing we can do is to disable CET in Kconfig and not in kernel > build, which I will do in the next version. I'll go on the record and say I think we should allow building CET-enabled kernels on old toolchains. We need it for build test coverage. We can spit out a warning, but we need to allow building it. Andy L, do you have any heartburn with that?