From: Daniel Vetter daniel.vetter@ffwll.ch
mainline inclusion from mainline-v5.0-rc8 commit 6c8fcc096be9d02f478c508052a41a4430506ab3 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8LMVO CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
--------------------------------
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.
Link: http://lkml.kernel.org/r/20190220204058.11676-1-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter daniel.vetter@intel.com Reviewed-by: Andrew Morton akpm@linux-foundation.org Acked-by: Michal Hocko mhocko@suse.com Reviewed-by: Kees Cook keescook@chromium.org Cc: Mike Rapoport rppt@linux.vnet.ibm.com Cc: Roman Gushchin guro@fb.com Cc: Vlastimil Babka vbabka@suse.cz Cc: Jan Stancek jstancek@redhat.com Cc: Andrey Ryabinin aryabinin@virtuozzo.com Cc: "Michael S. Tsirkin" mst@redhat.com Cc: Huang Ying ying.huang@intel.com Cc: Bartosz Golaszewski brgl@bgdev.pl Signed-off-by: Andrew Morton akpm@linux-foundation.org Signed-off-by: Linus Torvalds torvalds@linux-foundation.org Signed-off-by: ZhangPeng zhangpeng362@huawei.com --- mm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/util.c b/mm/util.c index 2b04ff4675d6..3a69fd0a15ca 100644 --- a/mm/util.c +++ b/mm/util.c @@ -160,7 +160,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);
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3158 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/T...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3158 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/T...