• Jessica Clarke's avatar
    ACPICA: Use original data_table_region pointer for accesses · ca25f92b
    Jessica Clarke authored
    ACPICA commit d9eb82bd7515989f0b29d79deeeb758db4d6529c
    
    Currently the pointer to the table is cast to acpi_physical_address and
    later cast back to a pointer to be dereferenced. Whether or not this is
    supported is implementation-defined.
    
    On CHERI, and thus Arm's experimental Morello prototype architecture,
    pointers are represented as capabilities, which are unforgeable bounded
    pointers, providing always-on fine-grained spatial memory safety. This
    means that any pointer cast to a plain integer will lose all its
    associated metadata, and when cast back to a pointer it will give a
    null-derived pointer (one that has the same metadata as null but an
    address equal to the integer) that will trap on any dereference. As a
    result, this is an implementation where acpi_physical_address cannot be
    used as a hack to store real pointers.
    
    Thus, add a new field to struct acpi_object_region to store the pointer for
    table regions, and propagate it to acpi_ex_data_table_space_handler via the
    region context, to use a more portable implementation that supports
    CHERI.
    
    Link: https://github.com/acpica/acpica/commit/d9eb82bdSigned-off-by: default avatarBob Moore <robert.moore@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    ca25f92b
evrgnini.c 17.5 KB