From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
Christoph Hellwig <hch@infradead.org>,
Arjan van de Ven <arjan@infradead.org>,
Mimi Zohar <zohar@us.ibm.com>,
akpm@osdl.org, kjhall@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org, safford@watson.ibm.com
Subject: Re: mprotect abuse in slim
Date: Fri, 12 Jan 2007 13:28:12 -0600 [thread overview]
Message-ID: <20070112192812.GC10445@sergelap.austin.ibm.com> (raw)
In-Reply-To: <84144f020701120145r13d5d7bbndf652692f729ad9d@mail.gmail.com>
Quoting Pekka Enberg (penberg@cs.helsinki.fi):
> On 1/10/07, Serge E. Hallyn <serue@us.ibm.com> wrote:
> >Now, what slim needs isn't "revoke all files for this inode",
> >but "revoke this task's write access to this fd". So two functions
> >which could be useful are
> >
> > int fd_revoke_write(struct task_struct *tsk, int fd)
> > int fd_revoke_write_iter(struct task_struct *tsk,
> > (int *)need_revoke(struct task_struct *tsk, int
> > fd))
>
> This gets interesting. We probably need revokefs (which we use
> internally as a substitute for revoke inodes) to be stacked on top of
> the actual fs so that you can still read from the fd. But most of the
> revocation is still the same, we need to watch out for fork(2) and
> dup(2) and take down shared mappings.
Hmm, would revokefs need to be explicitly stacked on top of the fs,
or could we just swap out fdt[fd] for the revokefs file, and have
the revokefs file's private data point to the original inode, with
it's write function returning an error, and read being passed through?
Do you (or hch) then have a problem with these functions (sitting either
in fs/revoke.c or fs/file_table.c) calling mprotect to remove the write
permission from the mmap'ed segment? i.e. was the main objection to
mprotect being called from "just anywhere"?
-serge
next prev parent reply other threads:[~2007-01-12 19:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-08 13:41 mprotect abuse in slim Christoph Hellwig
2007-01-08 22:38 ` Mimi Zohar
2007-01-09 3:07 ` Arjan van de Ven
2007-01-09 9:46 ` Christoph Hellwig
2007-01-09 20:54 ` Chris Wright
2007-01-09 23:14 ` Serge E. Hallyn
2007-01-10 7:21 ` Pekka J Enberg
2007-01-10 15:58 ` Serge E. Hallyn
2007-01-11 7:39 ` Pekka Enberg
2007-01-11 15:49 ` Serge E. Hallyn
2007-01-12 7:43 ` Pekka Enberg
2007-01-12 15:17 ` Serge E. Hallyn
2007-01-12 9:45 ` Pekka Enberg
2007-01-12 19:28 ` Serge E. Hallyn [this message]
2007-01-12 19:53 ` Pekka J Enberg
2007-01-09 21:30 ` Mimi Zohar
2007-01-09 19:27 ` Valdis.Kletnieks
2007-01-09 21:45 ` Mimi Zohar
2007-01-11 14:35 ` Pavel Machek
2007-01-12 20:08 ` Mimi Zohar
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=20070112192812.GC10445@sergelap.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=hch@infradead.org \
--cc=kjhall@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=safford@watson.ibm.com \
--cc=zohar@us.ibm.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