lkml.org 
[lkml]   [2022]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 18/37] mm: Add guard pages around a shadow stack.
Date
On Tue, 2022-11-15 at 21:56 +0100, Peter Zijlstra wrote:
> On Tue, Nov 15, 2022 at 08:40:19PM +0000, Edgecombe, Rick P wrote:
> > > > +unsigned long __weak stack_guard_start_gap(struct
> > > > vm_area_struct
> > > > *vma)
> > > > +{
> > > > + if (vma->vm_flags & VM_GROWSDOWN)
> > > > + return stack_guard_gap;
> > > > + return 0;
> > > > +}
> > >
> > > I'm thinking perhaps this wants to be an inline function?
> >
> > I don't think it can work with weak then.
>
> That was kinda the point, __weak sucks and this is very small in any
> case.

__weak was suggested here:

https://lore.kernel.org/lkml/f92c5110-7d97-b68d-d387-7e6a16a29e49@intel.com/

Let me try to put in cross arch code again like the other suggestion
was. I can't remember the reason why I didn't do it.
\
 
 \ /
  Last update: 2022-11-15 22:51    [W:0.439 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site