[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220605103316.3414541-2-ogabbay@kernel.org>
Date: Sun, 5 Jun 2022 13:33:11 +0300
From: Oded Gabbay <ogabbay@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Dan Rapaport <drapaport@...ana.ai>
Subject: [PATCH 2/7] habanalabs: align ioctl uapi structures to 64-bit
From: Dan Rapaport <drapaport@...ana.ai>
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 <drapaport@...ana.ai>
Reviewed-by: Oded Gabbay <ogabbay@...nel.org>
Signed-off-by: Oded Gabbay <ogabbay@...nel.org>
---
include/uapi/misc/habanalabs.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h
index 52540d5b4fc9..6d2ccc09dcf2 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 {
--
2.25.1
Powered by blists - more mailing lists