mirror of https://github.com/acidanthera/audk.git
f1f7190bf3
DXE performance gauge record access functions might be reentered since we are supporting something like USB hot-plug, which is a timer event where gBS->ConnectController might be called and then PERF will be called in CoreConnectSingleController. When StartGaugeEx is being reentered, not only the gauge record might be overwritten, more serious situation will be caused if gauge data buffer reallocation procedure is interrupted, between line 180 and 187 in DxeCorePerformanceLib.c specifically. There, mMaxGaugeRecords will be doubled twice (denoted as 4X), but mGaugeData only points to a buffer of size 2X, which will probably cause the following 2X memory to be overflowed when gauge records are increased. So we add EFI lock with TPL_NOTIFY in StartGaugeEx/EndGaugeEx/GetGaugeEx to avoid memory overflow and gauge data corruption. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> |
||
---|---|---|
.. | ||
AuthVariableLibNull | ||
BaseIpmiLibNull | ||
BasePlatformHookLibNull | ||
BaseResetSystemLibNull | ||
BaseSerialPortLib16550 | ||
BaseSortLib | ||
BootLogoLib | ||
BootMaintenanceManagerUiLib | ||
BootManagerUiLib | ||
BrotliCustomDecompressLib | ||
CpuExceptionHandlerLibNull | ||
CustomizedDisplayLib | ||
DebugAgentLibNull | ||
DeviceManagerUiLib | ||
DxeCapsuleLibFmp | ||
DxeCapsuleLibNull | ||
DxeCoreMemoryAllocationLib | ||
DxeCorePerformanceLib | ||
DxeCrc32GuidedSectionExtractLib | ||
DxeDebugPrintErrorLevelLib | ||
DxeDpcLib | ||
DxeFileExplorerProtocol | ||
DxeHttpLib | ||
DxeIpIoLib | ||
DxeIpmiLibIpmiProtocol | ||
DxeNetLib | ||
DxePerformanceLib | ||
DxePrintLibPrint2Protocol | ||
DxeReportStatusCodeLib | ||
DxeSecurityManagementLib | ||
DxeSmmPerformanceLib | ||
DxeTcpIoLib | ||
DxeUdpIoLib | ||
FileExplorerLib | ||
FmpAuthenticationLibNull | ||
FrameBufferBltLib | ||
LockBoxNullLib | ||
LzmaCustomDecompressLib | ||
NonDiscoverableDeviceRegistrationLib | ||
OemHookStatusCodeLibNull | ||
PciHostBridgeLibNull | ||
PeiCrc32GuidedSectionExtractLib | ||
PeiDebugPrintHobLib | ||
PeiDxeDebugLibReportStatusCode | ||
PeiIpmiLibIpmiPpi | ||
PeiPerformanceLib | ||
PeiRecoveryLibNull | ||
PeiReportStatusCodeLib | ||
PeiS3LibNull | ||
PiDxeS3BootScriptLib | ||
PiSmmCoreMemoryAllocationLib | ||
PiSmmCoreSmmServicesTableLib | ||
PlatformBootManagerLibNull | ||
PlatformHookLibSerialPortPpi | ||
PlatformVarCleanupLib | ||
RuntimeDxeReportStatusCodeLib | ||
SmmCorePerformanceLib | ||
SmmCorePlatformHookLibNull | ||
SmmIpmiLibSmmIpmiProtocol | ||
SmmLockBoxLib | ||
SmmMemoryAllocationProfileLib | ||
SmmPerformanceLib | ||
SmmReportStatusCodeLib | ||
SmmSmiHandlerProfileLib | ||
TpmMeasurementLibNull | ||
UefiBootManagerLib | ||
UefiHiiLib | ||
UefiHiiServicesLib | ||
UefiMemoryAllocationProfileLib | ||
UefiSortLib | ||
VarCheckHiiLib | ||
VarCheckLib | ||
VarCheckPcdLib | ||
VarCheckUefiLib |