不建议所有的KABI变更(不论是否SPR相关的补丁)都用直接加__GENKSYMS__宏的方式规避KABI变更。

这组补丁的意图是想让Intel一起评估下这样改的收益和风险,说白了是否值得?

或者说有没有更好的思路?







郑增凯 Zheng Zengkai
Mobile: +86-50000020998(For Welink,eSpace Calls)
Email: zhengzengkai@huawei.com

发件人:Tian, Jun J <jun.j.tian@intel.com>
收件人:Zhoukang (A) <zhoukang7@huawei.com>;Zhengzengkai <zhengzengkai@huawei.com>;kernel <kernel@openeuler.org>
抄 送:Xiexiuqi <xiexiuqi@huawei.com>;Zeng, Jason <jason.zeng@intel.com>;Wang, Lin X <lin.x.wang@intel.com>;Dukaitian (Dukaitian, Intelligent Computing R&D) <dukaitian@huawei.com>;Huxinwei <huxinwei@huawei.com>;Hushiyuan <hushiyuan@huawei.com>;Xuhanbing <xuhanbing@huawei.com>
时 间:2022-10-24 15:42:04
主 题:RE: [PATCH openEuler-5.10 0/4] Try to fix kabi change caused by Intel AMX

目前看为了统一KABI的检查,最好还是利用__GENKSYMS__包含对应已有修改的kernel struct和ABI。
这样防止SPR代码合并后check-kabi持续误报的问题,我们也会对SPR相应的KABI change的部分统一
通过这个方式处理以保持一致。当然前提是大家已经审视过SPR相应change并没有被引用或者影响可控。

修改KABI CRC工具未来也可能造成其他潜在问题,比如不参与checksum检查的KABI未来可能有
第三方module会引用。

Thanks,
Jun Tian

> -----Original Message-----
> From: Zhoukang (A) <zhoukang7@huawei.com>
> Sent: Saturday, October 22, 2022 3:54 PM
> To: Zhengzengkai <zhengzengkai@huawei.com>; kernel@openeuler.org
> Cc: Xiexiuqi <xiexiuqi@huawei.com>; Zeng, Jason <jason.zeng@intel.com>;
> Wang, Lin X <lin.x.wang@intel.com>; Tian, Jun J <jun.j.tian@intel.com>;
> Dukaitian (Dukaitian, Intelligent Computing R&D) <dukaitian@huawei.com>;
> Huxinwei <huxinwei@huawei.com>; Hushiyuan <hushiyuan@huawei.com>;
> Xuhanbing <xuhanbing@huawei.com>
> Subject: RE: [PATCH openEuler-5.10 0/4] Try to fix kabi change caused by Intel
> AMX
>
> 代码注释有点少, 无法体现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(+)
>
> --
> 2.20.1