Skip to contentSkip to conversation

xen: Implement ioctl to restrict privcmd to a specific domain

PATCH Ian Campbell 4 participants 8 messages Jul 31, 2014 5 messages not in the archive ABI/API

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 1 line · Frediano Ziglio
 include/xen/interface/domctl.h     | 1090 ++++++++++++++++++++++++++++++++++++

domctl is an stable toolstack only hypervisor interface, so the kernel cannot use it because it would then break.

Ian.

#3 lore raw
In reply to a message not in the archive
Quoted 6 lines · Ian Campbell
Quoted 1 line · Frediano Ziglio
 include/xen/interface/domctl.h     | 1090 ++++++++++++++++++++++++++++++++++++

domctl is an stable toolstack only hypervisor interface, so the kernel cannot use it because it would then break.

Ok. I guess we'll have to resurrect the idea to do something with XSM.

David

#5 lore raw
In reply to a message not in the archive
Quoted 12 lines · David Vrabel
Quoted 6 lines · Ian Campbell
Quoted 1 line · Frediano Ziglio
 include/xen/interface/domctl.h     | 1090 ++++++++++++++++++++++++++++++++++++

domctl is an stable toolstack only hypervisor interface, so the kernel cannot use it because it would then break.

Ok. I guess we'll have to resurrect the idea to do something with XSM.

David

The code just require that:
- sizeof(struct xen_domctl) does not increase;
- position and size of cmd, domain and interface_version does not change;
- XEN_DOMCTL_createdomain is 1.

For safety there is a check on interface_version.

Frediano

#7 lore raw
In reply to a message not in the archive
Quoted 5 lines · Frediano Ziglio

The code just require that:
- sizeof(struct xen_domctl) does not increase;
- position and size of cmd, domain and interface_version does not change;
- XEN_DOMCTL_createdomain is 1.

This is not a stable interface, so you cannot actually rely on any of those.

For the first one in particular its not that hard to imagine someone needing a larger subop struct at some point.

Ian.

#9 lore raw
In reply to a message not in the archive
Quoted 9 lines · David Vrabel
Quoted 6 lines · Ian Campbell
Quoted 1 line · Frediano Ziglio
 include/xen/interface/domctl.h     | 1090 ++++++++++++++++++++++++++++++++++++

domctl is an stable toolstack only hypervisor interface, so the kernel cannot use it because it would then break.

Ok. I guess we'll have to resurrect the idea to do something with XSM.

What kind of thing did you have in mind for XSM?

In general it seems like allowing a vcpu to switch into an XSM label (not sure I've got the terminology right here) when it context switches into a particular process might be the most flexible way for that to work.

But would that actually be easier than implementing stub domains?

-George

#12 lore raw
In reply to a message not in the archive
Quoted 9 lines · David Vrabel
Quoted 6 lines · Ian Campbell
Quoted 1 line · Frediano Ziglio
 include/xen/interface/domctl.h     | 1090 ++++++++++++++++++++++++++++++++++++

domctl is an stable toolstack only hypervisor interface, so the kernel cannot use it because it would then break.

Ok. I guess we'll have to resurrect the idea to do something with XSM.

What kind of thing did you have in mind for XSM?

In general it seems like allowing a vcpu to switch into an XSM label (not sure I've got the terminology right here) when it context switches into a particular process might be the most flexible way for that to work.

But would that actually be easier than implementing stub domains?

-George

#10 lore raw
In reply to George Dunlap
Quoted 4 lines · George Dunlap
Quoted 3 lines · David Vrabel
Quoted 2 lines · Ian Campbell

On Thu, 2014-07-31 at 14:16 +0100, Frediano Ziglio wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
 include/xen/interface/domctl.h     | 1090 ++++++++++++++++++++++++++++++++++++

domctl is an stable toolstack only hypervisor interface, so the kernel cannot use it because it would then break.

Ok. I guess we'll have to resurrect the idea to do something with XSM.

What kind of thing did you have in mind for XSM?

A multicall-like hypercall that has an additional parameter for a handle to a XSM context to use for the contained hypercalls.

Quoted 4 lines

In general it seems like allowing a vcpu to switch into an XSM label (not sure I've got the terminology right here) when it context switches into a particular process might be the most flexible way for that to work.

I think we want something than can a different policy on a per-fd basis.

David

#11 lore raw
In reply to George Dunlap
Quoted 4 lines · George Dunlap
Quoted 3 lines · David Vrabel
Quoted 2 lines · Ian Campbell

On Thu, 2014-07-31 at 14:16 +0100, Frediano Ziglio wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
 include/xen/interface/domctl.h     | 1090 ++++++++++++++++++++++++++++++++++++

domctl is an stable toolstack only hypervisor interface, so the kernel cannot use it because it would then break.

Ok. I guess we'll have to resurrect the idea to do something with XSM.

What kind of thing did you have in mind for XSM?

A multicall-like hypercall that has an additional parameter for a handle to a XSM context to use for the contained hypercalls.

Quoted 4 lines

In general it seems like allowing a vcpu to switch into an XSM label (not sure I've got the terminology right here) when it context switches into a particular process might be the most flexible way for that to work.

I think we want something than can a different policy on a per-fd basis.

David