From: Josh Poimboeuf <jpoimboe@redhat.com> To: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org, mbenes@suse.cz Subject: Re: [PATCH 2/2] objtool: Optimize/fix retpoline alternative generation Date: Fri, 8 Oct 2021 00:23:25 -0700 [thread overview] Message-ID: <20211008072325.4qujedsjtjqbvzrd@treble> (raw) In-Reply-To: <20211007212627.008917519@infradead.org> On Thu, Oct 07, 2021 at 11:22:13PM +0200, Peter Zijlstra wrote: > When re-running objtool it will generate alterantives for all "alternatives" > retpoline hunks, even if they are already present. > > Discard the retpoline alternatives later so we can mark the Discard? or mark as ignored? > +++ b/tools/objtool/check.c > @@ -1468,6 +1468,14 @@ static int add_special_section_alts(stru > ret = -1; > goto out; > } > + /* > + * Skip (but mark) the retpoline alternatives so that we > + * don't generate them again. > + */ I'm having a lot of trouble following this comment. In my half-sleeping state I'm theorizing this serves two purposes: 1) skip validating the alt (because why?) and 2) if re-running objtool on the object, don't generate a duplicate alternative? or maybe it also avoids duplicates for retpoline alternatives which were created in asm code? Not sure if I'm right but either way the comment needs more content. Also not sure about $SUBJECT, maybe it can be more specific. BTW, this "re-running objtool" thing is probably a bigger problem that can be handled more broadly. When writing an object, we could write a dummy discard section ".discard.objtool_wuz_here" which tells it not to touch it a second time as weird things could happen. -- Josh
next prev parent reply other threads:[~2021-10-08 7:23 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 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 [this message] 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=20211008072325.4qujedsjtjqbvzrd@treble \ --to=jpoimboe@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mbenes@suse.cz \ --cc=peterz@infradead.org \ --subject='Re: [PATCH 2/2] objtool: Optimize/fix retpoline alternative generation' \ /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
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.