提交 4c2b1722 编写于 作者: H Herbert Xu 提交者: JiangShui

crypto: kpp - Add helper to set reqsize

mainline inclusion
from mainline-v6.2-rc1
commit 56861cbd
category: feature
bugzilla: https://gitee/com/openeuler/kernel/issues/16VW8E
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56861cbde1b9f3b34d300e6ba87f2c3de1a9c309

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

The value of reqsize should only be changed through a helper.
To do so we need to first add a helper for this.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NJangShui <yangjiangshui@h-partners.com>
上级 8e626fa1
...@@ -18,6 +18,12 @@ static inline void *kpp_request_ctx(struct kpp_request *req) ...@@ -18,6 +18,12 @@ static inline void *kpp_request_ctx(struct kpp_request *req)
return req->__ctx; return req->__ctx;
} }
static inline void kpp_set_reqsize(struct crypto_kpp *kpp,
unsigned int reqsize)
{
crypto_kpp_alg(kpp)->reqsize = reqsize;
}
static inline void *kpp_tfm_ctx(struct crypto_kpp *tfm) static inline void *kpp_tfm_ctx(struct crypto_kpp *tfm)
{ {
return tfm->base.__crt_ctx; return tfm->base.__crt_ctx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册