tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125
PATCH 1/1 tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125
gcc 4.1 of CentOS 5.x era does not like the typecheck in min() between uint64_t and unsigned long.
---
This needs backporting to 4.5
--- tools/libxc/xc_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxc/xc_domain.c +1 -1
@@ -2034,7 +2034,7 @@ int xc_domain_memory_mapping( max_batch_sz = nr_mfns; do { - nr = min(nr_mfns - done, max_batch_sz); + nr = min_t(unsigned long, nr_mfns - done, max_batch_sz); domctl.u.memory_mapping.nr_mfns = nr; domctl.u.memory_mapping.first_gfn = first_gfn + done; domctl.u.memory_mapping.first_mfn = first_mfn + done;
Signature · 1 line
1.7.10.4
PATCH 1/1 tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125
gcc 4.1 of CentOS 5.x era does not like the typecheck in min() between uint64_t and unsigned long.
---
This needs backporting to 4.2
--- tools/libxc/xc_domain.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
tools/libxc/xc_domain.c +5 -8
@@ -1641,12 +1641,9 @@ int xc_map_domain_meminfo(xc_interface *xch, int domid,return -1 ; } -#ifndef min -#define min (X ,Y ) ({ \ - const typeof (X) _x = (X); \ - const typeof (Y) _y = (Y); \ - (void) (&_x == &_y); \ - (_x < _y) ? _x : _y; }) +#ifndef min_t +#define min_t (type,x,y) \ + ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })#endif int xc_domain_memory_mapping( xc_interface *xch,
@@ -1669,7 +1666,7 @@ int xc_domain_memory_mapping( max_batch_sz = nr_mfns; do { - nr = min(nr_mfns - done, max_batch_sz); + nr = min_t(unsigned long, nr_mfns - done, max_batch_sz); domctl.u.memory_mapping.nr_mfns = nr; domctl.u.memory_mapping.first_gfn = first_gfn + done; domctl.u.memory_mapping.first_mfn = first_mfn + done;
@@ -1705,7 +1702,7 @@ int xc_domain_memory_mapping(return ret; } -#undef min +#undef min_t int xc_domain_ioport_mapping( xc_interface *xch, uint32_t domid,
Signature · 1 line
1.7.10.4
Andrew Cooper writes ("[Xen-devel] [PATCH] [XEN-4.4] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):
Quoted 8 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>
FTR, this backport is itself:
And I have queued it.
Ian.
Andrew Cooper writes ("[Xen-devel] [PATCH] [XEN-4.4] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):
Quoted 11 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>---
This needs backporting to 4.2
This doesn't seem to apply to my staging-4.5.
Ian.
Quoted 10 lines · Ian Jackson
Andrew Cooper writes ("[Xen-devel] [PATCH] [XEN-4.4]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 9 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>
Quoted 5 lines
Quoted 2 lines
---
This needs backporting to 4.2This doesn't seem to apply to my staging-4.5.
Ian.
It wont. This patch is for 4.4 and earlier. The previously-committed version for staging is a clean cherrypick back to 4.5
~Andrew
Ian Jackson writes ("Re: [Xen-devel] [PATCH] [XEN-4.4] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):
Quoted 10 lines
Andrew Cooper writes ("[Xen-devel] [PATCH] [XEN-4.4]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 9 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>
Quoted 4 lines
Quoted 2 lines
---
This needs backporting to 4.2This doesn't seem to apply to my staging-4.5.
Sorry, I meant, to my staging-4.4.
Ian.
Quoted 11 lines · Ian Jackson
Ian Jackson writes ("Re: [Xen-devel] [PATCH] [XEN-4.4]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 10 lines
Andrew Cooper writes ("[Xen-devel] [PATCH] [XEN-4.4]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 9 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
---
This needs backporting to 4.2This doesn't seem to apply to my staging-4.5.
Sorry, I meant, to my staging-4.4.
You appear to have committed half of it as staging-4.4~2
~Andrew
Andrew Cooper writes ("Re: [Xen-devel] [PATCH] [XEN-4.4] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):
Quoted 4 lines · Ian Jackson
Quoted 1 line
Sorry, I meant, to my staging-4.4.
You appear to have committed half of it as staging-4.4~2
Nnnngg. Sorry. I think I am trying to do too many different things at once.
Ian.
Ian Jackson writes ("Re: [Xen-devel] [PATCH] [XEN-4.4] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):
Quoted 8 lines
Andrew Cooper writes ("Re: [Xen-devel] [PATCH] [XEN-4.4]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 4 lines · Ian Jackson
Quoted 1 line
Sorry, I meant, to my staging-4.4.
You appear to have committed half of it as staging-4.4~2
Nnnngg. Sorry. I think I am trying to do too many different things at once.
Now fixed.
Ian.
Quoted 10 lines · Ian Jackson
Ian Jackson writes ("Re: [Xen-devel] [PATCH] [XEN-4.4]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 6 lines
Andrew Cooper writes ("Re: [Xen-devel] [PATCH] [XEN-4.4]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 3 lines · Ian Jackson
Quoted 1 line
Sorry, I meant, to my staging-4.4.
You appear to have committed half of it as staging-4.4~2
Nnnngg. Sorry. I think I am trying to do too many different things at once.
Now fixed.
Ian.
Thanks.
~Andrew
Andrew Cooper writes ("[Xen-devel] [PATCH] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):
Quoted 8 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>
As and when this is acked and pushed to #staging, we should update the advisory.
Quoted 1 line
This needs backporting to 4.5
To be clear, do you know whether this is a trivial cherry pick ?
Ian.
Quoted 9 lines · Ian Jackson
Andrew Cooper writes ("[Xen-devel] [PATCH]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 8 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>
Quoted 5 lines
As and when this is acked and pushed to #staging, we should update the advisory.
Quoted 1 line
This needs backporting to 4.5
To be clear, do you know whether this is a trivial cherry pick ?
It is trivial to cherrypick.
4.4 is the problematic case which I did the backport for separately, but then that is trivial to cherrypick back to 4.2
~Andrew
Ping on the patches themselves?
Quoted 26 lines · Andrew Cooper
Quoted 9 lines · Ian Jackson
Andrew Cooper writes ("[Xen-devel] [PATCH]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 8 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>Quoted 5 lines
As and when this is acked and pushed to #staging, we should update the advisory.
Quoted 1 line
This needs backporting to 4.5
To be clear, do you know whether this is a trivial cherry pick ?
It is trivial to cherrypick.
4.4 is the problematic case which I did the backport for separately, but then that is trivial to cherrypick back to 4.2
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Ping again.
These should be included in 4.5.1
~Andrew
Quoted 34 lines · Andrew Cooper
Ping on the patches themselves?
Quoted 20 lines · Andrew Cooper
Quoted 9 lines · Ian Jackson
Andrew Cooper writes ("[Xen-devel] [PATCH]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 8 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>Quoted 5 lines
As and when this is acked and pushed to #staging, we should update the advisory.
Quoted 1 line
This needs backporting to 4.5
To be clear, do you know whether this is a trivial cherry pick ?
It is trivial to cherrypick.
4.4 is the problematic case which I did the backport for separately, but then that is trivial to cherrypick back to 4.2
Quoted 6 lines
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
This patch is still needed in all branches which currently contain XSA-125, including staging.
~Andrew
Quoted 45 lines · Andrew Cooper
Ping again.
These should be included in 4.5.1
~Andrew
Quoted 25 lines · Andrew Cooper
Ping on the patches themselves?
Quoted 22 lines · Andrew Cooper
Quoted 9 lines · Ian Jackson
Andrew Cooper writes ("[Xen-devel] [PATCH]
tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):Quoted 8 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.Signed-off-by Andrew Cooper <[email protected]>CC Konrad Rzeszutek Wilk <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>Quoted 5 lines
As and when this is acked and pushed to #staging, we should update the advisory.
Quoted 1 line
This needs backporting to 4.5
To be clear, do you know whether this is a trivial cherry pick ?
It is trivial to cherrypick.
4.4 is the problematic case which I did the backport for separately, but then that is trivial to cherrypick back to 4.2
~Andrew
Quoted 8 lines
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Andrew Cooper writes ("[Xen-devel] [PATCH] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125"):
Quoted 2 lines
gcc 4.1 of CentOS 5.x era does not like the typecheck in
min()betweenuint64_tand unsigned long.
I am about to apply this to staging and queue it for backport.
Ian.