linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Kees Cook <keescook@chromium.org>,
	Tony Luck <tony.luck@intel.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH] pstore: Fix printing of duplicate boot messages to console
Date: Fri, 24 Jan 2020 14:18:14 +0530	[thread overview]
Message-ID: <80957b8f069b513fd2b6f031a94a3474@codeaurora.org> (raw)
In-Reply-To: <5e29f8df.1c69fb81.fc97b.8df8@mx.google.com>

On 2020-01-24 01:19, Stephen Boyd wrote:
> Quoting Sai Prakash Ranjan (2020-01-23 08:00:31)
>> Since commit f92b070f2dc8 ("printk: Do not miss new messages
>> when replaying the log"), CON_PRINTBUFFER flag causes the
>> duplicate boot messages to be printed on the console when
>> PSTORE_CONSOLE and earlycon (boot console) is enabled.
>> Pstore console registers to boot console when earlycon is
>> enabled during pstore_register_console as a part of ramoops
>> initialization in postcore_initcall and the printk core
>> checks for CON_PRINTBUFFER flag and replays the log buffer
>> to registered console (in this case pstore console which
>> just registered to boot console) causing duplicate messages
>> to be printed. Remove the CON_PRINTBUFFER flag from pstore
>> console since pstore is not concerned with the printing of
>> buffer to console but with writing of the buffer to the
>> backend.
>> 
>> Console log with earlycon and pstore console enabled:
>> 
>> [    0.008342] Console: colour dummy device 80x25
>> [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x51df805e]
>> ...
>> [    1.244049] hw-breakpoint: found 6 breakpoint and 4 watchpoint 
>> registers.
>> [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x51df805e]
>> 
>> Fixes: f92b070f2dc8 ("printk: Do not miss new messages when replaying 
>> the log")
>> Reported-by: Douglas Anderson <dianders@chromium.org>
>> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
>> ---
> 
> While I like the idea, it seems that this breaks console-ramoops by
> removing all the text that is printed in the kernel log before this
> console is registered. I reboot and see that
> /sys/fs/pstore/console-ramoops-1 starts like this now:
> 
> 	localhost ~ # cat /sys/fs/pstore/console-ramoops-0
> 	[    0.943472] printk: console [pstore-1] enabled
> 
> Maybe this console can be "special" and not require anything to be
> printed out to visible consoles but still get the entire log contents?
> Or we should just not worry about it.

Thanks for testing this out Stephen, I should have tested this some 
more.
Lets drop this patch.

-Sai

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a 
member
of Code Aurora Forum, hosted by The Linux Foundation

  reply	other threads:[~2020-01-24  8:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 16:00 [PATCH] pstore: Fix printing of duplicate boot messages to console Sai Prakash Ranjan
2020-01-23 19:49 ` Stephen Boyd
2020-01-24  8:48   ` Sai Prakash Ranjan [this message]
2020-01-27 23:27 ` Kees Cook
2020-01-30  6:30   ` Stephen Boyd

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=80957b8f069b513fd2b6f031a94a3474@codeaurora.org \
    --to=saiprakash.ranjan@codeaurora.org \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=dianders@chromium.org \
    --cc=joel@joelfernandes.org \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=swboyd@chromium.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;
as well as URLs for NNTP newsgroup(s).