From: "Arnd Bergmann" <arnd@arndb.de>
To: "Tony Luck" <tony.luck@intel.com>,
"Arnd Bergmann" <arnd@kernel.org>,
"Borislav Petkov" <bp@alien8.de>,
"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>
Cc: "James Morse" <james.morse@arm.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Robert Richter" <rric@kernel.org>,
"Marvin Lin" <milkfafa@gmail.com>,
"Shubhrajyoti Datta" <shubhrajyoti.datta@amd.com>,
"Sai Krishna Potthuri" <sai.krishna.potthuri@amd.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EDAC, i10nm: make skx_common.o a separate module
Date: Wed, 29 May 2024 18:21:44 +0200 [thread overview]
Message-ID: <e526fbec-5fc6-4778-b46d-608744a4d7f6@app.fastmail.com> (raw)
In-Reply-To: <SJ1PR11MB60838B76940188104D57E53FFCF22@SJ1PR11MB6083.namprd11.prod.outlook.com>
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
next prev parent reply other threads:[~2024-05-29 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 9:51 Arnd Bergmann
2024-05-29 16:14 ` Luck, Tony
2024-05-29 16:21 ` Arnd Bergmann [this message]
2024-05-29 18:27 ` Luck, Tony
2024-06-03 13:02 ` Zhuo, Qiuxu
2024-05-29 19:31 ` Borislav Petkov
2024-05-29 19:55 ` Arnd Bergmann
2024-05-29 20:09 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e526fbec-5fc6-4778-b46d-608744a4d7f6@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=milkfafa@gmail.com \
--cc=qiuxu.zhuo@intel.com \
--cc=rric@kernel.org \
--cc=sai.krishna.potthuri@amd.com \
--cc=shubhrajyoti.datta@amd.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®