Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp149329imm; Tue, 18 Sep 2018 18:42:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZxkAv+Z5zn73oIG4RGlXNpWMzMcVohX0nE+Tch9EbxotxoVMG/DG16AQJQVusbRVkqym0b X-Received: by 2002:a62:c8d2:: with SMTP id i79-v6mr33265736pfk.35.1537321342793; Tue, 18 Sep 2018 18:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537321342; cv=none; d=google.com; s=arc-20160816; b=Ss6FH0ptJqJtQuS+FuyUJorNU5y+JuwgWx7CPAPj+ZkI+Ql8wfBj716R244rsovn+K pf69nuERAwoXZvdp03AKVQLvpfNv/BVAIy42xo4GkQZKjlHHbz18vSM1zPDJIW3QDQBK WdvGnvMLemJASCcIUF0Y4JjEv3bwiYll3FUtlvett/wEOk6GhuTxFGmY/KQWqGH+zO7r tuBAJGP6mnxseoZfyyirxPFtVZ0C1TokiVsalrxoE9F1ksbr33Bg5BSzHytcGnRidYou VW5AW5iNXA6JLlMtGSvJMbgtitzkgfjxO96oFHTDBD7XSXSlbk0spzTCITRV/Ls9yqaF 03uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=R8hNeL61wkKCHUg54vlmg+sxPEvWN0n6Ua7PkKAs5oY=; b=mxu+sN7JSa4dlr2rR9Sq9WeXivtVa20AaAWosgFEWjlkT52kkqnAEAVRisS4K8lnml aZbxecYT9Bedum325MCIYkOKXWEooSMB/Gl0BisP0FPNZPp3mKYk+B49Ejdb12ZbucfB 1mOnCrQXtG0apmjybzTZEwpQKTAbzsPTvh172kiO1LHcobMCvFES4ktV6zb1MkDEm4H0 /CsRN/aoKG1U8/Ybxc5aQz3jdYvonMkLJsGgdH4coZ+cp7FzjB2TzwFXczg8m4LFJQjp rJczsrcMxW7dS+5XamZ8a88DbaGVUvwbTskrJsgWNyyRP86IrHM8YNtU47ojg90EzpIW n5BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=IOMxCuLg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t190-v6si21268613pfb.344.2018.09.18.18.42.07; Tue, 18 Sep 2018 18:42:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=IOMxCuLg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730706AbeISHRV (ORCPT + 99 others); Wed, 19 Sep 2018 03:17:21 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:35637 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbeISHRU (ORCPT ); Wed, 19 Sep 2018 03:17:20 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 89f17502; Wed, 19 Sep 2018 01:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=roU98NU/fqkKhou3AKEgPNOhq+c=; b=IOMxCu Lg7ydYc+7qb+CeBZpqjlw/x81Pqd8sIsbn6401jrKEuFJQo227BVMrLQoLFpw+Dl /G4F5fOc05BCufJABiJUvZ5yeQNlahwoOACS4ip6vbgizgZ5BiCK5E+FLTksd5xV P08UeGAnWKwHnyO5C8ZBWSqGlXFbt4/NXnG6z/KGLGQe+DD7NBS8fq47XPBN9ERm 6iI7HC5VLJ7AdjIC/OIVZ+CrCmEhB0kfMmoE/JyZ5iAf/E9VgDCG0aiiWVoECz/g Sc/Q4lfMIqTuTJ0AaudrJ9KVYMax7ogfgBMoi2jbWOIBBlIDBaN1xjnMwptdz59A 7j2oxpkWltZekQGA== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 1f662f47 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Wed, 19 Sep 2018 01:24:19 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id y207-v6so3599669oie.13; Tue, 18 Sep 2018 18:41:56 -0700 (PDT) X-Gm-Message-State: APzg51DPtU/5YeLXDmrSdz6OcRKSO3oBCP810pCOlUAc6mHJVcheO/A/ abfuMwWQ4tLrOEIw3j/8ui1XTnRi0N4Wq3FAqXQ= X-Received: by 2002:aca:ce02:: with SMTP id e2-v6mr256860oig.225.1537321315969; Tue, 18 Sep 2018 18:41:55 -0700 (PDT) MIME-Version: 1.0 References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-8-Jason@zx2c4.com> <20180919005054.GC74746@gmail.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Wed, 19 Sep 2018 03:41:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v5 07/20] zinc: Poly1305 generic C implementations and selftest To: Eric Biggers Cc: LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Jean-Philippe Aumasson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 19, 2018 at 3:39 AM Jason A. Donenfeld wrote: > > > > + 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. This was changed here: https://git.zx2c4.com/WireGuard/commit/?id=37f114a73ba37219b00a66f0a51219a696599745 I can't reproduce with 8.2 anymore, so perhaps I should remove it now. Unless you'd like to avoid a warning on old compilers. Since there's no difference in speed, probably we should avoid the 8.1 warning and leave it be?