From: Jiri Slaby <jslaby@suse.cz>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org
Subject: Re: [PATCH 1/2] x86/stacktrace: do not fail when regs on stack for ORC
Date: Mon, 14 May 2018 13:08:40 +0200 [thread overview]
Message-ID: <6931a360-c07e-140d-55d9-b1bb3334e1af@suse.cz> (raw)
In-Reply-To: <20180511151252.sihxdvl4ip7hjjoc@treble>
On 05/11/2018, 05:12 PM, Josh Poimboeuf wrote:
> I assume you're going to carry this as
> part of your patches to enable HAVE_RELIABLE_STACKTRACE?
Sure.
> --- a/tools/objtool/orc_dump.c
> +++ b/tools/objtool/orc_dump.c
> @@ -203,7 +203,8 @@ int orc_dump(const char *_objname)
>
> print_reg(orc[i].bp_reg, orc[i].bp_offset);
>
> - printf(" type:%s\n", orc_type_name(orc[i].type));
> + printf(" type:%s end:%d\n",
> + orc_type_name(orc[i].type), orc[i].end);
Maybe just " type:%s%s\n" and »orc[i].end ? " END" : ""«?
> }
>
> elf_end(elf);
> diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
> index 18384d9be4e1..229c12e3fcf6 100644
> --- a/tools/objtool/orc_gen.c
> +++ b/tools/objtool/orc_gen.c
> @@ -86,6 +86,7 @@ int create_orc(struct objtool_file *file)
> orc->sp_offset = cfa->offset;
> orc->bp_offset = bp->offset;
> orc->type = insn->state.type;
> + orc->end = insn->state.end;
So you moved the assignment below of 'if (cfa->base == CFI_UNDEFINED)' –
this assignment will never happen, as I have just verified.
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -31,6 +31,8 @@ int create_orc(struct objtool_file *file)
struct cfi_reg *cfa = &insn->state.cfa;
struct cfi_reg *bp = &insn->state.regs[CFI_BP];
+ orc->end = insn->state.end;
+
if (cfa->base == CFI_UNDEFINED) {
orc->sp_reg = ORC_REG_UNDEFINED;
continue;
@@ -86,7 +88,6 @@ int create_orc(struct objtool_file *file)
orc->sp_offset = cfa->offset;
orc->bp_offset = bp->offset;
orc->type = insn->state.type;
- orc->end = insn->state.end;
}
return 0;
thanks,
--
js
suse labs
next prev parent reply other threads:[~2018-05-14 11:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 8:03 Jiri Slaby
2017-11-30 8:03 ` [PATCH 2/2] x86/stacktrace: make sure reliable stack trace reached userspace Jiri Slaby
2017-11-30 19:57 ` [PATCH 1/2] x86/stacktrace: do not fail when regs on stack for ORC Josh Poimboeuf
2017-11-30 19:59 ` Josh Poimboeuf
2017-12-01 7:34 ` Jiri Slaby
2017-12-14 21:58 ` Jiri Slaby
2017-12-18 3:37 ` Josh Poimboeuf
2017-12-18 6:59 ` Jiri Slaby
2017-12-20 17:45 ` Josh Poimboeuf
2017-12-20 19:07 ` Jiri Slaby
2018-04-16 22:16 ` Josh Poimboeuf
2018-04-19 13:42 ` Josh Poimboeuf
2018-05-10 12:33 ` Jiri Slaby
2018-05-10 12:49 ` Josh Poimboeuf
2018-05-11 7:01 ` Jiri Slaby
2018-05-11 15:12 ` Josh Poimboeuf
2018-05-14 11:08 ` Jiri Slaby [this message]
2018-05-14 13:42 ` Josh Poimboeuf
2018-05-14 14:00 ` Jiri Slaby
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=6931a360-c07e-140d-55d9-b1bb3334e1af@suse.cz \
--to=jslaby@suse.cz \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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®