Lines Matching refs:buf
23 static int set_secret(struct ceph_crypto_key *key, void *buf) in set_secret() argument
43 key->key = kmemdup(buf, key->len, GFP_NOIO); in set_secret()
100 void *buf, *p; in ceph_crypto_key_unarmor() local
104 buf = kmalloc(blen, GFP_NOFS); in ceph_crypto_key_unarmor()
105 if (!buf) in ceph_crypto_key_unarmor()
107 blen = ceph_unarmor(buf, inkey, inkey+inlen); in ceph_crypto_key_unarmor()
109 kfree(buf); in ceph_crypto_key_unarmor()
113 p = buf; in ceph_crypto_key_unarmor()
115 kfree(buf); in ceph_crypto_key_unarmor()
150 const void *buf, unsigned int buf_len) in setup_sgtable() argument
153 const bool is_vmalloc = is_vmalloc_addr(buf); in setup_sgtable()
154 unsigned int off = offset_in_page(buf); in setup_sgtable()
186 page = vmalloc_to_page(buf); in setup_sgtable()
188 page = virt_to_page(buf); in setup_sgtable()
193 buf += len; in setup_sgtable()
208 void *buf, int buf_len, int in_len, int *pout_len) in ceph_aes_crypt() argument
220 memset(buf + in_len, pad_byte, pad_byte); in ceph_aes_crypt()
221 ret = setup_sgtable(&sgt, &prealloc_sg, buf, crypt_len); in ceph_aes_crypt()
254 pad_byte = *(char *)(buf + in_len - 1); in ceph_aes_crypt()
272 void *buf, int buf_len, int in_len, int *pout_len) in ceph_crypt() argument
279 return ceph_aes_crypt(key, encrypt, buf, buf_len, in_len, in ceph_crypt()