Re: [PATCH] x86/domctl: Fix unitialized copyback in XEN_DOMCTL_PSR_GET_*
Jan Beulich <[email protected]>
| Newsgroups | org.xenproject.lists.xen-devel |
|---|---|
| Message-ID | <[email protected]> |
On 10.08.2026 00:38, Johann Höpfner wrote:
> domctl_psr_get_val() copies unitialized stack space back if psr_get_val
> fails. Fix by zero-initializing v_.
>
> Fixes: 03f30dc193c8 ("x86: refactor psr: L3 CAT: implement get value flow.")
> Signed-off-by: Johann Höpfner <[email protected]>
Reviewed-by: Jan Beulich <[email protected]>
> Consider instead removing the local variable indirection introduced by
> 03f30dc193c8 and passing &(domctl)->u.psr_alloc.data to psr_get_val
> instead or only conditionally setting copyback true.
Well - the way you've done it is clearly easiest / most obviously correct.
Jan