Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1063441pxb; Wed, 27 Oct 2021 18:35:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGML5Yz0iC0FIfbdCg8/vk1h3PaM2ao15NSKeeCrvdziCNopXHgw2aBbr54bBfzQT9rVpz X-Received: by 2002:a17:907:d07:: with SMTP id gn7mr333904ejc.272.1635384912860; Wed, 27 Oct 2021 18:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635384912; cv=none; d=google.com; s=arc-20160816; b=rTdfgf4J7viqBW+9kAAmryC9+j/CBPIgW7ZdKkL5w6YPR898SBXnQioNgHvT5sotNW lRKvahsVFRZzCgQgRJyU620ehG1W7S+JggDhf1LnENIjzG7PBwCx/kCiOh7jVMMbLYpz yw72GZXTDnjemTcvVSVg5zzTQ8UIadsx+zn0Avgc76R6ueEBmLghpwDAItMASZExG+Oz rA1Bvm9/6GhqpxvB43s+1zgb9EjXYJLusSZ5xSjaEM4/Giqc9xxZ+gCIZSn4begLwLwF 7SkAL7rJdjPFmyODBAguPsmQvnMYDHkY376vqMWfhJ+nGhY5LGIkrVA7khVZRMPaBJop z2Qg== 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; bh=eAlrQUqMrAh1Mtm8qyJPGC+JKzb+038Sl/EzoJyAwTw=; b=GlgYZa0gGFM8ywQS9/YtpRpkk9xAyKgxPrk3/0RAZFxtSzNwfMCQJ6oboIwjkiPdcZ S9UuwD5C/sYtpTJ/r4gx7sUsVdhfb1h55KR/m7bFfAui5S4rIRduaGgkXHNVp4BCqPjg +PyPjUMKKLkp6eICVGZ6OLU6QlgyB7x3YuEfBRoXvlQ/0zd0ZByNkP7ElzFV+NQbPO59 O+1Eb8+Gko8a7cIo/ta3u1xZ15CK58o2VcE7rproHm9wdSDRg5AKUVjgqotH29PVw7+1 ZxAIhz1yIgabT0ptBGfMoMiUb+TI8rx/tlwTtTTHgEUVBpDtpTHIF0FVSiBDSwaRLwct URqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si985469ejj.229.2021.10.27.18.34.49; Wed, 27 Oct 2021 18:35:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbhJ1Bdc (ORCPT + 99 others); Wed, 27 Oct 2021 21:33:32 -0400 Received: from mga07.intel.com ([134.134.136.100]:9754 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbhJ1Bdc (ORCPT ); Wed, 27 Oct 2021 21:33:32 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="293761981" X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="293761981" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 18:31:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="486924662" Received: from gupta-dev2.jf.intel.com (HELO gupta-dev2.localdomain) ([10.54.74.119]) by orsmga007.jf.intel.com with ESMTP; 27 Oct 2021 18:31:05 -0700 Date: Wed, 27 Oct 2021 18:33:22 -0700 From: Pawan Gupta To: Russell King , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Cc: x86@kernel.org, "H. Peter Anvin" , Kees Cook , Andrew Morton , Masahiro Yamada , "Peter Zijlstra (Intel)" , Sami Tolvanen , Colin Ian King , Frederic Weisbecker , Mike Rapoport , YiFei Zhu , "Steven Rostedt (VMware)" , Viresh Kumar , Andrey Konovalov , Mark Rutland , Wang Kefeng , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Nathan Chancellor , Pawan Gupta , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/2] arch/Kconfig: Make CONFIG_CPU_SPECTRE available for all architectures Message-ID: <232b692cd79e4f6e4c3ee7055b5f02792a28d2c4.1635383031.git.pawan.kumar.gupta@linux.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Borrow CONFIG_CPU_SPECTRE from ARM to be available for all architectures. This will help in configuration of features that depend on CPU being affected by spectre class of vulnerabilities. Signed-off-by: Pawan Gupta --- arch/Kconfig | 3 +++ arch/arm/mm/Kconfig | 3 --- arch/x86/Kconfig | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 8df1c7102643..6aa856d51cb7 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1091,6 +1091,9 @@ config ARCH_SUPPORTS_RT config CPU_NO_EFFICIENT_FFS def_bool n +config CPU_SPECTRE + bool + config HAVE_ARCH_VMAP_STACK def_bool n help diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 8355c3895894..44551465fd03 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -828,9 +828,6 @@ config CPU_BPREDICT_DISABLE help Say Y here to disable branch prediction. If unsure, say N. -config CPU_SPECTRE - bool - config HARDEN_BRANCH_PREDICTOR bool "Harden the branch predictor against aliasing attacks" if EXPERT depends on CPU_SPECTRE diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d9830e7e1060..769739da67c6 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -124,6 +124,7 @@ config X86 select CLKEVT_I8253 select CLOCKSOURCE_VALIDATE_LAST_CYCLE select CLOCKSOURCE_WATCHDOG + select CPU_SPECTRE select DCACHE_WORD_ACCESS select EDAC_ATOMIC_SCRUB select EDAC_SUPPORT -- 2.31.1