[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YyHrX/fTMwfv24W7@hirez.programming.kicks-ass.net>
Date: Wed, 14 Sep 2022 16:55:27 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Michael Matz <matz@...e.de>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>,
Borislav Petkov <bp@...en8.de>,
linux-toolchains@...r.kernel.org,
Indu Bhagat <indu.bhagat@...cle.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-kernel@...r.kernel.org, "Jose E. Marchesi" <jemarch@....org>,
Miroslav Benes <mbenes@...e.cz>,
Mark Rutland <mark.rutland@....com>,
Will Deacon <will@...nel.org>, x86@...nel.org,
linux-arm-kernel@...ts.infradead.org,
live-patching@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
Ard Biesheuvel <ardb@...nel.org>,
Chen Zhongjin <chenzhongjin@...wei.com>,
Sathvika Vasireddy <sv@...ux.ibm.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Mark Brown <broonie@...nel.org>
Subject: Re: [RFC] Objtool toolchain proposal:
-fannotate-{jump-table,noreturn}
On Wed, Sep 14, 2022 at 02:28:26PM +0000, Michael Matz wrote:
> Hello,
>
> On Wed, 14 Sep 2022, Peter Zijlstra wrote:
>
> > > Maybe this is semantics, but I wouldn't characterize objtool's existence
> > > as being based on the mistrust of tools. It's main motivation is to
> > > fill in the toolchain's blind spots in asm and inline-asm, which exist
> > > by design.
> >
> > That and a fairly deep seated loathing for the regular CFI annotations
> > and DWARF in general. Linus was fairly firm he didn't want anything to
> > do with DWARF for in-kernel unwinding.
>
> I was referring only to the check-stuff functionality of objtool, not to
> its other parts. Altough, of course, "deep seated loathing" is a special
> form of mistrust as well ;-)
Those were born out the DWARF unwinder itself crashing the kernel due to
it's inherent complexity (tracking the whole DWARF state machine and not
being quite robust itself).
That, and the manual CFI annotations were 'always' wrong, due to humans
and no tooling verifying them.
That said; objtool does do have a number of annotations as well; mostly
things telling what kind of stackframe stuff starts with.
> > That left us in a spot that we needed unwind information in a 'better'
> > format than DWARF.
> >
> > Objtool was born out of those contraints. ORC not needing the CFI
> > annotations and ORC being *much* faster at unwiding and generation
> > (debug builds are slow) were all good.
>
> Don't mix DWARF debug info with DWARF-based unwinding info, the latter
> doesn't imply the former. Out of interest: how does ORC get around the
> need for CFI annotations (or equivalents to restore registers) and what
Objtool 'interprets' the stackops. So it follows the call-graph and is
an interpreter for all instructions that modify the stack. Doing that it
konws what the stackframe is at 'most' places.
> makes it fast? I want faster unwinding for DWARF as well, when there's
> feature parity :-) Maybe something can be learned for integration into
> dwarf-unwind.
I think we have some details here:
https://www.kernel.org/doc/html/latest/x86/orc-unwinder.html
Powered by blists - more mailing lists