LKML Archive on
 help / color / Atom feed
From: Daniel Vetter <>
To: DRI Development <>,
	LKML <>
Cc: Daniel Vetter <>,
	Daniel Vetter <>,
	Andrew Morton <>,
	Mike Rapoport <>,
	Michal Hocko <>, Roman Gushchin <>,
	Vlastimil Babka <>,
	Jan Stancek <>,
	Kees Cook <>,
	Andrey Ryabinin <>,
	"Michael S. Tsirkin" <>,
	Huang Ying <>,
	Bartosz Golaszewski <>,
Subject: [PATCH] mm: Don't let userspace spam allocations warnings
Date: Wed, 20 Feb 2019 21:40:58 +0100
Message-ID: <> (raw)

memdump_user usually gets fed unchecked userspace input. Blasting a
full backtrace into dmesg every time is a bit excessive - I'm not sure
on the kernel rule in general, but at least in drm we're trying not to
let unpriviledge userspace spam the logs freely. Definitely not entire
warning backtraces.

It also means more filtering for our CI, because our testsuite
exercises these corner cases and so hits these a lot.

Signed-off-by: Daniel Vetter <>
Cc: Andrew Morton <>
Cc: Mike Rapoport <>
Cc: Michal Hocko <>
Cc: Roman Gushchin <>
Cc: Vlastimil Babka <>
Cc: Jan Stancek <>
Cc: Kees Cook <>
Cc: Andrey Ryabinin <>
Cc: "Michael S. Tsirkin" <>
Cc: Huang Ying <>
Cc: Bartosz Golaszewski <>
 mm/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/util.c b/mm/util.c
index 1ea055138043..379319b1bcfd 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -150,7 +150,7 @@ void *memdup_user(const void __user *src, size_t len)
 	void *p;
-	p = kmalloc_track_caller(len, GFP_USER);
+	p = kmalloc_track_caller(len, GFP_USER | __GFP_NOWARN);
 	if (!p)
 		return ERR_PTR(-ENOMEM);

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20 20:40 Daniel Vetter [this message]
2019-02-20 21:08 ` Kees Cook
2019-02-20 22:05 ` Michal Hocko

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone