diff options
Diffstat (limited to 'arch/arm64/kernel/process.c')
-rw-r--r-- | arch/arm64/kernel/process.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index ce99c58cd1f1..d9a4c2d6dd8b 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -497,25 +497,3 @@ void arch_setup_new_exec(void) | |||
497 | { | 497 | { |
498 | current->mm->context.flags = is_compat_task() ? MMCF_AARCH32 : 0; | 498 | current->mm->context.flags = is_compat_task() ? MMCF_AARCH32 : 0; |
499 | } | 499 | } |
500 | |||
501 | #ifdef CONFIG_GCC_PLUGIN_STACKLEAK | ||
502 | void __used stackleak_check_alloca(unsigned long size) | ||
503 | { | ||
504 | unsigned long stack_left; | ||
505 | unsigned long current_sp = current_stack_pointer; | ||
506 | struct stack_info info; | ||
507 | |||
508 | BUG_ON(!on_accessible_stack(current, current_sp, &info)); | ||
509 | |||
510 | stack_left = current_sp - info.low; | ||
511 | |||
512 | /* | ||
513 | * There's a good chance we're almost out of stack space if this | ||
514 | * is true. Using panic() over BUG() is more likely to give | ||
515 | * reliable debugging output. | ||
516 | */ | ||
517 | if (size >= stack_left) | ||
518 | panic("alloca() over the kernel stack boundary\n"); | ||
519 | } | ||
520 | EXPORT_SYMBOL(stackleak_check_alloca); | ||
521 | #endif | ||