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:	Fri, 27 Mar 2009 09:49:19 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	Eric Dumazet <dada1@...mosbay.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Darren Hart <dvhltc@...ibm.com>
Subject: Re: Question about PRIVATE_FUTEX

On Fri, 2009-03-27 at 11:12 +0900, Minchan Kim wrote:
> Hi, Peter and Eric.
> 
> I am not expert about futex.
> I am sorry if this is dumb question.
> 
> If we use private futex, get_futex_key don't call get_user_pages_fast
> which pins page at page table.

But also drops that page ref at the end of get_futex_key(). The whole
and only purpose of using get_user_pages_fast() is to get at the mapping
data without having to obtain the mmap_sem.

> Then, get_futex_value_locked calls __cpy_from_user_inatomic with
> pagefault_disable.
> 
> Who make sure the user page is mapped at app's page table ?

Nobody, all uses of get_futex_value_locked() have to deal with it
returning -EFAULT.

Most of this is legacy btw, from when futex ops were done under the
mmap_sem. Back then we couldn't fault because that would cause mmap_sem
recursion. Howver, now that we don't hold mmap_sem anymore we could use
a faulting user access like get_user().

Darren has been working on patches to clean that up, some of those are
already merged in the -tip tree.

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