libxc: remove most of tools/libxc/xc_dom_compat_linux.c
PATCH 1/1 libxc: remove most of tools/libxc/xc_dom_compat_linux.c
In tools/libxc/xc_dom_compat_linux.c only xc_linux_build() is currently being used by an in-tree component (qemu-xen). All other functions are superfluous wrappers of the domain builder which can be removed.
--- tools/libxc/include/xenguest.h | 52 -------------- tools/libxc/xc_dom_compat_linux.c | 142 +++++--------------------------------- tools/libxl/libxl_arch.h | 2 + 3 files changed, 20 insertions(+), 176 deletions(-)
tools/libxc/include/xenguest.h +0 -52
@@ -151,54 +151,6 @@ int xc_linux_build(xc_interface *xch,unsigned int console_evtchn, unsigned long *console_mfn); -/** The same interface, but the dom structure is managed by the caller */ -struct xc_dom_image ; -int xc_dom_linux_build (xc_interface *xch, -struct xc_dom_image *dom, -uint32_t domid, -unsigned int mem_mb, -const char *image_name, -const char *ramdisk_name, -unsigned long flags, -unsigned int store_evtchn, -unsigned long *store_mfn, -unsigned int console_evtchn, -unsigned long *console_mfn); - -/** -* This function will create a domain for a paravirtualized Linux -* using buffers for kernel and initrd -* -* @parm xch a handle to an open hypervisor interface -* @parm domid the id of the domain -* @parm mem_mb memory size in megabytes -* @parm image_buffer buffer containing kernel image -* @parm image_size size of the kernel image buffer -* @parm initrd_buffer name of the ramdisk image file -* @parm initrd_size size of the ramdisk buffer -* @parm cmdline command line string -* @parm flags domain creation flags -* @parm store_evtchn the store event channel for this domain to use -* @parm store_mfn returned with the mfn of the store page -* @parm console_evtchn the console event channel for this domain to use -* @parm conole_mfn returned with the mfn of the console page -* @return 0 on success, -1 on failure -*/ -int xc_linux_build_mem (xc_interface *xch, -uint32_t domid, -unsigned int mem_mb, -const char *image_buffer, -unsigned long image_size, -const char *initrd_buffer, -unsigned long initrd_size, -const char *cmdline, -const char *features, -unsigned long flags, -unsigned int store_evtchn, -unsigned long *store_mfn, -unsigned int console_evtchn, -unsigned long *console_mfn); -struct xc_hvm_firmware_module {uint8_t *data;uint32_t length;
@@ -276,10 +228,6 @@ int xc_await_suspend(xc_interface *xch, xc_evtchn *xce, int suspend_evtchn);int xc_suspend_evtchn_init_sane (xc_interface *xch,xc_evtchn *xce,int domid,int port,int *lockfd); -int xc_get_bit_size (xc_interface *xch, -const char *image_name,const char *cmdline, -const char *features,int *type); -int xc_mark_page_online (xc_interface *xch,unsigned long start,unsigned long end,uint32_t *status);
tools/libxc/xc_dom_compat_linux.c +18 -124
163 lines not on this page · raw message
tools/libxl/libxl_arch.h +2 -0
@@ -15,6 +15,8 @@#ifndef LIBXL_ARCH_H #define LIBXL_ARCH_H +struct xc_dom_image ; +/* fill the arch specific configuration for the domain */ _hidden int libxl__arch_domain_prepare_config(libxl__gc *gc,
Signature · 1 line
2.1.4
Quoted 6 lines · Juergen Gross
In
tools/libxc/xc_dom_compat_linux.conlyxc_linux_build()is currently being used by an in-tree component (qemu-xen). All other functions are superfluous wrappers of the domain builder which can be removed.Suggested-by Ian Campbell <[email protected]>Signed-off-by Juergen Gross <[email protected]>
Sorry, but NACK. They are *not* superfluous.
XenServer uses them; xc_dom_linux_build() is the only way to apply XSA-25 size restrictions to PV kernels and initrds.
~Andrew
Quoted 5 lines · Andrew Cooper
Quoted 4 lines · Juergen Gross
In
tools/libxc/xc_dom_compat_linux.conlyxc_linux_build()is currently being used by an in-tree component (qemu-xen). All other functions are superfluous wrappers of the domain builder which can be removed.
Quoted 8 lines
Quoted 2 lines
Suggested-by Ian Campbell <[email protected]>Signed-off-by Juergen Gross <[email protected]>Sorry, but NACK. They are *not* superfluous.
XenServer uses them;
xc_dom_linux_build()is the only way to apply XSA-25 size restrictions to PV kernels and initrds.
Could you explain a bit more about this? How could this particular function apply restrictions?
Unfortunately XSA-25 is not on XSA page so I have no idea what that is.
Wei.
Quoted 1 line
~Andrew
Quoted 13 lines · Wei Liu
Quoted 5 lines · Andrew Cooper
Quoted 4 lines · Juergen Gross
In
tools/libxc/xc_dom_compat_linux.conlyxc_linux_build()is currently being used by an in-tree component (qemu-xen). All other functions are superfluous wrappers of the domain builder which can be removed.Quoted 7 lines
Quoted 2 lines
Suggested-by Ian Campbell <[email protected]>Signed-off-by Juergen Gross <[email protected]>Sorry, but NACK. They are *not* superfluous.
XenServer uses them;
xc_dom_linux_build()is the only way to apply XSA-25 size restrictions to PV kernels and initrds.
Quoted 6 lines
Could you explain a bit more about this? How could this particular function apply restrictions?
Unfortunately XSA-25 is not on XSA page so I have no idea what that is.
Wei.
Older XSAs are listed on the wiki
http://wiki.xen.org/wiki/Security_Announcements
XSA-25 introduced xc_dom_{kernel,ramdisk}_max_size() to set upper decompression limits on the kernel and initrd.
To use them, a struct xc_dom_image *dom is needed, which means the only safe way of constructing PV domains is
xc_dom_allocate()xc_dom_kernel_max_size()xc_dom_ramdisk_max_size()xc_dom_linux_build()
To have the decompression limits in place before decompression starts.
~Andrew
Quoted 32 lines · Andrew Cooper
Quoted 15 lines · Wei Liu
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
In
tools/libxc/xc_dom_compat_linux.conlyxc_linux_build()is currently
being used by an in-tree component (qemu-xen). All other functions are
superfluous wrappers of the domain builder which can be removed.Quoted 7 lines
Quoted 2 lines
Suggested-by Ian Campbell <[email protected]>Signed-off-by Juergen Gross <[email protected]>Sorry, but NACK. They are *not* superfluous.
XenServer uses them;
xc_dom_linux_build()is the only way to apply XSA-25 size restrictions to PV kernels and initrds.Quoted 6 lines
Could you explain a bit more about this? How could this particular function apply restrictions?
Unfortunately XSA-25 is not on XSA page so I have no idea what that is.
Wei.
Older XSAs are listed on the wiki
http://wiki.xen.org/wiki/Security_AnnouncementsXSA-25 introduced xc_dom_{kernel,ramdisk}_max_size() to set upper decompression limits on the kernel and initrd.
To use them, a struct
xc_dom_image*dom is needed, which means the only safe way of constructing PV domains is
Quoted 6 lines
xc_dom_allocate()xc_dom_kernel_max_size()xc_dom_ramdisk_max_size()xc_dom_linux_build()To have the decompression limits in place before decompression starts.
No it isn't.
xc_dom_linux_build is implemented in terms of the non-compat xc_dom_* functions, so it should be possible to do what you want with out using the compat wrapper.
If there is some obscure reason this isn't the case then we should fix that, not carry around the compat options for ever as a workaround (fixes include but are not limited to promoting xc_dom_linux_build into a non -compat helper).
Ian.
Quoted 42 lines · Ian Campbell
Quoted 32 lines · Andrew Cooper
Quoted 15 lines · Wei Liu
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
In
tools/libxc/xc_dom_compat_linux.conlyxc_linux_build()is currently
being used by an in-tree component (qemu-xen). All other functions are
superfluous wrappers of the domain builder which can be removed.Quoted 7 lines
Quoted 2 lines
Suggested-by Ian Campbell <[email protected]>Signed-off-by Juergen Gross <[email protected]>Sorry, but NACK. They are *not* superfluous.
XenServer uses them;
xc_dom_linux_build()is the only way to apply XSA-25 size restrictions to PV kernels and initrds.Quoted 6 lines
Could you explain a bit more about this? How could this particular function apply restrictions?
Unfortunately XSA-25 is not on XSA page so I have no idea what that is.
Wei.
Older XSAs are listed on the wiki
http://wiki.xen.org/wiki/Security_AnnouncementsXSA-25 introduced xc_dom_{kernel,ramdisk}_max_size() to set upper decompression limits on the kernel and initrd.
To use them, a struct
xc_dom_image*dom is needed, which means the only safe way of constructing PV domains isQuoted 6 lines
xc_dom_allocate()xc_dom_kernel_max_size()xc_dom_ramdisk_max_size()xc_dom_linux_build()To have the decompression limits in place before decompression starts.
No it isn't.
Quoted 8 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_* functions, so it should be possible to do what you want with out using the compat wrapper.If there is some obscure reason this isn't the case then we should fix that, not carry around the compat options for ever as a workaround (fixes include but are not limited to promoting
xc_dom_linux_buildinto a non -compat helper).
Any further comments?
Andrew, are you okay with Ian's statement?
Ian, does this mean you are Ack-ing the patch?
Juergen
Ian Jackson
Acked-byJuergen Gross writes ("Re: [Xen-devel] [PATCH] libxc: remove most of tools/libxc/xc_dom_compat_linux.c"):
Quoted 9 lines · Ian Campbell
Quoted 8 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_* functions, so it should be possible to do what you want with out using the compat wrapper.If there is some obscure reason this isn't the case then we should fix that, not carry around the compat options for ever as a workaround (fixes include but are not limited to promoting
xc_dom_linux_buildinto a non -compat helper).
I agree with this approach.
Quoted 5 lines
Any further comments?
Andrew, are you okay with Ian's statement?
Ian, does this mean you are Ack-ing the patch?
Accordingly, in the absence of renewed objections, or alternative proposals, the original patch is:
Thanks,
Ian.
Quoted 20 lines · Ian Jackson
Juergen Gross writes ("Re: [Xen-devel] [PATCH] libxc: remove most of
tools/libxc/xc_dom_compat_linux.c"):Quoted 6 lines · Ian Campbell
Quoted 5 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_* functions, so it should be possible to do what you want with out using the
compat wrapper.Quoted 7 lines
Quoted 7 lines
If there is some obscure reason this isn't the case then we should fix
that, not carry around the compat options for ever as a workaround (fixes
include but are not limited to promotingxc_dom_linux_buildinto a non
-compat helper).I agree with this approach.
Quoted 2 lines
Any further comments?
Quoted 8 lines
Quoted 3 lines
Andrew, are you okay with Ian's statement?
Ian, does this mean you are Ack-ing the patch?
Accordingly, in the absence of renewed objections, or alternative proposals, the original patch is:
Acked-by Ian Jackson <[email protected]>
There was a conflict with "libxc: unify xc_dom_p2m_{host/guest}", where xc_dom_p2m_host became xc_dom_p2m. I tried to resolve in what I thought was the obvious way, but then I got many instances of:
In file included from libxl.c:19:0:
libxl_internal.h:1612:43: error: 'struct xc_dom_image' declared inside parameter list [-Werror]
struct xc_dom_image *dom);
^
libxl_internal.h:1612:43: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
Not sure if the original patch was wrong, has bit-rotted, or I messed up the conflict resolution. This happens on all arches.
Actually, looking back at it, the added "struct xc_dom_image" in libxl_arch.h is surely wrong, the right answer would be to include xc_dom.h somewhere appropriate it might be tolerable to just leave it in xenguest.h.
Juergen, please investigate the build failure, fix the above and resubmit.
Ian.
Quoted 40 lines · Ian Campbell
Quoted 20 lines · Ian Jackson
Juergen Gross writes ("Re: [Xen-devel] [PATCH] libxc: remove most of
tools/libxc/xc_dom_compat_linux.c"):Quoted 6 lines · Ian Campbell
Quoted 5 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_* functions, so it should be possible to do what you want with out using the
compat wrapper.Quoted 7 lines
Quoted 7 lines
If there is some obscure reason this isn't the case then we should fix
that, not carry around the compat options for ever as a workaround (fixes
include but are not limited to promotingxc_dom_linux_buildinto a non
-compat helper).I agree with this approach.
Quoted 2 lines
Any further comments?
Quoted 8 lines
Quoted 3 lines
Andrew, are you okay with Ian's statement?
Ian, does this mean you are Ack-ing the patch?
Accordingly, in the absence of renewed objections, or alternative proposals, the original patch is:
Acked-by Ian Jackson <[email protected]>There was a conflict with "libxc: unify xc_dom_p2m_{host/guest}", where
xc_dom_p2m_hostbecamexc_dom_p2m. I tried to resolve in what I thought was the obvious way, but then I got many instances of:In file included from libxl.c:19:0:
libxl_internal.h:1612:43: error: 'structxc_dom_image' declared inside parameter list [-Werror]
structxc_dom_image*dom);
^
libxl_internal.h:1612:43: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
Quoted 8 lines
Not sure if the original patch was wrong, has bit-rotted, or I messed up the conflict resolution. This happens on all arches.
Actually, looking back at it, the added "struct
xc_dom_image" inlibxl_arch.his surely wrong, the right answer would be to includexc_dom.hsomewhere appropriate it might be tolerable to just leave it inxenguest.h.Juergen, please investigate the build failure, fix the above and resubmit.
That was easy. Just removing the definition for libxl_arch.h, include xc_dom.h from libxl_internal.h and modify xc_dom.h to tolerate including it multiple times.
I've stumbled over another issue:
I don't know what I did wrong, but obviously the patch was built on top of the libxc python wrappers removal patch. Without that there are still some functions in use which I wanted to remove in xc_dom_compat_linux.c
As there was no objection for the intention of removing most of the wrappers I'll resend the xc_dom_compat_linux.c cleanup patch together with the libxc python wrappers cleanup in a series.
Juergen
Quoted 67 lines · Juergen Gross
Quoted 51 lines · Ian Campbell
Quoted 24 lines · Ian Jackson
Juergen Gross writes ("Re: [Xen-devel] [PATCH] libxc: remove most of
tools/libxc/xc_dom_compat_linux.c"):Quoted 7 lines · Ian Campbell
Quoted 6 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_*
functions, so it should be possible to do what you want with out using the
compat wrapper.Quoted 10 lines
Quoted 10 lines
If there is some obscure reason this isn't the case then we should
fix
that, not carry around the compat options for ever as a workaround
(fixes
include but are not limited to promotingxc_dom_linux_buildinto a
non
-compat helper).I agree with this approach.
Quoted 2 lines
Any further comments?
Quoted 8 lines
Quoted 3 lines
Andrew, are you okay with Ian's statement?
Ian, does this mean you are Ack-ing the patch?
Accordingly, in the absence of renewed objections, or alternative proposals, the original patch is:
Acked-by Ian Jackson <[email protected]>There was a conflict with "libxc: unify xc_dom_p2m_{host/guest}", where
xc_dom_p2m_hostbecamexc_dom_p2m. I tried to resolve in what I thought was
the obvious way, but then I got many instances of:In file included from libxl.c:19:0:
libxl_internal.h:1612:43: error: 'structxc_dom_image' declared
inside parameter list [-Werror]struct xc_dom_image *dom); ^ libxl_internal.h:1612:43: error: its scope is only this definitionor declaration, which is probably not what you want [-Werror]
Not sure if the original patch was wrong, has bit-rotted, or I messed up
the conflict resolution. This happens on all arches.Quoted 8 lines
Actually, looking back at it, the added "struct
xc_dom_image" inlibxl_arch.his surely wrong, the right answer would be to includexc_dom.h
somewhere appropriate it might be tolerable to just leave it inxenguest.h.Juergen, please investigate the build failure, fix the above and resubmit.
That was easy. Just removing the definition for
libxl_arch.h, includexc_dom.hfromlibxl_internal.hand modifyxc_dom.hto tolerate including it multiple times.I've stumbled over another issue:
Quoted 7 lines
I don't know what I did wrong, but obviously the patch was built on top of the libxc python wrappers removal patch. Without that there are still some functions in use which I wanted to remove in
xc_dom_compat_linux.cAs there was no objection for the intention of removing most of the wrappers I'll resend the
xc_dom_compat_linux.ccleanup patch together with the libxc python wrappers cleanup in a series.
OK. Please put the xc_dom_compat_linux.c parts towards the head of the series, such that they don't get blocked by any subsequent kvetching about any specific Python removal. (Except you should remove the Python wrappers for anything in xc_dom_compat_linux.c in the same patch as the removal of the C version).
Ian.
Quoted 76 lines · Ian Campbell
Quoted 67 lines · Juergen Gross
Quoted 51 lines · Ian Campbell
Quoted 24 lines · Ian Jackson
Juergen Gross writes ("Re: [Xen-devel] [PATCH] libxc: remove most of
tools/libxc/xc_dom_compat_linux.c"):Quoted 7 lines · Ian Campbell
Quoted 6 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_*
functions, so it should be possible to do what you want with out using the
compat wrapper.Quoted 10 lines
Quoted 10 lines
If there is some obscure reason this isn't the case then we should
fix
that, not carry around the compat options for ever as a workaround
(fixes
include but are not limited to promotingxc_dom_linux_buildinto a
non
-compat helper).I agree with this approach.
Quoted 2 lines
Any further comments?
Quoted 8 lines
Quoted 3 lines
Andrew, are you okay with Ian's statement?
Ian, does this mean you are Ack-ing the patch?
Accordingly, in the absence of renewed objections, or alternative proposals, the original patch is:
Acked-by Ian Jackson <[email protected]>There was a conflict with "libxc: unify xc_dom_p2m_{host/guest}", where
xc_dom_p2m_hostbecamexc_dom_p2m. I tried to resolve in what I thought was
the obvious way, but then I got many instances of:In file included from libxl.c:19:0:
libxl_internal.h:1612:43: error: 'structxc_dom_image' declared
inside parameter list [-Werror]struct xc_dom_image *dom); ^ libxl_internal.h:1612:43: error: its scope is only this definitionor declaration, which is probably not what you want [-Werror]
Not sure if the original patch was wrong, has bit-rotted, or I messed up
the conflict resolution. This happens on all arches.Quoted 8 lines
Actually, looking back at it, the added "struct
xc_dom_image" inlibxl_arch.his surely wrong, the right answer would be to includexc_dom.h
somewhere appropriate it might be tolerable to just leave it inxenguest.h.Juergen, please investigate the build failure, fix the above and resubmit.
That was easy. Just removing the definition for
libxl_arch.h, includexc_dom.hfromlibxl_internal.hand modifyxc_dom.hto tolerate including it multiple times.I've stumbled over another issue:
Quoted 7 lines
I don't know what I did wrong, but obviously the patch was built on top of the libxc python wrappers removal patch. Without that there are still some functions in use which I wanted to remove in
xc_dom_compat_linux.cAs there was no objection for the intention of removing most of the wrappers I'll resend the
xc_dom_compat_linux.ccleanup patch together with the libxc python wrappers cleanup in a series.
Quoted 5 lines
OK. Please put the
xc_dom_compat_linux.cparts towards the head of the series, such that they don't get blocked by any subsequent kvetching about any specific Python removal. (Except you should remove the Python wrappers for anything inxc_dom_compat_linux.cin the same patch as the removal of the C version).
Just to get it right: You are suggesting I do two patches:
- Patch 1: cleanup of xc_dom_compat_linux.c + removal of all python wrappers affected by this cleanup (this would be xc.linux_build() and xc.getBitSize() ).
- Patch 2: removal of the rest of the python wrappers
Is this your preferred approach?
Juergen
Quoted 99 lines · Juergen Gross
Quoted 89 lines · Ian Campbell
Quoted 84 lines · Juergen Gross
Quoted 60 lines · Ian Campbell
Quoted 27 lines · Ian Jackson
Juergen Gross writes ("Re: [Xen-devel] [PATCH] libxc: remove most of
tools/libxc/xc_dom_compat_linux.c"):Quoted 8 lines · Ian Campbell
Quoted 7 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_*
functions, so it should be possible to do what you want with out
using the
compat wrapper.Quoted 11 lines
Quoted 11 lines
If there is some obscure reason this isn't the case then we should
fix
that, not carry around the compat options for ever as a workaround
(fixes
include but are not limited to promotingxc_dom_linux_buildinto
a
non
-compat helper).I agree with this approach.
Quoted 2 lines
Any further comments?
Quoted 8 lines
Quoted 3 lines
Andrew, are you okay with Ian's statement?
Ian, does this mean you are Ack-ing the patch?
Accordingly, in the absence of renewed objections, or alternative proposals, the original patch is:
Acked-by Ian Jackson <[email protected]>There was a conflict with "libxc: unify xc_dom_p2m_{host/guest}", where
xc_dom_p2m_hostbecamexc_dom_p2m. I tried to resolve in what I thought
was
the obvious way, but then I got many instances of:In file included from libxl.c:19:0:
libxl_internal.h:1612:43: error: 'structxc_dom_image'
declared
inside parameter list [-Werror]
structxc_dom_image
*dom);
^
libxl_internal.h:1612:43: error: its scope is only this
definition
or declaration, which is probably not what you want [-Werror]Not sure if the original patch was wrong, has bit-rotted, or I messed
up
the conflict resolution. This happens on all arches.Quoted 8 lines
Actually, looking back at it, the added "struct
xc_dom_image" inlibxl_arch.his surely wrong, the right answer would be to includexc_dom.h
somewhere appropriate it might be tolerable to just leave it inxenguest.h.Juergen, please investigate the build failure, fix the above and resubmit.
That was easy. Just removing the definition for
libxl_arch.h, includexc_dom.hfromlibxl_internal.hand modifyxc_dom.hto tolerate including
it multiple times.I've stumbled over another issue:
I don't know what I did wrong, but obviously the patch was built on top
of the libxc python wrappers removal patch. Without that there are still
some functions in use which I wanted to remove inxc_dom_compat_linux.cQuoted 3 lines
As there was no objection for the intention of removing most of the wrappers I'll resend the
xc_dom_compat_linux.ccleanup patch together with the libxc python wrappers cleanup in a series.Quoted 8 lines
OK. Please put the
xc_dom_compat_linux.cparts towards the head of the series, such that they don't get blocked by any subsequent kvetching about
any specific Python removal. (Except you should remove the Python wrappers
for anything inxc_dom_compat_linux.cin the same patch as the removal of
the C version).
Quoted 5 lines
Just to get it right: You are suggesting I do two patches:
- Patch 1: cleanup of
xc_dom_compat_linux.c+ removal of all python wrappers affected by this cleanup (this would bexc.linux_build()andxc.getBitSize()).
Hrm, xc_get_bit_size seems like an odd thing to be in xc_dom_compat_linux.c(i.e. I wasn't expecting that sort of thing to be there).
I'd suggest doing most of xc_dom_compat_linux.c in a first patch (i.e. all the semantically related "build a domain" type stuff) and then xc_dom_bit_size separately.
Quoted 1 line
- Patch 2: removal of the rest of the python wrappers
I'm not sure exactly how much you are planning to remove in one fell swoop here. If it is lots of seemingly unrelated stuff then my preference would probably be to do it if possible in some vaguely related chunks by functionality, such that an objection to one piece of functionality being removed needn't block the entire patch.
Ian.
Quoted 55 lines · Juergen Gross
Quoted 48 lines · Ian Campbell
Quoted 33 lines · Andrew Cooper
Quoted 15 lines · Wei Liu
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
In
tools/libxc/xc_dom_compat_linux.conlyxc_linux_build()is currently
being used by an in-tree component (qemu-xen). All other functions are
superfluous wrappers of the domain builder which can be removed.Quoted 7 lines
Quoted 2 lines
Suggested-by Ian Campbell <[email protected]>Signed-off-by Juergen Gross <[email protected]>Sorry, but NACK. They are *not* superfluous.
XenServer uses them;
xc_dom_linux_build()is the only way to apply XSA-25 size restrictions to PV kernels and initrds.Quoted 7 lines
Could you explain a bit more about this? How could this particular function apply restrictions?
Unfortunately XSA-25 is not on XSA page so I have no idea what that is.
Wei.
Older XSAs are listed on the wiki
http://wiki.xen.org/wiki/Security_AnnouncementsXSA-25 introduced xc_dom_{kernel,ramdisk}_max_size() to set upper decompression limits on the kernel and initrd.
To use them, a struct
xc_dom_image*dom is needed, which means the only safe way of constructing PV domains isQuoted 6 lines
xc_dom_allocate()xc_dom_kernel_max_size()xc_dom_ramdisk_max_size()xc_dom_linux_build()To have the decompression limits in place before decompression starts.
No it isn't.
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_* functions, so it should be possible to do what you want with out using the
compat wrapper.Quoted 5 lines
If there is some obscure reason this isn't the case then we should fix that, not carry around the compat options for ever as a workaround (fixes
include but are not limited to promotingxc_dom_linux_buildinto a non -compat helper).
Quoted 3 lines
Any further comments?
Andrew, are you okay with Ian's statement?
Ah - I see that Xen 4.5 moves xc_dom.h from a private header file to a public header file.
This postdates the last time I played "how to make xenctrl/xenguest build a domain".
I shall see about modifying XenServer to use the gubbins from xc_dom.h
~Andrew
Wei Liu
Acked-byQuoted 42 lines · Ian Campbell
Quoted 32 lines · Andrew Cooper
Quoted 15 lines · Wei Liu
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Juergen Gross
In
tools/libxc/xc_dom_compat_linux.conlyxc_linux_build()is currently
being used by an in-tree component (qemu-xen). All other functions are
superfluous wrappers of the domain builder which can be removed.Quoted 7 lines
Quoted 2 lines
Suggested-by Ian Campbell <[email protected]>Signed-off-by Juergen Gross <[email protected]>Sorry, but NACK. They are *not* superfluous.
XenServer uses them;
xc_dom_linux_build()is the only way to apply XSA-25 size restrictions to PV kernels and initrds.Quoted 6 lines
Could you explain a bit more about this? How could this particular function apply restrictions?
Unfortunately XSA-25 is not on XSA page so I have no idea what that is.
Wei.
Older XSAs are listed on the wiki
http://wiki.xen.org/wiki/Security_AnnouncementsXSA-25 introduced xc_dom_{kernel,ramdisk}_max_size() to set upper decompression limits on the kernel and initrd.
To use them, a struct
xc_dom_image*dom is needed, which means the only safe way of constructing PV domains isQuoted 6 lines
xc_dom_allocate()xc_dom_kernel_max_size()xc_dom_ramdisk_max_size()xc_dom_linux_build()To have the decompression limits in place before decompression starts.
No it isn't.
Quoted 9 lines
xc_dom_linux_buildis implemented in terms of the non-compat xc_dom_* functions, so it should be possible to do what you want with out using the compat wrapper.If there is some obscure reason this isn't the case then we should fix that, not carry around the compat options for ever as a workaround (fixes include but are not limited to promoting
xc_dom_linux_buildinto a non -compat helper).
I agree with this reasoning so
Quoted 1 line
Ian.