Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13485963rwd; Sat, 24 Jun 2023 00:53:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wBfNdwrijhjU/tgs7ReWemapo3umKATmGmgIj8mC8vRMyFEGgJB3N8f+LpHz93Le3hpF6 X-Received: by 2002:a05:6a00:a15:b0:66a:5466:25c0 with SMTP id p21-20020a056a000a1500b0066a546625c0mr7857214pfh.0.1687593233539; Sat, 24 Jun 2023 00:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687593233; cv=none; d=google.com; s=arc-20160816; b=DBJSdQ5Ye7aJlEAEuQOI4ppaLNUTM+xKZ4MT3KPdOTsmIFEsgNucpOJ2OMJR466HPh KTeoTMP/5JbhOlgW6qBA9tzBpRlZ58muOtZJMQMjggYhfB30yp+fDXxztgUGew732Ffx YO+DULj97eRswF74Kn8vdZlWT5qH8JpRQup/I06qSdqxgSpa/0I73RZNu/3ppzDvI+Ou awF26NisG1/EI6e1h0BNWNzzfEPTobyyGP7amDV7yn76DQs/6oJBhLIWsqKb5YSb4zRB 6b6Mfyi2alUmWxSN3RdBNLOcx77IhMyEST0s/J6wwFMZa7FIXG7ffbentjFn291y4LPl wxxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1lpvavoViwo2Sv99NPOmGQNnqQrpD/Opm/AwEd01ULM=; fh=gTFiiFZZS38qg9P6NW1Bbo2nTBpyZ4PBZ2gIQt/DMdc=; b=T98AYYtBQxRZe/CW3f5San/U6FfUxoeCjjE0SrM7FwgPp6XI5OG/EJNLDC6tID6yBY 8uXzZCGk+E8Ei8nXWUsqsClDur8ZygG+qMWyvn+4nEISCtDkXjjV3B4aPBcNGNOfMDyx iwxyeBwlkC9reAMCtROIxiM68Gi5LydFr8xWGjk/XKLq3O37b8IBHSGI1optYTG5jZtK fc/aIZ+UZ/DGcRtJQxFNH96HhI5ECuiLDnYiOfqznyB2eBi0LMuybWNZUvSYoLc+gWBJ 46yyjJLHrEMUOqQNrvc6z3Nc3BTRCR6hq0ilnFNPc5CbhchMOGTYwkM3WLA1+WatCX2P 5BUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qY9v29XX; 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 h7-20020a63df47000000b0055381e05230si1027024pgj.576.2023.06.24.00.53.08; Sat, 24 Jun 2023 00:53:53 -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=qY9v29XX; 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 S231849AbjFXHlX (ORCPT + 99 others); Sat, 24 Jun 2023 03:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231858AbjFXHlW (ORCPT ); Sat, 24 Jun 2023 03:41:22 -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 D062B2950 for ; Sat, 24 Jun 2023 00:41:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3AC3D60B86 for ; Sat, 24 Jun 2023 07:41:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 984C2C433CC for ; Sat, 24 Jun 2023 07:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687592472; bh=avZPsBEagJV1X6yWFemzFd3KKpTlFWMQ2aBJ544GOm4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qY9v29XX/xhWJjTkHFbhoaIP1m6vqHppompViPqOnd/rTmHyq5EDBrKLXLXZHxwsr wfiKbYPV5LN9FXFCRHc5YSlOSUQOoi/nAex66is/yTBkjNefboCWRf9GMGUYJo9XuY VG5O6y5bLRpyZHcg7xS0fYrY7z1ZxFP+aBwc/iJQUY6O4cne5yOcnMlKqN6o2CDYTy SFAtJGBxjrHVLMZqLLIxiDf1pjkGmXHeRpISWAFjj6OEIdAhYYCblBDWj/RIpa2kl3 ii8DtgXy2IV8PBwArZ7UtjSodar4Z/zP87oWkfdLONM/Z7ReGx3EGztbMHE7tXCR7H 6z9pJJwUXZ1Rg== Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-4f871c93a5fso1907430e87.2 for ; Sat, 24 Jun 2023 00:41:12 -0700 (PDT) X-Gm-Message-State: AC+VfDw1jXsK2MBm0CRtll/9xUwOpoLdrVoj/X1pEjJa8ELzjTKOwoZ6 Zn3mD850uCSUTK+LUs06Hig8SfRSLodsYihhgZs= X-Received: by 2002:a19:915d:0:b0:4ec:9ef9:e3d with SMTP id y29-20020a19915d000000b004ec9ef90e3dmr14682823lfj.26.1687592470554; Sat, 24 Jun 2023 00:41:10 -0700 (PDT) MIME-Version: 1.0 References: <202306231917.utO12sx8-lkp@intel.com> In-Reply-To: From: Ard Biesheuvel Date: Sat, 24 Jun 2023 09:40:59 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] crypto: sm2 - Provide sm2_compute_z_digest when sm2 is disabled To: Herbert Xu Cc: kernel test robot , oe-kbuild-all@lists.linux.dev, linux-crypto@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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 Sat, 24 Jun 2023 at 07:20, Herbert Xu wrote: > > On Fri, Jun 23, 2023 at 07:22:29PM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master > > head: b335f258e8ddafec0e8ae2201ca78d29ed8f85eb > > commit: e5221fa6a355112ddcc29dc82a94f7c3a1aacc0b [76/81] KEYS: asymmetric: Move sm2 code into x509_public_key > > config: nios2-randconfig-r031-20230622 (https://download.01.org/0day-ci/archive/20230623/202306231917.utO12sx8-lkp@intel.com/config) > > compiler: nios2-linux-gcc (GCC) 12.3.0 > > reproduce: (https://download.01.org/0day-ci/archive/20230623/202306231917.utO12sx8-lkp@intel.com/reproduce) > > ---8<--- > When sm2 is disabled we need to provide an implementation of > sm2_compute_z_digest. > > Fixes: e5221fa6a355 ("KEYS: asymmetric: Move sm2 code into x509_public_key") > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202306231917.utO12sx8-lkp@intel.com/ > Signed-off-by: Herbert Xu > > diff --git a/include/crypto/sm2.h b/include/crypto/sm2.h > index 7094d75ed54c..04a92c1013c8 100644 > --- a/include/crypto/sm2.h > +++ b/include/crypto/sm2.h > @@ -13,7 +13,16 @@ > > struct shash_desc; > > +#if IS_REACHABLE(CONFIG_CRYPTO_SM2) > int sm2_compute_z_digest(struct shash_desc *desc, > const void *key, unsigned int keylen, void *dgst); > +#else > +static inline int sm2_compute_z_digest(struct shash_desc *desc, > + const void *key, unsigned int keylen, > + void *dgst) > +{ > + return -ENOTSUPP; > +} > +#endif > > #endif /* _CRYPTO_SM2_H */ How is this supposed to work when CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y but SM2 is configured as a module?