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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86_urgent_for_v6.7_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

- Ignore invalid x2APIC entries in order to not waste per-CPU data

- Fix a back-to-back signals handling scenario when shadow stack is in
use

- A documentation fix

- Add Kirill as TDX maintainer

* tag 'x86_urgent_for_v6.7_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/acpi: Ignore invalid x2APIC entries
x86/shstk: Delay signal entry SSP write until after user accesses
x86/Documentation: Indent 'note::' directive for protocol version number note
MAINTAINERS: Add Intel TDX entry

+33 -23
+1 -1
Documentation/arch/x86/boot.rst
··· 77 77 Protocol 2.15 (Kernel 5.5) Added the kernel_info and kernel_info.setup_type_max. 78 78 ============= ============================================================ 79 79 80 - .. note:: 80 + .. note:: 81 81 The protocol version number should be changed only if the setup header 82 82 is changed. There is no need to update the version number if boot_params 83 83 or kernel_info are changed. Additionally, it is recommended to use
+14
MAINTAINERS
··· 23702 23702 F: arch/x86/kernel/stacktrace.c 23703 23703 F: arch/x86/kernel/unwind_*.c 23704 23704 23705 + X86 TRUST DOMAIN EXTENSIONS (TDX) 23706 + M: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> 23707 + R: Dave Hansen <dave.hansen@linux.intel.com> 23708 + L: x86@kernel.org 23709 + L: linux-coco@lists.linux.dev 23710 + S: Supported 23711 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/tdx 23712 + F: arch/x86/boot/compressed/tdx* 23713 + F: arch/x86/coco/tdx/ 23714 + F: arch/x86/include/asm/shared/tdx.h 23715 + F: arch/x86/include/asm/tdx.h 23716 + F: arch/x86/virt/vmx/tdx/ 23717 + F: drivers/virt/coco/tdx-guest 23718 + 23705 23719 X86 VDSO 23706 23720 M: Andy Lutomirski <luto@kernel.org> 23707 23721 L: linux-kernel@vger.kernel.org
+15 -19
arch/x86/kernel/acpi/boot.c
··· 63 63 64 64 #ifdef CONFIG_X86_LOCAL_APIC 65 65 static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; 66 + static bool has_lapic_cpus __initdata; 66 67 static bool acpi_support_online_capable; 67 68 #endif 68 69 ··· 231 230 232 231 /* don't register processors that cannot be onlined */ 233 232 if (!acpi_is_processor_usable(processor->lapic_flags)) 233 + return 0; 234 + 235 + /* 236 + * According to https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#processor-local-x2apic-structure 237 + * when MADT provides both valid LAPIC and x2APIC entries, the APIC ID 238 + * in x2APIC must be equal or greater than 0xff. 239 + */ 240 + if (has_lapic_cpus && apic_id < 0xff) 234 241 return 0; 235 242 236 243 /* ··· 1123 1114 1124 1115 static int __init acpi_parse_madt_lapic_entries(void) 1125 1116 { 1126 - int count; 1127 - int x2count = 0; 1128 - int ret; 1129 - struct acpi_subtable_proc madt_proc[2]; 1117 + int count, x2count = 0; 1130 1118 1131 1119 if (!boot_cpu_has(X86_FEATURE_APIC)) 1132 1120 return -ENODEV; ··· 1132 1126 acpi_parse_sapic, MAX_LOCAL_APIC); 1133 1127 1134 1128 if (!count) { 1135 - memset(madt_proc, 0, sizeof(madt_proc)); 1136 - madt_proc[0].id = ACPI_MADT_TYPE_LOCAL_APIC; 1137 - madt_proc[0].handler = acpi_parse_lapic; 1138 - madt_proc[1].id = ACPI_MADT_TYPE_LOCAL_X2APIC; 1139 - madt_proc[1].handler = acpi_parse_x2apic; 1140 - ret = acpi_table_parse_entries_array(ACPI_SIG_MADT, 1141 - sizeof(struct acpi_table_madt), 1142 - madt_proc, ARRAY_SIZE(madt_proc), MAX_LOCAL_APIC); 1143 - if (ret < 0) { 1144 - pr_err("Error parsing LAPIC/X2APIC entries\n"); 1145 - return ret; 1146 - } 1147 - 1148 - count = madt_proc[0].count; 1149 - x2count = madt_proc[1].count; 1129 + count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, 1130 + acpi_parse_lapic, MAX_LOCAL_APIC); 1131 + has_lapic_cpus = count > 0; 1132 + x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC, 1133 + acpi_parse_x2apic, MAX_LOCAL_APIC); 1150 1134 } 1151 1135 if (!count && !x2count) { 1152 1136 pr_err("No LAPIC entries present\n");
+3 -3
arch/x86/kernel/signal_64.c
··· 175 175 frame = get_sigframe(ksig, regs, sizeof(struct rt_sigframe), &fp); 176 176 uc_flags = frame_uc_flags(regs); 177 177 178 - if (setup_signal_shadow_stack(ksig)) 179 - return -EFAULT; 180 - 181 178 if (!user_access_begin(frame, sizeof(*frame))) 182 179 return -EFAULT; 183 180 ··· 194 197 if (copy_siginfo_to_user(&frame->info, &ksig->info)) 195 198 return -EFAULT; 196 199 } 200 + 201 + if (setup_signal_shadow_stack(ksig)) 202 + return -EFAULT; 197 203 198 204 /* Set up registers for signal handler */ 199 205 regs->di = ksig->sig;