audk/MdeModulePkg
Ma, Hua 79f2734e5a MdeModulePkg: Add a check for metadata size in NvmExpress Driver
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3856

Currently this NvmeExpress Driver do not support metadata handling.
According to the NVME specs, metadata may be transferred to the host after
the logical block data. It can overrun the input buffer which may only
be the size of logical block data.

Add a check to return not support for the namespaces formatted with
metadata.

v2 changes:
 - Change debug log level from INFO to ERROR
 - Change to if (NamespaceData->LbaFormat[LbaFmtIdx].Ms != 0)

v1: https://edk2.groups.io/g/devel/message/87242

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>

Signed-off-by: Hua Ma <hua.ma@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
2022-03-07 01:55:41 +00:00
..
Application MdeModulePkg/UiApp: Fix spelling of 'FRONTPAGE' 2022-02-07 08:03:32 +00:00
Bus MdeModulePkg: Add a check for metadata size in NvmExpress Driver 2022-03-07 01:55:41 +00:00
Core MdeModulePkg/RuntimeDxe: clear mVirtualMapMaxIndex 2022-02-07 05:31:17 +00:00
Include MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Library edk2/MdeModulePkg/Debuglib: Add Standalone MM support 2022-03-02 02:34:00 +00:00
Logo MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Test MdeModulePkg/UefiSortLib:Add UefiSortLib unit test 2021-08-12 08:34:04 +00:00
Universal MdeModulePkg/GraphicsConsoleDxe: Check status to make sure no error 2022-03-03 05:17:46 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Update YAML to ignore specific ECC files/errors 2021-11-30 14:19:07 +00:00
MdeModulePkg.dec MdeModulePkg/FPDT: Lock boot performance table address variable at EndOfDxe 2021-11-12 07:36:23 +00:00
MdeModulePkg.dsc MdeModulePkg: Add BootDiscoveryPolicyUiLib. 2021-08-03 04:59:12 +00:00
MdeModulePkg.uni MdeModulePkg: Fix various typos 2021-05-17 02:10:31 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00