[edk2] [PATCH edk2-non-osi 0/2] Fix Linaro RP bug 3464

Heyi Guo posted 2 patches 6 years, 4 months ago
Only 0 patches received!
Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi                         | Bin 98144 -> 98112 bytes
Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi                         | Bin 116288 -> 112832 bytes
Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib | Bin 16942 -> 16950 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
[edk2] [PATCH edk2-non-osi 0/2] Fix Linaro RP bug 3464
Posted by Heyi Guo 6 years, 4 months ago
We have found 2 bugs with Linaro Reference Platform bug 3464:
https://bugs.linaro.org/show_bug.cgi?id=3464
1. SAS driver might use uninitialized value which would cause system
exception;
2. LpcSerialPortLib used on D03 will cause SerialDxe initialized with
failure and exited immediately, which would cause no serial terminal
in BDS.

Patches with binary files can also be found in
https://github.com/hisilicon/OpenPlatformPkg/commits/rp-osi-bug-v4

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Heyi Guo (2):
  Hisilicon/D0x/Sas: fix occasional exception
  Hisilicon/LpcSerialPortLib: return SUCCESS for SetAttributes

 Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi                         | Bin 98144 -> 98112 bytes
 Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi                         | Bin 116288 -> 112832 bytes
 Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib | Bin 16942 -> 16950 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-non-osi 0/2] Fix Linaro RP bug 3464
Posted by Leif Lindholm 6 years, 4 months ago
On Mon, Nov 20, 2017 at 09:57:20PM +0800, Heyi Guo wrote:
> We have found 2 bugs with Linaro Reference Platform bug 3464:
> https://bugs.linaro.org/show_bug.cgi?id=3464
> 1. SAS driver might use uninitialized value which would cause system
> exception;
> 2. LpcSerialPortLib used on D03 will cause SerialDxe initialized with
> failure and exited immediately, which would cause no serial terminal
> in BDS.

Good descriptions in commit messages, thanks.
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Series pushed as bd4078f..0b6df3e

> Patches with binary files can also be found in
> https://github.com/hisilicon/OpenPlatformPkg/commits/rp-osi-bug-v4
> 
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> 
> Heyi Guo (2):
>   Hisilicon/D0x/Sas: fix occasional exception
>   Hisilicon/LpcSerialPortLib: return SUCCESS for SetAttributes
> 
>  Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi                         | Bin 98144 -> 98112 bytes
>  Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi                         | Bin 116288 -> 112832 bytes
>  Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib | Bin 16942 -> 16950 bytes
>  3 files changed, 0 insertions(+), 0 deletions(-)
> 
> -- 
> 1.9.1
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-non-osi 1/2] Hisilicon/D0x/Sas: fix occasional exception
Posted by Heyi Guo 6 years, 4 months ago
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 <heyi.guo@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-non-osi 2/2] Hisilicon/LpcSerialPortLib: return SUCCESS for SetAttributes
Posted by Heyi Guo 6 years, 4 months ago
After EDK2 upgrades to 91cc526, SerialDxe will exit immediately if
SerialPortLib.SetAttributes returns error, and there will be no serial
port terminal in UEFI BDS. Since Hisilicon LPC serial port does not
support setting attributes, we change SerialPortSetAttributes in
LpcSerialPortLib to simply return SUCCESS to get around of this.

The issue can be found in https://bugs.linaro.org/show_bug.cgi?id=3464

It only affects Hisilicon D03 platform since only D03 uses LPC serial
port.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib | Bin 16942 -> 16950 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib b/Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib
index d6ce068..00c5c2f 100644
Binary files a/Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib and b/Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib differ
-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel