Re: [PATCH v3 10/12] x86/mm: Implement HAVE_ARCH_UNMAPPED_AREA_VMFLAGS

From: Edgecombe, Rick P
Date: Wed Mar 13 2024 - 12:00:19 EST


On Wed, 2024-03-13 at 09:04 +0000, Christophe Leroy wrote:
> > +
> > +unsigned long
> > +arch_get_unmapped_area(struct file *filp, unsigned long addr,
> > +               unsigned long len, unsigned long pgoff, unsigned
> > long flags)
> > +{
> > +       return arch_get_unmapped_area_vmflags(filp, addr, len,
> > pgoff, flags, 0);
> > +}
> > +
> > +unsigned long
> > +arch_get_unmapped_area_topdown(struct file *filp, const unsigned
> > long addr,
> > +                         const unsigned long len, const unsigned
> > long pgoff,
> > +                         const unsigned long flags)
> > +{
> > +       return arch_get_unmapped_area_topdown_vmflags(filp, addr,
> > len, pgoff, flags, 0);
> > +}
>
> Wouldn't it be better to define those two as static inlines ?

Yes, I think so. It is generic functionality (though not needed until
the next shadow stack feature), so doesn't need to be in arch/x86
either.

Thanks for your comments on the series and the RB tags.