From: David Woodhouse <dwmw2@infradead.org>
To: Roman Kagan <rkagan@amazon.de>, linux-kernel@vger.kernel.org
Cc: Shuah Khan <shuah@kernel.org>,
Dragan Cvetic <dragan.cvetic@amd.com>,
Fares Mehanna <faresx@amazon.de>,
Alexander Graf <graf@amazon.de>,
Derek Kiernan <derek.kiernan@amd.com>,
linux-kselftest@vger.kernel.org, nh-open-source@amazon.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH RFC 0/3] add support for mm-local memory allocations
Date: Thu, 04 Jul 2024 12:11:16 +0100 [thread overview]
Message-ID: <675f660edd10b8f461c57323aff0891711a4cf6a.camel@infradead.org> (raw)
In-Reply-To: <20240621201501.1059948-1-rkagan@amazon.de>
[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]
On Fri, 2024-06-21 at 22:14 +0200, Roman Kagan wrote:
>
> Compared to the approach used in the orignal series, where a dedicated kernel
> address range and thus a dedicated PGD was used for mm-local allocations, the
> one proposed here may have certain drawbacks, in particular
>
> - using user addresses for kernel memory may violate assumptions in various
> parts of kernel code which we may not have identified with smoke tests we did
>
> - the allocated addresses are guessable by the userland (ATM they are even
> visible in /proc/PID/maps but that's fixable) which may weaken the security
> posture
I think this approach makes sense as it's generic and applies
immediately to all architectures. I'm slightly uncomfortable about
using userspace addresses though, and the special cases that it
introduces.
I'd like to see a per-arch ARCH_HAS_PROCLOCAL_PGD so that it *can* be
put back into a dedicated address range where possible.
Looking forward to the x86 KVM code from before being dusted off and
put on top of this, and also the Arm version of same. A test driver and
test case is all very well, but it's less exciting than the real use
case :)
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]
next prev parent reply other threads:[~2024-07-04 11:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 20:14 Roman Kagan
2024-06-21 20:14 ` [PATCH RFC 1/3] mseal: expose interface to seal / unseal user memory ranges Roman Kagan
2024-06-21 20:15 ` [PATCH RFC 2/3] mm/secretmem: implement mm-local kernel allocations Roman Kagan
2024-06-21 20:15 ` [PATCH RFC 3/3] drivers/misc: add test driver and selftest for proclocal allocator Roman Kagan
2024-07-03 14:36 ` Greg Kroah-Hartman
2024-07-04 11:11 ` David Woodhouse [this message]
2024-08-28 9:50 ` [PATCH RFC 0/3] add support for mm-local memory allocations Alexander Graf
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=675f660edd10b8f461c57323aff0891711a4cf6a.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=derek.kiernan@amd.com \
--cc=dragan.cvetic@amd.com \
--cc=faresx@amazon.de \
--cc=graf@amazon.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nh-open-source@amazon.com \
--cc=rkagan@amazon.de \
--cc=shuah@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