Re: [PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap()

2018-10-30 Thread Joel Fernandes
On Tue, Oct 30, 2018 at 8:57 PM, Peng15 Wang 王鹏 wrote: > >>From: Joel Fernandes >>Sent: Wednesday, October 31, 2018 6:16 >>To: Kees Cook >>Cc: Peng15 Wang 王鹏; Anton Vorontsov; Colin Cross; Tony Luck; LKML; >>vipwangerx...@gmail.com >>Subject: Re: [PA

Re: [PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap()

2018-10-30 Thread Peng15 Wang 王鹏
>From: Joel Fernandes >Sent: Wednesday, October 31, 2018 6:16 >To: Kees Cook >Cc: Peng15 Wang 王鹏; Anton Vorontsov; Colin Cross; Tony Luck; LKML; >vipwangerx...@gmail.com >Subject: Re: [PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap() > >On Tue, Oct 30,

Re: [PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap()

2018-10-30 Thread Joel Fernandes
On Tue, Oct 30, 2018 at 02:52:43PM -0700, Kees Cook wrote: > On Tue, Oct 30, 2018 at 2:38 PM, Joel Fernandes > wrote: > > On Tue, Oct 30, 2018 at 03:52:34PM +0800, Peng Wang wrote: > >> When initialing prz with invalid data in buffer(no PERSISTENT_RAM_SIG), > >> function call path is like this: >

Re: [PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap()

2018-10-30 Thread Kees Cook
On Tue, Oct 30, 2018 at 2:38 PM, Joel Fernandes wrote: > On Tue, Oct 30, 2018 at 03:52:34PM +0800, Peng Wang wrote: >> When initialing prz with invalid data in buffer(no PERSISTENT_RAM_SIG), >> function call path is like this: >> >> ramoops_init_prz -> >> | >> |-> persistent_ram_new -> persistent_

Re: [PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap()

2018-10-30 Thread Joel Fernandes
On Tue, Oct 30, 2018 at 03:52:34PM +0800, Peng Wang wrote: > When initialing prz with invalid data in buffer(no PERSISTENT_RAM_SIG), > function call path is like this: > > ramoops_init_prz -> > | > |-> persistent_ram_new -> persistent_ram_post_init -> persistent_ram_zap > | > |-> persistent_ram_za

Re: [PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap()

2018-10-30 Thread Kees Cook
On Tue, Oct 30, 2018 at 12:52 AM, Peng Wang wrote: > When initialing prz with invalid data in buffer(no PERSISTENT_RAM_SIG), > function call path is like this: > > ramoops_init_prz -> > | > |-> persistent_ram_new -> persistent_ram_post_init -> persistent_ram_zap > | > |-> persistent_ram_zap > > As

[PATCH v4] pstore: Avoid duplicate call of persistent_ram_zap()

2018-10-30 Thread Peng Wang
When initialing prz with invalid data in buffer(no PERSISTENT_RAM_SIG), function call path is like this: ramoops_init_prz -> | |-> persistent_ram_new -> persistent_ram_post_init -> persistent_ram_zap | |-> persistent_ram_zap As we can see, persistent_ram_zap() is called twice. We can avoid this b