From: David Laight <david.laight.linux@gmail.com>
To: bot+bpf-ci@kernel.org
Cc: pmladek@suse.com, kees@kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org, bpf@vger.kernel.org,
jim.cromie@gmail.com, ljs@kernel.org, mcgrof@kernel.org,
andrey.grodzovsky@crowdstrike.com, rostedt@goodmis.org,
andrii@kernel.org, wusamuel@google.com,
linux-kselftest@vger.kernel.org, ast@kernel.org,
daniel@iogearbox.net, martin.lau@kernel.org, eddyz87@gmail.com,
yonghong.song@linux.dev, mason@kernel.org,
ihor.solodrai@linux.dev
Subject: Re: [PATCH v3 next 02/13] scripts/kallsyms: Improve error reporting
Date: Sat, 14 Nov 2026 14:29:46 +0000 [thread overview]
Message-ID: <20261114142946.4d696bc5@pumpkin> (raw)
In-Reply-To: <8c6f9e7d8a4cb037b480c22ba2b6866133292bbd68ebdc777e385373950b793f@mail.kernel.org>
On Wed, 11 Nov 2026 23:33:55 +0000 (UTC)
bot+bpf-ci@kernel.org wrote:
> > scripts/kallsyms: Improve error reporting
>
> TL;DR:
> - Error message for failing to open the output file says "nin.out", likely a
> typo for "out.bin"
Indeed - will fix (and in #4)
> - usage() text for --all-symbols may be inaccurate: it covers all sections,
> not just local symbols
It'll do - needs to be terse and it's a build tool.
David
>
> > diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> > --- a/scripts/kallsyms.c
> > +++ b/scripts/kallsyms.c
>
> [ ... ]
>
> > @@ -822,6 +824,25 @@ static void sort_symbols(void)
> > qsort(table, table_cnt, sizeof(table[0]), compare_symbols);
> > }
> >
> > +static void usage(void)
> > +{
> > + fprintf(stderr,
> > + "Usage: kallsyms [options] vmlinux out.bin > out.S\n"
> > + " kallsyms --sysmap=out.map vmlinux\n"
> > + " --all-symbols Include all local symbols\n"
>
> This isn't a bug, but is this description of --all-symbols accurate?
>
> In symbol_valid() the option only disables the text range filter:
>
> if (!all_symbols) {
> ...
> if (symbol_in_range(s, text_ranges,
> ARRAY_SIZE(text_ranges)) == 0)
> return 0;
>
> so symbols from the data, rodata and bss sections are included, global and
> local alike. Local text symbols are already kept without the option. This
> also matches the CONFIG_KALLSYMS_ALL help text, "symbols from all sections".
>
> Would something like "Include symbols from all sections, not only text" be
> closer to what the code does?
>
> [ ... ]
>
> > @@ -845,49 +867,57 @@ int main(int argc, char **argv)
> [ ... ]
> > out_bin_name = argv[optind + 1];
> > out_bin_file = fopen(out_bin_name, "w");
> > - if (!out_bin_file) {
> > - perror(out_bin_name);
> > - exit(EXIT_FAILURE);
> > - }
> > + if (!out_bin_file)
> > + err(EXIT_FAILURE, "failed to open nin.out file %s", out_bin_name);
>
> Is "nin.out" a typo here? usage() and the close-time message in main(),
>
> errx(EXIT_FAILURE, "error writing out.bin file %s", out_bin_name);
>
> both call this file "out.bin".
>
> The string is changed later in the series by 317dc01f3774 ("scripts/kallsyms:
> make use of binary data output optional") to "failed to open bin.out file
> %s", which still differs from the "out.bin" used by usage() and the
> close-time message.
>
>
> ---
> AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
> See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
>
> CI run summary: https://github.com/kernel-patches/bpf/actions/runs/43116767394
next prev parent reply other threads:[~2026-11-14 14:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 11:58 [PATCH v3 next 00/13] kallsyms: optimise symbol search by name David Laight
2026-11-11 11:58 ` [PATCH v3 next 01/13] scripts/kallsyms: Avoid overrunning on-stack buffer David Laight
2026-11-11 11:59 ` [PATCH v3 next 02/13] scripts/kallsyms: Improve error reporting David Laight
2026-11-11 23:33 ` bot+bpf-ci
2026-11-14 14:29 ` David Laight [this message]
2026-11-11 11:59 ` [PATCH v3 next 03/13] scripts/elf-parse: add elf_map_big_endian() helper David Laight
2026-11-11 11:59 ` [PATCH v3 next 04/13] scripts/kallsyms: make use of binary data output optional David Laight
2026-11-11 23:34 ` bot+bpf-ci
2026-11-11 11:59 ` [PATCH v3 next 05/13] kallsyms: Fix selftest startup delay David Laight
2026-11-11 11:59 ` [PATCH v3 next 06/13] kallsyms: Improve selftest test_perf_kallsyms_lookup_name() output David Laight
2026-11-11 23:17 ` bot+bpf-ci
2026-11-11 11:59 ` [PATCH v3 next 07/13] kallsyms: Match compressed tokens on the fly during binary search David Laight
2026-11-13 23:39 ` Samuel Wu
2026-11-11 11:59 ` [PATCH v3 next 08/13] kallsyms: Optimise symbol name search David Laight
2026-11-14 0:45 ` Samuel Wu
2026-11-14 12:20 ` David Laight
2026-11-11 11:59 ` [PATCH v3 next 09/13] kallsyms: Add a kernel parameter to change the kallsyms_markers[] density David Laight
2026-11-11 23:33 ` bot+bpf-ci
2026-11-14 1:01 ` Samuel Wu
2026-11-14 12:23 ` David Laight
2026-11-11 11:59 ` [PATCH v3 next 10/13] scripts/kallsyms: Keep full expansion of tokens David Laight
2026-11-11 11:59 ` [PATCH v3 next 11/13] scripts/kallsyms: Optimise compress_symbols() David Laight
2026-11-11 11:59 ` [PATCH v3 next 12/13] scripts/kallsyms: Reuse tokens that have no references David Laight
2026-11-11 23:34 ` bot+bpf-ci
2026-11-11 11:59 ` [PATCH v3 next 13/13] scripts/kallsyms: Reuse little-used compression tokens David Laight
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=20261114142946.4d696bc5@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=andrey.grodzovsky@crowdstrike.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=jim.cromie@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=martin.lau@kernel.org \
--cc=mason@kernel.org \
--cc=mcgrof@kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=wusamuel@google.com \
--cc=yonghong.song@linux.dev \
/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