Skip to content

Make check implementation arch agnostic

Julien Thierry lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/210 patches 4 repliesIn review
  2. v3 posting 1/21 of 10 patches 1 replySuperseded
  3. v29 patches 14 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches3 repliesSuperseded

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10objtool: Group headers to check in a single listtools/objtool/sync-check.sh+12 -90 replies
2/10objtool: Make sync-check consider the target architecturetools/objtool/Makefile tools/objtool/sync-check.sh+5 -11 reply
3/10objtool: Move macros describing structures to arch-dependent codetools/objtool/arch/x86/include/arch_special.h tools/objtool/special.c+21 -150 replies
4/10objtool: Abstract alternative special case handlingtools/objtool/arch/x86/Build tools/objtool/arch/x86/special.c tools/objtool/objtool.h +3 more+47 -290 replies
5/10objtool: Make relocation in alternative handling arch dependenttools/objtool/arch/x86/special.c tools/objtool/check.c tools/objtool/check.h +1 more+29 -130 replies
6/10objtool: Refactor switch-tables code to support other architecturestools/objtool/arch/x86/special.c tools/objtool/check.c tools/objtool/check.h +1 more+102 -860 replies
7/10headers: Rename frame.harch/x86/include/asm/nospec-branch.h arch/x86/kernel/kprobes/core.c arch/x86/kernel/kprobes/opt.c +9 more+14 -150 replies
8/10objtool: Only include valid definitions depending on source file typeinclude/linux/objtool.h+6 -00 replies
9/10objtool: Make unwind hints definitions available to other architecturesarch/x86/include/asm/orc_types.h arch/x86/include/asm/unwind_hints.h arch/x86/kernel/unwind_orc.c +7 more+254 -1211 reply
10/10objtool: Decode unwind hint register depending on architecturetools/objtool/arch.h tools/objtool/arch/x86/decode.c tools/objtool/check.c+40 -260 replies

Reviews trailers per patch

7 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMiroslav Benes
SeriesR-b
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10
8/10R-b
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/10] Make check implementation arch agnostic

Hi,

The current implementation of the check subcommand has various x86 bits here and there. In order to prepare objtool to provide check for other architectures, add some abstraction over the x86 specific bits, relying on objtool arch specific code to provide some necessary operations.

This is part of the effort to implement check for arm64, initiated [1] by Raphael. The series is based on top of the separation of check & orc subcommands series[2].

I've push both series base on top of tip/objtool/core at [3].

- The first two patches make it simpler for new arches to provide their list of kernel headers, without worrying about modifications in the x86 headers.
- Patch 3 Moves arch specific macros to more suitable location
- Patches 4 and 5 add abstraction to handle alternatives
- Patch 6 adds abstraction to handle jump table
- Patches 7-10 makes unwind hint definitions shared across architectures

Changes since v2 [4]:
- Rebased on v5.9-rc1
- Under tools/objtool/arch/x86/, rename arch_special.c to special.c
- Rename include/linux/frame.h to inclide/linux/objtool.h
- Share unwind hint types across architectures

[1] https://lkml.org/lkml/2019/8/16/400
[2] https://lkml.org/lkml/2020/6/4/675
[3] https://github.com/julien-thierry/linux/tree/arch-independent-check
[4] https://lkml.org/lkml/2020/7/30/424

Cheers,

Julien

-->

Julien Thierry (9):
objtool: Group headers to check in a single list
objtool: Make sync-check consider the target architecture
objtool: Move macros describing structures to arch-dependent code
objtool: Abstract alternative special case handling
objtool: Make relocation in alternative handling arch dependent
headers: Rename frame.h
objtool: Only include valid definitions depending on source file type
objtool: Make unwind hints definitions available to other
architectures
objtool: Decode unwind hint register depending on architecture

Raphael Gault (1):
objtool: Refactor switch-tables code to support other architectures

 arch/x86/include/asm/nospec-branch.h          |   2 +-
 arch/x86/include/asm/orc_types.h              |  34 ----
 arch/x86/include/asm/unwind_hints.h           |  50 +-----
 arch/x86/kernel/kprobes/core.c                |   2 +-
 arch/x86/kernel/kprobes/opt.c                 |   2 +-
 arch/x86/kernel/reboot.c                      |   2 +-
 arch/x86/kernel/unwind_orc.c                  |  11 +-
 arch/x86/kvm/svm/svm.c                        |   2 +-
 arch/x86/kvm/vmx/nested.c                     |   2 +-
 arch/x86/kvm/vmx/vmx.c                        |   2 +-
 arch/x86/xen/enlighten_pv.c                   |   2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c           |   3 +-
 include/linux/frame.h                         |  35 -----
 include/linux/objtool.h                       | 134 ++++++++++++++++
 kernel/bpf/core.c                             |   2 +-
 kernel/kexec_core.c                           |   2 +-
 tools/arch/x86/include/asm/orc_types.h        |  34 ----
 tools/include/linux/objtool.h                 | 134 ++++++++++++++++
 tools/objtool/Makefile                        |   2 +-
 tools/objtool/arch.h                          |   2 +
 tools/objtool/arch/x86/Build                  |   1 +
 tools/objtool/arch/x86/decode.c               |  37 +++++
 tools/objtool/arch/x86/include/arch_special.h |  20 +++
 tools/objtool/arch/x86/special.c              | 145 ++++++++++++++++++
 tools/objtool/check.c                         | 137 ++---------------
 tools/objtool/check.h                         |   7 +-
 tools/objtool/objtool.h                       |   2 +
 tools/objtool/orc_dump.c                      |   7 +-
 tools/objtool/orc_gen.c                       |   5 +-
 tools/objtool/special.c                       |  48 +-----
 tools/objtool/special.h                       |  10 ++
 tools/objtool/sync-check.sh                   |  27 ++--
 tools/objtool/weak.c                          |   2 -
 33 files changed, 561 insertions(+), 346 deletions(-)
 delete mode 100644 include/linux/frame.h
 create mode 100644 include/linux/objtool.h
 create mode 100644 tools/include/linux/objtool.h
 create mode 100644 tools/objtool/arch/x86/include/arch_special.h
 create mode 100644 tools/objtool/arch/x86/special.c

--
2.21.3