lkml.org 
[lkml]   [2017]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: BUG: sleeping function called from invalid context at ./include/linux/uaccess.h:LINE
    From
    Date
    On 06.11.2017 17:37, Paolo Bonzini wrote:
    > On 06/11/2017 17:19, David Hildenbrand wrote:
    >> On 06.11.2017 17:14, Paolo Bonzini wrote:
    >>> On 06/11/2017 17:01, David Hildenbrand wrote:
    >>>> On 06.11.2017 16:10, Nick Desaulniers wrote:
    >>>>> Does it have to be stack allocated?
    >>>>
    >>>> We can't use kmalloc and friends in emulate.c. We would have to
    >>>> introduce new emulator callbacks.
    >>>>
    >>>> a) for malloc and free. hmmm.
    >>>> b) for carrying out the fxrstr/fixup.
    >>>>
    >>>> Paolo, what do you suggest?
    >>>
    >>> You can use kmalloc. Any userspace user of emulate.c would have to
    >>> write a wrapper. But I'm not sure it's useful... maybe the
    >>> asm_safe+memcpy could be moved to a separate noinline function, so that
    >>> segmented_read_std is invoked with a leaner stack.
    >>
    >> That's basically what we had before 9d643f63128b, however without the
    >> "noinline".
    >
    > Indeed. I do prefer the usage of __fxstate_size though that was
    > introduced by 9d643f63128b.
    >
    > Paolo
    >

    So I'll modify my patch to have that inside a static noinline function
    and resend.

    Thanks.

    --

    Thanks,

    David / dhildenb

    \
     
     \ /
      Last update: 2017-11-06 17:47    [W:3.522 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site