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] [day] [month] [year] [list]
Date:   Fri, 21 May 2021 20:45:04 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] sysfs: Add helper BIN_ATTRIBUTE_GROUPS

On 21.05.2021 20:41, Greg Kroah-Hartman wrote:
> On Fri, May 21, 2021 at 08:41:28PM +0200, Greg Kroah-Hartman wrote:
>> On Wed, May 19, 2021 at 09:02:47PM +0200, Heiner Kallweit wrote:
>>> On 19.05.2021 19:04, Greg Kroah-Hartman wrote:
>>>> On Wed, May 19, 2021 at 06:33:14PM +0200, Heiner Kallweit wrote:
>>>>> New helper BIN_ATTRIBUTE_GROUPS() does the same as ATTRIBUTE_GROUPS(),
>>>>> just for binary attributes.
>>>>>
>>>>> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
>>>>> ---
>>>>>  include/linux/sysfs.h | 6 ++++++
>>>>>  1 file changed, 6 insertions(+)
>>>>>
>>>>> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
>>>>> index d76a1ddf8..a12556a4b 100644
>>>>> --- a/include/linux/sysfs.h
>>>>> +++ b/include/linux/sysfs.h
>>>>> @@ -162,6 +162,12 @@ static const struct attribute_group _name##_group = {		\
>>>>>  };								\
>>>>>  __ATTRIBUTE_GROUPS(_name)
>>>>>  
>>>>> +#define BIN_ATTRIBUTE_GROUPS(_name)				\
>>>>> +static const struct attribute_group _name##_group = {		\
>>>>> +	.bin_attrs = _name##_attrs,				\
>>>>> +};								\
>>>>> +__ATTRIBUTE_GROUPS(_name)
>>>>
>>>> Is this really needed by more than just 1 driver?
>>>>
>>> Few more use case I saw:
>>> devcd_dev_groups in drivers/base/devcoredump.c
>>> w1_f3a_group in drivers/w1/slaves/w1_ds2413.c
>>> w1_slave_default_groups in drivers/w1/w1.c
>>
>> Ok, might as well, can't hurt to add this :)
>>
>> Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> Oh wait, I'm the maintainer of the other file that uses this, I'll take
> both of these then :)
> 
Even better, thanks!

> thanks,
> 
> greg k-h
> 
Heiner

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ