On Wed, Feb 20, 2019 at 12:41 PM Daniel Vetter <daniel.vet...@ffwll.ch> wrote:
>
> 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 <daniel.vet...@intel.com>

Reviewed-by: Kees Cook <keesc...@chromium.org>

-Kees

> Cc: Andrew Morton <a...@linux-foundation.org>
> Cc: Mike Rapoport <r...@linux.vnet.ibm.com>
> Cc: Michal Hocko <mho...@suse.com>
> Cc: Roman Gushchin <g...@fb.com>
> Cc: Vlastimil Babka <vba...@suse.cz>
> Cc: Jan Stancek <jstan...@redhat.com>
> Cc: Kees Cook <keesc...@chromium.org>
> Cc: Andrey Ryabinin <aryabi...@virtuozzo.com>
> Cc: "Michael S. Tsirkin" <m...@redhat.com>
> Cc: Huang Ying <ying.hu...@intel.com>
> Cc: Bartosz Golaszewski <b...@bgdev.pl>
> Cc: linux...@kvack.org
> ---
>  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);
>
> --
> 2.20.1
>


-- 
Kees Cook
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to