Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452067 > unrolled thread
| Started by | Kees Cook <keescook@chromium.org> |
|---|---|
| First post | 2016-07-28 21:40 +0200 |
| Last post | 2016-08-03 21:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz Kees Cook <keescook@chromium.org> - 2016-07-28 21:40 +0200
RE: [PATCH v2 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz 岩松信洋 / IWAMATSU,NOBUHIRO <nobuhiro.iwamatsu.kw@hitachi.com> - 2016-07-29 08:00 +0200
Re: [PATCH v2 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz Kees Cook <keescook@chromium.org> - 2016-08-03 21:10 +0200
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-07-28 21:40 +0200 |
| Subject | Re: [PATCH v2 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz |
| Message-ID | <rZZjX-2cG-11@gated-at.bofh.it> |
On Sun, Jul 24, 2016 at 8:56 PM, Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> wrote: > From: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> > > persistent_ram_zone(=prz) structures are allocated by persistent_ram_new(), > which includes vmap() or ioremap(). But they are currently freed by > kfree(). This uses persistent_ram_free() for correct this asymmetry usage. > > Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> > Cc: Mark Salyzyn <salyzyn@android.com> > Cc: Seiji Aguchi <seiji.aguchi.tr@hitachi.com> Oh, yes, oops. I may extract this patch and get it into v4.8, since this is an explicit bug fix. Thanks! -Kees > --- > fs/pstore/ram.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c > index bd9812e..22416c0 100644 > --- a/fs/pstore/ram.c > +++ b/fs/pstore/ram.c > @@ -567,11 +567,11 @@ fail_buf: > kfree(cxt->pstore.buf); > fail_clear: > cxt->pstore.bufsize = 0; > - kfree(cxt->mprz); > + persistent_ram_free(cxt->mprz); > fail_init_mprz: > - kfree(cxt->fprz); > + persistent_ram_free(cxt->fprz); > fail_init_fprz: > - kfree(cxt->cprz); > + persistent_ram_free(cxt->cprz); > fail_init_cprz: > ramoops_free_przs(cxt); > fail_out: > -- > 2.8.1 > > -- Kees Cook Chrome OS & Brillo Security
[toc] | [next] | [standalone]
| From | 岩松信洋 / IWAMATSU,NOBUHIRO <nobuhiro.iwamatsu.kw@hitachi.com> |
|---|---|
| Date | 2016-07-29 08:00 +0200 |
| Message-ID | <s08ZX-w4-1@gated-at.bofh.it> |
| In reply to | #1452067 |
Hi, > -----Original Message----- > From: keescook@google.com [mailto:keescook@google.com] On Behalf Of Kees > Cook > Sent: Friday, July 29, 2016 4:35 AM > To: 岩松信洋 / IWAMATSU,NOBUHIRO > Cc: Anton Vorontsov; Colin Cross; Tony Luck; LKML; Hiraku Toyooka; Mark > Salyzyn; 阿口誠司 / AGUCHI,SEIJI > Subject: Re: [PATCH v2 1/5] ramoops: use persistent_ram_free() instead of > kfree() for freeing prz > > On Sun, Jul 24, 2016 at 8:56 PM, Nobuhiro Iwamatsu > <nobuhiro.iwamatsu.kw@hitachi.com> wrote: > > From: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> > > > > persistent_ram_zone(=prz) structures are allocated by > > persistent_ram_new(), which includes vmap() or ioremap(). But they are > > currently freed by kfree(). This uses persistent_ram_free() for correct > this asymmetry usage. > > > > Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> > > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> > > Cc: Mark Salyzyn <salyzyn@android.com> > > Cc: Seiji Aguchi <seiji.aguchi.tr@hitachi.com> > > Oh, yes, oops. I may extract this patch and get it into v4.8, since this > is an explicit bug fix. Thanks! > > -Kees Thanks. Please pickup this commit as bug fix. And if you have a time, please review other patches in this patch series. Best regards, Nobuhiro > > > --- > > fs/pstore/ram.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index bd9812e..22416c0 > > 100644 > > --- a/fs/pstore/ram.c > > +++ b/fs/pstore/ram.c > > @@ -567,11 +567,11 @@ fail_buf: > > kfree(cxt->pstore.buf); > > fail_clear: > > cxt->pstore.bufsize = 0; > > - kfree(cxt->mprz); > > + persistent_ram_free(cxt->mprz); > > fail_init_mprz: > > - kfree(cxt->fprz); > > + persistent_ram_free(cxt->fprz); > > fail_init_fprz: > > - kfree(cxt->cprz); > > + persistent_ram_free(cxt->cprz); > > fail_init_cprz: > > ramoops_free_przs(cxt); > > fail_out: > > -- > > 2.8.1 > > > > > > > > -- > Kees Cook > Chrome OS & Brillo Security
[toc] | [prev] | [next] | [standalone]
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-08-03 21:10 +0200 |
| Message-ID | <s29Ie-6D8-31@gated-at.bofh.it> |
| In reply to | #1452265 |
On Thu, Jul 28, 2016 at 10:58 PM, 岩松信洋 / IWAMATSU,NOBUHIRO <nobuhiro.iwamatsu.kw@hitachi.com> wrote: > Hi, > >> -----Original Message----- >> From: keescook@google.com [mailto:keescook@google.com] On Behalf Of Kees >> Cook >> Sent: Friday, July 29, 2016 4:35 AM >> To: 岩松信洋 / IWAMATSU,NOBUHIRO >> Cc: Anton Vorontsov; Colin Cross; Tony Luck; LKML; Hiraku Toyooka; Mark >> Salyzyn; 阿口誠司 / AGUCHI,SEIJI >> Subject: Re: [PATCH v2 1/5] ramoops: use persistent_ram_free() instead of >> kfree() for freeing prz >> >> On Sun, Jul 24, 2016 at 8:56 PM, Nobuhiro Iwamatsu >> <nobuhiro.iwamatsu.kw@hitachi.com> wrote: >> > From: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> >> > >> > persistent_ram_zone(=prz) structures are allocated by >> > persistent_ram_new(), which includes vmap() or ioremap(). But they are >> > currently freed by kfree(). This uses persistent_ram_free() for correct >> this asymmetry usage. >> > >> > Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> >> > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> >> > Cc: Mark Salyzyn <salyzyn@android.com> >> > Cc: Seiji Aguchi <seiji.aguchi.tr@hitachi.com> >> >> Oh, yes, oops. I may extract this patch and get it into v4.8, since this >> is an explicit bug fix. Thanks! >> >> -Kees > > Thanks. Please pickup this commit as bug fix. Applied, this should get picked up soon. > And if you have a time, please review other patches in this patch series. For sure; I'm busy with the 4.8 merge window being open right now, but after that I'll get them reviewed. Thanks! -Kees > > Best regards, > Nobuhiro > >> >> > --- >> > fs/pstore/ram.c | 6 +++--- >> > 1 file changed, 3 insertions(+), 3 deletions(-) >> > >> > diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index bd9812e..22416c0 >> > 100644 >> > --- a/fs/pstore/ram.c >> > +++ b/fs/pstore/ram.c >> > @@ -567,11 +567,11 @@ fail_buf: >> > kfree(cxt->pstore.buf); >> > fail_clear: >> > cxt->pstore.bufsize = 0; >> > - kfree(cxt->mprz); >> > + persistent_ram_free(cxt->mprz); >> > fail_init_mprz: >> > - kfree(cxt->fprz); >> > + persistent_ram_free(cxt->fprz); >> > fail_init_fprz: >> > - kfree(cxt->cprz); >> > + persistent_ram_free(cxt->cprz); >> > fail_init_cprz: >> > ramoops_free_przs(cxt); >> > fail_out: >> > -- >> > 2.8.1 >> > >> > >> >> >> >> -- >> Kees Cook >> Chrome OS & Brillo Security -- Kees Cook Brillo & Chrome OS Security
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web