* [PATCH] drm: Suppress user controlled spam for invalid drm_wait_vblank_ioctl
@ 2018-09-04 11:57 Chris Wilson
2018-09-04 13:08 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2018-09-04 11:57 UTC (permalink / raw)
To: dri-devel; +Cc: Daniel Vetter
The ioctl arguments are under control of the user and as such we should
resist any temptation to flood the kernel logs with their errors.
Relegate the DRM_ERROR to a DRM_DEBUG so the user has to opt into
hearing of their own mistakes. (One day we will have a small ringbuffer
attached to the task, so that the concerned process can inspect its own
debug info for EINVAL without them being hitting syslog at all.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/drm_vblank.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 28cdcf76b6f9..a528920542ca 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1541,7 +1541,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data,
if (vblwait->request.type &
~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
_DRM_VBLANK_HIGH_CRTC_MASK)) {
- DRM_ERROR("Unsupported type value 0x%x, supported mask 0x%x\n",
+ DRM_DEBUG("Unsupported type value 0x%x, supported mask 0x%x\n",
vblwait->request.type,
(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
_DRM_VBLANK_HIGH_CRTC_MASK));
--
2.19.0.rc1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: Suppress user controlled spam for invalid drm_wait_vblank_ioctl
2018-09-04 11:57 [PATCH] drm: Suppress user controlled spam for invalid drm_wait_vblank_ioctl Chris Wilson
@ 2018-09-04 13:08 ` Daniel Vetter
2018-09-04 18:53 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2018-09-04 13:08 UTC (permalink / raw)
To: Chris Wilson; +Cc: Daniel Vetter, dri-devel
On Tue, Sep 04, 2018 at 12:57:19PM +0100, Chris Wilson wrote:
> The ioctl arguments are under control of the user and as such we should
> resist any temptation to flood the kernel logs with their errors.
> Relegate the DRM_ERROR to a DRM_DEBUG so the user has to opt into
> hearing of their own mistakes. (One day we will have a small ringbuffer
> attached to the task, so that the concerned process can inspect its own
> debug info for EINVAL without them being hitting syslog at all.)
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
igt for this would be lovely. Either way Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_vblank.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 28cdcf76b6f9..a528920542ca 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -1541,7 +1541,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data,
> if (vblwait->request.type &
> ~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
> _DRM_VBLANK_HIGH_CRTC_MASK)) {
> - DRM_ERROR("Unsupported type value 0x%x, supported mask 0x%x\n",
> + DRM_DEBUG("Unsupported type value 0x%x, supported mask 0x%x\n",
> vblwait->request.type,
> (_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
> _DRM_VBLANK_HIGH_CRTC_MASK));
> --
> 2.19.0.rc1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: Suppress user controlled spam for invalid drm_wait_vblank_ioctl
2018-09-04 13:08 ` Daniel Vetter
@ 2018-09-04 18:53 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2018-09-04 18:53 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Daniel Vetter, dri-devel
Quoting Daniel Vetter (2018-09-04 14:08:12)
> On Tue, Sep 04, 2018 at 12:57:19PM +0100, Chris Wilson wrote:
> > The ioctl arguments are under control of the user and as such we should
> > resist any temptation to flood the kernel logs with their errors.
> > Relegate the DRM_ERROR to a DRM_DEBUG so the user has to opt into
> > hearing of their own mistakes. (One day we will have a small ringbuffer
> > attached to the task, so that the concerned process can inspect its own
> > debug info for EINVAL without them being hitting syslog at all.)
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> igt for this would be lovely. Either way Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Pushed and negative igt sent.
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-04 18:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 11:57 [PATCH] drm: Suppress user controlled spam for invalid drm_wait_vblank_ioctl Chris Wilson
2018-09-04 13:08 ` Daniel Vetter
2018-09-04 18:53 ` Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.