From: Dan Rapaport Date: Mon, 30 May 2022 11:11:45 +0000 (+0300) Subject: habanalabs: align ioctl uapi structures to 64-bit X-Git-Tag: v6.0-rc1~136^2~27^2~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2acd21cd00ce635adfec5a8725a0c342812bffb4;p=thirdparty%2Fkernel%2Flinux.git habanalabs: align ioctl uapi structures to 64-bit The compiler is padding the members of the struct to be aligned to 64-bit. The content of the padded bytes is and not zeroed explicitly, hence might copy undefined data. We add a padding member to the struct to get a zeroed 64-bit align struct. Signed-off-by: Dan Rapaport Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index 52540d5b4fc95..6d2ccc09dcf2f 100644 --- a/include/uapi/misc/habanalabs.h +++ b/include/uapi/misc/habanalabs.h @@ -949,6 +949,7 @@ struct hl_cs_in { /* Context ID - Currently not in use */ __u32 ctx_id; + __u8 pad[4]; }; struct hl_cs_out {