Skip to content

runtime: shrink signal stacks with AT_MINSIGSTKSZ #54088

@prattmic

Description

@prattmic

A new auxiliary vector, AT_MINSIGSTKSZ was added for arm64 in Linux 4.18, amd64 in Linux 5.14, and ppc64 in Linux 5.19.

AT_MINSIGSTKSZ reports the size of a signal frame, and thus the absolute minimum amount of space required to receive a signal, though additional space is of course required for userspace stack usage.

Currently we hard-code our signal stacks to 32KB. With AT_MINSIGSTKSZ, I think we could adjust this to something like AT_MINSIGSTKSZ + _StackFixed, which would almost certainly reduce the signal stack size on all systems (AT_MINSIGSTKSZ is 3632 bytes on my Skylake machine).

cc @aclements @cherrymui

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions