* Decoupled pte_read/write/exec()?
@ 2006-10-17 12:44 Paul Mundt
0 siblings, 0 replies; only message in thread
From: Paul Mundt @ 2006-10-17 12:44 UTC (permalink / raw)
To: linux-mm
I'm faced with a bit of an issue interfacing a new MMU. Our previous ones
were quite simple, lacking both explicit execute protections and
following write implies read semantics. In this new case however we have
a full read/write/execute set of permissions, for both user _and_ kernel
access, effectively allowing for user mappings that aren't readable by
the kernel.
What I've been doing so far is setting the access bits for both user and
kernel space in the PTE modifiers and clearing out the user bit when the
clear happens. This would seem to work, but I don't like the idea of
leaving stray permission bits set, particularly with regards to the exec
bit, though it is only for privileged space where it's not cleared.
Is there anything obvious that I'm missing? I suspect I will just have to
have a software _PAGE_USER bit that gets set in these places to figure
out which set of permissions to adjust, and make sure that the kernel
permission bits match the userspace bits so long as _PAGE_USER is set.
It looks like PowerPC is doing something similar, particularly with
regards to pte_mkexec()/pte_exprotect(), but this seems to deny the exec
permission to the kernel as well, where pte_rdprotect() simply clears the
user bit, and pte_wrprotect() simply implies user write protection.
--
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-17 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-17 12:44 Decoupled pte_read/write/exec()? Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox