From: "Keith M. Wesolowski" <wesolows@foobazco.org>
To: Jamie Lokier <jamie@shareable.org>
Cc: "David S. Miller" <davem@redhat.com>,
linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: A question about PROT_NONE on Sun4c 32-bit Sparc
Date: Thu, 1 Jul 2004 21:11:36 -0700 [thread overview]
Message-ID: <20040702041136.GA21360@foobazco.org> (raw)
In-Reply-To: <20040702010349.GF8950@mail.shareable.org>
On Fri, Jul 02, 2004 at 02:03:49AM +0100, Jamie Lokier wrote:
> I would like to know if the Sun4 and Sun4c ports have the same bug.
> I'm guessing not, but it's not clear to me from the code.
No, this code is ok.
> #define _SUN4C_PAGE_VALID 0x80000000
> #define _SUN4C_PAGE_SILENT_READ 0x80000000 /* synonym */
> ...
> #define _SUN4C_PAGE_READ 0x00800000 /* implemented in software */
> ...
> #define SUN4C_PAGE_NONE __pgprot(_SUN4C_PAGE_PRESENT)
> SUN4C_PAGE_NONE corresponds to PROT_NONE mmap memory protection.
> The question is whether PROT_NONE pages are readable by the _kernel_.
> I.e. whether write() would successfully read from those pages.
No, they are not. The _SUN4C_PAGE_SILENT_READ is the bit that allows
reading the page without trapping. If it's not set, you trap, and
do_sun4c_fault tests _SUN4C_PAGE_READ with no special case for
user/kernel. Since PROT_NONE doesn't include that bit, it's an oops.
> (By the way, as the sun4 files don't contain a definition of
> _SUN4_PAGE_FILE or pgoff_to_pte, but the sun4c one do, I guess the
> sun4 sub-architecture doesn't build in 2.6 but sun4c does?)
Correct, although I recently fixed this in my tree. It now builds but
nobody has tested it in ages and I believe it doesn't work.
--
Keith M Wesolowski
prev parent reply other threads:[~2004-07-02 4:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-30 3:05 A question about PROT_NONE on Sparc and Sparc64 Jamie Lokier
2004-06-30 5:17 ` David S. Miller
2004-06-30 15:21 ` wesolows
2004-06-30 8:28 ` Jakub Jelinek
2004-06-30 20:54 ` David S. Miller
2004-06-30 22:52 ` Jamie Lokier
2004-07-01 5:25 ` David S. Miller
2004-07-01 7:47 ` David S. Miller
2004-07-02 1:03 ` A question about PROT_NONE on Sun4c 32-bit Sparc Jamie Lokier
2004-07-02 4:11 ` Keith M. Wesolowski [this message]
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=20040702041136.GA21360@foobazco.org \
--to=wesolows@foobazco.org \
--cc=davem@redhat.com \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.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