Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp1033165oof; Tue, 25 Sep 2018 07:30:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV62d8DZiOWD9Wqce8TbWR1Qp108Wroj5ctnxQrYfcMOvZPwhs4wnrgymOynyoS41e+B/nEqs X-Received: by 2002:a62:3545:: with SMTP id c66-v6mr1426994pfa.63.1537885804125; Tue, 25 Sep 2018 07:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537885804; cv=none; d=google.com; s=arc-20160816; b=vgu7iH6PODn9MGDtoIxsxJxUstg2NqLW1q+zDaX6NYbwjOlEFwEcTUxPOflQ1gjnbD 2e5NZA+exJjiwkgpcMGi/KpnNe49zBALS+dHqf4/tCPfRS5t0uCmzDjwSFJs30Riq/M0 bgn/oE9Mww8fvjJVtFZXwj8VerAay0ydkNTpPPXT8YCMfGtzOsIVs35jvcmHOGpSwd4u z++AQtfZV9JLmhQo4bNpz0J9aW17daz9qBIy08th2kISOXYpcJkS4J6noV0j8aP2Xm9J 40C564ZG9lUFFECIPPzm7s/3hgfBzTtEk/QxEQrrUzUp5SH5uVUwHm0asYU/8wTnq9Vp umag== 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=aFmEGTecR2puTrQQAWNdqJ2uk5nnYTMeikpXFUVnooQ=; b=LRVJMrTbpBHfJnxez6bkPMkNhGQY115QttKDiM0jQRKM0pbwnUwgWflB75d3cUOpS6 o1785s1oIVJsccjVF1TCb1DoI2V7HHdZUO/4XRSb2BQQfTar+EzmW6OJaWyULdb4bQk9 PEhLJouivJlbVIGqjj+ZtyglR93c2kZbyXiBPIXv6frUtMX7mb6tUDg+MsGwbBMfmhRc VAxdNzLmcRo6OS09FJ4JGz/qDm3/Ca4ROSHfomwR+g3Vv2gWKJNLfi+TsdvD/Yn1p3dJ A8AJ9EcGNGfssp7bqR2r7IKFC6eFaJtAdjfjvgXopihJIjfZXVteTxmj46OtHIjbndbo y7eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=tGOz65fG; 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 33-v6si2503940pgm.94.2018.09.25.07.29.48; Tue, 25 Sep 2018 07:30:04 -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=tGOz65fG; 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 S1729394AbeIYUhG (ORCPT + 99 others); Tue, 25 Sep 2018 16:37:06 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:50119 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729098AbeIYUhG (ORCPT ); Tue, 25 Sep 2018 16:37:06 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 37ffba5e; Tue, 25 Sep 2018 14:10:52 +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=NCVPFU0OKZR6+lQOWlHO+YHQWqc=; b=tGOz65 fGZ6zzNbtEgHSha4P9AHFFt4GJ2piabHlB7b0I1O/uurObzCIIPI3N6IYDcqv31z qRBeC+7j+iUXPsHibpOlnyKCMzhR6USTSIvqg2hauJ+hLWDroFyqYN3nuaExbRQS 6W1sg+Rd3RSt6xrMp/T3PgW7VQ5vxuCqHm4FAXtCHTQ0DBC+SL6G5c5vPT+r0l9b J1lGWVPgf7n0R0ZRLp5xxpCWj2wWJg6136JX+pk+4X0nk/ffc30tm5z+lY6qsjGq Lukr2kHuFzXlf6p4puerrORTSDBNgIlvOJRiNum2qCUXVTdp6LPTWM5LEacwkUD9 B+8q21qdEvxdYDlQ== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 1527c5d5 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Tue, 25 Sep 2018 14:10:51 +0000 (UTC) Received: by mail-ot1-f50.google.com with SMTP id m23-v6so7010139otf.0; Tue, 25 Sep 2018 07:29:17 -0700 (PDT) X-Gm-Message-State: ABuFfojkVnzuyXxHzuRgY53Ho2lSPwPxC87MZDaKnr8gAqufjc8aohHT rcrd3biHbyiJE3J4dVIUihk1ZzDqF44GFxcFaCM= X-Received: by 2002:a9d:522d:: with SMTP id e45-v6mr877221oth.250.1537885755203; Tue, 25 Sep 2018 07:29:15 -0700 (PDT) MIME-Version: 1.0 References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-3-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Tue, 25 Sep 2018 16:29:03 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v5 02/20] zinc: introduce minimal cryptography library To: Arnd Bergmann Cc: Ard Biesheuvel , Eric Biggers , 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 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