Commit 16257e43 authored by GUO Zihua's avatar GUO Zihua
Browse files

crypto: kabi: KABI reservation for crypto

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8RI9L



--------------------------------

Reserve KABI for future crypto development.

Signed-off-by: default avatarGUO Zihua <guozihua@huawei.com>
parent 34a4a473
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <linux/crypto.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/kabi.h>

/**
 * DOC: Authenticated Encryption With Associated Data (AEAD) Cipher API
@@ -97,6 +98,8 @@ struct aead_request {

	struct scatterlist *src;
	struct scatterlist *dst;
	KABI_RESERVE(1)
	KABI_RESERVE(2)

	void *__ctx[] CRYPTO_MINALIGN_ATTR;
};
@@ -169,6 +172,8 @@ struct aead_alg {
	unsigned int ivsize;
	unsigned int maxauthsize;
	unsigned int chunksize;
	KABI_RESERVE(1)
	KABI_RESERVE(2)

	struct crypto_alg base;
};
@@ -177,6 +182,8 @@ struct crypto_aead {
	unsigned int authsize;
	unsigned int reqsize;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	struct crypto_tfm base;
};

+7 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

#include <linux/atomic.h>
#include <linux/crypto.h>
#include <linux/kabi.h>

/**
 * struct akcipher_request - public key request
@@ -38,6 +39,8 @@ struct akcipher_request {
	struct scatterlist *dst;
	unsigned int src_len;
	unsigned int dst_len;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	void *__ctx[] CRYPTO_MINALIGN_ATTR;
};

@@ -51,6 +54,8 @@ struct akcipher_request {
struct crypto_akcipher {
	unsigned int reqsize;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	struct crypto_tfm base;
};

@@ -130,6 +135,8 @@ struct akcipher_alg {
#ifdef CONFIG_CRYPTO_STATS
	struct crypto_istat_akcipher stat;
#endif
	KABI_RESERVE(1)
	KABI_RESERVE(2)

	struct crypto_alg base;
};
+7 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <linux/crypto.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <linux/kabi.h>

/*
 * Maximum values for blocksize and alignmask, used to allocate
@@ -69,6 +70,8 @@ struct crypto_type {
	unsigned int maskclear;
	unsigned int maskset;
	unsigned int tfmsize;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

struct crypto_instance {
@@ -84,6 +87,8 @@ struct crypto_instance {
	};

	struct work_struct free_work;
	KABI_RESERVE(1)
	KABI_RESERVE(2)

	void *__ctx[] CRYPTO_MINALIGN_ATTR;
};
@@ -111,6 +116,8 @@ struct crypto_spawn {
	u32 mask;
	bool dead;
	bool registered;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

struct crypto_queue {
+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <crypto/aead.h>
#include <crypto/hash.h>
#include <crypto/skcipher.h>
#include <linux/kabi.h>

struct cryptd_skcipher {
	struct crypto_skcipher base;
@@ -32,6 +33,8 @@ bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm);
void cryptd_free_skcipher(struct cryptd_skcipher *tfm);

struct cryptd_ahash {
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	struct crypto_ahash base;
};

+9 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/atomic.h>
#include <linux/crypto.h>
#include <linux/string.h>
#include <linux/kabi.h>

struct crypto_ahash;

@@ -78,6 +79,8 @@ struct ahash_request {

	/* This field may only be used by the ahash API code. */
	void *priv;
	KABI_RESERVE(1)
	KABI_RESERVE(2)

	void *__ctx[] CRYPTO_MINALIGN_ATTR;
};
@@ -173,6 +176,8 @@ struct ahash_alg {
};

struct shash_desc {
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	struct crypto_shash *tfm;
	void *__ctx[] __aligned(ARCH_SLAB_MINALIGN);
};
@@ -262,11 +267,15 @@ struct crypto_ahash {

	unsigned int statesize;
	unsigned int reqsize;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	struct crypto_tfm base;
};

struct crypto_shash {
	unsigned int descsize;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	struct crypto_tfm base;
};

Loading