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
..
2008-11-30 10:03:37 -08:00
2008-10-16 16:53:13 +02:00
2008-10-16 09:24:41 -07:00
2008-10-16 16:53:13 +02:00
2008-11-16 10:05:07 +01:00
2008-09-29 10:04:53 +02:00
2008-10-13 10:21:10 +02:00
2008-07-22 14:35:57 +02:00
2008-10-16 16:53:30 +02:00
2008-10-16 16:53:30 +02:00
2008-10-21 15:54:40 +02:00
2008-10-16 16:53:15 +02:00
2008-10-12 12:37:32 +02:00
2008-07-26 12:00:04 -07:00
2008-10-12 12:37:32 +02:00
2008-10-23 00:11:07 -04:00
2008-10-20 08:52:41 -07:00
2008-08-25 10:59:18 +02:00
2008-07-16 12:15:17 -07:00
2008-07-26 16:31:35 +02:00
2008-07-22 14:35:57 +02:00
2008-10-22 22:55:23 -07:00
2008-07-22 14:35:57 +02:00
2008-11-08 17:05:38 +01:00
2008-10-16 16:53:13 +02:00
2008-10-16 16:53:15 +02:00
2008-07-22 14:35:57 +02:00
2008-10-16 16:52:59 +02:00
2008-10-16 16:53:15 +02:00
2008-10-29 08:02:28 +01:00