From patchwork Mon Jun 19 02:15:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guozihua \(Scott\)" X-Patchwork-Id: 694210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ECA3EB64DA for ; Mon, 19 Jun 2023 02:16:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229566AbjFSCQQ (ORCPT ); Sun, 18 Jun 2023 22:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjFSCQP (ORCPT ); Sun, 18 Jun 2023 22:16:15 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75864E4F for ; Sun, 18 Jun 2023 19:16:04 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QktfP6b53zqTfk; Mon, 19 Jun 2023 10:15:57 +0800 (CST) Received: from huawei.com (10.67.175.31) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 19 Jun 2023 10:16:02 +0800 From: GUO Zihua To: , CC: Subject: [PATCH RFC v2 1/3] MPI: Export mpi_add_ui and mpi_mod for SM9 Date: Mon, 19 Jun 2023 10:15:01 +0800 Message-ID: <20230619021503.29814-2-guozihua@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230619021503.29814-1-guozihua@huawei.com> References: <20230619021503.29814-1-guozihua@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.175.31] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500024.china.huawei.com (7.185.36.203) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org SM9 which could be built as a module would be using mpi_add_ui and mpi_mod. So export them. Signed-off-by: GUO Zihua --- lib/mpi/mpi-add.c | 2 +- lib/mpi/mpi-mod.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mpi/mpi-add.c b/lib/mpi/mpi-add.c index 9056fc5167fc..d34c6c1c6fab 100644 --- a/lib/mpi/mpi-add.c +++ b/lib/mpi/mpi-add.c @@ -62,7 +62,7 @@ void mpi_add_ui(MPI w, MPI u, unsigned long v) w->nlimbs = wsize; w->sign = wsign; } - +EXPORT_SYMBOL_GPL(mpi_add_ui); void mpi_add(MPI w, MPI u, MPI v) { diff --git a/lib/mpi/mpi-mod.c b/lib/mpi/mpi-mod.c index 54fcc01564d9..8136f4aff287 100644 --- a/lib/mpi/mpi-mod.c +++ b/lib/mpi/mpi-mod.c @@ -26,6 +26,7 @@ void mpi_mod(MPI rem, MPI dividend, MPI divisor) { mpi_fdiv_r(rem, dividend, divisor); } +EXPORT_SYMBOL_GPL(mpi_mod); /* This function returns a new context for Barrett based operations on * the modulus M. This context needs to be released using