lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <af0a1f2194fc9a6f8a95cf6c82277b8b0377d029.1679311226.git.geert@linux-m68k.org>
Date:   Mon, 20 Mar 2023 12:21:56 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
Cc:     Arnd Bergmann <arnd@...db.de>, linux-nvme@...ts.infradead.org,
        linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH] nvme-tcp: Fix implicit padding in struct nvme_tcp_term_pdu

On m68k:

    drivers/nvme/host/tcp.c: In function ‘nvme_tcp_init_module’:
    include/linux/compiler_types.h:397:38: error: call to ‘__compiletime_assert_723’ declared with attribute error: BUILD_BUG_ON failed: sizeof(struct nvme_tcp_term_pdu) != 24

Indeed, on m68k the minimum alignment is 2 bytes, not 4 bytes, thus
triggering the check added in commit 7e87965d3807ab1f ("nvme-tcp: add
nvme-tcp pdu size build protection"), and indicating that NVMe over
Fabrics TCP on m68k must be incompatible with other platforms.

Fix this by adding explicit padding.

Fixes: fc221d05447aa6db ("nvme-tcp: Add protocol header")
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
 include/linux/nvme-tcp.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/nvme-tcp.h b/include/linux/nvme-tcp.h
index 75470159a194d97f..ba8f82672e39730f 100644
--- a/include/linux/nvme-tcp.h
+++ b/include/linux/nvme-tcp.h
@@ -115,6 +115,7 @@ struct nvme_tcp_icresp_pdu {
 struct nvme_tcp_term_pdu {
 	struct nvme_tcp_hdr	hdr;
 	__le16			fes;
+	__u8			rsvd2[2];
 	__le32			fei;
 	__u8			rsvd[8];
 };
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ