Page MenuHomeFreeBSD

Remove dead code from radeonkms.
ClosedPublic

Authored by markj on Dec 11 2018, 8:21 PM.
Tags
None
Referenced Files
F166833901: D18516.id51871.diff
Sun, Aug 16, 9:55 PM
F166833183: D18516.id52109.diff
Sun, Aug 16, 9:55 PM
Unknown Object (File)
Sat, Aug 15, 8:15 PM
Unknown Object (File)
Fri, Aug 14, 9:38 PM
Unknown Object (File)
Fri, Aug 14, 6:41 PM
Unknown Object (File)
Wed, Aug 12, 2:52 AM
Unknown Object (File)
Tue, Aug 11, 11:20 PM
Unknown Object (File)
Tue, Aug 11, 10:34 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.