Re: mprotect abuse in slim

From: Pekka J Enberg
Date: Fri Jan 12 2007 - 14:53:26 EST


On Fri, 12 Jan 2007, Serge E. Hallyn wrote:
> 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?

Swapping the fds should be sufficient.

On Fri, 12 Jan 2007, Serge E. Hallyn wrote:
> 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"?

I haven't seen the original patches so I don't knw what hch objected to.
It is not enough that we do mprotect, tough. We also must make sure the
task can't do mprotect on its own nor remap the memory region.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/