From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/6] mm, arm64: untag user addresses in memory syscalls
Date: Fri, 9 Mar 2018 15:53:16 +0000 [thread overview]
Message-ID: <20180309155315.4x44sbp3darractt@armageddon.cambridge.arm.com> (raw)
In-Reply-To: <beea8ac394bfae3c7c949645fb887ceacc3f3bb3.1520600533.git.andreyknvl@google.com>
On Fri, Mar 09, 2018 at 03:02:01PM +0100, Andrey Konovalov wrote:
> Memory subsystem syscalls accept user addresses as arguments, but don't use
> copy_from_user and other similar functions, so we need to handle this case
> separately.
>
> Untag user pointers passed to madvise, mbind, get_mempolicy, mincore,
> mlock, mlock2, brk, mmap_pgoff, old_mmap, munmap, remap_file_pages,
> mprotect, pkey_mprotect, mremap and msync.
>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Please keep the cc list small (maybe linux-arch, linux-arm-kernel) as
I'm sure some lists would consider this spam.
> mm/madvise.c | 2 ++
> mm/mempolicy.c | 6 ++++++
> mm/mincore.c | 2 ++
> mm/mlock.c | 5 +++++
> mm/mmap.c | 9 +++++++++
> mm/mprotect.c | 2 ++
> mm/mremap.c | 2 ++
> mm/msync.c | 3 +++
I'm not yet convinced these functions need to allow tagged pointers.
They are not doing memory accesses but rather dealing with the memory
range, hence an untagged pointer is better suited. There is probably a
reason why the "start" argument is "unsigned long" vs "void __user *"
(in the kernel, not the man page).
--
Catalin
next prev parent reply other threads:[~2018-03-09 15:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1520600533.git.andreyknvl@google.com>
2018-03-09 14:55 ` [RFC PATCH 0/6] arm64: untag user pointers passed to the kernel Mark Rutland
2018-03-09 15:16 ` Geert Uytterhoeven
2018-03-09 17:58 ` Andrey Konovalov
[not found] ` <d681c0dee907ee5cc55d313e2f843237c6087bf0.1520600533.git.andreyknvl@google.com>
2018-03-09 15:03 ` [RFC PATCH 2/6] arm64: untag user addresses in copy_from_user and others Mark Rutland
2018-03-09 15:58 ` Catalin Marinas
2018-03-09 17:57 ` Andrey Konovalov
[not found] ` <beea8ac394bfae3c7c949645fb887ceacc3f3bb3.1520600533.git.andreyknvl@google.com>
2018-03-09 15:53 ` Catalin Marinas [this message]
2018-03-09 17:31 ` [RFC PATCH 3/6] mm, arm64: untag user addresses in memory syscalls Andrey Konovalov
2018-03-09 17:42 ` Evgenii Stepanov
2018-03-14 15:45 ` Andrey Konovalov
2018-03-14 17:44 ` Catalin Marinas
2018-03-16 1:11 ` Evgenii Stepanov
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=20180309155315.4x44sbp3darractt@armageddon.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).