From: Paul Mundt <lethal@linux-sh.org>
To: linux-mm@kvack.org
Subject: Decoupled pte_read/write/exec()?
Date: Tue, 17 Oct 2006 21:44:44 +0900 [thread overview]
Message-ID: <20061017124444.GA17640@linux-sh.org> (raw)
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>
reply other threads:[~2006-10-17 12:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20061017124444.GA17640@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-mm@kvack.org \
/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