lkml.org 
[lkml]   [2020]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 02/17] objtool: Better handle IRET
On Fri, Apr 17, 2020 at 07:37:32PM +0200, Alexandre Chartre wrote:
> > @@ -2243,6 +2232,20 @@ static int validate_branch(struct objtoo
> > break;
> > + case INSN_EXCEPTION_RETURN:
> > + if (handle_insn_ops(insn, &state))
> > + return 1;
>
> Do we need to update the stack state for normal IRET? This wasn't done before.
> So shouldn't this better be:
>
> case INSN_EXCEPTION_RETURN:
> if (!func)
> return 0;
>
> if (handle_insn_ops(insn, &state))
> return 1;
>
> break;

Well, I was going to do the unconditional handle_insn_ops(), like
mentioned, but then that intra_function_call thing spoiled it.

It doesn't matter though; STT_NOTYPE doesn't care.

> > +
> > + /*
> > + * This handles x86's sync_core() case, where we use an
> > + * IRET to self. All 'normal' IRET instructions are in
> > + * STT_NOTYPE entry symbols.
> > + */
> > + if (func)
> > + break;
>
> Is it worth checking that func->name is effectively "sync_core"?

It's an inline..

\
 
 \ /
  Last update: 2020-04-17 20:24    [W:2.878 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site