Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp510810lqd; Wed, 24 Apr 2024 08:48:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjnNdNBYEKqJ5DT7GmknoZ/jaVNCskF3Gnw+cGZo89L3NZ37toj2+u3gDu+AeFbo31pjuPnFvRefCbMPNsTBA2dUnykoSmI2HhzvY+tA== X-Google-Smtp-Source: AGHT+IFyYFGJXwFy2oxCX0zQ4cGZ51VHQYdNvLL+BwfuKPR99Zxf2MbyROTfXf7SMe54rHjcUYMp X-Received: by 2002:a05:6000:1952:b0:347:3d28:c872 with SMTP id e18-20020a056000195200b003473d28c872mr2878585wry.9.1713973729452; Wed, 24 Apr 2024 08:48:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713973729; cv=pass; d=google.com; s=arc-20160816; b=WCHq93iPp4g1wAHhexdiCLFZhLlrucoqzD5SA2W3Hzekx4UoqWFQ9Id0e9uUg+0olI lpRd7LxF+cP9HGUn+nR75duji23YcvNgdCbHwmFVeYKOVoFHdZ1FTaBZqyMCsGIcKpIZ 4clAZyFzOO8J0u1kZwlpSG9JSuyQ6SGneSBPjnZSXMEbG8ssAkgk5c7vPV8SNWhLN+vV /0CDEWenqpAtvtnb0vZooBZ4ZDFHlYgWetjLZyAu6GjR/U2Dcc4U0p4AgFKnKXY6Kj0q ZRjL0KYE+/VKDe4a+uuICoUWymNldNZFomYTRPYjA4Y4RvtayAVGV5RQw2pIBu00lDux bIFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=l+gT/b/2VDLIr0gptxkhB+Y4JKNs3jUP0dyl/dPQGpc=; fh=EUevKKv9N5GeaRBO3LMrFcQA5J4+hV8UlfqzTPDEZgE=; b=NFbDQCiCXmvhv2KSrS1sjL23rKnhPYacHlWcs0zoqte7xNfVyzaLLk/AauVLityUui aev2nHvjAMWfxCuvS4cGCmhIYplKMbYdEdOInNNej7uZ6hePeQqVVjOFXrbWyvpnYoQU 3Br/IBnQu6S0fF44LOa7hivYXqgZTqigbODUgcIj2GN2evdPL8KZUGyu24hxPqR+5myb 72JLM/vIE/MgZAD6qn7ZC+qoC2VhOHmK5R69kLthDBKq/A7EeuGTOcBUIbT22VnLwtL0 r053hy0PNDtOB3inSl63OaI55Smjjc4tBgYpv9PVxqRwcZGLrbFePUW9O6qSrHbnRele Jc1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=g7FIz2ep; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-157240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t16-20020a17090605d000b00a519e1b3663si8429919ejt.2.2024.04.24.08.48.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 08:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157240-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; dkim=pass header.i=@google.com header.s=20230601 header.b=g7FIz2ep; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-157240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 31D981F22E53 for ; Wed, 24 Apr 2024 15:48:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31F3015FA93; Wed, 24 Apr 2024 15:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="g7FIz2ep" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1ABFD1422AF for ; Wed, 24 Apr 2024 15:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973722; cv=none; b=j6niHqBH+OIz9jXJ9aYGLxiug5T+QUpPP+hUykMaVtD5fPWSPGUN+sR9r5Q/Mfuhur69BpZ9f/1GcngZZfbai2vgutFIroENstYOxoALwwuoVz+GpzAiGuFJR4uL84BOOAMhVajx7UI0xoGuEeerNnL/zorqx3cTXyUq6UxCGfo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973722; c=relaxed/simple; bh=jqg5Fo1Agh7hM51ijesv5YFvMRtp1lD4hn9D9KkpZjc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=lUFW8oetMPyidpNlZtKIRaGzvd0C+R2xeCbCiOPc+Bokdb1m0t09CEKpGoC7CaI057KsxqPzT/fV2oIi6M3G3OyUrq6gS03B527Q+HCwMp6CohfYmByBnlpa9KJfwJcQCpPxDqgZydw19xmwPArQ/AZQggStkP3wq8CCN6KHI2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=g7FIz2ep; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-de465caa098so15695276.2 for ; Wed, 24 Apr 2024 08:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713973720; x=1714578520; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=l+gT/b/2VDLIr0gptxkhB+Y4JKNs3jUP0dyl/dPQGpc=; b=g7FIz2epnGefg/HNRaAVmGAKLuDkMzpCiX0GEbhKi+fTwigqixUF7GN4JR5GFZA6t4 nZZX6Nw/6SSbndBhrrEbqoLDFdJRg9yjshyoycZQfKIGUoNBA21wOcE3VlH9u2CnroeF xVOZb6DHvpOur0IHNrKBJ75srxCuQa7KHMRqsf9bVXl4zTfGKdbM+4YsBGK2rXE0uyOu ZhHzFmWbo0Dwi7epEpjWRWOh8nXEALlGNxgJYPcmcJdQNv0/UPoiJMBC58JUhIr270Z1 /cPpi5QZbLcD11YBItssVyDKAjveZlyI3LRzhKqsmidHseJ/zK3x3jHmqLtlM/Esj5En wH4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713973720; x=1714578520; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l+gT/b/2VDLIr0gptxkhB+Y4JKNs3jUP0dyl/dPQGpc=; b=SNiq97wzDTGgZZftpNEI+8geZSF93xgIOPpczjMz64xDFEu5FzOkAR1GdGXDh2y7f4 dURIrXG5ik2uwdnsbdkkG5bUCDysXK5+xVenS2iQW4XgwspDZxCPVzun6Sks5YUn+yon ebW/7unrNKs7SazQwWDbmi283uwVElEWy2xnXwUDex4Q76nsErFBWFzOs0nes2VIbyLd AdnQfd8Yk48ceA1wJ9wyfR4s3hwZwNhm7pmQ0Qto88mguXhbn1GUkWQTf67d0XU+Nq0u gyI+S/XGStXD9jVrScxAyxfr2foj7S+pu249L+EynkDGgu8SZXE6NtV/teLfYlDqdWhZ 1MJw== X-Forwarded-Encrypted: i=1; AJvYcCUrXh5Eb8U6NMQxjTGqD+stNuu+FweEAs6YK8+vY+4b5TnR+KrbSws5RVInIgyChxUQsRMSFlThufgNQ8iWPMJMLbdilJzfMkdb93aV X-Gm-Message-State: AOJu0Yy85xDlsWjTjNXC0xvTcw/3Vb+qtMaQ4EkS5YzBw1KeaiNNd8Tq aBD0jdel6QADhaBg9iEG27hP5xCRftnVOa6YR7csEbEgXaW4ZZbxSJtNFSSmb0bm7TPLzrH7adN Hpg== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:154f:b0:de5:5be3:709f with SMTP id r15-20020a056902154f00b00de55be3709fmr258695ybu.6.1713973720058; Wed, 24 Apr 2024 08:48:40 -0700 (PDT) Date: Wed, 24 Apr 2024 08:48:38 -0700 In-Reply-To: <20240424134248.GCZikMWA8EvlhGEYC7@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240420000556.2645001-1-seanjc@google.com> <20240420000556.2645001-3-seanjc@google.com> <20240424053940.3ypivvztvv35dpu7@treble> <20240424134248.GCZikMWA8EvlhGEYC7@fat_crate.local> Message-ID: Subject: Re: [PATCH v2 2/2] cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n From: Sean Christopherson To: Borislav Petkov Cc: Josh Poimboeuf , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, Peter Zijlstra , linux-kernel@vger.kernel.org, Stephen Rothwell , Michael Ellerman , Geert Uytterhoeven , Will Deacon , Linus Torvalds Content-Type: text/plain; charset="us-ascii" On Wed, Apr 24, 2024, Borislav Petkov wrote: > On Tue, Apr 23, 2024 at 10:39:40PM -0700, Josh Poimboeuf wrote: > > On Fri, Apr 19, 2024 at 05:05:55PM -0700, Sean Christopherson wrote: > > > +#ifdef CONFIG_CPU_MITIGATIONS > > > extern bool cpu_mitigations_off(void); > > > extern bool cpu_mitigations_auto_nosmt(void); > > > +#else > > > +static inline bool cpu_mitigations_off(void) > > > +{ > > > + return false; > > > +} > > > > This should probably return true? /facepalm Glad you were paying attention, as I was clearly not. I double checked that flipping that to true does indeed force off mitigations. > Right, I'll fix it up while applying and send them linuswards this > weekend so that 6.9 releases fixed. Thanks!