drm/xe: Validate uAPI padding and reserved fields
authorChristopher Snowhill <kode54@gmail.com>
Thu, 25 May 2023 01:56:07 +0000 (18:56 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:34:01 +0000 (18:34 -0500)
commit1799c761c48059366f081adeef718fa13d4bb133
tree5f827d66de1cf8d2f991581e20cc235405fd46f6
parente2bd81af05cb6dc9cbf7a367a48e43316207dd0e
drm/xe: Validate uAPI padding and reserved fields

Padding and reserved fields are declared such that they must be
zeroed, so verify that they're all zero in the respective ioctl
functions.

Derived from original patch by mlankhorst.

v2:
Removed extensions checks where there were none originally. (José)
Moved extraneous parentheses to the correct places. (Lucas)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_engine.c
drivers/gpu/drm/xe/xe_exec.c
drivers/gpu/drm/xe/xe_mmio.c
drivers/gpu/drm/xe/xe_query.c
drivers/gpu/drm/xe/xe_sync.c
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm_madvise.c
drivers/gpu/drm/xe/xe_wait_user_fence.c