• James Morse's avatar
    ACPI / APEI: Switch estatus pool to use vmalloc memory · 0ac234be
    James Morse authored
    The ghes code is careful to parse and round firmware's advertised
    memory requirements for CPER records, up to a maximum of 64K.
    However when ghes_estatus_pool_expand() does its work, it splits
    the requested size into PAGE_SIZE granules.
    
    This means if firmware generates 5K of CPER records, and correctly
    describes this in the table, __process_error() will silently fail as it
    is unable to allocate more than PAGE_SIZE.
    
    Switch the estatus pool to vmalloc() memory. On x86 vmalloc() memory
    may fault and be fixed up by vmalloc_fault(). To prevent this call
    vmalloc_sync_all() before an NMI handler could discover the memory.
    Signed-off-by: default avatarJames Morse <james.morse@arm.com>
    Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    0ac234be
ghes.c 32.1 KB