Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3386620pxu; Mon, 30 Nov 2020 01:45:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxfiBbS0wKdAqBGpyt8iGnECb+vP2s5UBJ+heuTidk06yKPl11xIo7yniX1Doa1jhboybsv X-Received: by 2002:a05:6402:2070:: with SMTP id bd16mr8157299edb.107.1606729506922; Mon, 30 Nov 2020 01:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606729506; cv=none; d=google.com; s=arc-20160816; b=y0+OKdnbrw9/G/7O9JAPLLxQcGgZ6mMUFoNEb4vQeukdJdvAhodM3ZOfxl5jIXSGfl H/CObpCPeipOU2IgdepiGJpzhjbMLWg1JEaCXp++b710FfitkazYv4V6/4qOdfP4hUc0 HCpeXLYi4Ys782tk0EgyjizSQTeeueWDZIPeae2R3keMfjmxsRs0KVV8TFIvpw6B58rH g8s024KE/UH/xeo6KLjI0pd0ePYz2SumPJhOQEbjfNdt4wx/W+N/L3F+NQMCz3fQiHqO +VX88sT4TBSh2QgUwH6bDN5V/nfjoEf9E9astnFSPGOErRZdZT+wtlB/abfgRmvX+Sqj nkWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KDBSeUghYrjoCnN7okXdtIZ8whPA/MBTbtWXNj9t+GQ=; b=uNsxf9Xi4s6fpmKyL13s5ONZ3YoLcwL6tQVopFNbYRz+Hy/8+fkcp0k+lFBZTNQCgS wlZm4E7jKH8Mzo3yu8pfz793Bgm6fWmtMUP1Ypiv08deF1iIsO9n52j6FyrDoMy0Td3P xr6mL33WzKbunuqHBoDBVf0rbD6vtHZE2TT+TfGG5VnOP3yez4QLDyLk+Xqdj2Uo8OLJ V3Nz9qfjAKg0XNPS7+0cn7+xPkH6LcTID7dGPebFbU2R7+B4Q7u2xV3OFrswzE7j1oeI XRnb/fA9TPD4g4r2SVPGImbUIq9xPm2iFQfWO2eH/Xpwk4ZUK2TXGsCIbIaG6s9sJLC4 FLuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZNkuebfZ; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si10506819edi.141.2020.11.30.01.44.43; Mon, 30 Nov 2020 01:45:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZNkuebfZ; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 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 S1728019AbgK3Joa (ORCPT + 99 others); Mon, 30 Nov 2020 04:44:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:54564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725902AbgK3Joa (ORCPT ); Mon, 30 Nov 2020 04:44:30 -0500 Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 01B162084C; Mon, 30 Nov 2020 09:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606729429; bh=WPjDf9shA+FZpM1rRreXiB4/UFq0Y4al8X/x+PuX5pU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZNkuebfZEbYG53BbH5aBNwc4RZW0WyGbXQnSoJm2TQ+u4hoa8YMkVIcRbWV45EaTD wRHuzEydWQ1scbN/wDOQswBaTEuD8cNiU8Kzsx5mnHxnBVV9izIwqtIXoK4cFWXg2e /0xDr2HwtHe/ukuySTqx+Xr6zvM/lmiZ4JPvP5EA= Received: by mail-oi1-f180.google.com with SMTP id v202so13476755oia.9; Mon, 30 Nov 2020 01:43:48 -0800 (PST) X-Gm-Message-State: AOAM533WZ1F9qv+SPGEbXd6pEywHpDE/Px+fhxmxcopB8SVfP6TCEpG2 AJMyWHi7sq0W8dfN/Lt/DS0OpPmj8yFP7s9br+o= X-Received: by 2002:aca:c657:: with SMTP id w84mr13734473oif.47.1606729428170; Mon, 30 Nov 2020 01:43:48 -0800 (PST) MIME-Version: 1.0 References: <20201117133214.29114-1-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Mon, 30 Nov 2020 10:43:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 0/4] crypto: aegis128 enhancements To: Geert Uytterhoeven Cc: Linux Crypto Mailing List , Eric Biggers , Ondrej Mosnacek , Herbert Xu , Linux ARM , Linux-Next Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, 30 Nov 2020 at 10:37, Geert Uytterhoeven wro= te: > > Hi Ard, > > On Tue, Nov 17, 2020 at 2:38 PM Ard Biesheuvel wrote: > > This series supersedes [0] '[PATCH] crypto: aegis128/neon - optimize ta= il > > block handling', which is included as patch #3 here, but hasn't been > > modified substantially. > > > > Patch #1 should probably go to -stable, even though aegis128 does not a= ppear > > to be widely used. > > > > Patches #2 and #3 improve the SIMD code paths. > > > > Patch #4 enables fuzz testing for the SIMD code by registering the gene= ric > > code as a separate driver if the SIMD code path is enabled. > > > > Changes since v2: > > - add Ondrej's ack to #1 > > - fix an issue spotted by Ondrej in #4 where the generic code path woul= d still > > use some of the SIMD helpers > > > > Cc: Ondrej Mosnacek > > Cc: Eric Biggers > > > > [0] https://lore.kernel.org/linux-crypto/20201107195516.13952-1-ardb@ke= rnel.org/ > > > > Ard Biesheuvel (4): > > crypto: aegis128 - wipe plaintext and tag if decryption fails > > crypto: aegis128/neon - optimize tail block handling > > crypto: aegis128/neon - move final tag check to SIMD domain > > crypto/aegis128-core.c: In function =E2=80=98crypto_aegis128_decrypt=E2= =80=99: > crypto/aegis128-core.c:454:40: error: passing argument 2 of > =E2=80=98crypto_aegis128_process_crypt=E2=80=99 from incompatible pointer= type > [-Werror=3Dincompatible-pointer-types] > 454 | crypto_aegis128_process_crypt(NULL, req, &walk, > | ^~~ > | | > | struct aead_request * > crypto/aegis128-core.c:335:29: note: expected =E2=80=98struct skcipher_wa= lk *=E2=80=99 > but argument is of type =E2=80=98struct aead_request *=E2=80=99 > 335 | struct skcipher_walk *walk, > | ~~~~~~~~~~~~~~~~~~~~~~^~~~ > crypto/aegis128-core.c:454:45: error: passing argument 3 of > =E2=80=98crypto_aegis128_process_crypt=E2=80=99 from incompatible pointer= type > [-Werror=3Dincompatible-pointer-types] > 454 | crypto_aegis128_process_crypt(NULL, req, &walk, > | ^~~~~ > | | > | struct skcipher_walk = * > crypto/aegis128-core.c:336:14: note: expected =E2=80=98void (*)(struct > aegis_state *, u8 *, const u8 *, unsigned int)=E2=80=99 {aka =E2=80=98voi= d (*)(struct > aegis_state *, unsigned char *, const unsigned char *, unsigned int)=E2= =80=99} > but argument is of type =E2=80=98struct skcipher_walk *=E2=80=99 > 336 | void (*crypt)(struct aegis_state *state, > | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 337 | u8 *dst, const u8 *src, > | ~~~~~~~~~~~~~~~~~~~~~~~ > 338 | unsigned int size)) > | ~~~~~~~~~~~~~~~~~~ > crypto/aegis128-core.c:454:4: error: too many arguments to function > =E2=80=98crypto_aegis128_process_crypt=E2=80=99 > 454 | crypto_aegis128_process_crypt(NULL, req, &walk, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > crypto/aegis128-core.c:334:5: note: declared here > 334 | int crypto_aegis128_process_crypt(struct aegis_state *state, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: some warnings being treated as errors > make[1]: *** [scripts/Makefile.build:283: crypto/aegis128-core.o] Error 1 > > > crypto: aegis128 - expose SIMD code path as separate driver > > Fixes the above, but causes > > ERROR: modpost: "crypto_aegis128_update_simd" [crypto/aegis128.ko] undefi= ned! > > as reported by noreply@ellerman.id.au for m68k/defconfig and > m68k/sun3_defconfig. > (neon depends on arm). > Thanks for the report. It seems like GCC is not optimizing away calls to routines that are unreachable. Which GCC version are you using?