Lines Matching refs:name
97 if (str->len == 1 && str->name[0] == '.') in fscrypt_is_dot_dotdot()
100 if (str->len == 2 && str->name[0] == '.' && str->name[1] == '.') in fscrypt_is_dot_dotdot()
134 memcpy(out, iname->name, iname->len); in fscrypt_fname_encrypt()
195 sg_init_one(&src_sg, iname->name, iname->len); in fname_decrypt()
196 sg_init_one(&dst_sg, oname->name, oname->len); in fname_decrypt()
205 oname->len = strnlen(oname->name, iname->len); in fname_decrypt()
305 crypto_str->name = kmalloc(max_presented_len + 1, GFP_NOFS); in fscrypt_fname_alloc_buffer()
306 if (!crypto_str->name) in fscrypt_fname_alloc_buffer()
323 kfree(crypto_str->name); in fscrypt_fname_free_buffer()
324 crypto_str->name = NULL; in fscrypt_fname_free_buffer()
360 oname->name[0] = '.'; in fscrypt_fname_disk_to_usr()
361 oname->name[iname->len - 1] = '.'; in fscrypt_fname_disk_to_usr()
385 memcpy(nokey_name.bytes, iname->name, iname->len); in fscrypt_fname_disk_to_usr()
388 memcpy(nokey_name.bytes, iname->name, sizeof(nokey_name.bytes)); in fscrypt_fname_disk_to_usr()
390 err = fscrypt_do_sha256(&iname->name[sizeof(nokey_name.bytes)], in fscrypt_fname_disk_to_usr()
397 oname->len = base64_encode((const u8 *)&nokey_name, size, oname->name); in fscrypt_fname_disk_to_usr()
435 fname->disk_name.name = (unsigned char *)iname->name; in fscrypt_setup_filename()
448 fname->crypto_buf.name = kmalloc(fname->crypto_buf.len, in fscrypt_setup_filename()
450 if (!fname->crypto_buf.name) in fscrypt_setup_filename()
453 ret = fscrypt_fname_encrypt(dir, iname, fname->crypto_buf.name, in fscrypt_setup_filename()
457 fname->disk_name.name = fname->crypto_buf.name; in fscrypt_setup_filename()
473 fname->crypto_buf.name = kmalloc(FSCRYPT_NOKEY_NAME_MAX, GFP_KERNEL); in fscrypt_setup_filename()
474 if (fname->crypto_buf.name == NULL) in fscrypt_setup_filename()
477 ret = base64_decode(iname->name, iname->len, fname->crypto_buf.name); in fscrypt_setup_filename()
486 nokey_name = (void *)fname->crypto_buf.name; in fscrypt_setup_filename()
491 fname->disk_name.name = nokey_name->bytes; in fscrypt_setup_filename()
498 kfree(fname->crypto_buf.name); in fscrypt_setup_filename()
521 (const void *)fname->crypto_buf.name; in fscrypt_match_name()
524 if (likely(fname->disk_name.name)) { in fscrypt_match_name()
527 return !memcmp(de_name, fname->disk_name.name, de_name_len); in fscrypt_match_name()
551 u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name) in fscrypt_fname_siphash() argument
557 return siphash(name->name, name->len, &ci->ci_dirhash_key); in fscrypt_fname_siphash()