LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-27-2011, 12:07 AM   #1
vishal00100
LQ Newbie
 
Registered: May 2011
Posts: 1

Rep: Reputation: Disabled
/dev/mem Help


So, I need to take a memory dump of my Ubuntu machine. I tried using dd, but it turns out that for kernel 2.6 (mine is 2.6.38- /dev/mem is disabled. I have literally tried everything that I could find on the internet. So if someone could give me clear instructions that would be great. I have tried changing the Kconfig.debug ad setting STRICT_DEVMEM=y. That did not work. So I added the lines config NONPROMISC_DEVMEM
bool "Disable Promiscuous dev/mem"
default n
---help---....
If in doubt, say Y.
That also did work.
I also looked at some solutions which said that changes need to be made to other (arch/x86/mm/init_32.c, init_64.c, drivers/char/mem.c). But I do not see those files.

I don't know if I'm doing anything wrong.
Can someone please let me know if there's anything else I need to do? Also, should I rebuild the kernel once I make changes to that file?
 
Old 05-28-2011, 09:48 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
If you are wanting to change the kernel configuration, then yes, you will need to at least recompile the modules that use those configurations. The solutions that suggest changing kernel files require that you get the kernel source package first, make the changes, then recompile the kernel.

Alternatively, you would insert your own kernel module that can access ram without restrictions (eg fmem).
 
Old 06-01-2011, 02:14 AM   #3
pavan8085
LQ Newbie
 
Registered: May 2011
Location: Bangalore, India
Distribution: Ubuntu
Posts: 13

Rep: Reputation: 8
Quote:
I have tried changing the Kconfig.debug ad setting STRICT_DEVMEM=y.
In fact it should be the other way round. If you set CONFIG_STRICT_DEVMEM = y, you'll definitely not be allowed to access certain parts in the physical address space. As far as I know, CONFIG_STRICT_DEVMEM is enabled by defualt ( that is set to 'y' ) in Ubuntu, so you should in fact set it to 'n' and then try
Quote:
I also looked at some solutions which said that changes need to be made to other (arch/x86/mm/init_32.c, init_64.c, drivers/char/mem.c). But I do not see those files.
Very surprising! I've Kernel 2.6.37.1 and mem.c is very much there. Please check your sources again.

Also check for functions like range_is_allowed()(drivers/char/mem.c) and devmem_is_allowed()(arch/x86/mm/init.c) in your source and you can learn why your /dev/mem is being blocked!
 
  


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
/dev/mem permissions pavan8085 Linux - Kernel 1 05-27-2011 11:13 AM
/dev/mem permissions pavan8085 Linux - Mobile 3 05-27-2011 07:35 AM
[SOLVED] Stupidly ran "cat /dev/urandom > /dev/mem", worried I broke firmware crosstalk Linux - Hardware 2 10-25-2010 05:27 PM
What would happen if I where to cat /dev/mem > /dev/null Joey.Dale Linux - General 11 07-26-2009 12:46 PM
Startx Permission problems on /dev/null and /dev/mem on freshly compiled 2.6.22.1 Eric_Cartman Linux - Kernel 2 09-09-2007 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:58 PM.

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