4 ms·
>> A Linux kernel module is a piece of compiled binary code that is inserted directly into the Linux kernel, running at ring 0, the lowest and least protected r
by ramzyo 9y ago
>> A Linux kernel module is a piece of compiled binary code that is inserted directly into the Linux kernel, running at ring 0, the lowest and least protected ring of execution in the x86–64 processor.
The author seems to be implying that rings are implemented at the processor level for x86-64 processors. If I’m interpreting the wording correctly that’s interesting! Coming from the ARM world I’d always thought that rings were an OS construct.
- bravo22 9y agoARM has modes which is somewhat analogous to x86 rings.
- joosters 9y agoMost chips have different privilege levels... ARM processors have 'modes' like User, FIQ, IRQ and Supervisor (sort of the equivalent to ring 0). Different modes can have different access controls, e.g. varying access to memory. Edit: See http://www.heyrick.co.uk/armwiki/Processor_modes http://www.heyrick.co.uk/armwiki/Processor_modes
- ramzyo 9y agoRight - out of curiosity do you know if the Linux kernel uses the term "ring", or some other terminology to map to the underlying hardware implementation, be they rings for x86 or modes for ARM? Maybe it's just "privilege level" or something similar?
- JoshTriplett 9y agoThe Linux kernel just talks about "kernel mode" and "user mode" (or "userspace"). Those then map to ring 0 and ring 3 on x86, or other mechanisms on other platforms.
- ramzyo 9y agoCool, thanks!
- carussell 9y agoGustavo Duartes has a really great blog[1] about kernels and low-level development, with Linux on x86/amd64 being the reference. Here[2] is the one where he goes into CPU rings and kernel- versus user-mode. 1. http://duartes.org/gustavo/blog/archives/ http://duartes.org/gustavo/blog/archives/ 2. http://duartes.org/gustavo/blog/post/cpu-rings-privilege-and-protection/ http://duartes.org/gustavo/blog/post/cpu-rings-privilege-and...
- topspin 9y agoThe genesis of hardware protected modes in x86 devices go back to 1982 and the 80286.