From patchwork Thu Dec 23 00:22:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 12697659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8B4CC43219 for ; Thu, 23 Dec 2021 00:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345759AbhLWAYB (ORCPT ); Wed, 22 Dec 2021 19:24:01 -0500 Received: from mga12.intel.com ([192.55.52.136]:60585 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345656AbhLWAXm (ORCPT ); Wed, 22 Dec 2021 19:23:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640219022; x=1671755022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZqsacVCaCaa0RH/T+KzpxaVhq/CCs3gWJ74Mp2TbBss=; b=nPai+hED8/pvT4GWlD8Kb+lwrRxCjYXP86LoWcbX3ReBPl02Yj3oIcHt mHG/B/4mcnJL+xu+dFjxyv/PA8tp128FtW+tlympWplMK3P5T64HGY+Wo 2QLawitlSVxFNQRcIWp5L681jmW6p8A2SB0LChmaSdWx0LJ9HDEPViEEC Gmb9/LOyOaa2BK3xjXun6NaniuekQRXSNM2BZzTmuCPFWNFSz+QPMXpfi FLLL4HOMm2FXrNV8BkSYO/zbI6qLm+SIrLufSUvH+toZFLc0PbRBgp/s1 98xG5sALpoZF/jtLlNV5YbcYlruNP7zVVycVwFvaDEilc0pyTmTgeFtH7 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10206"; a="220739058" X-IronPort-AV: E=Sophos;i="5.88,228,1635231600"; d="scan'208";a="220739058" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2021 16:23:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,228,1635231600"; d="scan'208";a="614013918" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga002.fm.intel.com with ESMTP; 22 Dec 2021 16:23:31 -0800 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 1BN0N79G032467; Thu, 23 Dec 2021 00:23:29 GMT From: Alexander Lobakin To: linux-hardening@vger.kernel.org, x86@kernel.org Cc: Alexander Lobakin , Jesse Brandeburg , Kristen Carlson Accardi , Kees Cook , Miklos Szeredi , Ard Biesheuvel , Tony Luck , Bruce Schlobohm , Jessica Yu , kernel test robot , Miroslav Benes , Evgenii Shatokhin , Jonathan Corbet , Masahiro Yamada , Michal Marek , Nick Desaulniers , Herbert Xu , "David S. Miller" , Thomas Gleixner , Will Deacon , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Arnd Bergmann , Josh Poimboeuf , Nathan Chancellor , Masami Hiramatsu , Marios Pomonis , Sami Tolvanen , "H.J. Lu" , Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, live-patching@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v9 11/15] x86/boot: allow FG-KASLR to be selected Date: Thu, 23 Dec 2021 01:22:05 +0100 Message-Id: <20211223002209.1092165-12-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211223002209.1092165-1-alexandr.lobakin@intel.com> References: <20211223002209.1092165-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org Now that we have full support of FG-KASLR from both kernel core and x86 code, allow FG-KASLR to be enabled for x86_64 if the "regular" KASLR is also turned on. Signed-off-by: Alexander Lobakin --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 3e4ea355147b..f7472528f3dd 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -105,6 +105,7 @@ config X86 select ARCH_SUPPORTS_ASM_FUNCTION_SECTIONS select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_DEBUG_PAGEALLOC + select ARCH_SUPPORTS_FG_KASLR if X86_64 && RANDOMIZE_BASE select ARCH_SUPPORTS_NUMA_BALANCING if X86_64 select ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP if NR_CPUS <= 4096 select ARCH_SUPPORTS_LTO_CLANG