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] [day] [month] [year] [list]
Message-Id: <d2f80c97-55ab-4aac-a546-2d53ce29dd42@app.fastmail.com>
Date: Wed, 10 Dec 2025 14:58:58 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Marc Kleine-Budde" <mkl@...gutronix.de>
Cc: "Vincent Mailhol" <mailhol@...nel.org>, "Arnd Bergmann" <arnd@...nel.org>,
 "Oliver Hartkopp" <socketcan@...tkopp.net>,
 "Jimmy Assarsson" <extja@...ser.com>, linux-can@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: can: fix build dependency

On Wed, Dec 10, 2025, at 10:38, Marc Kleine-Budde wrote:
> On 10.12.2025 10:10:27, Arnd Bergmann wrote:
>> On Wed, Dec 10, 2025, at 09:16, Marc Kleine-Budde wrote:
>>
>> Sorry I forgot to reply here: the '&& CAN' is absolutely
>> required here, otherwise you can configure CAN device drivers
>> as built-in with CAN_DEV=y CAN=m, and that results in a
>> link failure.
>
> You mean:
>
> | $ grep ^CONFIG_CAN .config
> | CONFIG_CAN=m
> | CONFIG_CAN_RAW=m
> | CONFIG_CAN_BCM=m
> | CONFIG_CAN_GW=m
> | CONFIG_CAN_DEV=y
> | CONFIG_CAN_VXCAN=y
> | CONFIG_CAN_NETLINK=y
> | CONFIG_CAN_CALC_BITTIMING=y
> | CONFIG_CAN_RX_OFFLOAD=y
> | CONFIG_CAN_DUMMY=y
> | CONFIG_CAN_GS_USB=y

Yes, I'm pretty sure I saw link failures with configurations
like this one.

> ...which works for me.

Looking at a random exported symbol from can_dev.ko, I see

obj-$(CONFIG_CAN) += can-dev.o
drivers/net/can/dev/dev.c:EXPORT_SYMBOL(can_hwtstamp_get);
drivers/net/can/usb/gs_usb.c:           return can_hwtstamp_get(netdev, cfg);

so in the configuration you list above, can-dev.ko is a
loadable module that exports can_hwtstamp_get, while gs_usb.o
is built-in and unable to link to that symbol.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ