Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/crypto/aes/arch/x86 Initialize authctr in both branches.



details:   https://anonhg.NetBSD.org/src/rev/56c75315f29b
branches:  trunk
changeset: 936510:56c75315f29b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jul 28 14:01:35 2020 +0000

description:
Initialize authctr in both branches.

I guess I didn't test the unaligned case, weird.

diffstat:

 sys/crypto/aes/arch/x86/aes_via.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r fd05d6ba3e54 -r 56c75315f29b sys/crypto/aes/arch/x86/aes_via.c
--- a/sys/crypto/aes/arch/x86/aes_via.c Tue Jul 28 10:29:30 2020 +0000
+++ b/sys/crypto/aes/arch/x86/aes_via.c Tue Jul 28 14:01:35 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aes_via.c,v 1.5 2020/07/25 22:31:32 riastradh Exp $    */
+/*     $NetBSD: aes_via.c,v 1.6 2020/07/28 14:01:35 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.5 2020/07/25 22:31:32 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.6 2020/07/28 14:01:35 riastradh Exp $");
 
 #ifdef _KERNEL
 #include <sys/types.h>
@@ -739,6 +739,7 @@
                authctr = authctrbuf;
                ccmenc_unaligned_evcnt.ev_count++;
        } else {
+               authctr = authctr0;
                ccmenc_aligned_evcnt.ev_count++;
        }
        c0 = le32dec(authctr0 + 16 + 4*0);
@@ -812,6 +813,7 @@
                le32enc(authctr + 16 + 4*2, c2);
                ccmdec_unaligned_evcnt.ev_count++;
        } else {
+               authctr = authctr0;
                ccmdec_aligned_evcnt.ev_count++;
        }
 



Home | Main Index | Thread Index | Old Index