[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-backports
Subject: [PATCH 08/16] header: add SHASH_DESC_ON_STACK()
From: Hauke Mehrtens <hauke () hauke-m ! de>
Date: 2016-04-30 21:00:40
Message-ID: 1462050048-8953-9-git-send-email-hauke () hauke-m ! de
[Download RAW message or body]
SHASH_DESC_ON_STACK was added in Linux commit a0a77af14 "crypto:
LLVMLinux: Add macro to remove use of VLAIS in crypto code".
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/crypto/hash.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/backport/backport-include/crypto/hash.h b/backport/backport-include/crypto/hash.h
index 3510659..9c26e0c 100644
--- a/backport/backport-include/crypto/hash.h
+++ b/backport/backport-include/crypto/hash.h
@@ -28,4 +28,11 @@ static inline void ahash_request_zero(struct ahash_request *req)
struct ahash_request *name = (void *)__##name##_desc
#endif
+#ifndef SHASH_DESC_ON_STACK
+#define SHASH_DESC_ON_STACK(shash, ctx) \
+ char __##shash##_desc[sizeof(struct shash_desc) + \
+ crypto_shash_descsize(ctx)] CRYPTO_MINALIGN_ATTR; \
+ struct shash_desc *shash = (struct shash_desc *)__##shash##_desc
+#endif
+
#endif /* _BACKPORT_CRYPTO_HASH_H */
--
2.8.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic