public inbox for [email protected]
 help / color / mirror / Atom feed
From: David Hildenbrand <[email protected]>
To: [email protected]
Cc: [email protected], [email protected],
	[email protected], David Hildenbrand <[email protected]>,
	Linus Torvalds <[email protected]>,
	Andrew Morton <[email protected]>,
	Arnd Bergmann <[email protected]>,
	Greg Kroah-Hartman <[email protected]>,
	Nicolas Pitre <[email protected]>, Jens Axboe <[email protected]>,
	Pavel Begunkov <[email protected]>
Subject: [PATCH mm-stable RFC 0/2] mm/nommu: don't use VM_MAYSHARE for MAP_PRIVATE mappings
Date: Mon, 19 Dec 2022 17:30:11 +0100	[thread overview]
Message-ID: <[email protected]> (raw)

Trying to reduce the confusion around VM_SHARED and VM_MAYSHARE first
requires !CONFIG_MMU to stop using VM_MAYSHARE for MAP_PRIVATE mappings.
CONFIG_MMU only sets VM_MAYSHARE for MAP_SHARED mappings.

This paves the way for further VM_MAYSHARE and VM_SHARED cleanups: for
example, renaming VM_MAYSHARED to VM_MAP_SHARED to make it cleaner what
is actually means.

Let's first get the weird case out of the way and not use VM_MAYSHARE in
MAP_PRIVATE mappings, using a new VM_MAYOVERLAY flag instead.

I am not a NOMMU expert, but my basic testing with risc64-nommu with
buildroot under QEMU revealed no surprises.

Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Pavel Begunkov <[email protected]>

David Hildenbrand (2):
  mm/nommu: factor out check for NOMMU shared mappings into
    is_nommu_shared_mapping()
  mm/nommu: don't use VM_MAYSHARE for MAP_PRIVATE mappings

 drivers/char/mem.c    |  2 +-
 fs/cramfs/inode.c     |  2 +-
 fs/proc/task_nommu.c  |  2 +-
 fs/ramfs/file-nommu.c |  2 +-
 fs/romfs/mmap-nommu.c |  2 +-
 include/linux/mm.h    | 20 ++++++++++++++
 io_uring/io_uring.c   |  2 +-
 mm/nommu.c            | 62 +++++++++++++++++++++++++------------------
 8 files changed, 62 insertions(+), 32 deletions(-)

-- 
2.38.1


             reply	other threads:[~2022-12-19 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 16:30 David Hildenbrand [this message]
2022-12-19 16:30 ` [PATCH mm-stable RFC 1/2] mm/nommu: factor out check for NOMMU shared mappings into is_nommu_shared_mapping() David Hildenbrand
2022-12-19 16:30 ` [PATCH mm-stable RFC 2/2] mm/nommu: don't use VM_MAYSHARE for MAP_PRIVATE mappings 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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