Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2019 09:53:05 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        "Bjoern A. Zeeb" <bz@freebsd.org>, src-committers <src-committers@freebsd.org>,  svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r351364 - in head/sys: crypto/blowfish crypto/chacha20 crypto/des opencrypto
Message-ID:  <CANCZdfq7FOsQNkpRgHZP3yzxhfcGv5gLOzco7tGttTVSrETOfQ@mail.gmail.com>
In-Reply-To: <0b9d1aa1-d328-30bc-b939-f1407e236855@FreeBSD.org>
References:  <201908220002.x7M028Jh070116@repo.freebsd.org> <DC49D260-C049-47F3-ADFA-76D793212E16@FreeBSD.org> <0b9d1aa1-d328-30bc-b939-f1407e236855@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry for top posting...

I had planned this for next week, but I think give this insanity of this
patch, we  should do it now: turn off -Werror for gcc 4.2.1

https://reviews.freebsd.org/D21378

has the review. There's no benefit to these head-scratcher changes when we
can get the same benefit by ignoring gcc 4.2.1 errors as discussed on arch@.

Warner

On Thu, Aug 22, 2019 at 10:46 AM John Baldwin <jhb@freebsd.org> wrote:

> 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?CANCZdfq7FOsQNkpRgHZP3yzxhfcGv5gLOzco7tGttTVSrETOfQ>