xen/dmop: Fix XEN_DMOP_nr_vcpus to actually return data
PATCH 1/1 xen/dmop: Fix XEN_DMOP_nr_vcpus to actually return data
The const_op boolean needs clobbering to cause data to be written back to the caller.
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Ian Jackson <[email protected]>
If we weren't in a release freeze, I'd rewrite large chunks of this. 'const_op' is what we call 'copyback' everywhere else, but with inverted sense. I'll guess this gets added to the pile of other unbreakage work which might happen in 4.16
My ad-hoc unit test appears to have had a false positive for the success case, which I've fixed. However, the chances of the full test landing in 4.15 is getting slimmer, not to mention the fact that it curretly takes out Xen with reference counting error...
As for 4.15, this is a bug in a brand-newly introduced hypercall, and is of 0 risk for other areas of the release. If this bugfix is not taken, we should revert c4441ab1f1 to take the hypercall out, but this would be a bad move.
--- xen/arch/arm/dm.c | 1 + xen/arch/x86/hvm/dm.c | 1 + 2 files changed, 2 insertions(+)
xen/arch/arm/dm.c +1 -0
@@ -128,6 +128,7 @@ int dm_op(const struct dmop_args *op_args)struct xen_dm_op_nr_vcpus *data = &op.u.nr_vcpus; data->vcpus = d->max_vcpus; + const_op = false; rc =0 ;break ; }
xen/arch/x86/hvm/dm.c +1 -0
@@ -612,6 +612,7 @@ int dm_op(const struct dmop_args *op_args)struct xen_dm_op_nr_vcpus *data = &op.u.nr_vcpus; data->vcpus = d->max_vcpus; + const_op = false; rc =0 ;break ; }
Signature · 1 line
2.11.0
Quoted 5 lines · Andrew Cooper
The
const_opboolean needs clobbering to cause data to be written back to the caller.Fixes c4441ab1f1 ("dmop: Add XEN_DMOP_nr_vcpus")Signed-off-by Andrew Cooper <[email protected]>
Thanks, Roger.
Andrew Cooper writes ("[PATCH for-4.15] xen/dmop: Fix XEN_DMOP_nr_vcpus to actually return data"):
Quoted 19 lines
The
const_opboolean needs clobbering to cause data to be written back to the caller.Fixes c4441ab1f1 ("dmop: Add XEN_DMOP_nr_vcpus")Signed-off-by Andrew Cooper <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Ian Jackson <[email protected]>If we weren't in a release freeze, I'd rewrite large chunks of this. '
const_op' is what we call 'copyback' everywhere else, but with inverted sense. I'll guess this gets added to the pile of other unbreakage work which might happen in 4.16
Quoted 8 lines
My ad-hoc unit test appears to have had a false positive for the success case, which I've fixed. However, the chances of the full test landing in 4.15 is getting slimmer, not to mention the fact that it curretly takes out Xen with reference counting error...
As for 4.15, this is a bug in a brand-newly introduced hypercall, and is of 0 risk for other areas of the release. If this bugfix is not taken, we should revert
c4441ab1f1to take the hypercall out, but this would be a bad move.
Thanks for that explanation.