lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] scs: Move accounting into alloc/free functions
On Mon, May 18, 2020 at 12:38:58PM +0100, Mark Rutland wrote:
> On Fri, May 15, 2020 at 06:27:52PM +0100, Will Deacon wrote:
> > There's no need to perform the shadow stack page accounting independently
> > of the lifetime of the underlying allocation, so call the accounting code
> > from the {alloc,free}() functions and simplify the code in the process.
> >
> > Signed-off-by: Will Deacon <will@kernel.org>
> > ---
> > kernel/scs.c | 45 +++++++++++++++++++++------------------------
> > 1 file changed, 21 insertions(+), 24 deletions(-)
>
> One (super trivial) nit below, but regardless this looks like a sound
> and sensible cleanup, so:
>
> Reviewed-by: Mark Rutland <mark.rutland@arm.com>
>
> > diff --git a/kernel/scs.c b/kernel/scs.c
> > index 5ff8663e4a67..aea841cd7586 100644
> > --- a/kernel/scs.c
> > +++ b/kernel/scs.c
> > @@ -14,25 +14,35 @@
>
> > static void *scs_alloc(int node)
> > {
>
> > + void *s = kmem_cache_alloc_node(scs_cache, GFP_SCS, node);
> > +
> > + if (!s)
> > + return NULL;
>
> Super trivial nit, but could we omit the line space between these two,
> to fit with usual style?

I really like having the empty line after the last variable declaration.

Sorry,

Will

\
 
 \ /
  Last update: 2020-05-18 15:41    [W:0.174 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site