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  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]
Date:   Sat, 16 Jan 2021 18:54:21 +0100
From:   Marek Vasut <>
To:     Arnd Bergmann <>
Cc:     Networking <>, Andrew Lunn <>,
        Arnd Bergmann <>,
        Heiner Kallweit <>,
        Jakub Kicinski <>,
        Lukas Wunner <>
Subject: Re: [PATCH net-next V2] net: ks8851: Fix mixed module/builtin build

On 1/16/21 6:04 PM, Arnd Bergmann wrote:
> On Sat, Jan 16, 2021 at 5:48 PM Marek Vasut <> wrote:
>> When either the SPI or PAR variant is compiled as module AND the other
>> variant is compiled as built-in, the following build error occurs:
>> arm-linux-gnueabi-ld: drivers/net/ethernet/micrel/ks8851_common.o: in function `ks8851_probe_common':
>> ks8851_common.c:(.text+0x1564): undefined reference to `__this_module'
>> Fix this by passing THIS_MODULE as argument to ks8851_probe_common(),
>> ks8851_register_mdiobus(), and ultimately __mdiobus_register() in the
>> ks8851_common.c.
>> Fixes: ef3631220d2b ("net: ks8851: Register MDIO bus and the internal PHY")
>> Signed-off-by: Marek Vasut <>
>> Cc: Andrew Lunn <>
>> Cc: Arnd Bergmann <>
>> Cc: Heiner Kallweit <>
>> Cc: Jakub Kicinski <>
>> Cc: Lukas Wunner <>
> I don't really like this version, as it does not actually solve the problem of
> linking the same object file into both vmlinux and a loadable module, which
> can have all kinds of side-effects besides that link failure you saw.
> If you want to avoid exporting all those symbols, a simpler hack would
> be to '#include "ks8851_common.c" from each of the two files, which
> then always duplicates the contents (even when both are built-in), but
> at least builds the file the correct way.

That's the same as V1, isn't it ?

Powered by blists - more mailing lists