2024-01-10 21:08:21

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig


This series enables the PSTORE_RAM config, aka the ramoops driver, in
the defconfig.


Nícolas F. R. A. Prado (2):
pstore/ram: Register to module device table
arm64: defconfig: Enable PSTORE_RAM

arch/arm64/configs/defconfig | 1 +
fs/pstore/ram.c | 1 +
2 files changed, 2 insertions(+)

--
2.43.0



2024-01-10 21:08:36

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH 1/2] pstore/ram: Register to module device table

Register the compatible for this module on the module device table so
it can be automatically loaded when a matching DT node is present,
allowing logging of panics and oopses without any intervention.

Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---

fs/pstore/ram.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 88b34fdbf759..b1a455f42e93 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -893,6 +893,7 @@ static const struct of_device_id dt_match[] = {
{ .compatible = "ramoops" },
{}
};
+MODULE_DEVICE_TABLE(of, dt_match);

static struct platform_driver ramoops_driver = {
.probe = ramoops_probe,
--
2.43.0


2024-01-10 21:09:06

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM

Enable PSTORE_RAM, that is the ramoops driver, in the defconfig, to
allow logging and retrieving panics and oopses to/from RAM automatically
for platforms that have a ramoops reserved memory node in DT.

Signed-off-by: Nícolas F. R. A. Prado <[email protected]>

---

arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index d48659217bb4..0b0ef6877a12 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1589,6 +1589,7 @@ CONFIG_HUGETLBFS=y
CONFIG_CONFIGFS_FS=y
CONFIG_EFIVAR_FS=y
CONFIG_SQUASHFS=y
+CONFIG_PSTORE_RAM=m
CONFIG_NFS_FS=y
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
--
2.43.0


Subject: Re: [PATCH 1/2] pstore/ram: Register to module device table

Il 10/01/24 22:05, Nícolas F. R. A. Prado ha scritto:
> Register the compatible for this module on the module device table so
> it can be automatically loaded when a matching DT node is present,
> allowing logging of panics and oopses without any intervention.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>



2024-01-11 18:22:25

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH 1/2] pstore/ram: Register to module device table

On Wed, Jan 10, 2024 at 06:05:02PM -0300, N?colas F. R. A. Prado wrote:
> Register the compatible for this module on the module device table so
> it can be automatically loaded when a matching DT node is present,
> allowing logging of panics and oopses without any intervention.
>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>

Ah-ha! Yeah, good idea.

Reviewed-by: Kees Cook <[email protected]>

--
Kees Cook

2024-01-11 18:23:55

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM

On Wed, Jan 10, 2024 at 06:05:03PM -0300, N?colas F. R. A. Prado wrote:
> Enable PSTORE_RAM, that is the ramoops driver, in the defconfig, to
> allow logging and retrieving panics and oopses to/from RAM automatically
> for platforms that have a ramoops reserved memory node in DT.
>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>

ARM maintainers, I can't speak to whether you want this defconfig change
or not, but if you do and pick it up, please feel free to also grab
patch 2.

If you don't want this, I can carry patch 2 in the pstore tree.

-Kees

>
> ---
>
> arch/arm64/configs/defconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index d48659217bb4..0b0ef6877a12 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -1589,6 +1589,7 @@ CONFIG_HUGETLBFS=y
> CONFIG_CONFIGFS_FS=y
> CONFIG_EFIVAR_FS=y
> CONFIG_SQUASHFS=y
> +CONFIG_PSTORE_RAM=m
> CONFIG_NFS_FS=y
> CONFIG_NFS_V4=y
> CONFIG_NFS_V4_1=y
> --
> 2.43.0
>

--
Kees Cook

2024-01-11 20:26:17

by David Heidelberg

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM

Useful stuff!

Reviewed-by: David Heidelberg <[email protected]>

On 10/01/2024 22:05, Nícolas F. R. A. Prado wrote:
> Enable PSTORE_RAM, that is the ramoops driver, in the defconfig, to
> allow logging and retrieving panics and oopses to/from RAM automatically
> for platforms that have a ramoops reserved memory node in DT.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
>
> ---
>
> arch/arm64/configs/defconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index d48659217bb4..0b0ef6877a12 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -1589,6 +1589,7 @@ CONFIG_HUGETLBFS=y
> CONFIG_CONFIGFS_FS=y
> CONFIG_EFIVAR_FS=y
> CONFIG_SQUASHFS=y
> +CONFIG_PSTORE_RAM=m
> CONFIG_NFS_FS=y
> CONFIG_NFS_V4=y
> CONFIG_NFS_V4_1=y

2024-02-01 17:59:23

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig

On Wed, 10 Jan 2024 18:05:01 -0300, Nícolas F. R. A. Prado wrote:
> This series enables the PSTORE_RAM config, aka the ramoops driver, in
> the defconfig.
>
>
> Nícolas F. R. A. Prado (2):
> pstore/ram: Register to module device table
> arm64: defconfig: Enable PSTORE_RAM
>
> [...]

Applied to for-next/pstore, thanks!

[1/2] pstore/ram: Register to module device table
https://git.kernel.org/kees/c/d8c70720ebfd
[2/2] arm64: defconfig: Enable PSTORE_RAM
https://git.kernel.org/kees/c/393bd157dbf8

Take care,

--
Kees Cook