Re: mmap_min_addr and your local LSM (ok, just SELinux)

From: Andi Kleen
Date: Tue Jul 28 2009 - 12:24:04 EST


> Could the page table flags be used to mask this region? i.e. force
> PROT_NONE (with the "desired" flags stored elsewhere) and in the segv
> handler check if it is kernel or user space, and then fix-up the flags and
> continue if it's userspace? (I really don't know the internals on this,
> but it would need to restore PROT_NONE on task-switch or something...)

That's racy with multiple threads.
-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
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/