Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp700717lqt; Fri, 19 Apr 2024 08:01:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQltE2zyEz6YiVP9rV09K3PdhPbmRQwJDZiDCswxywN2wRw0KTK65/6N0xovK4eLDOjVN8F0c4oqx2CFBEwgcwMjzVJefpz5nQNACETA== X-Google-Smtp-Source: AGHT+IHejpr87PqAiKxOsgYny1D5aVDGpXUk4TafxmNTBw2p6Q1s1WJlBgTKXCW4yuSQTRaJFJbz X-Received: by 2002:a05:6402:2887:b0:571:d8e0:3a43 with SMTP id eg7-20020a056402288700b00571d8e03a43mr834059edb.15.1713538867830; Fri, 19 Apr 2024 08:01:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713538867; cv=pass; d=google.com; s=arc-20160816; b=LEe6dQTtf/xDWybZC15kXiL1rFDXRNUQxf40U30zg1n9kswwEp5sRE82ONpwUic4b2 Sg3bceG19SkWnaFgwd/MnuDr0VN9MeX64k0JksxFVYtkFvtkt9Y1JYinsIUV0cKQckPd EnLPnzh1irmFVtuEtC7R1RncgheBcoQGIonUGiy3Sc+XXCrb4GvVY2fB2jvPJNB4J21A /k+ObWmekrgiKqtidusHV/hVT1aXLpfK6fOi0AzeNx/t6rhKtfdXGowuZZsEQLVxCVHG zgBrM5WYA3xf6BQmFpMluUh0PzEQpCwuMrWmwMLdcQnaZp2RPFKkdUhzFBjiNIHXrD1v DoxA== 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=4+srIsk6l+pGwWVkin2w853WKzNpYaX0Lcb+/6J8dtU=; fh=Pb1jU9miYEPPDN4Zn420xCTn/fqkU0g1AVYYPXDOZNo=; b=Wr7BWVSBdnYqe4qzaKGwUqQJowrSfwaU39JawAfhKeEKli+vLKEIY1SNkZ9yltluab XGswGu1I31miz49tn0P49Di23j0Ds7ulOVvbhU7cfV2NnGb4basfq7VFr7jWxbqyTShj PCDW9wfuKTWfcxmmyX4OtpIAFULZQkTM1Bvkr/Y13+Ps6f7fV4eJ7PJa2qt+A80P0ZGq W/MgEBHl5ycqXtyR0QKfJ23Z6cTHCYXqeuoj3nOO+5XK0lZbZA8izpF0tGKWirHjQwHq bLNJzSGLAe3bXaVYPyOxmSdRdFPgl3/tmli0t57ZoAVV0qxO8uajdAvc8wQsEzgDKTUG eeuQ==; 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-151616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g17-20020a056402181100b00571bb75d118si2029821edy.416.2024.04.19.08.01.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 08:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-151616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151616-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 85DC51F23BF4 for ; Fri, 19 Apr 2024 15:01:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64C1712F583; Fri, 19 Apr 2024 15:01:01 +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 79EE512EBFB; Fri, 19 Apr 2024 15:00:58 +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=1713538860; cv=none; b=lUfh5H7/816MiwwwWNK6TI3wtUYeN0q8OrAIcBBSHCJYZ4ofMazP4KN57uQKrYXeGA9I/4lAKaDkBIgOv1IdTfcKiWBVK/UYzsOYQTZkmX6/EPAgzTDkZKqYrlQ8fVPnHUXbIb9fbb0SNxj8xgU6jRJN6hSKMudY2WoMLRHkhRw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713538860; c=relaxed/simple; bh=VcV7xfoTJ9227YQD/z0yt9fkY2IHDLlUoTcjM/rtbmw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rWTI6C/qpF12tGIAXulgIkybc4t2Z9u0NEFOWd1lh8kn/VCUKgBr+c2f0FKebzLotHMhnySA7Q3bP5ttWvp2e4ngV5oclRrVMW+V7Mmmh+4/sfL85J+f5mGK5zwOYnGOvT2jktugIWa80Rfxc0K1DJ4D7S7o33yWgRIecpOBCco= 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 0E50E40E0177; Fri, 19 Apr 2024 15:00:56 +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 1MKbSardtkwA; Fri, 19 Apr 2024 15:00:53 +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 BDE1540E00B2; Fri, 19 Apr 2024 15:00:39 +0000 (UTC) Date: Fri, 19 Apr 2024 17:00:33 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, Greg Kroah-Hartman , Peter Zijlstra , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Rothwell , Michael Ellerman , Geert Uytterhoeven Subject: Re: [PATCH 2/2] cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n Message-ID: <20240419150033.GBZiKHEUVzwz1LUDS5@fat_crate.local> References: <20240417001507.2264512-1-seanjc@google.com> <20240417001507.2264512-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: <20240417001507.2264512-3-seanjc@google.com> On Tue, Apr 16, 2024 at 05:15:07PM -0700, Sean Christopherson wrote: > Explicitly disallow enabling mitigations at runtime for kernels that were > built with CONFIG_CPU_MITIGATIONS=n, which currently is possible only on > x86 (via x86's SPECULATION_MITIGATIONS menuconfig). Hm, so the umbrella term is CPU_MITIGATIONS, the x86-one is SPECULATION_MITIGATIONS. I wanna streamline our namespacing and say, the arch agnostic term should be CPU_MITIGATIONS and the x86 one should be then X86_CPU_MITIGATIONS, the Arm one would be ARM_CPU_MITIGATIONS and so on. This way we can stick all kinds of special mitigations code - not only speculative execution ones - under those config items and have it all straight from the get-go. And I think we should do it now, before it all propagates down the tree and becomes a lot harder to rename. Thoughts? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette