lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG_fn=Uv+-Mr3sA1Tf_+fEyw-2bTX9F9KpS=9=7w+H-tx6PeJw@mail.gmail.com>
Date:	Fri, 5 Aug 2016 18:33:31 +0200
From:	Alexander Potapenko <glider@...gle.com>
To:	Dmitriy Vyukov <dvyukov@...gle.com>,
	Kostya Serebryany <kcc@...gle.com>,
	Andrey Ryabinin <aryabinin@...tuozzo.com>, x86@...nel.org,
	Steven Rostedt <rostedt@...dmis.org>, mingo@...hat.com
Cc:	kasan-dev <kasan-dev@...glegroups.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] x86, kasan, ftrace: Put APIC interrupt handlers into .irqentry.text

On Fri, Jul 15, 2016 at 11:42 AM, Alexander Potapenko <glider@...gle.com> wrote:
> When building with CONFIG_FUNCTION_GRAPH_TRACER or CONFIG_KASAN, put the
> APIC interrupt handlers into the .irqentry.text section. This is needed
> because both KASAN and function graph tracer use __irqentry_text_start and
> __irqentry_text_end to determine whether a function is an IRQ entry point.
>
> Dmitry Vyukov has reported unexpected KASAN stackdepot growth
> (https://github.com/google/kasan/issues/36), which had been caused by
> the APIC handlers not being present in .irqentry.text.
>
> Signed-off-by: Alexander Potapenko <glider@...gle.com>
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> ---
> v2: - fixed kbuild warning (incorrect #if directive)
> ---
>  arch/x86/entry/entry_64.S | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
> index 9ee0da1..2ef4f0b 100644
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -601,9 +601,20 @@ apicinterrupt3 \num trace(\sym) smp_trace(\sym)
>  .endm
>  #endif
>
> +/* Make sure APIC interrupt handlers end up in the irqentry section. */
> +#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
> +#define PUSH_SECTION_IRQENTRY  .pushsection .irqentry.text, "ax"
> +#define POP_SECTION_IRQENTRY   .popsection
> +#else
> +#define PUSH_SECTION_IRQENTRY
> +#define POP_SECTION_IRQENTRY
> +#endif
> +
>  .macro apicinterrupt num sym do_sym
> +PUSH_SECTION_IRQENTRY
>  apicinterrupt3 \num \sym \do_sym
>  trace_apicinterrupt \num \sym
> +POP_SECTION_IRQENTRY
>  .endm
>
>  #ifdef CONFIG_SMP
> --
> 2.8.0.rc3.226.g39d4020
>
A friendly ping.


-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ