linux/Documentation
Rick Edgecombe 161e393c0f mm: Make pte_mkwrite() take a VMA
The x86 Shadow stack feature includes a new type of memory called shadow
stack. This shadow stack memory has some unusual properties, which requires
some core mm changes to function properly.

One of these unusual properties is that shadow stack memory is writable,
but only in limited ways. These limits are applied via a specific PTE
bit combination. Nevertheless, the memory is writable, and core mm code
will need to apply the writable permissions in the typical paths that
call pte_mkwrite(). Future patches will make pte_mkwrite() take a VMA, so
that the x86 implementation of it can know whether to create regular
writable or shadow stack mappings.

But there are a couple of challenges to this. Modifying the signatures of
each arch pte_mkwrite() implementation would be error prone because some
are generated with macros and would need to be re-implemented. Also, some
pte_mkwrite() callers operate on kernel memory without a VMA.

So this can be done in a three step process. First pte_mkwrite() can be
renamed to pte_mkwrite_novma() in each arch, with a generic pte_mkwrite()
added that just calls pte_mkwrite_novma(). Next callers without a VMA can
be moved to pte_mkwrite_novma(). And lastly, pte_mkwrite() and all callers
can be changed to take/pass a VMA.

Previous work pte_mkwrite() renamed pte_mkwrite_novma() and converted
callers that don't have a VMA were to use pte_mkwrite_novma(). So now
change pte_mkwrite() to take a VMA and change the remaining callers to
pass a VMA. Apply the same changes for pmd_mkwrite().

No functional change.

Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/all/20230613001108.3040476-4-rick.p.edgecombe%40intel.com
2023-07-11 14:12:15 -07:00
..
ABI 16 hotfixes. Six are cc:stable and the remainder address post-6.4 issues. 2023-07-08 14:30:25 -07:00
accel
accounting
admin-guide A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
arch ARM64: 2023-07-03 15:32:22 -07:00
block
bpf sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
cdrom
core-api workqueue: Changes for v6.5 2023-06-27 16:32:52 -07:00
cpu-freq
crypto docs: crypto: async-tx-api: fix typo in struct name 2023-06-09 01:59:30 -06:00
dev-tools - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
devicetree SCSI misc on 20230708 2023-07-08 12:35:18 -07:00
doc-guide docs/doc-guide: Clarify how to write tables 2023-06-09 01:57:56 -06:00
driver-api Fixes for pci_clean_master, error handling in driver inits, and various 2023-07-09 09:35:51 -07:00
fault-injection
fb
features LoongArch: Add jump-label implementation 2023-06-29 20:58:44 +08:00
filesystems 16 hotfixes. Six are cc:stable and the remainder address post-6.4 issues. 2023-07-08 14:30:25 -07:00
firmware-guide
firmware_class
fpga
gpu Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2023-06-15 14:11:22 +10:00
hid
hwmon hwmon: (oxp-sensors) Add support for AOKZOE A1 PRO 2023-06-24 20:17:18 -07:00
i2c
iio
images
infiniband
input
isdn
kbuild kernel-doc: don't let V=1 change outcome 2023-06-10 16:39:02 +09:00
kernel-hacking
leds - New Drivers 2023-07-03 11:26:05 -07:00
litmus-tests
livepatch
locking
loongarch
maintainer Documentation: update git configuration for Link: tag 2023-06-21 09:15:15 -06:00
mhi
mips
misc-devices Documentation: Add TI TPS6594 PFSM 2023-06-15 13:41:53 +02:00
mm mm: Make pte_mkwrite() take a VMA 2023-07-11 14:12:15 -07:00
netlabel
netlink netlink: specs: add display hints to ovs_flow 2023-06-24 15:45:49 -07:00
networking Including fixes from bluetooth, bpf and wireguard. 2023-07-05 15:44:45 -07:00
nvdimm
nvme
PCI Merge branch 'pci/controller/endpoint' 2023-06-26 13:00:00 -05:00
pcmcia
peci
power
powerpc Documentation: Document PowerPC kernel DEXCR interface 2023-06-19 17:36:27 +10:00
process A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
RCU
riscv RISC-V: Document the ISA string parsing rules for ACPI 2023-07-06 10:25:17 -07:00
rust
s390
scheduler sched/deadline: Update GRUB description in the documentation 2023-06-16 22:08:12 +02:00
scsi
security
sound ALSA: compress: allow setting codec params after next track 2023-06-21 07:28:31 +02:00
sphinx
sphinx-static
spi
staging
target scsi: target: docs: Remove tcm_mod_builder.py 2023-06-28 22:01:32 -04:00
timers
tools Documentation: Add tools/rtla timerlat -u option documentation 2023-06-13 16:43:37 -04:00
trace Char/Misc and other driver subsystem updates for 6.5-rc1 2023-07-03 12:46:47 -07:00
translations A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
usb
userspace-api media updates for v6.5-rc1 2023-07-05 10:42:32 -07:00
virt A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
w1
watchdog
wmi
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
dontdiff
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00