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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Jul 2012 10:49:24 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Borislav Petkov <bp@...64.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 01/13] driver core: firmware loader: simplify pages
 ownership transfer

On Wed, Jul 25, 2012 at 2:10 AM, Borislav Petkov <bp@...64.org> wrote:
>>
>> +/* transfer the ownership of pages to firmware */
>> +static void fw_set_page_data(struct firmware_priv *fw_priv)
>> +{
>> +     struct firmware *fw = fw_priv->fw;
>> +
>> +     fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages,
>> +                             0, PAGE_KERNEL_RO);
>
> We don't need to check the return value of vmap() here like we do above?

Good catch, it should be handled, otherwise may cause oops inside driver.

If that happens, the pages buffer should be dropped and return failure
from request_firmware or the callback of request_firmware_nowait.

I will fix it against this patch set if cache/uncache firmware can be
accepted.

Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists