[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATfUzCXmCb5kKOJOKOw=CJvk7viGgYtrGLwbSAkq7VtyA@mail.gmail.com>
Date: Tue, 3 Jun 2025 01:18:25 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Alexey Gladkov <legion@...nel.org>
Cc: Petr Pavlu <petr.pavlu@...e.com>, Luis Chamberlain <mcgrof@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>, Daniel Gomez <da.gomez@...sung.com>,
Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas.schier@...ux.dev>,
linux-kernel@...r.kernel.org, linux-modules@...r.kernel.org,
linux-kbuild@...r.kernel.org
Subject: Re: [PATCH v3 3/6] modpost: Make mod_device_table aliases more unique
On Mon, Jun 2, 2025 at 11:04 PM Alexey Gladkov <legion@...nel.org> wrote:
>
> On Mon, Jun 02, 2025 at 07:58:41PM +0900, Masahiro Yamada wrote:
> > On Mon, Jun 2, 2025 at 5:07 PM Alexey Gladkov <legion@...nel.org> wrote:
> > >
> > > On Mon, Jun 02, 2025 at 04:45:36PM +0900, Masahiro Yamada wrote:
> > > > On Tue, May 27, 2025 at 6:08 PM Alexey Gladkov <legion@...nel.org> wrote:
> > > > >
> > > > > In order to avoid symbol conflicts if they appear in the same binary, a
> > > > > more unique alias identifier can be generated.
> > > >
> > > > Why must this be unique?
> > > >
> > > > What problem would happen if the same symbol names
> > > > appear in MODULE_DEVICE_TABLE()?
> > >
> > > Before these patches this was not a problem as non-unique characters are
> > > in separate object files when the module is compiled separately.
> > >
> > > But when the modules are compiled into the kernel, there is a symbol
> > > conflict when linking vmlinuz. We have modules that export multiple device
> > > tables from different object files.
> >
> > This is because the __mod_device_table__* symbols are global, but
> > I suspect they do not need to be.
> >
> > Let's test this
> > https://lore.kernel.org/lkml/20250602105539.392362-1-masahiroy@kernel.org/T/#u
>
> I tested this patch with the config:
>
> make allmodconfig
> make mod2yesconfig
>
> and it works.
Good.
Then, __COUNTER__ is unnecessary.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists