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]
Message-ID: <d93143c8-5fda-70e1-8dd9-8350c6820e56@gmail.com>
Date:   Tue, 7 Dec 2021 08:38:09 +0100
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Hayes Wang <hayeswang@...ltek.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        nic_swsd <nic_swsd@...ltek.com>
Subject: Re: [RFC PATCH 4/4] r8169: add sysfs for dash

On 07.12.2021 07:53, Hayes Wang wrote:
> Heiner Kallweit <hkallweit1@...il.com>
>> Sent: Friday, December 3, 2021 11:15 PM
> [...]
>> With regard to sysfs usage:
>> - attributes should be documented under /Documentation/ABI/testing
>> - attributes should be defined statically (driver.dev_groups instead
>>   of sysfs_create_group)
>> - for printing info there's sysfs_emit()
>> - is really RTNL needed? Or would a lighter mutex do?
> 
> In addition to protect the critical section, RTNL is used to avoid
> calling close() before CMAC is finished. The transfer of CMAC
> may contain several steps. And close() would disable CMAC.
> I don't wish the CMAC stays at strange state. It may influence
> the firmware or hardware. Besides, I find the original driver only
> use RTNL to protect critical section. Is there a better way for it?
> 

The main issue I see is that you call rtl_dash_from_fw() under RTNL,
and this function may sleep up to 5s. Holding a system-wide mutex
for that long isn't too nice.

In rtl_dash_info() you just print FW version and build number.
Wouldn't it be sufficient to print this info once to syslog
instead of exporting it via sysfs?

> Best Regards,
> Hayes
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ