* [PATCH BACKPORT v2 3.4 - 4.5] x86/traps: Ignore high word of regs->cs in early_idt_handler_common
@ 2016-12-01 17:26 Andy Lutomirski
2016-12-02 17:07 ` Greg KH
2017-02-15 1:45 ` Ben Hutchings
0 siblings, 2 replies; 3+ messages in thread
From: Andy Lutomirski @ 2016-12-01 17:26 UTC (permalink / raw)
To: stable
Cc: Matthew Whitehead, Greg KH, Jiri Slaby, Willy Tarreau,
Andy Lutomirski, H . Peter Anvin
This is a backport of:
commit fc0e81b2bea0ebceb71889b61d2240856141c9ee upstream
On the 80486 DX, it seems that some exceptions may leave garbage in
the high bits of CS. This causes sporadic failures in which
early_fixup_exception() refuses to fix up an exception.
As far as I can tell, this has been buggy for a long time, but the
problem seems to have been exacerbated by commits:
1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
e1bfc11c5a6f ("x86/init: Fix cr4_init_shadow() on CR4-less machines")
This appears to have broken for as long as we've had early
exception handling.
[ This backport should apply to kernels from 3.4 - 4.5. ]
Fixes: 4c5023a3fa2e ("x86-32: Handle exception table entries during early boot")
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: stable@vger.kernel.org
Reported-by: Matthew Whitehead <tedheadster@gmail.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
arch/x86/kernel/head_32.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index af1112980dd4..99373aa0762a 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -571,7 +571,7 @@ early_idt_handler_common:
movl %eax,%ds
movl %eax,%es
- cmpl $(__KERNEL_CS),32(%esp)
+ cmpw $(__KERNEL_CS),32(%esp)
jne 10f
leal 28(%esp),%eax # Pointer to %eip
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH BACKPORT v2 3.4 - 4.5] x86/traps: Ignore high word of regs->cs in early_idt_handler_common
2016-12-01 17:26 [PATCH BACKPORT v2 3.4 - 4.5] x86/traps: Ignore high word of regs->cs in early_idt_handler_common Andy Lutomirski
@ 2016-12-02 17:07 ` Greg KH
2017-02-15 1:45 ` Ben Hutchings
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-12-02 17:07 UTC (permalink / raw)
To: Andy Lutomirski
Cc: stable, Matthew Whitehead, Jiri Slaby, Willy Tarreau,
H . Peter Anvin
On Thu, Dec 01, 2016 at 09:26:42AM -0800, Andy Lutomirski wrote:
> This is a backport of:
> commit fc0e81b2bea0ebceb71889b61d2240856141c9ee upstream
>
> On the 80486 DX, it seems that some exceptions may leave garbage in
> the high bits of CS. This causes sporadic failures in which
> early_fixup_exception() refuses to fix up an exception.
>
> As far as I can tell, this has been buggy for a long time, but the
> problem seems to have been exacerbated by commits:
>
> 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
> e1bfc11c5a6f ("x86/init: Fix cr4_init_shadow() on CR4-less machines")
>
> This appears to have broken for as long as we've had early
> exception handling.
>
> [ This backport should apply to kernels from 3.4 - 4.5. ]
Thanks for the backport, now queued up for 4.4-stable.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BACKPORT v2 3.4 - 4.5] x86/traps: Ignore high word of regs->cs in early_idt_handler_common
2016-12-01 17:26 [PATCH BACKPORT v2 3.4 - 4.5] x86/traps: Ignore high word of regs->cs in early_idt_handler_common Andy Lutomirski
2016-12-02 17:07 ` Greg KH
@ 2017-02-15 1:45 ` Ben Hutchings
1 sibling, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2017-02-15 1:45 UTC (permalink / raw)
To: Andy Lutomirski, stable
Cc: Matthew Whitehead, Greg KH, Jiri Slaby, Willy Tarreau,
H . Peter Anvin
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
On Thu, 2016-12-01 at 09:26 -0800, Andy Lutomirski wrote:
> This is a backport of:
> commit fc0e81b2bea0ebceb71889b61d2240856141c9ee upstream
>
> On the 80486 DX, it seems that some exceptions may leave garbage in
> the high bits of CS. This causes sporadic failures in which
> early_fixup_exception() refuses to fix up an exception.
>
> As far as I can tell, this has been buggy for a long time, but the
> problem seems to have been exacerbated by commits:
>
> 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
> e1bfc11c5a6f ("x86/init: Fix cr4_init_shadow() on CR4-less machines")
>
> This appears to have broken for as long as we've had early
> exception handling.
>
> [ This backport should apply to kernels from 3.4 - 4.5. ]
[...]
Queued up for 3.16, thanks.
Ben.
--
Ben Hutchings
Lowery's Law:
If it jams, force it. If it breaks, it needed replacing
anyway.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-15 1:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-01 17:26 [PATCH BACKPORT v2 3.4 - 4.5] x86/traps: Ignore high word of regs->cs in early_idt_handler_common Andy Lutomirski
2016-12-02 17:07 ` Greg KH
2017-02-15 1:45 ` Ben Hutchings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).