mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
5287569a79
This change implements shadow stack switching, initial SCS set-up, and interrupt shadow stacks for arm64. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Will Deacon <will@kernel.org>
16 lines
334 B
C
16 lines
334 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Shadow Call Stack support.
|
|
*
|
|
* Copyright (C) 2019 Google LLC
|
|
*/
|
|
|
|
#include <linux/percpu.h>
|
|
#include <asm/scs.h>
|
|
|
|
/* Allocate a static per-CPU shadow stack */
|
|
#define DEFINE_SCS(name) \
|
|
DEFINE_PER_CPU(unsigned long [SCS_SIZE/sizeof(long)], name) \
|
|
|
|
DEFINE_SCS(irq_shadow_call_stack);
|