Skip to content

objtool: Improve code generation for annotation macros

Josh Poimboeuf lkml 2 versions – Applied

Status from this message: The following commit has been merged into the objtool/urgent branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 11 repliesApplied
  2. v14 patches 2 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4x86/alternative: Remove ANNOTATE_DATA_SPECIAL usagearch/um/include/shared/common-offsets.h arch/x86/include/asm/alternative.h arch/x86/kernel/asm-offsets.c+7 -40 replies
2/4x86/asm: Remove ANNOTATE_DATA_SPECIAL usagearch/um/include/asm/Kbuild arch/um/include/shared/common-offsets.h arch/x86/include/asm/asm.h +4 more+20 -120 replies
3/4objtool: Consolidate annotation macrosinclude/linux/annotate.h+15 -2112 replies
4/4objtool: Remove newlines and tabs from annotation macrosarch/x86/include/asm/alternative.h arch/x86/include/asm/bug.h arch/x86/include/asm/cpufeature.h +12 more+23 -230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] objtool: Improve code generation for annotation macros

For tip/objtool/urgent (fixing a "regression" in code generation).

Changes since v1 (https://lore.kernel.org/[email protected]):
- rebase on Linus's tree (bug.h conflicts)

As much as possible, undo the code generation damage introduced by ANNOTATE_DATA_SPECIAL:

- Remove its usage in favor of SHF_MERGE + sh_entsize, where possible

- Print the annotation on a single line:

      912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection

- Remove the trailing newline/tab; let the invoking code decide on the appropriate separator for the given context

Josh Poimboeuf (4):
x86/alternative: Remove ANNOTATE_DATA_SPECIAL usage x86/asm: Remove ANNOTATE_DATA_SPECIAL usage
objtool: Consolidate annotation macros
objtool: Remove newlines and tabs from annotation macros

 arch/um/include/asm/Kbuild                 |  1 -
 arch/um/include/shared/common-offsets.h    |  3 ++
 arch/x86/include/asm/alternative.h         |  9 +++---
 arch/x86/include/asm/asm.h                 | 25 ++++++++-------
 arch/x86/include/asm/bug.h                 |  2 +-
 arch/x86/include/asm/cpufeature.h          |  2 +-
 arch/x86/include/asm/irq_stack.h           |  2 +-
 arch/x86/include/asm/jump_label.h          |  2 +-
 arch/x86/include/asm/nospec-branch.h       |  4 +--
 arch/x86/include/asm/paravirt_types.h      |  2 +-
 arch/x86/include/asm/smap.h                |  8 ++---
 arch/x86/include/asm/static_call.h         |  2 +-
 arch/x86/kernel/alternative.c              |  4 +--
 arch/x86/kernel/asm-offsets.c              |  3 ++
 arch/x86/kernel/rethook.c                  |  2 +-
 arch/x86/kernel/static_call.c              |  4 +--
 arch/x86/lib/error-inject.c                |  2 +-
 arch/x86/um/shared/sysdep/kernel-offsets.h |  2 ++
 include/linux/annotate.h                   | 36 +++++++++-------------
 include/linux/objtool.h                    |  2 +-
 kernel/bounds.c                            |  1 +
 scripts/mod/devicetable-offsets.c          |  1 +
 22 files changed, 62 insertions(+), 57 deletions(-)
Signature · 1 line
2.51.1