On 25.06.2024 12:14, Alessandro Zucchelli wrote: > --- a/xen/common/kernel.c > +++ b/xen/common/kernel.c > @@ -660,14 +660,15 @@ long do_xen_version(int cmd, > XEN_GUEST_HANDLE_PARAM(void) arg) > > case XENVER_guest_handle: > { > + struct domain *d = current->domain;
Can a (new) variable thus initialized please be consistently named currd? > xen_domain_handle_t hdl; > > if ( deny ) > memset(&hdl, 0, ARRAY_SIZE(hdl)); > > - BUILD_BUG_ON(ARRAY_SIZE(current->domain->handle) != ARRAY_SIZE(hdl)); > + BUILD_BUG_ON(ARRAY_SIZE(d->handle) != ARRAY_SIZE(hdl)); Wasn't there the intention to exclude BUILD_BUG_ON() for specifically this (and any other similar) rule? Jan > - if ( copy_to_guest(arg, deny ? hdl : current->domain->handle, > + if ( copy_to_guest(arg, deny ? hdl : d->handle, > ARRAY_SIZE(hdl) ) ) > return -EFAULT; > return 0;