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:	Tue, 4 Aug 2009 11:59:08 +0200
From:	Leon Woestenberg <leon.woestenberg@...il.com>
To:	Brice Goglin <Brice.Goglin@...ia.fr>
Cc:	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	linux-kernel@...r.kernel.org
Subject: Re: get_user_pages() on an mmap()ed file allowed? What to do if 0 < 
	get_user_pages(..., nr_pages, ...) < nr_pages?

Hello Brice,

On Tue, Aug 4, 2009 at 11:18 AM, Brice Goglin<Brice.Goglin@...ia.fr> wrote:
> Hugh Dickins wrote:
>>> - what should a driver do when get_user_pages() returns less pages
>>> than requested?
>>
>> Probably put_page the pages gotten then report the surprise;
>> perhaps, before putting the pages gotten, try get_user_pages
>> on the next alone, to see what error code is returned for that.
>
> I wonder if we should change get_user_pages to store ERR_PTR(ret)
> in page[i] when it fails to get page #i.
>
Yes, I would see that as an improvement in finding out why rc <
nr_pages, in case rc > 0.

Also I think it does not break existing users.

Regards,

-- 
Leon
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ