| Lorenz Brun | d1f82e9 | 2024-02-08 19:27:46 +0100 | [diff] [blame] | 1 | This enables pstore for userspace messages for the ACPI ERST as well as the |
| 2 | EFI variable pstore backend, both of which are expected to be used frequently |
| 3 | with Metropolis. We need that to reliably store panics of core processes |
| 4 | regardless of the system state. This is not enabled upstream, either because |
| 5 | pmsg was a later addition to pstore or for concerns of accidentally running |
| 6 | out of pstore space. We work around the limited space issue by always clearing |
| 7 | pstore after every boot, so this poses little extra risk to us. |
| 8 | |
| 9 | diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c |
| 10 | index bf65e3461531..fe2c331b4b99 100644 |
| 11 | --- a/drivers/acpi/apei/erst.c |
| 12 | +++ b/drivers/acpi/apei/erst.c |
| 13 | @@ -1022,7 +1022,7 @@ static int erst_clearer(struct pstore_record *record); |
| 14 | static struct pstore_info erst_info = { |
| 15 | .owner = THIS_MODULE, |
| 16 | .name = "erst", |
| 17 | - .flags = PSTORE_FLAGS_DMESG, |
| 18 | + .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG, |
| 19 | .open = erst_open_pstore, |
| 20 | .close = erst_close_pstore, |
| 21 | .read = erst_reader, |
| 22 | diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c |
| 23 | index e7b9ec6f8a86..7570499b46e0 100644 |
| 24 | --- a/drivers/firmware/efi/efi-pstore.c |
| 25 | +++ b/drivers/firmware/efi/efi-pstore.c |
| 26 | @@ -210,7 +210,7 @@ static int efi_pstore_erase(struct pstore_record *record) |
| 27 | static struct pstore_info efi_pstore_info = { |
| 28 | .owner = THIS_MODULE, |
| 29 | .name = KBUILD_MODNAME, |
| 30 | - .flags = PSTORE_FLAGS_DMESG, |
| 31 | + .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG, |
| 32 | .open = efi_pstore_open, |
| 33 | .close = efi_pstore_close, |
| 34 | .read = efi_pstore_read, |