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: <aNMCznixxL2veGxK@krikkit>
Date: Tue, 23 Sep 2025 22:27:58 +0200
From: Sabrina Dubroca <sd@...asysnail.net>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>,
	John Fastabend <john.fastabend@...il.com>,
	Jakub Kicinski <kuba@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] tls: Avoid -Wflex-array-member-not-at-end warning

2025-09-23, 11:37:55 +0200, Gustavo A. R. Silva wrote:
> 
> 
> On 9/22/25 17:21, Sabrina Dubroca wrote:
> > 2025-09-22, 16:39:20 +0200, Gustavo A. R. Silva wrote:
> > > -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.
> > 
> > Do we need to keep aead_req_ctx in tls_rec? It doesn't seem to be
> > used, and I don't see it ever being used since it was introduced in
> > commit a42055e8d2c3 ("net/tls: Add support for async encryption of
> > records for performance").
> 
> If this (flex array) is not going to be needed in the future, I'm
> happy to remove it. :)

I don't see what we'd use it for, aead_request.__ctx contains private
data from the crypto code (all accesses seem to be through
aead_request_ctx defined in include/crypto/internal/aead.h, see also
the kdoc: "Start of private context data").
And we haven't seen the author of a42055e8d2c3 in a while, so we can't
ask about the intention behind this field.

So IMO, tls_rec.aead_req_ctx can simply go away. Would you send the
patch?

-- 
Sabrina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ