代码注释有点少, 无法体现KABI兼容思路与驱动的使用约束;
兼容补丁基于下面设计约束进行设计: 内核KABI白名单主要是为第3方驱动提供稳定的运行环境; 因此fpu, task_thread, 中断数据结构内部成员, 禁止驱动代码使用; 已经排查过driver目录确实没有驱动使用的情况; 基于上面约束, 因此当前fix kabi的补丁仅是避免了检查工具的误报;
另外一种解决思路: 直接修改kabi CRC计算工具, 将特定数据结构的CRC值清除; 同时需要在编译阶段检查驱动没有使用特定的数据结构成员;
-----Original Message----- From: Zhengzengkai Sent: Saturday, October 22, 2022 3:39 PM To: kernel@openeuler.org Cc: Xiexiuqi xiexiuqi@huawei.com; Zhoukang (A) zhoukang7@huawei.com; jason.zeng@intel.com; lin.x.wang@intel.com; jun.j.tian@intel.com; Dukaitian (Dukaitian, Intelligent Computing R&D) dukaitian@huawei.com; Zhengzengkai zhengzengkai@huawei.com Subject: [PATCH openEuler-5.10 0/4] Try to fix kabi change caused by Intel AMX
These four patches try to avoid or fix kabi change caused by Intel AMX PR: https://gitee.com/openeuler/kernel/pulls/58
Zheng Zengkai (4): x86: Avoid kabi change caused by adding pkru element in thread_struct x86/extable: Avoid kabi change caused by exception table rework x86/fpu: Avoid kabi change caused by struct fpu mm: Fix kabi change caused by saved_auxv[] in mm_struct for x86_64
arch/x86/include/asm/extable.h | 4 ++++ arch/x86/include/asm/fpu/types.h | 4 ++++ arch/x86/include/asm/processor.h | 2 ++ arch/x86/include/uapi/asm/auxvec.h | 1 + include/linux/mm_types.h | 15 +++++++++++++++ 5 files changed, 26 insertions(+)