Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1237983lqt; Sat, 20 Apr 2024 06:37:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSxIjxfooREn8bJZ5hCWiLGJ66qPMQSu2qXh9oxnVxxUvYa0lE6vtHwS7zmPyMUkM2BGbP8TcQ1x5aPdTojhSsEUgN4t5sfseAx164tA== X-Google-Smtp-Source: AGHT+IFgjOuTAXcSulL9KDluNZz8hv+BmwSESv6QRzBskXT4Om6yoTWX/rpUQPK+V48L98t/bCFj X-Received: by 2002:a17:903:22ca:b0:1e4:55d8:e753 with SMTP id y10-20020a17090322ca00b001e455d8e753mr6374165plg.10.1713620225070; Sat, 20 Apr 2024 06:37:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713620225; cv=pass; d=google.com; s=arc-20160816; b=liPfF8JTYnk6mc45gniZ3pdaD++q59XIvW2toC4zT0o8eKhL8b6VH5PNoqhleutC2/ 7GEBEpHM2kBBbO6YxloP4D7EwRfu+4pxMMemS5kSz0jTu+lXhvhH85V+5PRBJFdIfR/v zh+KQJYrVRnUrHl8uBLCLO1EBqgw/z9gUUo+/Kt0hijI8rT4fVKMpfGO7N3i+ERXPxoN nJfyuijFecbIlegTxbZG0nfSoE/T7hl9y1s1x2PUbe1c5oLpYnRwPRxwT+uDklKmAmfv Iv3Bumf5FBPSwTdPc7O1PpT02biaCwRW4X6QAJuiVxwJxK2aQLN3aqFeTu/1BBPJIpxG rdrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=k6zr93aJu3/jGbx/7VC/ob35X7d+MuEodwvvqOklKPE=; fh=WXgf5jBuJQs7a7EeYxEcZ1i/4hT7hW2lNSI3xIrG+As=; b=OMYYAb1F4pLF2LyCS3BHsieEm/m3adsgLoJzwIinWwsZfBiGWr++Ux2b/2iPyiw9QF epx8Go7h9pZyQ/VPheJDx7gq8hTATAeL/Z+CURy/LB0F6FTrrLqzIQ9wIAx9rrm5BheY GuTtUOAoF7lL2nRt6Ah0gbQJ7OD5qfiPwtuNXwkvhUL9oz9cH1Ro13cE10ZT1uWKLZ2U 8u95rbH5lgXoq01A0qhrvxQy8DK9PEAUy4FBPOMI1i999dQZt8pWKr3WYHrg1BMsaJcE jSFcvlPUYR9y+JRV6inXCJZrIpF4R7mG3PER3ddCaIGLIEqpw2N4MITzxhE5b9eK+ssX /JHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-152278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id me13-20020a170902fc4d00b001e01486e80asi5118155plb.94.2024.04.20.06.37.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 06:37:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-152278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8B60FB20EBF for ; Sat, 20 Apr 2024 13:37:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03A512030A; Sat, 20 Apr 2024 13:36:54 +0000 (UTC) Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F02361CD25 for ; Sat, 20 Apr 2024 13:36:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713620213; cv=none; b=Drb0PdcYDh4nSOAerXdrL392VQLzypN2xqPZ0NB4x6eLg084m2N1HcbI7t4/btP7ZHBRfVrLnUcH1eXreoojFSrNdQD7H+zgdq7SHTJC3i/BcA/yN6cZI8CgexQZwDIc1s+7PLKlUqFVzrcp4awhj7d2zPnWKhsjLMcrhztYQWE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713620213; c=relaxed/simple; bh=0SjfUwaAeoxQoQv29i+xVwe6pgaFMFpnDXCH28PPGzI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YmFVzbZIHFvUw/9Hva03ngZER8nSn+TW2sUZaHFAMwgUv5x11WtFnR3EWVJ6HhdxJvbYE0wv/DJs5RiB6l6IgpimHSXxmU9sz6lCap14XHxJYtXUqfvKQFx3zAMd0UndwGrJrEI2Z4k53L3dxx7aw3mxgIqpZF3JJYieiPrgnq4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 936FD40E00B2; Sat, 20 Apr 2024 13:36:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id u4SVQZwpEBce; Sat, 20 Apr 2024 13:36:45 +0000 (UTC) Received: from zn.tnic (pd953020b.dip0.t-ipconnect.de [217.83.2.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D950240E016C; Sat, 20 Apr 2024 13:36:31 +0000 (UTC) Date: Sat, 20 Apr 2024 15:36:30 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, Peter Zijlstra , linux-kernel@vger.kernel.org, Stephen Rothwell , Michael Ellerman , Geert Uytterhoeven , Josh Poimboeuf , Will Deacon , Linus Torvalds Subject: Re: [PATCH v2 2/2] cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n Message-ID: <20240420133630.GCZiPE3lZ3m-M1CqG_@fat_crate.local> References: <20240420000556.2645001-1-seanjc@google.com> <20240420000556.2645001-3-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240420000556.2645001-3-seanjc@google.com> On Fri, Apr 19, 2024 at 05:05:55PM -0700, Sean Christopherson wrote: > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 619a04d5c131..928820e61cb5 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -2495,9 +2495,13 @@ menuconfig CPU_MITIGATIONS > help > Say Y here to enable options which enable mitigations for hardware > vulnerabilities (usually related to speculative execution). > + Mitigations can be disabled or restricted to SMT systems at runtime > + via the "mitigations" kernel parameter. > > - If you say N, all mitigations will be disabled. You really > - should know what you are doing to say so. > + If you say N, all mitigations will be disabled. This CANNOT be > + overridden at runtime. You probably wanna highlight the fact here that saying N means it'll simply not even build in the mitigations code, leading to the physical inability :) to enable them later, at run time. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette