mem, kmem, allkmem - physical or virtual memory access
/dev/mem
/dev/kmem
/dev/allkmem
The file /dev/mem is a special file that provides access to the physical memory of the computer.
The file /dev/kmem is a special file that provides access to the virtual address space of the operating system kernel, excluding memory that is associated with an I/O device.
The file /dev/allkmem is a special file that provides access to the virtual address space of the operating system kernel, including memory that is associated with an I/O device. You can use any of these devices to examine and modify the system.
Byte addresses in /dev/mem are interpreted as physical memory addresses. Byte addresses in /dev/kmem and /dev/allkmem are interpreted as kernel virtual memory addresses. A reference to a non-existent location returns an error. See ERRORS for more information.
The file /dev/mem accesses physical memory; the size of the file is equal to the amount of physical memory in the computer. This size may be larger than 4GB on a system running the 32-bit operating environment. In this case, you can access memory beyond 4GB using a series of read(2) and write(2) calls, a pread64() or pwrite64() call, or a combination of llseek(2) and read(2) or write(2).
EFAULT
EIO
ENXIO
/dev/mem
/dev/kmem
/dev/allkmem
llseek(2), mmap(2), read(2), write(2)
Using these devices to modify (that is, write to) the address space of a live running operating system or to modify the state of a hardware device is extremely dangerous and may result in a system panic if kernel data structures are damaged or if device state is changed.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |