Date: Thu, 22 Aug 2019 09:46:33 -0700 From: John Baldwin <jhb@FreeBSD.org> To: "Bjoern A. Zeeb" <bz@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r351364 - in head/sys: crypto/blowfish crypto/chacha20 crypto/des opencrypto Message-ID: <0b9d1aa1-d328-30bc-b939-f1407e236855@FreeBSD.org> In-Reply-To: <DC49D260-C049-47F3-ADFA-76D793212E16@FreeBSD.org> References: <201908220002.x7M028Jh070116@repo.freebsd.org> <DC49D260-C049-47F3-ADFA-76D793212E16@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/22/19 2:39 AM, Bjoern A. Zeeb wrote: > On 22 Aug 2019, at 0:02, John Baldwin wrote: > > Hi, > >> Author: jhb >> Date: Thu Aug 22 00:02:08 2019 >> New Revision: 351364 >> URL: https://svnweb.freebsd.org/changeset/base/351364 >> >> Log: >> Use 'const' for keys and IVs passed to software encryption >> algorithms. >> >> Specifically, use 'const' for the key passed to the 'setkey' method >> and 'const' for the 'iv' passed to the 'reinit' method. >> >> Reviewed by: cem >> Sponsored by: Chelsio Communications >> Differential Revision: https://reviews.freebsd.org/D21347 > > can you please review and commit this one to make gcc platforms a bit > more happy again (I tested a sparc64 GENERIC kernel build): I will get tinderbox happy. > Index: sys/opencrypto/xform_des3.c > =================================================================== > --- sys/opencrypto/xform_des3.c (revision 351384) > +++ sys/opencrypto/xform_des3.c (working copy) > @@ -100,9 +100,9 @@ des3_setkey(u_int8_t **sched, const u_int8_t *key, > p = KMALLOC(3*sizeof (des_key_schedule), > M_CRYPTO_DATA, M_NOWAIT|M_ZERO); > if (p != NULL) { > - des_set_key((const des_cblock *)(key + 0), p[0]); > - des_set_key((const des_cblock *)(key + 8), p[1]); > - des_set_key((const des_cblock *)(key + 16), p[2]); > + des_set_key(__DEQUALIFY(const des_cblock *,(key + 0)), p[0]); > + des_set_key(__DEQUALIFY(const des_cblock *,(key + 8)), p[1]); > + des_set_key(__DEQUALIFY(const des_cblock *,(key + 16)), p[2]); This makes no sense. Why are you removing const only to add it back again? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0b9d1aa1-d328-30bc-b939-f1407e236855>