KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
Marc Zyngier authored
commit ef3e40a7

 upstream.

When using the PtrAuth feature in a guest, we need to save the host's
keys before allowing the guest to program them. For that, we dump
them in a per-CPU data structure (the so called host context).

But both call sites that do this are in preemptible context,
which may end up in disaster should the vcpu thread get preempted
before reentering the guest.

Instead, save the keys eagerly on each vcpu_load(). This has an
increased overhead, but is at least safe.

Cc: stable@vger.kernel.org
Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
0a7c8851
Name Last commit Last update
Documentation lib/lzo: fix ambiguous encoding bug in lzo-rle
LICENSES LICENSES: Rename other to deprecated
arch KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
block Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT"
certs .gitignore: add SPDX License Identifier
crypto crypto: drbg - fix error return code in drbg_alloc_state()
drivers platform/x86: sony-laptop: Make resuming thermal profile safer
fs fat: don't allow to mount if the FAT length == 0
include media: videobuf2-dma-contig: fix bad kfree in vb2_dma_contig_clear_max_seg_size
init Merge tag 'x86_urgent_for_v5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index
kernel perf: Add cond_resched() to task_function_call()
lib lib: fix bitmap_parse() on 64-bit big endian archs
mm mm/slub: fix a memory leak in sysfs_slab_add()
net net: sched: export __netdev_watchdog_up()
samples Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
scripts checkpatch/coding-style: deprecate 80-column warning
security Smack: slab-out-of-bounds in vsscanf
sound ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock
tools selftests/ftrace: Return unsupported if no error_log file
usr kbuild: fix comment about missing include guard detection
virt KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
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.

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.