RE: [PATCH] EDAC, i10nm: make skx_common.o a separate module
From: Zhuo, Qiuxu
Date: Mon Jun 03 2024 - 09:04:58 EST
> From: Arnd Bergmann <arnd@xxxxxxxx>
> [ ...]
> A particularly bad case happens when one of the two is built-in while the
> other one is a loadable module. In this case, the module infrastructure
> assumes it's always built-in, which can mess up e.g. __exit annotations and
> THIS_MODULE references.
Hi Arnd,
Thanks for looking into this.
I re-verified the following configuration w/o your patch, it worked well, and I didn't see
__exit annotations and THIS_MODULE references got messed up.
This was because skx_common.o was built into separate two copied texts
(one is built-in, and the other is in the module).
1. Kernel configuration (one built-in, one module)
CONFIG_EDAC_SKX=y
CONFIG_EDAC_I10NM=m
2. Build OK.
Loaded/unloaded i10nm_edac.ko on an Intel Sapphire Rapids server successfully.
3. Symbol in skx_common.o example:
[root@fl31ca103as0104 ~]# cat /proc/kallsyms | grep skx_adxl_put
ffffffff832c7da0 T skx_adxl_put <--- symbol in built-in kernel
ffffffffc094a350 t skx_adxl_put [i10nm_edac] <--- symbol in 'i10nm_edac.ko' module
Thanks!
-Qiuxu