Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2073174pxb; Fri, 5 Feb 2021 08:22:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqV+MVuEqWz879VvXHqKCfk6hCU7KGYRI9DYQyjX10hlSd0UYTjSbniUVhGqGnr574tkcM X-Received: by 2002:a05:6402:18f:: with SMTP id r15mr4383231edv.53.1612542151913; Fri, 05 Feb 2021 08:22:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612542151; cv=none; d=google.com; s=arc-20160816; b=Be26Cp3BFD84yVXB3v0GktXzC04ohZivAVLghGUKktTO9taq8cog5cyEvQuVmLQ+S4 I982SGJkEqRDU2XgDooMivxQOs4ILqQlg+pPF3w4+BGP5mRu7KGpCRFN5miy7OoT5b5x 6Ji7LrrI72f6nHSxgwVqnDaFQi+uFl9tnf2rOUOF4tznUoD6GUsUvkBJIOohCeQ9QULo OHQ52gM8WG6IQAHC198bmZAGLcgcU/GpII5KYFtCpQvxO/xHTlgpXynw53ow7b5DVXLL mXJNbzs7AVvyKVqJoknXz9LCCtkQfPUD6wAMIzOMJgwIp4PrhlPOdSTmTN44ghh0+9ol VwxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=L04wLZ5kjJ1ndsmgFrechFgQO8npzGOw71EsSNsp8yU=; b=dRy+FWUKOLi4e9lgodRex25wgzHwGKfI+hG00c1PhxYxmXizhHBNprFlSDBqqJCT5e w4lj2tamC0oHJuo21/+9Y/DEJZTXEAwbfkGHAzalzH0RIGEWacFY+VKxAyF8FUhWfZxO QXFrr9NYMBvk9UPdEqgmaAZBUpJC3l39dEtDeMe7tLQIg9Z44pvyGDiROSLPMOD5iv0R jtkqI8lOhinwQTz8Y6ONg6w75866fzywqEIG1v+b/ykHxmhEg+acVKdeJ6Ne318BQJT8 TmlT0X5W5si6yJPXdX83YFzWTR2174WX7T+FUjoU2GhVi19w+PXdu1Bz9ibt6da657lK ElCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si5900132edb.294.2021.02.05.08.22.05; Fri, 05 Feb 2021 08:22:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231384AbhBEOlB (ORCPT + 99 others); Fri, 5 Feb 2021 09:41:01 -0500 Received: from mga09.intel.com ([134.134.136.24]:4778 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232766AbhBEOhh (ORCPT ); Fri, 5 Feb 2021 09:37:37 -0500 IronPort-SDR: wjxYUgnMWqf1ArrZ4LZT/msnNwj0GLEIskhMXtJlEU+9MncFvbvnTvhDUSNtE3MLVR4xJT/tEy yQ/V2OoeDYCA== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="181600524" X-IronPort-AV: E=Sophos;i="5.81,155,1610438400"; d="scan'208";a="181600524" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2021 08:15:04 -0800 IronPort-SDR: akZdZKUTioYDCFVHHy7cAMfgbH73YlLAuL7TEXfol7Nx3sovkJgDAGcc/VFRw85sHwb0MKm2y6 7ZcStecAUDNw== X-IronPort-AV: E=Sophos;i="5.81,155,1610438400"; d="scan'208";a="583829114" Received: from yyu32-mobl1.amr.corp.intel.com (HELO [10.212.95.7]) ([10.212.95.7]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2021 08:15:03 -0800 Subject: Re: [PATCH v19 04/25] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions To: Borislav Petkov 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 , 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 , Pengfei Xu References: <20210203225547.32221-1-yu-cheng.yu@intel.com> <20210203225547.32221-5-yu-cheng.yu@intel.com> <20210205134305.GG17488@zn.tnic> From: "Yu, Yu-cheng" Message-ID: Date: Fri, 5 Feb 2021 08:15:02 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210205134305.GG17488@zn.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/5/2021 5:43 AM, Borislav Petkov wrote: > On Wed, Feb 03, 2021 at 02:55:26PM -0800, Yu-cheng Yu wrote: >> @@ -1252,6 +1260,13 @@ static void __init cpu_parse_early_param(void) >> if (cmdline_find_option_bool(boot_command_line, "noxsaves")) >> setup_clear_cpu_cap(X86_FEATURE_XSAVES); >> >> +#ifdef CONFIG_X86_CET >> + if (cmdline_find_option_bool(boot_command_line, "no_user_shstk")) >> + setup_clear_cpu_cap(X86_FEATURE_SHSTK); >> + if (cmdline_find_option_bool(boot_command_line, "no_user_ibt")) >> + setup_clear_cpu_cap(X86_FEATURE_IBT); >> +#endif > > Any particular need for the ifdeffery? > Right. There is no need for that. I will remove it. -- Yu-cheng