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:   Sun, 13 Oct 2019 09:26:28 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     marex@...x.de
Cc:     netdev@...r.kernel.org, andrew@...n.ch, f.fainelli@...il.com,
        george.mccollister@...il.com, Tristram.Ha@...rochip.com,
        woojung.huh@...rochip.com
Subject: Re: [PATCH 2/2] net: dsa: microchip: Add shared regmap mutex

From: Marek Vasut <marex@...x.de>
Date: Sun, 13 Oct 2019 12:50:15 +0200

> On 10/13/19 2:21 AM, David Miller wrote:
>> From: David Miller <davem@...emloft.net>
>> Date: Sat, 12 Oct 2019 17:20:55 -0700 (PDT)
>> 
>>> From: Marek Vasut <marex@...x.de>
>>> Date: Thu, 10 Oct 2019 20:25:08 +0200
>>>
>>>> The KSZ driver uses one regmap per register width (8/16/32), each with
>>>> it's own lock, but accessing the same set of registers. In theory, it
>>>> is possible to create a race condition between these regmaps, although
>>>> the underlying bus (SPI or I2C) locking should assure nothing bad will
>>>> really happen and the accesses would be correct.
>>>>
>>>> To make the driver do the right thing, add one single shared mutex for
>>>> all the regmaps used by the driver instead. This assures that even if
>>>> some future hardware is on a bus which does not serialize the accesses
>>>> the same way SPI or I2C does, nothing bad will happen.
>>>>
>>>> Note that the status_mutex was unused and only initied, hence it was
>>>> renamed and repurposed as the regmap mutex.
>>>>
>>>> Signed-off-by: Marek Vasut <marex@...x.de>
>>>
>>> Applied.
>> 
>> Actually, both patches reverted.  Please test your changes properly:
>> 
>> ERROR: "ksz_regmap_unlock" [drivers/net/dsa/microchip/ksz8795_spi.ko] undefined!
>> ERROR: "ksz_regmap_lock" [drivers/net/dsa/microchip/ksz8795_spi.ko] undefined!
>> ERROR: "ksz_regmap_unlock" [drivers/net/dsa/microchip/ksz9477_spi.ko] undefined!
>> ERROR: "ksz_regmap_lock" [drivers/net/dsa/microchip/ksz9477_spi.ko] undefined!
>> ERROR: "ksz_regmap_unlock" [drivers/net/dsa/microchip/ksz9477_i2c.ko] undefined!
>> ERROR: "ksz_regmap_lock" [drivers/net/dsa/microchip/ksz9477_i2c.ko] undefined!
> 
> So the test is to compile it as a module ?

The test is to compile it in all relevant possible configurations.

As a module, statically, and with dependent modules both static and
modular as is relevant.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ