lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e526fbec-5fc6-4778-b46d-608744a4d7f6@app.fastmail.com>
Date: Wed, 29 May 2024 18:21:44 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Tony Luck" <tony.luck@...el.com>, "Arnd Bergmann" <arnd@...nel.org>,
 "Borislav Petkov" <bp@...en8.de>, "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
Cc: "James Morse" <james.morse@....com>,
 "Mauro Carvalho Chehab" <mchehab@...nel.org>,
 "Robert Richter" <rric@...nel.org>, "Marvin Lin" <milkfafa@...il.com>,
 "Shubhrajyoti Datta" <shubhrajyoti.datta@....com>,
 "Sai Krishna Potthuri" <sai.krishna.potthuri@....com>,
 "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] EDAC, i10nm: make skx_common.o a separate module

On Wed, May 29, 2024, at 18:14, Luck, Tony wrote:
>> Linking an object file into multiple modules causes a warning:
>>
>> scripts/Makefile.build:236: drivers/edac/Makefile: skx_common.o is added to multiple modules: i10nm_edac skx_edac
>
> In this case there is no practical problem from this double link. The 
> two modules created: skx_edac.ko and i10nm_edac.ko
> are mutually exclusive. A system may load neither, either, but not both 
> (enforced by the x86_match_cpu() check in each
> modules init function).

One of the problems here is that each compilation unit implicitly
knows the name of the module it gets linked into, via the
KBUILD_MODNAME macro. If it gets linked twice, the macro is
wrong for at least one of the two, and this can lead to
incorrect printk formats and other macro expansions using
that as an identifier.

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.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ