From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80F9BC433E1 for ; Fri, 22 May 2020 18:08:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FB932072C for ; Fri, 22 May 2020 18:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730871AbgEVSIy (ORCPT ); Fri, 22 May 2020 14:08:54 -0400 Received: from mga06.intel.com ([134.134.136.31]:13909 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbgEVSIx (ORCPT ); Fri, 22 May 2020 14:08:53 -0400 IronPort-SDR: eJVCjCp20ca0jhKCx/IZTrQcIS4efZj9TnouLOGlDtHR0ExKkZdsb7Od+jPwXNhzBSbtuBVukk 3y99oEIFJj+g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 11:08:52 -0700 IronPort-SDR: rsGVLmR70qM3p6MZ2UxFhZdQolDM3dbo1Jm4avZG4utGzxS+gFz/y6WAwmnVCIJViXxyFRR6pN 7D4ETTo5rkgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,422,1583222400"; d="scan'208";a="269074834" Received: from yyu32-desk.sc.intel.com ([143.183.136.146]) by orsmga006.jf.intel.com with ESMTP; 22 May 2020 11:08:51 -0700 Message-ID: <02d825344b39891cf9c084edce44db168cce45fe.camel@intel.com> Subject: Re: [RFC PATCH 5/5] selftest/x86: Add CET quick test From: Yu-cheng Yu To: Kees Cook , Peter Zijlstra 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 , 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 Date: Fri, 22 May 2020 11:07:49 -0700 In-Reply-To: <202005221034.59F5DF75@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> <202005221020.B578B8C6@keescook> <20200522172711.GA317569@hirez.programming.kicks-ass.net> <202005221034.59F5DF75@keescook> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-05-22 at 10:36 -0700, Kees Cook wrote: > On Fri, May 22, 2020 at 07:27:11PM +0200, Peter Zijlstra wrote: > > On Fri, May 22, 2020 at 10:22:51AM -0700, Kees Cook wrote: > > > > > 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. > > > > Paranoia on my end because I had no clue wth he wanted with his -O0 > > magic gunk. > > Heh, yes, which is why I asked for many more comments. ;) I *think* it > was entirely to control the stack (and ssp) behavior (i.e. don't inline, > don't elide unused stack variables, etc). Yes, that was the reason. Yu-cheng