From: Andrew Morton <akpm@linux-foundation.org>
To: Kees Cook <keescook@chromium.org>
Cc: Tony Luck <tony.luck@intel.com>,
Marco Stornelli <marco.stornelli@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <greg@kroah.com>,
Randy Dunlap <rdunlap@xenotime.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] ramoops: use pstore interface
Date: Wed, 18 Jan 2012 14:06:03 -0800 [thread overview]
Message-ID: <20120118140603.0fc22302.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120117235852.GA4877@www.outflux.net>
On Tue, 17 Jan 2012 15:58:52 -0800
Kees Cook <keescook@chromium.org> wrote:
> Instead of using /dev/mem directly and forcing userspace to know (or
> extract) where the platform has defined persistent memory, how many
> slots it has, the sizes, etc, use the common pstore infrastructure to
> handle Oops gathering and extraction. This presents a much easier to
> use filesystem-based view to the memory region. This also means that any
> other tools that are written to understand pstore will automatically be
> able to process ramoops too.
>
> ...
>
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -603,6 +603,7 @@ source "drivers/s390/char/Kconfig"
> config RAMOOPS
> tristate "Log panic/oops to a RAM buffer"
> depends on HAS_IOMEM
> + depends on PSTORE
> default n
> help
> This enables panic and oops messages to be logged to a circular
I think this is the right thing to do, but boy I hate it. You sit
there wondering "wtf do I need to enable so I can use feature X". I
sometimes use menuconfig's search feature, other times go trawl the
Kconfig files. There should be a capability in Kconfig to just turn on
the terminal feature, enabling any precondition features on the way.
Everyone loves Kconfig.
>
> ...
>
> static int __exit ramoops_remove(struct platform_device *pdev)
> {
> +#if 0
> + /* TODO(kees): We cannot unload ramoops since pstore doesn't support
> + * unregistering yet.
> + */
Well that sucks. Is pstore getting fixed?
> struct ramoops_context *cxt = &oops_cxt;
>
> - if (kmsg_dump_unregister(&cxt->dump) < 0)
> - pr_warn("could not unregister kmsg_dumper\n");
> -
> iounmap(cxt->virt_addr);
> release_mem_region(cxt->phys_addr, cxt->size);
> + cxt->max_count = 0;
> +
> + /* TODO(kees): When pstore supports unregistering, call it here. */
> + kfree(cxt->pstore.buf);
> + cxt->pstore.bufsize = 0;
> +
> return 0;
> +#endif
> + return -EBUSY;
> }
>
> static struct platform_driver ramoops_driver = {
next prev parent reply other threads:[~2012-01-18 22:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 23:58 [PATCH v5] ramoops: use pstore interface Kees Cook
2012-01-18 22:06 ` Andrew Morton [this message]
2012-01-18 22:16 ` Kees Cook
2012-01-18 22:40 ` Seiji Aguchi
2012-01-18 22:47 ` Kees Cook
2012-01-18 23:20 ` Seiji Aguchi
2012-01-21 8:33 ` Marco Stornelli
2012-04-02 20:39 ` Shuah Khan
2012-04-02 20:51 ` Kees Cook
2012-04-02 21:09 ` Andrew Morton
2012-04-09 21:33 ` Andrew Morton
2012-04-09 21:42 ` Luck, Tony
2012-04-10 8:34 ` Marco Stornelli
2012-04-10 16:11 ` Kees Cook
2012-04-11 6:33 ` Marco Stornelli
2012-04-11 6:37 ` Andrew Morton
2012-01-18 22:37 ` Luck, Tony
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=20120118140603.0fc22302.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=greg@kroah.com \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.stornelli@gmail.com \
--cc=rdunlap@xenotime.net \
--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).