Skip to content

Commit b51cc5d

Browse files
committed
Merge tag 'x86-cleanups-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Ingo Molnar: - Change global variables to local - Add missing kernel-doc function parameter descriptions - Remove unused parameter from a macro - Remove obsolete Kconfig entry - Fix comments - Fix typos, mostly scripted, manually reviewed and a micro-optimization got misplaced as a cleanup: - Micro-optimize the asm code in secondary_startup_64_no_verify() * tag 'x86-cleanups-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arch/x86: Fix typos x86/head_64: Use TESTB instead of TESTL in secondary_startup_64_no_verify() x86/docs: Remove reference to syscall trampoline in PTI x86/Kconfig: Remove obsolete config X86_32_SMP x86/io: Remove the unused 'bw' parameter from the BUILDIO() macro x86/mtrr: Document missing function parameters in kernel-doc x86/setup: Make relocated_ramdisk a local variable of relocate_initrd()
2 parents 42c371f + 54aa699 commit b51cc5d

66 files changed

Lines changed: 92 additions & 96 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/arch/x86/pti.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@ this protection comes at a cost:
8181
and exit (it can be skipped when the kernel is interrupted,
8282
though.) Moves to CR3 are on the order of a hundred
8383
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.
8987
c. Global pages are disabled for all kernel structures not
9088
mapped into both kernel and userspace page tables. This
9189
feature of the MMU allows different processes to share TLB
@@ -167,7 +165,7 @@ that are worth noting here.
167165
* Failures of the selftests/x86 code. Usually a bug in one of the
168166
more obscure corners of entry_64.S
169167
* Crashes in early boot, especially around CPU bringup. Bugs
170-
in the trampoline code or mappings cause these.
168+
in the mappings cause these.
171169
* Crashes at the first interrupt. Caused by bugs in entry_64.S,
172170
like screwing up a page table switch. Also caused by
173171
incorrectly mapping the IRQ handler entry code.

arch/x86/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,6 @@ config HAVE_INTEL_TXT
384384
def_bool y
385385
depends on INTEL_IOMMU && ACPI
386386

387-
config X86_32_SMP
388-
def_bool y
389-
depends on X86_32 && SMP
390-
391387
config X86_64_SMP
392388
def_bool y
393389
depends on X86_64 && SMP

arch/x86/boot/compressed/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ KBUILD_CFLAGS += -D__DISABLE_EXPORTS
5353
KBUILD_CFLAGS += $(call cc-option,-Wa$(comma)-mrelax-relocations=no)
5454
KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h
5555

56-
# sev.c indirectly inludes inat-table.h which is generated during
56+
# sev.c indirectly includes inat-table.h which is generated during
5757
# compilation and stored in $(objtree). Add the directory to the includes so
5858
# that the compiler finds it even with out-of-tree builds (make O=/some/path).
5959
CFLAGS_sev.o += -I$(objtree)/arch/x86/lib/

arch/x86/boot/compressed/mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/*
1010
* accept_memory() and process_unaccepted_memory() called from EFI stub which
11-
* runs before decompresser and its early_tdx_detect().
11+
* runs before decompressor and its early_tdx_detect().
1212
*
1313
* Enumerate TDX directly from the early users.
1414
*/

arch/x86/coco/tdx/tdx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ void __init tdx_early_init(void)
887887
* there.
888888
*
889889
* Intel-TDX has a secure RDMSR hypercall, but that needs to be
890-
* implemented seperately in the low level startup ASM code.
890+
* implemented separately in the low level startup ASM code.
891891
* Until that is in place, disable parallel bringup for TDX.
892892
*/
893893
x86_cpuinit.parallel_bringup = false;

arch/x86/crypto/aesni-intel_asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ ALL_F: .octa 0xffffffffffffffffffffffffffffffff
666666

667667
.ifc \operation, dec
668668
movdqa %xmm1, %xmm3
669-
pxor %xmm1, %xmm9 # Cyphertext XOR E(K, Yn)
669+
pxor %xmm1, %xmm9 # Ciphertext XOR E(K, Yn)
670670

671671
mov \PLAIN_CYPH_LEN, %r10
672672
add %r13, %r10

arch/x86/crypto/aesni-intel_avx-x86_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ VARIABLE_OFFSET = 16*8
747747

748748
.if \ENC_DEC == DEC
749749
vmovdqa %xmm1, %xmm3
750-
pxor %xmm1, %xmm9 # Cyphertext XOR E(K, Yn)
750+
pxor %xmm1, %xmm9 # Ciphertext XOR E(K, Yn)
751751

752752
mov \PLAIN_CYPH_LEN, %r10
753753
add %r13, %r10

arch/x86/crypto/crc32c-pcl-intel-asm_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ SYM_FUNC_START(crc_pcl)
184184
xor crc1,crc1
185185
xor crc2,crc2
186186

187-
# Fall thruogh into top of crc array (crc_128)
187+
# Fall through into top of crc array (crc_128)
188188

189189
################################################################
190190
## 3) CRC Array:

arch/x86/crypto/sha512-avx-asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ frame_size = frame_WK + WK_SIZE
8484

8585
# Useful QWORD "arrays" for simpler memory references
8686
# MSG, DIGEST, K_t, W_t are arrays
87-
# WK_2(t) points to 1 of 2 qwords at frame.WK depdending on t being odd/even
87+
# WK_2(t) points to 1 of 2 qwords at frame.WK depending on t being odd/even
8888

8989
# Input message (arg1)
9090
#define MSG(i) 8*i(msg)

arch/x86/crypto/sha512-ssse3-asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ frame_size = frame_WK + WK_SIZE
8282

8383
# Useful QWORD "arrays" for simpler memory references
8484
# MSG, DIGEST, K_t, W_t are arrays
85-
# WK_2(t) points to 1 of 2 qwords at frame.WK depdending on t being odd/even
85+
# WK_2(t) points to 1 of 2 qwords at frame.WK depending on t being odd/even
8686

8787
# Input message (arg1)
8888
#define MSG(i) 8*i(msg)

0 commit comments

Comments
 (0)