[PATCH 06/16] header: add AHASH_REQUEST_ON_STACK()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



AHASH_REQUEST_ON_STACK() was added in Linux commit d4421c54c "crypto:
hash - Add AHASH_REQUEST_ON_STACK".

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 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 18cb630..3510659 100644
--- a/backport/backport-include/crypto/hash.h
+++ b/backport/backport-include/crypto/hash.h
@@ -21,4 +21,11 @@ static inline void ahash_request_zero(struct ahash_request *req)
 }
 #endif
 
+#ifndef AHASH_REQUEST_ON_STACK
+#define AHASH_REQUEST_ON_STACK(name, ahash) \
+	char __##name##_desc[sizeof(struct ahash_request) + \
+		crypto_ahash_reqsize(ahash)] CRYPTO_MINALIGN_ATTR; \
+	struct ahash_request *name = (void *)__##name##_desc
+#endif
+
 #endif /* _BACKPORT_CRYPTO_HASH_H */
-- 
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux