From: Pu Lehui <pulehui@huawei.com> hulk inclusion category: feature bugzilla: https://atomgit.com/openeuler/kernel/issues/8335 CVE: NA -------------------------------- When backporting resilient split BTF, we need to add the members `unsigned int btf_base_data_size` and `void *btf_base_data` to the struct module. According to the layout of the struct module shown below, we can use KABI_FILE_HOLE to fill `unsigned int btf_base_data_size` and use the reserved space with KABI_USE to handle the rest. Additionally, since CONFIG_DEBUG_INFO_BTF_MODULES has been re-enabled, we can remove the unused KABI_DEPRECATE. struct module { ... /* --- cacheline 17 boundary (1088 bytes) --- */ unsigned int btf_data_size; /* 1088 4 */ /* XXX 4 bytes hole, try to pack */ void * btf_data; /* 1096 8 */ struct jump_entry * jump_entries; /* 1104 8 */ ... } Fixes: de93c21fa0f7 ("[Backport] module, bpf: Store BTF base pointer in struct module") Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Luo Gengkun <luogengkun2@huawei.com> --- include/linux/module.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 96f1a88b69c7..af0d31ecd36c 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -517,12 +517,8 @@ struct module { #endif #ifdef CONFIG_DEBUG_INFO_BTF_MODULES unsigned int btf_data_size; - unsigned int btf_base_data_size; + KABI_FILL_HOLE(unsigned int btf_base_data_size) void *btf_data; - void *btf_base_data; -#else - KABI_DEPRECATE(unsigned int, btf_data_size) - KABI_DEPRECATE(void *, btf_data) #endif #ifdef CONFIG_JUMP_LABEL struct jump_entry *jump_entries; @@ -609,7 +605,11 @@ struct module { #ifdef CONFIG_DYNAMIC_DEBUG_CORE struct _ddebug_info dyndbg_info; #endif +#ifdef CONFIG_DEBUG_INFO_BTF_MODULES + KABI_USE(1, void *btf_base_data) +#else KABI_RESERVE(1) +#endif KABI_RESERVE(2) KABI_RESERVE(3) KABI_RESERVE(4) -- 2.34.1