[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220325134629.99699c921bb8c8db413e8e35@linux-foundation.org>
Date: Fri, 25 Mar 2022 13:46:29 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: andrey.konovalov@...ux.dev
Cc: Marco Elver <elver@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Andrey Konovalov <andreyknvl@...il.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
kasan-dev@...glegroups.com, Mark Rutland <mark.rutland@....com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Sami Tolvanen <samitolvanen@...gle.com>,
Peter Collingbourne <pcc@...gle.com>,
Evgenii Stepanov <eugenis@...gle.com>,
Florian Mayer <fmayer@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH v2 1/4] stacktrace: add interface based on shadow call
stack
On Wed, 23 Mar 2022 16:32:52 +0100 andrey.konovalov@...ux.dev wrote:
> From: Andrey Konovalov <andreyknvl@...gle.com>
>
> Add a new interface stack_trace_save_shadow() for collecting stack traces
> by copying frames from the Shadow Call Stack.
>
> Collecting stack traces this way is significantly faster: boot time
> of a defconfig build with KASAN enabled gets descreased by ~30%.
>
> The few patches following this one add an implementation of
> stack_trace_save_shadow() for arm64.
>
> The implementation of the added interface is not meant to use
> stack_trace_consume_fn to avoid making a function call for each
> collected frame to further improve performance.
>
> ...
>
> @@ -108,4 +111,16 @@ static inline int stack_trace_save_tsk_reliable(struct task_struct *tsk,
> }
> #endif
>
> +#if defined(CONFIG_STACKTRACE) && defined(CONFIG_HAVE_SHADOW_STACKTRACE)
> +int stack_trace_save_shadow(unsigned long *store, unsigned int size,
> + unsigned int skipnr);
> +#else
> +static inline int stack_trace_save_shadow(unsigned long *store,
> + unsigned int size,
> + unsigned int skipnr)
> +{
> + return -ENOSYS;
> +}
> +#endif
checkpatch sayeth "WARNING: ENOSYS means 'invalid syscall nr' and
nothing else".
checkpatch also picked up a typo in a changelog. Useful thing to run,
is checkpatch.
Powered by blists - more mailing lists