From: Jann Horn <jannh@google.com>
To: Prakash Sangappa <prakash.sangappa@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
mingo@redhat.com
Subject: Re: [RESEND RFC PATCH 1/3] Introduce per thread user-kernel shared structure
Date: Thu, 9 Sep 2021 03:50:45 +0200 [thread overview]
Message-ID: <CAG48ez1isvC9c8aem1m6n2uPPHzG4H-otDW7yEUJXDktf=q0Ag@mail.gmail.com> (raw)
In-Reply-To: <1631147036-13597-2-git-send-email-prakash.sangappa@oracle.com>
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.
next prev parent reply other threads:[~2021-09-09 1:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 0:23 [RESEND RFC PATCH 0/3] Provide fast access to thread specific data Prakash Sangappa
2021-09-09 0:23 ` [RESEND RFC PATCH 1/3] Introduce per thread user-kernel shared structure Prakash Sangappa
2021-09-09 1:50 ` Jann Horn [this message]
2021-09-09 17:30 ` Prakash Sangappa
2021-09-09 0:23 ` [RESEND RFC PATCH 2/3] Publish tasks's scheduler stats thru the " Prakash Sangappa
2021-09-09 0:23 ` [RESEND RFC PATCH 3/3] Introduce task's 'off cpu' time Prakash Sangappa
[not found] ` <CAFTs51VDUPWu=r9d=ThABc-Z6wCwTOC+jKDCq=Jk8Pfid61xyQ@mail.gmail.com>
2021-09-10 15:18 ` Fwd: [RESEND RFC PATCH 0/3] Provide fast access to thread specific data Peter Oskolkov
2021-09-10 16:13 ` Prakash Sangappa
2021-09-10 16:28 ` Peter Oskolkov
2021-09-10 19:12 ` Jann Horn
2021-09-10 19:36 ` Peter Oskolkov
2021-09-13 17:36 ` Prakash Sangappa
2021-09-13 18:00 ` Peter Oskolkov
2021-09-14 16:10 ` Prakash Sangappa
2021-09-10 16:37 ` Fwd: " Florian Weimer
2021-09-10 17:33 ` Mathieu Desnoyers
2021-09-10 17:48 ` Peter Oskolkov
2021-09-10 17:55 ` Mathieu Desnoyers
2021-09-10 18:00 ` Peter Oskolkov
-- strict thread matches above, loose matches on Subject: below --
2021-09-09 0:10 Prakash Sangappa
2021-09-09 0:10 ` [RESEND RFC PATCH 1/3] Introduce per thread user-kernel shared structure Prakash Sangappa
2021-09-09 6:39 ` Greg KH
2021-09-09 18:45 ` Prakash Sangappa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG48ez1isvC9c8aem1m6n2uPPHzG4H-otDW7yEUJXDktf=q0Ag@mail.gmail.com' \
--to=jannh@google.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=prakash.sangappa@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).