audk/MdePkg/Library/BaseLib
Marvin.Haeuser@outlook.com 9062381a8c MdePkg/BaseLib: Update internal LinkedList verifications.
1) Replace InternalBaseLibIsNodeInList() with
   InternalBaseLibIsListValid().
   - The verification whether Node is within the doubly-linked List
     is now done by IsNodeInList().
   - Whether the list is valid is returned.

2) The comments within InsertHeadList() and InsertTailList() stated
   that it is checked whether Entry is not part of the doubly-linked
   list. This was not done as argument 3 of
   InternalBaseLibIsNodeInList() indicated whether the check is done,
   not whether to check if the node is or is not in the list. This
   has been fixed by using IsNodeInList() for the ASSERTs.

V2:
  - Fix IsListEmpty() to ASSERT when the passed list is invalid.
  - Introduce the VERIFY_IS_NODE_IN_LIST() macro to only verify whether the
    passed node is part of the list when PcdVerifyNodeInList is TRUE.

V3:
  - Introduce the ASSERT_VERIFY_NODE_IN_VALID_LIST() macro which,
    depending on the value of PcdVerifyNodeInList, verifies whether
    SecondEntry is or is not part of the same doubly-linked list as
    FirstEntry and unconditionally verifies whether the doubly-linked
    list FirstEntry is part of is valid. This prevents
    InternalBaseLibIsListValid() from being called twice when a
    function ASSERTs via the result of IsNodeInList(), as it calls
    InternalBaseLibIsListValid() already.
  - Remove the VERIFY_IS_NODE_IN_LIST() macro in favor of
    ASSERT_VERIFY_NODE_IN_VALID_LIST().

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-16 16:55:32 +08:00
..
AArch64 MdePkg/BaseLib AARCH64: terminate stack frame list on stack switch 2016-09-09 13:46:52 +01:00
Arm MdePkg: fix ARM version of InternalMathSwapBytes64 () 2015-03-27 17:27:14 +00:00
Ebc
Ia32 MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check. 2016-11-16 16:49:10 +08:00
Ipf Current IPF version SwitchStack implementation uses loadrs instruction to restore dirty partition of register stack from the backing store, but there is no guarantee to make the backing store valid before. So add flushrs before loadrs to make sure backing store valid. 2012-04-11 01:56:48 +00:00
X64 MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check. 2016-11-16 16:49:10 +08:00
ARShiftU64.c
BaseLib.inf MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check. 2016-11-16 16:49:10 +08:00
BaseLib.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseLibInternals.h MdePkg/BaseLib: Add IsNodeInList() function. 2017-08-16 16:55:30 +08:00
BitField.c Correctly character in comments of BaseLib BitField. 2013-07-22 06:41:52 +00:00
CheckSum.c
ChkStkGcc.c
Cpu.c
CpuDeadLoop.c
DivS64x64Remainder.c
DivU64x32.c
DivU64x32Remainder.c
DivU64x64Remainder.c
FilePaths.c MdePkg/BaseLib: Fix PathCleanUpDirectories to correctly handle "\.\" 2016-12-29 09:32:44 +08:00
GetPowerOfTwo32.c
GetPowerOfTwo64.c
HighBitSet32.c
HighBitSet64.c
LRotU32.c
LRotU64.c
LShiftU64.c
LinkedList.c MdePkg/BaseLib: Update internal LinkedList verifications. 2017-08-16 16:55:32 +08:00
LongJump.c
LowBitSet32.c
LowBitSet64.c
Math64.c MdePkg/BaseLib: do not rely on undefined behavior in arithmetic shift 2015-12-31 10:47:22 +00:00
ModU64x32.c
MultS64x64.c
MultU64x32.c
MultU64x64.c
RRotU32.c
RRotU64.c
RShiftU64.c
SafeString.c MdePkg: Convert files to CRLF line ending 2017-04-06 15:43:27 +08:00
SetJump.c
String.c MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
SwapBytes16.c
SwapBytes32.c
SwapBytes64.c
SwitchStack.c
Unaligned.c
X86DisablePaging32.c
X86DisablePaging64.c
X86EnablePaging32.c
X86EnablePaging64.c
X86FxRestore.c Fix memory out of band access in AsmFxSave() and AsmFxRestore(). 2012-10-30 08:35:08 +00:00
X86FxSave.c Fix memory out of band access in AsmFxSave() and AsmFxRestore(). 2012-10-30 08:35:08 +00:00
X86GetInterruptState.c
X86MemoryFence.c
X86Msr.c Add ASSERT() for BitField operations to make sure the input value is valid. 2012-12-25 02:25:50 +00:00
X86RdRand.c MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check. 2016-11-16 16:49:10 +08:00
X86ReadGdtr.c
X86ReadIdtr.c
X86Thunk.c Update the modifier of ThunkContext parameter for AsmPrepareThunk16() in BaseLib from OUT to IN OUT. 2012-02-27 07:46:04 +00:00
X86WriteGdtr.c
X86WriteIdtr.c