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] [day] [month] [year] [list]
Date:   Fri, 8 Apr 2022 09:30:02 +0100
From:   "Russell King (Oracle)" <linux@...linux.org.uk>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH RFC net-next] net: dsa: b53: convert to phylink_pcs

On Thu, Apr 07, 2022 at 03:55:35PM -0700, Florian Fainelli wrote:
> On 4/6/22 08:06, Russell King (Oracle) wrote:
> > Convert B53 to use phylink_pcs for the serdes rather than hooking it
> > into the MAC-layer callbacks.
> > 
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> > ---
> > Hi Florian,
> > 
> > Please can you test this patch? Thanks.
> 
> Did not spend much time debugging this as I had to do something else but
> here is what I got:
> 
> [    1.909223] b53-srab-switch 18036000.ethernet-switch: SerDes lane 0,
> model: 1, rev B0 (OUI: 0x0143bff0)
> [    1.918956] 8<--- cut here ---
> [    1.922119] Unable to handle kernel NULL pointer dereference at virtual
> address 0000012c

Thanks - it looks like the problem is dev->port has not been allocated
at the point where b53_serdes_init is called, causing this null pointer
deref. It's allocated in b53_switch_register(), which is also where the
driver works out how many ports there are.

I don't see an easy way to allocate this array earlier... so, where can
we save a pointer to the PCS. I guess as this is specific to srab, we
could put it in struct b53_srab_port_priv - but then we'll need
b53_phylink_mac_select_pcs() to call into the e.g. the srab layer.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ