No description
Find a file
Daniel Borkmann e923c6b70c x86/retpolines: Disable switch jump tables when retpolines are enabled
commit a9d57ef15c upstream.

Commit ce02ef06fc ("x86, retpolines: Raise limit for generating indirect
calls from switch-case") raised the limit under retpolines to 20 switch
cases where gcc would only then start to emit jump tables, and therefore
effectively disabling the emission of slow indirect calls in this area.

After this has been brought to attention to gcc folks [0], Martin Liska
has then fixed gcc to align with clang by avoiding to generate switch jump
tables entirely under retpolines. This is taking effect in gcc starting
from stable version 8.4.0. Given kernel supports compilation with older
versions of gcc where the fix is not being available or backported anymore,
we need to keep the extra KBUILD_CFLAGS around for some time and generally
set the -fno-jump-tables to align with what more recent gcc is doing
automatically today.

More than 20 switch cases are not expected to be fast-path critical, but
it would still be good to align with gcc behavior for versions < 8.4.0 in
order to have consistency across supported gcc versions. vmlinux size is
slightly growing by 0.27% for older gcc. This flag is only set to work
around affected gcc, no change for clang.

  [0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86952

Suggested-by: Martin Liska <mliska@suse.cz>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Björn Töpel<bjorn.topel@intel.com>
Cc: Magnus Karlsson <magnus.karlsson@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Link: https://lkml.kernel.org/r/20190325135620.14882-1-daniel@iogearbox.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02 09:58:59 +02:00
arch x86/retpolines: Disable switch jump tables when retpolines are enabled 2019-05-02 09:58:59 +02:00
block blk-iolatency: #include "blk.h" 2019-04-20 09:15:58 +02:00
certs
crypto crypto: x86/poly1305 - fix overflow during partial reduction 2019-04-27 09:36:37 +02:00
Documentation
drivers fm10k: Fix a potential NULL pointer dereference 2019-05-02 09:58:57 +02:00
firmware
fs Fix aio_poll() races 2019-05-02 09:58:59 +02:00
include aio: simplify - and fix - fget/fput for io_submit() 2019-05-02 09:58:58 +02:00
init
ipc
kernel sched/deadline: Correctly handle active 0-lag timers 2019-05-02 09:58:56 +02:00
lib lib/Kconfig.debug: fix build error without CONFIG_BLOCK 2019-05-02 09:58:53 +02:00
LICENSES
mm percpu: stop printing kernel addresses 2019-04-27 09:36:40 +02:00
net rxrpc: fix race condition in rxrpc_input_packet() 2019-05-02 09:58:57 +02:00
samples
scripts modpost: file2alias: check prototype of handler 2019-04-27 09:36:39 +02:00
security device_cgroup: fix RCU imbalance in error case 2019-04-27 09:36:40 +02:00
sound ALSA: hda/ca0132 - Fix build error without CONFIG_PCI 2019-05-02 09:58:52 +02:00
tools tools include: Adopt linux/bits.h 2019-04-27 09:36:40 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS platform/x86: Add Intel AtomISP2 dummy / power-management driver 2019-04-20 09:16:02 +02:00
Makefile Linux 4.19.37 2019-04-27 09:36:41 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.