Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1954619pxb; Fri, 5 Feb 2021 05:50:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCIBY0dGiWicfyug76SOQSopoigutmesbHYrVKZw7awSxlkbm4c2U29MOJfQCKiZpkpfBL X-Received: by 2002:a17:906:3999:: with SMTP id h25mr4215398eje.146.1612533038442; Fri, 05 Feb 2021 05:50:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612533038; cv=none; d=google.com; s=arc-20160816; b=CvHRtboQ/SnkzerUT8mZHIKxJ8zcVBchqRpWdVucDYhT99UFh6+HSVbade39T9yyLx cGdZa2x2DoksNcUiExY6wioqmKnh7T+gjITeGk8u7B2srDQRWL4f70OmHDPRXTMfPJlw EWKEG1FJUw/Ltk/ZAjL3BB3+6xUDZnGV1tTebQSaYUL5VItdJCZIXqYXrdlxGwEUhu9l 4APwNbVtij01x4h1vmd/Dw3xPbEyHVFRm8d8P5trY6BXjKu8s+EkKzQ8bq5JBFmzkmwa R9+/iOpIUq4lF6UGcTVtrmWYS+fQS8QtNEPWrOdWnjAEwiHVKWnfBMwNyahsgXIKxF6I NAog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BsMjYDoNfcMteGQMdj+hPtQS3ZX8QWITgjgkQYNdXtc=; b=XUT50XHUEkZrED/nLaFpmZf140A368UIEyV/vKmuZ79xIYJB/KW+Dk26aIYFtMfDfm 5x86/OXIA2xfBwF7mwF7Ptt4b8gz6HrAgbFKoSc57H0j9Pm3zXaB3vlBvjMDfdBHx3Qd e4t3sDdm/aF+8b8nzfHRpgSHZ0NgTwU9YTqrYbzvSlY2yGUSdaPrzgu8JS1eoNKyoCwv 7oKiJ/BDoRFv2JZw20SB8Pz3QfDJ73nrwmcS7Wvj1ug23JZWt4KpXfZtR80c2ISr3uTt 0EFZ39v1Jm0XYRsi8000olzkCOdHbegOaTr7orYuThw5lw+HaIfvH0OnVed0HYq5TP/m /VIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=YzijYPKt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si5867501edq.529.2021.02.05.05.50.13; Fri, 05 Feb 2021 05:50:38 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=YzijYPKt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbhBENqj (ORCPT + 99 others); Fri, 5 Feb 2021 08:46:39 -0500 Received: from mail.skyhub.de ([5.9.137.197]:57794 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231383AbhBENny (ORCPT ); Fri, 5 Feb 2021 08:43:54 -0500 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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