From: Sabrina Dubroca sdubroca@redhat.com
redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option
When the kABI macros were copied from the RHEL kernel to ARK, the RH_KABI_SIZE_ALIGN_CHECKS config option was dropped. Without it, the size checks included in some of the kABI macros can't be enabled.
Add the KABI_SIZE_ALIGN_CHECKS config option, enable it on regular ARK configs, and disable it for debug and kgcov kernels.
Signed-off-by: Sabrina Dubroca sdubroca@redhat.com
diff --git a/Kconfig.redhat b/Kconfig.redhat index blahblah..blahblah 100644 --- a/Kconfig.redhat +++ b/Kconfig.redhat @@ -14,4 +14,13 @@ config RHEL_DIFFERENCES
Unless you want a restricted kernel, say N here.
+config RH_KABI_SIZE_ALIGN_CHECKS + bool "Enables more stringent kabi checks in the macros" + depends on RHEL_DIFFERENCES + default y + help + This option enables more stringent kabi checks. Those must + be disabled in case of a debug build, because debug builds + allow to change struct sizes. + endmenu diff --git a/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set diff --git a/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y diff --git a/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set diff --git a/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619