NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/58180: render nodes are busted



>Number:         58180
>Category:       kern
>Synopsis:       render nodes are busted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 21 03:00:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10
>Organization:
The /net/dri/renderBSD
>Environment:
>Description:
1. stat returns the wrong st_rdev for render nodes.  For example, for the render node for card N, it returns 64*2 + 64*2 + N, when it should just return 64*2 + N.

2. NetBSD's libdrm has no way to discover the bus that the render node is on, which it insists on knowing for some reason, because it gets that out of DRM_IOCTL_GET_UNIQUE but DRM_IOCTL_GET_UNIQUE is forbidden to render nodes.
>How-To-Repeat:
try to use /dev/dri/renderD<N>
>Fix:
1. return dminor->index, not 64*dminor->type + dminor->index -- the addition of 64*dminor->type is baked into dminor->index already

2. allow DRM_IOCTL_GET_UNIQUE on render nodes -- it doesn't leak anything interesting



Home | Main Index | Thread Index | Old Index