LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-03-2006, 03:58 AM   #1
wwc
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
mmap() of /dev/kmem - can it work?


Hello:

I am trying to see if it is possible to read/write Linux kernel memory from a userland program by calling mmap() on /dev/kmem. I know there is code in the kernel intended to support this (/drivers/char/mem.c, function called mmap_kmem()), but I also know it has been broken at some points in the kernel's development. For example, Torvalds indicated that it was broken in 2.6.12 (he committed a partial fix).

What I want to know is what is the state of support for mmap()ing /dev/kmem in the latest versions of the kernel (2.4.x or 2.6.x branches)? Or, alternatively, is there a particular kernel version in which this works?

The fix Torvalds committed for 2.6.13 (still there as of 2.6.15.2) only partly works. I've been able to read from the kernel's base address using that version, but not from any offset within the kernel.

Does anyone know anything about this issue?
 
Old 02-04-2006, 01:47 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Well, a day without a response now...

Perhaps this is too specialized of a question, and you should ask on the LKML or at kerneltrap, where the kernel hackers hang out.

Just an idea.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount /dev/hdc /dev/cdrom doesn't work ShrikesHarvest Linux - Newbie 10 02-21-2009 07:05 AM
cd /dev/hda dosn't work iarebob Ubuntu 4 01-13-2006 08:49 PM
Quake 1, snd_linux.c using mmap(/dev/dsp) randyding Programming 1 06-19-2005 09:22 AM
mount /dev/sda1 doesn't work Pyro-dragon Linux - Newbie 6 04-17-2005 10:42 AM
Missing file /dev/kmem in Fedora 3 deardron Fedora 0 04-16-2005 12:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration