On Tue, 2003-12-02 at 14:26, Volker Kuhlmann wrote:
> Can't root always write to any memory, using some assembler
> instructions?
No, root cannot always write to memory. If a userland-process tries to
overwrite memory that is owned by another process it will get a
segfault, regardless of the owner. You could write a wacky kernel
module to overwrite parts of memory, but then it is not running as root,
and you don't have to use assembler to write a module. In addition
there are methods of preventing root and kernel modules from performing
certain actions. See SE Linux
http://www.nsa.gov/selinux/
for an example.
The kernel is also constrained by the architecture. For example, if the
kernel tries to write memory that is not correctly aligned on an
architecture that cares about such things (the sane ones) then it will
get a SIGBUS and Oops. (Assembler is not magic, and you are still
confined by the architecture.)
--
Michael JasonSmith http://www.ldots.org/