audk/MdeModulePkg
Hao Wu bd224a5dad MdeModulePkg/NvmExpressPei: Refine data buffer & len check in PassThru
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1142

The fix is similar to commit ebb6c7633b.
We found that a similar fix should be applied to the NVMe PEI driver as
well. Hence, this one is for the PEI counterpart driver.

According to the the NVM Express spec Revision 1.1, for some commands
(like Get/Set Feature Command, Figure 89 & 90 of the spec), the Memory
Buffer maybe optional although the command opcode indicates there is a
data transfer between host & controller (Get/Set Feature Command, Figure
38 of the spec).

Hence, this commit refine the checks for the 'TransferLength' and
'TransferBuffer' field of the
EDKII_PEI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET structure to address this
issue.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <Jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
2018-11-13 20:54:44 +08:00
..
Application MdeModulePkg CapsuleApp:Remove two redundant Guids 2018-09-21 11:34:42 +08:00
Bus MdeModulePkg/NvmExpressPei: Refine data buffer & len check in PassThru 2018-11-13 20:54:44 +08:00
Core MdeModulePkg/Core: fix ineffective guard page issue 2018-11-07 23:08:27 +08:00
Include MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Library MdeModulePkg BrotliDecompressLib: Add the checker to avoid array out of bound 2018-10-19 08:21:47 +08:00
Logo MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Universal Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos" 2018-11-11 11:42:36 +08:00
MdeModulePkg.dec MdeModulePkg: introduce UEFI freed-memory guard bit in HeapGuard PCD 2018-10-26 10:27:20 +08:00
MdeModulePkg.dsc MdeModulePkg BrotliCustomDecompressLib: Don't build it for EBC arch 2018-10-15 15:55:55 +08:00
MdeModulePkg.uni MdeModulePkg: introduce UEFI freed-memory guard bit in HeapGuard PCD 2018-10-26 10:27:20 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00