summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorJesse Zhang <Jesse.Zhang@amd.com>2026-10-18 19:17:57 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-10-27 17:03:22 -0400
commitba4c3c202919405f461a393e823e4b72c8518494 (patch)
tree92b30b1ae5e330566df97e25e68092deb0419b55 /scripts/Makefile.thinlto
parentb456f591f925fbd6b33770d0eec1b51c2f9d41c1 (diff)
downloadlinux-next-ba4c3c202919405f461a393e823e4b72c8518494.tar.gz
linux-next-ba4c3c202919405f461a393e823e4b72c8518494.zip
drm/amdgpu: reject CS chunks too large for kvmalloc()
The CS ioctl copies every chunk with vmemdup_array_user() before it looks at it, for whatever length_dw userspace gives. kvmalloc() warns about allocations above INT_MAX when called without __GFP_NOWARN, so any process with the render node can trigger a warning. On navi31, a CS with a chunk of length_dw 0x20000000 returns -ENOMEM after: WARNING: mm/slub.c:6841 at __kvmalloc_node_noprof+0x5a5/0x7d0 Reject such chunks with -EINVAL before trying to copy them. Fixes: 2098105ec65c ("drm: drop drm_[cm]alloc* helpers") Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit dab5f5280406088591645f499f048dcfefab8d7d) Cc: stable@vger.kernel.org
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions