From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [RFC PATCH v4 02/27] x86/fpu/xstate: Change some names to separate XSAVES system and user states Date: Tue, 2 Oct 2018 18:37:36 +0200 Message-ID: <20181002163736.GD29601@zn.tnic> References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-3-yu-cheng.yu@intel.com> <20181002152903.GB29601@zn.tnic> <498c8824-9255-96be-71c2-3ebfa684a9d3@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <498c8824-9255-96be-71c2-3ebfa684a9d3@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Dave Hansen , Yu-cheng Yu Cc: 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 , Cyrill Gorcunov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap List-Id: linux-arch.vger.kernel.org On Tue, Oct 02, 2018 at 09:30:52AM -0700, Dave Hansen wrote: > > Good point. However, "system" is more indicative; CET states are per-task and > > not "Supervisor". Do we want to go back to "Supervisor" or add comments? > > This is one of those things where the SDM language does not match what > we use in the kernel. I think it's fine to call them "system" or > "kernel" states to make it consistent with our existing in-kernel > nomenclature. > > I say add comments to clarify what the SDM calls it vs. what we do. So AFAIU, the difference is that XSAVES is a CPL0 insn. Thus the supervisor thing, I'd guess. Now it looks like CET uses XSAVES (from skimming the patchset forward) but then what our nomenclature is and how it all gets tied together, needs to be explained somewhere prominent so that we're all on the same page. This patch's commit message is not even close. So I'd very much appreciate a more verbose explanation, even if it repeats itself at places. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.skyhub.de ([5.9.137.197]:34574 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbeJBXVu (ORCPT ); Tue, 2 Oct 2018 19:21:50 -0400 Date: Tue, 2 Oct 2018 18:37:36 +0200 From: Borislav Petkov Subject: Re: [RFC PATCH v4 02/27] x86/fpu/xstate: Change some names to separate XSAVES system and user states Message-ID: <20181002163736.GD29601@zn.tnic> References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-3-yu-cheng.yu@intel.com> <20181002152903.GB29601@zn.tnic> <498c8824-9255-96be-71c2-3ebfa684a9d3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <498c8824-9255-96be-71c2-3ebfa684a9d3@linux.intel.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Hansen , Yu-cheng Yu Cc: 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 , Cyrill Gorcunov , 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 Message-ID: <20181002163736.O0wBjHM-kBJakvfhxZsGpGIqtNW2YjlV5Rx9OzFfR9U@z> On Tue, Oct 02, 2018 at 09:30:52AM -0700, Dave Hansen wrote: > > Good point. However, "system" is more indicative; CET states are per-task and > > not "Supervisor". Do we want to go back to "Supervisor" or add comments? > > This is one of those things where the SDM language does not match what > we use in the kernel. I think it's fine to call them "system" or > "kernel" states to make it consistent with our existing in-kernel > nomenclature. > > I say add comments to clarify what the SDM calls it vs. what we do. So AFAIU, the difference is that XSAVES is a CPL0 insn. Thus the supervisor thing, I'd guess. Now it looks like CET uses XSAVES (from skimming the patchset forward) but then what our nomenclature is and how it all gets tied together, needs to be explained somewhere prominent so that we're all on the same page. This patch's commit message is not even close. So I'd very much appreciate a more verbose explanation, even if it repeats itself at places. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.