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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 98C16C433DB for ; Fri, 5 Feb 2021 13:43:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CEC1E64FBC for ; Fri, 5 Feb 2021 13:43:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEC1E64FBC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0CA976B0005; Fri, 5 Feb 2021 08:43:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 053DC6B006C; Fri, 5 Feb 2021 08:43:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5EBD6B006E; Fri, 5 Feb 2021 08:43:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id C8EC46B0005 for ; Fri, 5 Feb 2021 08:43:15 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 95128181AEF1E for ; Fri, 5 Feb 2021 13:43:15 +0000 (UTC) X-FDA: 77784330750.06.month78_0a0cea4275e5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 643381004F4A9 for ; Fri, 5 Feb 2021 13:43:15 +0000 (UTC) X-HE-Tag: month78_0a0cea4275e5 X-Filterd-Recvd-Size: 3364 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 13:43:14 +0000 (UTC) Received: from zn.tnic (p200300ec2f0bad00265302c9d3d9d03f.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:ad00:2653:2c9:d3d9:d03f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 6E98A1EC046E; Fri, 5 Feb 2021 14:43:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1612532592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=BsMjYDoNfcMteGQMdj+hPtQS3ZX8QWITgjgkQYNdXtc=; b=YzijYPKtAqMP2MqrfGnz3t31fNY/zPFrkTj2ehYytDWViV6kZUo4CtNASZ2CnHcx8S86Vw y5qIvs15h1rv6vlp8O27q0914Upa00rdc66PWg8hr+kc/wrP/BcACcocdSr0l+OyANMuMG hKHvoe2AFLvlCWaa1dHn1xhhsMn5I4Q= Date: Fri, 5 Feb 2021 14:43:05 +0100 From: Borislav Petkov To: 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 , 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 Subject: Re: [PATCH v19 04/25] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions Message-ID: <20210205134305.GG17488@zn.tnic> References: <20210203225547.32221-1-yu-cheng.yu@intel.com> <20210203225547.32221-5-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210203225547.32221-5-yu-cheng.yu@intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette