[edk2-devel] [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable

Marvin Häuser posted 7 patches 2 years, 8 months ago
Failed in applying to current master (apply log)
ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c |  7 +-
EmbeddedPkg/GdbStub/GdbStub.c                                           |  7 +-
MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c                             | 82 +++++++++++++-------
3 files changed, 60 insertions(+), 36 deletions(-)
[edk2-devel] [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable
Posted by Marvin Häuser 2 years, 8 months ago
There are various issues regarding DebugImageInfoTable:
1) Interrupting the table updates (e.g. an exception occured) may
leave the table in an inconsistent state.
2) Deleting an entry from the table may hide a different entry.
3) The type of image entries is not checked before accessing them as
NormalImage. This is practically safe now, because there is only one
type, but it adding more types would cause the accesses to
potentially invoke Undefined Behaviour.
4) The guarantees the table gives are not clear. For example, the
LoadedImage protocol instance can never be NULL (and wouldn't make
sense to be either), yet it is checked in some places, but not in
others.

This patch series addresses all of these issues.

Marvin Häuser (7):
  MdeModulePkg/DxeCore: Consistent DebugImageInfoTable updates
  MdeModulePkg/DxeCore: Fix DebugImageInfoTable size report
  EmbeddedPkg/GdbStub: Check DebugImageInfoTable type safely
  ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type
    safely
  MdeModulePkg/CoreDxe: Mandatory LoadedImage for DebugImageInfoTable
  EmbeddedPkg/GdbStub: Mandatory LoadedImage for DebugImageInfoTable
  ArmPkg/DefaultExceptionHandlerLib: Mandatory LoadedImage for
    DebugImageInfoTable

 ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c |  7 +-
 EmbeddedPkg/GdbStub/GdbStub.c                                           |  7 +-
 MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c                             | 82 +++++++++++++-------
 3 files changed, 60 insertions(+), 36 deletions(-)

-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78936): https://edk2.groups.io/g/devel/message/78936
Mute This Topic: https://groups.io/mt/84764899/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-