Files
android_kernel_xiaomi_sm8450/drivers/gpu/drm
Emil Velikov 45bc3d26c9 drm: rework SET_MASTER and DROP_MASTER perm handling
This commit reworks the permission handling of the two ioctls. In
particular it enforced the CAP_SYS_ADMIN check only, if:
 - we're issuing the ioctl from process other than the one which opened
the node, and
 - we are, or were master in the past

This ensures that we:
 - do not regress the systemd-logind style of DRM_MASTER arbitrator
 - allow applications which do not use systemd-logind to drop their
master capabilities (and regain them at later point) ... w/o running as
root.

See the comment above drm_master_check_perm() for more details.

v1:
 - Tweak wording, fixup all checks, add igt test

v2:
 - Add a few more comments, grammar nitpicks.

Cc: Adam Jackson <ajax@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Testcase: igt/core_setmaster/master-drop-set-user
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200319172930.230583-1-emil.l.velikov@gmail.com
2020-03-30 12:20:32 +01:00
..
2020-03-02 09:22:43 +01:00
2020-03-26 15:48:34 +01:00
2020-03-26 15:45:36 +01:00
2020-03-26 16:05:12 +01:00
2020-03-02 09:22:49 +01:00
2020-03-28 21:18:42 +01:00
2020-03-26 14:50:05 +01:00
2020-03-26 16:09:40 +01:00
2020-03-26 15:18:11 +01:00
2020-03-26 15:45:36 +01:00
2020-03-26 15:45:36 +01:00
2020-03-26 15:45:36 +01:00
2020-03-16 09:26:18 +01:00
2020-03-26 16:09:48 +01:00
2020-03-26 15:38:09 +01:00
2020-03-16 09:27:09 +01:00
2020-03-09 09:22:50 +00:00
2020-03-18 14:48:34 +01:00