Linux Modules
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sasha Levin" <sashal@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Juergen Gross" <jgross@suse.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"James Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: "Jonathan Corbet" <corbet@lwn.net>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	"Petr Pavlu" <petr.pavlu@suse.com>,
	"Daniel Gomez" <da.gomez@kernel.org>,
	"Aaron Tomlin" <atomlin@atomlin.com>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Petr Mladek" <pmladek@suse.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Kees Cook" <kees@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Thorsten Leemhuis" <linux@leemhuis.info>,
	"Vlastimil Babka" <vbabka@kernel.org>,
	"Helge Deller" <deller@gmx.de>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Vivian Wang" <wangruikang@iscas.ac.cn>,
	"Zhen Lei" <thunder.leizhen@huawei.com>,
	"Sami Tolvanen" <samitolvanen@google.com>,
	linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org
Subject: Re: [PATCH v11 4/4] kallsyms: add KUnit tests for lineinfo feature
Date: Sat, 07 Nov 2026 13:25:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-202912@kernel.org> (raw)
In-Reply-To: <20261106132432.248387-5-sashal@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] kallsyms: skip_without_module_lineinfo() misses parisc32 .text.*
  sections
--

commit 0acb15a1e169631dad96f85b0c77c16a41dabc41
Author: Sasha Levin <sashal@kernel.org>

kallsyms: add KUnit tests for lineinfo feature

This commit adds a KUnit test module (CONFIG_LINEINFO_KUNIT_TEST) to
verify that the kallsyms lineinfo feature produces source file:line
annotations in stack traces, and exports sprint_backtrace() and
sprint_backtrace_build_id() for KUnit tests.

> diff --git a/lib/tests/lineinfo_kunit.c b/lib/tests/lineinfo_kunit.c
> new file mode 100644
> index 0000000000000..fc1b97ffb5251
> --- /dev/null
> +++ b/lib/tests/lineinfo_kunit.c
> @@ -0,0 +1,1087 @@

[ ... ]

> +/*
> + * When the test is built as a module but CONFIG_KALLSYMS_LINEINFO_MODULES
> + * is disabled, the test module's own functions have no lineinfo tables, so
> + * every test that expects annotations on local targets must skip rather
> + * than fail.
> + */
> +static void skip_without_module_lineinfo(struct kunit *test)
> +{
> +	if (IS_MODULE(CONFIG_LINEINFO_KUNIT_TEST) &&
> +	    !IS_ENABLED(CONFIG_KALLSYMS_LINEINFO_MODULES))
> +		kunit_skip(test,
> +			   "KALLSYMS_LINEINFO_MODULES disabled; test module has no lineinfo");
> +}

[Severity: Low]
Will all tests that inspect local module functions fail when
CONFIG_LINEINFO_KUNIT_TEST=m is built on 32-bit parisc?

On 32-bit parisc, CONFIG_ARCH_WANTS_MODULES_TEXT_SECTIONS is selected and
KBUILD_CFLAGS_MODULE enables -ffunction-sections, which keeps module
functions in per-function .text.* sections instead of merging them into
.text.  scripts/gen_lineinfo.c places those .text.* sections into
extra_sections[] and drops their DWARF line entries, so local test targets
have no lineinfo even when CONFIG_KALLSYMS_LINEINFO_MODULES is enabled.

Passing -fno-function-sections for the test objects in lib/tests/Makefile
(or checking IS_ENABLED(CONFIG_ARCH_WANTS_MODULES_TEXT_SECTIONS) in
skip_without_module_lineinfo()) would avoid these failures.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106132432.248387-1-sashal@kernel.org?part=4

      reply	other threads:[~2026-11-07 13:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 13:24 [PATCH v11 0/4] kallsyms: embed source file:line info in kernel stack traces Sasha Levin
2026-11-06 13:24 ` [PATCH v11 1/4] " Sasha Levin
2026-11-06 14:52   ` Helge Deller
2026-11-07 13:24   ` sashiko-bot
2026-11-06 13:24 ` [PATCH v11 2/4] kallsyms: extend lineinfo to loadable modules Sasha Levin
2026-11-06 13:24 ` [PATCH v11 3/4] kallsyms: delta-compress lineinfo tables for ~2.7x size reduction Sasha Levin
2026-11-06 13:24 ` [PATCH v11 4/4] kallsyms: add KUnit tests for lineinfo feature Sasha Levin
2026-11-07 13:25   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-202912@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@atomlin.com \
    --cc=corbet@lwn.net \
    --cc=da.gomez@kernel.org \
    --cc=deller@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgross@suse.com \
    --cc=kees@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=masahiroy@kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=peterz@infradead.org \
    --cc=petr.pavlu@suse.com \
    --cc=pmladek@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=richard@nod.at \
    --cc=rostedt@goodmis.org \
    --cc=samitolvanen@google.com \
    --cc=sashal@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=thunder.leizhen@huawei.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@kernel.org \
    --cc=wangruikang@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox