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>
This commit is contained in:
Evan Quan 2017-10-16 16:51:28 +08:00 • committed by Alex Deucher
commit 4694257e7d
2 changed files with 24 additions and 4 deletions