* [PATCH] x86/mce: Fix copy/paste error in exception table entries.
@ 2017-03-20 21:40 Luck, Tony
2017-03-22 9:10 ` [tip:x86/urgent] " tip-bot for Tony Luck
0 siblings, 1 reply; 2+ messages in thread
From: Luck, Tony @ 2017-03-20 21:40 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Tony Luck, LKML
From: Tony Luck <tony.luck@intel.com>
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: LKML <linux-kernel@vger.kernel.org>
Fixes: 92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()")
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
arch/x86/lib/memcpy_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/lib/memcpy_64.S b/arch/x86/lib/memcpy_64.S
index 779782f58324..9a53a06e5a3e 100644
--- a/arch/x86/lib/memcpy_64.S
+++ b/arch/x86/lib/memcpy_64.S
@@ -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)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86/mce: Fix copy/paste error in exception table entries
2017-03-20 21:40 [PATCH] x86/mce: Fix copy/paste error in exception table entries Luck, Tony
@ 2017-03-22 9:10 ` tip-bot for Tony Luck
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Tony Luck @ 2017-03-22 9:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: torvalds, bp, mingo, hpa, luto, brgerst, peterz, tglx, dvlasenk,
stable, jpoimboe, tony.luck, linux-kernel
Commit-ID: 26a37ab319a26d330bab298770d692bb9c852aff
Gitweb: http://git.kernel.org/tip/26a37ab319a26d330bab298770d692bb9c852aff
Author: Tony Luck <tony.luck@intel.com>
AuthorDate: Mon, 20 Mar 2017 14:40:30 -0700
Committer: Ingo Molnar <mingo@kernel.org>
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/
Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()")
Link: http://lkml.kernel.org/r/1490046030-25862-1-git-send-email-tony.luck@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/lib/memcpy_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/lib/memcpy_64.S b/arch/x86/lib/memcpy_64.S
index 779782f..9a53a06 100644
--- a/arch/x86/lib/memcpy_64.S
+++ b/arch/x86/lib/memcpy_64.S
@@ -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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-22 9:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 21:40 [PATCH] x86/mce: Fix copy/paste error in exception table entries Luck, Tony
2017-03-22 9:10 ` [tip:x86/urgent] " tip-bot for Tony Luck
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).