>>> On 02.03.18 at 17:41, <jgr...@suse.com> wrote: > On 02/03/18 17:10, Jan Beulich wrote: >>>>> On 02.03.18 at 16:43, <jgr...@suse.com> wrote: >>> On 02/03/18 15:35, Jan Beulich wrote: >>>> --- a/xen/arch/x86/mm.c >>>> +++ b/xen/arch/x86/mm.c >>>> @@ -5576,6 +5576,14 @@ void memguard_unguard_stack(void *p) >>>> STACK_SIZE - PRIMARY_STACK_SIZE - IST_MAX * >>>> PAGE_SIZE); >>>> } >>>> >>>> +bool memguard_is_stack_guard_page(unsigned long addr) >>>> +{ >>>> + addr &= STACK_SIZE - 1; >>>> + >>>> + return addr >= IST_MAX * PAGE_SIZE && >>>> + addr < STACK_SIZE - PRIMARY_STACK_SIZE; >>>> +} >>>> + >>> >>> What about making use of memguard_is_stack_guard_page() in >>> memguard_[un]guard_stack() ? >> >> I was considering this as a follow-up step. >> >>> This would at once ensure the other unused >>> pages won't be accessed accidentally somewhere. >> >> I don't understand this part, though. > > Today memguard_guard_stack() touches only one of the unused pages, not > all of them.
That was earlier today, but not anymore at the time I sent this patch. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel