[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231011162843.grv6kixw4ides6uw@treble>
Date:   Wed, 11 Oct 2023 09:28:43 -0700
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Borislav Petkov <bp@...en8.de>,
        David Kaplan <david.kaplan@....com>, x86@...nel.org,
        luto@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Revert "x86/retpoline: Remove
 .text..__x86.return_thunk section"
On Wed, Oct 11, 2023 at 09:41:42AM +0200, Peter Zijlstra wrote:
> > +++ b/tools/objtool/check.c
> > @@ -1610,6 +1610,15 @@ static int add_jump_destinations(struct objtool_file *file)
> >  			return -1;
> >  		}
> >  
> > +		/*
> > +		 * Since retpolines are in the same section as the return
> > +		 * thunk, they might not use a relocation when branching to it.
> > +		 */
> > +		if (jump_dest->sym && jump_dest->sym->return_thunk) {
> > +			add_return_call(file, insn, true);
> > +			continue;
> > +		}
> 
> *urgh*... I mean, yes, that obviously works, but should we not also have
> the retpoline thingy for consistency? That case makes less sense though
> :/
Consistency with what?  The extra section seems pointless but maybe I'm
missing something.
-- 
Josh
Powered by blists - more mailing lists
 
