1
0
Fork 0
alistair23-linux/tools/objtool
Linus Torvalds 6ec62961e6 Merge branch 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool updates from Ingo Molnar:
 "This is a series from Peter Zijlstra that adds x86 build-time uaccess
  validation of SMAP to objtool, which will detect and warn about the
  following uaccess API usage bugs and weirdnesses:

   - call to %s() with UACCESS enabled
   - return with UACCESS enabled
   - return with UACCESS disabled from a UACCESS-safe function
   - recursive UACCESS enable
   - redundant UACCESS disable
   - UACCESS-safe disables UACCESS

  As it turns out not leaking uaccess permissions outside the intended
  uaccess functionality is hard when the interfaces are complex and when
  such bugs are mostly dormant.

  As a bonus we now also check the DF flag. We had at least one
  high-profile bug in that area in the early days of Linux, and the
  checking is fairly simple. The checks performed and warnings emitted
  are:

   - call to %s() with DF set
   - return with DF set
   - return with modified stack frame
   - recursive STD
   - redundant CLD

  It's all x86-only for now, but later on this can also be used for PAN
  on ARM and objtool is fairly cross-platform in principle.

  While all warnings emitted by this new checking facility that got
  reported to us were fixed, there might be GCC version dependent
  warnings that were not reported yet - which we'll address, should they
  trigger.

  The warnings are non-fatal build warnings"

* 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
  mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions
  x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation
  sched/x86_64: Don't save flags on context switch
  objtool: Add Direction Flag validation
  objtool: Add UACCESS validation
  objtool: Fix sibling call detection
  objtool: Rewrite alt->skip_orig
  objtool: Add --backtrace support
  objtool: Rewrite add_ignores()
  objtool: Handle function aliases
  objtool: Set insn->func for alternatives
  x86/uaccess, kcov: Disable stack protector
  x86/uaccess, ftrace: Fix ftrace_likely_update() vs. SMAP
  x86/uaccess, ubsan: Fix UBSAN vs. SMAP
  x86/uaccess, kasan: Fix KASAN vs SMAP
  x86/smap: Ditch __stringify()
  x86/uaccess: Introduce user_access_{save,restore}()
  x86/uaccess, signal: Fix AC=1 bloat
  x86/uaccess: Always inline user_access_begin()
  x86/uaccess, xen: Suppress SMAP warnings
  ...
2019-05-06 11:39:17 -07:00
..
Documentation x86/asm: Fix inline asm call constraints for Clang 2017-09-23 15:06:20 +02:00
arch/x86 objtool: Add Direction Flag validation 2019-04-03 11:02:24 +02:00
.gitignore objtool: Move synced files to their original relative locations 2017-11-07 10:48:23 +01:00
Build objtool: Add ORC unwind table generation 2017-07-18 10:57:43 +02:00
Makefile objtool: Query pkg-config for libelf location 2019-03-28 13:32:01 +01:00
arch.h objtool: Add Direction Flag validation 2019-04-03 11:02:24 +02:00
builtin-check.c objtool: Add UACCESS validation 2019-04-03 11:02:24 +02:00
builtin-orc.c objtool: Use existing global variables for options 2018-02-21 09:05:04 +01:00
builtin.h objtool: Add UACCESS validation 2019-04-03 11:02:24 +02:00
cfi.h objtool: Handle GCC stack pointer adjustment bug 2017-08-30 10:48:41 +02:00
check.c Merge branch 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-06 11:39:17 -07:00
check.h objtool: Add Direction Flag validation 2019-04-03 11:02:24 +02:00
elf.c objtool: Handle function aliases 2019-04-03 11:02:24 +02:00
elf.h objtool: Add UACCESS validation 2019-04-03 11:02:24 +02:00
objtool.c objtool: Print top level commands on incorrect usage 2017-10-18 15:22:26 +02:00
orc.h objtool: Move synced files to their original relative locations 2017-11-07 10:48:23 +01:00
orc_dump.c x86/unwind/orc: Detect the end of the stack 2018-06-21 16:34:56 +02:00
orc_gen.c x86/unwind/orc: Detect the end of the stack 2018-06-21 16:34:56 +02:00
special.c objtool: Add UACCESS validation 2019-04-03 11:02:24 +02:00
special.h objtool: Add UACCESS validation 2019-04-03 11:02:24 +02:00
sync-check.sh objtool: Move kernel headers/code sync check to a script 2017-11-07 10:48:34 +01:00
warn.h objtool: Add --backtrace support 2019-04-03 11:02:24 +02:00