mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/domctl: Fix unitialized copyback in XEN_DOMCTL_PSR_GET_*
domctl_psr_get_val() copies unitialized stack space back if psr_get_val
fails. Fix by zero-initializing v_.
Fixes: 03f30dc193 ("x86: refactor psr: L3 CAT: implement get value flow.")
Signed-off-by: Johann Höpfner <hoepf@cit.tum.de>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
d92587f008
commit
015aa2e11f
1 file changed
+1
-1
@@ -1347,7 +1347,7 @@ long arch_do_domctl(
|
||||
break;
|
||||
|
||||
#define domctl_psr_get_val(d, domctl, type, copyback) ({ \
|
||||
uint32_t v_; \
|
||||
uint32_t v_ = 0; \
|
||||
int r_ = psr_get_val((d), (domctl)->u.psr_alloc.target, \
|
||||
&v_, (type)); \
|
||||
\
|
||||
|
||||