mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Hudson <darknighte@darknighte.com>
To: Kees Cook <keescook@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Yang Shi <yang.shi@linaro.org>, Ingo Molnar <mingo@kernel.org>,
	Prarit Bhargava <prarit@redhat.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Yaowei Bai <baiyaowei@cmss.chinamobile.com>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Tejun Heo <tj@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Thomas Garnier <thgarnie@google.com>,
	Petr Mladek <pmladek@suse.com>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Borislav Petkov <bp@suse.de>, Tim Bird <tim.bird@sonymobile.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [RFC PATCH v1 0/2] printk: Shared kernel logging
Date: Fri, 30 Sep 2016 20:56:38 -0500	[thread overview]
Message-ID: <64e98e70-7325-3398-100d-a9868fd1bb6a@mentor.com> (raw)
In-Reply-To: <CAGXu5jJU9_4ttTEboBG57pE16LSVgA6tejdDW5GV+BGJBrxMyg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2442 bytes --]

On 9/29/2016 8:36 PM, Kees Cook wrote:
> On Thu, Sep 29, 2016 at 5:55 PM, Sean Hudson <sean_hudson@mentor.com>
> wrote:
>> This patch set is based on Linus' v4.8-rc8 tag.
>> 
>> This debug feature allows the kernel to use an external buffer and
>> control block for kernel log messages. The feature is controlled by
>> an optional command line parameter. The existing buffer and control
>> block can contain existing log messages from previous boot cycles
>> and/or the bootloader. The command line parameter was chosen for
>> flexibility, cross arch portability, and the ability to dynamically
>> enable/disable this feature. The parameter specifies the address of
>> a control block used to replace the default log buffer. Existing
>> bootloader and kernel log messages are kept, in order, inside the
>> new buffer. After a boot that preserves the buffer contents, a 
>> bootloader can display both kernel and bootloader log entries from
>> multiple, previous boots. It also allows the kernel to display
>> bootloader log entries along with its own messages.
>> 
>> This feature is intended for debug purposes and has no effect
>> unless the command line parameter is specified. Further, it
>> validates the passed control block carefully and if any checks
>> fail, it falls back to the default behaviour. As such, it can be
>> left enabled by default.
>> 
>> Memory Reservation
>> 
>> This feature expects the bootloader to reserve/preserve the shared
>> buffer memory. This reservation needs to prevent the kernel from
>> overwriting the external log control block and log entries. In my
>> testing, I've used the 'fdt' commands in uboot to dynamically
>> inject reserved memory regions via the DT to the kernel.
> 
> Interesting! I wonder if this can be adjusted to incorporate the 
> existing console logging feature in the pstore which does a similar 
> thing? Though pstore doesn't know about bootloader logs, really,
> it's just storing kernel logs in a ring buffer. Maybe this can
> provide a backend to pstore or something, especially since pstore
> initialization happens "too late" for this to really be very
> sensible. It just seems like it'd be nice to have a single persistent
> console memory region...
> 

I don't know that much about pstore.  From your description though, it
sounds feasible to put the two together at some point.  How arch
specific is pstore?

-- 
Sean


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-10-01  1:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30  0:55 Sean Hudson
2016-09-30  0:55 ` [RFC PATCH v1 1/2] printk: collect offsets into replaceable structure Sean Hudson
2016-09-30  0:55 ` [RFC PATCH v1 2/2] printk: external log buffer (CONFIG_LOGBUFFER) Sean Hudson
2016-09-30 12:39   ` Petr Mladek
2016-10-01  4:06     ` Sean Hudson
2016-10-04 11:27       ` Petr Mladek
2016-10-04 17:55         ` Sean Hudson
2016-10-05 12:48           ` Petr Mladek
2016-10-12  1:12             ` Sean Hudson
2016-10-14  9:52               ` Petr Mladek
2016-09-30  1:36 ` [RFC PATCH v1 0/2] printk: Shared kernel logging Kees Cook
2016-10-01  1:56   ` Sean Hudson [this message]
2016-10-01  2:42     ` Kees Cook
2016-10-04 21:08 ` [RFC PATCH v2 " Sean Hudson
2016-10-04 21:08   ` [RFC PATCH v2 1/2] printk: collect offsets into replaceable structure Sean Hudson
2016-10-04 21:08   ` [RFC PATCH v2 2/2] printk: external log buffer (CONFIG_LOGBUFFER) Sean Hudson

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=64e98e70-7325-3398-100d-a9868fd1bb6a@mentor.com \
    --to=darknighte@darknighte.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=aryabinin@virtuozzo.com \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=bp@suse.de \
    --cc=grant.likely@secretlab.ca \
    --cc=hannes@cmpxchg.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mingo@kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pmladek@suse.com \
    --cc=prarit@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=thgarnie@google.com \
    --cc=tim.bird@sonymobile.com \
    --cc=tj@kernel.org \
    --cc=yang.shi@linaro.org \
    /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

all inboxes | Powered by JetHome®