OSDN Git Service

drm/amdgpu/psp: prevent page fault by checking write_frame address(v4)
authorEvan Quan <evan.quan@amd.com>
Mon, 16 Oct 2017 08:51:28 +0000 (16:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Oct 2017 03:09:38 +0000 (23:09 -0400)
commit4694257e7d4757fedaa8dcd18bb5ff52e76a2765
tree7495d845c5878ac1d2497156d5705787bad30df0
parent0722382dcc4fd4e53c12db2c2eda9c5c9c903432
drm/amdgpu/psp: prevent page fault by checking write_frame address(v4)

 - Prevent a possible buffer overflow when updating the ring buffer by
    bounds checking the command frame against the available space in the
    ring buffer.

 v2: update the ring_buffer_end address
 v3: update the commit log
 v4: squash in print fix (Michel)

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c