All of lore.kernel.org
 help / color / mirror / Atom feed
From: xinhui <xinhui.pan@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	Hari Bathini <hbathini@linux.vnet.ibm.com>,
	Paul Mackerras <paulus@samba.org>,
	tglx@linutronix.de, Nathan Fontenot <nfont@linux.vnet.ibm.com>
Subject: Re: powerpc/nvram: Fix an incorrect partition merge
Date: Mon, 06 Jun 2016 13:31:30 +0800	[thread overview]
Message-ID: <57550AB2.8090500@linux.vnet.ibm.com> (raw)
In-Reply-To: <3rLj4P6Swcz9t6B@ozlabs.org>



On 2016年06月03日 19:47, Michael Ellerman wrote:
> On Thu, 2015-10-12 at 07:30:02 UTC, xinhui wrote:
>> From: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
>>
>> When we merge two contiguous partitions whose signatures are marked
>> NVRAM_SIG_FREE, We need update prev's length and checksum, then write it
>> to nvram, not cur's. So lets fix this mistake now.
>>
>> Also use memset instead of strncpy to set the partition's name. It's
>> more readable if we want to fill up with duplicate chars .
>
> Does this ever happen in practice? ie. should we backport the fix to stable
> kernels?
>

I did not see that nvram warning in practice. BUT I suggest to backport it to stable kernel. :)

Let me recall the story. :)
In past days, I was using pstore to keep some kernel logs. and sometimes I found my own logs and the panic logs did not show.
pstore use a fixed-address reserved memory In x86 while nvram instead in ppc.

Then I spent some days to review the nvram codes.
And worked out three patches to fix all issues that I found in nvram. BUT looks like I only sent out two of them. :)
I lost the third patch maybe...

> Has it always been broken?
>

no. after nvram partition corruption hit, all nvram partitions will be erased and re-alloc after the second machine reboot.
I don't know who does it but i guess it is the firmware. :)

thanks
xinhui
> cheers
>

  reply	other threads:[~2016-06-06  5:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10  7:30 [PATCH] powerpc/nvram: Fix an incorrect partition merge xinhui
2015-12-11  5:42 ` xinhui
2016-06-03 11:47 ` Michael Ellerman
2016-06-06  5:31   ` xinhui [this message]
2016-06-07  5:24     ` Stewart Smith
2016-06-07 11:39     ` Michael Ellerman
2016-06-13  6:40       ` xinhui
2016-09-20 13:07 ` Michael Ellerman

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=57550AB2.8090500@linux.vnet.ibm.com \
    --to=xinhui.pan@linux.vnet.ibm.com \
    --cc=a.hajda@samsung.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /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.