netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: netdev@vger.kernel.org
Cc: Matt Johnston <matt@codeconstruct.com.au>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Eugene Syromiatnikov <esyr@redhat.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH net 2/2] mctp: Be explicit about struct sockaddr_mctp padding
Date: Mon, 18 Oct 2021 11:29:35 +0800	[thread overview]
Message-ID: <20211018032935.2092613-2-jk@codeconstruct.com.au> (raw)
In-Reply-To: <20211018032935.2092613-1-jk@codeconstruct.com.au>

We currently have some implicit padding in struct sockaddr_mctp. This
patch makes this padding explicit, and ensures we have consistent
layout on platforms with <32bit alignmnent.

Fixes: 60fc63981693 ("mctp: Add sockaddr_mctp to uapi")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
---
 include/uapi/linux/mctp.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/mctp.h b/include/uapi/linux/mctp.h
index f384962d8ff2..6acd4ccafbf7 100644
--- a/include/uapi/linux/mctp.h
+++ b/include/uapi/linux/mctp.h
@@ -20,10 +20,12 @@ struct mctp_addr {
 
 struct sockaddr_mctp {
 	__kernel_sa_family_t	smctp_family;
+	__u16			__smctp_pad0;
 	unsigned int		smctp_network;
 	struct mctp_addr	smctp_addr;
 	__u8			smctp_type;
 	__u8			smctp_tag;
+	__u8			__smctp_pad1;
 };
 
 #define MCTP_NET_ANY		0x0
-- 
2.30.2


  reply	other threads:[~2021-10-18  3:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  3:29 [PATCH net 1/2] mctp: unify sockaddr_mctp types Jeremy Kerr
2021-10-18  3:29 ` Jeremy Kerr [this message]
2021-10-18 12:51   ` [PATCH net 2/2] mctp: Be explicit about struct sockaddr_mctp padding Eugene Syromiatnikov
2021-10-18 12:00 ` [PATCH net 1/2] mctp: unify sockaddr_mctp types Eugene Syromiatnikov
2021-10-18 13:00 ` patchwork-bot+netdevbpf

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=20211018032935.2092613-2-jk@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=davem@davemloft.net \
    --cc=esyr@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=kuba@kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).