Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

/dev/kmem no such device or address

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
paulbilkis
Posts: 3
Joined: 2011-06-18 09:49

/dev/kmem no such device or address

#1 Post by paulbilkis »

Hello,

I have recently built linux kernel ver. 4.13.9, with config options CONFIG_DEVKMEM and CONFIG_DEVMEM. I need access to kernel memory because of the homework, I need to look at the File Descriptor Table of some process in memory (yes, I know about /proc filesystem, but I want to look at the exact structure in the kernel memory).

So, I built kernel with those options. /dev/mem is working fine, but when I try to read something from /dev/kmem, I'm getting following error:

Code: Select all

user@debian-macbook:~$ sudo dd if=/dev/kmem bs=1k count=1 of=~/kmem
dd: error reading '/dev/kmem': No such device or address
0+0 records in
0+0 records out
0 bytes copied, 6.9563e-05 s, 0.0 kB/s
/dev/kmem is exist:

Code: Select all

user@debian-macbook:~$ file /dev/kmem
/dev/kmem: character special (1/2)
I'm running Debian 9:

Code: Select all

user@debian-macbook:~$ uname -a
Linux debian-macbook 4.13.9 #1 SMP Mon Oct 23 01:17:31 MSK 2017 x86_64 GNU/Linux
user@debian-macbook:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.2 (stretch)
Release:    9.2
Codename:   stretch
Please, tell me what is wrong with /dev/kmem, or maybe suggest a different approach?

Thank you.

PS. Those options are enabled for sure:

Code: Select all

user@debian-macbook:~$ cat /boot/config-4.13.9 | grep -Ee 'DEV(|K)MEM'
CONFIG_DEVMEM=y
CONFIG_DEVKMEM=y
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set

Post Reply