From: Oded Gabbay <ogabbay@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Dan Rapaport <drapaport@habana.ai>
Subject: [PATCH 2/7] habanalabs: align ioctl uapi structures to 64-bit
Date: Sun, 5 Jun 2022 13:33:11 +0300 [thread overview]
Message-ID: <20220605103316.3414541-2-ogabbay@kernel.org> (raw)
In-Reply-To: <20220605103316.3414541-1-ogabbay@kernel.org>
From: Dan Rapaport <drapaport@habana.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@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.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
next prev parent reply other threads:[~2022-06-05 10:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 10:33 [PATCH 1/7] habanalabs: add terminating NULL to attrs arrays Oded Gabbay
2022-06-05 10:33 ` Oded Gabbay [this message]
2022-06-05 10:33 ` [PATCH 3/7] habanalabs/gaudi: move tpc assert raise into internal func Oded Gabbay
2022-06-05 10:33 ` [PATCH 4/7] habanalabs: change the write flag name of error info structs Oded Gabbay
2022-06-05 10:33 ` [PATCH 5/7] habanalabs/gaudi: fix comment to reflect current code Oded Gabbay
2022-06-05 10:33 ` [PATCH 6/7] habanalabs: keep a record of completed CS outcomes Oded Gabbay
2022-06-05 10:33 ` [PATCH 7/7] habanalabs: fix race between hl_get_compute_ctx() and hl_ctx_put() Oded Gabbay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220605103316.3414541-2-ogabbay@kernel.org \
--to=ogabbay@kernel.org \
--cc=drapaport@habana.ai \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®