From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 9/9] objtool: Collect all annotations in objtool.h
Date: Sat, 23 Nov 2024 14:19:43 +0100 [thread overview]
Message-ID: <20241123131943.GD24774@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241122175445.tx3edadmof76yegs@jpoimboe>
On Fri, Nov 22, 2024 at 09:54:45AM -0800, Josh Poimboeuf wrote:
> On Fri, Nov 22, 2024 at 01:10:25PM +0100, Peter Zijlstra wrote:
> > +#ifndef __ASSEMBLY__
> > +/*
> > + * Annotate away the various 'relocation to !ENDBR` complaints; knowing that
> > + * these relocations will never be used for indirect calls.
> > + */
> > +#define ANNOTATE_NOENDBR ASM_ANNOTATE(ANNOTYPE_NOENDBR)
> > +/*
> > + * This should be used immediately before an indirect jump/call. It tells
> > + * objtool the subsequent indirect jump/call is vouched safe for retpoline
> > + * builds.
> > + */
> > +#define ANNOTATE_RETPOLINE_SAFE ASM_ANNOTATE(ANNOTYPE_RETPOLINE_SAFE)
> > +/*
> > + * objtool annotation to ignore the alternatives and only consider the original
> > + * instruction(s).
> > + */
> > +#define ANNOTATE_IGNORE_ALTERNATIVE ASM_ANNOTATE(ANNOTYPE_IGNORE_ALTS)
>
> This is a good start, though it would be really nice to have them *all*
> together:
>
> - move ANNOTATE_INTRA_FUNCTION_CALL down next to those ^
>
> - similarly, create ANNOTATE_UNRET_BEGIN and just do
>
> #define VALIDATE_UNRET_BEGIN ANNOTATE_UNRET_BEGIN
>
> since the VALIDATE_* syntax is more descriptive.
Done these two.
> - create ANNOTATE_INSTR_BEGIN and ANNOTATE_INSTR_END, and then do
>
> #define instrumentation_begin() ANNOTATE_INSTR_BEGIN
>
> to keep the existing syntax. Then instrumentation.h is no longer
> needed. The nice comment there can go above ANNOTATE_INSTR_BEGIN.
Let me noodle a bit with this one, its a bit different from the rest.
> BTW, is there a reason .discard.[un]reachable weren't converted over?
Completely forgot/missed them. Let me add a patch.
next prev parent reply other threads:[~2024-11-23 13:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 12:10 [PATCH 0/9] objtool: Rewrite annotations Peter Zijlstra
2024-11-22 12:10 ` [PATCH 1/9] objtool: Generic annotation infrastructure Peter Zijlstra
2024-11-24 3:16 ` Nathan Chancellor
2024-11-25 9:28 ` Peter Zijlstra
2024-11-22 12:10 ` [PATCH 2/9] objtool: Convert ANNOTATE_NOENDBR to ANNOTATE Peter Zijlstra
2024-11-22 12:10 ` [PATCH 3/9] objtool: Convert ANNOTATE_RETPOLINE_SAFE " Peter Zijlstra
2024-11-22 12:10 ` [PATCH 4/9] objtool: Convert instrumentation_{begin,end}() " Peter Zijlstra
2024-11-22 12:10 ` [PATCH 5/9] objtool: Convert VALIDATE_UNRET_BEGIN " Peter Zijlstra
2024-11-22 12:10 ` [PATCH 6/9] objtool: Convert ANNOTATE_IGNORE_ALTERNATIVE " Peter Zijlstra
2024-11-22 12:10 ` [PATCH 7/9] objtool: Convert ANNOTATE_INTRA_FUNCTION_CALLS " Peter Zijlstra
2024-11-22 17:22 ` Josh Poimboeuf
2024-11-22 12:10 ` [PATCH 8/9] objtool: Collapse annotate sequences Peter Zijlstra
2024-11-22 17:57 ` Josh Poimboeuf
2024-11-23 13:09 ` Peter Zijlstra
2024-11-22 12:10 ` [PATCH 9/9] objtool: Collect all annotations in objtool.h Peter Zijlstra
2024-11-22 17:54 ` Josh Poimboeuf
2024-11-23 13:19 ` Peter Zijlstra [this message]
2024-11-25 13:06 ` Peter Zijlstra
2024-11-25 13:40 ` Peter Zijlstra
2024-11-25 14:36 ` Peter Zijlstra
2024-11-22 17:40 ` [PATCH 0/9] objtool: Rewrite annotations Josh Poimboeuf
2024-11-23 13:21 ` 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=20241123131943.GD24774@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox