Skip to content
  • Mark Rutland's avatar
    fork: allow arch-override of VMAP stack alignment · 48ac3c18
    Mark Rutland authored
    
    
    In some cases, an architecture might wish its stacks to be aligned to a
    boundary larger than THREAD_SIZE. For example, using an alignment of
    double THREAD_SIZE can allow for stack overflows smaller than
    THREAD_SIZE to be detected by checking a single bit of the stack
    pointer.
    
    This patch allows architectures to override the alignment of VMAP'd
    stacks, by defining THREAD_ALIGN. Where not defined, this defaults to
    THREAD_SIZE, as is the case today.
    
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
    Tested-by: default avatarLaura Abbott <labbott@redhat.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: James Morse <james.morse@arm.com>
    Cc: linux-kernel@vger.kernel.org
    48ac3c18