Re: [PATCH 3/3] mm: Care about shadow stack guard gap when getting an unmapped area
Lorenzo Stoakes <[email protected]>
| Newsgroups | gmane.linux.ports.ppc64.devel,gmane.linux.ports.arm.kernel,gmane.linux.ports.alpha,gmane.linux.kernel,gmane.linux.kernel.arc,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.ports.sparc,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Sep 03, 2024 at 07:20:02PM GMT, Mark Brown wrote: > On Tue, Sep 03, 2024 at 06:49:46PM +0100, Lorenzo Stoakes wrote: > > On Mon, Sep 02, 2024 at 08:08:15PM GMT, Mark Brown wrote: > > > > On x86 there is a custom arch_get_unmapped_area() which was updated by the > > > above commit to cover this case by specifying a start_gap for allocations > > > with VM_SHADOW_STACK. Both arm64 and RISC-V have equivalent features and > > > use the generic implementation of arch_get_unmapped_area() so let's make > > > the equivalent change there so they also don't get shadow stack pages > > > placed without guard pages. > > > Don't you need to unwind that change in x86 now you're doing it in generic code? > > No, x86 had a preexisting custom implementation for some other reason > (hence the "updated by the above commit" part above) - the shadow stack > support would most likely have been added in the core in the first place > were it not for that. Oh yeah missed that! Other than comment nice-to-have this seems fine: Acked-by: Lorenzo Stoakes <[email protected]>