|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/2] x86/xpti: don't map stack guard pages
>>> On 02.03.18 at 17:41, <jgross@xxxxxxxx> wrote:
> On 02/03/18 17:10, Jan Beulich wrote:
>>>>> On 02.03.18 at 16:43, <jgross@xxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |