Skip to content

Implement stack clash protection if necessary #926

@yorickpeterse

Description

@yorickpeterse

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting contributionsIssues that are suitable to be worked on by anybody, not just maintainerscompilerChanges related to the compiler

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions