The latest development version of this page may be more current than this released 2.7.5 version.

CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU

Use MPU for null pointer exception detection

Type: bool

Help

Null pointer dereference detection implemented
using MPU functionality.
Notes:
- Mutually exclusive to the DWT-based solution
- Not enabled for Non-Secure FW images, where
null-pointer dereferencing is likely caught as
a SecureFault.
- Requires MPU functionality to be present and
enabled. The implementation consumes 1 MPU region.
- In ARMv8-M, explicit null-pointer dereference
detection with MPU requires, additionally, that
the area: [0x0,
CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE)
is not unmapped (covered by an MPU region already).
If it is unmapped null-pointer dereferencing may
still be idirectly detected (e.g. via a precise
Bus access fault), but this is not guaranteed. A
build-time message warns the user of this scenario.

Direct dependencies

!TRUSTED_EXECUTION_NONSECURE && ARM_MPU && <choice NULL_POINTER_EXCEPTION_DETECTION: Enable and use null-pointer exception>

(Includes any dependencies from ifs and menus.)

Symbols selected by this symbol

Kconfig definition

At arch/arm/core/aarch32/cortex_m/Kconfig:384

Included via Kconfig:8Kconfig.zephyr:39arch/Kconfig:12arch/arm/Kconfig:57arch/arm/core/aarch32/Kconfig:294

Menu path: (Top) → ARM Options → Enable and use null-pointer exception

config NULL_POINTER_EXCEPTION_DETECTION_MPU
    bool "Use MPU for null pointer exception detection"
    select CORTEX_M_NULL_POINTER_EXCEPTION
    depends on !TRUSTED_EXECUTION_NONSECURE && ARM_MPU && <choice NULL_POINTER_EXCEPTION_DETECTION>
    help
      Null pointer dereference detection implemented
      using MPU functionality.
      Notes:
      - Mutually exclusive to the DWT-based solution
      - Not enabled for Non-Secure FW images, where
      null-pointer dereferencing is likely caught as
      a SecureFault.
      - Requires MPU functionality to be present and
      enabled. The implementation consumes 1 MPU region.
      - In ARMv8-M, explicit null-pointer dereference
      detection with MPU requires, additionally, that
      the area: [0x0,
      CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE)
      is not unmapped (covered by an MPU region already).
      If it is unmapped null-pointer dereferencing may
      still be idirectly detected (e.g. via a precise
      Bus access fault), but this is not guaranteed. A
      build-time message warns the user of this scenario.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)