From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964917AbcFMGky (ORCPT ); Mon, 13 Jun 2016 02:40:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49976 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964817AbcFMGkx (ORCPT ); Mon, 13 Jun 2016 02:40:53 -0400 X-IBM-Helo: d28dlp01.in.ibm.com X-IBM-MailFrom: xinhui.pan@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Mon, 13 Jun 2016 14:40:32 +0800 From: xinhui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org CC: Andrzej Hajda , Christophe Jaillet , Hari Bathini , Paul Mackerras , tglx@linutronix.de, Nathan Fontenot , Benjamin Herrenschmidt Subject: Re: powerpc/nvram: Fix an incorrect partition merge References: <3rLj4P6Swcz9t6B@ozlabs.org> <57550AB2.8090500@linux.vnet.ibm.com> <1465299544.16285.3.camel@ellerman.id.au> In-Reply-To: <1465299544.16285.3.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16061306-0056-0000-0000-00000266D052 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16061306-0057-0000-0000-00000E2DDC03 Message-Id: <575E5560.5000307@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-13_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606130072 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年06月07日 19:39, Michael Ellerman wrote: > On Mon, 2016-06-06 at 13:31 +0800, xinhui wrote: >> On 2016年06月03日 19:47, Michael Ellerman wrote: >>> On Thu, 2015-10-12 at 07:30:02 UTC, xinhui wrote: >>>> From: Pan Xinhui >>>> >>>> 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... > > OK. > >>> 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. :) > > Actually I meant has the code always contained the bug, or was it added recently. > fix fa2b4e54d41f3c9f1bee6a7d63ecd4f0ab161e89 ("powerpc/nvram: Improve partition removal") and it is from Ben. So cc Ben :) > cheers >