On Tue, Mar 3, 2026 at 12:17 PM Michel Dänzer
<[email protected]> wrote:
>
> While I don't object to this change, I'd argue that this is really a 
> workaround for broken user space, not a fix for a kernel regression.
>
> User space must initialize the full struct to 0, except for the fields it 
> wants to have other values. This kind of kernel-side workaround for 
> neglecting that won't be possible in all cases.

When the code in my example was written, the points field did not
exist. Therefore, as far as that code is concerned, the authors
believed that the struct was fully initialized, since they manually
initialized all fields that were contained in the struct at that time.
The code was then later recompiled against a version of drm/drm.h that
contained the new field.

Or are you saying that userspace must always use memset(&arg, 0,
sizeof(arg)) to initialize ioctl arguments? If so, ioctl(2) does not
mention this.

Reply via email to