Privity level

123456789 123456789 123456789 123456789 123456789 123456789 123456789
What exactly is “privity level”? I have only found the term used in a
QNX
context. However, it looks like it is Intel processor specific. I
guess it has
something to do with the protected mode, but what exactly does
“privity
level 1” mean?


Vegard


My spelling is Wobbly. It’s good spelling
but it wobbles, and the letters get in the
wrong places. Winnie the Pooh
:wq

Shelley Joyce wrote:

What exactly is “privity level”? I have only found the term used in a
QNX context. However, it looks like it is Intel processor specific. I
guess it has something to do with the protected mode, but what exactly
does
“privity level 1” mean?

For more information refer to:
http://developer.intel.com/design/pentiumii/manuals/24319202.pdf

Basically, x86 processors have four privity levels (a.k.a. rings) with 0
being the most priviledged. For the most part, the QNX kernel runs at
ring 0, while user apps run at ring 3. Software cannot directly
manipulate resources (like memory) tagged with a privity level less than
it’s own. Hardware drivers run at ring 1 so they can’t trash the kernel,
but they can do pretty much anything else to the system like handle
interrputs and I/O ports.

Daryl Low
University of Waterloo

Shelley Joyce <Vegard.Bakke@bigfoot.com> wrote:
: 123456789 123456789 123456789 123456789 123456789 123456789 123456789
: What exactly is “privity level”? I have only found the term used in a
: QNX
: context. However, it looks like it is Intel processor specific. I
: guess it has
: something to do with the protected mode, but what exactly does
: “privity
: level 1” mean?

It is related to intel “ring” levels.

Intel defines three access levels:
ring 3 – no hardware access (user level processes)
ring 1 – hardware access – ioport, dual-ported memory, etc (+ring3)
ring 0 – CPU+bus configuration, cache configuration, NMI handling (+ring1)

QNX4 defines 3 (4) privity levels:
privity 3 – only ring 3 access (normal programs)
privity 1 – ring1 access (must be run by root)
privity 0 – privity 1 if run by root, privity 3 otherwise

And only the kernel, and anything called by the kernel (ie irq handlers)
have ring 0 access.

Chris


: Vegard

: –
: My spelling is Wobbly. It’s good spelling
: but it wobbles, and the letters get in the
: wrong places. Winnie the Pooh
: :wq

Daryl Low <dlow@undergrad.math.uwaterloo.ca> wrote:

Shelley Joyce wrote:

What exactly is “privity level”? I have only found the term used in a
QNX context. However, it looks like it is Intel processor specific. I
guess it has something to do with the protected mode, but what exactly
does
“privity level 1” mean?

For more information refer to:
http://developer.intel.com/design/pentiumii/manuals/24319202.pdf

Basically, x86 processors have four privity levels (a.k.a. rings) with 0
being the most priviledged. For the most part, the QNX kernel runs at
ring 0, while user apps run at ring 3. Software cannot directly
manipulate resources (like memory) tagged with a privity level less than
it’s own. Hardware drivers run at ring 1 so they can’t trash the kernel,

It is true that hardware drivers run at ring 1 – but this doesn’t
prevent them from trashing the kernel.

-David

Chris Travis <ctravis@qnx.com> wrote:

Hey Chris,

When you re-post stuff I’ve written, could you leave my name on it?

Thanks,
-David

Shelley Joyce <> Vegard.Bakke@bigfoot.com> > wrote:
: 123456789 123456789 123456789 123456789 123456789 123456789 123456789
: What exactly is “privity level”? I have only found the term used in a
: QNX
: context. However, it looks like it is Intel processor specific. I
: guess it has
: something to do with the protected mode, but what exactly does
: “privity
: level 1” mean?

It is related to intel “ring” levels.

Intel defines three access levels:
ring 3 – no hardware access (user level processes)
ring 1 – hardware access – ioport, dual-ported memory, etc (+ring3)
ring 0 – CPU+bus configuration, cache configuration, NMI handling (+ring1)

QNX4 defines 3 (4) privity levels:
privity 3 – only ring 3 access (normal programs)
privity 1 – ring1 access (must be run by root)
privity 0 – privity 1 if run by root, privity 3 otherwise

And only the kernel, and anything called by the kernel (ie irq handlers)
have ring 0 access.

Chris



: Vegard

: –
: My spelling is Wobbly. It’s good spelling
: but it wobbles, and the letters get in the
: wrong places. Winnie the Pooh
: :wq