[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/45830: reading :dev/mem panics an i386 domU
The following reply was made to PR kern/45830; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
Subject: Re: kern/45830: reading :dev/mem panics an i386 domU
Date: Sun, 15 Jan 2012 07:45:05 +0000
On Fri, Jan 13, 2012 at 08:25:02PM +0000, Manuel Bouyer wrote:
> > No, this is not a bug, especially not, if this is run by root.
> It is a bug, the NetBSD kernel should not ask the hypervisor to
> map memory it's not allowed to map.
In what way?
The same as you can (carefully) use /dev/mem to access objects present
in physical memory that the kernel doesn't know about, you should be
able to use /dev/mem to access objects present in "physical" memory
that the hypervisor puts there but that the kernel nonetheless doesn't
know about. If you do it wrong, the hypervisor punts you off, same as
real hardware would (except less messily).
Unless I suppose there's some guarantee that no such things can or
will ever appear, but that seems implausible.
(Also, don't some of the domU devices have memory-mapped parts?
Randomly touching such things can break the kernel just as readily as
touching hardware registers. Or am I thinking of some other VMM?)
David A. Holland
Main Index |
Thread Index |