linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -manpage 0/2] Document memfd F_SEAL_FUTURE_WRITE seal
@ 2019-01-13  0:14 Joel Fernandes
  2019-01-13  0:14 ` [PATCH -manpage 1/2] fcntl.2: Update manpage with new " Joel Fernandes
  2019-01-13  0:14 ` [PATCH -manpage 2/2] memfd_create.2: " Joel Fernandes
  0 siblings, 2 replies; 7+ messages in thread
From: Joel Fernandes @ 2019-01-13  0:14 UTC (permalink / raw)
  To: linux-kernel, mtk.manpages
  Cc: Joel Fernandes, Andrew Morton, Andy Lutomirski, dancol,
	Hugh Dickins, Jann Horn, John Stultz, linux-api, linux-man,
	linux-mm, marcandre.lureau, Matthew Wilcox, Mike Kravetz,
	Shuah Khan, Stephen Rothwell

Hello,

These manpages correspond to the following kernel patches:
https://lore.kernel.org/patchwork/patch/1031550/
https://lore.kernel.org/patchwork/patch/1031551/

This is just a resend with no changes from last time.

Joel Fernandes (Google) (2):
fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
memfd_create.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal

man2/fcntl.2        | 15 +++++++++++++++
man2/memfd_create.2 | 15 ++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)

--
2.20.1.97.g81188d93c3-goog

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH -manpage 0/2]
@ 2019-03-14 21:48 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)
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Fernandes (Google) @ 2019-03-14 21:48 UTC (permalink / raw)
  To: linux-kernel, mtk.manpages
  Cc: Joel Fernandes (Google),
	Andrew Morton, Andy Lutomirski, dancol, Jann Horn, John Stultz,
	kernel-team, linux-api, linux-man, linux-mm, Matthew Wilcox,
	Mike Kravetz, Shuah Khan, Stephen Rothwell

This documentation is for F_SEAL_FUTURE_WRITE patches that are in linux-next.

Joel Fernandes (Google) (2):
fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
memfd_create.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal

man2/fcntl.2        | 15 +++++++++++++++
man2/memfd_create.2 | 15 ++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)

--
2.21.0.360.g471c308f928-goog

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH -manpage 1/2] fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
@ 2018-12-12 22:05 Joel Fernandes (Google)
  0 siblings, 0 replies; 7+ messages in thread
From: Joel Fernandes (Google) @ 2018-12-12 22:05 UTC (permalink / raw)
  To: linux-man
  Cc: Joel Fernandes (Google),
	Andrew Morton, Andy Lutomirski, dancol, Hugh Dickins, Jann Horn,
	John Stultz, linux-api, linux-kernel, linux-mm,
	Marc-André Lureau, Matthew Wilcox, Mike Kravetz, Shuah Khan,
	Stephen Rothwell

More details of the seal can be found in the LKML patch:
https://lore.kernel.org/lkml/20181120052137.74317-1-joel@joelfernandes.org/T/#t

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
 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.
+.TP
+.BR F_SEAL_FUTURE_WRITE
+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
+.BR EPERM.
+Also any attempts to write to the memfd via
+.BR write (2)
+will fail with
+.BR EPERM.
+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
-- 
2.20.0.rc1.387.gf8505762e3-goog

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH -manpage 1/2] fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
@ 2018-11-20  5:25 Joel Fernandes (Google)
  0 siblings, 0 replies; 7+ messages in thread
From: Joel Fernandes (Google) @ 2018-11-20  5:25 UTC (permalink / raw)
  To: linux-man
  Cc: Joel Fernandes (Google),
	Andrew Morton, Andy Lutomirski, Hugh Dickins, Jann Horn,
	John Stultz, linux-api, linux-kernel, linux-kselftest, linux-mm,
	Marc-André Lureau, Matthew Wilcox, Mike Kravetz, Shuah Khan,
	Stephen Rothwell

More details of the seal can be found in the LKML patch:
https://lore.kernel.org/lkml/20181120052137.74317-1-joel@joelfernandes.org/T/#t

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
 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.
+.TP
+.BR F_SEAL_FUTURE_WRITE
+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
+.BR EPERM.
+Also any attempts to write to the memfd via
+.BR write (2)
+will fail with
+.BR EPERM.
+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
-- 
2.19.1.1215.g8438c0b245-goog

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-08 11:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-13  0:14 [PATCH -manpage 0/2] Document memfd F_SEAL_FUTURE_WRITE seal Joel Fernandes
2019-01-13  0:14 ` [PATCH -manpage 1/2] fcntl.2: Update manpage with new " Joel Fernandes
2019-01-13  0:14 ` [PATCH -manpage 2/2] memfd_create.2: " Joel Fernandes
  -- strict thread matches above, loose matches on Subject: below --
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)
2020-02-08 11:58   ` Michael Kerrisk (man-pages)
2018-12-12 22:05 Joel Fernandes (Google)
2018-11-20  5:25 Joel Fernandes (Google)

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).