1 |
On Monday, December 19, 2016 3:35:24 PM EST Ian Zimmerman wrote: |
2 |
> On 2016-12-18 22:43, Ian Zimmerman wrote: |
3 |
> > But now I hit the error chronicled at [2]. A look at kernel source, in |
4 |
> > drivers/gpu/drm/drm_ioctl.c, shows that the relevant kernel ioctl is |
5 |
> > |
6 |
> > declared thus: |
7 |
> > DRM_IOCTL_DEF(DRM_IOCTL_SET_MASTER, drm_setmaster_ioctl, DRM_ROOT_ONLY), |
8 |
> |
9 |
> And the answer is .. OF COURSE!! .. systemd. |
10 |
> |
11 |
> With systemd integration, the get_drm_info() function in xorg source file |
12 |
> hw/xfree86/os-support/linux/lnx_platform.c sets the server_fd flag, |
13 |
> which makes it do this later: |
14 |
> |
15 |
> if (server_fd) |
16 |
> xf86_platform_devices[delayed_index].flags |= XF86_PDEV_SERVER_FD; |
17 |
> |
18 |
> .. which makes the radeon_set_drm_master() function in xf86-video-ati |
19 |
> file src/radeon_kms.c immediately return TRUE and bypass the failing |
20 |
> ioctl(DRM_IOCTL_SET_MASTER). |
21 |
> |
22 |
> So now I know that my only way to non-suid (and anyone else with similar |
23 |
> hardware and without systemd) is to patch the X source, and/or the |
24 |
> kernel source. I'll probably take a few days break from this issue |
25 |
> pondering if it's worth it. |
26 |
|
27 |
Patch it, test it, file a bug report and supply your patch. Seems to me you |
28 |
found a legitimate bug. |