Date: Thu, 26 May 2016 22:35:34 -0400 From: Allan Jude <allanjude@freebsd.org> To: "Conrad E. Meyer" <cem@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: "gjb >> Glen Barber" <gjb@FreeBSD.org> Subject: Re: svn commit: r300773 - in head/sys: crypto crypto/aesni crypto/sha2 crypto/siphash kern sys Message-ID: <0f2c3d10-d2dd-3f76-982f-91fbeeb5f3db@freebsd.org> In-Reply-To: <201605261929.u4QJTTV5085421@repo.freebsd.org> References: <201605261929.u4QJTTV5085421@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-05-26 15:29, Conrad E. Meyer wrote: > Author: cem > Date: Thu May 26 19:29:29 2016 > New Revision: 300773 > URL: https://svnweb.freebsd.org/changeset/base/300773 > > Log: > crypto routines: Hint minimum buffer sizes to the compiler > > Use the C99 'static' keyword to hint to the compiler IVs and output digest > sizes. The keyword informs the compiler of the minimum valid size for a given > array. Obviously not every pointer can be validated (i.e., the compiler can > produce false negative but not false positive reports). > > No functional change. No ABI change. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/crypto/aesni/aesni.h > head/sys/crypto/aesni/aesni_wrap.c > head/sys/crypto/sha1.c > head/sys/crypto/sha1.h > head/sys/crypto/sha2/sha256.h > head/sys/crypto/sha2/sha256c.c > head/sys/crypto/sha2/sha384.h > head/sys/crypto/sha2/sha512.h > head/sys/crypto/sha2/sha512c.c > head/sys/crypto/siphash/siphash.c > head/sys/crypto/siphash/siphash.h > head/sys/kern/md4c.c > head/sys/kern/md5c.c > head/sys/sys/md4.h > head/sys/sys/md5.h > > Modified: head/sys/sys/md5.h > ============================================================================== > --- head/sys/sys/md5.h Thu May 26 19:17:51 2016 (r300772) > +++ head/sys/sys/md5.h Thu May 26 19:29:29 2016 (r300773) > @@ -44,10 +44,6 @@ typedef struct MD5Context { > __BEGIN_DECLS > void MD5Init (MD5_CTX *); > void MD5Update (MD5_CTX *, const void *, unsigned int); > -void MD5Final (unsigned char [16], MD5_CTX *); > -char * MD5End(MD5_CTX *, char *); > -char * MD5File(const char *, char *); > -char * MD5FileChunk(const char *, char *, off_t, off_t); > -char * MD5Data(const void *, unsigned int, char *); > +void MD5Final (unsigned char[static MD5_DIGEST_LENGTH], MD5_CTX *); > __END_DECLS > #endif /* _SYS_MD5_H_ */ > This seems to have broken on sparc64, and other gcc based arches: ===> lib/libc (obj,all,install) In file included from /usr/src/lib/libc/../libmd/md5.h:40, from /usr/src/lib/libc/../libmd/md5c.c:42: /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/sys/md5.h:47: error: static or type qualifiers in abstract declarator --- md5c.o --- *** [md5c.o] Error code 1 -- Allan Jude
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0f2c3d10-d2dd-3f76-982f-91fbeeb5f3db>