lkml.org 
[lkml]   [2020]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/5] pstore/platform: pass max_reason to kmesg dump
On Wed, May 6, 2020 at 9:52 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Tue, 5 May 2020 14:59:37 -0700
> Kees Cook <keescook@chromium.org> wrote:
>
> > > @@ -97,6 +97,8 @@ struct pstore_record {
> > > * @read_mutex: serializes @open, @read, @close, and @erase callbacks
> > > * @flags: bitfield of frontends the backend can accept writes for
> > > * @data: backend-private pointer passed back during callbacks
> > > + * @max_reason: Used when PSTORE_FLAGS_DMESG is set. Contains the
> > > + * kmsg_dump_reason enum value.
> >
> > Nit: please move this above @data since it has a @flags dependency.
> >
> > > *
> > > * Callbacks:
> > > *
> > > @@ -180,6 +182,7 @@ struct pstore_info {
> > >
> > > int flags;
> > > void *data;
> > > + int max_reason;
>
> Not to mention that moving max_reason above data will fill in the hole left
> by a 32 bit int, followed by a 64 bit pointer.

Good point. I will do it in the next version.

Thank you,
Pasha

>
> -- Steve
>
>
> > >
> > > int (*open)(struct pstore_info *psi);
> > > int (*close)(struct pstore_info *psi);

\
 
 \ /
  Last update: 2020-05-06 16:33    [W:0.405 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site