x86/unwind: Add hardcoded ORC entry for NULL
Jann Horn authored
commit ac5ceccc upstream.

When the ORC unwinder is invoked for an oops caused by IP==0,
it currently has no idea what to do because there is no debug information
for the stack frame of NULL.

But if RIP is NULL, it is very likely that the last successfully executed
instruction was an indirect CALL/JMP, and it is possible to unwind out in
the same way as for the first instruction of a normal function. Hardcode
a corresponding ORC entry.

With an artificially-added NULL call in prctl_set_seccomp(), before this
patch, the trace is:

Call Trace:
 ? __x64_sys_prctl+0x402/0x680
 ? __ia32_sys_prctl+0x6e0/0x6e0
 ? __do_page_fault+0x457/0x620
 ? do_syscall_64+0x6d/0x160
 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9

After this patch, the trace looks like this:

Call Trace:
 __x64_sys_prctl+0x402/0x680
 ? __ia32_sys_prctl+0x6e0/0x6e0
 ? __do_page_fault+0x457/0x620
 do_syscall_64+0x6d/0x160
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

prctl_se...
5befc25f
Name Last commit Last update
Documentation dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string
arch x86/unwind: Add hardcoded ORC entry for NULL
block blk-mq: fix a hung issue when fsync
certs Replace magic for trusting the secondary keyring with #define
crypto crypto: pcbc - remove bogus memcpy()s with src == dest
drivers drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
firmware License cleanup: add SPDX GPL-2.0 license identifier to files with no license
fs ext4: brelse all indirect buffer in ext4_ind_remove_space()
include libceph: wait for latest osdmap in ceph_monc_blacklist_add()
init Revert "mm: use early_pfn_to_nid in page_ext_init"
ipc ipc/sem.c: prevent queue.status tearing in semop
kernel futex: Ensure that futex address is aligned in handle_futex_death()
lib assoc_array: Fix shortcut creation
mm mm/vmalloc: fix size check for remap_vmalloc_range_partial()
net netfilter: ebtables: remove BUGPRINT messages
samples samples: mei: use /dev/mei0 instead of /dev/mei
scripts scripts/gdb: fix lx-version string output
security security/selinux: fix SECURITY_LSM_NATIVE_LABELS on reused superblock
sound ALSA: x86: Fix runtime PM for hdmi-lpe-audio
tools objtool: Move objtool_file struct off the stack
usr initramfs: fix initramfs rebuilds w/ compression after disabling
virt KVM: Call kvm_arch_memslots_updated() before updating memslots
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address
COPYING [PATCH] update FSF address in COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license
MAINTAINERS MAINTAINERS: Add Sasha as a stable branch maintainer
Makefile Linux 4.14.108
README README: add a new README file, pointing to the Documentation/
Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

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.