audk/MdePkg
Marvin Häuser 836042ffd8 MdePkg/Base.h: Introduce various alignment-related macros
ALIGNOF: Determining the alignment requirement of data types is
crucial to ensure safe memory accesses when parsing untrusted data.

IS_POW2: Determining whether a value is a power of two is important
to verify whether untrusted values are valid alignment values.

IS_ALIGNED: In combination with ALIGNOF data offsets can be verified.
A more general version of the IS_ALIGNED macro previously defined by
several modules.

ADDRESS_IS_ALIGNED: Variant of IS_ALIGNED for pointers and addresses.
Replaces module-specific definitions throughout the code base.

ALIGN_VALUE_ADDEND: The addend to align up can be used to directly
determine the required offset for data alignment.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2023-04-01 23:11:44 +00:00
..
Include MdePkg/Base.h: Introduce various alignment-related macros 2023-04-01 23:11:44 +00:00
Library MdePkg/BaseRngLib AARCH64: Make asm files BTI compatible 2023-03-30 11:05:22 +00:00
Test MdePkg/Test: Add port of BaseSafeIntLib unit tests to GoogleTest 2022-11-11 05:46:51 +00:00
MdeLibs.dsc.inc MdePkg/ArmTrngLib: Add NULL instance of Arm TRNG Library 2022-11-06 16:32:28 +00:00
MdePkg.ci.yaml MdePkg: Add Acpi65.h to IgnoreFiles area 2023-01-31 02:27:58 +00:00
MdePkg.dec MdePkg/Include: Add IPMI KCS definitions 2023-03-26 18:15:27 +00:00
MdePkg.dsc MdePkg: Add BaseRiscVSbiLib Library for RISC-V 2023-02-16 05:53:28 +00:00
MdePkg.uni MdePkg: Add PcdSpeculationBarrierType 2019-04-30 16:39:09 -07:00
MdePkgExtra.uni MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00