mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] drm: A couple of fixes for drm_copy_field() helper function
@ 2022-07-01 12:07 Javier Martinez Canillas
  2022-07-01 12:07 ` [PATCH 1/2] drm: Use size_t type for len variable in drm_copy_field() Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2022-07-01 12:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Robinson, Javier Martinez Canillas, Daniel Vetter,
	David Airlie, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, dri-devel

Hello,

Peter Robinson reported me a kernel bug in one of his aarch64 test boards
and even though I was not able to reproduce it, I think that figured out
what the problem was. It seems the cause is that a DRM driver doesn't set
some of the struct drm fields copied to userspace via DRM_IOCTL_VERSION.

Even though this is a driver bug, we can make drm_copy_field() more robust
and warn about it instead of leading to an attempt to copy a NULL pointer.

While looking at this, I also found that a variable in drm_copy_field() is
not using the correct type. So I included that change in the patch-set too.

Best regards,
Javier


Javier Martinez Canillas (2):
  drm: Use size_t type for len variable in drm_copy_field()
  drm: Prevent drm_copy_field() to attempt copying a NULL pointer

 drivers/gpu/drm/drm_ioctl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-07-04 14:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 12:07 [PATCH 0/2] drm: A couple of fixes for drm_copy_field() helper function Javier Martinez Canillas
2022-07-01 12:07 ` [PATCH 1/2] drm: Use size_t type for len variable in drm_copy_field() Javier Martinez Canillas
2022-07-04 12:27   ` Thomas Zimmermann
2022-07-01 12:07 ` [PATCH 2/2] drm: Prevent drm_copy_field() to attempt copying a NULL pointer Javier Martinez Canillas
2022-07-04 12:30   ` Thomas Zimmermann
2022-07-04 12:36     ` Javier Martinez Canillas
2022-07-04 12:55       ` Javier Martinez Canillas
2022-07-04 14:28         ` Thomas Zimmermann
2022-07-01 17:47 ` [PATCH 0/2] drm: A couple of fixes for drm_copy_field() helper function Peter Robinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®