From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu-cheng Yu Subject: Re: [PATCH v10 01/26] Documentation/x86: Add CET description Date: Wed, 29 Apr 2020 16:02:33 -0700 Message-ID: References: <20200429220732.31602-1-yu-cheng.yu@intel.com> <20200429220732.31602-2-yu-cheng.yu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com ([192.55.52.93]:65455 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbgD2XCc (ORCPT ); Wed, 29 Apr 2020 19:02:32 -0400 In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Hansen , 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 Wed, 2020-04-29 at 15:53 -0700, Dave Hansen wrote: > On 4/29/20 3:07 PM, Yu-cheng Yu wrote: > > +Note: > > + There is no CET-enabling arch_prctl function. By design, CET is enabled > > + automatically if the binary and the system can support it. > > I think Andy and I danced around this last time. Let me try to say it > more explicitly. > > I want CET kernel enabling to able to be disconnected from the on-disk > binary. I want a binary compiled with CET to be able to disable it, and > I want a binary not compiled with CET to be able to enable it. I want > different threads in a process to be able to each have different CET status. The kernel patches we have now can be modified to support this model. If after discussion this is favorable, I will modify code accordingly. > Which JITs was this tested with? I think as a bare minimum we need to > know that this design can accommodate _a_ modern JIT. It would be > horrible if the browser javascript engines couldn't use this design, for > instance. JIT work is still in progress. When that is available I will test it. Yu-cheng From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com ([192.55.52.93]:65455 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbgD2XCc (ORCPT ); Wed, 29 Apr 2020 19:02:32 -0400 Message-ID: Subject: Re: [PATCH v10 01/26] Documentation/x86: Add CET description From: Yu-cheng Yu Date: Wed, 29 Apr 2020 16:02:33 -0700 In-Reply-To: References: <20200429220732.31602-1-yu-cheng.yu@intel.com> <20200429220732.31602-2-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: Dave Hansen , 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 Message-ID: <20200429230233.7gSxLJOYWq1Qz1Uowq-lLut6YmpQImXwr_dpG6908FA@z> On Wed, 2020-04-29 at 15:53 -0700, Dave Hansen wrote: > On 4/29/20 3:07 PM, Yu-cheng Yu wrote: > > +Note: > > + There is no CET-enabling arch_prctl function. By design, CET is enabled > > + automatically if the binary and the system can support it. > > I think Andy and I danced around this last time. Let me try to say it > more explicitly. > > I want CET kernel enabling to able to be disconnected from the on-disk > binary. I want a binary compiled with CET to be able to disable it, and > I want a binary not compiled with CET to be able to enable it. I want > different threads in a process to be able to each have different CET status. The kernel patches we have now can be modified to support this model. If after discussion this is favorable, I will modify code accordingly. > Which JITs was this tested with? I think as a bare minimum we need to > know that this design can accommodate _a_ modern JIT. It would be > horrible if the browser javascript engines couldn't use this design, for > instance. JIT work is still in progress. When that is available I will test it. Yu-cheng