Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/docs: Remove reference to syscall trampoline in PTI

Commit

bf904d2762ee ("x86/pti/64: Remove the SYSCALL64 entry trampoline")

removed the syscall trampoline and instead opted to enable using the
default SYSCALL64 entry point by mapping the percpu TSS. Unfortunately,
the PTI documentation wasn't updated when the respective changes were
made, so bring the doc up to speed.

Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231102130204.41043-1-nik.borisov@suse.com

authored by

Nikolay Borisov and committed by
Borislav Petkov (AMD)
7a0a6d55 c6454559

+4 -6
+4 -6
Documentation/arch/x86/pti.rst
··· 81 81 and exit (it can be skipped when the kernel is interrupted, 82 82 though.) Moves to CR3 are on the order of a hundred 83 83 cycles, and are required at every entry and exit. 84 - b. A "trampoline" must be used for SYSCALL entry. This 85 - trampoline depends on a smaller set of resources than the 86 - non-PTI SYSCALL entry code, so requires mapping fewer 87 - things into the userspace page tables. The downside is 88 - that stacks must be switched at entry time. 84 + b. Percpu TSS is mapped into the user page tables to allow SYSCALL64 path 85 + to work under PTI. This doesn't have a direct runtime cost but it can 86 + be argued it opens certain timing attack scenarios. 89 87 c. Global pages are disabled for all kernel structures not 90 88 mapped into both kernel and userspace page tables. This 91 89 feature of the MMU allows different processes to share TLB ··· 165 167 * Failures of the selftests/x86 code. Usually a bug in one of the 166 168 more obscure corners of entry_64.S 167 169 * Crashes in early boot, especially around CPU bringup. Bugs 168 - in the trampoline code or mappings cause these. 170 + in the mappings cause these. 169 171 * Crashes at the first interrupt. Caused by bugs in entry_64.S, 170 172 like screwing up a page table switch. Also caused by 171 173 incorrectly mapping the IRQ handler entry code.