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, 20 Dec 2019 14:27:25 -0500
From:   Vivien Didelot <vivien.didelot@...il.com>
To:     Baruch Siach <baruch@...s.co.il>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Marek BehĂșn <marek.behun@....cz>,
        netdev@...r.kernel.org, Baruch Siach <baruch@...s.co.il>,
        Denis Odintsov <d.odintsov@...viangames.com>
Subject: Re: [PATCH] net: dsa: mv88e6xxx: force cmode write on 6141/6341

Hi Baruch,

On Thu, 19 Dec 2019 11:48:22 +0200, Baruch Siach <baruch@...s.co.il> wrote:
> mv88e6xxx_port_set_cmode() relies on cmode stored in struct
> mv88e6xxx_port to skip cmode update when the requested value matches the
> cached value. It turns out that mv88e6xxx_port_hidden_write() might
> change the port cmode setting as a side effect, so we can't rely on the
> cached value to determine that cmode update in not necessary.
> 
> Force cmode update in mv88e6341_port_set_cmode(), to make
> serdes configuration work again. Other mv88e6xxx_port_set_cmode()
> callers keep the current behaviour.
> 
> This fixes serdes configuration of the 6141 switch on SolidRun Clearfog
> GT-8K.
> 
> Fixes: 7a3007d22e8 ("net: dsa: mv88e6xxx: fully support SERDES on Topaz family")
> Reported-by: Denis Odintsov <d.odintsov@...viangames.com>
> Signed-off-by: Baruch Siach <baruch@...s.co.il>

Andrew,

We tend to avoid caching values in the mv88e6xxx driver the more we can and
query the hardware instead to avoid errors like this. We can consider calling a
new mv88e6xxx_port_get_cmode() helper when needed (e.g. in higher level callers
like mv88e6xxx_serdes_power() and mv88e6xxx_serdes_irq_thread_fn()) and pass
the value down to the routines previously accessing chip->ports[port].cmode,
as a new argument. I can prepare a patch doing this. What do you think?


Thanks,

	Vivien

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ