aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>2010-11-15 18:36:38 -0500
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>2011-01-17 14:01:24 -0500
commitf24b38874e1e37bb70291bbc4c5c3c13f5f9dac8 (patch)
treef1e41cafb5205403961e98728ade5adfaf5b33a7 /fs
parent888d57bbc91ebd031451d4ab1c669baee826a06c (diff)
ecryptfs: Fix ecryptfs_printk() size_t warnings
Commit cb55d21f6fa19d8c6c2680d90317ce88c1f57269 revealed a number of missing 'z' length modifiers in calls to ecryptfs_printk() when printing variables of type size_t. This patch fixes those compiler warnings. Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ecryptfs/crypto.c4
-rw-r--r--fs/ecryptfs/keystore.c20
2 files changed, 12 insertions, 12 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 57bdd7a13207..bfd8b680e648 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -348,7 +348,7 @@ static int encrypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat,
348 BUG_ON(!crypt_stat || !crypt_stat->tfm 348 BUG_ON(!crypt_stat || !crypt_stat->tfm
349 || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)); 349 || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED));
350 if (unlikely(ecryptfs_verbosity > 0)) { 350 if (unlikely(ecryptfs_verbosity > 0)) {
351 ecryptfs_printk(KERN_DEBUG, "Key size [%d]; key:\n", 351 ecryptfs_printk(KERN_DEBUG, "Key size [%zd]; key:\n",
352 crypt_stat->key_size); 352 crypt_stat->key_size);
353 ecryptfs_dump_hex(crypt_stat->key, 353 ecryptfs_dump_hex(crypt_stat->key,
354 crypt_stat->key_size); 354 crypt_stat->key_size);
@@ -778,7 +778,7 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)
778 } 778 }
779 ecryptfs_printk(KERN_DEBUG, 779 ecryptfs_printk(KERN_DEBUG,
780 "Initializing cipher [%s]; strlen = [%d]; " 780 "Initializing cipher [%s]; strlen = [%d]; "
781 "key_size_bits = [%d]\n", 781 "key_size_bits = [%zd]\n",
782 crypt_stat->cipher, (int)strlen(crypt_stat->cipher), 782 crypt_stat->cipher, (int)strlen(crypt_stat->cipher),
783 crypt_stat->key_size << 3); 783 crypt_stat->key_size << 3);
784 if (crypt_stat->tfm) { 784 if (crypt_stat->tfm) {
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index 25fd7f595c99..c1436cff6f2d 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -130,7 +130,7 @@ int ecryptfs_write_packet_length(char *dest, size_t size,
130 } else { 130 } else {
131 rc = -EINVAL; 131 rc = -EINVAL;
132 ecryptfs_printk(KERN_WARNING, 132 ecryptfs_printk(KERN_WARNING,
133 "Unsupported packet size: [%d]\n", size); 133 "Unsupported packet size: [%zd]\n", size);
134 } 134 }
135 return rc; 135 return rc;
136} 136}
@@ -1672,7 +1672,7 @@ decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
1672 auth_tok->session_key.decrypted_key_size); 1672 auth_tok->session_key.decrypted_key_size);
1673 crypt_stat->flags |= ECRYPTFS_KEY_VALID; 1673 crypt_stat->flags |= ECRYPTFS_KEY_VALID;
1674 if (unlikely(ecryptfs_verbosity > 0)) { 1674 if (unlikely(ecryptfs_verbosity > 0)) {
1675 ecryptfs_printk(KERN_DEBUG, "FEK of size [%d]:\n", 1675 ecryptfs_printk(KERN_DEBUG, "FEK of size [%zd]:\n",
1676 crypt_stat->key_size); 1676 crypt_stat->key_size);
1677 ecryptfs_dump_hex(crypt_stat->key, 1677 ecryptfs_dump_hex(crypt_stat->key,
1678 crypt_stat->key_size); 1678 crypt_stat->key_size);
@@ -1754,7 +1754,7 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
1754 if (ECRYPTFS_SIG_SIZE != tag_11_contents_size) { 1754 if (ECRYPTFS_SIG_SIZE != tag_11_contents_size) {
1755 ecryptfs_printk(KERN_ERR, "Expected " 1755 ecryptfs_printk(KERN_ERR, "Expected "
1756 "signature of size [%d]; " 1756 "signature of size [%d]; "
1757 "read size [%d]\n", 1757 "read size [%zd]\n",
1758 ECRYPTFS_SIG_SIZE, 1758 ECRYPTFS_SIG_SIZE,
1759 tag_11_contents_size); 1759 tag_11_contents_size);
1760 rc = -EIO; 1760 rc = -EIO;
@@ -1787,8 +1787,8 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
1787 goto out_wipe_list; 1787 goto out_wipe_list;
1788 break; 1788 break;
1789 default: 1789 default:
1790 ecryptfs_printk(KERN_DEBUG, "No packet at offset " 1790 ecryptfs_printk(KERN_DEBUG, "No packet at offset [%zd] "
1791 "[%d] of the file header; hex value of " 1791 "of the file header; hex value of "
1792 "character is [0x%.2x]\n", i, src[i]); 1792 "character is [0x%.2x]\n", i, src[i]);
1793 next_packet_is_auth_tok_packet = 0; 1793 next_packet_is_auth_tok_packet = 0;
1794 } 1794 }
@@ -2168,7 +2168,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
2168 if (encrypted_session_key_valid) { 2168 if (encrypted_session_key_valid) {
2169 ecryptfs_printk(KERN_DEBUG, "encrypted_session_key_valid != 0; " 2169 ecryptfs_printk(KERN_DEBUG, "encrypted_session_key_valid != 0; "
2170 "using auth_tok->session_key.encrypted_key, " 2170 "using auth_tok->session_key.encrypted_key, "
2171 "where key_rec->enc_key_size = [%d]\n", 2171 "where key_rec->enc_key_size = [%zd]\n",
2172 key_rec->enc_key_size); 2172 key_rec->enc_key_size);
2173 memcpy(key_rec->enc_key, 2173 memcpy(key_rec->enc_key,
2174 auth_tok->session_key.encrypted_key, 2174 auth_tok->session_key.encrypted_key,
@@ -2198,7 +2198,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
2198 if (rc < 1 || rc > 2) { 2198 if (rc < 1 || rc > 2) {
2199 ecryptfs_printk(KERN_ERR, "Error generating scatterlist " 2199 ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
2200 "for crypt_stat session key; expected rc = 1; " 2200 "for crypt_stat session key; expected rc = 1; "
2201 "got rc = [%d]. key_rec->enc_key_size = [%d]\n", 2201 "got rc = [%d]. key_rec->enc_key_size = [%zd]\n",
2202 rc, key_rec->enc_key_size); 2202 rc, key_rec->enc_key_size);
2203 rc = -ENOMEM; 2203 rc = -ENOMEM;
2204 goto out; 2204 goto out;
@@ -2209,7 +2209,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
2209 ecryptfs_printk(KERN_ERR, "Error generating scatterlist " 2209 ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
2210 "for crypt_stat encrypted session key; " 2210 "for crypt_stat encrypted session key; "
2211 "expected rc = 1; got rc = [%d]. " 2211 "expected rc = 1; got rc = [%d]. "
2212 "key_rec->enc_key_size = [%d]\n", rc, 2212 "key_rec->enc_key_size = [%zd]\n", rc,
2213 key_rec->enc_key_size); 2213 key_rec->enc_key_size);
2214 rc = -ENOMEM; 2214 rc = -ENOMEM;
2215 goto out; 2215 goto out;
@@ -2224,7 +2224,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
2224 goto out; 2224 goto out;
2225 } 2225 }
2226 rc = 0; 2226 rc = 0;
2227 ecryptfs_printk(KERN_DEBUG, "Encrypting [%d] bytes of the key\n", 2227 ecryptfs_printk(KERN_DEBUG, "Encrypting [%zd] bytes of the key\n",
2228 crypt_stat->key_size); 2228 crypt_stat->key_size);
2229 rc = crypto_blkcipher_encrypt(&desc, dst_sg, src_sg, 2229 rc = crypto_blkcipher_encrypt(&desc, dst_sg, src_sg,
2230 (*key_rec).enc_key_size); 2230 (*key_rec).enc_key_size);
@@ -2235,7 +2235,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
2235 } 2235 }
2236 ecryptfs_printk(KERN_DEBUG, "This should be the encrypted key:\n"); 2236 ecryptfs_printk(KERN_DEBUG, "This should be the encrypted key:\n");
2237 if (ecryptfs_verbosity > 0) { 2237 if (ecryptfs_verbosity > 0) {
2238 ecryptfs_printk(KERN_DEBUG, "EFEK of size [%d]:\n", 2238 ecryptfs_printk(KERN_DEBUG, "EFEK of size [%zd]:\n",
2239 key_rec->enc_key_size); 2239 key_rec->enc_key_size);
2240 ecryptfs_dump_hex(key_rec->enc_key, 2240 ecryptfs_dump_hex(key_rec->enc_key,
2241 key_rec->enc_key_size); 2241 key_rec->enc_key_size);