The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Nicholas Piggin aee101d7b9 powerpc/64s: Mask SRR0 before checking against the masked NIP
Commit 314f6c23dd ("powerpc/64s: Mask NIP before checking against
SRR0") masked off the low 2 bits of the NIP value in the interrupt
stack frame in case they are non-zero and mis-compare against a SRR0
register value of a CPU which always reads back 0 from the 2 low bits
which are reserved.

This now causes the opposite problem that an implementation which does
implement those bits in SRR0 will mis-compare against the masked NIP
value in which they have been cleared. QEMU is one such implementation,
and this is allowed by the architecture.

This can be triggered by sigfuz by setting low bits of PT_NIP in the
signal context.

Fix this for now by masking the SRR0 bits as well. Cleaner is probably
to sanitise these values before putting them in registers or stack, but
this is the quick and backportable fix.

Fixes: 314f6c23dd ("powerpc/64s: Mask NIP before checking against SRR0")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220117134403.2995059-1-npiggin@gmail.com
2022-01-18 10:25:18 +11:00
Documentation powerpc updates for 5.17 2022-01-14 15:17:26 +01:00
LICENSES
arch powerpc/64s: Mask SRR0 before checking against the masked NIP 2022-01-18 10:25:18 +11:00
block SCSI misc on 20220113 2022-01-14 14:37:34 +01:00
certs
crypto tpmdd updates for Linux v5.17 2022-01-11 12:58:41 -08:00
drivers powerpc updates for 5.17 2022-01-14 15:17:26 +01:00
fs dax + libnvdimm for v5.17 2022-01-12 15:46:11 -08:00
include powerpc updates for 5.17 2022-01-14 15:17:26 +01:00
init Peter Zijlstra says: 2022-01-12 16:26:58 -08:00
ipc
kernel bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack() 2022-01-15 12:21:23 +11:00
lib Convert much of the page cache to use folios 2022-01-12 12:37:02 -08:00
mm dax + libnvdimm for v5.17 2022-01-12 15:46:11 -08:00
net TTY/Serial driver updates for 5.17-rc1 2022-01-12 11:21:52 -08:00
samples - Get rid of all the .fixup sections because this generates 2022-01-12 16:31:19 -08:00
scripts - Get rid of all the .fixup sections because this generates 2022-01-12 16:31:19 -08:00
security fs.idmapped.v5.17 2022-01-11 14:26:55 -08:00
sound sound updates for 5.17-rc1 2022-01-14 14:55:38 +01:00
tools tools/bpf: Rename 'struct event' to avoid naming conflict 2022-01-15 12:21:25 +11:00
usr
virt Peter Zijlstra says: 2022-01-12 16:26:58 -08:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap media updates for v5.17-rc1 2022-01-10 18:55:43 -08:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS sound updates for 5.17-rc1 2022-01-14 14:55:38 +01:00
Makefile - Get rid of all the .fixup sections because this generates 2022-01-12 16:31:19 -08:00
README

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.