|
Message-ID: <20180817092839.GB8540@arm.com> Date: Fri, 17 Aug 2018 10:28:40 +0100 From: Will Deacon <will.deacon@....com> To: Alexander Popov <alex.popov@...ux.com> Cc: kernel-hardening@...ts.openwall.com, Kees Cook <keescook@...omium.org>, PaX Team <pageexec@...email.hu>, Brad Spengler <spender@...ecurity.net>, Ingo Molnar <mingo@...nel.org>, Andy Lutomirski <luto@...nel.org>, Tycho Andersen <tycho@...ho.ws>, Laura Abbott <labbott@...hat.com>, Mark Rutland <mark.rutland@....com>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, Borislav Petkov <bp@...en8.de>, Richard Sandiford <richard.sandiford@....com>, Thomas Gleixner <tglx@...utronix.de>, "H . Peter Anvin" <hpa@...or.com>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, "Dmitry V . Levin" <ldv@...linux.org>, Emese Revfy <re.emese@...il.com>, Jonathan Corbet <corbet@....net>, Andrey Ryabinin <aryabinin@...tuozzo.com>, "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>, Thomas Garnier <thgarnie@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>, Alexei Starovoitov <ast@...nel.org>, Josef Bacik <jbacik@...com>, Masami Hiramatsu <mhiramat@...nel.org>, Nicholas Piggin <npiggin@...il.com>, Al Viro <viro@...iv.linux.org.uk>, "David S . Miller" <davem@...emloft.net>, Ding Tianhong <dingtianhong@...wei.com>, David Woodhouse <dwmw@...zon.co.uk>, Josh Poimboeuf <jpoimboe@...hat.com>, Steven Rostedt <rostedt@...dmis.org>, Dominik Brodowski <linux@...inikbrodowski.net>, Juergen Gross <jgross@...e.com>, Linus Torvalds <torvalds@...ux-foundation.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Dan Williams <dan.j.williams@...el.com>, Dave Hansen <dave.hansen@...ux.intel.com>, Mathias Krause <minipli@...glemail.com>, Vikas Shivappa <vikas.shivappa@...ux.intel.com>, Kyle Huey <me@...ehuey.com>, Dmitry Safonov <dsafonov@...tuozzo.com>, Arnd Bergmann <arnd@...db.de>, Florian Weimer <fweimer@...hat.com>, Boris Lukashev <blukashev@...pervictus.com>, Andrey Konovalov <andreyknvl@...gle.com>, x86@...nel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v15 7/7] arm64: Drop unneeded stackleak_check_alloca() On Fri, Aug 17, 2018 at 01:17:04AM +0300, Alexander Popov wrote: > 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@...ux.com> > --- > arch/arm64/kernel/process.c | 22 ---------------------- > 1 file changed, 22 deletions(-) Acked-by: Will Deacon <will.deacon@....com> Thanks, Will > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > index 7f1628e..740b31f 100644 > --- a/arch/arm64/kernel/process.c > +++ b/arch/arm64/kernel/process.c > @@ -493,25 +493,3 @@ void arch_setup_new_exec(void) > { > current->mm->context.flags = is_compat_task() ? MMCF_AARCH32 : 0; > } > - > -#ifdef CONFIG_GCC_PLUGIN_STACKLEAK > -void __used stackleak_check_alloca(unsigned long size) > -{ > - unsigned long stack_left; > - unsigned long current_sp = current_stack_pointer; > - struct stack_info info; > - > - BUG_ON(!on_accessible_stack(current, current_sp, &info)); > - > - stack_left = current_sp - info.low; > - > - /* > - * There's a good chance we're almost out of stack space if this > - * is true. Using panic() over BUG() is more likely to give > - * reliable debugging output. > - */ > - if (size >= stack_left) > - panic("alloca() over the kernel stack boundary\n"); > -} > -EXPORT_SYMBOL(stackleak_check_alloca); > -#endif > -- > 2.7.4 >
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.