Page MenuHomeFreeBSD

Remove dead code from radeonkms.
ClosedPublic

Authored by markj on Dec 11 2018, 8:21 PM.
Tags
None
Referenced Files
F80149859: D18516.diff
Thu, Mar 28, 2:16 PM
Unknown Object (File)
Dec 20 2023, 3:49 AM
Unknown Object (File)
Dec 13 2023, 7:26 PM
Unknown Object (File)
Nov 28 2023, 8:21 AM
Unknown Object (File)
Nov 19 2023, 8:04 AM
Unknown Object (File)
Nov 17 2023, 8:05 AM
Unknown Object (File)
Nov 8 2023, 9:48 AM
Unknown Object (File)
Nov 8 2023, 3:49 AM
Subscribers

Details

Summary

This is effectively the closure of the ioctl handler table in
radeon_cp.c. That ioctl table is unused (we use the radeon_kms ioctl
table instead), so there is no way for any of the functions referenced
by the table to be called.

This was motivated by a report of an integer overflow vulnerability in
r600_cp_dispatch_texture() (the multiplication of tex->height and
tex->pitch, which are user-controlled). However, I believe the code
in question cannot get invoked.

Test Plan

I verified that radeonkms.ko still loads (i.e., no missing symbols).

Initially, my test was to simply comment out the radeon_ioctls[] table
and kldload, verifying that the ioctl handlers are indeed dead code.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21610
Build 20908: arc lint + arc unit

Event Timeline

markj edited the test plan for this revision. (Show Details)
markj added a reviewer: dumbbell.

Hi!

I suppose the int2float() function comes from one of the removed file, is that right? If yes, could you please add a comment indicating the initial source filename?

This revision now requires changes to proceed.Dec 17 2018, 8:17 AM
  • Add comment indicating the origin of int2float().

Hi!

I suppose the int2float() function comes from one of the removed file, is that right? If yes, could you please add a comment indicating the initial source filename?

Indeed, r600_blit.c. I added a comment.

This revision is now accepted and ready to land.Dec 17 2018, 4:33 PM
This revision was automatically updated to reflect the committed changes.