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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Oct 2022 14:24:47 +0200
From:   Christian Marangi <ansuelsmth@...il.com>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Pawel Dembicki <paweldembicki@...il.com>,
        Lech Perczak <lech.perczak@...il.com>
Subject: Re: [net PATCH 1/2] net: dsa: qca8k: fix inband mgmt for big-endian
 systems

On Wed, Oct 12, 2022 at 10:24:11AM +0300, Vladimir Oltean wrote:
> On Mon, Oct 10, 2022 at 02:44:46PM +0200, Christian Marangi wrote:
> > On Mon, Oct 10, 2022 at 08:53:01PM +0200, Andrew Lunn wrote:
> > > >  /* Special struct emulating a Ethernet header */
> > > >  struct qca_mgmt_ethhdr {
> > > > -	u32 command;		/* command bit 31:0 */
> > > > -	u32 seq;		/* seq 63:32 */
> > > > -	u32 mdio_data;		/* first 4byte mdio */
> > > > +	__le32 command;		/* command bit 31:0 */
> > > > +	__le32 seq;		/* seq 63:32 */
> > > > +	__le32 mdio_data;		/* first 4byte mdio */
> > > >  	__be16 hdr;		/* qca hdr */
> > > >  } __packed;
> > > 
> > > It looks odd that hdr is BE while the rest are LE. Did you check this?
> > > 
> > >    Andrew
> > 
> > Yes we did many test to analyze this and I just checked with some
> > tcpdump that the hdr is BE everytime. If you want I can provide you some
> > tcpdump from 2 different systems.
> > 
> > Anyway it looks like this family switch treats the hdr in a standard way
> > with the network byte order and for anything else stick to LE.
> > 
> > Also as a side note the tagger worked correctly before the mgmt feature
> > on BE systems and also works correctly now... just any command is slow
> > as the mgmt system has to timeout and fallback to legacy mdio.
> 
> Could you provide a tcpdump?

Hi, this [0] is the zip with all the tcpdump.
The main packet to check are the one that are 60 in lenght and > 170 in
length for the autocast mib. I added both LE and BE and for BE I added
the broken and the correct one.

As you notice without following this endianess madness, the switch
doesn't answer to any request.

Hope the dump are not too bloated to understand this problem.

[0] https://we.tl/t-ZpXVObTIh0

-- 
	Ansuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ