public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: "Herbert Xu" <herbert@gondor.apana.org.au>
To: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: [PATCH 9/10] crypto: api - Move MODULE_ALIAS_CRYPTO to algapi.h
Date: Wed, 15 Feb 2023 17:25:24 +0800	[thread overview]
Message-ID: <E1pSE2W-00BVm0-2d@formenos.hmeau.com> (raw)
In-Reply-To: Y+ykvcAIAH5Rsn7C@gondor.apana.org.au

This is part of the low-level API and should not be exposed to
top-level Crypto API users.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 include/crypto/algapi.h |   13 +++++++++++++
 include/linux/crypto.h  |   13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index dcc1fd4ef1b4..e28957993b56 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -34,6 +34,19 @@
 
 #define CRYPTO_DMA_PADDING ((CRYPTO_DMA_ALIGN - 1) & ~(CRYPTO_MINALIGN - 1))
 
+/*
+ * Autoloaded crypto modules should only use a prefixed name to avoid allowing
+ * arbitrary modules to be loaded. Loading from userspace may still need the
+ * unprefixed names, so retains those aliases as well.
+ * This uses __MODULE_INFO directly instead of MODULE_ALIAS because pre-4.3
+ * gcc (e.g. avr32 toolchain) uses __LINE__ for uniqueness, and this macro
+ * expands twice on the same line. Instead, use a separate base name for the
+ * alias.
+ */
+#define MODULE_ALIAS_CRYPTO(name)	\
+		__MODULE_INFO(alias, alias_userspace, name);	\
+		__MODULE_INFO(alias, alias_crypto, "crypto-" name)
+
 struct crypto_aead;
 struct crypto_instance;
 struct module;
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index c26e59bb7bca..d57597ebef6e 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -20,19 +20,6 @@
 #include <linux/slab.h>
 #include <linux/completion.h>
 
-/*
- * Autoloaded crypto modules should only use a prefixed name to avoid allowing
- * arbitrary modules to be loaded. Loading from userspace may still need the
- * unprefixed names, so retains those aliases as well.
- * This uses __MODULE_INFO directly instead of MODULE_ALIAS because pre-4.3
- * gcc (e.g. avr32 toolchain) uses __LINE__ for uniqueness, and this macro
- * expands twice on the same line. Instead, use a separate base name for the
- * alias.
- */
-#define MODULE_ALIAS_CRYPTO(name)	\
-		__MODULE_INFO(alias, alias_userspace, name);	\
-		__MODULE_INFO(alias, alias_crypto, "crypto-" name)
-
 /*
  * Algorithm masks and types.
  */

  parent reply	other threads:[~2023-02-15  9:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15  9:24 [PATCH 0/10] crypto: api - Restructure stats code Herbert Xu
2023-02-15  9:25 ` [PATCH 1/10] crypto: algapi - Move stat reporting into algapi Herbert Xu
2023-02-15  9:25 ` [PATCH 2/10] crypto: aead - Count error stats differently Herbert Xu
2023-02-16  5:35   ` Eric Biggers
2023-02-16  5:58     ` Herbert Xu
2023-02-16  5:45   ` Eric Biggers
2023-02-16  6:00     ` Herbert Xu
2023-02-16  6:31       ` Eric Biggers
2023-02-16  8:34         ` Herbert Xu
2023-02-15  9:25 ` [PATCH 3/10] crypto: akcipher " Herbert Xu
2023-02-15  9:25 ` [PATCH 4/10] crypto: hash " Herbert Xu
2023-02-16  5:58   ` Eric Biggers
2023-02-16  6:02     ` Herbert Xu
2023-02-16  6:14       ` Eric Biggers
2023-02-16  8:09         ` Herbert Xu
2023-02-15  9:25 ` [PATCH 5/10] crypto: acomp " Herbert Xu
2023-02-15  9:25 ` [PATCH 6/10] crypto: kpp " Herbert Xu
2023-02-15  9:25 ` [PATCH 7/10] crypto: skcipher " Herbert Xu
2023-02-15  9:25 ` [PATCH 8/10] crypto: rng " Herbert Xu
2023-02-16  5:46   ` Eric Biggers
2023-02-16  5:56     ` Herbert Xu
2023-02-16  6:01       ` Eric Biggers
2023-02-15  9:25 ` Herbert Xu [this message]
2023-02-16  5:17   ` [PATCH 9/10] crypto: api - Move MODULE_ALIAS_CRYPTO to algapi.h Eric Biggers
2023-02-16  5:18     ` Herbert Xu
2023-02-15  9:25 ` [PATCH 10/10] crypto: api - Check CRYPTO_USER instead of NET for report Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1pSE2W-00BVm0-2d@formenos.hmeau.com \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox