From: Sean Hudson <sean_hudson@mentor.com>
To: <linux-kernel@vger.kernel.org>
Cc: Sean Hudson <sean_hudson@mentor.com>,
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>,
Kees Cook <keescook@chromium.org>,
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: [RFC PATCH v2 0/2] printk: Shared kernel logging
Date: Tue, 4 Oct 2016 16:08:53 -0500 [thread overview]
Message-ID: <1475615335-4433-1-git-send-email-sean_hudson@mentor.com> (raw)
In-Reply-To: <1475196956-32274-1-git-send-email-sean_hudson@mentor.com>
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.
Sean Hudson (2):
printk: collect offsets into replaceable structure
printk: external log buffer (CONFIG_LOGBUFFER)
init/Kconfig | 12 +
init/main.c | 7 +
kernel/printk/printk.c | 599 +++++++++++++++++++++++++++++++++++--------------
3 files changed, 451 insertions(+), 167 deletions(-)
Changes since v1: Fix CONFIG_PRINTK disabled build
--
2.7.4
next prev parent reply other threads:[~2016-10-04 21:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 0:55 [RFC PATCH v1 " 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
2016-10-01 2:42 ` Kees Cook
2016-10-04 21:08 ` Sean Hudson [this message]
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=1475615335-4433-1-git-send-email-sean_hudson@mentor.com \
--to=sean_hudson@mentor.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®