diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-19 23:19:49 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-30 18:36:22 +0200 |
commit | 6c6223265677a22b812eab6f6936bbbc987f48b5 (patch) | |
tree | 2a3aa28185c95299a949115168cbc250262b428a /backport | |
parent | 3e014acf34e29f7667ee279d7066c14a4f1b9c85 (diff) |
header: add AHASH_REQUEST_ON_STACK()
AHASH_REQUEST_ON_STACK() was added in Linux commit d4421c54c "crypto:
hash - Add AHASH_REQUEST_ON_STACK".
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/backport-include/crypto/hash.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backport/backport-include/crypto/hash.h b/backport/backport-include/crypto/hash.h index 18cb6307..35106590 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 */ |