diff options
Diffstat (limited to 'crypto/ccm.c')
-rw-r--r-- | crypto/ccm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/crypto/ccm.c b/crypto/ccm.c index 0a083342ec8c..aca949559be8 100644 --- a/crypto/ccm.c +++ b/crypto/ccm.c @@ -46,7 +46,18 @@ struct crypto_rfc4309_req_ctx { struct crypto_ccm_req_priv_ctx { u8 odata[16]; u8 idata[16]; - u8 auth_tag[16]; + + /* + * We need to force auth_tag to be on its own cacheline. + * + * We put it on its cacheline with the macro ____cacheline_aligned. + * The next fields must be on another cacheline so we add a dummy field + * which is located on another cacheline to enforce that. + */ + u8 auth_tag[16] ____cacheline_aligned; + + u8 dummy_align_auth_tag ____cacheline_aligned; + u32 flags; struct scatterlist src[3]; struct scatterlist dst[3]; |