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
..
atomic
locking/atomics: Don't assume that scripts are executable
2019-04-19 14:21:43 +02:00
basic
kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS
2018-12-01 23:13:14 +09:00
coccinelle
fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock
2019-04-06 07:01:55 -10:00
dtc
of: add dtc annotations functionality to dtx_diff
2019-02-28 11:40:48 -06:00
gcc-plugins
increased structleak coverage
2019-03-09 09:06:15 -08:00
gdb
Kbuild updates for v5.1
2019-03-10 17:48:21 -07:00
genksyms
kconfig
kconfig/[mn]conf: handle backspace (^H) key
2019-03-29 22:48:01 +09:00
ksymoops
mod
kbuild: modversions: Fix relative CRC byte order interpretation
2019-03-28 23:46:56 +09:00
package
kbuild: deb-pkg: avoid implicit effects
2019-03-17 12:56:23 +09:00
selinux
selinux: use kernel linux/socket.h for genheaders and mdp
2019-04-29 11:34:58 -04:00
tracing
scripts: Add Python 3 support to tracing/draw_functrace.py
2018-07-29 11:08:38 +09:00
.gitignore
scripts: remove unnecessary ihex2fw and check-lc_ctypes from .gitignore
2018-12-22 00:37:52 +09:00
adjust_autoksyms.sh
kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
2019-03-14 02:39:11 +09:00
asn1_compiler.c
ASN.1: Remove unnecessary shadowed local variable
2018-10-29 00:19:41 +09:00
bin2c.c
kbuild: move bin2c back to scripts/ from scripts/basic/
2018-07-18 01:18:05 +09:00
bloat-o-meter
bloat-o-meter: ignore __addressable_ symbols
2018-12-28 12:11:44 -08:00
bootgraph.pl
bpf_helpers_doc.py
cc-can-link.sh
bpfilter: check compiler capability in Kconfig
2018-06-28 13:36:39 +09:00
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl
checkpatch: add %pt as a valid vsprintf extension
2019-03-29 10:01:37 -07:00
checkstack.pl
scripts/checkstack.pl: dynamic stack growth for aarch64
2018-12-28 12:11:44 -08:00
checksyscalls.sh
checksyscalls: fix up mq_timedreceive and stat exceptions
2019-02-19 21:27:53 +01:00
checkversion.pl
clang-version.sh
kbuild: update comment block of scripts/clang-version.sh
2019-03-04 22:34:54 +09:00
cleanfile
cleanpatch
coccicheck
coccicheck: return proper error code on fail
2018-08-14 08:58:56 +09:00
config
conmakehash.c
const_structs.checkpatch
decode_stacktrace.sh
scripts/decode_stacktrace.sh: handle RIP address with segment
2019-03-05 21:07:13 -08:00
decodecode
scripts/decodecode: set ARCH when running natively on arm/arm64
2018-12-28 12:11:44 -08:00
depmod.sh
kbuild: modules_install: warn when missing System.map file
2018-09-09 09:14:07 +09:00
diffconfig
documentation-file-ref-check
scripts/documentation-file-ref-check: ignore sched-pelt false positive
2018-07-02 11:25:00 -06:00
export_report.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract-vmlinux: Check for uncompressed image as fallback
2018-10-17 08:18:01 +02:00
extract_xc3028.pl
faddr2line
scripts/faddr2line: fix location of start_kernel in comment
2018-11-18 10:15:09 -08:00
file-size.sh
find-unused-docs.sh
gcc-goto.sh
jump_label: move 'asm goto' support test to Kconfig
2019-01-06 09:46:51 +09:00
gcc-ld
gcc-plugin.sh
gcc-version.sh
kbuild: clean up scripts/gcc-version.sh
2019-03-04 22:35:04 +09:00
gcc-x86_32-has-stack-protector.sh
stack-protector: test compiler capability in Kconfig and drop AUTO mode
2018-06-08 18:56:00 +09:00
gcc-x86_64-has-stack-protector.sh
stack-protector: Fix test with 32-bit userland and CONFIG_64BIT=y
2018-06-25 23:21:13 +09:00
gen_compile_commands.py
scripts: add a tool to produce a compile_commands.json file
2018-12-19 23:41:36 +09:00
gen_ksymdeps.sh
kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS
2018-12-01 23:13:14 +09:00
get_dvb_firmware
get_maintainer.pl
get_maintainer: allow option --mpath <directory> to read all files in <directory>
2018-08-22 10:52:48 -07:00
gfp-translate
headerdep.pl
headers.sh
headers_check.pl
headers_install.sh
insert-sys-cert.c
kallsyms.c
Kbuild updates for v5.1
2019-03-10 17:48:21 -07:00
Kbuild.include
kbuild: remove cc-version macro
2019-03-04 22:34:59 +09:00
Kconfig.include
kbuild: clean up scripts/gcc-version.sh
2019-03-04 22:35:04 +09:00
kernel-doc
kernel-doc: suppress 'not described' warnings for embedded struct fields
2019-01-16 15:04:01 -07:00
ld-version.sh
leaking_addresses.pl
leaking_addresses: Completely remove --version flag
2019-03-07 08:53:18 +11:00
Lindent
link-vmlinux.sh
kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
2019-03-14 02:39:11 +09:00
Makefile
scripts/gdb: do not descend into scripts/gdb from scripts
2019-02-27 21:40:09 +09:00
Makefile.asm-generic
kbuild: force all architectures except um to include mandatory-y
2019-03-17 12:56:32 +09:00
Makefile.build
objtool: Add UACCESS validation
2019-04-03 11:02:24 +02:00
Makefile.clean
kbuild: remove deprecated host-progs variable
2018-08-09 21:51:17 +09:00
Makefile.dtbinst
Makefile.extrawarn
Kbuild updates for v4.20 (2nd)
2018-11-03 10:47:33 -07:00
Makefile.gcc-plugins
gcc-plugins: structleak: Generalize to all variable types
2019-03-04 09:29:41 -08:00
Makefile.headersinst
kbuild: generate asm-generic wrappers if mandatory headers are missing
2019-01-06 09:46:51 +09:00
Makefile.host
kbuild: skip 'addtree' and 'flags' magic for external module build
2019-01-28 09:11:17 +09:00
Makefile.kasan
kasan: remove use after scope bugs detection.
2019-03-05 21:07:13 -08:00
Makefile.kcov
kcov: test compiler capability in Kconfig and correct dependency
2018-06-11 09:14:08 +09:00
Makefile.lib
kbuild: move archive command to scripts/Makefile.lib
2019-03-14 02:39:10 +09:00
Makefile.modbuiltin
Kbuild: Makefile.modbuiltin: include auto.conf and tristate.conf mandatory
2018-08-03 00:47:00 +09:00
Makefile.modinst
Revert "modsign: Abort modules_install when signing fails"
2019-03-17 12:56:31 +09:00
Makefile.modpost
modpost: always show verbose warning for section mismatch
2019-03-14 02:39:09 +09:00
Makefile.modsign
kbuild: remove duplicated comments about PHONY
2018-07-06 22:04:03 +09:00
Makefile.ubsan
ubsan: Remove vla bound checks.
2019-05-06 11:12:09 -07:00
makelst
markup_oops.pl
mkcompile_h
kbuild: remove unnecessary in-subshell execution
2019-01-28 09:11:17 +09:00
mkmakefile
kbuild: simplify command line creation in scripts/mkmakefile
2018-10-04 22:56:02 +09:00
mksysmap
mkuboot.sh
module-common.lds
namespace.pl
objdiff
parse-maintainers.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c
scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names
2018-12-08 20:54:08 -05:00
recordmcount.h
recordmcount.pl
scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names
2018-12-08 20:54:08 -05:00
setlocalversion
scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks
2018-11-21 23:57:33 +09:00
show_delta
sign-file.c
sortextable.c
sortextable.h
spdxcheck-test.sh
scripts: add spdxcheck.py self test
2018-12-28 12:11:44 -08:00
spdxcheck.py
scripts/spdxcheck.py: fix C++ comment style detection
2019-02-22 08:47:05 -07:00
spelling.txt
scripts/spelling.txt: add more spellings to spelling.txt
2019-03-07 18:31:59 -08:00
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
selftests: add headers_install to lib.mk
2018-09-05 08:12:09 -06:00
tags.sh
scripts/tags.sh: add more declarations
2018-12-28 12:11:44 -08:00
unifdef.c
unifdef: use memcpy instead of strncpy
2018-11-30 14:45:01 -08:00
ver_linux
ver_linux: Assign constant RE to variable name for clarity
2019-01-22 13:34:35 +01:00
xen-hypercalls.sh
xz_wrap.sh