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 51E0B158090 for ; Wed, 11 May 2022 16:54:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B15AE0920; Wed, 11 May 2022 16:54:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 77F9DE0920 for ; Wed, 11 May 2022 16:54:24 +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 5B499341266 for ; Wed, 11 May 2022 16:54:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BAD0F3B8 for ; Wed, 11 May 2022 16:54:21 +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: <1652288051.91e82d6ce6213596c5a31f96c3371cbe7167ea34.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:5.17 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: 91e82d6ce6213596c5a31f96c3371cbe7167ea34 X-VCS-Branch: 5.17 Date: Wed, 11 May 2022 16:54:21 +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: 46d70ead-87ed-485d-95e9-f145d96d8566 X-Archives-Hash: 59762873170f915612df0d6005136bae commit: 91e82d6ce6213596c5a31f96c3371cbe7167ea34 Author: Mike Pagano gentoo org> AuthorDate: Wed May 11 16:50:04 2022 +0000 Commit: Mike Pagano gentoo org> CommitDate: Wed May 11 16:54:11 2022 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=91e82d6c 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 Dropped deprecated option: !DEVKMEM 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 9843c3e2..77ae7dc1 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 08:37:26.685387031 -0400 ++++ b/Kconfig 2022-05-11 08:38:35.672171690 -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 12:43:39.114196110 -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,7 +199,11 @@ + select DEBUG_NOTIFIERS + select DEBUG_LIST + select DEBUG_SG ++ select HARDENED_USERCOPY if HAVE_HARDENED_USERCOPY_ALLOCATOR=y + select BUG_ON_DATA_CORRUPTION ++ 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 SCHED_STACK_END_CHECK + select SECCOMP if HAVE_ARCH_SECCOMP + select SECCOMP_FILTER if HAVE_ARCH_SECCOMP_FILTER @@ -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