forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'powerpc-6.5-1' of git://git.kernel.org/pub/scm/linux/kerne…
…l/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Extend KCSAN support to 32-bit and BookE. Add some KCSAN annotations - Make ELFv2 ABI the default for 64-bit big-endian kernel builds, and use the -mprofile-kernel option (kernel specific ftrace ABI) for big endian ELFv2 kernels - Add initial Dynamic Execution Control Register (DEXCR) support, and allow the ROP protection instructions to be used on Power 10 - Various other small features and fixes Thanks to Aditya Gupta, Aneesh Kumar K.V, Benjamin Gray, Brian King, Christophe Leroy, Colin Ian King, Dmitry Torokhov, Gaurav Batra, Jean Delvare, Joel Stanley, Marco Elver, Masahiro Yamada, Nageswara R Sastry, Nathan Chancellor, Naveen N Rao, Nayna Jain, Nicholas Piggin, Paul Gortmaker, Randy Dunlap, Rob Herring, Rohan McLure, Russell Currey, Sachin Sant, Timothy Pearson, Tom Rix, and Uwe Kleine-König. * tag 'powerpc-6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (76 commits) powerpc: remove checks for binutils older than 2.25 powerpc: Fail build if using recordmcount with binutils v2.37 powerpc/iommu: TCEs are incorrectly manipulated with DLPAR add/remove of memory powerpc/iommu: Only build sPAPR access functions on pSeries powerpc: powernv: Annotate data races in opal events powerpc: Mark writes registering ipi to host cpu through kvm and polling powerpc: Annotate accesses to ipi message flags powerpc: powernv: Fix KCSAN datarace warnings on idle_state contention powerpc: Mark [h]ssr_valid accesses in check_return_regs_valid powerpc: qspinlock: Enforce qnode writes prior to publishing to queue powerpc: qspinlock: Mark accesses to qnode lock checks powerpc/powernv/pci: Remove last IODA1 defines powerpc/powernv/pci: Remove MVE code powerpc/powernv/pci: Remove ioda1 support powerpc: 52xx: Make immr_id DT match tables static powerpc: mpc512x: Remove open coded "ranges" parsing powerpc: fsl_soc: Use of_range_to_resource() for "ranges" parsing powerpc: fsl: Use of_property_read_reg() to parse "reg" powerpc: fsl_rio: Use of_range_to_resource() for "ranges" parsing macintosh: Use of_property_read_reg() to parse "reg" ...
- Loading branch information
Showing
116 changed files
with
1,353 additions
and
4,425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
.. SPDX-License-Identifier: GPL-2.0-or-later | ||
========================================== | ||
DEXCR (Dynamic Execution Control Register) | ||
========================================== | ||
|
||
Overview | ||
======== | ||
|
||
The DEXCR is a privileged special purpose register (SPR) introduced in | ||
PowerPC ISA 3.1B (Power10) that allows per-cpu control over several dynamic | ||
execution behaviours. These behaviours include speculation (e.g., indirect | ||
branch target prediction) and enabling return-oriented programming (ROP) | ||
protection instructions. | ||
|
||
The execution control is exposed in hardware as up to 32 bits ('aspects') in | ||
the DEXCR. Each aspect controls a certain behaviour, and can be set or cleared | ||
to enable/disable the aspect. There are several variants of the DEXCR for | ||
different purposes: | ||
|
||
DEXCR | ||
A privileged SPR that can control aspects for userspace and kernel space | ||
HDEXCR | ||
A hypervisor-privileged SPR that can control aspects for the hypervisor and | ||
enforce aspects for the kernel and userspace. | ||
UDEXCR | ||
An optional ultravisor-privileged SPR that can control aspects for the ultravisor. | ||
|
||
Userspace can examine the current DEXCR state using a dedicated SPR that | ||
provides a non-privileged read-only view of the userspace DEXCR aspects. | ||
There is also an SPR that provides a read-only view of the hypervisor enforced | ||
aspects, which ORed with the userspace DEXCR view gives the effective DEXCR | ||
state for a process. | ||
|
||
|
||
Configuration | ||
============= | ||
|
||
The DEXCR is currently unconfigurable. All threads are run with the | ||
NPHIE aspect enabled. | ||
|
||
|
||
coredump and ptrace | ||
=================== | ||
|
||
The userspace values of the DEXCR and HDEXCR (in this order) are exposed under | ||
``NT_PPC_DEXCR``. These are each 64 bits and readonly, and are intended to | ||
assist with core dumps. The DEXCR may be made writable in future. The top 32 | ||
bits of both registers (corresponding to the non-userspace bits) are masked off. | ||
|
||
If the kernel config ``CONFIG_CHECKPOINT_RESTORE`` is enabled, then | ||
``NT_PPC_HASHKEYR`` is available and exposes the HASHKEYR value of the process | ||
for reading and writing. This is a tradeoff between increased security and | ||
checkpoint/restore support: a process should normally have no need to know its | ||
secret key, but restoring a process requires setting its original key. The key | ||
therefore appears in core dumps, and an attacker may be able to retrieve it from | ||
a coredump and effectively bypass ROP protection on any threads that share this | ||
key (potentially all threads from the same parent that have not run ``exec()``). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ powerpc | |
cxl | ||
cxlflash | ||
dawr-power9 | ||
dexcr | ||
dscr | ||
eeh-pci-error-recovery | ||
elf_hwcaps | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11448,7 +11448,13 @@ F: arch/mips/include/uapi/asm/kvm* | |
F: arch/mips/kvm/ | ||
|
||
KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc) | ||
M: Michael Ellerman <[email protected]> | ||
R: Nicholas Piggin <[email protected]> | ||
L: [email protected] | ||
L: [email protected] | ||
S: Maintained (Book3S 64-bit HV) | ||
S: Odd fixes (Book3S 64-bit PR) | ||
S: Orphan (Book3E and 32-bit) | ||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git topic/ppc-kvm | ||
F: arch/powerpc/include/asm/kvm* | ||
F: arch/powerpc/include/uapi/asm/kvm* | ||
|
@@ -11981,11 +11987,12 @@ F: lib/linear_ranges.c | |
F: lib/test_linear_ranges.c | ||
|
||
LINUX FOR POWER MACINTOSH | ||
M: Benjamin Herrenschmidt <[email protected]> | ||
L: [email protected] | ||
S: Odd Fixes | ||
S: Orphan | ||
F: arch/powerpc/platforms/powermac/ | ||
F: drivers/macintosh/ | ||
X: drivers/macintosh/adb-iop.c | ||
X: drivers/macintosh/via-macii.c | ||
|
||
LINUX FOR POWERPC (32-BIT AND 64-BIT) | ||
M: Michael Ellerman <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.