From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [RFC PATCH 5/5] selftest/x86: Add CET quick test Date: Fri, 22 May 2020 10:22:51 -0700 Message-ID: <202005221020.B578B8C6@keescook> References: <20200521211720.20236-1-yu-cheng.yu@intel.com> <20200521211720.20236-6-yu-cheng.yu@intel.com> <20200522092848.GJ325280@hirez.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200522092848.GJ325280@hirez.programming.kicks-ass.net> Sender: linux-doc-owner@vger.kernel.org To: Peter Zijlstra Cc: 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 , Mike Kravetz , Nadav Amit List-Id: linux-arch.vger.kernel.org On Fri, May 22, 2020 at 11:28:48AM +0200, Peter Zijlstra wrote: > Get asm/asm.h into userspace and then write something like: Yeah, selftests is going to start suffering from the same "tools/ header duplication" problem. I've also had cases (see the logic in the Makefile in selftests/x86) where selftests is duplicating existing Kconfig and Makefile logic ("can I build this way?") But yes, I think getting a copy of asm.h would be nice here. I don't think the WRITE_ONCE() is needed in this particular case. Hmm. -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 22 May 2020 10:22:51 -0700 From: Kees Cook Subject: Re: [RFC PATCH 5/5] selftest/x86: Add CET quick test Message-ID: <202005221020.B578B8C6@keescook> References: <20200521211720.20236-1-yu-cheng.yu@intel.com> <20200521211720.20236-6-yu-cheng.yu@intel.com> <20200522092848.GJ325280@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200522092848.GJ325280@hirez.programming.kicks-ass.net> Sender: linux-doc-owner@vger.kernel.org To: Peter Zijlstra Cc: 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 , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang List-ID: Message-ID: <20200522172251.iguf0MDllaVC5tp4lfH-xSjhn5Vbsi-pWJkt-xYJFlM@z> On Fri, May 22, 2020 at 11:28:48AM +0200, Peter Zijlstra wrote: > Get asm/asm.h into userspace and then write something like: Yeah, selftests is going to start suffering from the same "tools/ header duplication" problem. I've also had cases (see the logic in the Makefile in selftests/x86) where selftests is duplicating existing Kconfig and Makefile logic ("can I build this way?") But yes, I think getting a copy of asm.h would be nice here. I don't think the WRITE_ONCE() is needed in this particular case. Hmm. -- Kees Cook