summaryrefslogtreecommitdiff
path: root/net/ceph/auth_x.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-12-02 18:35:07 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-12-13 01:09:19 +0300
commit7882a26d2e2e520099e2961d5e2e870f8e4172dc (patch)
treebe084fd64e02745bf8ab5de2c697517467a11c34 /net/ceph/auth_x.h
parenta45f795c65b479b4ba107b6ccde29b896d51ee98 (diff)
downloadlinux-7882a26d2e2e520099e2961d5e2e870f8e4172dc.tar.xz
libceph: rename and align ceph_x_authorizer::reply_buf
It's going to be used as a temporary buffer for in-place en/decryption with ceph_crypt() instead of on-stack buffers, so rename to enc_buf. Ensure alignment to avoid GFP_ATOMIC allocations in the crypto stack. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'net/ceph/auth_x.h')
-rw-r--r--net/ceph/auth_x.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ceph/auth_x.h b/net/ceph/auth_x.h
index 21a5af904bae..48e9ad41bd2a 100644
--- a/net/ceph/auth_x.h
+++ b/net/ceph/auth_x.h
@@ -24,6 +24,7 @@ struct ceph_x_ticket_handler {
unsigned long renew_after, expires;
};
+#define CEPHX_AU_ENC_BUF_LEN 128 /* big enough for encrypted blob */
struct ceph_x_authorizer {
struct ceph_authorizer base;
@@ -32,7 +33,7 @@ struct ceph_x_authorizer {
unsigned int service;
u64 nonce;
u64 secret_id;
- char reply_buf[128]; /* big enough for encrypted blob */
+ char enc_buf[CEPHX_AU_ENC_BUF_LEN] __aligned(8);
};
struct ceph_x_info {