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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251114104804.24b58b0f@gandalf.local.home>
Date: Fri, 14 Nov 2025 10:48:04 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: David Laight <david.laight.linux@...il.com>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>, Josh Poimboeuf
 <jpoimboe@...nel.org>, Kees Cook <kees@...nel.org>, "Gustavo A. R. Silva"
 <gustavoars@...nel.org>, linux-kernel@...r.kernel.org,
 linux-hardening@...r.kernel.org
Subject: Re: [PATCH] unwind deferred: Annotate struct unwind_cache with
 __counted_by

On Fri, 14 Nov 2025 15:02:09 +0000
David Laight <david.laight.linux@...il.com> wrote:

> > +/* Make the cache fit in a 4K page */
> > +#define UNWIND_MAX_ENTRIES					\
> > +	((SZ_4K - offset_of(struct unwind_cache, entries)) / sizeof(long))
> > +
> >  struct unwind_cache {
> >  	unsigned long		unwind_completed;
> >  	unsigned int		nr_entries;
> > -	unsigned long		entries[];
> > +	unsigned long		entries[UNWIND_MAX_ENTRIES];  
> 
> That won't compile - I tried it.
> 
> You could add __aligned(4096) to force the structure to be padded to 4k,
> and then define UNWIND_MAX_ENTRIES in terms of the structure size.

I rather not do more tricks than what a comment would solve.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ