From: "Arnd Bergmann" <arnd@arndb.de>
To: "Jason A . Donenfeld" <Jason@zx2c4.com>,
"Florian Weimer" <fweimer@redhat.com>
Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev,
"Thomas Gleixner" <tglx@linutronix.de>,
linux-crypto@vger.kernel.org, x86@kernel.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Adhemerval Zanella Netto" <adhemerval.zanella@linaro.org>,
"Carlos O'Donell" <carlos@redhat.com>,
linux-api@vger.kernel.org
Subject: Re: [PATCH v6 1/3] random: add vgetrandom_alloc() syscall
Date: Thu, 24 Nov 2022 14:18:03 +0100 [thread overview]
Message-ID: <7928bec7-4659-4b32-aad7-2300409ea670@app.fastmail.com> (raw)
In-Reply-To: <Y39oBtR8t+XNPS0d@zx2c4.com>
On Thu, Nov 24, 2022, at 13:48, Jason A. Donenfeld wrote:
> On Thu, Nov 24, 2022 at 01:24:42PM +0100, Jason A. Donenfeld wrote:
> Looks like set_mempolicy, get_mempoliy, and migrate_pages pass an
> unsigned long pointer and I don't see any compat stuff around it:
>
> SYSCALL_DEFINE3(set_mempolicy, int, mode, const unsigned long
> __user *, nmask,
> unsigned long, maxnode)
>
> SYSCALL_DEFINE5(get_mempolicy, int __user *, policy,
> unsigned long __user *, nmask, unsigned long, maxnode,
> unsigned long, addr, unsigned long, flags)
>
> SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
> const unsigned long __user *, old_nodes,
> const unsigned long __user *, new_nodes)
Compat handling for these is done all the way down in the
pointer access:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/mempolicy.c#n1368
This works here because it's a special bitmap but is not the
best approach if you just have a pointer to a single value.
Arnd
next prev parent reply other threads:[~2022-11-24 13:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221121152909.3414096-1-Jason@zx2c4.com>
[not found] ` <20221121152909.3414096-3-Jason@zx2c4.com>
2022-11-23 8:51 ` [PATCH v6 2/3] random: introduce generic vDSO getrandom() implementation Rasmus Villemoes
2022-11-24 1:18 ` Jason A. Donenfeld
2022-11-25 8:02 ` Rasmus Villemoes
[not found] ` <20221121152909.3414096-2-Jason@zx2c4.com>
[not found] ` <87v8n6lzh9.fsf@oldenburg.str.redhat.com>
[not found] ` <Y37DDX5RtiGsV6MO@zx2c4.com>
[not found] ` <87a64g7wks.fsf@oldenburg.str.redhat.com>
[not found] ` <Y39djiBSmgXfgWJv@zx2c4.com>
[not found] ` <87cz9c5z1f.fsf@oldenburg.str.redhat.com>
2022-11-24 12:24 ` [PATCH v6 1/3] random: add vgetrandom_alloc() syscall Jason A. Donenfeld
2022-11-24 12:48 ` Jason A. Donenfeld
2022-11-24 13:18 ` Arnd Bergmann [this message]
2022-11-24 12:49 ` Christian Brauner
2022-11-24 12:57 ` Jason A. Donenfeld
2022-11-24 16:30 ` Jason A. Donenfeld
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=7928bec7-4659-4b32-aad7-2300409ea670@app.fastmail.com \
--to=arnd@arndb.de \
--cc=Jason@zx2c4.com \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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).