LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-14-2011, 12:19 AM   #1
leechaotang
LQ Newbie
 
Registered: Aug 2011
Posts: 10

Rep: Reputation: Disabled
Access physical memory in Dom0 from kernel in DomU


Hi,

I want to access a physical address in Dom0 from the kernel in DomU, how can I do it?

I try to do it by the following step,

1. Allocate a virtual memory address space in DomU kernel.
struct vm_struct * get_vm_area (unsigned long size, unsigned long flags);

2. Map the virtual memory address space to physical address in Dom0
???????????


Is there function call can do the ???????? part ?
 
Old 11-14-2011, 12:34 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Hi
Sorry, but wouldn't that be a security breach? I always thought that domUs/VMs were supposed to be self-contained and not able to directly communicate to the outer world... (and that it would therefore be more "secure" to run a dangerous app in a VM rather than on the physical machine).
 
Old 11-14-2011, 05:47 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Yup ... the virtual-machine monitor ensures that each VM is separate.
 
Old 11-16-2011, 04:51 PM   #4
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
So, leechaotang, forget it - unless you're a cracker and you find a 0-day exploit for the VM that you're using.
Or if you want to hear about crazy ideas you could e.g. copy in the dom0, using a cronjob, the whole memory content to a file and access it via a share from domU or some more direct way again using softlinks, pipes, tubes or whatever... .
Don't wanna think about it - I'll leave the dark arts of memory access through VMs to you so that you have a chance of becoming famous (please mention sundialsvcs and Pearlseattle when you're interviewed by Slashdot)
 
Old 11-16-2011, 05:30 PM   #5
leechaotang
LQ Newbie
 
Registered: Aug 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hi,

Maybe I am not show my issue clearly, I mean I can do anything on Dom0/DomU and I want to access the SRAM physical address on Dom0 from DomU.

I use the KVM hypervisor, someone talk to me to modify the page table, but it is a little tough ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Set up F15 PV DomU at Xen 4.1 (kernel 3.0.0-5-generic) Dom0 on Ubuntu Oneiric LXer Syndicated Linux News 0 07-19-2011 03:00 AM
LXer: Set up Ubuntu 10.04 Server PV DomU at Xen 4.0 Dom0 (pvops 2.6.32.12 kernel) Dom LXer Syndicated Linux News 0 04-29-2010 01:10 AM
LXer: Setup Ubuntu 9.10 Server PV DomU at Xen 3.4.1 Dom0 (2.6.31.6 pvops kernel) on t LXer Syndicated Linux News 0 11-22-2009 05:30 PM
LXer: Setup Ubuntu 9.10 Server PV DomU at Xen 3.4.1 Dom0 (2.6.31.6 pvops kernel) on t LXer Syndicated Linux News 0 11-22-2009 02:01 PM
How to access Physical memory not mapped in kernel sbc Programming 0 02-09-2009 09:13 AM

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

All times are GMT -5. The time now is 07:28 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