[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjiiDFHIQg78QwSb@hirez.programming.kicks-ass.net>
Date: Mon, 21 Mar 2022 17:04:28 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
mhiramat@...nel.org, ast@...nel.org, hjl.tools@...il.com,
rick.p.edgecombe@...el.com, rppt@...nel.org,
linux-toolchains@...r.kernel.org, Andrew.Cooper3@...rix.com,
ndesaulniers@...gle.com
Subject: Re: linux-next: build warnings after merge of the tip tree
On Mon, Mar 21, 2022 at 11:28:05AM -0400, Steven Rostedt wrote:
> On Mon, 21 Mar 2022 14:04:05 +0100
> Peter Zijlstra <peterz@...radead.org> wrote:
> > Also, folks, I'm thinking we should start to move to __fexit__, if CET
> > SHSTK ever wants to come to kernel land return trampolines will
> > insta-stop working.
> >
> > Hjl, do you think we could get -mfexit to go along with -mfentry ?
> int funcA () {
> [..]
> return funcB();
> }
> This currently works with function graph and kretprobe tracing because of
> the shadow stack. Let's say we traced both funcA and funcB
>
> funcA:
> call __fentry__
push funcA on trace-stack
>
> [..]
> jmp funcB
>
> funcB:
> call __fentry__
push funcB on trace-stack
>
> [..]
call __fexit__
pop trace-stack until empty
'exit funcB'
'exit funcA'
> ret
>
> That is, the current algorithm traces the end of both funcA and funcB
> without issue, because of how the shadow stack works.
And it all works, no? Or what am I missing?
Powered by blists - more mailing lists