Linux-api Archive on
 help / color / Atom feed
From: "Joel Fernandes (Google)" <>
Cc: "Joel Fernandes (Google)" <>,
	"Andrew Morton" <>,
	"Andy Lutomirski" <>,
	"Hugh Dickins" <>, "Jann Horn" <>,
	"John Stultz" <>,,,,,
	"Marc-André Lureau" <>,
	"Matthew Wilcox" <>,
	"Mike Kravetz" <>,
	"Shuah Khan" <>,
	"Stephen Rothwell" <>
Subject: [PATCH -manpage 1/2] fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
Date: Mon, 19 Nov 2018 21:25:44 -0800
Message-ID: <> (raw)

More details of the seal can be found in the LKML patch:

Signed-off-by: Joel Fernandes (Google) <>
 man2/fcntl.2 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/man2/fcntl.2 b/man2/fcntl.2
index 03533d65b49d..54772f94964c 100644
--- a/man2/fcntl.2
+++ b/man2/fcntl.2
@@ -1525,6 +1525,21 @@ Furthermore, if there are any asynchronous I/O operations
 .RB ( io_submit (2))
 pending on the file,
 all outstanding writes will be discarded.
+If this seal is set, the contents of the file can be modified only from
+existing writeable mappings that were created prior to the seal being set.
+Any attempt to create a new writeable mapping on the memfd via
+.BR mmap (2)
+will fail with
+Also any attempts to write to the memfd via
+.BR write (2)
+will fail with
+This is useful in situations where existing writable mapped regions need to be
+kept intact while preventing any future writes. For example, to share a
+read-only memory buffer to other processes that only the sender can write to.
 .SS File read/write hints
 Write lifetime hints can be used to inform the kernel about the relative

             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20  5:25 Joel Fernandes (Google) [this message]
2018-11-20  5:25 ` [PATCH -manpage 2/2] memfd_create.2: " Joel Fernandes (Google)
2018-12-12 22:05 [PATCH -manpage 1/2] fcntl.2: " Joel Fernandes (Google)
2019-01-13  0:14 [PATCH -manpage 0/2] Document " Joel Fernandes
2019-01-13  0:14 ` [PATCH -manpage 1/2] fcntl.2: Update manpage with new " Joel Fernandes
2019-03-14 21:48 [PATCH -manpage 0/2] Joel Fernandes (Google)
2019-03-14 21:48 ` [PATCH -manpage 1/2] fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal Joel Fernandes (Google)
     [not found]   ` <20190314214844.207430-2-joel-QYYGw3jwrUn5owFQY34kdNi2O/>
2020-02-08 11:58     ` Michael Kerrisk (man-pages)

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-api Archive on

Archives are clonable:
	git clone --mirror linux-api/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-api linux-api/ \
	public-inbox-index linux-api

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone