|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/shadow: suppress trace_emul_write_val hook when !TRACEBUFFER
On 27.01.2026 14:27, Andrew Cooper wrote:
> On 27/01/2026 1:20 pm, Jan Beulich wrote:
>> The hook is never invoked in that case, and hence needlessly offers an
>> extra valid indirect call target. With the hook suppressed, no consumer
>> of the three local per-CPU variables exists either, so they're
>> suppressed as well.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> --- a/xen/arch/x86/include/asm/paging.h
>> +++ b/xen/arch/x86/include/asm/paging.h
>> @@ -90,10 +90,12 @@ struct shadow_paging_mode {
>> int (*guess_wrmap )(struct vcpu *v,
>> unsigned long vaddr, mfn_t
>> gmfn);
>> void (*pagetable_dying )(paddr_t gpa);
>> +#ifdef CONFIG_TRACEBUFFER
>> void (*trace_emul_write_val )(const void *ptr, unsigned long
>> vaddr,
>> const void *src, unsigned int
>> bytes);
>> #endif
>> #endif
>> +#endif
>
> Can we get some comments on these endifs, and ...
I can touch the pre-existing ones here, but the new one spanning just two
lines here and ...
>> --- a/xen/arch/x86/mm/shadow/multi.c
>> +++ b/xen/arch/x86/mm/shadow/multi.c
>> @@ -4130,7 +4142,9 @@ const struct paging_mode sh_paging_mode
>> .shadow.guess_wrmap = sh_guess_wrmap,
>> #endif
>> .shadow.pagetable_dying = sh_pagetable_dying,
>> +#ifdef CONFIG_TRACEBUFFER
>> .shadow.trace_emul_write_val = trace_emulate_write_val,
>> +#endif
>> #endif /* CONFIG_HVM */
>
> ... this one too.
... one line here I didn't think would need comments?
> Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Thanks.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |