* [PATCH v2] Documentation/tracing: Mention that RESET_ATTACK_MITIGATION can clear memory
@ 2024-10-01 13:57 Steven Rostedt
2024-10-04 23:38 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2024-10-01 13:57 UTC (permalink / raw)
To: LKML, Linux Trace Kernel, linux-doc
Cc: Masami Hiramatsu, Mathieu Desnoyers, Jonathan Corbet,
Mike Rapoport, Kees Cook, Ard Biesheuvel, Hans de Goede
From: Steven Rostedt <rostedt@goodmis.org>
At the 2024 Linux Plumbers Conference, I was talking with Hans de Goede
about the persistent buffer to display traces from previous boots. He
mentioned that UEFI can clear memory. In my own tests I have not seen
this. He later informed me that it requires the config option:
CONFIG_RESET_ATTACK_MITIGATION
It appears that setting this will allow the memory to be cleared on boot
up, which will definitely clear out the trace of the previous boot.
Add this information under the trace_instance in kernel-parameters.txt
to let people know that this can cause issues.
Link: https://lore.kernel.org/all/20170825155019.6740-2-ard.biesheuvel@linaro.org/
Reported-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Changes since v1: https://lore.kernel.org/20240926130159.19e6d0e2@rorschach.local.home
- Added more detail explanation that the system may not be able to use
memory to preserve the tracing ring buffer across reboots and use
the CONFIG_RESET_ATTACK_MITIGATION as one example.
Documentation/admin-guide/kernel-parameters.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 1518343bbe22..9881e3b857d0 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6867,6 +6867,12 @@
reserve_mem=12M:4096:trace trace_instance=boot_map^traceoff^traceprintk@trace,sched,irq
+ Note, saving the trace buffer across reboots does require that the system
+ is set up to not wipe memory. For instance, CONFIG_RESET_ATTACK_MITIGATION
+ can force a memory reset on boot which will clear any trace that was stored.
+ This is just one of many ways that can clear memory. Make sure you system
+ keeps the content of memory across reboots before relying on this option.
+
See also Documentation/trace/debugging.rst
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Documentation/tracing: Mention that RESET_ATTACK_MITIGATION can clear memory
2024-10-01 13:57 [PATCH v2] Documentation/tracing: Mention that RESET_ATTACK_MITIGATION can clear memory Steven Rostedt
@ 2024-10-04 23:38 ` Steven Rostedt
2024-10-07 17:06 ` Jonathan Corbet
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2024-10-04 23:38 UTC (permalink / raw)
To: LKML, Linux Trace Kernel, linux-doc, Jonathan Corbet
Cc: Masami Hiramatsu, Mathieu Desnoyers, Mike Rapoport, Kees Cook,
Ard Biesheuvel, Hans de Goede
Jon,
This version should be good to go.
Thanks,
-- Steve
On Tue, 1 Oct 2024 09:57:34 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> At the 2024 Linux Plumbers Conference, I was talking with Hans de Goede
> about the persistent buffer to display traces from previous boots. He
> mentioned that UEFI can clear memory. In my own tests I have not seen
> this. He later informed me that it requires the config option:
>
> CONFIG_RESET_ATTACK_MITIGATION
>
> It appears that setting this will allow the memory to be cleared on boot
> up, which will definitely clear out the trace of the previous boot.
>
> Add this information under the trace_instance in kernel-parameters.txt
> to let people know that this can cause issues.
>
> Link: https://lore.kernel.org/all/20170825155019.6740-2-ard.biesheuvel@linaro.org/
>
> Reported-by: Hans de Goede <hdegoede@redhat.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> Changes since v1: https://lore.kernel.org/20240926130159.19e6d0e2@rorschach.local.home
>
> - Added more detail explanation that the system may not be able to use
> memory to preserve the tracing ring buffer across reboots and use
> the CONFIG_RESET_ATTACK_MITIGATION as one example.
>
> Documentation/admin-guide/kernel-parameters.txt | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 1518343bbe22..9881e3b857d0 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -6867,6 +6867,12 @@
>
> reserve_mem=12M:4096:trace trace_instance=boot_map^traceoff^traceprintk@trace,sched,irq
>
> + Note, saving the trace buffer across reboots does require that the system
> + is set up to not wipe memory. For instance, CONFIG_RESET_ATTACK_MITIGATION
> + can force a memory reset on boot which will clear any trace that was stored.
> + This is just one of many ways that can clear memory. Make sure you system
> + keeps the content of memory across reboots before relying on this option.
> +
> See also Documentation/trace/debugging.rst
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Documentation/tracing: Mention that RESET_ATTACK_MITIGATION can clear memory
2024-10-04 23:38 ` Steven Rostedt
@ 2024-10-07 17:06 ` Jonathan Corbet
2024-10-07 17:08 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Corbet @ 2024-10-07 17:06 UTC (permalink / raw)
To: Steven Rostedt, LKML, Linux Trace Kernel, linux-doc
Cc: Masami Hiramatsu, Mathieu Desnoyers, Mike Rapoport, Kees Cook,
Ard Biesheuvel, Hans de Goede
Steven Rostedt <rostedt@goodmis.org> writes:
> Jon,
>
> This version should be good to go.
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Documentation/tracing: Mention that RESET_ATTACK_MITIGATION can clear memory
2024-10-07 17:06 ` Jonathan Corbet
@ 2024-10-07 17:08 ` Steven Rostedt
2024-10-07 17:37 ` Jonathan Corbet
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2024-10-07 17:08 UTC (permalink / raw)
To: Jonathan Corbet
Cc: LKML, Linux Trace Kernel, linux-doc, Masami Hiramatsu,
Mathieu Desnoyers, Mike Rapoport, Kees Cook, Ard Biesheuvel,
Hans de Goede
On Mon, 07 Oct 2024 11:06:06 -0600
Jonathan Corbet <corbet@lwn.net> wrote:
> Steven Rostedt <rostedt@goodmis.org> writes:
>
> > Jon,
> >
> > This version should be good to go.
>
> Applied, thanks.
And I now see I sent an older version that had a typo in it :-p
+ Note, saving the trace buffer across reboots does require that the system
+ is set up to not wipe memory. For instance, CONFIG_RESET_ATTACK_MITIGATION
+ can force a memory reset on boot which will clear any trace that was stored.
+ This is just one of many ways that can clear memory. Make sure you system
your system
+ keeps the content of memory across reboots before relying on this option.
+
I can send a v3.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Documentation/tracing: Mention that RESET_ATTACK_MITIGATION can clear memory
2024-10-07 17:08 ` Steven Rostedt
@ 2024-10-07 17:37 ` Jonathan Corbet
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2024-10-07 17:37 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Linux Trace Kernel, linux-doc, Masami Hiramatsu,
Mathieu Desnoyers, Mike Rapoport, Kees Cook, Ard Biesheuvel,
Hans de Goede
Steven Rostedt <rostedt@goodmis.org> writes:
> On Mon, 07 Oct 2024 11:06:06 -0600
> Jonathan Corbet <corbet@lwn.net> wrote:
>
>> Steven Rostedt <rostedt@goodmis.org> writes:
>>
>> > Jon,
>> >
>> > This version should be good to go.
>>
>> Applied, thanks.
>
> And I now see I sent an older version that had a typo in it :-p
>
>
> + Note, saving the trace buffer across reboots does require that the system
> + is set up to not wipe memory. For instance, CONFIG_RESET_ATTACK_MITIGATION
> + can force a memory reset on boot which will clear any trace that was stored.
> + This is just one of many ways that can clear memory. Make sure you system
>
> your system
>
> + keeps the content of memory across reboots before relying on this option.
> +
>
> I can send a v3.
*Grumble... :)
I haven't pushed out my tree yet, so I can replace the other one.
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-07 17:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 13:57 [PATCH v2] Documentation/tracing: Mention that RESET_ATTACK_MITIGATION can clear memory Steven Rostedt
2024-10-04 23:38 ` Steven Rostedt
2024-10-07 17:06 ` Jonathan Corbet
2024-10-07 17:08 ` Steven Rostedt
2024-10-07 17:37 ` Jonathan Corbet
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).