diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2019-06-28 12:49:52 -0700 |
---|---|---|
committer | Michael D Kinney <michael.d.kinney@intel.com> | 2019-08-02 16:40:34 -0700 |
commit | afebc51547082faa080b3a5e7d5cb2e5a3cd1532 (patch) | |
tree | 6ee5ab4f25a668ddda582912060c366a3bb6cee0 /MdeModulePkg/Core | |
parent | 89164babecceb03047c4aec8e76c4d838d703095 (diff) | |
download | edk2-afebc51547082faa080b3a5e7d5cb2e5a3cd1532.zip edk2-afebc51547082faa080b3a5e7d5cb2e5a3cd1532.tar.gz edk2-afebc51547082faa080b3a5e7d5cb2e5a3cd1532.tar.bz2 |
MdeModulePkg/PiSmmCore: Use unique structure signatures
https://bugzilla.tianocore.org/show_bug.cgi?id=1948
Update the data structure signatures in the PiSmmCore
to be unique. Some of the signatures are the same as those
used by the DxeCore. For example, the memory pool head and
tail structures use the same signature in the PiSmmCore
and DxeCore. This means the use of the wrong FreePool API
will not be noticed at the time FreePool is called and a
failure can occur much later. By making the signatures
unique, misuse of an API is caught at that time the API is
called.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h index da01a1f..0908e7f 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h @@ -2,7 +2,7 @@ The internal header file includes the common header files, defines
internal structure and functions used by SmmCore module.
- Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -140,7 +140,7 @@ typedef struct { EFI_LOADED_IMAGE_PROTOCOL SmmLoadedImage;
} EFI_SMM_DRIVER_ENTRY;
-#define EFI_HANDLE_SIGNATURE SIGNATURE_32('h','n','d','l')
+#define EFI_HANDLE_SIGNATURE SIGNATURE_32('s','h','d','l')
///
/// IHANDLE - contains a list of protocol handles
@@ -156,7 +156,7 @@ typedef struct { #define ASSERT_IS_HANDLE(a) ASSERT((a)->Signature == EFI_HANDLE_SIGNATURE)
-#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('p','r','t','e')
+#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('s','p','t','e')
///
/// PROTOCOL_ENTRY - each different protocol has 1 entry in the protocol
@@ -175,7 +175,7 @@ typedef struct { LIST_ENTRY Notify;
} PROTOCOL_ENTRY;
-#define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('p','i','f','c')
+#define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('s','p','i','f')
///
/// PROTOCOL_INTERFACE - each protocol installed on a handle is tracked
@@ -195,7 +195,7 @@ typedef struct { VOID *Interface;
} PROTOCOL_INTERFACE;
-#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('p','r','t','n')
+#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('s','p','t','n')
///
/// PROTOCOL_NOTIFY - used for each register notification for a protocol
@@ -1245,7 +1245,7 @@ extern LIST_ENTRY mSmmMemoryMap; //
#define MAX_POOL_INDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1)
-#define POOL_HEAD_SIGNATURE SIGNATURE_32('p','h','d','0')
+#define POOL_HEAD_SIGNATURE SIGNATURE_32('s','p','h','d')
typedef struct {
UINT32 Signature;
@@ -1254,7 +1254,7 @@ typedef struct { UINTN Size;
} POOL_HEADER;
-#define POOL_TAIL_SIGNATURE SIGNATURE_32('p','t','a','l')
+#define POOL_TAIL_SIGNATURE SIGNATURE_32('s','p','t','l')
typedef struct {
UINT32 Signature;
|