lkml.org 
[lkml]   [2014]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 21/29] nios2: Futex operations
From
On Thu, Jul 17, 2014 at 7:07 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The get_user/put_user functions really need to be annotated might_fault(),
> because that's what they do.
>
> The whole point of get_user() is to access an unchecked user space
> pointer, which can do a number of things based on what the pointer
> points to:
>
> - access a user space variable that resides in memory
> - access a kernel pointer and fail because of the access_ok()
> check
> - access a user space pointer that is not mapped and return
> through the __ex_table fixup.
> - access a user space pointer that has a valid VMA but not PTE,
> causing a page fault to be resolved.
>
> It's the last case that breaks here.
So, do you mean that we can't use get_user/put_user in futex support?
BTW, some architectures like sh,parisc, m68k use get_user in futex
function as well.
Any recommendation way to support futex if we can't use get_user.
Note, nios2 doesn't have atomic instruction.
Thanks.

Regards
Ley Foon


\
 
 \ /
  Last update: 2014-07-18 08:41    [W:0.155 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site