From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c00::243; helo=mail-pf0-x243.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 32BFA20349DB7 for ; Mon, 20 Nov 2017 05:53:49 -0800 (PST) Received: by mail-pf0-x243.google.com with SMTP id i15so7361023pfa.3 for ; Mon, 20 Nov 2017 05:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LGE0dKFNE8AsiN7JgstuKSyLaTcUFwd1rsFzGVt99Sk=; b=SKJaNE12VYy1DP7NFVE86U9G9KLNfGHykBEmBg3glp/VX4CQhdg+yflFhfCMV+Jkp3 yI86YDX8YwraqHwmA0pUJHLRzKmoN32KZvQn5hVo08VXL3KKVg2ZN+oyEbzyQvMJ9JZ0 FEOXQMZE+GJay1nGs1BKMal7mXMpDKb6aXLOs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LGE0dKFNE8AsiN7JgstuKSyLaTcUFwd1rsFzGVt99Sk=; b=r3PmR56XNVUf0d9HT1tByDLa/mmZw9jF7HiRV6mkhYSFIrJGX7cSF4cp+hUh2VOOgs GIRNJbYE5Uaxq+mGoxeOVzPPlIzVNHQGeRNa/lBVZkYAOcSTsMd41pRQhMgOI202fYg8 XZuNbMLfa7CcvGvKiXpoZ0V8xwkT9ELCx6CFfvb1mrZT1gy0uqCRmIG97Wc1WR3ee064 suU9LuhzCf3o7U5InckhtIRFexliAa372EbJz5mgj8USOCCFRzXiXMyfEk5ZCJ2aQBB5 eZdvsHmWvFlDD7i29UwS0ofATSkR2f+8yOMutQqJQrb07BB70fl8vDm2Y8H0jgJnDzi9 04wQ== X-Gm-Message-State: AJaThX5tddXSbKRkxXbA/hdWTJR1JziSJwuu3Q6616dujx0vgfT3CRAI I8YsNJYWyBqPDhtuGhSF7jEbow== X-Google-Smtp-Source: AGs4zMY73haOQEpM3xDVkA3JWxtrq9gQTsqtZS7z0FIlA6eLmedLYgbUO89ILRrK+EMGpbJJ3F/6Ew== X-Received: by 10.99.2.23 with SMTP id 23mr13144044pgc.99.1511186282938; Mon, 20 Nov 2017 05:58:02 -0800 (PST) Received: from szxbz956.huaweiobz.com ([104.237.91.63]) by smtp.gmail.com with ESMTPSA id p19sm21990445pfj.140.2017.11.20.05.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Nov 2017 05:58:02 -0800 (PST) From: Heyi Guo To: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org Cc: Heyi Guo , Leif Lindholm , Ard Biesheuvel Date: Mon, 20 Nov 2017 21:57:21 +0800 Message-Id: <1511186242-5220-2-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.2.windows.1 In-Reply-To: <1511186242-5220-1-git-send-email-heyi.guo@linaro.org> References: <1511186242-5220-1-git-send-email-heyi.guo@linaro.org> Subject: [PATCH edk2-non-osi 1/2] Hisilicon/D0x/Sas: fix occasional exception X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2017 13:53:49 -0000 There is a temporary variable in SAS driver which was not initialized with SAS disk, so the value of this variable depends on the unknown stack content. Later it will be used as source buffer in gBS->CopyMem, and a translation fault exception would occur if the value is beyond valid memory address as a pointer. Details can be found in https://bugs.linaro.org/show_bug.cgi?id=3464 This patch is to fix this bug, avoiding to use uninitialized value when connecting SAS disks. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo Cc: Leif Lindholm Cc: Ard Biesheuvel --- Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi | Bin 98144 -> 98112 bytes Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi | Bin 116288 -> 112832 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi b/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi index c9b2ad6..c37b922 100644 Binary files a/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi and b/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi differ diff --git a/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi b/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi index 9a680c5..a57b8e1 100644 Binary files a/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi and b/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi differ -- 1.9.1