Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp969906imm; Fri, 3 Aug 2018 15:11:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfarIFpG70tTlZhZvOtgf8Tnm86JfJQ5SkjAjelOhHnQZOP77o4j6HbN1gQAabmP1cC0xFV X-Received: by 2002:a17:902:bcc6:: with SMTP id o6-v6mr5103193pls.117.1533334280941; Fri, 03 Aug 2018 15:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533334280; cv=none; d=google.com; s=arc-20160816; b=zKrB1nMeyxEPhs2w3qIDjcOuX8S/LoE9bxo1toPnU75baTohcnmywBtHhcB3qMrAP4 Qe2YGTlEeuPntnmCOO+bKxVZj3WCMzDtg4El+D2wqGsuW8eJGyMpOwV9ovO43VxGDWLw 0WYfe2CAseCk6xLrrpIWldK95M1zWZXS+PTe1o/Db+7FWULzT+gMRFkNlrGiRtFwDcta 9yW4NMTvCwirfvKuZdNC3JY/8aXu/nQ5beveJ/gpO6pfuC7yWm0LiU+8MKJIeVdGLF5w pc7P0LaUbwqEwPaRVVYRLfU34e1wIEsbcoV9rBCQHqceZEzBpXtdWhUeaLVWWp/d+Lhf 6aVw== 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 :arc-authentication-results; bh=elLf/P6TaWxzrM8Ex1sL/gy8z9YmbtSCfXwiTcFWT1I=; b=tnlTRFm+fDorFklmOF1JQP7Ix51VHja0efRYfn+Zgkw84vcqbW0PhY2VY+IaKOIh1s F72iYZKGnADbhaaiMHk08OhRJtO8l8ctDP9/OqY6U/hgbY9koYDMz2Tg9j7LDlZHKFY8 lgnrr4nCkSPP9IRoeN0B0xPNAlH6Fa+hunhG+kpVLBjU9dUR4XfVNVA+45lKQ4sV3pSi 2MWRf2PdEspdSZysSCfOyf7gFLR5LXxD4zeBX9Sd7P7mADQljEqPDkS7KhyyeI00W62y WTXFd9jWYu+Fd2kv4bLIQ13jAqTczTWhdXAeXwhZ210eYPWyEvgoX37Nc9MsX9quS1kV cffA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=vQAEKlKp; 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 i62-v6si6460737pfc.217.2018.08.03.15.11.06; Fri, 03 Aug 2018 15:11:20 -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=vQAEKlKp; 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 S1732120AbeHDAIZ (ORCPT + 99 others); Fri, 3 Aug 2018 20:08:25 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:55263 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729968AbeHDAIZ (ORCPT ); Fri, 3 Aug 2018 20:08:25 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id d77afddc; Fri, 3 Aug 2018 21:58:29 +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=BQ3yMWvnOBnsgLQUk5Hxul/kO8w=; b=vQAEKl Kp/J0b1mkTN3uo9pqCaGh6um+fHQIziUA1ClgzR4w6f0OEFI9OX+l4jWmReILhmK 5HfAxs5SyRhz6kT/x5+85VbpWXoAq+gbG+63mlXBZHSE2KLex2+wSaVBc7qcOfId VaQJ1pwo4Ka37H9yaUtK4bYlQRAi4ga0WfMa3b/jK8ia2q5qvknQc9Rl4LBDKHaL +riOi/gjhOn4jVGqZNoy/Xj5S6yRVeBBZc0LRSl84qq1P5BXaSsZpltFnnEUYRqe It1YVQnsAFL1Jmja5bjn6tCV2khMdijvC+sLHEnPwFC9j0iiZmey0HanIJuqZKyF aqgv6hKm4kIYwQiQ== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id e962cce6 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Fri, 3 Aug 2018 21:58:29 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id n84-v6so12418515oib.9; Fri, 03 Aug 2018 15:10:13 -0700 (PDT) X-Gm-Message-State: AOUpUlG2K96fnC6hQpUi8pl0/EmASU3qXM3H8ln8HLqEHLCiuizEd8lI e2vaPtOz5GAdEEdaissMeTNOUmg75oO2QRVModo= X-Received: by 2002:aca:7596:: with SMTP id q144-v6mr5396955oic.105.1533334213138; Fri, 03 Aug 2018 15:10:13 -0700 (PDT) MIME-Version: 1.0 References: <20180801072246.GA15677@sol.localdomain> In-Reply-To: From: "Jason A. Donenfeld" Date: Sat, 4 Aug 2018 00:10:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library To: Andy Lutomirski Cc: 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 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 Fri, Aug 3, 2018 at 11:29 PM Andy Lutomirski wrote: > Gotcha. That was very hidden in the 24k lines. Please make this (and > any similar goodies) be their own patches. I know, sorry, and I certainly will have this split out. The above code snippet was from the much much shorter WireGuard patch (3/3), but indeed the simd_get/put/relax code is in the monster patch here, so that'll certainly be split for v2. > > Also, please consider spelling it differently: > > simd_context_t simd_context = simd_get(); > > Because we'll feel very silly the first time some architecture has > more than one possible state. (It wouldn't be entirely insane for x86 > to distinguish between "no SIMD", "XMM only", and "go to town!", for > example.) That's a great idea. It'll also make it clearer that users shouldn't just dump a raw "true" in there; raw bools are more tempting to abuse like that.