Skip to contentSkip to conversation

x86/mce: Fix copy/paste error in exception table entries.

PATCH New Luck, Tony 2 participants 2 messages Mar 20, 2017 – Mar 22, 2017

Subsystems (2)
lore
Share & tools
lore

Luck, Tony

author
#0 lore raw

PATCH 1/1 x86/mce: Fix copy/paste error in exception table entries.

From: Tony Luck <[email protected]>

Back in commit 92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()") I made a copy/paste error setting up the exception table entries and ended up with two for label .L_cache_w3 and none for .L_cache_w2.

This means that if we take a machine check on:

.L_cache_w2: movq 2*8(%rsi), %r10

then we don't have an exception table entry for this instruction and we can't recover.

Fix: s/3/2/

Fixes 92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()")
---
 arch/x86/lib/memcpy_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/lib/memcpy_64.S +1 -1
index 779782f58324..9a53a06e5a3e 100644
@@ -290,7 +290,7 @@ EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled)
 	_ASM_EXTABLE_FAULT(.L_copy_leading_bytes, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w0, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w1, .L_memcpy_mcsafe_fail)
-	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
+	_ASM_EXTABLE_FAULT(.L_cache_w2, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w4, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w5, .L_memcpy_mcsafe_fail)
Signature · 1 line
2.7.4
#1 lore raw

[tip:x86/urgent] x86/mce: Fix copy/paste error in exception table entries

x86/mce: Fix copy/paste error in exception table entries
Commit-ID:  26a37ab319a26d330bab298770d692bb9c852aff
Gitweb:     http://git.kernel.org/tip/26a37ab319a26d330bab298770d692bb9c852aff
Author:     Tony Luck <[email protected]>
AuthorDate: Mon, 20 Mar 2017 14:40:30 -0700
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 22 Mar 2017 08:43:25 +0100

x86/mce: Fix copy/paste error in exception table entries

Back in commit:

92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()")

... I made a copy/paste error setting up the exception table entries and ended up with two for label .L_cache_w3 and none for .L_cache_w2.

This means that if we take a machine check on:

.L_cache_w2: movq 2*8(%rsi), %r10

then we don't have an exception table entry for this instruction and we can't recover.

Fix: s/3/2/

Cc Andy Lutomirski <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes 92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()")
---
 arch/x86/lib/memcpy_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/lib/memcpy_64.S +1 -1
index 779782f..9a53a06 100644
@@ -290,7 +290,7 @@ EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled)
 	_ASM_EXTABLE_FAULT(.L_copy_leading_bytes, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w0, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w1, .L_memcpy_mcsafe_fail)
-	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
+	_ASM_EXTABLE_FAULT(.L_cache_w2, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w4, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w5, .L_memcpy_mcsafe_fail)