From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Miroslav Benes <mbenes@suse.cz>
Subject: Re: [PATCH v2 5/9] objtool: Add verbose option for disassembling affected functions
Date: Thu, 13 Apr 2023 10:05:27 +0200 [thread overview]
Message-ID: <20230413080527.GG4253@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <4cadacc719db1e792c335309056960ca6f71139e.1681325924.git.jpoimboe@kernel.org>
On Wed, Apr 12, 2023 at 12:03:20PM -0700, Josh Poimboeuf wrote:
> When a warning is associated with a function, add an option to
> disassemble that function.
>
> This makes it easier for reporters to submit the information needed to
> diagnose objtool warnings.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
> ---
> tools/objtool/Documentation/objtool.txt | 5 ++
> tools/objtool/builtin-check.c | 5 ++
> tools/objtool/check.c | 77 +++++++++++++++++++++++++
> tools/objtool/include/objtool/builtin.h | 1 +
> 4 files changed, 88 insertions(+)
>
> diff --git a/tools/objtool/Documentation/objtool.txt b/tools/objtool/Documentation/objtool.txt
> index 8e53fc6735ef..4d6c5acde7a3 100644
> --- a/tools/objtool/Documentation/objtool.txt
> +++ b/tools/objtool/Documentation/objtool.txt
> @@ -244,6 +244,11 @@ To achieve the validation, objtool enforces the following rules:
> Objtool warnings
> ----------------
>
> +NOTE: When requesting help with an objtool warning, please recreate with
> +OBJTOOL_VERBOSE=1 (e.g., "make OBJTOOL_VERBOSE=1") and send the full
> +output, including any disassembly below the warning, to the objtool
> +maintainers.
> +
> For asm files, if you're getting an error which doesn't make sense,
> first make sure that the affected code follows the above rules.
>
> diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
> index 7c175198d09f..5e21cfb7661d 100644
> --- a/tools/objtool/builtin-check.c
> +++ b/tools/objtool/builtin-check.c
> @@ -93,6 +93,7 @@ static const struct option check_options[] = {
> OPT_BOOLEAN(0, "no-unreachable", &opts.no_unreachable, "skip 'unreachable instruction' warnings"),
> OPT_BOOLEAN(0, "sec-address", &opts.sec_address, "print section addresses in warnings"),
> OPT_BOOLEAN(0, "stats", &opts.stats, "print statistics"),
> + OPT_BOOLEAN('v', "verbose", &opts.verbose, "verbose warnings"),
>
> OPT_END(),
> };
> @@ -118,6 +119,10 @@ int cmd_parse_options(int argc, const char **argv, const char * const usage[])
> parse_options(envc, envv, check_options, env_usage, 0);
> }
>
> + env = getenv("OBJTOOL_VERBOSE");
> + if (env && !strcmp(env, "1"))
> + opts.verbose = true;
> +
> argc = parse_options(argc, argv, check_options, usage, 0);
> if (argc != 1)
> usage_with_options(usage, check_options);
No real objection; but I do feel obliged to point out that:
OBJTOOL_ARGS="-v" achieves much the same.
next prev parent reply other threads:[~2023-04-13 8:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 19:03 [PATCH v2 0/9] objtool: warning improvements Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 1/9] scripts/objdump-func: Support multiple functions Josh Poimboeuf
2023-04-14 14:47 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 2/9] objtool: Add WARN_INSN() Josh Poimboeuf
2023-04-14 14:47 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 3/9] objtool: Limit unreachable warnings to once per function Josh Poimboeuf
2023-04-13 8:01 ` Peter Zijlstra
2023-04-13 15:03 ` Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 4/9] objtool: Add symbol iteration helpers Josh Poimboeuf
2023-04-14 14:47 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 5/9] objtool: Add verbose option for disassembling affected functions Josh Poimboeuf
2023-04-13 8:05 ` Peter Zijlstra [this message]
2023-04-13 15:05 ` Josh Poimboeuf
2023-04-13 8:08 ` Peter Zijlstra
2023-04-13 14:03 ` Miroslav Benes
2023-04-13 15:09 ` Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 6/9] objtool: Include backtrace in verbose mode Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 7/9] objtool: Remove superfluous dead_end_function() check Josh Poimboeuf
2023-04-14 14:47 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 8/9] objtool: Detect missing __noreturn annotations Josh Poimboeuf
2023-04-13 8:48 ` Peter Zijlstra
2023-04-13 15:19 ` Josh Poimboeuf
2023-04-13 19:17 ` Peter Zijlstra
2023-04-13 14:19 ` Miroslav Benes
2023-04-13 15:32 ` Josh Poimboeuf
2023-04-12 19:03 ` [PATCH v2 9/9] objtool: Ignore exc_double_fault() __noreturn warnings Josh Poimboeuf
2023-04-13 9:24 ` Peter Zijlstra
2023-04-14 21:16 ` Nick Desaulniers
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=20230413080527.GG4253@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®