From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 4C9805A0622; Tue, 28 Jan 2025 00:15:32 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 3/7] tcp_conn: Avoid 7-bit hole in struct tcp_splice_conn Date: Tue, 28 Jan 2025 00:15:28 +0100 Message-ID: <20250127231532.672363-4-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250127231532.672363-1-sbrivio@redhat.com> References: <20250127231532.672363-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: VRPKEARDL7OQCQZB5QBCUFZPKQ2WZTZC X-Message-ID-Hash: VRPKEARDL7OQCQZB5QBCUFZPKQ2WZTZC X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier , David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Moving in_epoll out of the common flow data created a 7-bit hole in struct tcp_splice_conn: repack by shrinking @flags by one (otherwise unused) bit. Fixes: b60fa33eeafb ("tcp: Move in_epoll flag out of common connection structure") Signed-off-by: Stefano Brivio --- tcp_conn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp_conn.h b/tcp_conn.h index d342680..3d06e2c 100644 --- a/tcp_conn.h +++ b/tcp_conn.h @@ -125,7 +125,7 @@ struct tcp_splice_conn { #define FIN_RCVD(sidei_) ((sidei_) ? BIT(5) : BIT(4)) #define FIN_SENT(sidei_) ((sidei_) ? BIT(7) : BIT(6)) - uint8_t flags; + uint8_t flags :7; #define RCVLOWAT_SET(sidei_) ((sidei_) ? BIT(1) : BIT(0)) #define RCVLOWAT_ACT(sidei_) ((sidei_) ? BIT(3) : BIT(2)) #define CLOSING BIT(4) -- 2.43.0