|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v9 5/5] x86/pvh: fix unbootable VMs by really inlining memset() in xen_prepare_pvh()
On 2026-09-11 01:39, Borislav Petkov wrote:
> On Sat, Aug 22, 2026 at 03:33:21PM -0300, Mauricio Faria de Oliveira wrote:
>> Even with __builtin the compiler may decide to use the out of line function
>> instead of the inline implementation.
>>
>> This particular one (still) generated the inline implementation as expected
>> (at least in these compiler versions) but this is not guaranteed to remain.
>>
>> Switch the builtin to the inline implementation to address it.
>>
>> Fixes: fbe5a6dfe492 ("xen, pvh: fix unbootable VMs by inlining memset() in
>> xen_prepare_pvh()")
>> Signed-off-by: Mauricio Faria de Oliveira <mfo@xxxxxxxxxx>
>> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
>> ---
>> arch/x86/platform/pvh/enlighten.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/platform/pvh/enlighten.c
>> b/arch/x86/platform/pvh/enlighten.c
>> index
>> f2053cbe9b0ce3d2178938269607c652ae8f528e..cb442cbd9d828619421babb281bfe9759edbca8a
>> 100644
>> --- a/arch/x86/platform/pvh/enlighten.c
>> +++ b/arch/x86/platform/pvh/enlighten.c
>> @@ -8,6 +8,7 @@
>> #include <asm/hypervisor.h>
>> #include <asm/e820/api.h>
>> #include <asm/x86_init.h>
>> +#include <asm/string.h>
>>
>> #include <asm/xen/interface.h>
>>
>> @@ -129,7 +130,7 @@ void __init xen_prepare_pvh(void)
>> * This must not compile to "call memset" because memset() may be
>> * instrumented.
>> */
>> - __builtin_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
>> + __inline_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
>>
>> hypervisor_specific_init(xen_guest);
>>
>>
>> --
>
> Why is this a separate patch from 4/5 if it is fixing the same thing?
Due to scope and review purposes (4/5 is more generic, 5/5 is specific
to PVH). If there's a strong preference to combine these, please just
let me know.
Thanks,
--
Mauricio
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |