kernel-ark/arch
Dmitry Adamushko 280a9ca5d0 x86: fix resume (S2R) broken by Intel microcode module, on A110L
Impact: fix deadlock

This is in response to the following bug report:

Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=12100
Subject         : resume (S2R) broken by Intel microcode module, on A110L
Submitter       : Andreas Mohr <andi@lisas.de>
Date            : 2008-11-25 08:48 (19 days old)
Handled-By      : Dmitry Adamushko <dmitry.adamushko@gmail.com>

[ The deadlock scenario has been discovered by Andreas Mohr ]

I think I might have a logical explanation why the system:

  (http://bugzilla.kernel.org/show_bug.cgi?id=12100)

might hang upon resuming, OTOH it should have likely hanged each and every time.

(1) possible deadlock in microcode_resume_cpu() if either 'if' section is
taken;

(2) now, I don't see it in spec. and can't experimentally verify it (newer
ucodes don't seem to be available for my Core2duo)... but logically-wise, I'd
think that when read upon resuming, the 'microcode revision' (MSR 0x8B) should
be back to its original one (we need to reload ucode anyway so it doesn't seem
logical if a cpu doesn't drop the version)... if so, the comparison with
memcmp() for the full 'struct cpu_signature' is wrong... and that's how one of
the aforementioned 'if' sections might have been triggered - leading to a
deadlock.

Obviously, in my tests I simulated loading/resuming with the ucode of the same
version (just to see that the file is loaded/re-loaded upon resuming) so this
issue has never popped up.

I'd appreciate if someone with an appropriate system might give a try to the
2nd patch (titled "fix a comparison && deadlock...").

In any case, the deadlock situation is a must-have fix.

Reported-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Tested-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-20 14:29:20 +01:00
..
alpha alpha: pcibios_resource_to_bus() is callable from normal code 2008-11-30 10:03:37 -08:00
arm [ARM] Ensure linux/hardirqs.h is included where required 2008-12-15 10:34:48 +00:00
avr32
blackfin Blackfin arch: fix a broken define in dma-mapping 2008-11-18 17:48:22 +08:00
cris [CRIS] Remove links from CRIS build 2008-10-31 23:37:57 +01:00
frv frv: fix mmap2 error handling 2008-12-01 19:55:24 -08:00
h8300
ia64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-12-15 16:30:22 -08:00
m32r m32r: section noise in head.S 2008-11-30 10:03:37 -08:00
m68k m68k: Update defconfigs for 2.6.28-rc7 2008-12-02 20:58:26 +01:00
m68knommu
mips MIPS: IP32: Update defconfig 2008-12-12 18:12:23 +00:00
mn10300 MN10300: Give correct size when reserving interrupt vector table 2008-12-10 13:34:33 -08:00
parisc Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 2008-11-30 14:04:31 -08:00
powerpc powerpc/cell/axon-msi: Fix MSI after kexec 2008-12-16 13:48:18 +11:00
s390 Merge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-12-02 15:56:17 -08:00
sh sh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms. 2008-12-16 16:42:53 +09:00
sparc sparc: asm/bitops.h should define __fls 2008-12-03 16:04:52 -08:00
sparc64 sparc64: Sync FPU state in VIS emulation handler. 2008-12-04 09:12:57 -08:00
um uml: boot broken due to buffer overrun 2008-12-10 08:01:52 -08:00
x86 x86: fix resume (S2R) broken by Intel microcode module, on A110L 2008-12-20 14:29:20 +01:00
xtensa
.gitignore
Kconfig remove __ARCH_WANT_COMPAT_SYS_PTRACE 2008-11-30 11:00:15 -08:00