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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221128191828.169197be@kernel.org>
Date:   Mon, 28 Nov 2022 19:18:28 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     <f.fainelli@...adcom.com>,
        Richard Cochran <richardcochran@...il.com>,
        "Arnd Bergmann" <arnd@...db.de>
Cc:     YueHaibing <yuehaibing@...wei.com>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <pabeni@...hat.com>, <arnd@...db.de>,
        <naresh.kamboju@...aro.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] net: broadcom: Add PTP_1588_CLOCK_OPTIONAL dependency
 for BCMGENET under ARCH_BCM2835

On Fri, 25 Nov 2022 19:50:03 +0800 YueHaibing wrote:
> commit 8d820bc9d12b ("net: broadcom: Fix BCMGENET Kconfig") fixes the build
> 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. However this may trigger a runtime failure.
> 
> Fix the original issue by propagating the PTP_1588_CLOCK_OPTIONAL dependency
> of BROADCOM_PHY down to BCMGENET.
> 
> Fixes: 8d820bc9d12b ("net: broadcom: Fix BCMGENET Kconfig")
> Fixes: 99addbe31f55 ("net: broadcom: Select BROADCOM_PHY for BCMGENET")
> Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
> Suggested-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  drivers/net/ethernet/broadcom/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
> index 55dfdb34e37b..f4ca0c6c0f51 100644
> --- a/drivers/net/ethernet/broadcom/Kconfig
> +++ b/drivers/net/ethernet/broadcom/Kconfig
> @@ -71,13 +71,14 @@ 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
>  	select BCM7XXX_PHY
>  	select MDIO_BCM_UNIMAC
>  	select DIMLIB
> -	select BROADCOM_PHY if (ARCH_BCM2835 && PTP_1588_CLOCK_OPTIONAL)
> +	select BROADCOM_PHY if ARCH_BCM2835
>  	help
>  	  This driver supports the built-in Ethernet MACs found in the
>  	  Broadcom BCM7xxx Set Top Box family chipset.

What's the code path that leads to the failure? I want to double check
that the driver is handling the PTP registration return codes correctly.
IIUC this is a source of misunderstandings in the PTP API.

Richard, here's the original report:
https://lore.kernel.org/all/CA+G9fYvKfbJHcMZtybf_0Ru3+6fKPg9HwWTOhdCLrOBXMaeG1A@mail.gmail.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ