Received: by 10.223.148.5 with SMTP id 5csp7878246wrq; Thu, 18 Jan 2018 10:36:50 -0800 (PST) X-Google-Smtp-Source: ACJfBotClAseniQPz5mTyhgf9J4nLClGpUwljVJNeN01KNcnr1VgsX+A3Qs4Y4J24irCtSv/22WA X-Received: by 10.98.133.93 with SMTP id u90mr27964750pfd.134.1516300609957; Thu, 18 Jan 2018 10:36:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516300609; cv=none; d=google.com; s=arc-20160816; b=KBzYsOGjSsSmSGk7DvbekuA8Qv/pY/DXZBwQC6C45MKmXxST0DbQIKVClYhqCRPlza 1PiDiAi12P4r0e5GuzN9BXVIeuiLOz4MzqzijEpmMTQGRBQrs/tcCJKOIgjcBkkwaCA3 0m7Kr21px2GUaEd4eOpTcg+s4FijdlrylRdZ0L6r8ZWECyhhnn5gKrMQBf8y/P34+WVN Rhg5lKOued6SRcm1V8MAkQjZ/nLLp1Qb6bsrKT2EmDo+tCRmNpX+vSjP0yfs1wFvgWDU itZkOt73n7hnjZVshi5dkjJEIYqnIImVo44XGLXaP1+xg6m2jUtSu50yg7RhEVJLa8Cv 3zZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=+LXoMTjxQVQvLr26xVhfhkVPrW9xvalwHe4nkXysLzA=; b=wq/DcOuTc5owFMo4dthpziTpJLpGzxrMJybQoQdJodSJXyl3nxvmS6HvfJJyfISYLS q19gaZAnmZ6DYlM5vzF/KkSQnoUbSmIwoe9YbQKNGUXwGSM5t+x5GhjBE13IeP9AK4Vo kaAUCUEIppBGto68bk1SllrYnG0kANSQ1CTkGCeT0WAzqmV7XMcOrKc5Tkn4rNgD2A+u BUk+QUkpTsiR3XrXugMkFkmEqU/AcEr2ZLHENlKeMaiFhq9073xbcrqgvqQ5VzjVNYMt IpoCgpd9OjUaVjHOfOJ02MhZ9BNNbJS8wh1YPrj7ed9rQxEqPBvKJm3TSzgExbafCExw 5Ysw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=EzPfck07; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si6594711pgp.153.2018.01.18.10.36.35; Thu, 18 Jan 2018 10:36:49 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=EzPfck07; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755775AbeARSgC (ORCPT + 99 others); Thu, 18 Jan 2018 13:36:02 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44313 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755733AbeARSeo (ORCPT ); Thu, 18 Jan 2018 13:34:44 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180118183442euoutp0242c17261502a0d7395c24aeb37f895ea~K_0E7zdKS2762227622euoutp02g; Thu, 18 Jan 2018 18:34:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180118183442euoutp0242c17261502a0d7395c24aeb37f895ea~K_0E7zdKS2762227622euoutp02g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516300482; bh=+LXoMTjxQVQvLr26xVhfhkVPrW9xvalwHe4nkXysLzA=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=EzPfck07xZdxaNfk6TVD12n7uXTFGtzEWFa8zdWbte8Bpn87xl+KPLHDDjXxzN+lf lkuDSD0LfoBsDBN6VE1uRtHDJRJ8EtdJgrT5l8u083nKs/Nj6xvd8Z3fvDUxlOUIDN flFW+1s+Bbw2PHbrHc8BaDoSZSJzcvyCqT9ZWpIY= Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180118183441eucas1p22fbe5dc376518a74134e090c99bdf741~K_0EaoNz70763107631eucas1p2G; Thu, 18 Jan 2018 18:34:41 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 10.00.30163.1C8E06A5; Thu, 18 Jan 2018 18:34:41 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180118183440eucas1p2d435e0100eaf03d3967b28c29a2c91b3~K_0Dr5sBm0761807618eucas1p2B; Thu, 18 Jan 2018 18:34:40 +0000 (GMT) X-AuditID: cbfec7f4-f790c6d0000075d3-84-5a60e8c19c2d Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 35.C2.18832.0C8E06A5; Thu, 18 Jan 2018 18:34:40 +0000 (GMT) Received: from AMDC3218.DIGITAL.local ([106.120.51.18]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P2R00FS4KXJWN40@eusync1.samsung.com>; Thu, 18 Jan 2018 18:34:40 +0000 (GMT) From: Kamil Konieczny To: linux-crypto@vger.kernel.org Cc: Kamil Konieczny , "David S. Miller" , Bartlomiej Zolnierkiewicz , Marek Vasut , Sonic Zhang , Fabio Estevam , Shawn Guo , Tom Lendacky , Jan Engelhardt , Arvind Yadav , Linus Walleij , Joakim Bech , linux-kernel@vger.kernel.org, Herbert Xu Subject: [PATCH 4/5] crypto: bfin_crc: Add empty hash export and import Date: Thu, 18 Jan 2018 19:34:03 +0100 Message-id: <20180118183404.12583-5-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.15.0 In-reply-to: <20180118183404.12583-1-k.konieczny@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42LZduzned2DLxKiDBZOFbG41ruQ2WLjjPWs FnPOt7BYzOrSteh+JWPR9PItk8XnVU9ZLPr2/We0mPJnOZPF/Xs/mSwu75rDZvGmrZHR4um6 JcwWd7Y2s1kcmbKP1YHfo/XSXzaPV1cdPbasvMnkMW/WCRaPf4f7mTx2zrrL7rHtgKrHxmfP WTzuXNvD5nHw3R4mj74tqxg9Pm+SC+CJ4rJJSc3JLEst0rdL4Mq4ds+x4BZvxeebk1gbGLdw dzFyckgImEjsnr2DDcIWk7hwbz2QzcUhJLCUUeLXtJ+sEM5nRok1G3eywXRcn9TDDpFYxigx 5+9WqKr/jBITek+zgFSxCZhLPNp+hqmLkYNDREBBYt5XHZAaZoEDLBIHzuxgBakRFnCXeHrj Glg9i4CqxMXl/WAbeAVcJDbtfscMsU1eYvF3iM2cAq4St+deZYSI/2aTOH00H8J2kWj5uB7q OmGJV8e3sEPYMhKdHQeZQBZLCPQzSiy/cYodwpnCKHF82lUmiCpricPHL4JdxCzAJzFp23Rm kKslBHglOtqEIEo8JC492g61wFHi+8up0ECawShx/uIZ5gmM0gsYGVYxiqSWFuempxab6BUn 5haX5qXrJefnbmIEJo7T/45/2cG4+JjVIUYBDkYlHt4NixOihFgTy4orcw8xSnAwK4nwvvMG CvGmJFZWpRblxxeV5qQWH2KU5mBREue1jWqLFBJITyxJzU5NLUgtgskycXBKNTDOPf73g/Lx FTMNGhYeWfeFYaMHV8i2Lc2T58x7oTsh+4D2nYX9zb7zzwkJXDcSd2uIsi+rmZzE77lAgG2J cedXvzvRqaru62/yFdi+SF55eoOjqIKMWLO8V9mBjRUdBcf2tVVyVnFrLDW+y/O31/+NomnL WvmDF9zerQ/O6gq0mPI9JJv92XclluKMREMt5qLiRAA9AiMOGAMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsVy+t/xy7oHXiREGaz5qG9xrXchs8XGGetZ Leacb2GxmNWla9H9Ssai6eVbJovPq56yWPTt+89oMeXPciaL+/d+Mllc3jWHzeJNWyOjxdN1 S5gt7mxtZrM4MmUfqwO/R+ulv2wer646emxZeZPJY96sEywe/w73M3nsnHWX3WPbAVWPjc+e s3jcubaHzePguz1MHn1bVjF6fN4kF8ATxWWTkpqTWZZapG+XwJVx7Z5jwS3eis83J7E2MG7h 7mLk5JAQMJG4PqmHHcIWk7hwbz1bFyMXh5DAEkaJndufMEM4jUwSN7b9YQapYhMwl3i0/QxT FyMHh4iAgsS8rzogNcwCR1gkdi9cxwJSIyzgLvH0xjUwm0VAVeLi8n42EJtXwEVi0+53zBDb 5CUWf98JFucUcJW4PfcqI8hMIaCaFWflJzDyLmBkWMUoklpanJueW2yoV5yYW1yal66XnJ+7 iREY3tuO/dy8g/HSxuBDjAIcjEo8vBsWJ0QJsSaWFVfmHmKU4GBWEuF95w0U4k1JrKxKLcqP LyrNSS0+xCjNwaIkztu7Z3WkkEB6YklqdmpqQWoRTJaJg1OqgdFfRn3n4dnuBW9nmE++m83t sCRib6rGu7L5ERc3dXeFci7L9O2beKb7WhlL7JykjNnHl0TrXW73Tl0s9vPNGcOzDHWVprlv a75opnh82XTDN+2k2dOVZ/8dv3vy7KVvIc2Xru/d/kKB1183K8ntwMWodxbMqz+uVykQdeur z7y94OzW9/eObFqpxFKckWioxVxUnAgANprzDWsCAAA= X-CMS-MailID: 20180118183440eucas1p2d435e0100eaf03d3967b28c29a2c91b3 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180118183440eucas1p2d435e0100eaf03d3967b28c29a2c91b3 X-RootMTR: 20180118183440eucas1p2d435e0100eaf03d3967b28c29a2c91b3 References: <20180118183404.12583-1-k.konieczny@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Crypto framework requires export/import in async hash. If driver do not implement them, wrapper functions in framework will be used, and it will cause error during ahash alg registration (unless one disables crypto internal tests). To make change in framework and expose this requirement, I will remove wrappers from crypto/ahash.c , but this can broke code which depends on them. Add empty hash export and import, with the same behaviour as in framework and expose this directly in driver. This can also prevent OOPS when config option in Cryptographic API 'Disable run-time self tests' will be enabled. Signed-off-by: Kamil Konieczny --- drivers/crypto/bfin_crc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/crypto/bfin_crc.c b/drivers/crypto/bfin_crc.c index a118b9bed669..65a8e07835e8 100644 --- a/drivers/crypto/bfin_crc.c +++ b/drivers/crypto/bfin_crc.c @@ -450,6 +450,16 @@ static int bfin_crypto_crc_digest(struct ahash_request *req) return bfin_crypto_crc_finup(req); } +static int bfin_crypto_crc_noimport(struct ahash_request *req, const void *in) +{ + return -ENOSYS; +} + +static int bfin_crypto_crc_noexport(struct ahash_request *req, void *out) +{ + return -ENOSYS; +} + static int bfin_crypto_crc_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) { @@ -487,6 +497,8 @@ static struct ahash_alg algs = { .final = bfin_crypto_crc_final, .finup = bfin_crypto_crc_finup, .digest = bfin_crypto_crc_digest, + .export = bfin_crypto_crc_noexport, + .import = bfin_crypto_crc_noimport, .setkey = bfin_crypto_crc_setkey, .halg.digestsize = CHKSUM_DIGEST_SIZE, .halg.base = { -- 2.15.0