lkml.org 
[lkml]   [2014]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] [PATCH] Pre-emption control for userspace
From
Date
The no checking is omitting access_ok(), no? Either way, disabling page faults have to be done explicitly.

On March 6, 2014 6:33:04 AM PST, Thomas Gleixner <tglx@linutronix.de> wrote:
>
>
>On Thu, 6 Mar 2014, Peter Zijlstra wrote:
>
>> On Thu, Mar 06, 2014 at 02:45:00PM +0100, Rasmus Villemoes wrote:
>> > Peter Zijlstra <peterz@infradead.org> writes:
>> >
>> > > On Thu, Mar 06, 2014 at 02:24:43PM +0100, Rasmus Villemoes wrote:
>> > >> Is it possible to implement non-sleeping versions of
>{get,put}_user()?
>> > >
>> > > __{get,put}_user()
>> >
>> > Huh?
>> >
>> > arch/x86/include/asm/uaccess.h:
>> >
>> > /**
>> > * __get_user: - Get a simple variable from user space, with less
>checking.
>> > * @x: Variable to store result.
>> > * @ptr: Source address, in user space.
>> > *
>> > * Context: User context only. This function may sleep.
>> >
>> > What am I missing?
>>
>> __get_user() -> __get_user_nocheck() -> __get_user_size() ->
>__get_user_asm()
>>
>> And __get_user_asm() seems to generate the required .fixup section
>for
>> this to work in pagefault_disable() context.
>
>Well, it still might sleep if you're using it in page fault enabled
>context. So the documentation of that function sucks.
>
>Thanks,
>
> tglx

--
Sent from my mobile phone. Please pardon brevity and lack of formatting.


\
 
 \ /
  Last update: 2014-03-06 16:21    [W:0.065 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site