Thread (18 messages) 18 messages, 6 authors, 2024-09-04

Re: [PATCH 3/3] mm: Care about shadow stack guard gap when getting an unmapped area

From: Lorenzo Stoakes <hidden>
Date: 2024-09-03 19:26:14
Also in: linux-alpha, linux-mm, linux-s390, linux-sh, lkml, loongarch, sparclinux

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:
quoted
On Mon, Sep 02, 2024 at 08:08:15PM GMT, Mark Brown wrote:
quoted
quoted
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.
quoted
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 <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help