> Although, it is *okay* to use /dev/kmem for reading, it is a
> particularly bad idea to use it to write data into the kernel. That is
> because, if you want to change the value of a particular field in a
> kernel data structure for ex., you would find the offset of the object
> based on the kernel image & sometimes if you were  not sure as to
> which particular kernel you booted, your offset will be wrong & you
> would trash a certain kernel data structure possibly bringing down the
> whole system.

Not to mention the locking problem. Many data structures in the kernel
requires a lock to be acquired before being accessed, so this adds to
the challenge of finding the right address of the desired object.

So in short: never do that!

Alex.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to