|
|
958e1b |
From 1958d41c7db1f415f84cb3ef316708ca83e6e72f Mon Sep 17 00:00:00 2001
|
|
|
240766 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
240766 |
Date: Fri, 25 Apr 2014 17:54:05 +0200
|
|
|
240766 |
Subject: [PATCH 12/12] ide: Correct improper smart self test counter reset in ide core.
|
|
|
240766 |
MIME-Version: 1.0
|
|
|
240766 |
Content-Type: text/plain; charset=UTF-8
|
|
|
240766 |
Content-Transfer-Encoding: 8bit
|
|
|
240766 |
|
|
|
240766 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
240766 |
Message-id: <1398448445-17245-2-git-send-email-armbru@redhat.com>
|
|
|
240766 |
Patchwork-id: 58568
|
|
|
240766 |
O-Subject: [PATCH 7.0 qemu-kvm 1/1] ide: Correct improper smart self test counter reset in ide core.
|
|
|
958e1b |
Bugzilla: 1087980
|
|
|
240766 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
240766 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
240766 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
240766 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
240766 |
|
|
|
240766 |
From: BenoƮt Canet <benoit.canet@irqsave.net>
|
|
|
240766 |
|
|
|
240766 |
The SMART self test counter was incorrectly being reset to zero,
|
|
|
240766 |
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
|
|
|
240766 |
* We would write off the beginning of a dynamically allocated buffer
|
|
|
240766 |
* We forgot the SMART history
|
|
|
240766 |
Fix this.
|
|
|
240766 |
|
|
|
240766 |
Signed-off-by: Benoit Canet <benoit@irqsave.net>
|
|
|
240766 |
Message-id: 1397336390-24664-1-git-send-email-benoit.canet@irqsave.net
|
|
|
240766 |
Reviewed-by: Markus Armbruster <armbru@redhat.com>
|
|
|
240766 |
Cc: qemu-stable@nongnu.org
|
|
|
240766 |
Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
240766 |
[PMM: tweaked commit message as per suggestions from Markus]
|
|
|
240766 |
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
|
240766 |
(cherry picked from commit 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7)
|
|
|
240766 |
|
|
|
240766 |
Conflicts:
|
|
|
240766 |
hw/ide/core.c
|
|
|
240766 |
|
|
|
240766 |
CVE-2014-2894
|
|
|
240766 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
240766 |
---
|
|
|
240766 |
hw/ide/core.c | 2 +-
|
|
|
240766 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
240766 |
|
|
|
240766 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
240766 |
---
|
|
|
240766 |
hw/ide/core.c | 2 +-
|
|
|
240766 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
240766 |
|
|
|
240766 |
diff --git a/hw/ide/core.c b/hw/ide/core.c
|
|
|
240766 |
index c172c71..0313250 100644
|
|
|
240766 |
--- a/hw/ide/core.c
|
|
|
240766 |
+++ b/hw/ide/core.c
|
|
|
240766 |
@@ -1617,7 +1617,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val)
|
|
|
240766 |
case 2: /* extended self test */
|
|
|
240766 |
s->smart_selftest_count++;
|
|
|
240766 |
if(s->smart_selftest_count > 21)
|
|
|
240766 |
- s->smart_selftest_count = 0;
|
|
|
240766 |
+ s->smart_selftest_count = 1;
|
|
|
240766 |
n = 2 + (s->smart_selftest_count - 1) * 24;
|
|
|
240766 |
s->smart_selftest_data[n] = s->sector;
|
|
|
240766 |
s->smart_selftest_data[n+1] = 0x00; /* OK and finished */
|
|
|
240766 |
--
|
|
|
240766 |
1.7.1
|
|
|
240766 |
|