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:   Fri, 25 Nov 2022 11:02:19 +0100
From:   "Arnd Bergmann" <>
To:     "Naresh Kamboju" <>,
        "Greg Kroah-Hartman" <>,
        YueHaibing <>
        "Linus Torvalds" <>,
        "Andrew Morton" <>,
        "Guenter Roeck" <>,,,,
        "Pavel Machek" <>,
        "Jon Hunter" <>,
        "Florian Fainelli" <>,
        "Sudip Mukherjee" <>,,,
        Netdev <>,
        "David S . Miller" <>,
        "Eric Dumazet" <>,
        "Jakub Kicinski" <>,
        "Paolo Abeni" <>,
        Daniel Díaz <>
Subject: Re: [PATCH 5.10 000/149] 5.10.156-rc1 review

On Fri, Nov 25, 2022, at 09:05, Naresh Kamboju wrote:
> On Fri, 25 Nov 2022 at 12:57, Greg Kroah-Hartman <> wrote:
>> On Thu, Nov 24, 2022 at 09:17:36PM +0530, Naresh Kamboju wrote:
>> >
>> > Daniel bisected this reported problem and found the first bad commit,
>> >
>> > YueHaibing <>
>> >     net: broadcom: Fix BCMGENET Kconfig
>> But that is in 5.10.155, 5.15.79, 6.0.9, and 6.1-rc5.  It is not new to
>> this -rc release.
> It started from 5.10.155 and this is only seen on 5.10 and other
> branches 5.15, 6.0 and mainline are looking good.

I think the original patch is wrong and should be fixed upstream.
The backported patch in question is a one-line Kconfig change doing

diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
index f4e1ca68d831..55dfdb34e37b 100644
--- a/drivers/net/ethernet/broadcom/Kconfig
+++ b/drivers/net/ethernet/broadcom/Kconfig
@@ -77,7 +77,7 @@ config BCMGENET
        select BCM7XXX_PHY
        select MDIO_BCM_UNIMAC
        select DIMLIB
-       select BROADCOM_PHY if ARCH_BCM2835
+       select BROADCOM_PHY if (ARCH_BCM2835 && PTP_1588_CLOCK_OPTIONAL)
          This driver supports the built-in Ethernet MACs found in the
          Broadcom BCM7xxx Set Top Box family chipset.

which fixes the build on kernels that contain 99addbe31f55 ("net:
broadcom: Select BROADCOM_PHY for BCMGENET") and enable
BCMGENET=y but PTP_1588_CLOCK_OPTIONAL=m, which otherwise
leads to a link failure.

The patch unfortunately solves it by replacing it with a runtime
failure by no longer linking in the PHY driver (as found by Naresh).

I think the correct fix would be to propagate the dependency down

diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
index f4e1ca68d831..f4ca0c6c0f51 100644
--- a/drivers/net/ethernet/broadcom/Kconfig
+++ b/drivers/net/ethernet/broadcom/Kconfig
@@ -71,6 +71,7 @@ config BCM63XX_ENET
 config BCMGENET
 	tristate "Broadcom GENET internal MAC support"
 	depends on HAS_IOMEM
+	depends on PTP_1588_CLOCK_OPTIONAL || !ARCH_BCM2835
 	select MII
 	select PHYLIB
 	select FIXED_PHY

With this change, the broken config is no longer possible, instead
forcing BCMGENET to be =m when building for ARCH_BCM2835 with


Powered by blists - more mailing lists