lkml.org 
[lkml]   [2023]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v7 22/41] mm/mmap: Add shadow stack pages to memory accounting
From
On 3/17/23 10:12, Deepak Gupta wrote:
>> /*
>> - * Stack area - automatically grows in one direction
>> + * Stack area
>> *
>> - * VM_GROWSUP / VM_GROWSDOWN VMAs are always private anonymous:
>> - * do_mmap() forbids all other combinations.
>> + * VM_GROWSUP, VM_GROWSDOWN VMAs are always private
>> + * anonymous. do_mmap() forbids all other combinations.
>> */
>> static inline bool is_stack_mapping(vm_flags_t flags)
>> {
>> - return (flags & VM_STACK) == VM_STACK;
>> + return ((flags & VM_STACK) == VM_STACK) || (flags & VM_SHADOW_STACK);
> Same comment here. `VM_SHADOW_STACK` is an x86 specific way of
> encoding a shadow stack.
> Instead let's have a proxy here which allows architectures to have
> their own encodings to represent a shadow stack.

This doesn't _preclude_ another architecture from coming along and doing
that, right? I'd just prefer that shadow stack architecture #2 comes
along and refactors this in precisely the way _they_ need it.

\
 
 \ /
  Last update: 2023-03-27 01:05    [W:0.172 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site