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: <CY4PR12MB184516578554206588482E2ECF490@CY4PR12MB1845.namprd12.prod.outlook.com>
Date:   Fri, 7 Aug 2020 08:06:47 +0000
From:   EJ Hsu <ejh@...dia.com>
To:     Thierry Reding <thierry.reding@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: RE: [PATCH net] r8152: Use MAC address from correct device tree node

EJ Hsu wrote:

> From: Thierry Reding <treding@...dia.com>
> 
> Query the USB device's device tree node when looking for a MAC address.
> The struct device embedded into the struct net_device does not have a device
> tree node attached at all.
> 
> The reason why this went unnoticed is because the system where this was
> tested was one of the few development units that had its OTP programmed,
> as opposed to production systems where the MAC address is stored in a
> separate EEPROM and is passed via device tree by the firmware.
> 
> Reported-by: EJ Hsu <ejh@...dia.com>
> Fixes: acb6d3771a03 ("r8152: Use MAC address from device tree if available")
> Signed-off-by: Thierry Reding <treding@...dia.com>
> ---
>  drivers/net/usb/r8152.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index
> 7d39f998535d..2b02fefd094d 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -1504,7 +1504,7 @@ static int determine_ethernet_addr(struct r8152
> *tp, struct sockaddr *sa)
> 
>         sa->sa_family = dev->type;
> 
> -       ret = eth_platform_get_mac_address(&dev->dev, sa->sa_data);
> +       ret = eth_platform_get_mac_address(&tp->udev->dev, sa->sa_data);
>         if (ret < 0) {
>                 if (tp->version == RTL_VER_01) {
>                         ret = pla_ocp_read(tp, PLA_IDR, 8, sa->sa_data);
> --
> 2.27.0


Reviewed-by: EJ Hsu <ejh@...dia.com>

--nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ