linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig
@ 2024-01-10 21:05 Nícolas F. R. A. Prado
  2024-01-10 21:05 ` [PATCH 1/2] pstore/ram: Register to module device table Nícolas F. R. A. Prado
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-01-10 21:05 UTC (permalink / raw)
  To: Kees Cook
  Cc: kernel, AngeloGioacchino Del Regno, Nícolas F. R. A. Prado,
	Arnd Bergmann, Bjorn Andersson, Catalin Marinas,
	Dmitry Baryshkov, Geert Uytterhoeven, Guilherme G. Piccoli,
	Konrad Dybcio, Krzysztof Kozlowski, Marek Szyprowski,
	Neil Armstrong, Tony Luck, Will Deacon, linux-arm-kernel,
	linux-hardening, linux-kernel


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] pstore/ram: Register to module device table
  2024-01-10 21:05 [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig Nícolas F. R. A. Prado
@ 2024-01-10 21:05 ` Nícolas F. R. A. Prado
  2024-01-11 12:11   ` AngeloGioacchino Del Regno
  2024-01-11 18:22   ` Kees Cook
  2024-01-10 21:05 ` [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM Nícolas F. R. A. Prado
  2024-02-01 17:58 ` [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig Kees Cook
  2 siblings, 2 replies; 8+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-01-10 21:05 UTC (permalink / raw)
  To: Kees Cook
  Cc: kernel, AngeloGioacchino Del Regno, Nícolas F. R. A. Prado,
	Guilherme G. Piccoli, Tony Luck, linux-hardening, linux-kernel

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 <nfraprado@collabora.com>
---

 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM
  2024-01-10 21:05 [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig Nícolas F. R. A. Prado
  2024-01-10 21:05 ` [PATCH 1/2] pstore/ram: Register to module device table Nícolas F. R. A. Prado
@ 2024-01-10 21:05 ` Nícolas F. R. A. Prado
  2024-01-11 18:23   ` Kees Cook
  2024-01-11 20:08   ` David
  2024-02-01 17:58 ` [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig Kees Cook
  2 siblings, 2 replies; 8+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-01-10 21:05 UTC (permalink / raw)
  To: Kees Cook
  Cc: kernel, AngeloGioacchino Del Regno, Nícolas F. R. A. Prado,
	Arnd Bergmann, Bjorn Andersson, Catalin Marinas,
	Dmitry Baryshkov, Geert Uytterhoeven, Guilherme G. Piccoli,
	Konrad Dybcio, Krzysztof Kozlowski, Marek Szyprowski,
	Neil Armstrong, Tony Luck, Will Deacon, linux-arm-kernel,
	linux-hardening, linux-kernel

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 <nfraprado@collabora.com>

---

 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] pstore/ram: Register to module device table
  2024-01-10 21:05 ` [PATCH 1/2] pstore/ram: Register to module device table Nícolas F. R. A. Prado
@ 2024-01-11 12:11   ` AngeloGioacchino Del Regno
  2024-01-11 18:22   ` Kees Cook
  1 sibling, 0 replies; 8+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-11 12:11 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Kees Cook
  Cc: kernel, Guilherme G. Piccoli, Tony Luck, linux-hardening, linux-kernel

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 <nfraprado@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] pstore/ram: Register to module device table
  2024-01-10 21:05 ` [PATCH 1/2] pstore/ram: Register to module device table Nícolas F. R. A. Prado
  2024-01-11 12:11   ` AngeloGioacchino Del Regno
@ 2024-01-11 18:22   ` Kees Cook
  1 sibling, 0 replies; 8+ messages in thread
From: Kees Cook @ 2024-01-11 18:22 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: kernel, AngeloGioacchino Del Regno, Guilherme G. Piccoli,
	Tony Luck, linux-hardening, linux-kernel

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 <nfraprado@collabora.com>

Ah-ha! Yeah, good idea.

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM
  2024-01-10 21:05 ` [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM Nícolas F. R. A. Prado
@ 2024-01-11 18:23   ` Kees Cook
  2024-01-11 20:08   ` David
  1 sibling, 0 replies; 8+ messages in thread
From: Kees Cook @ 2024-01-11 18:23 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: kernel, AngeloGioacchino Del Regno, Arnd Bergmann,
	Bjorn Andersson, Catalin Marinas, Dmitry Baryshkov,
	Geert Uytterhoeven, Guilherme G. Piccoli, Konrad Dybcio,
	Krzysztof Kozlowski, Marek Szyprowski, Neil Armstrong, Tony Luck,
	Will Deacon, linux-arm-kernel, linux-hardening, linux-kernel

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 <nfraprado@collabora.com>

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM
  2024-01-10 21:05 ` [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM Nícolas F. R. A. Prado
  2024-01-11 18:23   ` Kees Cook
@ 2024-01-11 20:08   ` David
  1 sibling, 0 replies; 8+ messages in thread
From: David @ 2024-01-11 20:08 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Kees Cook
  Cc: kernel, AngeloGioacchino Del Regno, Arnd Bergmann,
	Bjorn Andersson, Catalin Marinas, Dmitry Baryshkov,
	Geert Uytterhoeven, Guilherme G. Piccoli, Konrad Dybcio,
	Krzysztof Kozlowski, Marek Szyprowski, Neil Armstrong, Tony Luck,
	Will Deacon, linux-arm-kernel, linux-hardening, linux-kernel

Useful stuff!

Reviewed-by: David Heidelberg <david@ixit.cz>

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 <nfraprado@collabora.com>
>
> ---
>
>   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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig
  2024-01-10 21:05 [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig Nícolas F. R. A. Prado
  2024-01-10 21:05 ` [PATCH 1/2] pstore/ram: Register to module device table Nícolas F. R. A. Prado
  2024-01-10 21:05 ` [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM Nícolas F. R. A. Prado
@ 2024-02-01 17:58 ` Kees Cook
  2 siblings, 0 replies; 8+ messages in thread
From: Kees Cook @ 2024-02-01 17:58 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Kees Cook, kernel, AngeloGioacchino Del Regno, Arnd Bergmann,
	Bjorn Andersson, Catalin Marinas, Dmitry Baryshkov,
	Geert Uytterhoeven, Guilherme G. Piccoli, Konrad Dybcio,
	Krzysztof Kozlowski, Marek Szyprowski, Neil Armstrong, Tony Luck,
	Will Deacon, linux-arm-kernel, linux-hardening, linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-01 17:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10 21:05 [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig Nícolas F. R. A. Prado
2024-01-10 21:05 ` [PATCH 1/2] pstore/ram: Register to module device table Nícolas F. R. A. Prado
2024-01-11 12:11   ` AngeloGioacchino Del Regno
2024-01-11 18:22   ` Kees Cook
2024-01-10 21:05 ` [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM Nícolas F. R. A. Prado
2024-01-11 18:23   ` Kees Cook
2024-01-11 20:08   ` David
2024-02-01 17:58 ` [PATCH 0/2] Enable PSTORE_RAM as a module in the arm64 defconfig Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).