[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yrx2xwbYMfcl8Qok@sirena.org.uk>
Date: Wed, 29 Jun 2022 16:59:03 +0100
From: Mark Brown <broonie@...nel.org>
To: "Ivan T. Ivanov" <iivanov@...e.de>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
"Madhavan T . Venkataraman" <madvenka@...ux.microsoft.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] arm64: Add initial set of stack unwinder self tests
On Fri, Jun 24, 2022 at 05:10:00PM +0300, Ivan T. Ivanov wrote:
> Add kunit tests for obvious cases where stack unwind could be needed.
> Like these:
>
> * Unwind a separate task
> * Unwind starting from caller
> * Unwind from irq context
> * Unwind from kprobe handler called via ftrace
> * Unwind from ftrace handler
> * Unwind through kretprobed function
> * Unwind from kretprobe handler
>
> Tests are completely based on code used in s390 unwinder tests.
> Cases which where not relevant to aarch64 where removed and
> some places where adjusted to address aarch64 specifics.
I think this would be a bit easier to digest if it were a series which
builds things up with the test cases in individual patches, or at least
things like ftrace and kprobes split out a bit more, rather than every
single test all at once. I've got a few *very* superficial comments
below, I think the code is fine but there's several moving pieces to
check.
> +/*
> + * Calls test_arch_stack_walk() which is handy wrapper of aarch64 unwind
> + * functionality, and verifies that the result contains unwindme_func2
> + *followed by unwindme_func1.
Missing space.
> + ret = register_ftrace_function(fops);
> + if (!ret) {
> + ret = test_unwind_ftraced_func(u);
> + unregister_ftrace_function(fops);
> + } else {
> + kunit_err(current_test,
> + "failed to register ftrace handler (%d)\n", ret);
> + }
Shouldn't we return an error here?
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists