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: <CAMj1kXEtLx_5_Hyuk=nU6PhnYZm3F33uWGiRHH2Yb3X2ENxRSw@mail.gmail.com>
Date:   Mon, 19 Oct 2020 08:30:45 +0200
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Ilias Apalodimas <ilias.apalodimas@...aro.org>
Cc:     Andrew Lunn <andrew@...n.ch>,
        "open list:BPF JIT for MIPS (32-BIT AND 64-BIT)" 
        <netdev@...r.kernel.org>, Jassi Brar <jaswinder.singh@...aro.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Willy Liu <willy.liu@...ltek.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Masahisa Kojima <masahisa.kojima@...aro.org>,
        Serge Semin <fancer.lancer@...il.com>
Subject: Re: [PATCH net] netsec: ignore 'phy-mode' device property on ACPI systems

On Sun, 18 Oct 2020 at 22:32, Ilias Apalodimas
<ilias.apalodimas@...aro.org> wrote:
>
> On Sun, Oct 18, 2020 at 07:52:18PM +0200, Andrew Lunn wrote:
> > > --- a/Documentation/devicetree/bindings/net/socionext-netsec.txt
> > > +++ b/Documentation/devicetree/bindings/net/socionext-netsec.txt
> > > @@ -30,7 +30,9 @@ Optional properties: (See ethernet.txt file in the same directory)
> > >  - max-frame-size: See ethernet.txt in the same directory.
> > >
> > >  The MAC address will be determined using the optional properties
> > > -defined in ethernet.txt.
> > > +defined in ethernet.txt. The 'phy-mode' property is required, but may
> > > +be set to the empty string if the PHY configuration is programmed by
> > > +the firmware or set by hardware straps, and needs to be preserved.
> >
> > In general, phy-mode is not mandatory. of_get_phy_mode() does the
> > right thing if it is not found, it sets &priv->phy_interface to
> > PHY_INTERFACE_MODE_NA, but returns -ENODEV. Also, it does not break
> > backwards compatibility to convert a mandatory property to
> > optional. So you could just do
> >
> >       of_get_phy_mode(pdev->dev.of_node, &priv->phy_interface);
> >
> > skip all the error checking, and document it as optional.
>
> Why ?
> The patch as is will not affect systems built on any firmware implementations
> that use ACPI and somehow configure the hardware.
> Although the only firmware implementations I am aware of on upsteream are based
> on EDK2, I prefer the explicit error as is now, in case a firmware does on
> initialize the PHY properly (and is using a DT).
>

We will also lose the ability to report bogus values for phy-mode this
way, so I think we should stick with the check.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ