Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I read somewhere (3.1.3) that there's a high ring (supervisor mode) and a low ring (user mode) and that some "things" can be run only from the highest ring.

What do they mean by "things"? I'd guess that includes what syscalls (read/write/open... ) do but is that it? Do they think of something lower level like the eventual ASM instruction(s)?

Is there a list somewhere of what is authorized in user-mode and what is not?

share|improve this question

1 Answer 1

The rings you're referring to are discussed here on Wikipedia, titled: Ring (computer security).

                                           ss of rings

Take a look at the Supervisor mode section, this is what Linux makes use of.

Linux and Windows are two operating systems that use supervisor/user-mode. To perform specialized functions, user-mode code must perform a system call into supervisor mode or even to the kernel space where trusted code of the operating system will perform the needed task and return it back to user space.

I would also take a look at the System Call page, which discusses the nature of these calls a bit more, paying special attention to the privileges discussed there:

However, many normal applications obviously need access to these components, so system calls are made available by the operating system to provide well-defined, safe implementations for such operations. The operating system executes at the highest level of privilege, and allows applications to request services via system calls, which are often executed via interrupts; an interrupt automatically puts the CPU into some required privilege level, and then passes control to the kernel, which determines whether the calling program should be granted the requested service. If the service is granted, the kernel executes a specific set of instructions over which the calling program has no direct control, returns the privilege level to that of the calling program, and then returns control to the calling program.

The Linux Kernel API may also shed some light on your questions as to what's in supervisory mode.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.