All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
	linux-kernel@vger.kernel.org
Cc: mtk.manpages@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@kernel.org>,
	dancol@google.com, Jann Horn <jannh@google.com>,
	John Stultz <john.stultz@linaro.org>,
	kernel-team@android.com, linux-api@vger.kernel.org,
	linux-man@vger.kernel.org, linux-mm@kvack.org,
	Matthew Wilcox <willy@infradead.org>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Shuah Khan <shuah@kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH -manpage 1/2] fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
Date: Sat, 8 Feb 2020 12:58:07 +0100	[thread overview]
Message-ID: <11efee1c-0b65-2e51-0aa6-7f61fd2958c5@gmail.com> (raw)
In-Reply-To: <20190314214844.207430-2-joel@joelfernandes.org>

Hello Joel,

On 3/14/19 10:48 PM, Joel Fernandes (Google) wrote:
> 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>

Thanks. Patch (finally) applied!

Cheers,

Michael


> ---
>  man2/fcntl.2 | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/man2/fcntl.2 b/man2/fcntl.2
> index fce4f4c2b3bd..e01e2c075b5b 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
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

WARNING: multiple messages have this Message-ID (diff)
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Joel Fernandes (Google)"
	<joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Andy Lutomirski <luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	dancol-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	Jann Horn <jannh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Mike Kravetz
	<mike.kravetz-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Shuah Khan <shuah-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
Subject: Re: [PATCH -manpage 1/2] fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
Date: Sat, 8 Feb 2020 12:58:07 +0100	[thread overview]
Message-ID: <11efee1c-0b65-2e51-0aa6-7f61fd2958c5@gmail.com> (raw)
In-Reply-To: <20190314214844.207430-2-joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org>

Hello Joel,

On 3/14/19 10:48 PM, Joel Fernandes (Google) wrote:
> More details of the seal can be found in the LKML patch:
> https://lore.kernel.org/lkml/20181120052137.74317-1-joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org/T/#t
>
> Signed-off-by: Joel Fernandes (Google) <joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org>

Thanks. Patch (finally) applied!

Cheers,

Michael


> ---
>  man2/fcntl.2 | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/man2/fcntl.2 b/man2/fcntl.2
> index fce4f4c2b3bd..e01e2c075b5b 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
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2020-02-08 11:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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) [this message]
2020-02-08 11:58     ` Michael Kerrisk (man-pages)
2019-03-14 21:48 ` [PATCH -manpage 2/2] memfd_create.2: " Joel Fernandes (Google)
2020-02-08 11:58   ` Michael Kerrisk (man-pages)
2020-02-08 11:58     ` Michael Kerrisk (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
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
2018-12-12 22:05 Joel Fernandes (Google)
2018-11-20  5:25 Joel Fernandes (Google)
2018-11-20  5:25 ` Joel Fernandes (Google)
2018-11-20  5:25 ` joel

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=11efee1c-0b65-2e51-0aa6-7f61fd2958c5@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dancol@google.com \
    --cc=jannh@google.com \
    --cc=joel@joelfernandes.org \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mike.kravetz@oracle.com \
    --cc=sfr@canb.auug.org.au \
    --cc=shuah@kernel.org \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.