lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 22/41] mm/mmap: Add shadow stack pages to memory accounting
Date
On Tue, 2023-02-21 at 09:31 +0100, David Hildenbrand wrote:
> > > Why not modify is_stack_mapping() ?
> >
> > It kind of sticks out a little in this conditional, but
> > is_stack_mapping() has this comment:
> > /*
> > * Stack area - automatically grows in one direction
> > *
> > * VM_GROWSUP / VM_GROWSDOWN VMAs are always private anonymous:
> > * do_mmap() forbids all other combinations.
> > */
> >
> > Shadow stack don't grow, so it doesn't quite fit. There used to be
> > an
> > is_shadow_stack_mapping(), but it was removed because all that was
> > needed (for the time being) was the simple bitwise AND:
> >
> >
https://lore.kernel.org/lkml/804adbac-61e6-0fd2-f726-5735fb290199@intel.com/
>
> As there is only a single user of is_stack_mapping(), I'd simply
> have
> adjusted the doc of is_stack_mapping() to include shadow stacks.

Ok, I'll update the comment and add it there.
\
 
 \ /
  Last update: 2023-03-27 00:31    [W:1.201 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site