History

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

Linus Torvalds committed 2 years ago

Commit cd557bc2 parents b001455 ec9aedb4 files · +33 −23Browse files

Unified · Split

4 files
  1. Documentation/arch/x86/boot.rst +1 −1
  2. MAINTAINERS +14 −0
  3. arch/x86/kernel/acpi/boot.c +15 −19
  4. arch/x86/kernel/signal_64.c +3 −3
Documentation/arch/x86/boot.rst+1−1
@@ -77,7 +77,7 @@ Protocol 2.14 BURNT BY INCORRECT COMMIT · 76 unmodified lines
77Protocol 2.15 (Kernel 5.5) Added the kernel_info and kernel_info.setup_type_max.77Protocol 2.15 (Kernel 5.5) Added the kernel_info and kernel_info.setup_type_max.
78============= ============================================================78============= ============================================================
79 79
80.. note::80 .. note::
81 The protocol version number should be changed only if the setup header81 The protocol version number should be changed only if the setup header
82 is changed. There is no need to update the version number if boot_params82 is changed. There is no need to update the version number if boot_params
83 or kernel_info are changed. Additionally, it is recommended to use83 or kernel_info are changed. Additionally, it is recommended to use
MAINTAINERS+14−0
@@ -23702,6 +23702,20 @@ F: arch/x86/kernel/dumpstack.c · 23701 unmodified lines
23702F: arch/x86/kernel/stacktrace.c23702F: arch/x86/kernel/stacktrace.c
23703F: arch/x86/kernel/unwind_*.c23703F: arch/x86/kernel/unwind_*.c
23704 23704
23705X86 TRUST DOMAIN EXTENSIONS (TDX)
23706M: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
23707R: Dave Hansen <dave.hansen@linux.intel.com>
23708L: x86@kernel.org
23709L: linux-coco@lists.linux.dev
23710S: Supported
23711T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/tdx
23712F: arch/x86/boot/compressed/tdx*
23713F: arch/x86/coco/tdx/
23714F: arch/x86/include/asm/shared/tdx.h
23715F: arch/x86/include/asm/tdx.h
23716F: arch/x86/virt/vmx/tdx/
23717F: drivers/virt/coco/tdx-guest
23718
23705X86 VDSO23719X86 VDSO
23706M: Andy Lutomirski <luto@kernel.org>23720M: Andy Lutomirski <luto@kernel.org>
23707L: linux-kernel@vger.kernel.org23721L: linux-kernel@vger.kernel.org
arch/x86/kernel/acpi/boot.c+15−19
@@ -63,6 +63,7 @@ int acpi_fix_pin2_polarity __initdata; · 62 unmodified lines
63 63
64#ifdef CONFIG_X86_LOCAL_APIC64#ifdef CONFIG_X86_LOCAL_APIC
65static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;65static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
66static bool has_lapic_cpus __initdata;
66static bool acpi_support_online_capable;67static bool acpi_support_online_capable;
67#endif68#endif
68 69
@@ -232,6 +233,14 @@ acpi_parse_x2apic(union acpi_subtable_headers *header, const unsigned long end) · 163 unmodified lines
232 if (!acpi_is_processor_usable(processor->lapic_flags))233 if (!acpi_is_processor_usable(processor->lapic_flags))
233 return 0;234 return 0;
234 235
236 /*
237 * According to https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#processor-local-x2apic-structure
238 * when MADT provides both valid LAPIC and x2APIC entries, the APIC ID
239 * in x2APIC must be equal or greater than 0xff.
240 */
241 if (has_lapic_cpus && apic_id < 0xff)
242 return 0;
243
235 /*244 /*
236 * We need to register disabled CPU as well to permit245 * We need to register disabled CPU as well to permit
237 * counting disabled CPUs. This allows us to size246 * counting disabled CPUs. This allows us to size
@@ -1114,10 +1123,7 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void) · 876 unmodified lines
1114 1123
1115static int __init acpi_parse_madt_lapic_entries(void)1124static int __init acpi_parse_madt_lapic_entries(void)
1116{1125{
1117 int count;1126 int count, x2count = 0;
1118 int x2count = 0;
1119 int ret;
1120 struct acpi_subtable_proc madt_proc[2];
1121 1127
1122 if (!boot_cpu_has(X86_FEATURE_APIC))1128 if (!boot_cpu_has(X86_FEATURE_APIC))
1123 return -ENODEV;1129 return -ENODEV;
@@ -1126,21 +1132,11 @@ static int __init acpi_parse_madt_lapic_entries(void) · 2 unmodified lines
1126 acpi_parse_sapic, MAX_LOCAL_APIC);1132 acpi_parse_sapic, MAX_LOCAL_APIC);
1127 1133
1128 if (!count) {1134 if (!count) {
1129 memset(madt_proc, 0, sizeof(madt_proc));1135 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC,
1130 madt_proc[0].id = ACPI_MADT_TYPE_LOCAL_APIC;1136 acpi_parse_lapic, MAX_LOCAL_APIC);
1131 madt_proc[0].handler = acpi_parse_lapic;1137 has_lapic_cpus = count > 0;
1132 madt_proc[1].id = ACPI_MADT_TYPE_LOCAL_X2APIC;1138 x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC,
1133 madt_proc[1].handler = acpi_parse_x2apic;1139 acpi_parse_x2apic, MAX_LOCAL_APIC);
1134 ret = acpi_table_parse_entries_array(ACPI_SIG_MADT,
1135 sizeof(struct acpi_table_madt),
1136 madt_proc, ARRAY_SIZE(madt_proc), MAX_LOCAL_APIC);
1137 if (ret < 0) {
1138 pr_err("Error parsing LAPIC/X2APIC entries\n");
1139 return ret;
1140 }
1141
1142 count = madt_proc[0].count;
1143 x2count = madt_proc[1].count;
1144 }1140 }
1145 if (!count && !x2count) {1141 if (!count && !x2count) {
1146 pr_err("No LAPIC entries present\n");1142 pr_err("No LAPIC entries present\n");
arch/x86/kernel/signal_64.c+3−3
@@ -175,9 +175,6 @@ int x64_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) · 174 unmodified lines
175 frame = get_sigframe(ksig, regs, sizeof(struct rt_sigframe), &fp);175 frame = get_sigframe(ksig, regs, sizeof(struct rt_sigframe), &fp);
176 uc_flags = frame_uc_flags(regs);176 uc_flags = frame_uc_flags(regs);
177 177
178 if (setup_signal_shadow_stack(ksig))
179 return -EFAULT;
180
181 if (!user_access_begin(frame, sizeof(*frame)))178 if (!user_access_begin(frame, sizeof(*frame)))
182 return -EFAULT;179 return -EFAULT;
183 180
@@ -198,6 +195,9 @@ int x64_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) · 14 unmodified lines
198 return -EFAULT;195 return -EFAULT;
199 }196 }
200 197
198 if (setup_signal_shadow_stack(ksig))
199 return -EFAULT;
200
201 /* Set up registers for signal handler */201 /* Set up registers for signal handler */
202 regs->di = ksig->sig;202 regs->di = ksig->sig;
203 /* In case the signal handler was declared without prototypes */203 /* In case the signal handler was declared without prototypes */