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:   Mon, 15 Nov 2021 19:28:14 +0100
From:   Hauke Mehrtens <hauke@...ke-m.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org,
        Vladimir Oltean <vladimir.oltean@....com>
Cc:     stable@...r.kernel.org, Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.14 309/849] net: dsa: lantiq_gswip: serialize access to
 the PCE table

On 11/15/21 5:56 PM, Greg Kroah-Hartman wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> [ Upstream commit 49753a75b9a32de4c0393bb8d1e51ea223fda8e4 ]
> 
> Looking at the code, the GSWIP switch appears to hold bridging service
> structures (VLANs, FDBs, forwarding rules) in PCE table entries.
> Hardware access to the PCE table is non-atomic, and is comprised of
> several register reads and writes.
> 
> These accesses are currently serialized by the rtnl_lock, but DSA is
> changing its driver API and that lock will no longer be held when
> calling ->port_fdb_add() and ->port_fdb_del().
> 
> So this driver needs to serialize the access to the PCE table using its
> own locking scheme. This patch adds that.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
> Acked-by: Hauke Mehrtens <hauke@...ke-m.de>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>   drivers/net/dsa/lantiq_gswip.c | 28 +++++++++++++++++++++++-----
>   1 file changed, 23 insertions(+), 5 deletions(-)

Hi Greg and Vladimir,

I understood this is only needed when we apply the complete patch series 
from Vladimir. This would only be needed when we also apply this patch:
 > commit 5cdfde49a07f38663c277ddf2e56345ea1706fc2
 > Author: Vladimir Oltean <vladimir.oltean@....com>
 > Date:   Fri Oct 22 21:43:10 2021 +0300
 >
 >     net: dsa: drop rtnl_lock from dsa_slave_switchdev_event_work
This was added in v5.16-rc1.

Without this patch the sections are protected by rtnl_lock().


Hauke

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ