* [GIT PULL] x86 fixes for 3.11-rc2
@ 2013-07-18 22:41 H. Peter Anvin
2013-07-19 0:46 ` Linus Torvalds
0 siblings, 1 reply; 8+ messages in thread
From: H. Peter Anvin @ 2013-07-18 22:41 UTC (permalink / raw)
To: Linus Torvalds
Cc: christian.suenkenberg, dyoung, hpa, hpa, jencce.kernel, keescook,
linux-kernel, maarten.lankhorst, matt.fleming, matthew.garrett,
mingo, onny, pageexec, rjw, seth.forshee, tglx
Hi Linus,
Trying again to get the fixes queue, including the fixed IDT alignment
patch.
The UEFI patch is by far the biggest issue at hand: it is currently
causing quite a few machines to boot. Which is sad, because the only
reason they would is because their BIOSes touch memory that has
already been freed. The other major issue is that we finally have
tracked down the root cause of a significant number of machines
failing to suspend/resume.
Toivottavasti sinun ei tarvitse kutsua minua perkeleen vittupää tällä
kertaa.
The following changes since commit 6d128e1e72bf082542e85f72e6b7ddd704193588:
Revert "Makefile: Fix install error with make -j option" (2013-07-10 19:02:51 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus
for you to fetch changes up to 4df05f361937ee86e5a8c9ead8aeb6a19ea9b7d7:
x86: Make sure IDT is page aligned (2013-07-16 15:14:48 -0700)
----------------------------------------------------------------
H. Peter Anvin (1):
x86, suspend: Handle CPUs which fail to #GP on RDMSR
Kees Cook (1):
x86: Make sure IDT is page aligned
Matt Fleming (2):
efivars: check for EFI_RUNTIME_SERVICES
Revert "UEFI: Don't pass boot services regions to SetVirtualAddressMap()"
Xiong Zhou (1):
x86/platform/ce4100: Add header file for reboot type
arch/x86/kernel/acpi/sleep.c | 18 ++++++++++++++++--
arch/x86/kernel/head_64.S | 15 ---------------
arch/x86/kernel/tracepoint.c | 6 ++----
arch/x86/kernel/traps.c | 12 ++++++------
arch/x86/platform/ce4100/ce4100.c | 1 +
arch/x86/platform/efi/efi.c | 7 -------
drivers/firmware/efi/efivars.c | 3 +++
7 files changed, 28 insertions(+), 34 deletions(-)
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 2a34aaf..3312010 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -48,9 +48,20 @@ int x86_acpi_suspend_lowlevel(void)
#ifndef CONFIG_64BIT
native_store_gdt((struct desc_ptr *)&header->pmode_gdt);
+ /*
+ * We have to check that we can write back the value, and not
+ * just read it. At least on 90 nm Pentium M (Family 6, Model
+ * 13), reading an invalid MSR is not guaranteed to trap, see
+ * Erratum X4 in "Intel Pentium M Processor on 90 nm Process
+ * with 2-MB L2 Cache and Intel® Processor A100 and A110 on 90
+ * nm process with 512-KB L2 Cache Specification Update".
+ */
if (!rdmsr_safe(MSR_EFER,
&header->pmode_efer_low,
- &header->pmode_efer_high))
+ &header->pmode_efer_high) &&
+ !wrmsr_safe(MSR_EFER,
+ header->pmode_efer_low,
+ header->pmode_efer_high))
header->pmode_behavior |= (1 << WAKEUP_BEHAVIOR_RESTORE_EFER);
#endif /* !CONFIG_64BIT */
@@ -61,7 +72,10 @@ int x86_acpi_suspend_lowlevel(void)
}
if (!rdmsr_safe(MSR_IA32_MISC_ENABLE,
&header->pmode_misc_en_low,
- &header->pmode_misc_en_high))
+ &header->pmode_misc_en_high) &&
+ !wrmsr_safe(MSR_IA32_MISC_ENABLE,
+ header->pmode_misc_en_low,
+ header->pmode_misc_en_high))
header->pmode_behavior |=
(1 << WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE);
header->realmode_flags = acpi_realmode_flags;
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 5e4d8a8..e1aabdb 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -512,21 +512,6 @@ ENTRY(phys_base)
#include "../../x86/xen/xen-head.S"
- .section .bss, "aw", @nobits
- .align L1_CACHE_BYTES
-ENTRY(idt_table)
- .skip IDT_ENTRIES * 16
-
- .align L1_CACHE_BYTES
-ENTRY(debug_idt_table)
- .skip IDT_ENTRIES * 16
-
-#ifdef CONFIG_TRACING
- .align L1_CACHE_BYTES
-ENTRY(trace_idt_table)
- .skip IDT_ENTRIES * 16
-#endif
-
__PAGE_ALIGNED_BSS
NEXT_PAGE(empty_zero_page)
.skip PAGE_SIZE
diff --git a/arch/x86/kernel/tracepoint.c b/arch/x86/kernel/tracepoint.c
index 4e584a8..1c113db 100644
--- a/arch/x86/kernel/tracepoint.c
+++ b/arch/x86/kernel/tracepoint.c
@@ -12,10 +12,8 @@ atomic_t trace_idt_ctr = ATOMIC_INIT(0);
struct desc_ptr trace_idt_descr = { NR_VECTORS * 16 - 1,
(unsigned long) trace_idt_table };
-#ifndef CONFIG_X86_64
-gate_desc trace_idt_table[NR_VECTORS] __page_aligned_data
- = { { { { 0, 0 } } }, };
-#endif
+/* No need to be aligned, but done to keep all IDTs defined the same way. */
+gate_desc trace_idt_table[NR_VECTORS] __page_aligned_bss;
static int trace_irq_vector_refcount;
static DEFINE_MUTEX(irq_vector_mutex);
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index b0865e8..1b23a1c 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -63,19 +63,19 @@
#include <asm/x86_init.h>
#include <asm/pgalloc.h>
#include <asm/proto.h>
+
+/* No need to be aligned, but done to keep all IDTs defined the same way. */
+gate_desc debug_idt_table[NR_VECTORS] __page_aligned_bss;
#else
#include <asm/processor-flags.h>
#include <asm/setup.h>
asmlinkage int system_call(void);
-
-/*
- * The IDT has to be page-aligned to simplify the Pentium
- * F0 0F bug workaround.
- */
-gate_desc idt_table[NR_VECTORS] __page_aligned_data = { { { { 0, 0 } } }, };
#endif
+/* Must be page-aligned because the real IDT is used in a fixmap. */
+gate_desc idt_table[NR_VECTORS] __page_aligned_bss;
+
DECLARE_BITMAP(used_vectors, NR_VECTORS);
EXPORT_SYMBOL_GPL(used_vectors);
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
index f8ab494..9962015 100644
--- a/arch/x86/platform/ce4100/ce4100.c
+++ b/arch/x86/platform/ce4100/ce4100.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/serial_reg.h>
#include <linux/serial_8250.h>
+#include <linux/reboot.h>
#include <asm/ce4100.h>
#include <asm/prom.h>
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index c8d5577..90f6ed1 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -931,13 +931,6 @@ void __init efi_enter_virtual_mode(void)
va = efi_ioremap(md->phys_addr, size,
md->type, md->attribute);
- if (!(md->attribute & EFI_MEMORY_RUNTIME)) {
- if (!va)
- pr_err("ioremap of 0x%llX failed!\n",
- (unsigned long long)md->phys_addr);
- continue;
- }
-
md->virt_addr = (u64) (unsigned long) va;
if (!va) {
diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
index 8bd1bb6..8a7432a 100644
--- a/drivers/firmware/efi/efivars.c
+++ b/drivers/firmware/efi/efivars.c
@@ -583,6 +583,9 @@ int efivars_sysfs_init(void)
struct kobject *parent_kobj = efivars_kobject();
int error = 0;
+ if (!efi_enabled(EFI_RUNTIME_SERVICES))
+ return -ENODEV;
+
/* No efivars has been registered yet */
if (!parent_kobj)
return 0;
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [GIT PULL] x86 fixes for 3.11-rc2
2013-07-18 22:41 [GIT PULL] x86 fixes for 3.11-rc2 H. Peter Anvin
@ 2013-07-19 0:46 ` Linus Torvalds
2013-07-19 0:49 ` Myklebust, Trond
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Linus Torvalds @ 2013-07-19 0:46 UTC (permalink / raw)
To: H. Peter Anvin
Cc: christian.suenkenberg, dyoung, Peter Anvin, jencce.kernel,
Kees Cook, Linux Kernel Mailing List, Maarten Lankhorst,
Matt Fleming, Matthew Garrett, Ingo Molnar, onny, pageexec,
Rafael J. Wysocki, Seth Forshee, Thomas Gleixner
Google translate is getting better. I was going to ask you who you
knew who had enough of a Finnish background to do that, but decided to
see what I could make google translate do.
I'm pretty sure google didn't _use_ to do that good a job at Finnish.
It would be "pääksi", not "pää", but I think you edited that part by
hand without knowing the rules for Finnish translative declension.
Finnish is hard. But good for swearing.
. Linus
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [GIT PULL] x86 fixes for 3.11-rc2
2013-07-19 0:46 ` Linus Torvalds
@ 2013-07-19 0:49 ` Myklebust, Trond
2013-07-19 0:50 ` H. Peter Anvin
2013-07-19 4:25 ` H. Peter Anvin
2 siblings, 0 replies; 8+ messages in thread
From: Myklebust, Trond @ 2013-07-19 0:49 UTC (permalink / raw)
To: Linus Torvalds
Cc: H. Peter Anvin, christian.suenkenberg@student.kit.edu,
dyoung@redhat.com, Peter Anvin, jencce.kernel@gmail.com,
Kees Cook, Linux Kernel Mailing List, Maarten Lankhorst,
Matt Fleming, Matthew Garrett, Ingo Molnar,
onny@project-insanity.org, pageexec@gmail.com, Rafael J. Wysocki,
Seth Forshee, Thomas Gleixner
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 477 bytes --]
On Thu, 2013-07-18 at 17:46 -0700, Linus Torvalds wrote:
> Finnish is hard. But good for swearing.
Only because the ratio of vowels to consonants causes an immediate
outbreak of swearing among those who try...
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [GIT PULL] x86 fixes for 3.11-rc2
2013-07-19 0:46 ` Linus Torvalds
2013-07-19 0:49 ` Myklebust, Trond
@ 2013-07-19 0:50 ` H. Peter Anvin
2013-07-19 4:25 ` H. Peter Anvin
2 siblings, 0 replies; 8+ messages in thread
From: H. Peter Anvin @ 2013-07-19 0:50 UTC (permalink / raw)
To: Linus Torvalds
Cc: H. Peter Anvin, christian.suenkenberg, dyoung, jencce.kernel,
Kees Cook, Linux Kernel Mailing List, Maarten Lankhorst,
Matt Fleming, Matthew Garrett, Ingo Molnar, onny, pageexec,
Rafael J. Wysocki, Seth Forshee, Thomas Gleixner
On 07/18/2013 05:46 PM, Linus Torvalds wrote:
>
> Finnish is hard. But good for swearing.
>
http://www.youtube.com/watch?v=b1fkMuMDqXI
It probably won't make too much sense if you haven't seen:
http://www.youtube.com/watch?v=_4bka9Y2gJ0
-hpa
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] x86 fixes for 3.11-rc2
2013-07-19 0:46 ` Linus Torvalds
2013-07-19 0:49 ` Myklebust, Trond
2013-07-19 0:50 ` H. Peter Anvin
@ 2013-07-19 4:25 ` H. Peter Anvin
2013-07-19 7:45 ` [OT] " Lukasz Sokol
2 siblings, 1 reply; 8+ messages in thread
From: H. Peter Anvin @ 2013-07-19 4:25 UTC (permalink / raw)
To: Linus Torvalds
Cc: H. Peter Anvin, Linux Kernel Mailing List, Ingo Molnar,
Thomas Gleixner
On 07/18/2013 05:46 PM, Linus Torvalds wrote:
>
> Finnish is hard. But good for swearing.
>
Ehkä meidän sääntö, että kiroilu on sallittu vain suomeksi (ja venäjä,
muuten Al Viro todennäköisesti räjähtää.)
-hpa
^ permalink raw reply [flat|nested] 8+ messages in thread
* [OT] Re: [GIT PULL] x86 fixes for 3.11-rc2
2013-07-19 4:25 ` H. Peter Anvin
@ 2013-07-19 7:45 ` Lukasz Sokol
2013-07-19 9:38 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: Lukasz Sokol @ 2013-07-19 7:45 UTC (permalink / raw)
To: linux-kernel
H. Peter Anvin <hpa <at> zytor.com> writes:
> Ehkä meidän sääntö, että kiroilu on sallittu vain suomeksi (ja venäjä,
> muuten Al Viro todennäköisesti räjähtää.)
>
> -hpa
Try pasting that back into Google Translate ;) see what Viro is translated
to ;)
-L ;)
---
These lines are added to increase my message to your message ratio,
to keep Gmane web interface happy.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] Re: [GIT PULL] x86 fixes for 3.11-rc2
2013-07-19 7:45 ` [OT] " Lukasz Sokol
@ 2013-07-19 9:38 ` Geert Uytterhoeven
2013-07-19 17:30 ` H. Peter Anvin
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2013-07-19 9:38 UTC (permalink / raw)
To: Lukasz Sokol, H. Peter Anvin; +Cc: linux-kernel@vger.kernel.org
On Fri, Jul 19, 2013 at 9:45 AM, Lukasz Sokol <el.es.cr@gmail.com> wrote:
> H. Peter Anvin <hpa <at> zytor.com> writes:
>> Ehkä meidän sääntö, että kiroilu on sallittu vain suomeksi (ja venäjä,
>> muuten Al Viro todennäköisesti räjähtää.)
Can we please stop writing these _mixed_ English/Finnish emails?
As Chrome only offers to translate _pure_ Finnish emails, that would save
most of us a copy-and-paste trip to translate.google.com ;-)
> Try pasting that back into Google Translate ;) see what Viro is translated
> to ;)
>
> -L ;)
Da!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-07-19 17:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 22:41 [GIT PULL] x86 fixes for 3.11-rc2 H. Peter Anvin
2013-07-19 0:46 ` Linus Torvalds
2013-07-19 0:49 ` Myklebust, Trond
2013-07-19 0:50 ` H. Peter Anvin
2013-07-19 4:25 ` H. Peter Anvin
2013-07-19 7:45 ` [OT] " Lukasz Sokol
2013-07-19 9:38 ` Geert Uytterhoeven
2013-07-19 17:30 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox