xSplice fixes (+1)
v2 cover xSplice fixes (+1)
Hello,
This series contains bugfixes for xSplice, that popped up when testing it on OSes != Linux. Patch 6/6 is a bugfix for the migration code, that was incorrectly using a XEN_E* value.
I think they should all go into 4.7 on the basis that they are bugfixes.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 1/6 libxl: add a define for equivalent ENODATA errno on FreeBSD
Currently FreeBSD lacks the ENODATA errno value, so the privcmd driver always translates ENODATA to ENOENT, add a define to libxl in order to correctly match ENODATA with ENOENT on FreeBSD.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
--- tools/libxl/libxl_osdeps.h | 7 +++++++ 1 file changed, 7 insertions(+)
tools/libxl/libxl_osdeps.h +7 -0
@@ -52,6 +52,13 @@#include <libutil.h> #include <sys/endian.h> #include <uuid.h> +/* +* FreeBSD doesn't have ENODATA errno ATM, so privcmd always translates +* ENODATA into ENOENT. +*/ +#ifndef ENODATA +#define ENODATA ENOENT +#endif #endif #ifndef SYSFS_USBBACK_DRIVER
Signature · 7 lines
2.6.4 (Apple Git-63) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD
Quoted 5 lines · Roger Pau Monne
Currently FreeBSD lacks the ENODATA errno value, so the privcmd driver always translates ENODATA to ENOENT, add a define to libxl in order to correctly match ENODATA with ENOENT on FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>
As a related note, I guess the long term plan is to add ENODATA to FreeBSD?
Quoted 28 lines
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>--- tools/libxl/libxl_osdeps.h | 7 +++++++ 1 file changed, 7 insertions(+)tools/libxl/libxl_osdeps.h +7
-0@@ -52,6 +52,13 @@#include <libutil.h> #include <sys/endian.h> #include <uuid.h> +/* +* FreeBSD doesn't have ENODATA errno ATM, so privcmd always translates +* ENODATA into ENOENT. +*/ +#ifndef ENODATA +#define ENODATA ENOENT +#endif #endif #ifndef SYSFS_USBBACK_DRIVER Signature · 1 line
2.6.4 (Apple Git-63)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 2/6 tools/xsplice: corrently use errno
In reply to Roger Pau MonneSome error paths incorrectly used rc instead of errno.
---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
Changes since v1:
- Fix error message.
--- tools/misc/xen-xsplice.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
tools/misc/xen-xsplice.c +4 -3
@@ -272,8 +272,8 @@ int action_func(int argc, char *argv[], unsigned int idx) rc =xc_xsplice_get (xch, name, &status);if ( rc ) { -fprintf (stderr,"%s failed to get status (rc=%d, %s)!\n" , - name, -rc,strerror (-rc)); +fprintf (stderr,"%s failed to get status %d(%s)!\n" , + name, errno,strerror (errno));return -1 ; }if ( status.rc == -EAGAIN )
@@ -295,7 +295,8 @@ int action_func(int argc, char *argv[], unsigned int idx) rc = action_options[idx].function (xch, name,0 );if ( rc ) { -fprintf (stderr,"%s failed with %d(%s)\n" , name, -rc,strerror (-rc)); +fprintf (stderr,"%s failed with %d(%s)\n" , name, errno, +strerror (errno));return -1 ; } }
Signature · 7 lines
2.6.4 (Apple Git-63) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno
Quoted 3 lines · Roger Pau Monne
Some error paths incorrectly used rc instead of errno.
Signed-off-by Roger Pau Monné <[email protected]>
Quoted 40 lines
---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
Changes since v1:
- Fix error message.--- tools/misc/xen-xsplice.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)tools/misc/xen-xsplice.c +4
-3@@ -272,8 +272,8 @@ int action_func(int argc, char *argv[], unsigned int idx) rc =xc_xsplice_get (xch, name, &status);if ( rc ) { -fprintf (stderr,"%s failed to get status (rc=%d, %s)!\n" , - name, -rc,strerror (-rc)); +fprintf (stderr,"%s failed to get status %d(%s)!\n" , + name, errno,strerror (errno));return -1 ; }if ( status.rc == -EAGAIN )@@ -295,7 +295,8 @@ int action_func(int argc, char *argv[], unsigned int idx) rc = action_options[idx].function (xch, name,0 );if ( rc ) { -fprintf (stderr,"%s failed with %d(%s)\n" , name, -rc,strerror (-rc)); +fprintf (stderr,"%s failed with %d(%s)\n" , name, errno, +strerror (errno));return -1 ; } }Signature · 1 line
2.6.4 (Apple Git-63)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 3/6 tools/xsplice: fix mixing system errno values with Xen ones.
In reply to Roger Pau MonneAvoid using system errno values when comparing with Xen errno values.
---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
Using errno values inside of hypercall structs is not right IMHO, but there are already several occurrences of this. Although I'm adding the correct XEN_ prefixes here, it's very likely that new additions/modifications to this file will not take this into account, breaking it for OSes != Linux.
--- tools/misc/xen-xsplice.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
tools/misc/xen-xsplice.c +5 -3
@@ -13,6 +13,8 @@#include <xenctrl.h> #include <xenstore.h> +#include <xen/errno.h> +static xc_interface *xch;void show_help (void )
@@ -233,7 +235,7 @@ struct { .function = xc_xsplice_revert, }, { .allow = XSPLICE_STATE_CHECKED, - .expected = -ENOENT, + .expected = -XEN_ENOENT, .name = "unload", .function = xc_xsplice_unload, },
@@ -276,7 +278,7 @@ int action_func(int argc, char *argv[], unsigned int idx) name, errno, strerror(errno));return -1 ; } -if ( status.rc == -EAGAIN ) +if ( status.rc == -XEN_EAGAIN ) {fprintf (stderr,"%s failed. Operation already in progress\n" , name);return -1 ;
@@ -319,7 +321,7 @@ int action_func(int argc, char *argv[], unsigned int idx)if ( status.state != original_state )break ; -if ( status.rc && status.rc != -EAGAIN ) +if ( status.rc && status.rc != -XEN_EAGAIN ) { rc = status.rc;break ;
Signature · 7 lines
2.6.4 (Apple Git-63) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
Quoted 3 lines · Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values.
Signed-off-by Roger Pau Monné <[email protected]>
Quoted 57 lines
---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
Using errno values inside of hypercall structs is not right IMHO, but there are already several occurrences of this. Although I'm adding the correctXEN_prefixes here, it's very likely that new additions/modifications to this file will not take this into account, breaking it for OSes != Linux.--- tools/misc/xen-xsplice.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)tools/misc/xen-xsplice.c +5
-3@@ -13,6 +13,8 @@#include <xenctrl.h> #include <xenstore.h> +#include <xen/errno.h> +static xc_interface *xch;void show_help (void )@@ -233,7 +235,7 @@ struct { .function = xc_xsplice_revert, }, { .allow = XSPLICE_STATE_CHECKED, - .expected = -ENOENT, + .expected = -XEN_ENOENT, .name = "unload", .function = xc_xsplice_unload, },@@ -276,7 +278,7 @@ int action_func(int argc, char *argv[], unsigned int idx) name, errno, strerror(errno));return -1 ; } -if ( status.rc == -EAGAIN ) +if ( status.rc == -XEN_EAGAIN ) {fprintf (stderr,"%s failed. Operation already in progress\n" , name);return -1 ;@@ -319,7 +321,7 @@ int action_func(int argc, char *argv[], unsigned int idx)if ( status.state != original_state )break ; -if ( status.rc && status.rc != -EAGAIN ) +if ( status.rc && status.rc != -XEN_EAGAIN ) { rc = status.rc;break ;Signature · 1 line
2.6.4 (Apple Git-63)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
In reply to Roger Pau MonneQuoted 3 lines · Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values.
Signed-off-by Roger Pau Monné <[email protected]>
And since Wei acked it I may as well put it in now after some tests.
Quoted 57 lines
---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
Using errno values inside of hypercall structs is not right IMHO, but there are already several occurrences of this. Although I'm adding the correctXEN_prefixes here, it's very likely that new additions/modifications to this file will not take this into account, breaking it for OSes != Linux.--- tools/misc/xen-xsplice.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)tools/misc/xen-xsplice.c +5
-3@@ -13,6 +13,8 @@#include <xenctrl.h> #include <xenstore.h> +#include <xen/errno.h> +static xc_interface *xch;void show_help (void )@@ -233,7 +235,7 @@ struct { .function = xc_xsplice_revert, }, { .allow = XSPLICE_STATE_CHECKED, - .expected = -ENOENT, + .expected = -XEN_ENOENT, .name = "unload", .function = xc_xsplice_unload, },@@ -276,7 +278,7 @@ int action_func(int argc, char *argv[], unsigned int idx) name, errno, strerror(errno));return -1 ; } -if ( status.rc == -EAGAIN ) +if ( status.rc == -XEN_EAGAIN ) {fprintf (stderr,"%s failed. Operation already in progress\n" , name);return -1 ;@@ -319,7 +321,7 @@ int action_func(int argc, char *argv[], unsigned int idx)if ( status.state != original_state )break ; -if ( status.rc && status.rc != -EAGAIN ) +if ( status.rc && status.rc != -XEN_EAGAIN ) { rc = status.rc;break ;Signature · 1 line
2.6.4 (Apple Git-63)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
Quoted 9 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values.
Signed-off-by Roger Pau Monné <[email protected]>Reviewed-by Konrad Rzeszutek Wilk <[email protected]>And since Wei acked it I may as well put it in now after some tests.
I don't expect it would make a difference on Linux, but more testing wouldn't hurt.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
Quoted 6 lines · Wei Liu
Quoted 5 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values.
Signed-off-by Roger Pau Monné <[email protected]>
Quoted 7 lines
Quoted 4 lines
Reviewed-by Konrad Rzeszutek Wilk <[email protected]>And since Wei acked it I may as well put it in now after some tests.
I don't expect it would make a difference on Linux, but more testing wouldn't hurt.
Right. I stuck 'Reviewed-by' on all of them except the "libxl: fix usage of XEN_EOPNOTSUPP"
And they are ready to be checked in (after I test them)- so just give me the heads up when you would like that.
Quoted 2 lines
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
Quoted 9 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Wei Liu
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values.
Signed-off-by Roger Pau Monné <[email protected]>Reviewed-by Konrad Rzeszutek Wilk <[email protected]>
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
And since Wei acked it I may as well put it in now after some tests.
I don't expect it would make a difference on Linux, but more testing wouldn't hurt.
Right. I stuck 'Reviewed-by' on all of them except the "libxl: fix usage of
XEN_EOPNOTSUPP"
I stuck your reviewed-by to the 3 xsplice patches in my branch and queued up all 4 patches for committing.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
Quoted 16 lines · Wei Liu
Quoted 15 lines · Konrad Rzeszutek Wilk
Quoted 13 lines · Wei Liu
Quoted 9 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values.
Signed-off-by Roger Pau Monné <[email protected]>Reviewed-by Konrad Rzeszutek Wilk <[email protected]>And since Wei acked it I may as well put it in now after some tests.
I don't expect it would make a difference on Linux, but more testing wouldn't hurt.
Quoted 6 lines
Quoted 3 lines
Right. I stuck 'Reviewed-by' on all of them except the "libxl: fix usage of
XEN_EOPNOTSUPP"I stuck your reviewed-by to the 3 xsplice patches in my branch and queued up all 4 patches for committing.
Thanks. They are all tested from me as well.
Quoted 2 lines
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
In reply to Konrad Rzeszutek WilkQuoted 9 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Wei Liu
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values.
Signed-off-by Roger Pau Monné <[email protected]>Reviewed-by Konrad Rzeszutek Wilk <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
And since Wei acked it I may as well put it in now after some tests.
I don't expect it would make a difference on Linux, but more testing wouldn't hurt.
Right. I stuck 'Reviewed-by' on all of them except the "libxl: fix usage of
XEN_EOPNOTSUPP"
I think you missed patch 5/6 (xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads), which also needs you reviewed-by.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 4/6 xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
In reply to Roger Pau MonneThey are equivalent, but using ELFOSABI_NONE is more correct in this context.
---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
--- xen/common/xsplice_elf.c | 2 +- xen/include/xen/elfstructs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
xen/common/xsplice_elf.c +1 -1
@@ -397,7 +397,7 @@ static int xsplice_header_check(const struct xsplice_elf *elf)if ( hdr->e_version !=EV_CURRENT || hdr->e_ident[EI_VERSION ] !=EV_CURRENT || hdr->e_ident[EI_ABIVERSION ] !=0 || - hdr->e_ident[EI_OSABI ] !=ELFOSABI_SYSV || + hdr->e_ident[EI_OSABI ] !=ELFOSABI_NONE || hdr->e_type !=ET_REL || hdr->e_phnum !=0 ) {
xen/include/xen/elfstructs.h +1 -0
@@ -81,6 +81,7 @@ typedef uint64_t Elf64_Xword;/* e_ident[] Operating System/ABI */ #define ELFOSABI_SYSV 0/* UNIX System V ABI */ +#define ELFOSABI_NONE 0/* Same as ELFOSABI_SYSV */ #define ELFOSABI_HPUX 1/* HP-UX operating system */ #define ELFOSABI_NETBSD 2/* NetBSD */ #define ELFOSABI_LINUX 3/* GNU/Linux */
Signature · 7 lines
2.6.4 (Apple Git-63) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
Quoted 4 lines · Roger Pau Monne
They are equivalent, but using
ELFOSABI_NONEis more correct in this context.Signed-off-by Roger Pau Monné <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
In reply to Roger Pau MonneQuoted 5 lines
Quoted 1 line
Quoted 1 line · On 03.05.16 at 12:55, <[email protected]> wrote:
They are equivalent, but using
ELFOSABI_NONEis more correct in this context.Signed-off-by Roger Pau Monné <[email protected]>
Pick one of
{Acked,Suggested}-by: Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
In reply to Roger Pau MonneQuoted 5 lines
Quoted 1 line
Quoted 1 line · On 03.05.16 at 12:55, <[email protected]> wrote:
They are equivalent, but using
ELFOSABI_NONEis more correct in this context.Signed-off-by Roger Pau Monné <[email protected]>
I've committed this as benign to the resulting binary and obvious improvement to the source, without waiting for further acks.
Roger - please try to remember to Cc Wei on patches you want to go into 4.7.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 5/6 xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
In reply to Roger Pau MonneThe calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
--- xen/common/xsplice_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/xsplice_elf.c +2 -1
@@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf)if ( hdr->e_version !=EV_CURRENT || hdr->e_ident[EI_VERSION ] !=EV_CURRENT || hdr->e_ident[EI_ABIVERSION ] !=0 || - hdr->e_ident[EI_OSABI ] !=ELFOSABI_NONE || + (hdr->e_ident[EI_OSABI ] !=ELFOSABI_NONE && + hdr->e_ident[EI_OSABI ] !=ELFOSABI_FREEBSD ) || hdr->e_type !=ET_REL || hdr->e_phnum !=0 ) {
Signature · 7 lines
2.6.4 (Apple Git-63) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
Quoted 17 lines · Roger Pau Monne
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>--- xen/common/xsplice_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/common/xsplice_elf.c +0
-0
xen/common/xsplice_elf.c static int xsplice_header_check(const struct xsplice_elf *elf) · line 401
Quoted 6 lines
xen/common/xsplice_elf.c +2
-1@@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf) if ( hdr->e_version != EV_CURRENT || hdr->e_ident[EI_VERSION] != EV_CURRENT || hdr->e_ident[EI_ABIVERSION] != 0 || - hdr->e_ident[EI_OSABI] != ELFOSABI_NONE || + (hdr->e_ident[EI_OSABI] != ELFOSABI_NONE && + hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ||
You should have an extra space of indentation here.
Other than that, Reviewed-by: Andrew Cooper <[email protected]>
xen/common/xsplice_elf.c static int xsplice_header_check(const struct xsplice_elf *elf) · line 404
Quoted 3 lines
xen/common/xsplice_elf.c +0
-0hdr->e_type != ET_REL || hdr->e_phnum != 0 ) {
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
In reply to Roger Pau MonneQuoted 4 lines
Quoted 1 line
Quoted 1 line · On 03.05.16 at 12:55, <[email protected]> wrote:
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
Well, you realize that the ABI is more than just the calling convention? I.e. your patch basically says ELFOSABI_NONE == ELFOSABI_FREEBSD, in which case I wonder why the latter exists in the first place. Is there a proper document somewhere describing everything the latter implies, so that one can check whether for xSplice purposes such similar treatment is indeed okay? Until then I'm afraid I'm opposed to this going in.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
Quoted 5 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 03.05.16 at 12:55, <[email protected]> wrote:
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
Quoted 7 lines
Well, you realize that the ABI is more than just the calling convention? I.e. your patch basically says
ELFOSABI_NONE==ELFOSABI_FREEBSD, in which case I wonder why the latter exists in the first place. Is there a proper document somewhere describing everything the latter implies, so that one can check whether for xSplice purposes such similar treatment is indeed okay? Until then I'm afraid I'm opposed to this going in.
The FreeBSD elf OSABI only has a meaning for userspace applications, it's used by FreeBSD in order to detect if an application is native or if it needs to be run in the linuxator (the Linux emulator, or any other emulator that is available and matches the ELF OSABI specified in the binary FWIW).
THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's selected inside of the FreeBSD kernel (the ABI between the kernel and the user-space application), but of course this doesn't apply to kernel code, which is what Xen and the xsplice payloads are. Sadly this is not written anywhere.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 04.05.16 at 11:48, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 03.05.16 at 12:55, <[email protected]> wrote:
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
Quoted 7 lines
Well, you realize that the ABI is more than just the calling convention? I.e. your patch basically says
ELFOSABI_NONE==ELFOSABI_FREEBSD, in which case I wonder why the latter exists in the first place. Is there a proper document somewhere describing everything the latter implies, so that one can check whether for xSplice purposes such similar treatment is indeed okay? Until then I'm afraid I'm opposed to this going in.The FreeBSD elf OSABI only has a meaning for userspace applications, it's used by FreeBSD in order to detect if an application is native or if it needs to be run in the linuxator (the Linux emulator, or any other emulator that is available and matches the ELF OSABI specified in the binary FWIW).
Quoted 5 lines
THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's selected inside of the FreeBSD kernel (the ABI between the kernel and the user-space application), but of course this doesn't apply to kernel code, which is what Xen and the xsplice payloads are. Sadly this is not written anywhere.
Well, okay, in that case I agree the patch should be fine.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 04.05.16 at 11:48, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 03.05.16 at 12:55, <[email protected]> wrote:
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
Quoted 7 lines
Well, you realize that the ABI is more than just the calling convention? I.e. your patch basically says
ELFOSABI_NONE==ELFOSABI_FREEBSD, in which case I wonder why the latter exists in the first place. Is there a proper document somewhere describing everything the latter implies, so that one can check whether for xSplice purposes such similar treatment is indeed okay? Until then I'm afraid I'm opposed to this going in.The FreeBSD elf OSABI only has a meaning for userspace applications, it's used by FreeBSD in order to detect if an application is native or if it needs to be run in the linuxator (the Linux emulator, or any other emulator that is available and matches the ELF OSABI specified in the binary FWIW).
Quoted 7 lines
Quoted 5 lines
THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's selected inside of the FreeBSD kernel (the ABI between the kernel and the user-space application), but of course this doesn't apply to kernel code, which is what Xen and the xsplice payloads are. Sadly this is not written anywhere.
Well, okay, in that case I agree the patch should be fine.
Would you like me to resend this with a more expanded commit message, or are you going to squash my explanation in the commit message?
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
Quoted 31 lines
Quoted 1 line
Quoted 1 line · On 05.05.16 at 18:35, <[email protected]> wrote:
Quoted 4 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 04.05.16 at 11:48, <[email protected]> wrote:
Quoted 2 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 03.05.16 at 12:55, <[email protected]> wrote:
The calling convention used by the FreeBSD ELF OSABI is exactly the same
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the the one defined by System V, so payloads with a FreeBSD OSABI should
be
Quoted 22 lines
Quoted 21 lines
Quoted 9 lines
Quoted 1 line
accepted by the xsplice machinery.
Well, you realize that the ABI is more than just the calling convention? I.e. your patch basically says
ELFOSABI_NONE==ELFOSABI_FREEBSD, in which case I wonder why the latter exists in the first place. Is there a proper document somewhere describing everything the latter implies, so that one can check whether for xSplice purposes such similar treatment is indeed okay? Until then I'm afraid I'm opposed to this going in.The FreeBSD elf OSABI only has a meaning for userspace applications, it's used by FreeBSD in order to detect if an application is native or if it needs to be run in the linuxator (the Linux emulator, or any other emulator
that is available and matches the ELF OSABI specified in the binary FWIW).
THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's selected inside of the FreeBSD kernel (the ABI between the kernel and the user-space application), but of course this doesn't apply to kernel code, which is what Xen and the xsplice payloads are. Sadly this is not written anywhere.
Quoted 4 lines
Quoted 1 line
Well, okay, in that case I agree the patch should be fine.
Would you like me to resend this with a more expanded commit message, or are you going to squash my explanation in the commit message?
I'd be fine folding it in, but I may not be the one ending up committing it - it needs an xSplice maintainer's ack first, and it may well be that Konrad then would apply it.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
In reply to Roger Pau MonneQuoted 18 lines · Roger Pau Monne
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>--- xen/common/xsplice_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/common/xsplice_elf.c +0
-0
xen/common/xsplice_elf.c static int xsplice_header_check(const struct xsplice_elf *elf) · line 404
Quoted 9 lines
xen/common/xsplice_elf.c +2
-1@@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf)if ( hdr->e_version !=EV_CURRENT || hdr->e_ident[EI_VERSION ] !=EV_CURRENT || hdr->e_ident[EI_ABIVERSION ] !=0 || - hdr->e_ident[EI_OSABI ] !=ELFOSABI_NONE || + (hdr->e_ident[EI_OSABI ] !=ELFOSABI_NONE && + hdr->e_ident[EI_OSABI ] !=ELFOSABI_FREEBSD ) || hdr->e_type !=ET_REL || hdr->e_phnum !=0 ) {
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
Quoted 22 lines · Ross Lagerwall
Quoted 21 lines · Roger Pau Monne
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery.
Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>--- xen/common/xsplice_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/common/xsplice_elf.c +0
-1@@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf) if ( hdr->e_version != EV_CURRENT || hdr->e_ident[EI_VERSION] != EV_CURRENT || hdr->e_ident[EI_ABIVERSION] != 0 || - hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
Quoted 8 lines
xen/common/xsplice_elf.c static int xsplice_header_check(const struct xsplice_elf *elf) · line 404
Quoted 6 lines
xen/common/xsplice_elf.c +2
-0+ (hdr->e_ident[EI_OSABI] != ELFOSABI_NONE && + hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) || hdr->e_type != ET_REL || hdr->e_phnum != 0 ) {Acked-by Ross Lagerwall <[email protected]>
Applied with the change log change and an extra space.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 6/6 libxl: fix usage of XEN_EOPNOTSUPP
In reply to Roger Pau MonneThe errno values returned by libxc are already translated into the underlying OS error space, so it's wrong to compare them against Xen error codes.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
--- tools/libxl/libxl_dom_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_dom_save.c +1 -1
@@ -386,7 +386,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss)*/ ret =xc_domain_getvnuma (CTX ->xch, domid, &nr_vnodes, &nr_vmemranges, &nr_vcpus,NULL ,NULL ,NULL ); -if (ret !=-1 || errno !=XEN_EOPNOTSUPP ) { +if (ret !=-1 || errno !=EOPNOTSUPP ) {LOG (ERROR ,"Cannot save a guest with vNUMA configured" ); rc =ERROR_FAIL ; goto out;
Signature · 7 lines
2.6.4 (Apple Git-63) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP
Quoted 5 lines · Roger Pau Monne
The errno values returned by libxc are already translated into the underlying OS error space, so it's wrong to compare them against Xen error codes.
Signed-off-by Roger Pau Monné <[email protected]>
Ian, this should be backported to 4.6.
Wei.
Quoted 23 lines
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>--- tools/libxl/libxl_dom_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/libxl/libxl_dom_save.c +1
-1@@ -386,7 +386,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss)*/ ret =xc_domain_getvnuma (CTX ->xch, domid, &nr_vnodes, &nr_vmemranges, &nr_vcpus,NULL ,NULL ,NULL ); -if (ret !=-1 || errno !=XEN_EOPNOTSUPP ) { +if (ret !=-1 || errno !=EOPNOTSUPP ) {LOG (ERROR ,"Cannot save a guest with vNUMA configured" ); rc =ERROR_FAIL ; goto out;Signature · 1 line
2.6.4 (Apple Git-63)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel