[PATCH 3.16 054/306] powerpc/nvram: Fix an incorrect partition merge

2017-02-15 Thread Ben Hutchings
3.16.40-rc1 review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need

[PATCH 3.16 054/306] powerpc/nvram: Fix an incorrect partition merge

2017-02-15 Thread Ben Hutchings
3.16.40-rc1 review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need update prev's length and

[PATCH 3.2 023/126] powerpc/nvram: Fix an incorrect partition merge

2017-02-15 Thread Ben Hutchings
3.2.85-rc1 review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need

[PATCH 3.2 023/126] powerpc/nvram: Fix an incorrect partition merge

2017-02-15 Thread Ben Hutchings
3.2.85-rc1 review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need update prev's length and

[PATCH 3.10 068/319] powerpc/nvram: Fix an incorrect partition merge

2017-02-05 Thread Willy Tarreau
From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. 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

[PATCH 3.10 068/319] powerpc/nvram: Fix an incorrect partition merge

2017-02-05 Thread Willy Tarreau
From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. 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

[PATCH 3.12 68/72] powerpc/nvram: Fix an incorrect partition merge

2016-11-07 Thread Jiri Slaby
From: Pan Xinhui 3.12-stable review patch. If anyone has any objections, please let me know. === commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need

[PATCH 3.12 68/72] powerpc/nvram: Fix an incorrect partition merge

2016-11-07 Thread Jiri Slaby
From: Pan Xinhui 3.12-stable review patch. If anyone has any objections, please let me know. === commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need update prev's length and

[PATCH 4.4 50/51] powerpc/nvram: Fix an incorrect partition merge

2016-10-29 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need

[PATCH 4.4 50/51] powerpc/nvram: Fix an incorrect partition merge

2016-10-29 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need update prev's length and

[PATCH 4.8 112/125] powerpc/nvram: Fix an incorrect partition merge

2016-10-29 Thread Greg Kroah-Hartman
4.8-stable review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need

[PATCH 4.8 112/125] powerpc/nvram: Fix an incorrect partition merge

2016-10-29 Thread Greg Kroah-Hartman
4.8-stable review patch. If anyone has any objections, please let me know. -- From: Pan Xinhui commit 11b7e154b132232535befe51c55db048069c8461 upstream. When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need update prev's length and

Re: powerpc/nvram: Fix an incorrect partition merge

2016-09-20 Thread Michael Ellerman
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-09-20 Thread Michael Ellerman
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-13 Thread xinhui
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-13 Thread xinhui
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-07 Thread Michael Ellerman
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 > > >

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-07 Thread Michael Ellerman
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-06 Thread Stewart Smith
xinhui writes: >> 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. :) It is. PAPR says we

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-06 Thread Stewart Smith
xinhui writes: >> 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. :) It is. PAPR says we format NVRAM when it's corrupted.

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-05 Thread xinhui
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-05 Thread xinhui
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-03 Thread Michael Ellerman
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

Re: powerpc/nvram: Fix an incorrect partition merge

2016-06-03 Thread Michael Ellerman
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

Re: [PATCH] powerpc/nvram: Fix an incorrect partition merge

2015-12-10 Thread xinhui
Hi, all I do some tests *without* my fix patch. after reboot, I saw logs below. [0.271236] WARNING: nvram partition checksum was 58, should be 24! [0.271239] Terminating nvram partition scan If I do tests *with* my fix patch, logs are: [0.291419] NVRAM

Re: [PATCH] powerpc/nvram: Fix an incorrect partition merge

2015-12-10 Thread xinhui
Hi, all I do some tests *without* my fix patch. after reboot, I saw logs below. [0.271236] WARNING: nvram partition checksum was 58, should be 24! [0.271239] Terminating nvram partition scan If I do tests *with* my fix patch, logs are: [0.291419] NVRAM

[PATCH] powerpc/nvram: Fix an incorrect partition merge

2015-12-09 Thread xinhui
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

[PATCH] powerpc/nvram: Fix an incorrect partition merge

2015-12-09 Thread xinhui
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