[PATCH 20/31] drm/i915/gem: Make an alignment check more sensible

2021-06-09 Thread Jason Ekstrand
What we really want to check is that size of the engines array, i.e. args->size - sizeof(*user) is divisible by the element size, i.e. sizeof(*user->engines) because that's what's required for computing the array length right below the check. However, we're currently not doing this and instead

[PATCH 20/31] drm/i915/gem: Make an alignment check more sensible

2021-06-08 Thread Jason Ekstrand
What we really want to check is that size of the engines array, i.e. args->size - sizeof(*user) is divisible by the element size, i.e. sizeof(*user->engines) because that's what's required for computing the array length right below the check. However, we're currently not doing this and instead