From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Fri, 21 Aug 2026 18:37:16 +0200 Subject: [Devel] [PATCH vz10 30/32] redhat: rh_waived: add a stub for CONFIG_RHEL_DIFFERENCES=n In-Reply-To: <20260821163718.187766-1-khorenko@virtuozzo.com> References: <20260821163718.187766-1-khorenko@virtuozzo.com> Message-ID: <20260821163718.187766-31-khorenko@virtuozzo.com> List-Id: is_rh_waived() is compiled as part of kernel/rh_waived.c, which is built only with CONFIG_RHEL_DIFFERENCES, but huge_pmd_unshare() calls it unconditionally, so a kernel built without that option does not link: ld: vmlinux.o: in function 'huge_pmd_unshare': undefined reference to 'is_rh_waived' x86_64 defconfig is one such kernel. Add a stub returning false: with no way to pass rh_waived= there is nothing waived, so every mitigation stays enabled. Fixes: 9f055df11343 ("rh10: import RHEL10 kernel-6.12.0-211.16.1.el10") Feature: fix rh/waived https://virtuozzo.atlassian.net/browse/VSTOR-134732 Signed-off-by: Konstantin Khorenko --- include/linux/rh_waived.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/rh_waived.h b/include/linux/rh_waived.h index 8ec7aabab3ab..e6aab8818241 100644 --- a/include/linux/rh_waived.h +++ b/include/linux/rh_waived.h @@ -15,6 +15,13 @@ enum rh_waived_items { RH_WAIVED_ITEMS, }; +#ifdef CONFIG_RHEL_DIFFERENCES bool is_rh_waived(enum rh_waived_items feat); +#else +static inline bool is_rh_waived(enum rh_waived_items feat) +{ + return false; +} +#endif #endif /* _RH_WAIVED_H */ -- 2.47.1