lkml.org 
[lkml]   [2016]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [x86/uaccess] 5b710f34e1: kernel BUG at mm/usercopy.c:75!
On Wed, Aug 17, 2016 at 2:55 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Wed, Aug 17, 2016 at 2:50 PM, Kees Cook <keescook@chromium.org> wrote:
>> On Wed, Aug 17, 2016 at 2:45 PM, Linus Torvalds
>>>
>>> Networking does, but seems to use __GFP_COMP, at least in the one case
>>> I checked (skbuff).
>>
>> Was this allocation really through kmalloc?
>
> The networking one I looked at, no. But they do __GFP_COMP.
>
> The task struct allocation generally is (alloc_task_struct_node()),
> but as Rik pointed out, SLOB doesn't actually necessarily do the slab
> book-keeping for multi-page allocations.

Perhaps I can just ifdef the multi-page checks with
CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR. That way a SLOB build still
has basic bounds checking (which was my intention with that config),
and non-SLOB builds still get multi-page checking.

-Kees

--
Kees Cook
Nexus Security

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.061 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site