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:   Tue, 10 Oct 2017 09:24:41 +0200
From:   Jan Kiszka <jan.kiszka@...mens.com>
To:     Joerg Roedel <jroedel@...e.de>
Cc:     iommu@...ts.linux-foundation.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iommu/vt-d: Don't register bus-notifier under

On 2017-10-10 09:21, Joerg Roedel wrote:
> On Mon, Oct 09, 2017 at 06:58:13PM +0200, Jan Kiszka wrote:
>>>  extern int dmar_table_init(void);
>>>  extern int dmar_dev_scope_init(void);
>>> +extern void dmar_register_bus_notifier(void);
>>>  extern int dmar_parse_dev_scope(void *start, void *end, int *cnt,
>>>  				struct dmar_dev_scope **devices, u16 segment);
>>>  extern void *dmar_alloc_dev_scope(void *start, void *end, int *cnt);
>>>
>>
>> Silences the warning, but locking in the init paths still smells fishy
>> to me.
> 
> Yes, its certainly not optimal, but the code that runs in there also
> runs at iommu hotplug time, so we can't just remove the locking there
> entirely.

It may not just be "sub-optimal" but rather borken: "One example:
dmar_table_init is not consistently protected by dmar_global_lock."

Jan

> 
> On the other side the warning you reported is a false-positive, it can
> never dead-lock because the reverse lock-order happens only at
> initialization time, but I don't know how to silence it otherwise.
> 
> 
> Regards,
> 
> 	Joerg
> 

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ