drm/amd/display: Don't allow partial copy_from_user
authorHarry Wentland <harry.wentland@amd.com>
Wed, 27 Oct 2021 14:26:33 +0000 (10:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Nov 2021 18:10:39 +0000 (14:10 -0400)
commit25a1a08fe79be6ef00e1393b1f5545f6ba62919f
tree3094f8a13eeed0734a1fdba19d6f51480c85f695
parent78469728809b8604dc37ae4e6b12ae12decac5be
drm/amd/display: Don't allow partial copy_from_user

There is no reason to allow for partial buffers from userspace in our
debugfs. In this particular case callers will zero out the wr_buf but if
callers in the future don't do that we might be looking at corrupt data.

Linus puts it better than I can in
https://lkml.org/lkml/2021/10/26/993

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c