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:   Thu, 8 Dec 2016 07:32:21 -0700
From:   Shuah Khan <shuahkh@....samsung.com>
To:     fx IWATA NOBUO <Nobuo.Iwata@...ixerox.co.jp>,
        Andrey Konovalov <andreyknvl@...gle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Valentina Manea <valentina.manea.m@...il.com>,
        Shuah Khan <shuah@...nel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Shuah Khan <shuahkh@....samsung.com>
Subject: Re: [PATCH] usbip: fix warning in vhci_hcd_probe/lockdep_init_map

On 12/07/2016 09:12 PM, fx IWATA NOBUO wrote:
> Dear Shuah,
> 
>> I noticed that in many places sysfs_attr_init() is called before populating
>> the fields such as name etc. However, I don't think the order matters.
>>
>> sysfs_attr_init() doesn't depend on name or any other fields being set:
>>
>> #define sysfs_attr_init(attr)                           \
>> do {                                                    \
>>         static struct lock_class_key __key;             \
>>                                                         \
>>         (attr)->key = &__key;                           \
>> } while (0)
>>
>> Are you concerned about something else?
> 
> Yes.
> 
> If the macro name is 'attr_set_key', I don't have any concern.
> 
> The name is 'attr_init' so I think there's possibility that some other
> items in attr may initialized in future.
> 
> Also I think 'initialize struct first, then set items' is idiomatic order.
> 
> Best Regards,
> 

I am seeing places where sysfs_attr_init() after setting the name as well.
As this is more of a better done this way - I will fix this in the next
release. It is more important to fix the lockdep warning.

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ