From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "Ingo Molnar" <mingo@kernel.org>,
"Jan Beulich" <JBeulich@suse.com>,
"Borislav Petkov" <bp@alien8.de>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Ingo Molnar" <mingo@elte.hu>, "Brian Gerst" <brgerst@gmail.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Denys Vlasenko" <dvlasenk@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Frank Ch. Eigler" <fche@redhat.com>
Subject: Re: [PATCH] x86/debug: Remove perpetually broken, unmaintainable dwarf annotations
Date: Mon, 1 Jun 2015 14:45:16 -0500 [thread overview]
Message-ID: <20150601194516.GA6110@treble.redhat.com> (raw)
In-Reply-To: <CALCETrWw0hogKsf3wO5aYeuJB0j5-wE5Hzm4==X5bJsbZNiY3g@mail.gmail.com>
On Fri, May 29, 2015 at 10:47:31AM -0700, Andy Lutomirski wrote:
> On Thu, May 28, 2015 at 6:17 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Jan Beulich <JBeulich@suse.com> wrote:
> >
> >> > and meanwhile you can keep a revert of this patch ported to SUSE kernels in
> >> > whatever fashion you prefer.
> >>
> >> Funny suggestion - I don't think that's reasonable for us to do. Or if we were
> >> to, we could as well invest in doing the re-work you're asking for; I don't
> >> think anyone will have the time to do either.
> >
> > That's fair enough: if there's not enough resources to keep a feature maintainable
> > upstream then it should not be upstream in that form.
> >
> > This isn't just some driver we can let bit-rot in peace until it finds a
> > maintainer (or not), without affecting anyone but users of that driver.
> >
> > This is hundreds of usage sites of ugly code intermixed with critical pieces of
> > assembly code that negatively affects the hackability of everything.
> >
> > Also, with the feature missing completely, maybe someone finds a method to
> > introduce it in a maintainable fashion, while with the feature included upstream
> > there's very little pressure to do that. As a bonus we'd also win a workable dwarf
> > unwinder.
>
> Before doing something drastic like this, I think we should get Josh's
> opinion, since I think he's working on a new (?) unwinder.
>
> FWIW, musl is considering some kind of automatic annotation scheme:
>
> http://www.openwall.com/lists/musl/2015/05/13/5
Thanks for the link! I found a newer version of it here:
http://www.openwall.com/lists/musl/2015/05/31/5
Overall I think that script is a really good solution.
>From what I can tell, it tracks the CFA (stack pointer) perfectly.
(Which is actually pretty straightfoward if you just hook into function
entry/exit, push/pop, and add/sub to rsp).
It also does a nice job at making a best effort at tracking the caller's
register values (which are less important than CFA but still nice to
have).
Overall I'd bet that it would produce much more accurate results than
our current manual annotations.
I'm not crazy about the fact that it relies on awk, but I can't think of
a less hacky way to do that, without stuffing the CFI metadata directly
into the binary.
We could pretty easily port something like that to the kernel. Before
that though, I think we'll need my stack validation patch set which
helps enforce asm function/non-function boundaries and proper ELF
function annotations. Wrapping up a new version of that now.
--
Josh
next prev parent reply other threads:[~2015-06-01 19:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 8:20 [PATCH] x86-64: fix unwind info for incomplete frames Jan Beulich
2015-05-28 9:01 ` Ingo Molnar
2015-05-28 9:45 ` Jan Beulich
2015-05-28 11:20 ` [PATCH] x86/debug: Remove perpetually broken, unmaintainable dwarf annotations Ingo Molnar
2015-05-28 11:39 ` [PATCH v2] " Ingo Molnar
2015-05-28 11:51 ` [PATCH] " Jan Beulich
2015-05-28 13:17 ` Ingo Molnar
2015-05-29 17:47 ` Andy Lutomirski
2015-05-29 20:27 ` Josh Poimboeuf
2015-05-29 21:39 ` Frank Ch. Eigler
2015-06-01 19:45 ` Josh Poimboeuf [this message]
2015-06-01 19:53 ` Andy Lutomirski
2015-06-01 20:19 ` Josh Poimboeuf
2015-06-02 5:57 ` Ingo Molnar
2015-06-02 14:46 ` Josh Poimboeuf
2015-06-02 17:00 ` Andy Lutomirski
2015-06-05 17:11 ` Andi Kleen
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=20150601194516.GA6110@treble.redhat.com \
--to=jpoimboe@redhat.com \
--cc=JBeulich@suse.com \
--cc=a.p.zijlstra@chello.nl \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=fche@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@elte.hu \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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