From nobody Thu Oct 2 04:51:49 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76059231832; Mon, 22 Sep 2025 14:39:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758551970; cv=none; b=YUFeC5ZbcAD3sJYU5qJ5VdmzW96l+TBLfPYgvTcqqqqFC96eY8SiapEwbyIqYBITAlLxLimWOGVHJqk9hMzs0K3UD2rMSVaTu61TzQzpY4gT6ct20xIiUJLNHpLHqpcdVMVxv2MF27v5XOmW/mWiNur4TVzJJkATYsT50fwjdz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758551970; c=relaxed/simple; bh=XUyYu1eYga/BDEMIdszJKKF+XHr9UK13KXG6TovG4ag=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=neLvQ/i4HsTH0w6+rWzZb1mHdnD/6HF+T3H2QZFW4QF4BvFDjYT3wwwkfHJ4BunuMWii3DfE0KNxZjpNI2R1r9jgFjeJxIi0gN6Fo5o4HZLqyaU5bcXpYvBdTFh5UMAxltgrriCjJCaB0oxm6pk0eMFIYPuhI+z525YawdjYblw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ewloeGIy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ewloeGIy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CF91C4CEF0; Mon, 22 Sep 2025 14:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758551970; bh=XUyYu1eYga/BDEMIdszJKKF+XHr9UK13KXG6TovG4ag=; h=Date:From:To:Cc:Subject:From; b=ewloeGIyQwxY+LI+JeKAaLxERVQuJ1tkHBJDwIzhbQZzaSdZQUODYxGFIszzIqg7j 7Uc58pCCruDgadAgm2SjK6Yy34evEi3+Qnw8V0hRRg6kIjl4OBdn1u5yekNy4dY6zv 9IwSOQE+YRqbbto6AybI1hzhksn4kyxiqbedo6mvhZp4a8LvR+tIxjbTQlxq0hNkz2 lki+jgF9fcjWgr2qKNnI+pCHYLfnRFyNy/d1d4Xu7/bzYo1+jkQfzz1tETGDFlOJUM bM2YGGtMQFgX3tZY0gicDqeZPZH/64S8E8FmyyztO2TSiF1C3aJbTn4q3M+TVTOpk5 SINPEeS8DE33Q== Date: Mon, 22 Sep 2025 16:39:20 +0200 From: "Gustavo A. R. Silva" To: John Fastabend , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH][next] tls: Avoid -Wflex-array-member-not-at-end warning Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the new TRAILING_OVERLAP() helper to fix the following warning: net/tls/tls.h:131:29: warning: structure containing a flexible array member= is not at the end of another structure [-Wflex-array-member-not-at-end] This helper creates a union between a flexible-array member (FAM) and a set of members that would otherwise follow it. This overlays the trailing members onto the FAM while preserving the original memory layout. Signed-off-by: Gustavo A. R. Silva --- net/tls/tls.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/tls/tls.h b/net/tls/tls.h index 4e077068e6d9..d06435d186c0 100644 --- a/net/tls/tls.h +++ b/net/tls/tls.h @@ -128,8 +128,9 @@ struct tls_rec { =20 char aad_space[TLS_AAD_SPACE_SIZE]; u8 iv_data[TLS_MAX_IV_SIZE]; - struct aead_request aead_req; - u8 aead_req_ctx[]; + TRAILING_OVERLAP(struct aead_request, aead_req, __ctx, + u8 aead_req_ctx[]; + ); }; =20 int __net_init tls_proc_init(struct net *net); --=20 2.43.0