From: "Jason A. Donenfeld" Subject: Re: [PATCH net-next v5 07/20] zinc: Poly1305 generic C implementations and selftest Date: Wed, 19 Sep 2018 03:39:11 +0200 Message-ID: References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-8-Jason@zx2c4.com> <20180919005054.GC74746@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Jean-Philippe Aumasson To: Eric Biggers Return-path: In-Reply-To: <20180919005054.GC74746@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org > > + const size_t num = ctx->num % POLY1305_BLOCK_SIZE; > 0 <= ctx->num < POLY1305_BLOCK_SIZE, so no need to mod by POLY1305_BLOCK_SIZE. > > + size_t num = ctx->num % POLY1305_BLOCK_SIZE; > Same here. I know, but I was having a hard time convincing gcc-8 of that invariant, and it was warning me. Perhaps this is something they fixed, though, between 8.1 and 8.2 though. I'll check back and adjust accordingly.