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()
111 void *buf, *p; in ceph_crypto_key_unarmor() local
115 buf = kmalloc(blen, GFP_NOFS); in ceph_crypto_key_unarmor()
116 if (!buf) in ceph_crypto_key_unarmor()
118 blen = ceph_unarmor(buf, inkey, inkey+inlen); in ceph_crypto_key_unarmor()
120 kfree(buf); in ceph_crypto_key_unarmor()
124 p = buf; in ceph_crypto_key_unarmor()
126 kfree(buf); in ceph_crypto_key_unarmor()
161 const void *buf, unsigned int buf_len) in setup_sgtable() argument
164 const bool is_vmalloc = is_vmalloc_addr(buf); in setup_sgtable()
165 unsigned int off = offset_in_page(buf); in setup_sgtable()
197 page = vmalloc_to_page(buf); in setup_sgtable()
199 page = virt_to_page(buf); in setup_sgtable()
204 buf += len; in setup_sgtable()
219 void *buf, int buf_len, int in_len, int *pout_len) in ceph_aes_crypt() argument
231 memset(buf + in_len, pad_byte, pad_byte); in ceph_aes_crypt()
232 ret = setup_sgtable(&sgt, &prealloc_sg, buf, crypt_len); in ceph_aes_crypt()
265 pad_byte = *(char *)(buf + in_len - 1); in ceph_aes_crypt()
283 void *buf, int buf_len, int in_len, int *pout_len) in ceph_crypt() argument
290 return ceph_aes_crypt(key, encrypt, buf, buf_len, in_len, in ceph_crypt()