Allow unrestricted access to /dev/mem
device on restricted Linux kernels.
If the kernel is compiled with the option CONFIG_STRICT_DEVMEM=y
the /dev/mem
block device won't allow access beyond the first 1 MB of memory.
Learn more here: https://lwn.net/Articles/267427/
This kernel module can be used to bypass that restriction without having to recompile the kernel.
- clone repository
make
sudo insmod devmem-full-access.ko
sudo dd if=/dev/mem of=/dev/null bs=1 skip=1048576 count=1
- If your kernel has strict devmem enabled, you'll see the message
dd: error reading ‘/dev/mem’: Operation not permitted
- After loading the module you'll see
1 byte (1 B) copied
and this means you may read/write/seek to any point in memory.
sudo rmmod devmem-full-access
GPL
Absolutely none. Your system may go up in flames at any given moment.