From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 15BE9158090 for ; Wed, 11 May 2022 17:40:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F2FDE08F7; Wed, 11 May 2022 17:40:01 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 007AFE08F7 for ; Wed, 11 May 2022 17:40:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E464234193F for ; Wed, 11 May 2022 17:39:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 33BFE3BF for ; Wed, 11 May 2022 17:39:58 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1652290789.ff2113050f76160860097c55d73a4e0f73b4aafe.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:5.18 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 4567_distro-Gentoo-Kconfig.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: ff2113050f76160860097c55d73a4e0f73b4aafe X-VCS-Branch: 5.18 Date: Wed, 11 May 2022 17:39:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b3ffd8a7-787d-4b7c-9c50-173149aebd48 X-Archives-Hash: 3d20b56ffc98a1f6a41df0f87cda3180 commit: ff2113050f76160860097c55d73a4e0f73b4aafe Author: Mike Pagano gentoo org> AuthorDate: Wed May 11 17:25:52 2022 +0000 Commit: Mike Pagano gentoo org> CommitDate: Wed May 11 17:39:49 2022 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ff211305 Update Gentoo Hardened patchset based on KSPP thanks to Peter Bo Bug: https://bugs.gentoo.org/841488 Added: CONFIG_HARDENED_USERCOPY=y CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y CONFIG_KFENCE=y CONFIG_IOMMU_DEFAULT_DMA_STRICT=y CONFIG_SCHED_CORE=y CONFIG_ZERO_CALL_USED_REGS=y Signed-off-by: Mike Pagano gentoo.org> 4567_distro-Gentoo-Kconfig.patch | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch index ab78353b..1efc0fba 100644 --- a/4567_distro-Gentoo-Kconfig.patch +++ b/4567_distro-Gentoo-Kconfig.patch @@ -1,14 +1,14 @@ ---- a/Kconfig 2022-04-12 13:11:48.403113171 -0400 -+++ b/Kconfig 2022-04-12 13:12:36.530084675 -0400 +--- a/Kconfig 2022-05-11 13:20:07.110347567 -0400 ++++ b/Kconfig 2022-05-11 13:21:12.127174393 -0400 @@ -30,3 +30,5 @@ source "lib/Kconfig" source "lib/Kconfig.debug" source "Documentation/Kconfig" + +source "distro/Kconfig" ---- /dev/null 2022-04-12 05:39:54.696333295 -0400 -+++ b/distro/Kconfig 2022-04-12 13:21:04.666379519 -0400 -@@ -0,0 +1,285 @@ +--- /dev/null 2022-05-10 13:47:17.750578524 -0400 ++++ b/distro/Kconfig 2022-05-11 13:21:20.540529032 -0400 +@@ -0,0 +1,290 @@ +menu "Gentoo Linux" + +config GENTOO_LINUX @@ -185,7 +185,7 @@ +config GENTOO_KERNEL_SELF_PROTECTION_COMMON + bool "Enable Kernel Self Protection Project Recommendations" + -+ depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && !DEVKMEM && !PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && !LEGACY_PTYS && !X86_X32 && !MODIFY_LDT_SYSCALL && GCC_PLUGINS ++ depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && !PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && !LEGACY_PTYS && !X86_X32 && !MODIFY_LDT_SYSCALL && GCC_PLUGINS && !IOMMU_DEFAULT_DMA_LAZY && !IOMMU_DEFAULT_PASSTHROUGH && IOMMU_DEFAULT_DMA_STRICT + + select BUG + select STRICT_KERNEL_RWX @@ -199,6 +199,10 @@ + select DEBUG_NOTIFIERS + select DEBUG_LIST + select DEBUG_SG ++ select HARDENED_USERCOPY if HAVE_HARDENED_USERCOPY_ALLOCATOR=y ++ select KFENCE if HAVE_ARCH_KFENCE && (!SLAB || SLUB) ++ select RANDOMIZE_KSTACK_OFFSET_DEFAULT if HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET && (INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION>=140000) ++ select SCHED_CORE if SCHED_SMT + select BUG_ON_DATA_CORRUPTION + select SCHED_STACK_END_CHECK + select SECCOMP if HAVE_ARCH_SECCOMP @@ -222,6 +226,7 @@ + select GCC_PLUGIN_STRUCTLEAK_BYREF_ALL + select GCC_PLUGIN_RANDSTRUCT + select GCC_PLUGIN_RANDSTRUCT_PERFORMANCE ++ select ZERO_CALL_USED_REGS if CC_HAS_ZERO_CALL_USED_REGS + + help + Search for GENTOO_KERNEL_SELF_PROTECTION_{X86_64, ARM64, X86_32, ARM} for dependency