arm64: Add stack information to on_accessible_stack
In preparation for enabling the stackleak plugin on arm64, we need a way to get the bounds of the current stack. Extend on_accessible_stack to get this information. Acked-by: Alexander Popov <alex.popov@linux.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Laura Abbott <labbott@redhat.com> [will: folded in fix for allmodconfig build breakage w/ sdei] Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:

committed by
Will Deacon

parent
2c870e6113
commit
8a1ccfbc9e
@@ -40,15 +40,18 @@ asmlinkage unsigned long __sdei_handler(struct pt_regs *regs,
|
||||
unsigned long sdei_arch_get_entry_point(int conduit);
|
||||
#define sdei_arch_get_entry_point(x) sdei_arch_get_entry_point(x)
|
||||
|
||||
bool _on_sdei_stack(unsigned long sp);
|
||||
static inline bool on_sdei_stack(unsigned long sp)
|
||||
struct stack_info;
|
||||
|
||||
bool _on_sdei_stack(unsigned long sp, struct stack_info *info);
|
||||
static inline bool on_sdei_stack(unsigned long sp,
|
||||
struct stack_info *info)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_VMAP_STACK))
|
||||
return false;
|
||||
if (!IS_ENABLED(CONFIG_ARM_SDE_INTERFACE))
|
||||
return false;
|
||||
if (in_nmi())
|
||||
return _on_sdei_stack(sp);
|
||||
return _on_sdei_stack(sp, info);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user