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: <aSEj0GvbFjwlDbVM@gondor.apana.org.au>
Date: Sat, 22 Nov 2025 10:45:36 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: torvalds@...ux-foundation.org, ebiggers@...nel.org, ardb@...nel.org,
	kees@...nel.org, linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jason@...c4.com
Subject: Re: [PATCH libcrypto v2 2/3] compiler: introduce at_least parameter
 decoration pseudo keyword

Jason A. Donenfeld <Jason@...c4.com> wrote:
>
> +/*
> + * This designates the minimum number of elements a passed array parameter must
> + * have. For example:
> + *
> + *     void some_function(u8 param[at_least 7]);
> + * 
> + * If a caller passes an array with fewer than 7 elements, the compiler will
> + * emit a warning.
> + */
> +#define at_least static

Please make this conditional on __CHECKER__ as sparse still chokes
on the following which compiles fine with gcc and clang:

int foo(int n, int a[static n])
{
	return a[0]++;
}

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ