diff options
Diffstat (limited to 'fs/ecryptfs/keystore.c')
-rw-r--r-- | fs/ecryptfs/keystore.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index e6a96e8f5e67..c90ca5dfc506 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -556,8 +556,8 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes, | |||
556 | goto out_unlock; | 556 | goto out_unlock; |
557 | } | 557 | } |
558 | if (s->max_packet_size > (*remaining_bytes)) { | 558 | if (s->max_packet_size > (*remaining_bytes)) { |
559 | printk(KERN_WARNING "%s: Require [%d] bytes to write; only " | 559 | printk(KERN_WARNING "%s: Require [%zd] bytes to write; only " |
560 | "[%d] available\n", __func__, s->max_packet_size, | 560 | "[%zd] available\n", __func__, s->max_packet_size, |
561 | (*remaining_bytes)); | 561 | (*remaining_bytes)); |
562 | rc = -EINVAL; | 562 | rc = -EINVAL; |
563 | goto out_unlock; | 563 | goto out_unlock; |
@@ -594,7 +594,7 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes, | |||
594 | mount_crypt_stat->global_default_fn_cipher_key_bytes); | 594 | mount_crypt_stat->global_default_fn_cipher_key_bytes); |
595 | if (s->cipher_code == 0) { | 595 | if (s->cipher_code == 0) { |
596 | printk(KERN_WARNING "%s: Unable to generate code for " | 596 | printk(KERN_WARNING "%s: Unable to generate code for " |
597 | "cipher [%s] with key bytes [%d]\n", __func__, | 597 | "cipher [%s] with key bytes [%zd]\n", __func__, |
598 | mount_crypt_stat->global_default_fn_cipher_name, | 598 | mount_crypt_stat->global_default_fn_cipher_name, |
599 | mount_crypt_stat->global_default_fn_cipher_key_bytes); | 599 | mount_crypt_stat->global_default_fn_cipher_key_bytes); |
600 | rc = -EINVAL; | 600 | rc = -EINVAL; |
@@ -693,7 +693,7 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes, | |||
693 | printk(KERN_ERR "%s: Internal error whilst attempting to " | 693 | printk(KERN_ERR "%s: Internal error whilst attempting to " |
694 | "convert filename memory to scatterlist; " | 694 | "convert filename memory to scatterlist; " |
695 | "expected rc = 1; got rc = [%d]. " | 695 | "expected rc = 1; got rc = [%d]. " |
696 | "block_aligned_filename_size = [%d]\n", __func__, rc, | 696 | "block_aligned_filename_size = [%zd]\n", __func__, rc, |
697 | s->block_aligned_filename_size); | 697 | s->block_aligned_filename_size); |
698 | goto out_release_free_unlock; | 698 | goto out_release_free_unlock; |
699 | } | 699 | } |
@@ -703,7 +703,7 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes, | |||
703 | printk(KERN_ERR "%s: Internal error whilst attempting to " | 703 | printk(KERN_ERR "%s: Internal error whilst attempting to " |
704 | "convert encrypted filename memory to scatterlist; " | 704 | "convert encrypted filename memory to scatterlist; " |
705 | "expected rc = 1; got rc = [%d]. " | 705 | "expected rc = 1; got rc = [%d]. " |
706 | "block_aligned_filename_size = [%d]\n", __func__, rc, | 706 | "block_aligned_filename_size = [%zd]\n", __func__, rc, |
707 | s->block_aligned_filename_size); | 707 | s->block_aligned_filename_size); |
708 | goto out_release_free_unlock; | 708 | goto out_release_free_unlock; |
709 | } | 709 | } |
@@ -787,7 +787,7 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, | |||
787 | s = kmalloc(sizeof(*s), GFP_KERNEL); | 787 | s = kmalloc(sizeof(*s), GFP_KERNEL); |
788 | if (!s) { | 788 | if (!s) { |
789 | printk(KERN_ERR "%s: Out of memory whilst trying to kmalloc " | 789 | printk(KERN_ERR "%s: Out of memory whilst trying to kmalloc " |
790 | "[%d] bytes of kernel memory\n", __func__, sizeof(*s)); | 790 | "[%zd] bytes of kernel memory\n", __func__, sizeof(*s)); |
791 | goto out; | 791 | goto out; |
792 | } | 792 | } |
793 | s->desc.flags = CRYPTO_TFM_REQ_MAY_SLEEP; | 793 | s->desc.flags = CRYPTO_TFM_REQ_MAY_SLEEP; |
@@ -825,8 +825,8 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, | |||
825 | - ECRYPTFS_SIG_SIZE - 1); | 825 | - ECRYPTFS_SIG_SIZE - 1); |
826 | if ((1 + s->packet_size_len + s->parsed_tag_70_packet_size) | 826 | if ((1 + s->packet_size_len + s->parsed_tag_70_packet_size) |
827 | > max_packet_size) { | 827 | > max_packet_size) { |
828 | printk(KERN_WARNING "%s: max_packet_size is [%d]; real packet " | 828 | printk(KERN_WARNING "%s: max_packet_size is [%zd]; real packet " |
829 | "size is [%d]\n", __func__, max_packet_size, | 829 | "size is [%zd]\n", __func__, max_packet_size, |
830 | (1 + s->packet_size_len + 1 | 830 | (1 + s->packet_size_len + 1 |
831 | + s->block_aligned_filename_size)); | 831 | + s->block_aligned_filename_size)); |
832 | rc = -EINVAL; | 832 | rc = -EINVAL; |
@@ -860,7 +860,7 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, | |||
860 | printk(KERN_ERR "%s: Internal error whilst attempting to " | 860 | printk(KERN_ERR "%s: Internal error whilst attempting to " |
861 | "convert encrypted filename memory to scatterlist; " | 861 | "convert encrypted filename memory to scatterlist; " |
862 | "expected rc = 1; got rc = [%d]. " | 862 | "expected rc = 1; got rc = [%d]. " |
863 | "block_aligned_filename_size = [%d]\n", __func__, rc, | 863 | "block_aligned_filename_size = [%zd]\n", __func__, rc, |
864 | s->block_aligned_filename_size); | 864 | s->block_aligned_filename_size); |
865 | goto out_unlock; | 865 | goto out_unlock; |
866 | } | 866 | } |
@@ -869,7 +869,7 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, | |||
869 | GFP_KERNEL); | 869 | GFP_KERNEL); |
870 | if (!s->decrypted_filename) { | 870 | if (!s->decrypted_filename) { |
871 | printk(KERN_ERR "%s: Out of memory whilst attempting to " | 871 | printk(KERN_ERR "%s: Out of memory whilst attempting to " |
872 | "kmalloc [%d] bytes\n", __func__, | 872 | "kmalloc [%zd] bytes\n", __func__, |
873 | s->block_aligned_filename_size); | 873 | s->block_aligned_filename_size); |
874 | rc = -ENOMEM; | 874 | rc = -ENOMEM; |
875 | goto out_unlock; | 875 | goto out_unlock; |
@@ -880,7 +880,7 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, | |||
880 | printk(KERN_ERR "%s: Internal error whilst attempting to " | 880 | printk(KERN_ERR "%s: Internal error whilst attempting to " |
881 | "convert decrypted filename memory to scatterlist; " | 881 | "convert decrypted filename memory to scatterlist; " |
882 | "expected rc = 1; got rc = [%d]. " | 882 | "expected rc = 1; got rc = [%d]. " |
883 | "block_aligned_filename_size = [%d]\n", __func__, rc, | 883 | "block_aligned_filename_size = [%zd]\n", __func__, rc, |
884 | s->block_aligned_filename_size); | 884 | s->block_aligned_filename_size); |
885 | goto out_free_unlock; | 885 | goto out_free_unlock; |
886 | } | 886 | } |
@@ -944,7 +944,7 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, | |||
944 | (*filename) = kmalloc(((*filename_size) + 1), GFP_KERNEL); | 944 | (*filename) = kmalloc(((*filename_size) + 1), GFP_KERNEL); |
945 | if (!(*filename)) { | 945 | if (!(*filename)) { |
946 | printk(KERN_ERR "%s: Out of memory whilst attempting to " | 946 | printk(KERN_ERR "%s: Out of memory whilst attempting to " |
947 | "kmalloc [%d] bytes\n", __func__, | 947 | "kmalloc [%zd] bytes\n", __func__, |
948 | ((*filename_size) + 1)); | 948 | ((*filename_size) + 1)); |
949 | rc = -ENOMEM; | 949 | rc = -ENOMEM; |
950 | goto out_free_unlock; | 950 | goto out_free_unlock; |