[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 07/11] EFI/runtime: avoid effectively open-coding xmalloc_array()
There is a difference in generated code: xmalloc_bytes() forces SMP_CACHE_BYTES alignment. I think we not only don't need this here, but actually don't want it. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/common/efi/runtime.c +++ b/xen/common/efi/runtime.c @@ -486,7 +486,7 @@ int efi_runtime_call(struct xenpf_efi_ru size = op->u.get_variable.size; if ( size ) { - data = xmalloc_bytes(size); + data = xmalloc_array(unsigned char, size); if ( !data ) { xfree(name); @@ -536,7 +536,7 @@ int efi_runtime_call(struct xenpf_efi_ru return -EIO; } - data = xmalloc_bytes(op->u.set_variable.size); + data = xmalloc_array(unsigned char, op->u.set_variable.size); if ( !data ) rc = -ENOMEM; else if ( copy_from_guest(data, op->u.set_variable.data, @@ -571,7 +571,7 @@ int efi_runtime_call(struct xenpf_efi_ru return -EINVAL; size = op->u.get_next_variable_name.size; - name.raw = xzalloc_bytes(size); + name.raw = xzalloc_array(unsigned char, size); if ( !name.raw ) return -ENOMEM; if ( copy_from_guest(name.raw, op->u.get_next_variable_name.name,
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |