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]
Date:   Fri, 12 Jan 2018 09:54:02 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     niklas.cassel@...s.com, David Miller <davem@...emloft.net>,
        Russell King <rmk+kernel@....linux.org.uk>,
        Florian Fainelli <f.fainelli@...il.com>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: Have __phy_modify return 0 on success

Hi Andrew,

On Thu, Jan 11, 2018 at 9:55 PM, Andrew Lunn <andrew@...n.ch> wrote:
> __phy_modify would return the old value of the register before it was
> modified. Thus on success, it does not return 0, but a positive value.
> Thus functions using phy_modify, which is a wrapper around
> __phy_modify, can start returning > 0 on success, rather than 0. As a
> result, breakage has been noticed in various places, where 0 was
> assumed.
>
> Code inspection does not find any current location where the return of
> the old value is currently used. So have __phy_modify return 0 on
> success. When there is a real need for the old value, either a new
> accessor can be added, or an additional parameter passed.
>
> Fixes: 2b74e5be17d2 ("net: phy: add phy_modify() accessor")
> Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
> ---
>
> Geert, Niklas
>
> Please can you test this and let me know if it fixes the problems you
> see.

Yes it does, thanks!

Tested-by: Geert Uytterhoeven <geert+renesas@...der.be>

I'm a bit worried about users already relying on the new return value, though.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists