Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13380169rwd; Fri, 23 Jun 2023 22:29:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7oXSuoPATAbRsqUrIRIKeDEy3mbVuOGz2TL/deDyN7rVLLWLWgNpLNRBi94vW2o2stRUIk X-Received: by 2002:a17:902:ea01:b0:1a9:6467:aa8d with SMTP id s1-20020a170902ea0100b001a96467aa8dmr28645016plg.1.1687584581821; Fri, 23 Jun 2023 22:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687584581; cv=none; d=google.com; s=arc-20160816; b=hY41bvvx40gBJqLQKBMi934svyAZosgPOQ5BONijiYwuaAUgfktstc8HFA1l/ZMFlU MDUOJdKySt3kXYuLXMStSA5oZC4jEotq+C3wez8HIeQWbYp5Gzw9mi5WPmAflmKjZcMp oGKtRksLRgTyjupZt8M371A2U7PfiJ/XfeDRAlgCADqXErMioPJN1W+VgaGJuM1/ik30 rsG8SsV8vtgOkESZmjXmiF4fJgSSP8XffJAOSMFNeD2lB6v5EGfaM8oY14FBJMsJeX5m konJUB3OgUbA2mKYjEcItQzsxAOSsEBk+xbY1QJ6eTm9zYjV/J3/wvOgli5Q78hRIdjC XW/Q== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=zPNLXRYXXRMOIvJHVGnU9P3VzHMuZF659b6uEW35jII=; fh=qGa9CTFlFGNhTcgeMwvUZNTzl1cHo2iz30V2Bp8e6hY=; b=x9d7rVCFw4bEWJhzOi8C/76KFCBo5HPDRi1Zv26XoemmR2YVP8P+lOkZUxkiSrw9lZ ZyZSG5Tzi8bPPe7XLL44ctyWQ2cd+h4qiX/MYUaN+honz5rFmh9cqLRKuw2Dbuir6LMY W8dsJDeH7M7wE6ig/AhOaQUpDo7Q4b8Br5aw/PnmM4OvgH7Ad5HcANS2KGjyFaixXute y8xhBw0Yj9NFErO1AAq0zYPW4eIBF6FglLdI6VvYccT72kzh/9/31G1WPAh8EyJ1xIY6 Fk3uli92dOncr1eSc9ts8wjrHUodlNgshjmgiZAkfmjD42qcvlgRNYgG+WAtiB+NdTAr sPBw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a170902690600b001b6b1f3ae04si643668plk.348.2023.06.23.22.29.17; Fri, 23 Jun 2023 22:29:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229451AbjFXFUR (ORCPT + 99 others); Sat, 24 Jun 2023 01:20:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbjFXFUP (ORCPT ); Sat, 24 Jun 2023 01:20:15 -0400 Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E7C92703 for ; Fri, 23 Jun 2023 22:20:11 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1qCvgi-006fz8-0O; Sat, 24 Jun 2023 13:19:57 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Sat, 24 Jun 2023 13:19:56 +0800 Date: Sat, 24 Jun 2023 13:19:56 +0800 From: Herbert Xu To: kernel test robot Cc: oe-kbuild-all@lists.linux.dev, linux-crypto@vger.kernel.org Subject: [PATCH] crypto: sm2 - Provide sm2_compute_z_digest when sm2 is disabled Message-ID: References: <202306231917.utO12sx8-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202306231917.utO12sx8-lkp@intel.com> X-Spam-Status: No, score=2.7 required=5.0 tests=BAYES_00,HELO_DYNAMIC_IPADDR2, PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS,TVD_RCVD_IP, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** 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 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 */ -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt