Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp667341ybi; Fri, 2 Aug 2019 02:16:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPro/6HGZIj37cKTSZnoDjDb/G+bU0gOhH8MFLK1obHKfvDtF/ILoccHIrMgAfvT0ZJppZ X-Received: by 2002:a17:90a:bc42:: with SMTP id t2mr3367822pjv.121.1564737400427; Fri, 02 Aug 2019 02:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564737400; cv=none; d=google.com; s=arc-20160816; b=Q0+RNKVPf/3E1RNuFZPEJsYE76vOW/Bd2RJu6/xPpXuV2rPbk74E6nvuN3UkbAv9n+ t/17voPCel1cYk79CTWPe/5zcuVww3X6AA0WQbVx38uN848QJzwOBM2mZ+DMBgclMpWM 3sjrvDWDE4s9Gm4J5wd8jOgGIyiuC3SZrEovHtRP0UPlucBxg0t4AIfPqSPKRcaKpEUj 8yzpOrZhD5K6+TPnGzY+rar1atTXL6FNNo5lH169aH9rdzV8yoqzu6f2jQS6nmLgpCgQ z+rnRANDJ67XRS/yrUlb3czWHFEcSaUZsajyABeaGDdM7aysbWj6GYGeGfxbNGFRPozc YSPA== 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=Ie25Aco59RAcbLsPsgaVJSlOnwnSodpgokjBm4b1WRc=; b=lv5OTgxZQaX8egMVlnKkoum7ld49TSfA0OjwLMa3rvReDjiSAHLQs9siypKADbRjGz uxySclX8IxOg3MOrUaMqLDPMi05oVy0XvsI8IZefClKBHc0jCPaB2CWdMuFEQcPc9PdB at0ULlJYEYX9fgp8MDnSXjnhB+Zpc1WAC4IMsXMWmQdH9TWjsa5bGD8E/i6LIKYwn2Sw UVg5kfj327/oV7VCMSwqJIAwVueip3uG/5y9eP4xgu0w6+3P9TAX102BY0aSnLoFA03w SXHa9GQRn59Yjs2FR4O9DI6IpWlRQa7x8VRm8Lk7cAdeWsTL2KQrGlIYV9H1bnthenpK kjBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EK6uwC16; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190si38152757pgc.25.2019.08.02.02.16.24; Fri, 02 Aug 2019 02:16:40 -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=@linaro.org header.s=google header.b=EK6uwC16; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388922AbfHBGsG (ORCPT + 99 others); Fri, 2 Aug 2019 02:48:06 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39343 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388894AbfHBGsG (ORCPT ); Fri, 2 Aug 2019 02:48:06 -0400 Received: by mail-wr1-f66.google.com with SMTP id x4so22814042wrt.6 for ; Thu, 01 Aug 2019 23:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ie25Aco59RAcbLsPsgaVJSlOnwnSodpgokjBm4b1WRc=; b=EK6uwC16+FJTCVcCfE027a0FgSGvcrFAJVj+PXAcZwTYDO6/S7dWMn1Hz6uG469T6C fuGAhRjmnjHfT3XCoS2jeCPrHyOkX7FIlF7A8YiF/KNKE0Mvor4RGo2Y5Jqru0qdXDMY MjjRKlCU1kaC+yP/wI1QDZMU+YP4tFyEQrgcloz3hWnO7kpIhcfhBLNLaOsQx3Z4Jr/5 TSb392J0X+5KTwhnDOpD8Y2cR6Ie6t3kQeBLDIjZOE95Al1TBn6qYW81T8ITKz78C7UY Mypox5XTKOHl/HUADQWHFJrIrJu4FqRO6TPRfAhEiIY1u58qSBxExLibEWtk6lwVC8c4 ZmBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ie25Aco59RAcbLsPsgaVJSlOnwnSodpgokjBm4b1WRc=; b=CVh0p5Q706pAnhmAhAzYynUor7QwUHxTIIaU4rm/36FIeW5aY2jq31fSsWXU7C+vZ4 tMhO3ElLgKjtFWVLX1SscegrnR+MZO8CEitIzKFGw95EUO4hzOwBMePGS30wJt7HIjMS WiQPnItOjginInIoxYMEFAMu5F+bmKNa8qpHJYSxWXEZmn+zTIhUtarKoJ3kQOGkefhx WH3Xk3sMqLJwdDW92uRUs4oo6uPReoKBYfn2up/vSSrYO/e/MfdI0tD2xEfHYqVMyOdv UloSABc6RNJCjGa12cFFrdiVQ6CO2Ny0Kkh/prKoykOMmJaXqr+s1Iv9dRg9Gb4AMLMm uG+A== X-Gm-Message-State: APjAAAXSuzlC3kzit6l1IGxGbfBC+CzirRAsM7Wd0jqB1L6MfQM9kuo9 HnaxB2kxwijUs8MA/wGYtMY5U+0LmRq6jmbvMYCSvI9u3Io= X-Received: by 2002:adf:9ccf:: with SMTP id h15mr3286056wre.241.1564728483656; Thu, 01 Aug 2019 23:48:03 -0700 (PDT) MIME-Version: 1.0 References: <20190731163915.3fdfcb14@canb.auug.org.au> <20190731085819.GA3488@osiris> <20190731110816.GA20753@gondor.apana.org.au> <20190731111520.GC3488@osiris> <20190731113216.GA21068@gondor.apana.org.au> <20190731114453.GD3488@osiris> <20190801122849.GB4163@osiris> <20190802102019.6a789c51@canb.auug.org.au> In-Reply-To: <20190802102019.6a789c51@canb.auug.org.au> From: Ard Biesheuvel Date: Fri, 2 Aug 2019 09:47:52 +0300 Message-ID: Subject: Re: linux-next: Tree for Jul 31 - s390 crypto build breakage To: Stephen Rothwell Cc: Herbert Xu , Heiko Carstens , Linux Next Mailing List , Linux Kernel Mailing List , linux-s390 , Harald Freudenberger , Patrick Steuer , Ondrej Mosnacek 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, 2 Aug 2019 at 03:20, Stephen Rothwell wrote: > > Hi Herbert, > > On Thu, 1 Aug 2019 20:28:56 +0300 Ard Biesheuvel wrote: > > > > On Thu, 1 Aug 2019 at 15:28, Heiko Carstens wrote: > > > > > > On Wed, Jul 31, 2019 at 01:44:54PM +0200, Heiko Carstens wrote: > > > > On Wed, Jul 31, 2019 at 09:32:16PM +1000, Herbert Xu wrote: > > > > > On Wed, Jul 31, 2019 at 01:15:20PM +0200, Heiko Carstens wrote: > > > > > > > > > > > > However that doesn't fix the simd.h header file breakage with the > > > > > > second patch :) > > > > > > > > > > That fix should be there now too. > > > > > > > > Yes, works now. Thank you! > > > > > > Still not... with linux-next as of today I get this (s390 defconfig): > > > > > > ERROR: "crypto_aegis128_decrypt_chunk_simd" [crypto/aegis128.ko] undefined! > > > ERROR: "crypto_aegis128_update_simd" [crypto/aegis128.ko] undefined! > > > ERROR: "crypto_aegis128_encrypt_chunk_simd" [crypto/aegis128.ko] undefined! > > > scripts/Makefile.modpost:105: recipe for target 'modules-modpost' failed > > > > > > > Hello Heiko, > > > > Apologies for the breakage. The first two fixes addressed obvious > > shortcomings in my code, but with this issue, I'm a bit puzzled tbh. > > The calls to these missing functions should be optimized away, since > > have_simd never gets assigned if CONFIG_CRYPTO_AEGIS128_SIMD is not > > defined, but for some reason, this isn't working. Which version of GCC > > are you using? > > > > Also, could you please try whether the patch below fixes the problem? Thanks > > > > https://lore.kernel.org/linux-crypto/20190729074434.21064-1-ard.biesheuvel@linaro.org/ > > It might be time to revert all this series and try again. The > implementation seems to have not been well thought through from a kernel > building point of view. For a start the two commits > > 7cdc0ddbf74a ("crypto: aegis128 - add support for SIMD acceleration") > ecc8bc81f2fb ("crypto: aegis128 - provide a SIMD implementation based on NEON intrinsics") > > seem to be in the wrong order (function used in the first before being > defined in the second). There are a series of declarations of external > functions in crypto/aegis128-core.c that should be in a header file. > And there was the assumption that asm/simd.h was available everywhere. > > Also crypto_aegis128_decrypt_chunk_simd() is referenced in a structure > initialisation (unprotected by any CONFIG_ variable - and so will be > referenced even if it does not exist). The compiler will have a hard > time knowing that "have_simd" is effectively a constant zero (and > crypto_simd_usable() is not constant). The only assignment to have_simd is guarded by a if (IS_ENABLED(CONFIG_xxx)) conditional, which is optimized away if the Kconfig symbol is not set. Usually, the compiler uses this information to infer that have_simd is a compile time constant '0', and optimizes away all the code that depends on have_simd being true. I haven't figured out yet why this doesn't work as expected on some versions of GCC, since it is a very common pattern throughout the kernel.