<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div dir="auto">Well this is still a NAK.
<div dir="auto"><br>
</div>
<div dir="auto">As stated previously please just don't remove DRM_AUTH and keep the functionality as it is.</div>
<div dir="auto"><br>
</div>
<div dir="auto">I absolutely don't see the point to add a new flag to remove the same functionality a different flag provides.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Christian.</div>
</div>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">Am 03.07.2019 15:30 schrieb Emil Velikov <emil.l.velikov@gmail.com>:<br type="attribution">
</div>
</div>
</div>
<font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: Emil Velikov <emil.velikov@collabora.com><br>
<br>
With earlier commits we've removed DRM_AUTH for driver ioctls annotated<br>
with DRM_AUTH | DRM_RENDER_ALLOW, as the protection it introduces is<br>
effectively not existent.<br>
<br>
With next commit, we'll effectively do the same for DRM core.<br>
<br>
Yet the AMD developers have voiced concerns that by doing so, developers<br>
working on the closed source user-space driver might remove render node<br>
support.<br>
<br>
Since we do _not_ want that to happen, add workaround for those two<br>
drivers<br>
<br>
Cc: Alex Deucher <alexander.deucher@amd.com><br>
Cc: Christian König <christian.koenig@amd.com><br>
Cc: amd-gfx@lists.freedesktop.org<br>
Cc: Daniel Vetter <daniel@ffwll.ch><br>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com><br>
---<br>
Christian, Alex this is the cleaner way to handle AMDGPU/radeon although<br>
if you prefer alternative methods let me know.<br>
<br>
Review, acks and others are appreciated, since I'd like to get this<br>
through the drm-misc tree.<br>
<br>
Thanks<br>
Emil<br>
<br>
Unrelated:<br>
The USE_AGP flag in AMDGPU should be nuked. While for radeon, one can<br>
copy in the driver the 10-20 lines worth of agp_init/release and also<br>
drop the flag.<br>
<br>
Bonus points of agp_init code gets a LEGACY check alongside the USE_AGP<br>
one.<br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-<br>
drivers/gpu/drm/radeon/radeon_drv.c | 2 +-<br>
include/drm/drm_drv.h | 10 ++++++++++<br>
3 files changed, 12 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
index 8e1b269351e8..cfc2ef11330c 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
@@ -1307,7 +1307,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,<br>
<br>
static struct drm_driver kms_driver = {<br>
.driver_features =<br>
- DRIVER_USE_AGP | DRIVER_ATOMIC |<br>
+ DRIVER_USE_AGP | DRIVER_ATOMIC | DRIVER_FORCE_AUTH |<br>
DRIVER_GEM |<br>
DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ,<br>
.load = amdgpu_driver_load_kms,<br>
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c<br>
index 4403e76e1ae0..5a1bfad1ad5e 100644<br>
--- a/drivers/gpu/drm/radeon/radeon_drv.c<br>
+++ b/drivers/gpu/drm/radeon/radeon_drv.c<br>
@@ -538,7 +538,7 @@ radeon_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,<br>
<br>
static struct drm_driver kms_driver = {<br>
.driver_features =<br>
- DRIVER_USE_AGP | DRIVER_GEM | DRIVER_RENDER,<br>
+ DRIVER_USE_AGP | DRIVER_GEM | DRIVER_RENDER | DRIVER_FORCE_AUTH,<br>
.load = radeon_driver_load_kms,<br>
.open = radeon_driver_open_kms,<br>
.postclose = radeon_driver_postclose_kms,<br>
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h<br>
index b33f2cee2099..5fb2846396bc 100644<br>
--- a/include/drm/drm_drv.h<br>
+++ b/include/drm/drm_drv.h<br>
@@ -92,6 +92,16 @@ enum drm_driver_feature {<br>
* synchronization of command submission.<br>
*/<br>
DRIVER_SYNCOBJ_TIMELINE = BIT(6),<br>
+ /**<br>
+ * @DRIVER_FORCE_AUTH:<br>
+ *<br>
+ * Driver mandates that DRM_AUTH is honoured, even if the same ioctl<br>
+ * is exposed via the render node - aka any of an "authentication" is<br>
+ * a fallacy.<br>
+ *<br>
+ * Used only by amdgpu and radeon. Do not use.<br>
+ */<br>
+ DRIVER_FORCE_AUTH = BIT(7),<br>
<br>
/* IMPORTANT: Below are all the legacy flags, add new ones above. */<br>
<br>
-- <br>
2.21.0<br>
<br>
</div>
</span></font>
</body>
</html>