diff options
author | Mike Pagano <mpagano@gentoo.org> | 2022-05-11 13:25:52 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2022-05-11 13:39:49 -0400 |
commit | ff2113050f76160860097c55d73a4e0f73b4aafe (patch) | |
tree | 2a63d54eab8a638b784aad3d164b1b9b64627027 | |
parent | Add genpatches (diff) | |
download | linux-patches-5.18-1.tar.gz linux-patches-5.18-1.tar.bz2 linux-patches-5.18-1.zip |
Update Gentoo Hardened patchset based on KSPP thanks to Peter Bo5.18-1
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 <mpagano@gentoo.org>
-rw-r--r-- | 4567_distro-Gentoo-Kconfig.patch | 17 |
1 files 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 |