From: Omar Sandoval <osandov@osandov.com>
To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>,
x86@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-um@lists.infradead.org,
kernel-team@fb.com
Subject: [PATCH 0/2] mm: make copy_to_kernel_nofault() not fault on user addresses
Date: Sun, 1 Sep 2024 22:31:27 -0700 [thread overview]
Message-ID: <cover.1725223574.git.osandov@fb.com> (raw)
From: Omar Sandoval <osandov@fb.com>
Hi,
I hit a case where copy_to_kernel_nofault() will fault (lol): if the
destination address is in userspace and x86 Supervisor Mode Access
Prevention is enabled. Patch 2 has the details and the fix. Patch 1
renames a helper function so that its use in patch 2 makes more sense.
If the rename is too intrusive, I can drop it.
Thanks,
Omar
Omar Sandoval (2):
mm: rename copy_from_kernel_nofault_allowed() to
copy_kernel_nofault_allowed()
mm: make copy_to_kernel_nofault() not fault on user addresses
arch/arm/mm/fault.c | 2 +-
arch/loongarch/mm/maccess.c | 2 +-
arch/mips/mm/maccess.c | 2 +-
arch/parisc/lib/memcpy.c | 2 +-
arch/powerpc/mm/maccess.c | 2 +-
arch/um/kernel/maccess.c | 2 +-
arch/x86/mm/maccess.c | 4 ++--
include/linux/uaccess.h | 2 +-
mm/maccess.c | 10 ++++++----
9 files changed, 15 insertions(+), 13 deletions(-)
--
2.46.0
next reply other threads:[~2024-09-02 5:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 5:31 Omar Sandoval [this message]
2024-09-02 5:31 ` [PATCH 1/2] mm: rename copy_from_kernel_nofault_allowed() to copy_kernel_nofault_allowed() Omar Sandoval
2024-09-02 5:31 ` [PATCH 2/2] mm: make copy_to_kernel_nofault() not fault on user addresses Omar Sandoval
2024-09-04 7:50 ` Christophe Leroy
2024-09-04 22:56 ` Omar Sandoval
2024-09-02 6:19 ` [PATCH 0/2] " Christophe Leroy
2024-09-02 6:31 ` Omar Sandoval
2024-09-02 8:56 ` David Hildenbrand
2024-09-02 15:26 ` Omar Sandoval
2024-09-02 16:39 ` David Hildenbrand
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=cover.1725223574.git.osandov@fb.com \
--to=osandov@osandov.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=kernel-team@fb.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.