lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RESEND RFC PATCH 1/3] Introduce per thread user-kernel shared structure
Date


> On Sep 8, 2021, at 6:50 PM, Jann Horn <jannh@google.com> wrote:
>
> On Thu, Sep 9, 2021 at 2:16 AM Prakash Sangappa
> <prakash.sangappa@oracle.com> wrote:
>> A structure per thread is allocated from a page that is shared mapped
>> between user space and kernel as means for faster communication. This will
>> facilitate sharing information, Ex: per thread stats shared between kernel
>> and user space, that can be read by applications without the need for
>> making frequent system calls in latency sensitive code path.
> [...]
>> + /* Try to map as high as possible, this is only a hint. */
>> + pg->vaddr = get_unmapped_area(NULL, TASK_SIZE - PAGE_SIZE,
>> + PAGE_SIZE, 0, 0);
>
> I don't have an opinion on the rest of this patch, but from a security
> perspective, please don't map things at fixed addresses; let the mmap
> code pick some random address that it wants to use. If an attacker
> manages to overwrite some userspace pointer with chosen data, we don't
> want them to know an address where they can be sure something is
> mapped.

Sure. I will address this.
Thanks,
-Prakash

\
 
 \ /
  Last update: 2021-09-09 19:31    [W:0.066 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site