Drop redundant bzero() calls. ses_ghash is allocated with M_ZERO, so
authorvisa <visa@openbsd.org>
Fri, 23 Feb 2018 15:41:08 +0000 (15:41 +0000)
committervisa <visa@openbsd.org>
Fri, 23 Feb 2018 15:41:08 +0000 (15:41 +0000)
it is unnecessary to zero the struct's fields right after allocation.

OK mikeb@

sys/arch/amd64/amd64/aesni.c

index 60f05f6..e2e4ffd 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: aesni.c,v 1.42 2017/09/08 05:36:51 deraadt Exp $      */
+/*     $OpenBSD: aesni.c,v 1.43 2018/02/23 15:41:08 visa Exp $ */
 /*-
  * Copyright (c) 2003 Jason Wright
  * Copyright (c) 2003, 2004 Theo de Raadt
@@ -251,10 +251,6 @@ aesni_newsession(u_int32_t *sidp, struct cryptoini *cri)
                                return (ENOMEM);
                        }
 
-                       bzero(ses->ses_ghash->H, GMAC_BLOCK_LEN);
-                       bzero(ses->ses_ghash->S, GMAC_BLOCK_LEN);
-                       bzero(ses->ses_ghash->Z, GMAC_BLOCK_LEN);
-
                        /* prepare a hash subkey */
                        aesni_enc(ses, ses->ses_ghash->H, ses->ses_ghash->H);
                        break;