[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+CK2bB-Qim9T2NKV97HdPbSER+RR5R4_rOCZ3JZgZ5FcU05Pg@mail.gmail.com>
Date: Wed, 6 May 2020 10:31:59 -0400
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Kees Cook <keescook@...omium.org>,
James Morris <jmorris@...ei.org>,
Sasha Levin <sashal@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
anton@...msg.org, ccross@...roid.com,
Tony Luck <tony.luck@...el.com>, robh+dt@...nel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v2 2/5] pstore/platform: pass max_reason to kmesg dump
On Wed, May 6, 2020 at 9:52 AM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Tue, 5 May 2020 14:59:37 -0700
> Kees Cook <keescook@...omium.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);
Powered by blists - more mailing lists