From patchwork Tue Dec 5 16:20:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lukasz Stelmach X-Patchwork-Id: 10093325 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F40A66035E for ; Tue, 5 Dec 2017 16:20:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2F952911F for ; Tue, 5 Dec 2017 16:20:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0442299E0; Tue, 5 Dec 2017 16:20:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C85BF2911F for ; Tue, 5 Dec 2017 16:20:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750740AbdLEQUw (ORCPT ); Tue, 5 Dec 2017 11:20:52 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:36398 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbdLEQUv (ORCPT ); Tue, 5 Dec 2017 11:20:51 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20171205162049euoutp014053fbaa8b8a3b4b295e3c9f7d029f87~9cmoI5_EI0360603606euoutp01p; Tue, 5 Dec 2017 16:20:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20171205162049euoutp014053fbaa8b8a3b4b295e3c9f7d029f87~9cmoI5_EI0360603606euoutp01p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1512490849; bh=dsCuuoblrs6rq1NsvoPhre4EGqJt0UTasxiGh5dwaAc=; h=From:To:Cc:Subject:Date:References:From; b=HNwIWP++f990PHxicXa5uMxrHxKXepRS5nLPQhM4oPTkwFvUZlGX5LbxyswwDRGoH 6SUU4yA5Kg8Ss35hDPfvfv9grbJk8vii72cPNA/jEBUW1ju5XdGs4bjhxHG7CrIh6j YfsNoq0dcKgVbDZOb6fhYeJXwcp4Mx1BzbbtLdRg= Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20171205162048eucas1p27795d52926bbf4d5a7b167c65aa4f567~9cmngL_3U1554015540eucas1p2P; Tue, 5 Dec 2017 16:20:48 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id CD.8E.12743.067C62A5; Tue, 5 Dec 2017 16:20:48 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20171205162048eucas1p241590a1f62f8c49af8a7fb9282daed80~9cmmpJvSY3163531635eucas1p2W; Tue, 5 Dec 2017 16:20:47 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d0000031c7-5e-5a26c76066c7 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5E.F5.18832.F57C62A5; Tue, 5 Dec 2017 16:20:47 +0000 (GMT) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from localhost ([106.116.147.110]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P0H00EM5XEN0W80@eusync1.samsung.com>; Tue, 05 Dec 2017 16:20:47 +0000 (GMT) From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= To: Krzysztof Kozlowski , robh+dt@kernel.org, Stephan Mueller , Herbert Xu , "David S. Miller" , Kukjin Kim , linux-crypto@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?=C5=81ukasz=20Stelmach?= , m.szyprowski@samsung.com, b.zolnierkie@samsung.com Subject: [PATCH] crypto: exynos - Icrease the priority of the driver Date: Tue, 05 Dec 2017 17:20:46 +0100 Message-id: <20171205162046.11621-1-l.stelmach@samsung.com> X-Mailer: git-send-email 2.11.0 Organization: Samsung R&D Institute Poland X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNKsWRmVeSWpSXmKPExsWy7djPc7oJx9WiDP581LDYOGM9q8Wc8y0s Ft2vZCz6H79mtjh/fgO7xc1DKxgt7t/7yWRxedccNosZ5/cxWaw9cpfdonXvEXaLqafXsjjw eHy6coXJY8vKm0we2w6oemxa1cnm0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBkbrr5lLejh qDg8Zy9TA+NFti5GDg4JAROJDwd5uxg5gUwxiQv31gOFuTiEBJYySsxeuYQFwvnMKDF15mdm mIZl97gh4ssYJXoeXWAH6eYVEJT4MfkeC0gNs4C8xJFL2SBhZgFNia2714OVCAl8YZSYMy0c xGYTcJToX3qCFWSOiMBeJok3Z/eyQDSUSpydd5sZxBYWcJF4tWgbK4jNIqAq8aS7lx1kPq+A tcT7t5EQR8tL7Gq7CFbCL6AlsabpOgtE/DGbRO/HEIiTXSRO9MVDhIUlXh3fwg5hy0h0dhxk AjlBQqCfUeLw/O9QiSmMEosXOkDY1hJ/Vk1kgziNT2LStunQYOCV6GgTgijxAGp9yAphO0pM nTCVFeLdWInuN0vZJjDKzUIKoFmIAJqFFEALGJlXMYqklhbnpqcWm+oVJ+YWl+al6yXn525i BCaZ0/+Of93BuPSY1SFGAQ5GJR7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KJc95xUhwNvivpPKbEUZyQa ajEXFScCALtqkYp7AgAA X-CMS-MailID: 20171205162048eucas1p241590a1f62f8c49af8a7fb9282daed80 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20171205162048eucas1p241590a1f62f8c49af8a7fb9282daed80 X-RootMTR: 20171205162048eucas1p241590a1f62f8c49af8a7fb9282daed80 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP exynos-rng is one of many implementations of stdrng. With priority as low as 100 it isn't selected, if software implementations (DRBG) are available. The value 300 was selected to give the PRNG priority before software implementations, but allow them to be selected in FIPS-mode (fips=1 in the kernel command line). Signed-off-by: Ɓukasz Stelmach Reviewed-by: Stephan Mueller Reviewed-by: Krzysztof Kozlowski --- Thank you Stephan Mueller for explanations. drivers/crypto/exynos-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/exynos-rng.c b/drivers/crypto/exynos-rng.c index 4b2ed1d178af..5a37397fb1c5 100644 --- a/drivers/crypto/exynos-rng.c +++ b/drivers/crypto/exynos-rng.c @@ -256,7 +256,7 @@ static struct rng_alg exynos_rng_alg = { .base = { .cra_name = "stdrng", .cra_driver_name = "exynos_rng", - .cra_priority = 100, + .cra_priority = 300, .cra_ctxsize = sizeof(struct exynos_rng_ctx), .cra_module = THIS_MODULE, .cra_init = exynos_rng_kcapi_init,