[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Device model operation hypercall (DMOP, re qemu depriv)



>>> On 09.08.16 at 12:48, <ian.jackson@xxxxxxxxxxxxx> wrote:
> Jan Beulich writes ("Re: Device model operation hypercall (DMOP, re qemu 
> depriv)"):
>> Actually, having thought about this some more, and taking this
>> together with the expectations to the privcmd driver previously
>> outlined, I think this part is problematic: If all the driver is to know
>> is the position (within the interface structure) of the target domain
>> ID, then any guest handles embedded in the interface structure
>> (XEN_HVMCTL_track_dirty_vram only for now) couldn't get
>> validated, and hence user mode code would have a way to access
>> or modify kernel memory.
> 
> Could the hypervisor know the difference between user and kernel
> memory, in principle ?

Not without further new hypercalls, as the guest kernel would need
to tell Xen what address ranges are kernel vs user (and that implies
that any OS wishing to be able to act as Dom0 has a uniform
separation of address spaces).

> Alternatively, would it be possible for the ABI to specify somehow
> what parameters are guest handles, so that the privcmd driver could
> check them ?

We could presumably invent something, but I'm afraid it would end
up quite ugly.

>  (Would it be sufficient to check the starts, or would
> the ends need to be checked too?)

Both would need to be checked, so the size field(s) would need to
be locatable too.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.