diff options
author | Alexander Popov <alex.popov@linux.com> | 2018-08-16 18:17:04 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2018-09-04 13:35:48 -0400 |
commit | 6fcde90466738b84a073e4f4d18c50015ee29fb2 (patch) | |
tree | 5145c3f8f1ae7b6e148957a6f030a4a395fc8e61 | |
parent | 964c9dff0091893a9a74a88edf984c6da0b779f7 (diff) |
arm64: Drop unneeded stackleak_check_alloca()
Drop stackleak_check_alloca() for arm64 since the STACKLEAK gcc plugin now
doesn't track stack depth overflow caused by alloca().
Signed-off-by: Alexander Popov <alex.popov@linux.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
-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 7f1628effe6d..740b31f77ade 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -493,25 +493,3 @@ void arch_setup_new_exec(void) | |||
493 | { | 493 | { |
494 | current->mm->context.flags = is_compat_task() ? MMCF_AARCH32 : 0; | 494 | current->mm->context.flags = is_compat_task() ? MMCF_AARCH32 : 0; |
495 | } | 495 | } |
496 | |||
497 | #ifdef CONFIG_GCC_PLUGIN_STACKLEAK | ||
498 | void __used stackleak_check_alloca(unsigned long size) | ||
499 | { | ||
500 | unsigned long stack_left; | ||
501 | unsigned long current_sp = current_stack_pointer; | ||
502 | struct stack_info info; | ||
503 | |||
504 | BUG_ON(!on_accessible_stack(current, current_sp, &info)); | ||
505 | |||
506 | stack_left = current_sp - info.low; | ||
507 | |||
508 | /* | ||
509 | * There's a good chance we're almost out of stack space if this | ||
510 | * is true. Using panic() over BUG() is more likely to give | ||
511 | * reliable debugging output. | ||
512 | */ | ||
513 | if (size >= stack_left) | ||
514 | panic("alloca() over the kernel stack boundary\n"); | ||
515 | } | ||
516 | EXPORT_SYMBOL(stackleak_check_alloca); | ||
517 | #endif | ||