linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Herrmann <dh.herrmann@gmail.com>
To: Michael Tirado <mtirado418@gmail.com>
Cc: linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] mm/shmem.c: Add new seal to memfd: F_SEAL_WRITE_NONCREATOR
Date: Fri, 17 Apr 2015 12:48:44 +0200	[thread overview]
Message-ID: <CANq1E4RebX=feEtgpHa4v_C_PkKwDmDWG+jm98kUUj5yYV4ipg@mail.gmail.com> (raw)
In-Reply-To: <20150417002847.1f5febf7@yak.slack>

Hi

On Fri, Apr 17, 2015 at 6:28 AM, Michael Tirado <mtirado418@gmail.com> wrote:
> On Thu, 16 Apr 2015 14:01:07 +0200
> David Herrmann <dh.herrmann@gmail.com> wrote:
>> The same functionality of F_SEAL_WRITE_NONCREATOR can be achieved by
>> opening /proc/self/fd/<num> with O_RDONLY. Just pass that read-only FD
>> to your peers but retain the writable one. But note that you must
>> verify your peers do not have the same uid as you do, otherwise they
>> can just gain a writable descriptor by opening /proc/self/fd/<num>
>> themselves.
>
> My peers may be any uid,

Where's the problem? Just pass the read-only file-descriptor to your
peers and make sure the access-mode of the memfd is 0600. No other
user will be able to gain a writable file-descriptor, but you.

Thanks
David

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-04-17 10:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16  7:23 Michael Tirado
2015-04-16  8:14 ` Konstantin Khlebnikov
2015-04-16 12:01   ` David Herrmann
2015-04-17  4:28     ` Michael Tirado
2015-04-17 10:48       ` David Herrmann [this message]
2015-04-17 22:45         ` Michael Tirado
2015-04-18 12:13           ` David Herrmann
2015-04-17  4:18   ` Michael Tirado
2015-04-28 13:28   ` [PATCH] mm/shmem.c: Add new seal to memfd: F_SEAL_WRITE_PEER Michael Tirado

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='CANq1E4RebX=feEtgpHa4v_C_PkKwDmDWG+jm98kUUj5yYV4ipg@mail.gmail.com' \
    --to=dh.herrmann@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mtirado418@gmail.com \
    /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