[Devel] [PATCH vz10 30/32] redhat: rh_waived: add a stub for CONFIG_RHEL_DIFFERENCES=n

Konstantin Khorenko khorenko at virtuozzo.com
Fri Aug 21 19:37:16 MSK 2026


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 <khorenko at virtuozzo.com>
---
 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



More information about the Devel mailing list