Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1441739imm; Fri, 28 Sep 2018 19:21:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV62pY98+PF0SBEcqLPUYBMev1IircFecIX5eTfofuN+GOTac+1jL/ETfwGD8tjDDj2MG9Fdh X-Received: by 2002:a63:7107:: with SMTP id m7-v6mr1151349pgc.73.1538187673271; Fri, 28 Sep 2018 19:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538187673; cv=none; d=google.com; s=arc-20160816; b=Z6WSsx4eRpeGuzEiVsrhZWuIUOpD+c3oNV5qomjC7s6MzWlXr39KetsswV+FPDtyU1 WaVzz1MvCG3OMFQ1O4yXZJkQZY3B2W3hZCMyX7jVyIHF2UZxsZPA226EMQk44/zY6eiY 4QdmGDAKdG1vjCrDSkwSCz59FSZ043pfta4TObWlZHbO3LYmVlZ/FK0RRGUbr7uSiKQD AmwW646+j2B6yfbkhcgeQkel2GT4c3LxeHD7XAu73cBDhcipGi2AGL2kNyVJ6lp9TVpX X6mYr5ApIV23XrotVsUnEL4EXeRjaogfkvDOfG6bAj3GGuEwx2/x4Rr7warsc6dEZPae XROA== 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=tgT7y8+1XChQG8fhzesYlpJYd8NNRz9kHMgdDUl8sU8=; b=mpswD0xwJDGaG1bYF+adCB1D1b3SrlJVLDbITtn/S+kBmb4DXmZLX7r14PuEVtY0ax nmkXLr5w2VKG3S8YU5ZDtiTwX8A44DQz1I7D6PjJgduAHTM760KMWj7GzMP9FuaU+Fxz ovFGhJ/rO7L1CzGBdigG+5XgQmACpq99h8T7sgjfQjJesFpbQ0ZmhUH5oI5eT9EK6geD w3Vx0EblydUzvYoorBOBRvtNiImWdaD1/TxANb2u3tgUvWrPAiAzvlGUXb+D/zp/lGmh s2hzGsrNf06Z3ydi7ZacnHALeTpVkApMb/uJaBx3UNegdC/zwLmPrqPiP3QBJaSXctWE k0+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=D58wREGO; 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 8-v6si6128282pgx.37.2018.09.28.19.20.45; Fri, 28 Sep 2018 19:21:13 -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=D58wREGO; 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 S1727420AbeI2IrO (ORCPT + 99 others); Sat, 29 Sep 2018 04:47:14 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:39421 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727351AbeI2IrO (ORCPT ); Sat, 29 Sep 2018 04:47:14 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 5ad6ee9b; Sat, 29 Sep 2018 02:01:47 +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=mv2dSoGLO22zS0xIK2LqyVeb/uM=; b=D58wRE GOVeKmNNXdF5ebyEfl4KZKE3p0l9qVKA9g/MKNq9ALZZ4uK/mWWmIupWO6x/zgVM atpOKye7ETKHc0SjIGFEOKtaIcINZJ/aCcHu6mkSTqrKvieH3z+AXvJ2LFeXTlMN mS+h6EZuG+Rxf1H7kUifstDO48smuJNuC115rCDDJ6OLs/35qgyiGFo9iMKSbQ1k 8ryiZmqMJd+PoSYXxBxTKKQTUKKJ+oM7ElVQWh+VfcrTZlZNbzWiboVxS2esU0Xy SF0Cn8qcLJGtVU9yLloPp5Qs6HZn6DVNnPEYXPfMcv2Cryjd1LPsarapbjH3iIjf FhdSp4VoaXR19OUQ== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 2ea1a21b (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Sat, 29 Sep 2018 02:01:46 +0000 (UTC) Received: by mail-ot1-f43.google.com with SMTP id m23-v6so7907283otf.0; Fri, 28 Sep 2018 19:20:37 -0700 (PDT) X-Gm-Message-State: ABuFfojKmokaiIXHnoSygVPUlV0c35TIB7qMNaYSM7QEpEHu+HSqrIu1 5EVE7aY+NoVdDXIaxQSLxdLh03eZiTHnYGHyKI8= X-Received: by 2002:a9d:fae:: with SMTP id d43-v6mr846041otd.199.1538187636658; Fri, 28 Sep 2018 19:20:36 -0700 (PDT) MIME-Version: 1.0 References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-8-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Sat, 29 Sep 2018 04:20:24 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v6 07/23] zinc: ChaCha20 ARM and ARM64 implementations To: Ard Biesheuvel Cc: LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Jean-Philippe Aumasson , Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org 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 Hi Ard, On Fri, Sep 28, 2018 at 6:02 PM Ard Biesheuvel wrote: > Please put comments like this below the --- git-notes is nice for this indeed. > Are these CONFIG_ symbols defined anywhere at this point? Yes, they're introduced in the first zinc commit. There's no git-blame on git.kernel.org, presumably because it's expensive to compute, but there is on my personal instance, so this might help: https://git.zx2c4.com/linux-dev/blame/lib/zinc/Kconfig?h=jd/wireguard > In any case, I don't think these is a reason for these, at least not > on ARM/arm64. The 64-bitness is implied in both cases You mean to say that since these nobs are def_bool y and are essentially "depends on ARM", then I should just straight up use CONFIG_ARM? I had thought about this, but figured this would make it easier to later make these optional or have other options block them need be, or even if the dependencies and requirements for having them changes (for example, with UML on x86). I think doing it this way gives us some flexibility later on. So if that's a compelling enough reason, I'd like to keep those. > and the > dependency on !CPU_32v3 you introduce (looking at the version of > Kconfig at the end of the series) seems spurious to me. Was that added > because of some kbuild robot report? (we don't support ARMv3 in the > kernel but ARCH_RPC is built in v3 mode because of historical reasons > while the actual core is a v4) I added the !CPU_32v3 in my development tree after posting v6, so good to hear you're just looking straight at the updated tree. If you see things jump out in there prior to me posting v7, don't hesitate to let me know. The reason it was added was indeed because of: https://lists.01.org/pipermail/kbuild-all/2018-September/053114.html -- exactly what you suspected, ARCH_RPC. Have a better suggestion than !CPU_32v3? It seems to me like so long as the kernel has CPU_32v3 as a thing in any form, I should mark Zinc as not supporting it, since we'll certainly be at least v4 and up. (Do you guys have any old Acorn ARM610 boxes sitting around for old time's sake at LinaroHQ? ;-) > > +#endif > > + > > No need to make asmlinkage declarations conditional Yep, addressed in the IS_ENABLED cleanup. > > if (IS_ENABLED()) Sorted. > > """ > if (!IS_ENABLED(CONFIG_ARM)) > return false; > > hchacha20_arm(x, derived_key); > return true; > """ > > and drop the #ifdefs Also sorted. Regards, Jason