Linux Trace Kernel
 help / color / mirror / Atom feed
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
To: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Cc: Kees Cook <kees@kernel.org>, Mark Rutland <mark.rutland@arm.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
	Tony Luck <tony.luck@intel.com>,
	linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] pstore: fix ftrace dump, when ECC is enabled
Date: Wed, 18 Feb 2026 16:42:48 -0300	[thread overview]
Message-ID: <e3a5b0dd-4119-2b92-a70f-89c3e91a2533@igalia.com> (raw)
In-Reply-To: <20260215185156.317394-1-andrej.skvortzov@gmail.com>

On 15/02/2026 15:51, Andrey Skvortsov wrote:
> total_size is sum of record->size and record->ecc_notice_size (ECC: No
> errors detected). When ECC is not used, then there is no problem.
> When ECC is enabled, then ftrace dump is decoded incorrectly after
> restart.
> 
> First this affects starting offset calculation, that breaks
> reading of all ftrace records.
> 
>   CPU:66 ts:51646260179894273 3818ffff80008002  fe00ffff800080f0  0x3818ffff80008002 <- 0xfe00ffff800080f0
>   CPU:66 ts:56589664458375169 3818ffff80008002  ff02ffff800080f0  0x3818ffff80008002 <- 0xff02ffff800080f0
>   CPU:67 ts:13194139533313 afe4ffff80008002  1ffff800080f0  0xafe4ffff80008002 <- 0x1ffff800080f0
>   CPU:67 ts:13194139533313 b7d0ffff80008001  100ffff80008002  0xb7d0ffff80008001 <- 0x100ffff80008002
>   CPU:67 ts:51646260179894273 8de0ffff80008001  202ffff80008002  0x8de0ffff80008001 <- 0x202ffff80008002
> 
> Second ECC notice message is printed like ftrace record and as a
> result couple of last records are completely wrong.
> 
> For example, when the starting offset is fixed:
> 
>  CPU:0 ts:113 ffffffc00879bd04  ffffffc0080dc08c  cpuidle_enter <- do_idle+0x20c/0x290
>  CPU:0 ts:114 ffffffc00879bd04  ffffffc0080dc08c  cpuidle_enter <- do_idle+0x20c/0x290
>  CPU:100 ts:28259048229270629 6f4e203a4343450a  2073726f72726520  0x6f4e203a4343450a <- 0x2073726f72726520
> 
> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>


Thanks for noticing that!

I've managed to reproduce it here and your patch indeed fixes the issue
- I've tested on 6.19 with ramoops.

Feel free to add my:
Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com>

Cheers,


Guilherme

  reply	other threads:[~2026-02-18 19:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-15 18:51 [PATCH] pstore: fix ftrace dump, when ECC is enabled Andrey Skvortsov
2026-02-18 19:42 ` Guilherme G. Piccoli [this message]
2026-02-19 18:39 ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3a5b0dd-4119-2b92-a70f-89c3e91a2533@igalia.com \
    --to=gpiccoli@igalia.com \
    --cc=andrej.skvortzov@gmail.com \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox