All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mbenes@suse.cz
Subject: Re: [PATCH 1/2] objtool: Optimize re-writing jump_label
Date: Thu, 7 Oct 2021 23:55:50 -0700	[thread overview]
Message-ID: <20211008065550.zge5zkbfrki5osv2@treble> (raw)
In-Reply-To: <20211007212626.950220936@infradead.org>

On Thu, Oct 07, 2021 at 11:22:12PM +0200, Peter Zijlstra wrote:
> There's no point to re-write the jump_label NOP when it's already a NOP.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  tools/objtool/check.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -1397,7 +1397,7 @@ static int handle_jump_alt(struct objtoo
>  		return -1;
>  	}
>  
> -	if (special_alt->key_addend & 2) {
> +	if ((special_alt->key_addend & 2) && orig_insn->type != INSN_NOP) {
>  		struct reloc *reloc = insn_reloc(file, orig_insn);
>  
>  		if (reloc) {

While you're at it, a comment would be very helpful for that whole
clause.

-- 
Josh


  reply	other threads:[~2021-10-08  6:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 21:22 [PATCH 0/2] objtool: Avoid pointless modifications Peter Zijlstra
2021-10-07 21:22 ` [PATCH 1/2] objtool: Optimize re-writing jump_label Peter Zijlstra
2021-10-08  6:55   ` Josh Poimboeuf [this message]
2021-10-08 10:03     ` Peter Zijlstra
2021-10-08 16:28       ` Josh Poimboeuf
2021-10-07 21:22 ` [PATCH 2/2] objtool: Optimize/fix retpoline alternative generation Peter Zijlstra
2021-10-08  7:23   ` Josh Poimboeuf
2021-10-08 10:35     ` Peter Zijlstra
2021-10-08 16:39       ` Josh Poimboeuf
2021-10-09 10:42         ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211008065550.zge5zkbfrki5osv2@treble \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.