All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Luck, Tony (tony.luck@intel.com)" <tony.luck@intel.com>,
	"mikew@google.com" <mikew@google.com>,
	"Matthew Garrett (mjg@redhat.com)" <mjg@redhat.com>,
	"dle-develop@lists.sourceforge.net" 
	<dle-develop@lists.sourceforge.net>,
	Satoru Moriya <satoru.moriya@hds.com>
Subject: Re: [RFC][PATCH 0/2]efi_pstore: Avoid missing panic message in NVRAM
Date: Thu, 5 Jul 2012 09:20:36 -0400	[thread overview]
Message-ID: <20120705132036.GF5637@redhat.com> (raw)
In-Reply-To: <A5ED84D3BB3A384992CBB9C77DEDA4D401AAC3@USINDEM103.corp.hds.com>

On Tue, Jul 03, 2012 at 11:33:57PM +0000, Seiji Aguchi wrote:
> [Problem]
> Current efi_pstore simply overwrites existing entries in NVRAM.
> So, if 2nd panic happens before a user checks 1st panic message, 1st panic message will be lost.

I thought the rule was entries do not get overwritten until they are
deleted first.  Perhaps that is just an APEI thing, but it seems like that
should be a good rule for EFI too.

Mainly because there is very little userspace apps that actually clear the
old error records.  So this could become a common problem.

Unless we are implementing a flight recorder option which explicitly
states overwrite older entries?

Cheers,
Don

> 
> [Solution]
> To avoid missing 1st panic message, this patch introduce a rule checking if existing entries in NRAM are erasable to efi_pstore.
>  
> [Patch Descriptions]
>  
>  [PATCH 1/2] Duplicate a shared code between write and erase callbacks  
>  
>   Currently, efi_pstore driver shares a code erasing existing entries in NVRAM with write and erase callbacks.
>   But there some cases we should avoid erasing existing entries in write callback. (Please see PATCH 2/2).
>   This patch duplicates the code so that write and erase callbacks work independently. 
>  
>  
>  [PATCH 2/2] write callback: Check if existing entry is erasable
>  
>   this patch introduce a rule checking if existing entries in NRAM are erasable to efi_pstore.
>   With this patch, if previous event is panic, efi_pstore never overwrite it.
> 
>  
>   drivers/firmware/efivars.c |   94 +++++++++++++++++++++++++++++++++++++++++++-
>   fs/pstore/platform.c       |    4 +-
>   include/linux/pstore.h     |    5 ++
>   3 files changed, 99 insertions(+), 4 deletions(-)
>  
>  Seiji

      reply	other threads:[~2012-07-05 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 23:33 [RFC][PATCH 0/2]efi_pstore: Avoid missing panic message in NVRAM Seiji Aguchi
2012-07-05 13:20 ` Don Zickus [this message]

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=20120705132036.GF5637@redhat.com \
    --to=dzickus@redhat.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.com \
    --cc=mjg@redhat.com \
    --cc=satoru.moriya@hds.com \
    --cc=seiji.aguchi@hds.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.