Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1662180rwd; Tue, 13 Jun 2023 12:13:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nkZjbuRoeAcFqiwQMt0wC+vDUBlISeUlVW4O0VmI6qQL8Ao7qkJduxGiLs2mwM7DIlehE X-Received: by 2002:a17:906:1049:b0:974:56cb:9dfc with SMTP id j9-20020a170906104900b0097456cb9dfcmr11521794ejj.1.1686683616096; Tue, 13 Jun 2023 12:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686683616; cv=none; d=google.com; s=arc-20160816; b=WxSDvaiwAd+KT7pLCtO3H6817ljiuoLsn470Q8okBw5XVpiMAmNIjwswLbAOGqzvhZ zWRVDm5ZfY3jDyJZtq6hpygeZHXuYQiuBmjkZ+Er79pKDMCSR+FdYx/JtivgTD/lhADz oW+131Tk3pxwp0F0zMo0CJVF6wuu0xstLEnZi9EKnrDBkdVRagCNeJSibls6bFVqPzu8 SZHPou1Gcw7DEoOTCkmlWwivYBeA7Esko/IB5OC76IeqOGM0qouBAraoOyNVwsDMxC9+ gQ0bSpZyKbbNMj7xFX0rdFXYkBt+4k41mF5RbqQaWO06T/kyUhtcy+Lz7NUIxKxxEAzZ ReXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0lKVPmSOTFZBmC6FSHCZKv5o/EbtA0lFuVr/e472kIc=; b=xSZN/0wGrYd8MjvG7jKt/RmfRepUGmN1UqCjHRsn9Rq75kfsUXlgHVW/nbapbDRauU oTKHSgDvPV9goQ4sQvTk+Kwp4K1CT9i+odWWZhI8C/EJCrlhWGbuRrCjU6dhu5/GoI2m rkPxaseaVUNE7j/u5Uuaj/W8ICUbjG4Xa8Fa7l83ZAMbYFmMDIubS8ZxwvZ4TyLVJ0JX nUiqZ/MERWBqb8+Nc14xKg1KPXH1M7sI1aI0Cj1ADB6jCoddPPhiGtakOawTt7iB9Xe3 jWAZJ4PM7WCmd/pdkiJ2vHJ734SPRwNZOD3SnSGY6e/fcERMIGUGRK4eulS74pCvNWWX 1uLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pkxj4anx; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh7-20020a17090720e700b00977d2cbd3d0si5672898ejb.596.2023.06.13.12.13.04; Tue, 13 Jun 2023 12:13:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pkxj4anx; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239622AbjFMTBu (ORCPT + 99 others); Tue, 13 Jun 2023 15:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231562AbjFMTBp (ORCPT ); Tue, 13 Jun 2023 15:01:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8060BA7; Tue, 13 Jun 2023 12:01:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 185346395C; Tue, 13 Jun 2023 19:01:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D73EC433D9; Tue, 13 Jun 2023 19:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686682902; bh=/JuClQfiInF4E+biL4mmyBg4GdWaji39UK48z39WAK8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pkxj4anxa9SwIR1rVD3AliSkIE6TiUP+JPyhWPaTAMASCYImM6Cj69VqV/Mtcji38 PGGhjmgEOlhC598j3OTvAFk5BngXgPFozP4Q4rjUmM3OG+aIHzEvXXg8SimdzXAUQ5 2EcR1OLu9zIhtTwQPeKzlbcreooITMgSpR9vNE4TWLXXoR2Kzs8jL93mnkK+mWOUDi 4gHH94BmCUyqc83ZesZQPPROYwhrLM1wzbiz9gKngJGqnsSlCrAGZjsMGSoO7POMOK 7zMiVl0AM3IdDCm2wTfIHvHN9BGYuT1cD4elm9WPPCRXgB+FiOkefM+Q0iRZlrbo7A 3QHifX5W7No4g== Date: Tue, 13 Jun 2023 12:01:40 -0700 From: Eric Biggers To: Heiko =?iso-8859-1?Q?St=FCbner?= Cc: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, herbert@gondor.apana.org.au, davem@davemloft.net, conor.dooley@microchip.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, christoph.muellner@vrull.eu Subject: Re: [PATCH v5 4/4] RISC-V: crypto: add accelerated GCM GHASH implementation Message-ID: <20230613190140.GD1139@sol.localdomain> References: <20230612210442.1805962-1-heiko.stuebner@vrull.eu> <20230612210442.1805962-5-heiko.stuebner@vrull.eu> <20230613031006.GD883@sol.localdomain> <2236193.NgBsaNRSFp@diego> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2236193.NgBsaNRSFp@diego> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jun 13, 2023 at 10:00:44AM +0200, Heiko St?bner wrote: > Am Dienstag, 13. Juni 2023, 05:10:06 CEST schrieb Eric Biggers: > > Hi Heiko, > > > > On Mon, Jun 12, 2023 at 11:04:42PM +0200, Heiko Stuebner wrote: > > > diff --git a/arch/riscv/crypto/ghash-riscv64-zbc.pl b/arch/riscv/crypto/ghash-riscv64-zbc.pl > > > new file mode 100644 > > > index 000000000000..677c438a44bf > > > --- /dev/null > > > +++ b/arch/riscv/crypto/ghash-riscv64-zbc.pl > > > @@ -0,0 +1,427 @@ > > > +#! /usr/bin/env perl > > > +# Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. > > > +# > > > +# Licensed under the Apache License 2.0 (the "License"). You may not use > > > +# this file except in compliance with the License. You can obtain a copy > > > +# in the file LICENSE in the source distribution or at > > > +# https://www.openssl.org/source/license.html > > > + > > > +# This file is dual-licensed and is also available under the following > > > +# terms: > > > +# > > > +# Copyright (c) 2023, Christoph M?llner > > > +# All rights reserved. > > > +# > > > +# Redistribution and use in source and binary forms, with or without > > > +# modification, are permitted provided that the following conditions > > > +# are met: > > > +# 1. Redistributions of source code must retain the above copyright > > > +# notice, this list of conditions and the following disclaimer. > > > +# 2. Redistributions in binary form must reproduce the above copyright > > > +# notice, this list of conditions and the following disclaimer in the > > > +# documentation and/or other materials provided with the distribution. > > > > Is this worded properly for a dual license? The paragraph about the Apache > > License makes it sound like the Apache License must always be complied with: > > "You may not use this file except in compliance with the License." > > > > So I worry that this could be interpreted as: > > > > Apache-2.0 AND BSD-2-Clause > > > > instead of > > > > Apache-2.0 OR BSD-2-Clause > > > > It needs to be the latter. > > > > So I think the file header needs to be clarified w.r.t. the dual license. > > Hmm, I think the > "This file is dual-licensed and is also available under the following terms" > should be pretty clear? As I said, IMO the problem is that it contradicts the Apache license blurb just above it, specifically the part "You may not use this file except in compliance with the License". So it's not clear what is meant. That sentence does not appear in other common license blurbs; it seems to be unique to Apache's. I know that people often treat these blurbs as magic incantations, but I'm just looking at the plain English meaning here. To fix this ambiguity I think either that sentence should be removed, or the intent to dual license should be clearly described in the *first paragraph* before listing the two licenses. (Or do both of those.) - Eric