lkml.org 
[lkml]   [2019]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lib: test_overflow: Avoid taining the kernel and fix wrap size
On Tue, May 28, 2019 at 04:40:06PM -0700, Joe Perches wrote:
> On Tue, 2019-05-28 at 15:51 -0700, Kees Cook wrote:
> > This adds __GFP_NOWARN to the kmalloc()-portions of the overflow test to
> > avoid tainting the kernel. Additionally fixes up the math on wrap size
> > to be architecture and page size agnostic.
> []
> > diff --git a/lib/test_overflow.c b/lib/test_overflow.c
> []
> > @@ -486,16 +486,17 @@ static int __init test_overflow_shift(void)
> []
> > +#define alloc_GFP (GFP_KERNEL | __GFP_NOWARN)
> []
> > +#define alloc110(alloc, arg, sz) alloc(arg, sz, alloc_GFP | __GFP_NOWARN)
>
> seems redundant.

Whoops. Missed that one. Fixing...

--
Kees Cook

\
 
 \ /
  Last update: 2019-05-29 05:05    [W:0.029 / U:1.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site