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: Deepak Gupta <hidden>
Date: 2024-09-04 19:07:17
Also in: linux-alpha, linux-mm, linux-s390, linux-sh, lkml, loongarch, sparclinux

On Tue, Sep 03, 2024 at 08:57:20PM +0100, Mark Brown wrote:
On Tue, Sep 03, 2024 at 03:41:49PM -0400, Liam R. Howlett wrote:
quoted
* Mark Brown [off-list ref] [240902 15:09]:
quoted
quoted
+static inline unsigned long stack_guard_placement(vm_flags_t vm_flags)
+{
+	if (vm_flags & VM_SHADOW_STACK)
+		return PAGE_SIZE;
quoted
Is PAGE_SIZE is enough?
It's what x86 currently uses so it'll be no worse off if it gets moved
to the generic code (there's a comment in the arch code explaing what's
needed there) and it's enough for arm64, we only do single record
pushes/pops or (optionally) writes to unconstrained addresses.
It's enough for RISC-V too.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help