Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp738538lqt; Fri, 19 Apr 2024 09:01:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBHKPL34UgIB6sIPqJ3i2W3Zso3hCh07g14xWSFTSxaHyaEDHfOE0AD0GmMaSe0TOMzf7iHWrxbow8DL2m2NtPu6xidvTWH3xc+AyFMw== X-Google-Smtp-Source: AGHT+IH2SuULYOzOMc2nXCZDTKagm0LocetUlFnAKYCKamHenu8i0IjRXVeb6wHLUaj9ird0pbkP X-Received: by 2002:a67:af17:0:b0:47b:a6ef:bb3e with SMTP id v23-20020a67af17000000b0047ba6efbb3emr7575513vsl.2.1713542471648; Fri, 19 Apr 2024 09:01:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713542471; cv=pass; d=google.com; s=arc-20160816; b=TzepyRCEZ5sfTvhrBi5KhYkntnJi4DMczrb2tu/QL9KS0ia5lHa/3R92W4RMYeTil5 DA0yIDKgesgyU+oe0QQKnsdYmKA2Se0J5SXvmpO1+8IC0dsdEckH51qN2XcK1A/BnGPE GmibkE0LHcs3hYAHOjPlY/4CFMX9Cs97qQ18DHvMS9TsHZT2WCJcjMFwejrXyu3NYu3h 3R8DgYebj8DNm9E39H0vEKPUYAX1kk2mRj9hc7irE1GHQLTIdhTuFBTKKV2N5S4SDsls tbnLSvqTY3baa1dn7i4i9oeFL7EowskLqdL4+5eaFwJe6UY3hFh7OUQ5vODBvvffECqD LZsA== 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=/8vJG8lgSojzNhQtI7K3ugH96qXtY3LiyZG0TFCwuLE=; fh=tfJdBkmfdqnK6POCqTm/YbtvArql3mGbJfnskc2Wdk0=; b=0EKSXkH8Xk3elbgxwySbwlJRTAGX6JCTU81qtRBt0E3Y2m7xg28YdY0lHwCjXi0ymV EYlhCDHBfgwk1nCyAxKcJS0blYKnzWsjOkMPW8IXAZzkQVF9coTpF+n+bpWvTHWPzyvU Fnqpntrwp1TfZ0WliXE1RFuKPvXGAeBJl8xvoPM3Tw8Evdmlu88yYpph0dmHP/gTpj7q 1OTjQQLduWUEgxYAx11waGm1Hy9pe2x5i2g0jaZ9wUzCSppdZ6n5FoqUv807Zl9OgFoj X+H+MAxlyRRvcB5JcXz1ao3oLh55Rv7utezn+ufx/nc5bq+q5/olr3hKNjvLyiB3eQkp UGPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=JYGnh1wf; 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-151720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151720-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j31-20020a0561023e1f00b0047bc1352371si967342vsv.788.2024.04.19.09.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 09:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=JYGnh1wf; 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-151720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151720-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5E8361C22411 for ; Fri, 19 Apr 2024 16:01:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B509A130A73; Fri, 19 Apr 2024 16:01:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="JYGnh1wf" Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.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 B23BF130AC4 for ; Fri, 19 Apr 2024 16:01:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713542465; cv=none; b=l1sQQBmEpalypy6m4MOyR1wJ/HvQBPdwnYWSTRmnLfFbl6zVv0LCWVtdZ7mfCShScrg5CHkquPknWOz2M6yATWOjPBONyIkqEkZWYohZF3HQk45o1vpJncGsnWBuslpKDS9cu4d72dCFKHtC7SGHSFpzU31uOODeRQJCDrSSyzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713542465; c=relaxed/simple; bh=e23FOWubI5VU5i9iHtgcs5Xh6sNhh5JjNy8voR0r/u8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Yg7QHJnxeK+N8wiDimpLuasZUzBthbD71wJ1iheiexjg1Bfl5IE1huHsZttu/yqxh+1JJ5gnkyTN3n3fRXWe1aKefJsnET+dUcVbohmfAo+PEGvlqwCRreOz6xJ8p6GBOxc4SfCx6HdY0QgkkcrPZo7zzhPzgHIrwcB6h4w5mDc= 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=JYGnh1wf; arc=none smtp.client-ip=209.85.214.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-pl1-f201.google.com with SMTP id d9443c01a7336-1e604136b6dso27350365ad.1 for ; Fri, 19 Apr 2024 09:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713542464; x=1714147264; 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=/8vJG8lgSojzNhQtI7K3ugH96qXtY3LiyZG0TFCwuLE=; b=JYGnh1wf8L1ryif5v3dkZiZ5K1Ic8SBLT5FC632alZDCMUlNVb76c65cpWPi5oX9rx G8ky+zQZRku9Oa/18G27NnV8Fj2o7BcURP8dmghZvSJ2hH90Se80b7+M8ZoJ6pqLTDE2 qCVyTJlvlUskRsbsXaHn4Dckt6xLK+p8n4FPbGqBcFqCA39wUzjYmALsqHApl8ipPIgF IXKkTJxNc50+wwSmHnyjsnXXyr0m2XQ3+KdlE4ng89SR7PlMb9HTKYVO5uwpe4l1jwgm TwUQTnbNNvAVGIiZ1uW2vTFN1s33+92HXyv7x0pOKWw1zJEMU7C69lQhKunQa5JSYWht Hkjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713542464; x=1714147264; 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=/8vJG8lgSojzNhQtI7K3ugH96qXtY3LiyZG0TFCwuLE=; b=ALhqeLa7IpV6YbtAiVUxeT2R+p+kMFLJ8BUP3WUS1gIhxFkby+cOKyatZW0gFRfVaK DbEmePEuHj+s8PQajTfoAMqiHnvukjcQ+Xq6FECdl96CYfMzmx9AI/5C2RG3NmKSMePe gYxIPfzU/DnZhEkMvmvI/DXnqoKQWEjmeZp1Vb065pVaWIDBWqMS9gJBPpcXHS5Q3/is oGwAk9ktJgTMfNRjWqlWx1mCNBpajDZ5wstlAzZzG2dC4T2hkLlzr9NWzxMoaK+MK68H Sc7eunG7Fm49nYErLWc+Vb73FxFunTyqxZT1V4zLphCA1ZjkIrz0CfltsQl/M2v3TlYH xhjQ== X-Forwarded-Encrypted: i=1; AJvYcCVaAyP/Xup2KWuW4SV4yBUkKfyNCCj9rQBvZlvZ1Z8VpUCV0LvzthVY2d0ew1nLTwHkeJnxVwU9SH8zC8lQ9f3dlQREelbHTLfonY+h X-Gm-Message-State: AOJu0YxTsm6oWweIFWycHn7Km+EQ2ndv8d1oim/soXvDp4E32qmn5WQo usOfpKzPdmLgDVjGbTeNoY3uQ07p+MQ9txi8vbaSkh9ulUHxiPILFY5b1ypuNcPRCvv8EPf5w+z U2A== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:ce87:b0:1e5:e61c:35ca with SMTP id f7-20020a170902ce8700b001e5e61c35camr215219plg.13.1713542463826; Fri, 19 Apr 2024 09:01:03 -0700 (PDT) Date: Fri, 19 Apr 2024 09:01:02 -0700 In-Reply-To: <20240419150033.GBZiKHEUVzwz1LUDS5@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240417001507.2264512-1-seanjc@google.com> <20240417001507.2264512-3-seanjc@google.com> <20240419150033.GBZiKHEUVzwz1LUDS5@fat_crate.local> Message-ID: Subject: Re: [PATCH 2/2] cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n From: Sean Christopherson To: Borislav Petkov 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 Content-Type: text/plain; charset="us-ascii" On Fri, Apr 19, 2024, Borislav Petkov wrote: > 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. +1. That would help avoid goofs like mine. Maybe. :-) > 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