From: "Jason A. Donenfeld" Subject: Re: [PATCH net-next v5 02/20] zinc: introduce minimal cryptography library Date: Tue, 25 Sep 2018 16:29:03 +0200 Message-ID: References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-3-Jason@zx2c4.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Ard Biesheuvel , Eric Biggers , LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Jean-Philippe Aumasson To: Arnd Bergmann Return-path: In-Reply-To: Sender: netdev-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org Hey Arnd, On Tue, Sep 25, 2018 at 9:18 AM Arnd Bergmann wrote: > I think I misread your earlier sentence and thought you had said the > exact opposite. > > For confirmation, I've downloaded your git tree and built it with my > collection of compilers (gcc-4.6 through 8.1) and tried building it > in various configurations. Nothing alarming stood out, the only > thing that I think would might warrant some investigation is this one: > > lib/zinc/curve25519/curve25519-hacl64.h: In function 'curve25519_generic': > lib/zinc/curve25519/curve25519-hacl64.h:785:1: warning: the frame size > of 1536 bytes is larger than 500 bytes [-Wframe-larger-than=] > > Without KASAN, this takes 832 bytes, which is still more than it should > use from a look at the source code. > > I first suspected some misoptimization around the get/put_unaligned_le64() > calls, but playing around with it some more led me to this patch: Excellent detective work. Thanks for spotting that before I had a time to respond here. I'll also send that same fix to the HACL* team at INRIA, so they can add it as a heuristic. Jason