diff --git a/drivers/block/zram/zram_group/group_writeback.c b/drivers/block/zram/zram_group/group_writeback.c index 0956a2eb939a2b312fcc00a7a8325e99eedb24c7..5e78ba08ee12eaa07bf314b8b21feee4f8c56be8 100644 --- a/drivers/block/zram/zram_group/group_writeback.c +++ b/drivers/block/zram/zram_group/group_writeback.c @@ -8,7 +8,9 @@ #include #include #include +#ifdef CONFIG_HYPERHOLD_ZSWAPD #include +#endif #include "../zram_drv.h" #include "zram_group.h" diff --git a/fs/Kconfig b/fs/Kconfig index 62daaaf85830881cfddcb479932da97c229980a8..562a57bc7d04ade30fc778af4568e836faf7592f 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -51,7 +51,6 @@ source "fs/btrfs/Kconfig" source "fs/nilfs2/Kconfig" source "fs/f2fs/Kconfig" source "fs/zonefs/Kconfig" -source "fs/proc/memory_security/Kconfig" endif # BLOCK @@ -129,8 +128,6 @@ config FILE_LOCKING source "fs/crypto/Kconfig" -source "fs/code_sign/Kconfig" - source "fs/verity/Kconfig" source "fs/notify/Kconfig" diff --git a/fs/Makefile b/fs/Makefile index d04ef3afb7ffabc9b91aa8293753bcd50818b795..c27b2d72dbe3b4bc1fdedebc2d6fd0a738d12405 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -30,7 +30,7 @@ obj-$(CONFIG_USERFAULTFD) += userfaultfd.o obj-$(CONFIG_AIO) += aio.o obj-$(CONFIG_FS_DAX) += dax.o obj-$(CONFIG_FS_ENCRYPTION) += crypto/ -obj-$(CONFIG_SECURITY_CODE_SIGN) += code_sign/ +#obj-$(CONFIG_SECURITY_CODE_SIGN) += code_sign/ obj-$(CONFIG_FS_VERITY) += verity/ obj-$(CONFIG_FILE_LOCKING) += locks.o obj-$(CONFIG_BINFMT_MISC) += binfmt_misc.o diff --git a/fs/proc/Makefile b/fs/proc/Makefile index 04a0dd7256c29d512d4fcec4ea659bc357fe286b..63ebbe2134a3c161ff6af4257f05357cfa66b758 100644 --- a/fs/proc/Makefile +++ b/fs/proc/Makefile @@ -34,4 +34,6 @@ proc-$(CONFIG_PROC_VMCORE) += vmcore.o proc-$(CONFIG_PRINTK) += kmsg.o proc-$(CONFIG_PROC_PAGE_MONITOR) += page.o proc-$(CONFIG_BOOT_CONFIG) += bootconfig.o -obj-$(CONFIG_MEMORY_SECURITY) += memory_security/ +ifdef CONFIG_MEMORY_SECURITY + obj-$(CONFIG_MEMORY_SECURITY) += memory_security/ +endif diff --git a/fs/verity/fsverity_private.h b/fs/verity/fsverity_private.h index 095b5466767a5b77d6da55598bffd4c24080e348..c81bf6debafa9fae3b480b0c23c519ecc4018b77 100644 --- a/fs/verity/fsverity_private.h +++ b/fs/verity/fsverity_private.h @@ -12,7 +12,9 @@ #include #include +#ifdef CONFIG_SECURITY_XPM #include +#endif /* * Implementation limit: maximum depth of the Merkle tree. For now 8 is plenty; diff --git a/include/linux/hck/lite_hck_code_sign.h b/include/linux/hck/lite_hck_code_sign.h index cde82bc34ab1176d5ec50e6aea4dcab7e66f2f5f..aae4259d03157cbf31b3068fbb11adcf253158bf 100644 --- a/include/linux/hck/lite_hck_code_sign.h +++ b/include/linux/hck/lite_hck_code_sign.h @@ -6,7 +6,9 @@ #ifndef LITE_HCK_CODE_SIGN_H #define LITE_HCK_CODE_SIGN_H +#ifdef CONFIG_SECURITY_XPM #include +#endif #include #ifndef CONFIG_HCK diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 688ecee2f5655d029453b49e7f3bbdf394091c78..663b7cbf74bf8bf02a3bfb55c05d728226fd2ee5 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -21,8 +21,10 @@ #include #include #include +#ifdef CONFIG_HYPERHOLD_MEMCG #include #include +#endif struct mem_cgroup; struct obj_cgroup; diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 7264a43f8d18464037f2ac917ebedbb612c02ab2..01e94a718893faf8ecf072412ae8c7bee03c814f 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -19,7 +19,9 @@ #include #include #include +#ifdef CONFIG_SECURITY_XPM #include +#endif #include diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 3ed1e637e30f9a8d29822eb6751316c8fd983cc9..516af2d602080de9c058d24f3df24a85cdb7d6bc 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -512,8 +512,8 @@ PAGEFLAG(Checked, checked, PF_NO_COMPOUND) /* Used by some filesystems */ PAGEFLAG(XPMReadonly, xpm_readonly, PF_HEAD) PAGEFLAG(XPMWritetainted, xpm_writetainted, PF_HEAD) #else -PAGEFLAG_FALSE(XPMReadonly) -PAGEFLAG_FALSE(XPMWritetainted) +PAGEFLAG_FALSE(XPMReadonly, xpmreadonly) +PAGEFLAG_FALSE(XPMWritetainted, xpmwritetainted) #endif /* Xen */ @@ -641,7 +641,7 @@ PAGEFLAG_FALSE(VmemmapSelfHosted, vmemmap_self_hosted) #ifdef CONFIG_MEM_PURGEABLE PAGEFLAG(Purgeable, purgeable, PF_ANY) #else -PAGEFLAG_FALSE(Purgeable) +PAGEFLAG_FALSE(Purgeable, purgeable) #endif /* diff --git a/kernel/watchdog.c b/kernel/watchdog.c index c904872be06cc24993bd8cea0b08001eb5843e96..14a458b773a0ce356d6d10b37e7ac701e3ab182e 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -282,6 +282,7 @@ static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts); static DEFINE_PER_CPU(unsigned long, watchdog_report_ts); static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer); static DEFINE_PER_CPU(bool, softlockup_touch_sync); +static DEFINE_PER_CPU(unsigned int, watchdog_en); static unsigned long soft_lockup_nmi_warn; static int __init softlockup_panic_setup(char *str) diff --git a/mm/internal.h b/mm/internal.h index 4fe51c90a1e5d267919b1978a55c16bf2265a496..cc83953f8cf6814102ed6f07a11277c4512999c9 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -14,7 +14,9 @@ #include #include #include +#ifdef CONFIG_RECLAIM_ACCT #include +#endif struct folio_batch; diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e73a0df666da7c23fdfa2310e527181e42fb4161..9aa9948f79d4de09e35b24d85c876731aa8ece67 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -71,7 +71,9 @@ #include "swap.h" #include +#ifdef CONFIG_HYPERHOLD_ZSWAPD #include +#endif #include diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index ace4f004cdaa54041c3afdbd5d5220c0cf5d152f..5f7b409125fd2f3a01b6f4e5e959f3cbd7c559fb 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -35,7 +35,9 @@ #include #include #include +#ifdef CONFIG_HYPERHOLD_ZSWAPD #include +#endif #include diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 58ae2fe449896cc873cca798417a37941edcd9ec..c4d3cf5572bfc7b54dfb6574d2af0e418d86c651 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -51,7 +51,9 @@ #include #include #include +#ifdef CONFIG_HYPERHOLD_ZSWAPD #include +#endif #ifdef CONFIG_RECLAIM_ACCT #include #endif diff --git a/mm/rmap.c b/mm/rmap.c index d61242e91b121f7d7c0a2ce8e4af34f43491e2a7..37c15b83f79bc504b680a67097a8497855ed386f 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -75,7 +75,9 @@ #include #include #include +#ifdef CONFIG_MEM_PURGEABLE #include +#endif #include diff --git a/mm/swapfile.c b/mm/swapfile.c index 4ca5ad21d335b52c7e68a749918c707d01795c8b..0a577f85aea481cc19ec9f466d94be0d91d6afd6 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -46,7 +46,9 @@ #include #include #include +#ifdef CONFIG_HYPERHOLD_ZSWAPD #include +#endif #include "internal.h" #include "swap.h" diff --git a/mm/zswapd.c b/mm/zswapd.c index d80a00d9f1fd90b8571c0f45df2416f7712db03f..f44026692ef997b5a000e24779b50929f0894cfb 100644 --- a/mm/zswapd.c +++ b/mm/zswapd.c @@ -10,7 +10,9 @@ #include #include #include +#ifdef CONFIG_HYPERHOLD_ZSWAPD #include +#endif #ifdef CONFIG_RECLAIM_ACCT #include #endif diff --git a/mm/zswapd_control.c b/mm/zswapd_control.c index 340b6830619a439f0ddb8bf1a1ab3d831836830e..49a8dd44bf22a922580d4f4e8f4bb3b88b344a48 100644 --- a/mm/zswapd_control.c +++ b/mm/zswapd_control.c @@ -11,7 +11,9 @@ #include #include #include +#ifdef CONFIG_HYPERHOLD_ZSWAPD #include +#endif #include "zswapd_internal.h" diff --git a/security/Kconfig b/security/Kconfig index 89e5dbcb46e00c4addb74c42ec131d801cf6af08..52c9af08ad35d3d31995337d4643b26c015f75ca 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -193,9 +193,7 @@ source "security/loadpin/Kconfig" source "security/yama/Kconfig" source "security/safesetid/Kconfig" source "security/lockdown/Kconfig" -source "security/xpm/Kconfig" source "security/landlock/Kconfig" -source "security/container_escape_detection/Kconfig" source "security/integrity/Kconfig" diff --git a/security/Makefile b/security/Makefile index 1fbed3e27486a1782a1f8be1139172a1b541009a..f533f0f7ec26b80eb9c4bf766055aefe53b03da9 100644 --- a/security/Makefile +++ b/security/Makefile @@ -4,7 +4,9 @@ # obj-$(CONFIG_KEYS) += keys/ +ifdef CONFIG_SECURITY_CONTAINER_ESCAPE_DETECTION subdir-$(CONFIG_SECURITY_CONTAINER_ESCAPE_DETECTION) += container_escape_detection +endif # always enable default capabilities obj-y += commoncap.o @@ -24,9 +26,13 @@ obj-$(CONFIG_SECURITY_SAFESETID) += safesetid/ obj-$(CONFIG_SECURITY_LOCKDOWN_LSM) += lockdown/ obj-$(CONFIG_CGROUPS) += device_cgroup.o obj-$(CONFIG_BPF_LSM) += bpf/ +ifdef CONFIG_SECURITY_XPM obj-$(CONFIG_SECURITY_XPM) += xpm/ +endif obj-$(CONFIG_SECURITY_LANDLOCK) += landlock/ +ifdef CONFIG_SECURITY_CONTAINER_ESCAPE_DETECTION obj-$(CONFIG_SECURITY_CONTAINER_ESCAPE_DETECTION) += container_escape_detection/ +endif # Object integrity file lists obj-$(CONFIG_INTEGRITY) += integrity/