[PATCH 0/1] x86: work around X86-32 kernel failures on Intel Atom CPU

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/1] x86: work around X86-32 kernel failures on Intel Atom CPU

Colin Ian King-2
From: Colin Ian King <[hidden email]>

*** HARDY LPIA ONLY ***

BugLink: https://bugs.launchpad.net/bugs/523112

This is a workaround to errata AAE44 as listed in
http://download.intel.com/design/processor/specupdt/319536.pdf,
page 33, namely: "Code Fetch May Occur to Incorrect Address
After a Large Page is Split into 4-KB Byte Pages". This is the same
as Errata AAH41 (Atom 3xx series) but named AAE44 for the Atom
Z5xx series.

This fix is not totally bullet proof. There is still a possibility
of a race between __set_pmd_pte and __flush_tlb_all() during which
the other hyperthread could do a code fetch and get garbage. Hence
this patch narrows the window for the race but does not completely
prevent it.

This patch has been soak tested on an Atom Z530 for 2 hours. Without
this patch, the soak test can reproduce an oops within 5 minutes of
testing.

Also boot tested on two Atom N270 netbooks and Intel


This patch is a backport of the upstream commit
211b3d03c7400f48a781977a50104c9d12f4e229, the original commit message
was as follows:

Impact: work around boot crash

Work around Intel Atom erratum AAH41 (probabilistically) - it's triggering
in the field.

Reported-by: Linus Torvalds <[hidden email]>
Tested-by: Kyle McMartin <[hidden email]>
Signed-off-by: Ingo Molnar <[hidden email]>
Signed-off-by: Colin Ian King <[hidden email]>


Colin Ian King (1):
  UBUNTU: x86: work around X86-32 kernel failures on Intel Atom CPU

 arch/x86/mm/pageattr_32.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1] UBUNTU: x86: work around X86-32 kernel failures on Intel Atom CPU

Colin Ian King-2
From: Colin Ian King <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/523112

This is a workaround to errata AAE44 as listed in
http://download.intel.com/design/processor/specupdt/319536.pdf,
page 33, namely: "Code Fetch May Occur to Incorrect Address
After a Large Page is Split into 4-KB Byte Pages". This is the same
as Errata AAH41 (Atom 3xx series) but named AAE44 for the Atom
Z5xx series.

This fix is not totally bullet proof. There is still a possibility
of a race between __set_pmd_pte and __flush_tlb_all() during which
the other hyperthread could do a code fetch and get garbage. Hence
this patch narrows the window for the race but does not completely
prevent it.

This patch is a backport of the upstream commit
211b3d03c7400f48a781977a50104c9d12f4e229, the original commit message
was as follows:

Impact: work around boot crash

Work around Intel Atom erratum AAH41 (probabilistically) - it's triggering
in the field.

Reported-by: Linus Torvalds <[hidden email]>
Tested-by: Kyle McMartin <[hidden email]>
Signed-off-by: Ingo Molnar <[hidden email]>
Signed-off-by: Colin Ian King <[hidden email]>
---
 arch/x86/mm/pageattr_32.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/pageattr_32.c b/arch/x86/mm/pageattr_32.c
index 260073c..92c91ea 100644
--- a/arch/x86/mm/pageattr_32.c
+++ b/arch/x86/mm/pageattr_32.c
@@ -65,6 +65,17 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot,
                set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT,
                                           addr == address ? prot : ref_prot));
  }
+
+ /*
+ * Intel Atom errata AAH41 and AAE44 workaround.
+ *
+ * The real fix should be in hw or in a microcode update, but
+ * we also probabilistically try to reduce the window of having
+ * a large TLB mixed with 4K TLBs while instruction fetches are
+ * going on.
+ */
+ __flush_tlb_all();
+
  return base;
 }
 
--
1.6.3.3


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 0/1] x86: work around X86-32 kernel failures on Intel Atom CPU

Tim Gardner-2
In reply to this post by Colin Ian King-2
Colin King wrote:

> From: Colin Ian King <[hidden email]>
>
> *** HARDY LPIA ONLY ***
>
> BugLink: https://bugs.launchpad.net/bugs/523112
>
> This is a workaround to errata AAE44 as listed in
> http://download.intel.com/design/processor/specupdt/319536.pdf,
> page 33, namely: "Code Fetch May Occur to Incorrect Address
> After a Large Page is Split into 4-KB Byte Pages". This is the same
> as Errata AAH41 (Atom 3xx series) but named AAE44 for the Atom
> Z5xx series.
>
> This fix is not totally bullet proof. There is still a possibility
> of a race between __set_pmd_pte and __flush_tlb_all() during which
> the other hyperthread could do a code fetch and get garbage. Hence
> this patch narrows the window for the race but does not completely
> prevent it.
>
> This patch has been soak tested on an Atom Z530 for 2 hours. Without
> this patch, the soak test can reproduce an oops within 5 minutes of
> testing.
>
> Also boot tested on two Atom N270 netbooks and Intel
>
>
> This patch is a backport of the upstream commit
> 211b3d03c7400f48a781977a50104c9d12f4e229, the original commit message
> was as follows:
>
> Impact: work around boot crash
>
> Work around Intel Atom erratum AAH41 (probabilistically) - it's triggering
> in the field.
>
> Reported-by: Linus Torvalds <[hidden email]>
> Tested-by: Kyle McMartin <[hidden email]>
> Signed-off-by: Ingo Molnar <[hidden email]>
> Signed-off-by: Colin Ian King <[hidden email]>
>
>
> Colin Ian King (1):
>   UBUNTU: x86: work around X86-32 kernel failures on Intel Atom CPU
>
>  arch/x86/mm/pageattr_32.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
>

Acked-by Tim Gardner <[hidden email]>

--
Tim Gardner [hidden email]

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 0/1] x86: work around X86-32 kernel failures on Intel Atom CPU

Amit Kucheria-6
In reply to this post by Colin Ian King-2
On 10 Feb 17, Colin King wrote:

> From: Colin Ian King <[hidden email]>
>
> *** HARDY LPIA ONLY ***
>
> BugLink: https://bugs.launchpad.net/bugs/523112
>
> This is a workaround to errata AAE44 as listed in
> http://download.intel.com/design/processor/specupdt/319536.pdf,
> page 33, namely: "Code Fetch May Occur to Incorrect Address
> After a Large Page is Split into 4-KB Byte Pages". This is the same
> as Errata AAH41 (Atom 3xx series) but named AAE44 for the Atom
> Z5xx series.
>
> This fix is not totally bullet proof. There is still a possibility
> of a race between __set_pmd_pte and __flush_tlb_all() during which
> the other hyperthread could do a code fetch and get garbage. Hence
> this patch narrows the window for the race but does not completely
> prevent it.
>
> This patch has been soak tested on an Atom Z530 for 2 hours. Without
> this patch, the soak test can reproduce an oops within 5 minutes of
> testing.
>
> Also boot tested on two Atom N270 netbooks and Intel
>
>
> This patch is a backport of the upstream commit
> 211b3d03c7400f48a781977a50104c9d12f4e229, the original commit message
> was as follows:
>
> Impact: work around boot crash
>
> Work around Intel Atom erratum AAH41 (probabilistically) - it's triggering
> in the field.
>
> Reported-by: Linus Torvalds <[hidden email]>
> Tested-by: Kyle McMartin <[hidden email]>
> Signed-off-by: Ingo Molnar <[hidden email]>
> Signed-off-by: Colin Ian King <[hidden email]>
>
>
> Colin Ian King (1):
>   UBUNTU: x86: work around X86-32 kernel failures on Intel Atom CPU
>
>  arch/x86/mm/pageattr_32.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
> --

Acked-by: Amit Kucheria <[hidden email]>

--
----------------------------------------------------------------------
Amit Kucheria, Kernel Engineer || [hidden email]
----------------------------------------------------------------------

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[APPLIED][PATCH 1/1] UBUNTU: x86: work around X86-32 kernel failures on Intel Atom CPU

Stefan Bader-2
In reply to this post by Colin Ian King-2
Applied to the Karmic netbook-lpia branch

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team