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-next>] [day] [month] [year] [list]
Date:   Fri, 9 Sep 2016 12:19:38 +0800
From:   Ming Lei <ming.lei@...onical.com>
To:     "Luis R. Rodriguez" <mcgrof@...nel.org>
Cc:     "rafael.j.wysocki" <rafael.j.wysocki@...el.com>,
        Jeff Mahoney <jeffm@...e.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Julia Lawall <Julia.Lawall@...6.fr>,
        NeilBrown <neilb@...e.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Howells <dhowells@...hat.com>,
        Daniel Wagner <wagi@...om.org>,
        Mimi Zohar <zohar@...ux.vnet.ibm.com>,
        Andy Lutomirski <luto@...capital.net>,
        Fengguang Wu <fengguang.wu@...el.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Daniel Wagner <daniel.wagner@...-carit.de>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Johannes Berg <johannes@...solutions.net>,
        Takashi Iwai <tiwai@...e.de>, Oleg Nesterov <oleg@...hat.com>,
        Arend Van Spriel <arend@...adcom.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Daniel Vetter <daniel.vetter@...ll.ch>
Subject: Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()

On Fri, Sep 9, 2016 at 11:39 AM, Luis R. Rodriguez <mcgrof@...nel.org> wrote:
> On Sep 8, 2016 6:22 PM, "Ming Lei" <ming.lei@...onical.com> wrote:
>>
>> On Fri, Sep 9, 2016 at 4:11 AM, Luis R. Rodriguez <mcgrof@...nel.org>
>> wrote:
>> > On Thu, Sep 08, 2016 at 11:37:54PM +0800, Ming Lei wrote:
>> >> On Wed, Sep 7, 2016 at 4:45 PM, Daniel Wagner <wagi@...om.org> wrote:
>> >> > From: Daniel Wagner <daniel.wagner@...-carit.de>
>> >> >
>> >> > When we load the firmware directly we don't need to take the umh
>> >> > lock.
>> >>
>> >> I am wondering if it can be wrong.
>> >
>> > If you disable the firmware UMH why would we need to lock if the lock is
>> > being
>> > shown only used for the firmare UMH ?
>> >
>> >> Actually in case of firmware loading, the usermode helper lock doesn't
>> >> only mean the user helper is usable, and it also may serve to mark the
>> >> filesystem/block device is ready for firmware loading, and of couse
>> >> direct
>> >> loading need fs/block to be ready too.
>> >
>> > Yes but that's a race I've identified a while ago present even if you
>> > use initramfs *and*
>> > use kernel_read_file_from_path() on any part of the kernel [0], I
>> > proposed a possible
>>
>> Actualy I mean the situation of suspend vs. resume, and some drivers
>> still may not benefit from firmware loading cache when requesting loading
>> in .resume(), at that time it is still too early for direct loading.
>> With UMH lock,
>> we can get a warning or avoid the issue.
>
> Agreed, but that would seem odd and perhaps misleading to have a try lock
> for UMH when no firmware UMH code is enabled. This should probably made
> clear in comments for now as to why we have it then and we should just mark

That is very helpful, :-)

> a TODO item to generalize this to a common freezer check. Surprised we don't
> have one yet. Rafael ?
>
>   Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ