From patchwork Thu Aug 13 02:24:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonsoo Kim X-Patchwork-Id: 7005431 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DD5769F39D for ; Thu, 13 Aug 2015 02:24:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0EE7B206EA for ; Thu, 13 Aug 2015 02:24:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25830205DF for ; Thu, 13 Aug 2015 02:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751952AbbHMCYe (ORCPT ); Wed, 12 Aug 2015 22:24:34 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35848 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbbHMCYd (ORCPT ); Wed, 12 Aug 2015 22:24:33 -0400 Received: by pacrr5 with SMTP id rr5so26840618pac.3; Wed, 12 Aug 2015 19:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GwyM75h94OHW0YxLLWclY/+tbbBaAnbflXx//HXQLDw=; b=d2TBaHl07KY8NME2WdxtH5wssjF1oLTyz4cferPazDSpZlv7juN/81TVmAF5rjZ3aG zfzt/HJCsvy41LkbQgBJ3yRiRbf6UAPGgK7Sd9WLDq+NSouyBIJEm272M5L6y3W/oVZ9 P7zYErXqTPUgaaVPXHEUGrpDmFnouB94xh4jI3TO9KrFBK39TGiAwQzAZaeMYGXl/Dz5 f8iI4cR28E3kyINoiV+PI8A7HFhLqoV53lIssO1cwIfEedhJlKIRa5Q7sqCvnwHJMiBZ R0rgJxJRG5vp/A97XYxFbf68iHGMTal2eAuQSpJmdnabHZZ2ndn8MkwhJshm40Pir4Sm o7Ow== X-Received: by 10.66.62.133 with SMTP id y5mr73973999par.8.1439432672588; Wed, 12 Aug 2015 19:24:32 -0700 (PDT) Received: from localhost.localdomain ([119.69.155.222]) by smtp.gmail.com with ESMTPSA id q1sm522532pap.20.2015.08.12.19.24.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Aug 2015 19:24:31 -0700 (PDT) From: Joonsoo Kim X-Google-Original-From: Joonsoo Kim To: Andrew Morton Cc: Minchan Kim , Nitin Gupta , Sergey Senozhatsky , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Herbert Xu , "David S. Miller" , Stephan Mueller , Joonsoo Kim Subject: [PATCH 1/2] crypto: export crypto_alg_list and rwsem Date: Thu, 13 Aug 2015 11:24:13 +0900 Message-Id: <1439432654-23322-1-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 1.9.1 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Until now, zram uses compression algorithm through direct call to core algorithm function, but, it has drawback that we need to add compression algorithm manually to zram. If we don't do that, we cannot utilize various compression algorithms in the system. To improve this situation, zram will be changed to use crypto subsystem in following patch. There is one problem with this change. Zram has a interface that what compression algorithm it can support. Although crypto subsystem has /proc interface to search all of crypto algorithm, but, there is no way to get just compression algorithm in cryto subsystem. To implement it on zram-side, crypto_alg_list and rwsem should be exported so this patch do it. Signed-off-by: Joonsoo Kim --- crypto/internal.h | 2 -- include/linux/crypto.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/internal.h b/crypto/internal.h index 00e42a3..806f17a 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -45,8 +45,6 @@ struct crypto_larval { u32 mask; }; -extern struct list_head crypto_alg_list; -extern struct rw_semaphore crypto_alg_sem; extern struct blocking_notifier_head crypto_chain; #ifdef CONFIG_PROC_FS diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 81ef938..ab39f4b 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -24,6 +24,10 @@ #include #include #include +#include + +extern struct list_head crypto_alg_list; +extern struct rw_semaphore crypto_alg_sem; /* * Autoloaded crypto modules should only use a prefixed name to avoid allowing