From: Andy Lutomirski Subject: Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library Date: Tue, 7 Aug 2018 18:48:59 -0700 Message-ID: References: <20180801072246.GA15677@sol.localdomain> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Ingo Molnar , Thomas Gleixner , linux-arch@vger.kernel.org, Eric Biggers , Linux Crypto Mailing List , LKML , Netdev , David Miller , Andrew Lutomirski , Greg Kroah-Hartman , Samuel Neves , "Daniel J . Bernstein" , Tanja Lange , Jean-Philippe Aumasson , Karthikeyan Bhargavan To: "Jason A. Donenfeld" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org > On Aug 7, 2018, at 4:48 PM, Jason A. Donenfeld wrote: >=20 > Hey Andy, >=20 >> On Tue, Aug 7, 2018 at 12:43 PM Andy Lutomirski wro= te: >> For "zinc: add simd helper", I think it should be in include/linux, >> and include/linux/simd.h should (immediately or maybe in the future) >> include to pick up arch-specific stuff. And the patch >> should get sent to linux-arch@vger.kernel.org. >=20 > I guess you saw my prompt about that in the previous commit message? > Based on your encouragement, I implemented it: > https://git.zx2c4.com/linux-dev/commit/?h=3Dsimd This is _far_ more > invasive than I wanted to be, as I don't want this patch submission to > grow unwieldy and never be merged, but I guess we can roll with this > for now... >=20 I really wish we had a way to see that we use asm-generic=E2=80=99s copy of a= header in all cases except where an arch opts out. >> In your blake2s_arch() implementation, you're not passing in a >> simd_context_t. Is that still a work in progress? I thought the plan >> was to pass it in rather than doing the check in the _arch() >> functions. >=20 > I'm inclined to do the explicit context passing only when a function > is likely to be used in that kind of environment, and adjust as > needed. Long term, anyway, that API will be removed once the x86 guys > figure out lazy FPU restoration and the amortization doesn't add > anything. Fair enough. >=20 > Jason