Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp577377rdg; Tue, 10 Oct 2023 21:43:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWlQhQIdg4hnNV5nyKLRLlYAYdkj7OvNXev94YlghsqOm+2iXUwjlFrWC/kdO1P0WNMbnS X-Received: by 2002:a17:902:7248:b0:1bc:10cf:50d8 with SMTP id c8-20020a170902724800b001bc10cf50d8mr17377271pll.23.1696999380727; Tue, 10 Oct 2023 21:43:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696999380; cv=none; d=google.com; s=arc-20160816; b=GUmGTNbI2F1Btq7wTKyfnb3hESiN/3avFQ6pbBxxiaLRFsW2045mAmqVGoSPgHW33q z3pffaMOTdL9IzkY/EfE3X0yULjEkufJLHMlj0XDLjn1WXq/hfH1I5gSmb37T2Ml49BF 9i7Q1hixDAYVJpquqvC5/VRKP1n3OeVLUyHiUAOGGmED+do/rurdNAdphDNFQ8IkBl+I ZTtOIhhAF2HeVS9WUCpT2H+RnFH2wUo7JVu0RTtdDbaGTSZtkiPHPkzIYEp8fG5VBAev lNXcs4IeAtUuqnexE1IDuepMgailtoGKEomQbNwXosxUv+f0eQv6Q5bc/v2jsOjMbDeM Ox4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GjcSreSEdtDuslAdzSSl6y9uhzNj6x+NkkI65AF3up0=; fh=mAnUTSIwprYlZ89G6Mo4Bz0PIr675sNGOXTnOjx84hA=; b=PS/3vkWtyccOqmtIcwR8oPYiNL/1ey/x4IQLwAeEkcsAeZEr5YJR1yFmepF1ubz1ff eAGId+1YOJ4dybotq9AbImDqKRye681UMg8Q5TJG0zJPo0tswmSePRFN785npkCrh46o Xm6GnDbTewAmiI4bYG+Aepb34+rZ+G3pBfQNP8YCMyvhLVCkMdqeoPfDAUB9fOZt4ABC 5tzRetomLvImGzO3zh+zHn2va7+aNhNhJYdaGo7KgfEZuBs7OFORYUn/LY7zWDLEBpVq 1pl51bDTiPvFVFzM9guYxas5D1WidkMLGOdBjlX6phRRjAQNAZI7mphwFw8KAlvEVebb dMzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c+YMg1lc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b6-20020a170902d50600b001bbfbe6bf3esi14510787plg.504.2023.10.10.21.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 21:43:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c+YMg1lc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DBB9081393E6; Tue, 10 Oct 2023 21:42:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345125AbjJKEm5 (ORCPT + 99 others); Wed, 11 Oct 2023 00:42:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344777AbjJKEm4 (ORCPT ); Wed, 11 Oct 2023 00:42:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C81ED94 for ; Tue, 10 Oct 2023 21:42:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02561C433C8; Wed, 11 Oct 2023 04:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696999374; bh=NYNisQuom27rBBJUfP7fvKUCts8FyNst+nzRKYiXRgs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c+YMg1lcNAhugNq0hVyJhWNO15HUnl7sfbqkcuNsA97qPrFaocaBoxH0rt1Ks+vMM nRIkvHGSTW7dnZKQWZ69K6R4XKGHIG2Up9Tw6xXwI8JmqC54TuCuv5bFO8GzCaORaT yr3LD10abrgUB6pwHEQdltQRQu5gO0yghMH9jZ6dnwnhg/7lvUiIfGw8JVB8KOTnX1 WeTCmlKwc8g0lAVfb20pk9yINgyd2HRG8OWIA2+XUpdk14zxm0UUz/9y3CXAL5xIAh CInUjJkliBc69D3OITHRNkPaqHRMddwEeolPZTEZCjNl9FbQNBisEAk5n5omSjfi7o cbB4RxYEfZHFw== Date: Tue, 10 Oct 2023 21:42:52 -0700 From: Josh Poimboeuf To: Breno Leitao Cc: tglx@linutronix.de, bp@alien8.de, Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Pawan Gupta , leit@meta.com, "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v4] x86/bugs: Add a separate config for each mitigation Message-ID: <20231011044252.42bplzjsam3qsasz@treble> References: <20231010103028.4192223-1-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231010103028.4192223-1-leitao@debian.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 21:43:00 -0700 (PDT) On Tue, Oct 10, 2023 at 03:30:27AM -0700, Breno Leitao wrote: > +config MITIGATE_MDS > + bool "Mitigate Microarchitectural Data Sampling (MDS) hardware bug" > + depends on CPU_SUP_INTEL > + default y > + help > + Enable mitigation for Microarchitectural Data Sampling (MDS). MDS is > + a hardware vulnerability which allows unprivileged speculative access > + to data which is available in various CPU internal buffer. Deeper > + technical information is available in the MDS specific x86 architecture > + section: Documentation/arch/x86/mds.rst. MITIGATE_GDS seems to be missing? For consistency I'm thinking it would be better to call them MITIGATION_* rather than MITIGATE_* since they're under the SPECULATION_MITIGATIONS menuentry, and the bugs code almost exclusively uses the noun "mitigation" rather than the verb "mitigate". While we're at it should we go ahead and rename the existing options? e.g.: MITIGATION_PAGE_TABLE_ISOLATION MITIGATION_RETPOLINE MITIGATION_UNRET_ENTRY MITIGATION_CALL_DEPTH_TRACKING MITIGATION_IBPB_ENTRY MITIGATION_IBRS_ENTRY MITIGATION_SRSO MITIGATION_SLS -- Josh