linux-stable/drivers/acpi/apei
James Morse e00a6e3392 ACPI / APEI: Split ghes_read_estatus() to allow a peek at the CPER length
ghes_read_estatus() reads the record address, then the record's
header, then performs some sanity checks before reading the
records into the provided estatus buffer.

To provide this estatus buffer the caller must know the size of the
records in advance, or always provide a worst-case sized buffer as
happens today for the non-NMI notifications.

Add a function to peek at the record's header to find the size. This
will let the NMI path allocate the right amount of memory before reading
the records, instead of using the worst-case size, and having to copy
the records.

Split ghes_read_estatus() to create __ghes_peek_estatus() which
returns the address and size of the CPER records.

Signed-off-by: James Morse <james.morse@arm.com>

Changes since v7:
 * Grammar
 * concistent argument ordering

Changes since v6:
 * Additional buf_addr = 0 error handling
 * Moved checking out of peek-estatus
 * Reworded an error message so we can tell them apart
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-07 23:10:45 +01:00
..
apei-base.c ACPI / APEI: Fix leaked resources 2016-03-11 00:13:25 +01:00
apei-internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bert.c ACPI: APEI: Fix BERT resources conflict with ACPI NVS area 2017-02-27 22:53:11 +01:00
einj.c ACPI: APEI: EINJ: Use DEFINE_DEBUGFS_ATTRIBUTE for debugfs files 2019-01-14 11:55:45 +01:00
erst-dbg.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
erst.c APEI / ERST: Switch to use new generic UUID API 2019-01-14 11:23:51 +01:00
ghes.c ACPI / APEI: Split ghes_read_estatus() to allow a peek at the CPER length 2019-02-07 23:10:45 +01:00
hest.c ACPI / APEI: Make estatus pool allocation a static size 2019-02-07 23:10:45 +01:00
Kconfig ACPI / APEI: Switch NOTIFY_SEA to use the estatus queue 2019-02-07 23:10:45 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00