Skip to contentSkip to conversation

Info about /dev/kmem required

DISCUSSION Milind 3 participants 5 messages Aug 17, 2001 – Aug 21, 2001

lore
Share & tools
lore

Milind

author
#0 lore raw

Hi all

I wanted some info about ' /dev/kmem ' file with respect to following

1) What this file contains?

2) Who writes into this file?

All I have found is that 'dmesg' will read from this file and display system information.

Reply at the earliest.

Thanks
Milind

#1 lore raw
Quoted 5 lines · Milind

I wanted some info about ' /dev/kmem ' file with respect to following

1) What this file contains?

From Documentation/devices.txt:

1 char Memory devices
1 = /dev/mem Physical memory access
2 = /dev/kmem Kernel virtual memory access

Quoted 1 line

2) Who writes into this file?

Normally nobody does, though it can be used to patch up a running system (in theory).

Quoted 1 line

Reply at the earliest.

I'm sorry, we're not a helpdesk.

Erik

Signature · 5 lines
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [email protected]
WWW: http://www-ict.its.tudelft.nl/~erik/
#2 lore raw
In reply to Milind
Quoted 11 lines · Erik Mouw
Quoted 5 lines · Milind

I wanted some info about ' /dev/kmem ' file with respect to following

1) What this file contains?

From Documentation/devices.txt:

1 char Memory devices
1 = /dev/mem Physical memory access
2 = /dev/kmem Kernel virtual memory access

Quoted 8 lines
Quoted 1 line

2) Who writes into this file?

Normally nobody does, though it can be used to patch up a running system (in theory).

Quoted 1 line

Reply at the earliest.

I'm sorry, we're not a helpdesk.

I think You can use /dev/kmem as an corefile for gdb. So it is possible to debug the linux kernel (of course read only :-)).

Frank

Signature · 4 lines
Dipl.-Ing. Elektrotechnik     convergence integrated media gmbh / HW
Frank Neuber                        Rosenthalerstr.51 / 10178 Berlin
Email:  [email protected]           Phone:  +49(0)30-72 62 06 50
WWW:    www.convergence.de              Fax:    +49(0)30-72 62 06 55
#3 lore raw
In reply to Milind
Quoted 2 lines · Frank Neuber

I think You can use /dev/kmem as an corefile for gdb. So it is possible to debug the linux kernel (of course read only :-)).

No, that's what /proc/kcore is for.

Erik

Signature · 5 lines
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [email protected]
WWW: http://www-ict.its.tudelft.nl/~erik/
#4 lore raw
In reply to Milind
Quoted 5 lines · Erik Mouw
Quoted 2 lines · Frank Neuber

I think You can use /dev/kmem as an corefile for gdb. So it is possible to debug the linux kernel (of course read only :-)).

No, that's what /proc/kcore is for.

You are right!! Sorry it was my mistake.
Frank

Signature · 4 lines
Dipl.-Ing. Elektrotechnik     convergence integrated media gmbh / HW
Frank Neuber                        Rosenthalerstr.51 / 10178 Berlin
Email:  [email protected]           Phone:  +49(0)30-72 62 06 50
WWW:    www.convergence.de              Fax:    +49(0)30-72 62 06 55