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 branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
"Misc fixes: a SYSRET single-stepping fix, a dmi-scan robustization
fix, a reboot quirk and a kgdb fixlet"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
kgdb/x86: Fix reporting of 'si' in kgdb on x86_64
x86/asm/entry/64: Disable opportunistic SYSRET if regs->flags has TF set
x86/reboot: Add ASRock Q1900DC-ITX mainboard reboot quirk
MAINTAINERS: Change the x86 microcode loader maintainer
firmware: dmi_scan: Prevent dmi_num integer overflow

+35 -20
+2 -3
MAINTAINERS
··· 637 637 F: include/uapi/linux/kfd_ioctl.h 638 638 639 639 AMD MICROCODE UPDATE SUPPORT 640 - M: Andreas Herrmann <herrmann.der.user@googlemail.com> 641 - L: amd64-microcode@amd64.org 640 + M: Borislav Petkov <bp@alien8.de> 642 641 S: Maintained 643 642 F: arch/x86/kernel/cpu/microcode/amd* 644 643 ··· 5094 5095 F: drivers/platform/x86/intel_menlow.c 5095 5096 5096 5097 INTEL IA32 MICROCODE UPDATE SUPPORT 5097 - M: Tigran Aivazian <tigran@aivazian.fsnet.co.uk> 5098 + M: Borislav Petkov <bp@alien8.de> 5098 5099 S: Maintained 5099 5100 F: arch/x86/kernel/cpu/microcode/core* 5100 5101 F: arch/x86/kernel/cpu/microcode/intel*
+15 -1
arch/x86/kernel/entry_64.S
··· 799 799 cmpq %r11,(EFLAGS-ARGOFFSET)(%rsp) /* R11 == RFLAGS */ 800 800 jne opportunistic_sysret_failed 801 801 802 - testq $X86_EFLAGS_RF,%r11 /* sysret can't restore RF */ 802 + /* 803 + * SYSRET can't restore RF. SYSRET can restore TF, but unlike IRET, 804 + * restoring TF results in a trap from userspace immediately after 805 + * SYSRET. This would cause an infinite loop whenever #DB happens 806 + * with register state that satisfies the opportunistic SYSRET 807 + * conditions. For example, single-stepping this user code: 808 + * 809 + * movq $stuck_here,%rcx 810 + * pushfq 811 + * popq %r11 812 + * stuck_here: 813 + * 814 + * would never get past 'stuck_here'. 815 + */ 816 + testq $(X86_EFLAGS_RF|X86_EFLAGS_TF), %r11 803 817 jnz opportunistic_sysret_failed 804 818 805 819 /* nothing to check for RSP */
+1 -1
arch/x86/kernel/kgdb.c
··· 72 72 { "bx", 8, offsetof(struct pt_regs, bx) }, 73 73 { "cx", 8, offsetof(struct pt_regs, cx) }, 74 74 { "dx", 8, offsetof(struct pt_regs, dx) }, 75 - { "si", 8, offsetof(struct pt_regs, dx) }, 75 + { "si", 8, offsetof(struct pt_regs, si) }, 76 76 { "di", 8, offsetof(struct pt_regs, di) }, 77 77 { "bp", 8, offsetof(struct pt_regs, bp) }, 78 78 { "sp", 8, offsetof(struct pt_regs, sp) },
+10
arch/x86/kernel/reboot.c
··· 183 183 }, 184 184 }, 185 185 186 + /* ASRock */ 187 + { /* Handle problems with rebooting on ASRock Q1900DC-ITX */ 188 + .callback = set_pci_reboot, 189 + .ident = "ASRock Q1900DC-ITX", 190 + .matches = { 191 + DMI_MATCH(DMI_BOARD_VENDOR, "ASRock"), 192 + DMI_MATCH(DMI_BOARD_NAME, "Q1900DC-ITX"), 193 + }, 194 + }, 195 + 186 196 /* ASUS */ 187 197 { /* Handle problems with rebooting on ASUS P4S800 */ 188 198 .callback = set_bios_reboot,
+7 -15
drivers/firmware/dmi_scan.c
··· 86 86 int i = 0; 87 87 88 88 /* 89 - * Stop when we see all the items the table claimed to have 90 - * OR we run off the end of the table (also happens) 89 + * Stop when we have seen all the items the table claimed to have 90 + * (SMBIOS < 3.0 only) OR we reach an end-of-table marker OR we run 91 + * off the end of the table (should never happen but sometimes does 92 + * on bogus implementations.) 91 93 */ 92 - while ((i < num) && (data - buf + sizeof(struct dmi_header)) <= len) { 94 + while ((!num || i < num) && 95 + (data - buf + sizeof(struct dmi_header)) <= len) { 93 96 const struct dmi_header *dm = (const struct dmi_header *)data; 94 97 95 98 /* ··· 532 529 if (memcmp(buf, "_SM3_", 5) == 0 && 533 530 buf[6] < 32 && dmi_checksum(buf, buf[6])) { 534 531 dmi_ver = get_unaligned_be16(buf + 7); 532 + dmi_num = 0; /* No longer specified */ 535 533 dmi_len = get_unaligned_le32(buf + 12); 536 534 dmi_base = get_unaligned_le64(buf + 16); 537 - 538 - /* 539 - * The 64-bit SMBIOS 3.0 entry point no longer has a field 540 - * containing the number of structures present in the table. 541 - * Instead, it defines the table size as a maximum size, and 542 - * relies on the end-of-table structure type (#127) to be used 543 - * to signal the end of the table. 544 - * So let's define dmi_num as an upper bound as well: each 545 - * structure has a 4 byte header, so dmi_len / 4 is an upper 546 - * bound for the number of structures in the table. 547 - */ 548 - dmi_num = dmi_len / 4; 549 535 550 536 if (dmi_walk_early(dmi_decode) == 0) { 551 537 pr_info("SMBIOS %d.%d present.\n",