• Home
  • Raw
  • Download

Lines Matching refs:rc

65 	int rc = crypto_shash_tfm_digest(crypt_stat->hash_tfm, src, len, dst);  in ecryptfs_calculate_md5()  local
67 if (rc) { in ecryptfs_calculate_md5()
70 __func__, rc); in ecryptfs_calculate_md5()
74 return rc; in ecryptfs_calculate_md5()
84 int rc; in ecryptfs_crypto_api_algify_cipher_name() local
89 rc = -ENOMEM; in ecryptfs_crypto_api_algify_cipher_name()
94 rc = 0; in ecryptfs_crypto_api_algify_cipher_name()
96 return rc; in ecryptfs_crypto_api_algify_cipher_name()
113 int rc = 0; in ecryptfs_derive_iv() local
132 rc = ecryptfs_calculate_md5(dst, crypt_stat, src, in ecryptfs_derive_iv()
134 if (rc) { in ecryptfs_derive_iv()
145 return rc; in ecryptfs_derive_iv()
157 int rc; in ecryptfs_init_crypt_stat() local
161 rc = PTR_ERR(tfm); in ecryptfs_init_crypt_stat()
164 rc); in ecryptfs_init_crypt_stat()
165 return rc; in ecryptfs_init_crypt_stat()
265 int rc; member
268 static void extent_crypt_complete(struct crypto_async_request *req, int rc) in extent_crypt_complete() argument
272 if (rc == -EINPROGRESS) in extent_crypt_complete()
275 ecr->rc = rc; in extent_crypt_complete()
297 int rc = 0; in crypt_scatterlist() local
314 rc = -ENOMEM; in crypt_scatterlist()
323 rc = crypto_skcipher_setkey(crypt_stat->tfm, crypt_stat->key, in crypt_scatterlist()
325 if (rc) { in crypt_scatterlist()
328 rc); in crypt_scatterlist()
330 rc = -EINVAL; in crypt_scatterlist()
337 rc = op == ENCRYPT ? crypto_skcipher_encrypt(req) : in crypt_scatterlist()
339 if (rc == -EINPROGRESS || rc == -EBUSY) { in crypt_scatterlist()
343 rc = ecr->rc; in crypt_scatterlist()
348 return rc; in crypt_scatterlist()
386 int rc; in crypt_extent() local
389 rc = ecryptfs_derive_iv(extent_iv, crypt_stat, in crypt_extent()
391 if (rc) { in crypt_extent()
394 (unsigned long long)(extent_base + extent_offset), rc); in crypt_extent()
406 rc = crypt_scatterlist(crypt_stat, &dst_sg, &src_sg, extent_size, in crypt_extent()
408 if (rc < 0) { in crypt_extent()
411 "rc = [%d]\n", __func__, page_index, extent_offset, rc); in crypt_extent()
414 rc = 0; in crypt_extent()
416 return rc; in crypt_extent()
443 int rc = 0; in ecryptfs_encrypt_page() local
451 rc = -ENOMEM; in ecryptfs_encrypt_page()
460 rc = crypt_extent(crypt_stat, enc_extent_page, page, in ecryptfs_encrypt_page()
462 if (rc) { in ecryptfs_encrypt_page()
464 "rc = [%d]\n", __func__, rc); in ecryptfs_encrypt_page()
471 rc = ecryptfs_write_lower(ecryptfs_inode, enc_extent_virt, lower_offset, in ecryptfs_encrypt_page()
474 if (rc < 0) { in ecryptfs_encrypt_page()
477 rc); in ecryptfs_encrypt_page()
480 rc = 0; in ecryptfs_encrypt_page()
485 return rc; in ecryptfs_encrypt_page()
511 int rc = 0; in ecryptfs_decrypt_page() local
520 rc = ecryptfs_read_lower(page_virt, lower_offset, PAGE_SIZE, in ecryptfs_decrypt_page()
523 if (rc < 0) { in ecryptfs_decrypt_page()
526 rc); in ecryptfs_decrypt_page()
533 rc = crypt_extent(crypt_stat, page, page, in ecryptfs_decrypt_page()
535 if (rc) { in ecryptfs_decrypt_page()
537 "rc = [%d]\n", __func__, rc); in ecryptfs_decrypt_page()
542 return rc; in ecryptfs_decrypt_page()
559 int rc = -EINVAL; in ecryptfs_init_crypt_ctx() local
568 rc = 0; in ecryptfs_init_crypt_ctx()
571 rc = ecryptfs_crypto_api_algify_cipher_name(&full_alg_name, in ecryptfs_init_crypt_ctx()
573 if (rc) in ecryptfs_init_crypt_ctx()
577 rc = PTR_ERR(crypt_stat->tfm); in ecryptfs_init_crypt_ctx()
586 rc = 0; in ecryptfs_init_crypt_ctx()
591 return rc; in ecryptfs_init_crypt_ctx()
636 int rc = 0; in ecryptfs_compute_root_iv() local
642 rc = -EINVAL; in ecryptfs_compute_root_iv()
647 rc = ecryptfs_calculate_md5(dst, crypt_stat, crypt_stat->key, in ecryptfs_compute_root_iv()
649 if (rc) { in ecryptfs_compute_root_iv()
656 if (rc) { in ecryptfs_compute_root_iv()
660 return rc; in ecryptfs_compute_root_iv()
707 int rc = 0; in ecryptfs_copy_mount_wide_sigs_to_inode_sigs() local
717 rc = ecryptfs_add_keysig(crypt_stat, global_auth_tok->sig); in ecryptfs_copy_mount_wide_sigs_to_inode_sigs()
718 if (rc) { in ecryptfs_copy_mount_wide_sigs_to_inode_sigs()
719 printk(KERN_ERR "Error adding keysig; rc = [%d]\n", rc); in ecryptfs_copy_mount_wide_sigs_to_inode_sigs()
727 return rc; in ecryptfs_copy_mount_wide_sigs_to_inode_sigs()
778 int rc = 0; in ecryptfs_new_file_context() local
784 rc = ecryptfs_copy_mount_wide_sigs_to_inode_sigs(crypt_stat, in ecryptfs_new_file_context()
786 if (rc) { in ecryptfs_new_file_context()
788 "to the inode key sigs; rc = [%d]\n", rc); in ecryptfs_new_file_context()
800 rc = ecryptfs_init_crypt_ctx(crypt_stat); in ecryptfs_new_file_context()
801 if (rc) in ecryptfs_new_file_context()
804 crypt_stat->cipher, rc); in ecryptfs_new_file_context()
806 return rc; in ecryptfs_new_file_context()
966 int rc = 0; in ecryptfs_cipher_code_to_string() local
976 rc = -EINVAL; in ecryptfs_cipher_code_to_string()
978 return rc; in ecryptfs_cipher_code_to_string()
985 int rc; in ecryptfs_read_and_validate_header_region() local
987 rc = ecryptfs_read_lower(file_size, 0, ECRYPTFS_SIZE_AND_MARKER_BYTES, in ecryptfs_read_and_validate_header_region()
989 if (rc < 0) in ecryptfs_read_and_validate_header_region()
990 return rc; in ecryptfs_read_and_validate_header_region()
991 else if (rc < ECRYPTFS_SIZE_AND_MARKER_BYTES) in ecryptfs_read_and_validate_header_region()
993 rc = ecryptfs_validate_marker(marker); in ecryptfs_read_and_validate_header_region()
994 if (!rc) in ecryptfs_read_and_validate_header_region()
996 return rc; in ecryptfs_read_and_validate_header_region()
1054 int rc; in ecryptfs_write_headers_virt() local
1067 rc = ecryptfs_generate_key_packet_set((page_virt + offset), crypt_stat, in ecryptfs_write_headers_virt()
1070 if (rc) in ecryptfs_write_headers_virt()
1072 "set; rc = [%d]\n", rc); in ecryptfs_write_headers_virt()
1077 return rc; in ecryptfs_write_headers_virt()
1084 int rc; in ecryptfs_write_metadata_to_contents() local
1086 rc = ecryptfs_write_lower(ecryptfs_inode, virt, in ecryptfs_write_metadata_to_contents()
1088 if (rc < 0) in ecryptfs_write_metadata_to_contents()
1090 "information to lower file; rc = [%d]\n", __func__, rc); in ecryptfs_write_metadata_to_contents()
1092 rc = 0; in ecryptfs_write_metadata_to_contents()
1093 return rc; in ecryptfs_write_metadata_to_contents()
1101 int rc; in ecryptfs_write_metadata_to_xattr() local
1106 rc = -EOPNOTSUPP; in ecryptfs_write_metadata_to_xattr()
1111 rc = __vfs_setxattr(lower_dentry, lower_inode, ECRYPTFS_XATTR_NAME, in ecryptfs_write_metadata_to_xattr()
1113 if (!rc && ecryptfs_inode) in ecryptfs_write_metadata_to_xattr()
1117 return rc; in ecryptfs_write_metadata_to_xattr()
1153 int rc = 0; in ecryptfs_write_metadata() local
1158 rc = -EINVAL; in ecryptfs_write_metadata()
1164 rc = -EINVAL; in ecryptfs_write_metadata()
1173 rc = -ENOMEM; in ecryptfs_write_metadata()
1177 rc = ecryptfs_write_headers_virt(virt, virt_len, &size, crypt_stat, in ecryptfs_write_metadata()
1179 if (unlikely(rc)) { in ecryptfs_write_metadata()
1181 __func__, rc); in ecryptfs_write_metadata()
1185 rc = ecryptfs_write_metadata_to_xattr(ecryptfs_dentry, ecryptfs_inode, in ecryptfs_write_metadata()
1188 rc = ecryptfs_write_metadata_to_contents(ecryptfs_inode, virt, in ecryptfs_write_metadata()
1190 if (rc) { in ecryptfs_write_metadata()
1192 "rc = [%d]\n", __func__, rc); in ecryptfs_write_metadata()
1198 return rc; in ecryptfs_write_metadata()
1207 int rc = 0; in parse_header_metadata() local
1220 rc = -EINVAL; in parse_header_metadata()
1224 return rc; in parse_header_metadata()
1276 int rc = 0; in ecryptfs_read_headers_virt() local
1284 rc = ecryptfs_validate_marker(page_virt + offset); in ecryptfs_read_headers_virt()
1285 if (rc) in ecryptfs_read_headers_virt()
1297 rc = -EINVAL; in ecryptfs_read_headers_virt()
1302 rc = parse_header_metadata(crypt_stat, (page_virt + offset), in ecryptfs_read_headers_virt()
1304 if (rc) { in ecryptfs_read_headers_virt()
1306 "metadata; rc = [%d]\n", rc); in ecryptfs_read_headers_virt()
1311 rc = ecryptfs_parse_packet_set(crypt_stat, (page_virt + offset), in ecryptfs_read_headers_virt()
1314 return rc; in ecryptfs_read_headers_virt()
1332 int rc = 0; in ecryptfs_read_xattr_region() local
1343 rc = -EINVAL; in ecryptfs_read_xattr_region()
1347 return rc; in ecryptfs_read_xattr_region()
1355 int rc; in ecryptfs_read_and_validate_xattr_region() local
1357 rc = ecryptfs_getxattr_lower(ecryptfs_dentry_to_lower(dentry), in ecryptfs_read_and_validate_xattr_region()
1361 if (rc < 0) in ecryptfs_read_and_validate_xattr_region()
1362 return rc; in ecryptfs_read_and_validate_xattr_region()
1363 else if (rc < ECRYPTFS_SIZE_AND_MARKER_BYTES) in ecryptfs_read_and_validate_xattr_region()
1365 rc = ecryptfs_validate_marker(marker); in ecryptfs_read_and_validate_xattr_region()
1366 if (!rc) in ecryptfs_read_and_validate_xattr_region()
1368 return rc; in ecryptfs_read_and_validate_xattr_region()
1385 int rc; in ecryptfs_read_metadata() local
1399 rc = -ENOMEM; in ecryptfs_read_metadata()
1402 rc = ecryptfs_read_lower(page_virt, 0, crypt_stat->extent_size, in ecryptfs_read_metadata()
1404 if (rc >= 0) in ecryptfs_read_metadata()
1405 rc = ecryptfs_read_headers_virt(page_virt, crypt_stat, in ecryptfs_read_metadata()
1408 if (rc) { in ecryptfs_read_metadata()
1411 rc = ecryptfs_read_xattr_region(page_virt, ecryptfs_inode); in ecryptfs_read_metadata()
1412 if (rc) { in ecryptfs_read_metadata()
1416 rc = -EINVAL; in ecryptfs_read_metadata()
1419 rc = ecryptfs_read_headers_virt(page_virt, crypt_stat, in ecryptfs_read_metadata()
1422 if (rc) { in ecryptfs_read_metadata()
1426 rc = -EINVAL; in ecryptfs_read_metadata()
1438 rc = -EINVAL; in ecryptfs_read_metadata()
1446 return rc; in ecryptfs_read_metadata()
1462 int rc = 0; in ecryptfs_encrypt_filename() local
1471 rc = ecryptfs_write_tag_70_packet( in ecryptfs_encrypt_filename()
1476 if (rc) { in ecryptfs_encrypt_filename()
1479 rc); in ecryptfs_encrypt_filename()
1486 rc = -ENOMEM; in ecryptfs_encrypt_filename()
1490 rc = ecryptfs_write_tag_70_packet(filename->encrypted_filename, in ecryptfs_encrypt_filename()
1496 if (rc) { in ecryptfs_encrypt_filename()
1499 rc); in ecryptfs_encrypt_filename()
1509 rc = -EOPNOTSUPP; in ecryptfs_encrypt_filename()
1513 return rc; in ecryptfs_encrypt_filename()
1519 int rc = 0; in ecryptfs_copy_filename() local
1523 rc = -ENOMEM; in ecryptfs_copy_filename()
1533 return rc; in ecryptfs_copy_filename()
1552 int rc; in ecryptfs_process_key_cipher() local
1556 rc = -EINVAL; in ecryptfs_process_key_cipher()
1561 rc = ecryptfs_crypto_api_algify_cipher_name(&full_alg_name, cipher_name, in ecryptfs_process_key_cipher()
1563 if (rc) in ecryptfs_process_key_cipher()
1567 rc = PTR_ERR(*key_tfm); in ecryptfs_process_key_cipher()
1569 "[%s]; rc = [%d]\n", full_alg_name, rc); in ecryptfs_process_key_cipher()
1576 rc = crypto_skcipher_setkey(*key_tfm, dummy_key, *key_size); in ecryptfs_process_key_cipher()
1577 if (rc) { in ecryptfs_process_key_cipher()
1580 rc); in ecryptfs_process_key_cipher()
1581 rc = -EINVAL; in ecryptfs_process_key_cipher()
1586 return rc; in ecryptfs_process_key_cipher()
1625 int rc = 0; in ecryptfs_add_new_key_tfm() local
1633 rc = -ENOMEM; in ecryptfs_add_new_key_tfm()
1641 rc = ecryptfs_process_key_cipher(&tmp_tfm->key_tfm, in ecryptfs_add_new_key_tfm()
1644 if (rc) { in ecryptfs_add_new_key_tfm()
1647 tmp_tfm->cipher_name, rc); in ecryptfs_add_new_key_tfm()
1655 return rc; in ecryptfs_add_new_key_tfm()
1702 int rc = 0; in ecryptfs_get_tfm_and_mutex_for_cipher_name() local
1709 rc = ecryptfs_add_new_key_tfm(&key_tfm, cipher_name, 0); in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1710 if (rc) { in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1712 "rc = [%d]\n", rc); in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1720 return rc; in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1898 int rc = 0; in ecryptfs_encrypt_and_encode_filename() local
1908 rc = -ENOMEM; in ecryptfs_encrypt_and_encode_filename()
1913 rc = ecryptfs_encrypt_filename(filename, mount_crypt_stat); in ecryptfs_encrypt_and_encode_filename()
1914 if (rc) { in ecryptfs_encrypt_and_encode_filename()
1916 "filename; rc = [%d]\n", __func__, rc); in ecryptfs_encrypt_and_encode_filename()
1936 rc = -ENOMEM; in ecryptfs_encrypt_and_encode_filename()
1958 rc = -EOPNOTSUPP; in ecryptfs_encrypt_and_encode_filename()
1960 if (rc) { in ecryptfs_encrypt_and_encode_filename()
1963 rc); in ecryptfs_encrypt_and_encode_filename()
1971 rc = ecryptfs_copy_filename(encoded_name, in ecryptfs_encrypt_and_encode_filename()
1976 return rc; in ecryptfs_encrypt_and_encode_filename()
2011 int rc = 0; in ecryptfs_decode_and_decrypt_filename() local
2016 rc = ecryptfs_copy_filename(plaintext_name, in ecryptfs_decode_and_decrypt_filename()
2025 rc = -EINVAL; in ecryptfs_decode_and_decrypt_filename()
2035 rc = -ENOMEM; in ecryptfs_decode_and_decrypt_filename()
2040 rc = ecryptfs_parse_tag_70_packet(plaintext_name, in ecryptfs_decode_and_decrypt_filename()
2046 if (rc) { in ecryptfs_decode_and_decrypt_filename()
2053 rc = ecryptfs_copy_filename(plaintext_name, in ecryptfs_decode_and_decrypt_filename()
2061 return rc; in ecryptfs_decode_and_decrypt_filename()
2072 int rc; in ecryptfs_set_f_namelen() local
2079 rc = ecryptfs_get_tfm_and_mutex_for_cipher_name(&tfm, &tfm_mutex, in ecryptfs_set_f_namelen()
2081 if (unlikely(rc)) { in ecryptfs_set_f_namelen()
2083 return rc; in ecryptfs_set_f_namelen()