2020-04-28 00:00:16 +08:00
|
|
|
// 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);
|
2020-04-28 00:00:17 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_ARM_SDE_INTERFACE
|
|
|
|
DEFINE_SCS(sdei_shadow_call_stack_normal);
|
|
|
|
DEFINE_SCS(sdei_shadow_call_stack_critical);
|
|
|
|
#endif
|