mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib: test_overflow: Avoid taining the kernel and fix wrap size
Date: Tue, 28 May 2019 16:40:06 -0700	[thread overview]
Message-ID: <7cf0e30a7309008a81cc65e692511a1e8e6b544f.camel@perches.com> (raw)
In-Reply-To: <201905281550.4E3CB258F@keescook>

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.



  reply	other threads:[~2019-05-28 23:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 22:51 Kees Cook
2019-05-28 23:40 ` Joe Perches [this message]
2019-05-29  3:04   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cf0e30a7309008a81cc65e692511a1e8e6b544f.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®