mirror-linux/arch/arc
Masami Hiramatsu (Google) a494d3c8d5 ring-buffer: Flush and stop persistent ring buffer on panic
On real hardware, panic and machine reboot may not flush hardware cache
to memory. This means the persistent ring buffer, which relies on a
coherent state of memory, may not have its events written to the buffer
and they may be lost. Moreover, there may be inconsistency with the
counters which are used for validation of the integrity of the
persistent ring buffer which may cause all data to be discarded.

To avoid this issue, stop recording of the ring buffer on panic and
flush the cache of the ring buffer's memory.

Fixes: e645535a95 ("tracing: Add option to use memmapped memory for trace boot instance")
Cc: stable@vger.kernel.org
Cc: Will Deacon <will@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ian Rogers <irogers@google.com>
Link: https://patch.msgid.link/177751969602.2136606.12031934362587643488.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-05-21 08:20:58 -04:00
..
boot ARC: migrate to the generic rule for built-in DTB 2025-01-18 08:52:09 +09:00
configs Use CONFIG_EXT4_FS instead of CONFIG_EXT3_FS in all of the defconfigs 2025-10-13 21:50:40 -04:00
include ring-buffer: Flush and stop persistent ring buffer on panic 2026-05-21 08:20:58 -04:00
kernel kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
lib ARCv2: memset: don't prefetch for len == 0 which happens a alot 2023-08-17 12:40:26 -07:00
mm arch, mm: consolidate empty_zero_page 2026-04-05 13:53:01 -07:00
net bpf: Pass bpf_verifier_env to JIT 2026-04-16 07:03:40 -07:00
plat-axs10x arc: axs10x: drop unneeded dependency on OF_GPIO 2026-03-13 14:42:52 +01:00
plat-hsdk arc: Replace lkml.org links with lore 2021-12-28 19:48:49 -08:00
plat-sim ARC: merge HAPS-HS with nSIM-HS configs 2019-10-28 12:12:31 -07:00
plat-tb10x
Kbuild ARC: Add eBPF JIT support 2024-05-12 16:51:36 -07:00
Kconfig ARC: Always use SWAPE instructions for __arch_swab32() 2026-01-30 16:46:17 +01:00
Kconfig.debug
Makefile ARC: Always use SWAPE instructions for __arch_swab32() 2026-01-30 16:46:17 +01:00