From: Mike Shaver <shaver@netscape.com>
To: hppa-linux@thepuffingroup.com
Subject: Re: [hppa-linux] Gateway instructions
Date: Thu, 18 Mar 1999 11:55:04 -0500 [thread overview]
Message-ID: <36F12FE8.308782A2@netscape.com> (raw)
In-Reply-To: 199903181435.JAA14215@caliban.physics.utoronto.ca
Christopher Neufeld wrote:
> How does this work, now? Is the target of the gateway instruction
> intended to be simply a vector table of other jumps, preceded by some
> non-branch instruction which forms the taget of the gateway?
I suspected so, but was confounded by the same issues you bring up....
OpenBSD has this:
#define SYSCALLGATE 0xC0000000 /* syscall gateway page
*/
but I can't find it used anywhere else in the hppa-specific code, or
indeed the rest of the sys/ tree.
Here's how I think it works:
The GATE completer takes its privilege from the TLB entry for the page
_containing_ the BRANCH-with-GATE (see 4-5 in the PARISC 2.0 book). So
what we do is have a page (at 0xC0000000, probably) that has
appropriately high privilege level in the TLB, and yet is executable by
the user-space process. I think that means that the TLB access rights
field is [100,11,11]:
- execute: promote to privilege 0
- minimum privilege 3
- maximum privilege 3 (or do we care?)
The page contains:
???
B,GATE to syscall 0
???
B,GATE to syscall 1
???
B,GATE to syscall 2
etc.
I don't know what goes in ???, but clearly something is required so that
we don't get nailed by PSW[B]. Maybe a NOP, but probably something more
useful is required (set up space and other registers?). The access ID
for that page should probably be 0, to make it universally accessible.
Questions:
- how many privilege levels do we care about?
- is it sufficient to mark kernel data as [001,00,00] with an access ID
of 0 so that all processes can get at it (when they've become
beprivileged enough!) ? (With variants for code [100,00,00] and
read-only [000,00,00], of course.)
- what should go in ``???''? Just something that sets PSW[C]?
- am I totally on crack?
Mike
--
345127.74 293957.05
next prev parent reply other threads:[~1999-03-18 16:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-18 14:35 [hppa-linux] Gateway instructions Christopher Neufeld
1999-03-18 16:55 ` Mike Shaver [this message]
1999-03-18 18:05 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
1999-03-18 17:34 Bjorn Helgaas
1999-03-18 18:43 Cary Coutant
1999-03-18 21:51 ` Mike Shaver
1999-03-19 15:40 ` Kumar
1999-03-19 1:38 Cary Coutant
1999-03-19 6:10 ` Mike Shaver
1999-03-19 6:58 ` Mike Shaver
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=36F12FE8.308782A2@netscape.com \
--to=shaver@netscape.com \
--cc=hppa-linux@thepuffingroup.com \
/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