forked from Minki/linux
A handful of EFI changes for this cycle:
- EFI CPER parsing improvements, - Don't take the address of efi_guid_t internal fields Signed-off-by: Ingo Molnar <mingo@kernel.org> -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmEsriERHG1pbmdvQGtl cm5lbC5vcmcACgkQEnMQ0APhK1gWvg//blkr3GX+fg8pLUi8E5xDY8VyGR/4Xu1P 2bfqHrxpKPcfuGv2gwUc6smo6PDOT+080Gd2gRCesiJMaUYDr7bKucGMSwMOoLYp wIylZtune/QLukCs90LXZ+SiLH2uVUnvgC9sqQ6l5auW2bXnki0UT+jU1BThpZxc K4l+FHVGqSndeVcnEc+PwvDLuMbuapMzZAf1aB8Q4n7vfUzIz+FDoFckKhDXiLPr nojU2Lw5W4CDDiBe9y3c5O8eJl7Fei1m61P1AAdFExDvzAE/B6qf1m+//4+Yj7K+ igHFCPrHWgHK1CPrfnfera/vfY1W4aCutcwtfwPCbnZSaP6NEYuutd7BURfYHmsd Dwt8zplfWX+p9haFHrrmJ8NMHqpRxaATQA7FLIrwPMb6Io7koGrCoJqNtO59G4P5 nDYQDikICUj+mKS+cdiFrBQAK9MXPIsm8B7BzmhFFPcdnP7627BbYcMiRNm91Tdv 7tUPuw5+A5ERcLd+JnvXHBrA45ZSTb4uHmzcMFGji8YqU/WrxQwpvKfQdRnDedBZ yYl/5aqgAL51LHBC9x4+mfsOplM2dUfMuHxWR0CsHAbKvW1GRNeobyWg6cWOSLIp 80rllvrkoFv3Y4DCE5vh4ShxFypMfgQtxkKrL9pjKYiAlpboN7bC3At96Dh0u5ZU MFyrdUz+5Xo= =nD2k -----END PGP SIGNATURE----- Merge tag 'efi-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "A handful of EFI changes for this cycle: - EFI CPER parsing improvements - Don't take the address of efi_guid_t internal fields" * tag 'efi-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: cper: check section header more appropriately efi: Don't use knowledge about efi_guid_t internals efi: cper: fix scnprintf() use in cper_mem_err_location()
This commit is contained in:
commit
46f4945e2b
@ -221,7 +221,7 @@ static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
len = CPER_REC_LEN - 1;
|
len = CPER_REC_LEN;
|
||||||
if (mem->validation_bits & CPER_MEM_VALID_NODE)
|
if (mem->validation_bits & CPER_MEM_VALID_NODE)
|
||||||
n += scnprintf(msg + n, len - n, "node: %d ", mem->node);
|
n += scnprintf(msg + n, len - n, "node: %d ", mem->node);
|
||||||
if (mem->validation_bits & CPER_MEM_VALID_CARD)
|
if (mem->validation_bits & CPER_MEM_VALID_CARD)
|
||||||
@ -258,13 +258,12 @@ static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg)
|
|||||||
n += scnprintf(msg + n, len - n, "responder_id: 0x%016llx ",
|
n += scnprintf(msg + n, len - n, "responder_id: 0x%016llx ",
|
||||||
mem->responder_id);
|
mem->responder_id);
|
||||||
if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID)
|
if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID)
|
||||||
scnprintf(msg + n, len - n, "target_id: 0x%016llx ",
|
n += scnprintf(msg + n, len - n, "target_id: 0x%016llx ",
|
||||||
mem->target_id);
|
mem->target_id);
|
||||||
if (mem->validation_bits & CPER_MEM_VALID_CHIP_ID)
|
if (mem->validation_bits & CPER_MEM_VALID_CHIP_ID)
|
||||||
scnprintf(msg + n, len - n, "chip_id: %d ",
|
n += scnprintf(msg + n, len - n, "chip_id: %d ",
|
||||||
mem->extended >> CPER_MEM_CHIP_ID_SHIFT);
|
mem->extended >> CPER_MEM_CHIP_ID_SHIFT);
|
||||||
|
|
||||||
msg[n] = '\0';
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -633,7 +632,7 @@ int cper_estatus_check(const struct acpi_hest_generic_status *estatus)
|
|||||||
data_len = estatus->data_length;
|
data_len = estatus->data_length;
|
||||||
|
|
||||||
apei_estatus_for_each_section(estatus, gdata) {
|
apei_estatus_for_each_section(estatus, gdata) {
|
||||||
if (sizeof(struct acpi_hest_generic_data) > data_len)
|
if (acpi_hest_get_size(gdata) > data_len)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
record_size = acpi_hest_get_record_size(gdata);
|
record_size = acpi_hest_get_record_size(gdata);
|
||||||
|
@ -55,7 +55,7 @@ int __init parse_efi_signature_list(
|
|||||||
memcpy(&list, data, sizeof(list));
|
memcpy(&list, data, sizeof(list));
|
||||||
pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n",
|
pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n",
|
||||||
offs,
|
offs,
|
||||||
list.signature_type.b, list.signature_list_size,
|
&list.signature_type, list.signature_list_size,
|
||||||
list.signature_header_size, list.signature_size);
|
list.signature_header_size, list.signature_size);
|
||||||
|
|
||||||
lsize = list.signature_list_size;
|
lsize = list.signature_list_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user