Re: [PATCH] drm: pre-fill getfb2 modifier array with INVALID

2021-11-15 Thread Simon Ser
Hm indeed, RIP. I got confused by this one: /* Pre-FB_MODIFIERS userspace didn't clear the structs properly. */ if (!(r->flags & DRM_MODE_FB_MODIFIERS)) continue; But it's only run for unused planes.

Re: [PATCH] drm: pre-fill getfb2 modifier array with INVALID

2021-11-15 Thread Ville Syrjälä
On Mon, Nov 15, 2021 at 09:18:42AM +, Simon Ser wrote: > On Thursday, November 11th, 2021 at 13:50, Ville Syrjälä > wrote: > > > On Thu, Nov 11, 2021 at 10:10:54AM +, Simon Ser wrote: > > > User-space shouldn't look up the modifier array when the modifier > > > flag is missing, but at th

Re: [PATCH] drm: pre-fill getfb2 modifier array with INVALID

2021-11-15 Thread Simon Ser
On Thursday, November 11th, 2021 at 13:50, Ville Syrjälä wrote: > On Thu, Nov 11, 2021 at 10:10:54AM +, Simon Ser wrote: > > User-space shouldn't look up the modifier array when the modifier > > flag is missing, but at the moment no docs make this clear (working > > on it). Right now the mod

Re: [PATCH] drm: pre-fill getfb2 modifier array with INVALID

2021-11-11 Thread Ville Syrjälä
On Thu, Nov 11, 2021 at 10:10:54AM +, Simon Ser wrote: > User-space shouldn't look up the modifier array when the modifier > flag is missing, but at the moment no docs make this clear (working > on it). Right now the modifier array is pre-filled with zeroes, aka. > LINEAR. Instead, pre-fill wit

Re: [PATCH] drm: pre-fill getfb2 modifier array with INVALID

2021-11-11 Thread Daniel Stone
On Thu, 11 Nov 2021 at 10:11, Simon Ser wrote: > User-space shouldn't look up the modifier array when the modifier > flag is missing, but at the moment no docs make this clear (working > on it). Right now the modifier array is pre-filled with zeroes, aka. > LINEAR. Instead, pre-fill with INVALID t

Re: [PATCH] drm: pre-fill getfb2 modifier array with INVALID

2021-11-11 Thread Pekka Paalanen
On Thu, 11 Nov 2021 10:10:54 + Simon Ser wrote: > User-space shouldn't look up the modifier array when the modifier > flag is missing, but at the moment no docs make this clear (working > on it). Right now the modifier array is pre-filled with zeroes, aka. > LINEAR. Instead, pre-fill with INV

[PATCH] drm: pre-fill getfb2 modifier array with INVALID

2021-11-11 Thread Simon Ser
User-space shouldn't look up the modifier array when the modifier flag is missing, but at the moment no docs make this clear (working on it). Right now the modifier array is pre-filled with zeroes, aka. LINEAR. Instead, pre-fill with INVALID to avoid footguns. This is a uAPI change, but OTOH any u