Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between /dev/mem, /dev/kmem and /proc/kcore?

What is the difference between /dev/mem, /dev/kmem and /proc/kcore?

Can I disassemble its contents using tools like objdump and gdb?

like image 592
user567879 Avatar asked Mar 05 '26 16:03

user567879


1 Answers

/dev/kmem gives access to the kernel's virtual memory space, and /dev/mem gives access to physical memory.

/proc/kcore is a pseudofile in ELF core format, of the kernel's virtual memory space. You should be able to examine it with standard ELF utilities, like objdump and gdb - although you will likely better off to make a regular file copy of it and work on that.

like image 176
caf Avatar answered Mar 08 '26 10:03

caf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!