linux/arch/x86
Linus Torvalds a5dbd76a89 X86 fixes:
- Prevent a deadlock on cpu_hotplug_lock in the aperf/mperf driver.
 
       A recent change in the ACPI code which consolidated code pathes moved
       the invocation of init_freq_invariance_cppc() to be moved to a CPU
       hotplug handler. The first invocation on AMD CPUs ends up enabling a
       static branch which dead locks because the static branch enable tries to
       acquire cpu_hotplug_lock but that lock is already held write by the
       hotplug machinery.
 
       Use static_branch_enable_cpuslocked() instead and take the hotplug
       lock read for the Intel code path which is invoked from the
       architecture code outside of the CPU hotplug operations.
 
     - Fix the number of reserved bits in the sev_config structure bit field
       so that the bitfield does not exceed 64 bit.
 
     - Add missing Zen5 model numbers
 
     - Fix the alignment assumptions of pti_clone_pgtable() and
       clone_entry_text() on 32-bit:
 
       The code assumes PMD aligned code sections, but on 32-bit the kernel
       entry text is not PMD aligned. So depending on the code size and
       location, which is configuration and compiler dependent, entry text
       can cross a PMD boundary. As the start is not PMD aligned adding PMD
       size to the start address is larger than the end address which
       results in partially mapped entry code for user space. That causes
       endless recursion on the first entry from userspace (usually #PF).
 
       Cure this by aligning the start address in the addition so it ends up
       at the next PMD start address.
 
       clone_entry_text() enforces PMD mapping, but on 32-bit the tail might
       eventually be PTE mapped, which causes a map fail because the PMD for
       the tail is not a large page mapping. Use PTI_LEVEL_KERNEL_IMAGE for
       the clone() invocation which resolves to PTE on 32-bit and PMD on
       64-bit.
 
     - Zero the 8-byte case for get_user() on range check failure on 32-bit
 
       The recend consolidation of the 8-byte get_user() case broke the
       zeroing in the failure case again. Establish it by clearing ECX
       before the range check and not afterwards as that obvioulsy can't be
       reached when the range check fails
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmave5oTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYofuHD/9AX+BeMOp1+qezoK/YAAfdeY413y9G
 WVYbHEdukS4wULX5wBJm1eTGJs2seuJYJ18yO18xHog1cTBsYd8V9kdLGR629QWc
 6nEcs2Wbda6NCqZcKigXDbwWHMyKdymvLgCs+ldc+fEOnflXr27ZRyT0fFl03alE
 RsX9jlNLG289i6DKJlllC6TjEr+hN6hXUAqY8d5OoMaUuJMJ4HsSBlBSwKAnuvfw
 J0/OYZ8cQBtSGMiL3jHG8UngsWt9ehFdWfr/ineDiHagFvFjwlKgAYZwNZ1WORIg
 Wx2Ga07JD3ZB4eLCMK1/fHsCtWPw7QtTLYFaKg3QES3yWSPvDJp7YIdXFlFDLNDh
 tm/hp6ArhFofpTa+k+EopppUcK5f/TwDyosbKii8FadYjdTFWX4NmBGwoX3wIhCh
 M81LdkP4K5YKI+wmJTgTQlT4o6KuNXC7XkKcqrKk/5OBrPG5xgpyeHK1zgbY7p+F
 Ez5lTIDEm293boB3WZGGGiImceftr4kZoXSAZjbMBnncrGVFFGBrW5KE8JVTMaKm
 kkAVYZFXl+vMJQgAKAIIRgj9MTcV44Cnopq0NwRhM5hOPTFTYXibHuH3X6sUuHKL
 P2X2w0HZIaEo1nFO9/pCtqIs/kNFcanP6VWiJggFcCu7ldVi4jgCBpv0UnAiCHwq
 nmqq2QbTV1XAMg==
 =wf31
 -----END PGP SIGNATURE-----

Merge tag 'x86-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:

 - Prevent a deadlock on cpu_hotplug_lock in the aperf/mperf driver.

   A recent change in the ACPI code which consolidated code pathes moved
   the invocation of init_freq_invariance_cppc() to be moved to a CPU
   hotplug handler. The first invocation on AMD CPUs ends up enabling a
   static branch which dead locks because the static branch enable tries
   to acquire cpu_hotplug_lock but that lock is already held write by
   the hotplug machinery.

   Use static_branch_enable_cpuslocked() instead and take the hotplug
   lock read for the Intel code path which is invoked from the
   architecture code outside of the CPU hotplug operations.

 - Fix the number of reserved bits in the sev_config structure bit field
   so that the bitfield does not exceed 64 bit.

 - Add missing Zen5 model numbers

 - Fix the alignment assumptions of pti_clone_pgtable() and
   clone_entry_text() on 32-bit:

   The code assumes PMD aligned code sections, but on 32-bit the kernel
   entry text is not PMD aligned. So depending on the code size and
   location, which is configuration and compiler dependent, entry text
   can cross a PMD boundary. As the start is not PMD aligned adding PMD
   size to the start address is larger than the end address which
   results in partially mapped entry code for user space. That causes
   endless recursion on the first entry from userspace (usually #PF).

   Cure this by aligning the start address in the addition so it ends up
   at the next PMD start address.

   clone_entry_text() enforces PMD mapping, but on 32-bit the tail might
   eventually be PTE mapped, which causes a map fail because the PMD for
   the tail is not a large page mapping. Use PTI_LEVEL_KERNEL_IMAGE for
   the clone() invocation which resolves to PTE on 32-bit and PMD on
   64-bit.

 - Zero the 8-byte case for get_user() on range check failure on 32-bit

   The recend consolidation of the 8-byte get_user() case broke the
   zeroing in the failure case again. Establish it by clearing ECX
   before the range check and not afterwards as that obvioulsy can't be
   reached when the range check fails

* tag 'x86-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/uaccess: Zero the 8-byte get_range case on failure on 32-bit
  x86/mm: Fix pti_clone_entry_text() for i386
  x86/mm: Fix pti_clone_pgtable() alignment assumption
  x86/setup: Parse the builtin command line before merging
  x86/CPU/AMD: Add models 0x60-0x6f to the Zen5 range
  x86/sev: Fix __reserved field in sev_config
  x86/aperfmperf: Fix deadlock on cpu_hotplug_lock
2024-08-04 08:57:08 -07:00
..
boot Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
coco x86/sev: Fix __reserved field in sev_config 2024-07-30 10:07:26 +02:00
configs hardening: Enable KCFI and some other options 2024-05-01 12:38:14 -07:00
crypto crypto: x86/aes-gcm - rewrite the AES-NI optimized AES-GCM 2024-06-07 19:47:58 +08:00
entry uretprobe: change syscall number, again 2024-08-02 15:18:49 +02:00
events perf/x86: Fix smp_processor_id()-in-preemptible warnings 2024-07-31 12:57:39 +02:00
hyperv x86/mm: Make x86_platform.guest.enc_status_change_*() return an error 2024-06-17 17:45:53 +02:00
ia32
include X86 fixes: 2024-08-04 08:57:08 -07:00
kernel x86/setup: Parse the builtin command line before merging 2024-07-31 21:46:35 +02:00
kvm * fix latent bug in how usage of large pages is determined for 2024-08-02 12:33:43 -04:00
lib x86/uaccess: Zero the 8-byte get_range case on failure on 32-bit 2024-08-01 21:19:10 +02:00
math-emu x86/math-emu: Fix function cast warnings 2024-04-08 16:06:22 +02:00
mm x86/mm: Fix pti_clone_entry_text() for i386 2024-08-01 14:52:56 +02:00
net bpf: remove unused parameter in bpf_jit_binary_pack_finalize 2024-06-20 19:50:26 -07:00
pci - Flip the logic to add feature names to /proc/cpuinfo to having to 2024-07-15 20:25:16 -07:00
platform xen: branch for v6.11-rc1a 2024-07-27 09:58:24 -07:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
ras
realmode Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools Changes: 2024-05-19 11:32:42 -07:00
um This pull request contains the following changes for UML: 2024-07-25 12:33:08 -07:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
virt - Add support for running the kernel in a SEV-SNP guest, over a Secure 2024-07-16 11:12:25 -07:00
xen xen: branch for v6.11-rc1a 2024-07-27 09:58:24 -07:00
.gitignore
Kbuild x86/build: Use obj-y to descend into arch/x86/virt/ 2024-03-30 10:41:49 +01:00
Kconfig Random number generator updates for Linux 6.11-rc1. 2024-07-24 10:29:50 -07:00
Kconfig.assembler x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-06-20 19:48:18 +02:00
Kconfig.cpu
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-05-20 11:37:23 +02:00
Makefile - A series ("kbuild: enable more warnings by default") from Arnd 2024-05-22 18:59:29 -07:00
Makefile_32.cpu
Makefile.postlink
Makefile.um arch: um: rust: Use the generated target.json again 2024-07-03 12:22:11 +02:00