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: <20220113202150.3a241d71@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date:   Thu, 13 Jan 2022 20:21:50 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     <netdev@...r.kernel.org>, <davem@...emloft.net>,
        <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH] net: apple: bmac: Fix build since dev_addr
 constification

On Fri, 14 Jan 2022 14:13:16 +1100 Michael Ellerman wrote:
> Since commit adeef3e32146 ("net: constify netdev->dev_addr") the bmac
> driver no longer builds with the following errors (pmac32_defconfig):
> 
>   linux/drivers/net/ethernet/apple/bmac.c: In function ‘bmac_probe’:
>   linux/drivers/net/ethernet/apple/bmac.c:1287:20: error: assignment of read-only location ‘*(dev->dev_addr + (sizetype)j)’
>    1287 |   dev->dev_addr[j] = rev ? bitrev8(addr[j]): addr[j];
>         |                    ^
> 
> Fix it by making the modifications to a local macaddr variable and then
> passing that to eth_hw_addr_set().
> 
> We don't use the existing addr variable because the bitrev8() would
> mutate it, but it is already used unreversed later in the function.
> 
> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>

Reviewed-by: Jakub Kicinski <kuba@...nel.org>

Thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ