Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp795675lqt; Fri, 19 Apr 2024 10:34:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3YQxy47PmLHVsexcCiipGN5g/sie9ji34V+tUjuRbxFDWHJqFRk9gjIZKeDnCYynBYKHKdU7DkwavfZENMNukAu4qOQwM7mhDSCavhg== X-Google-Smtp-Source: AGHT+IFWzUrTw8z83QNCisjoHIYgCq9netNw0XpyvYbZhVkGuV5rVkztz3lpSzVH937ou3UcUg1B X-Received: by 2002:a17:906:f1c3:b0:a51:dc1f:a3b1 with SMTP id gx3-20020a170906f1c300b00a51dc1fa3b1mr1966333ejb.39.1713548097427; Fri, 19 Apr 2024 10:34:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713548097; cv=pass; d=google.com; s=arc-20160816; b=pb7iKM5GE5JmhcVBM1n9QAmUTOrSGB6AzCgDZTTKaKIyF9ySNW0gE7FhJFVQNUCu7y XxYSBbxP0yhFmvWMVTAEyHGAyeCMVCQfcruom30Y4+yhCI8unZrTxhxgLyjwmdzUNMIA WZoD6l5V7QL8XLEhbGyPObP9rbQiGcxWN9Riyw87G9mDKuVRcKdE4kQk/TaWGIlfJ5AA s3V+I74Xfp40LFeEsEiuRinFTOT3rTCvC2xZ2fNATKUyOnOFFxXqzBkr6M2gmUA4vbh7 l5n1QkDWGow89+PfNUOQpOgh+lFYMkGsTaHMQfBtmraZQPR82XBkOk6roZ2to09M2Rdc YZBg== 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:dkim-signature; bh=GGOCTjpmqn1zI34uMPFgvXsk+TlaJcD9Q1hYbX1RfL8=; fh=jcU+u2YrD3hBUfcKPHtTE3jWoDx40NnC29cDH9aOcek=; b=GSbpZw9BTr+PW+M5Bz3q2EChXjMSy/F15vksRRlOXM68m9BxzbSLUySjidBGDUKjp6 CunaxJpLbylz2HgzP2chEEvoFW+/2ZbUs2zMBs96ihJJ3VWV7r6fL6SnbGsuiDsQKAro VngzHh49hu2BpeCUtAHKxheXOlgCZ/9mumR6/LH3TtCEcaZsvY8wgN+qLmR7JhQSFlp+ VOSs7AQum4Xd6CM+uhcf8t3NR4ZA9FBdiRaBhoSoufbMCQrBwv5wzaeS1CYF3k8LQiiR mXpVYmNKYp0rUWufe3GyLJ0//FCjaweguGaj2XlU2st1/ds9szV2i1BdfFtv0Wv/Xmyh 9lNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=baibHG+R; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m14-20020a170906234e00b00a555def1236si2345143eja.503.2024.04.19.10.34.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 10:34:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151826-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=@kernel.org header.s=k20201202 header.b=baibHG+R; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 2A3281F22350 for ; Fri, 19 Apr 2024 17:34:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6041313C3E4; Fri, 19 Apr 2024 17:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="baibHG+R" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8AB4D130E20; Fri, 19 Apr 2024 17:34:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713548072; cv=none; b=V+QZnKSbI37jhTISW6rTngDXMKXh7d7TZmGz6r6pyIZ3WUVUhrP5qTVfHOFr8MFYeOY6fj2dgg1I4eMcnA+O9A+l2Clf0ykXcj1fpB3CdsXxduhRSZQBnT4us4uLwQ0CvZiOa9Dw5DKuLiZmWglNBT2F4/m/YaKXYqSc9NYpXEA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713548072; c=relaxed/simple; bh=T5zVCIITP/wX9S8rlRsdZ/1DLYcJwklmwpbYROHRq4E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HCDmPy7G1ymaRkGxYwAMyZL8tyqCRGaAb0IN6ljadk9RJ3aE506nEmBu5ZxZDhuL0UkXlKdQcOkfOS4jx1TbgsGjHF7xsg42EmwUWXflj6wKI7st0i29/yul7Y8zEShnqbOvQ2Yl6o7uGNHtdIurAxikHEKxImmhwEkfm1E6now= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=baibHG+R; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91CA1C2BD11; Fri, 19 Apr 2024 17:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713548072; bh=T5zVCIITP/wX9S8rlRsdZ/1DLYcJwklmwpbYROHRq4E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=baibHG+RzI0GfDlkaJMVUfv2BZtCAK63VLlj1hmQt8DV48IlzX9GerHApxrtwg+at swp7cwWJU1CXeklWh3K96nry4/R0KNRn64ePRjmca4qLyRvBWpyX1t74pCdmOp3V7V lGnNwQbZ05qUhP9gUUX1DHof19/Y95HEwOYAOyaF8dZ3Fai3zaBUmGEwANHvEQrtTg vzf8cQ3eqJlNgMxStBC4kGSns1KfkfCZvcGqfEKd/2mmtRecxoU3qjQk6/T0ZeHM+j bVZfymhGnzIxRkuK2DuoYkKe0cNSdBQjYD8rUB3GIpLpkV3Ee+dD07Rf9Wp7ga9qj3 DPD0H9T7tML9A== Date: Fri, 19 Apr 2024 10:34:29 -0700 From: Josh Poimboeuf To: Sean Christopherson Cc: Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , 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 1/2] cpu: Re-enable CPU mitigations by default for !X86 architectures Message-ID: <20240419173429.dj6nzgg3t23f52ol@treble> References: <20240417001507.2264512-1-seanjc@google.com> <20240417001507.2264512-2-seanjc@google.com> <20240419160537.namt5yaxhhvwwa3r@treble> 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: On Fri, Apr 19, 2024 at 09:46:58AM -0700, Sean Christopherson wrote: > > It seems confusing to have two config options which have very similar > > names and similar purposes (with subtle differences depending on the > > arch). > > > > How about we instead just get rid of the x86-specific > > SPECULATION_MITIGATIONS and replace it with a menu which depends on > > CPU_MITIGATIONS: > > Huh, didn't realize that was possible. > > I agree that having two things for the same thing is confusing, though Boris' > idea to do s/SPECULATION_MITIGATIONS/X86_CPU_MITIGATIONS would help a fair bit > on that front. > > My only hesitation is that x86's menu and the common config knob end up in > completely different locations. I'm thinking this is a minor issue because CPU_MITIGATIONS is enabled by default, so it should almost always be enabled unless the user disables it, in which case they wouldn't be looking for the x86-specific mitigations anyway. Regardless it seems very common for a menu "depends on" to be in a different file. We could put CPU_MITIGATIONS in arch/Kconfig which is a fairly logical place for the dependency. -- Josh