Re: [PATCH] x86/smpboot: Unconditionally call memguard_unguard_stack() in cpu_smpboot_free()

2020-10-13 Thread Jan Beulich
On 13.10.2020 15:23, Andrew Cooper wrote: > On 13/10/2020 14:16, Jan Beulich wrote: >> On 05.10.2020 14:23, Andrew Cooper wrote: >>> --- a/xen/arch/x86/smpboot.c >>> +++ b/xen/arch/x86/smpboot.c >>> @@ -971,16 +971,16 @@ static void cpu_smpboot_free(unsigned int cpu, bool >>> remove) >>> if

Re: [PATCH] x86/smpboot: Unconditionally call memguard_unguard_stack() in cpu_smpboot_free()

2020-10-13 Thread Andrew Cooper
On 13/10/2020 14:16, Jan Beulich wrote: > On 05.10.2020 14:23, Andrew Cooper wrote: >> --- a/xen/arch/x86/smpboot.c >> +++ b/xen/arch/x86/smpboot.c >> @@ -971,16 +971,16 @@ static void cpu_smpboot_free(unsigned int cpu, bool >> remove) >> if ( IS_ENABLED(CONFIG_PV32) ) >>

Re: [PATCH] x86/smpboot: Unconditionally call memguard_unguard_stack() in cpu_smpboot_free()

2020-10-13 Thread Jan Beulich
On 05.10.2020 14:23, Andrew Cooper wrote: > --- a/xen/arch/x86/smpboot.c > +++ b/xen/arch/x86/smpboot.c > @@ -971,16 +971,16 @@ static void cpu_smpboot_free(unsigned int cpu, bool > remove) > if ( IS_ENABLED(CONFIG_PV32) ) > FREE_XENHEAP_PAGE(per_cpu(compat_gdt, cpu)); > > +if

Re: [PATCH] x86/smpboot: Unconditionally call memguard_unguard_stack() in cpu_smpboot_free()

2020-10-05 Thread Marek Marczykowski-Górecki
On Mon, Oct 05, 2020 at 01:23:25PM +0100, Andrew Cooper wrote: > For simplicity between various configuration, Xen always uses shadow stack > mappings (Read-only + Dirty) for the guard page, irrespective of whether > CET-SS is enabled. > > memguard_guard_stack() writes shadow stack tokens with

[PATCH] x86/smpboot: Unconditionally call memguard_unguard_stack() in cpu_smpboot_free()

2020-10-05 Thread Andrew Cooper
For simplicity between various configuration, Xen always uses shadow stack mappings (Read-only + Dirty) for the guard page, irrespective of whether CET-SS is enabled. memguard_guard_stack() writes shadow stack tokens with plain writes. This is necessary to configure the BSP shadow stack