fcntl.2: Further tweaks to F_SEAL_FUTURE_WRITE text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-02-08 14:10:31 +01:00
parent e15b10ba32
commit f3aa51b217
1 changed files with 8 additions and 6 deletions

View File

@ -1527,8 +1527,10 @@ pending on the file,
all outstanding writes will be discarded.
.TP
.BR F_SEAL_FUTURE_WRITE " (since Linux 5.1)"
If this seal is set, the contents of the file can be modified only from
existing writable mappings that were created prior to the seal being set.
The effect of this seal is similar to
.BR F_SEAL_WRITE ,
but the contents of the file can still be modified via
shared writable mappings that were created prior to the seal being set.
Any attempt to create a new writable mapping on the file via
.BR mmap (2)
will fail with
@ -1537,10 +1539,10 @@ Likewise, an attempt to write to the file 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.
.IP
Using this seal,
one process can create a memory buffer that it can continue to modify
while sharing that buffer on a "read-only" basis with other processes.
.\"
.SS File read/write hints
Write lifetime hints can be used to inform the kernel about the relative