[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <kykaol3hdxxvpwa7drnlidgeqb5cgkrdpo7bokifihob73hwyx@cu6sfkz3z6ze>
Date: Thu, 3 Apr 2025 12:05:18 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Andrew Cooper <andrew.cooper3@...rix.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>, Juergen Gross <jgross@...e.com>
Subject: Re: [PATCH] objtool: Fix SYSCALL instruction handling and
INSN_CONTEXT_SWITCH
On Thu, Apr 03, 2025 at 07:57:42PM +0100, Andrew Cooper wrote:
> On 03/04/2025 7:48 pm, Josh Poimboeuf wrote:
> > With SYSCALL and SYSENTER, INSN_CONTEXT_SWITCH now has a sane
> > well-defined return semantic.
>
> Do you mean "without" here?
I was just testing to see if anybody actually read all the way to the
bottom. Congratulations, you passed the test!
> > diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
> > index 33d861c04ebd..628c2c8a0f6a 100644
> > --- a/tools/objtool/arch/x86/decode.c
> > +++ b/tools/objtool/arch/x86/decode.c
> > @@ -535,10 +535,9 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
> >
> > insn->type = INSN_JUMP_CONDITIONAL;
> >
> > - } else if (op2 == 0x05 || op2 == 0x07 || op2 == 0x34 ||
> > - op2 == 0x35) {
> > + } else if (op2 == 0x07) {
> >
> > - /* sysenter, sysret */
> > + /* sysret */
> > insn->type = INSN_CONTEXT_SWITCH;
>
> Linux doesn't use SYSEXIT, but it's conceptually like SYSRET/ERETx so
> perhaps worth keeping the 0x35 here?
In theory yes, but objtool will never support x86-32. Note I also
removed retf and jmpf, I'm thinking it's simpler to just stick to the
instructions we actually use.
--
Josh
Powered by blists - more mailing lists