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] [day] [month] [year] [list]
Message-ID: <CAFd5g443R4OU4vspOh2yqu=7FBtUaxMbsd_tpr8ZnND1CJveCA@mail.gmail.com>
Date:   Tue, 7 Dec 2021 17:58:34 -0500
From:   Brendan Higgins <brendanhiggins@...gle.com>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     davidgow@...gle.com, linux-kernel@...r.kernel.org,
        kunit-dev@...glegroups.com, linux-kselftest@...r.kernel.org,
        skhan@...uxfoundation.org
Subject: Re: [PATCH] kunit: tool: suggest using decode_stacktrace.sh on kernel crash

On Fri, Nov 19, 2021 at 10:24 PM Daniel Latypov <dlatypov@...gle.com> wrote:
>
> kunit.py isn't very clear that
> 1) it stashes a copy of the unparsed output in $BUILD_DIR/test.log
> 2) it sets $BUILD_DIR=.kunit by default
>
> So it's trickier than it should be for a user to come up with the right
> command to do so.
>
> Make kunit.py print out a command for this if
> a) we saw a test case crash
> b) we only ran one kernel (test.log only contains output from the last)
>
> Example suggested command:
> $ scripts/decode_stacktrace.sh .kunit/vmlinux .kunit < .kunit/test.log | tee .kunit/decoded.log | ./tools/testing/kunit/kunit.py parse
>
> Without debug info a user might see something like
> [14:11:25] Call Trace:
> [14:11:25] ? kunit_binary_assert_format (:?)
> [14:11:25] kunit_try_run_case (test.c:?)
> [14:11:25] ? __kthread_parkme (kthread.c:?)
> [14:11:25] kunit_generic_run_threadfn_adapter (try-catch.c:?)
> [14:11:25] ? kunit_generic_run_threadfn_adapter (try-catch.c:?)
> [14:11:25] kthread (kthread.c:?)
> [14:11:25] new_thread_handler (:?)
> [14:11:25] [CRASHED]
>
> `tee` is in GNU coreutils, so it seems fine to add that into the
> pipeline by default, that way users can inspect the otuput in more
> detail.
>
> Note: to turn on debug info, users would need to do something like
> $ echo -e 'CONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_INFO=y' >> .kunit/.kunitconfig
> $ ./tools/testing/kunit/kunit.py config
> $ ./tools/testing/kunit/kunit.py build
> $ <then run decode_stacktrace.sh now vmlinux is updated>
>
> This feels too clunky to include in the instructions.
> With --kconfig_add [1], it would become a bit less painful.
>
> [1] https://lore.kernel.org/linux-kselftest/20211106013058.2621799-2-dlatypov@google.com/
>
> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>

Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ