From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Fri, 21 Aug 2026 18:42:29 +0200 Subject: [Devel] [PATCH RHEL10 COMMIT] redhat: rh_waived: add a stub for CONFIG_RHEL_DIFFERENCES=n In-Reply-To: <20260821163718.187766-31-khorenko@virtuozzo.com> Message-ID: <202608211642.67LGgTxa668550@f0.sw.ru> List-Id: The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git after rh10-6.12.0-211.39.1.16.6.vz10 ------> commit 01feec3c519a85a9979fdbed970138ebd312c26c Author: Konstantin Khorenko Date: Fri Aug 21 18:37:16 2026 +0200 redhat: rh_waived: add a stub for CONFIG_RHEL_DIFFERENCES=n 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 8ec7aabab3ab7..e6aab88182411 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 */