Description
Looking into #925 reminded me that we don't implement stack clash protection, meaning it's in theory possible to allocate data on the stack that hops over guard pages.
While we could implement runtime probing (see https://blog.llvm.org/posts/2021-01-05-stack-clash-protection/ and LLVM's probe-stack function attribute), I wonder if a similarly sufficient protection is to just limit stack types to at most 4 KiB (the smallest page size that I think is in use today).
We should first figure out if this is even necessary, and ideally come up with something that won't require runtime overhead (if at all possible).
Related work
Description
Looking into #925 reminded me that we don't implement stack clash protection, meaning it's in theory possible to allocate data on the stack that hops over guard pages.
While we could implement runtime probing (see https://blog.llvm.org/posts/2021-01-05-stack-clash-protection/ and LLVM's
probe-stackfunction attribute), I wonder if a similarly sufficient protection is to just limit stack types to at most 4 KiB (the smallest page size that I think is in use today).We should first figure out if this is even necessary, and ideally come up with something that won't require runtime overhead (if at all possible).
Related work