Skip to content

objtool sync up for the stable 4.9.y tree

Greg Kroah-Hartman lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest29 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29objtool: Improve detection of BUG() and other dead endsarch/x86/kernel/vmlinux.lds.S include/linux/compiler-gcc.h tools/objtool/arch.h +2 more+71 -110 replies
2/29objtool: Move checking code to check.ctools/objtool/Build tools/objtool/builtin-check.c tools/objtool/check.c +1 more+1392 -13330 replies
3/29tools lib: Add for_each_clear_bit macrotools/include/asm-generic/bitops.h tools/include/asm-generic/bitops/__ffz.h tools/include/asm-generic/bitops/find.h +3 more+72 -00 replies
4/29tools: add more bitmap functionstools/include/linux/bitmap.h+26 -00 replies
5/29tools: enable endian checks for all sparse buildstools/include/linux/types.h+0 -40 replies
6/29tools include: Introduce linux/compiler-gcc.htools/include/linux/compiler-gcc.h tools/include/linux/compiler.h tools/perf/MANIFEST+20 -50 replies
7/29radix tree test suite: Remove types.htools/include/linux/compiler.h tools/include/linux/spinlock.h+9 -00 replies
8/29tools include: Adopt __compiletime_errortools/include/linux/compiler-gcc.h tools/include/linux/compiler.h+8 -00 replies
9/29tools include: Introduce atomic_cmpxchg_{relaxed,release}()tools/include/linux/atomic.h+6 -00 replies
10/29tools include: Add UINT_MAX def to kernel.htools/include/linux/kernel.h+4 -00 replies
11/29tools include: Adopt kernel's refcount.htools/include/linux/refcount.h tools/perf/MANIFEST+152 -00 replies
12/29perf tools: Force fixdep compilation at the start of the buildtools/perf/Makefile.perf+38 -120 replies
13/29perf tools: Move headers check into bash scripttools/perf/Makefile.perf tools/perf/check-headers.sh+60 -930 replies
14/29tools include uapi: Grab copies of stat.h and fcntl.htools/include/linux/types.h tools/include/uapi/linux/fcntl.h tools/include/uapi/linux/stat.h +2 more+253 -00 replies
15/29tools include: Introduce linux/bug.h, from the kernel sourcestools/include/linux/bug.h tools/perf/MANIFEST+11 -00 replies
16/29tools include: Adopt __same_type() and __must_be_array() from the kerneltools/include/linux/compiler-gcc.h tools/include/linux/compiler.h+8 -00 replies
17/29tools include: Move ARRAY_SIZE() to linux/kernel.htools/include/linux/kernel.h tools/perf/util/util.h+3 -20 replies
18/29tools include: Drop ARRAY_SIZE() definition from linux/hashtable.htools/include/linux/hashtable.h+0 -40 replies
19/29tools include: Include missing headers for fls() and types in linux/log2.htools/include/linux/log2.h+3 -00 replies
20/29objtool: sync up with the 4.14.47 version of objtoolarch/x86/include/asm/orc_types.h arch/x86/include/asm/unwind_hints.h tools/objtool/Build +28 more+2887 -5140 replies
21/29objtool: Support GCC 8's cold subfunctionstools/objtool/check.c tools/objtool/elf.c tools/objtool/elf.h+93 -440 replies
22/29objtool: Support GCC 8 switch tablestools/objtool/check.c+22 -20 replies
23/29objtool: Detect RIP-relative switch table referencestools/objtool/check.c+18 -150 replies
24/29objtool: Detect RIP-relative switch table references, part 2tools/objtool/check.c+12 -250 replies
25/29objtool: Fix "noreturn" detection for recursive sibling callstools/objtool/check.c+7 -30 replies
26/29objtool, x86: Add several functions and files to the objtool whitelistarch/x86/crypto/Makefile arch/x86/crypto/sha1-mb/Makefile arch/x86/crypto/sha256-mb/Makefile +12 more+39 -60 replies
27/29perf/tools: header file sync uptools/arch/arm/include/uapi/asm/kvm.h tools/arch/arm64/include/uapi/asm/kvm.h tools/arch/powerpc/include/uapi/asm/kvm.h +9 more+132 -1460 replies
28/29objtool: header file sync-uptools/objtool/arch/x86/include/asm/inat.h tools/objtool/arch/x86/include/asm/orc_types.h tools/objtool/arch/x86/lib/x86-opcode-map.txt +1 more+4 -240 replies
29/29x86/xen: Add unwind hint annotations to xen_setup_gdtarch/x86/xen/enlighten.c+4 -10 replies

Reviews trailers per patch

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

PatchPeter Zijlstra (Intel)Jiri SlabyArnaldo Carvalho de MeloKirill A. ShutemovdamianRandy DunlapJosh Poimboeuf
SeriesA-b
1/29T-b
2/29R-b
3/29
4/29T-b
5/29
6/29
7/29
8/29
9/29
10/29
11/29
12/29T-b
13/29T-b
14/29
15/29
16/29
17/29
18/29
19/29
20/29
21/29A-b Reported-and-tested-by
22/29A-b
23/29
24/29
25/29A-b Reported-and-tested-by
26/29
27/29
28/29
29/29

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v1 thread

Cover letter [PATCH 00/29] objtool sync up for the stable 4.9.y tree

There are pros and cons of dealing with tools in the kernel directory. The pros are the fact that development happens fast, and new features can be added to the kernel and the tools at the same times. The cons are when dealing with backported kernel patches, it can be necessary to backport parts of the tool changes as well.

For 4.9.y so far, we have backported individual patches. That quickly breaks down when there are minor differences between how backports were handled, so grabbing 40+ patch long series can be difficult, not impossible, but really frustrating to attempt.

To help mitigate this mess, this patch series works to sync up the objtool code with the version that is currently in 4.14.47. This required a number of objtool old patches to be backported, a single big "sync the world" patch, and a lot of include file updates to get everything all working properly as well as some minor fixes for build warnings.

And at the end of this series, is a set of backported objtool patches for gcc-8 that was the main reason this whole patch series was created. They applied just fine, being the identical version that goes into the 4.14.y stable tree, so it feels like the backport was successful.

This has survivied my limited testing, and as the codebase is identical to 4.14.47, I'm pretty comfortable dropping this big change in here in 4.9.y. Hopefully all goes well...

If anyone has any objections to this patch series, or finds anything I messed up on, please let me know.

thanks,

greg k-h

Arnaldo Carvalho de Melo (11):
tools include: Introduce linux/compiler-gcc.h
tools include: Adopt __compiletime_error
tools include: Introduce atomic_cmpxchg_{relaxed,release}() tools include: Add UINT_MAX def to kernel.h
tools include: Adopt kernel's refcount.h
tools include uapi: Grab copies of stat.h and fcntl.h tools include: Introduce linux/bug.h, from the kernel sources tools include: Adopt __same_type() and __must_be_array() from the
kernel
tools include: Move ARRAY_SIZE() to linux/kernel.h tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h tools include: Include missing headers for fls() and types in
linux/log2.h

Greg Kroah-Hartman (4):
objtool: sync up with the 4.14.47 version of objtool perf/tools: header file sync up
objtool: header file sync-up
x86/xen: Add unwind hint annotations to xen_setup_gdt

Jiri Olsa (3):
tools lib: Add for_each_clear_bit macro
perf tools: Force fixdep compilation at the start of the build perf tools: Move headers check into bash script

Josh Poimboeuf (8):
objtool: Improve detection of BUG() and other dead ends
objtool: Move checking code to check.c
objtool: Support GCC 8's cold subfunctions
objtool: Support GCC 8 switch tables
objtool: Detect RIP-relative switch table references
objtool: Detect RIP-relative switch table references, part 2
objtool: Fix "noreturn" detection for recursive sibling calls objtool, x86: Add several functions and files to the objtool whitelist

Matthew Wilcox (2):
tools: add more bitmap functions
radix tree test suite: Remove types.h

Michael S. Tsirkin (1):
tools: enable endian checks for all sparse builds

 arch/x86/crypto/Makefile                      |    2 +
 arch/x86/crypto/sha1-mb/Makefile              |    2 +
 arch/x86/crypto/sha256-mb/Makefile            |    2 +
 arch/x86/include/asm/orc_types.h              |  107 +
 arch/x86/include/asm/unwind_hints.h           |  103 +
 arch/x86/kernel/Makefile                      |    1 +
 arch/x86/kernel/acpi/Makefile                 |    2 +
 arch/x86/kernel/kprobes/opt.c                 |    9 +-
 arch/x86/kernel/reboot.c                      |    2 +
 arch/x86/kernel/vmlinux.lds.S                 |    1 +
 arch/x86/kvm/svm.c                            |    2 +
 arch/x86/kvm/vmx.c                            |    3 +
 arch/x86/lib/msr-reg.S                        |    8 +-
 arch/x86/net/Makefile                         |    2 +
 arch/x86/platform/efi/Makefile                |    1 +
 arch/x86/power/Makefile                       |    2 +
 arch/x86/xen/Makefile                         |    3 +
 arch/x86/xen/enlighten.c                      |    5 +-
 include/linux/compiler-gcc.h                  |   13 +-
 kernel/kexec_core.c                           |    4 +-
 tools/arch/arm/include/uapi/asm/kvm.h         |   13 +
 tools/arch/arm64/include/uapi/asm/kvm.h       |    6 +
 tools/arch/powerpc/include/uapi/asm/kvm.h     |    1 +
 tools/arch/s390/include/uapi/asm/kvm.h        |    5 +-
 tools/arch/x86/include/asm/cpufeatures.h      |   44 +-
 .../arch/x86/include/asm/disabled-features.h  |    7 +-
 .../arch/x86/include/asm/required-features.h  |    3 +-
 tools/include/asm-generic/bitops.h            |    1 +
 tools/include/asm-generic/bitops/__ffz.h      |   12 +
 tools/include/asm-generic/bitops/find.h       |   28 +
 tools/include/linux/atomic.h                  |    6 +
 tools/include/linux/bitmap.h                  |   26 +
 tools/include/linux/bitops.h                  |    5 +
 tools/include/linux/bug.h                     |   10 +
 tools/include/linux/compiler-gcc.h            |   21 +
 tools/include/linux/compiler.h                |   23 +-
 tools/include/linux/hashtable.h               |    4 -
 tools/include/linux/kernel.h                  |    7 +
 tools/include/linux/log2.h                    |    3 +
 tools/include/linux/refcount.h                |  151 ++
 tools/include/linux/spinlock.h                |    5 +
 tools/include/linux/types.h                   |    5 +-
 tools/include/uapi/asm-generic/mman-common.h  |    5 +
 tools/include/uapi/linux/bpf.h                |   51 +
 tools/include/uapi/linux/fcntl.h              |   67 +
 tools/include/uapi/linux/stat.h               |   45 +
 tools/lib/find_bit.c                          |   25 +
 tools/objtool/Build                           |    4 +
 .../Documentation/stack-validation.txt        |  195 +-
 tools/objtool/Makefile                        |   35 +-
 tools/objtool/arch.h                          |   66 +-
 tools/objtool/arch/x86/Build                  |   10 +-
 tools/objtool/arch/x86/decode.c               |  407 ++-
 .../arch/x86/{insn => include/asm}/inat.h     |    2 +-
 .../x86/{insn => include/asm}/inat_types.h    |    0
 .../arch/x86/{insn => include/asm}/insn.h     |    2 +-
 .../objtool/arch/x86/include/asm/orc_types.h  |  107 +
 tools/objtool/arch/x86/{insn => lib}/inat.c   |    2 +-
 tools/objtool/arch/x86/{insn => lib}/insn.c   |    4 +-
 .../arch/x86/{insn => lib}/x86-opcode-map.txt |    0
 .../x86/{insn => tools}/gen-insn-attr-x86.awk |    0
 tools/objtool/builtin-check.c                 | 1297 +---------
 tools/objtool/builtin-orc.c                   |   68 +
 tools/objtool/builtin.h                       |    6 +
 tools/objtool/cfi.h                           |   55 +
 tools/objtool/check.c                         | 2209 +++++++++++++++++
 tools/objtool/check.h                         |   82 +
 tools/objtool/elf.c                           |  326 ++-
 tools/objtool/elf.h                           |   23 +-
 tools/objtool/objtool.c                       |   12 +-
 tools/objtool/orc.h                           |   30 +
 tools/objtool/orc_dump.c                      |  213 ++
 tools/objtool/orc_gen.c                       |  221 ++
 tools/objtool/special.c                       |    6 +-
 tools/objtool/sync-check.sh                   |   29 +
 tools/objtool/warn.h                          |   10 +
 tools/perf/MANIFEST                           |    6 +
 tools/perf/Makefile.perf                      |  144 +-
 .../arch/x86/entry/syscalls/syscall_64.tbl    |    7 +-
 tools/perf/check-headers.sh                   |   61 +
 tools/perf/util/util.h                        |    2 -
 81 files changed, 4802 insertions(+), 1692 deletions(-)
 create mode 100644 arch/x86/include/asm/orc_types.h
 create mode 100644 arch/x86/include/asm/unwind_hints.h
 create mode 100644 tools/include/asm-generic/bitops/__ffz.h
 create mode 100644 tools/include/linux/bug.h
 create mode 100644 tools/include/linux/compiler-gcc.h
 create mode 100644 tools/include/linux/refcount.h
 create mode 100644 tools/include/linux/spinlock.h
 create mode 100644 tools/include/uapi/linux/fcntl.h
 create mode 100644 tools/include/uapi/linux/stat.h
 rename tools/objtool/arch/x86/{insn => include/asm}/inat.h (99%)
 rename tools/objtool/arch/x86/{insn => include/asm}/inat_types.h (100%)
 rename tools/objtool/arch/x86/{insn => include/asm}/insn.h (99%)
 create mode 100644 tools/objtool/arch/x86/include/asm/orc_types.h
 rename tools/objtool/arch/x86/{insn => lib}/inat.c (99%)
 rename tools/objtool/arch/x86/{insn => lib}/insn.c (99%)
 rename tools/objtool/arch/x86/{insn => lib}/x86-opcode-map.txt (100%)
 rename tools/objtool/arch/x86/{insn => tools}/gen-insn-attr-x86.awk (100%)
 create mode 100644 tools/objtool/builtin-orc.c
 create mode 100644 tools/objtool/cfi.h
 create mode 100644 tools/objtool/check.c
 create mode 100644 tools/objtool/check.h
 create mode 100644 tools/objtool/orc.h
 create mode 100644 tools/objtool/orc_dump.c
 create mode 100644 tools/objtool/orc_gen.c
 create mode 100644 tools/objtool/sync-check.sh
 create mode 100644 tools/perf/check-headers.sh
Signature · 1 line
2.17.1