fs/ecryptfs: Add printf format/argument verification and fix fallout
Add __attribute__((format... to __ecryptfs_printk Make formats and arguments match. Add casts to (unsigned long long) for %llu. Signed-off-by: Joe Perches <joe@perches.com> [tyhicks: 80 columns cleanup and fixed typo] Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
This commit is contained in:
@@ -413,10 +413,9 @@ static int ecryptfs_encrypt_extent(struct page *enc_extent_page,
|
||||
rc = ecryptfs_derive_iv(extent_iv, crypt_stat,
|
||||
(extent_base + extent_offset));
|
||||
if (rc) {
|
||||
ecryptfs_printk(KERN_ERR, "Error attempting to "
|
||||
"derive IV for extent [0x%.16x]; "
|
||||
"rc = [%d]\n", (extent_base + extent_offset),
|
||||
rc);
|
||||
ecryptfs_printk(KERN_ERR, "Error attempting to derive IV for "
|
||||
"extent [0x%.16llx]; rc = [%d]\n",
|
||||
(unsigned long long)(extent_base + extent_offset), rc);
|
||||
goto out;
|
||||
}
|
||||
if (unlikely(ecryptfs_verbosity > 0)) {
|
||||
@@ -443,9 +442,9 @@ static int ecryptfs_encrypt_extent(struct page *enc_extent_page,
|
||||
}
|
||||
rc = 0;
|
||||
if (unlikely(ecryptfs_verbosity > 0)) {
|
||||
ecryptfs_printk(KERN_DEBUG, "Encrypt extent [0x%.16x]; "
|
||||
"rc = [%d]\n", (extent_base + extent_offset),
|
||||
rc);
|
||||
ecryptfs_printk(KERN_DEBUG, "Encrypt extent [0x%.16llx]; "
|
||||
"rc = [%d]\n",
|
||||
(unsigned long long)(extent_base + extent_offset), rc);
|
||||
ecryptfs_printk(KERN_DEBUG, "First 8 bytes after "
|
||||
"encryption:\n");
|
||||
ecryptfs_dump_hex((char *)(page_address(enc_extent_page)), 8);
|
||||
@@ -540,10 +539,9 @@ static int ecryptfs_decrypt_extent(struct page *page,
|
||||
rc = ecryptfs_derive_iv(extent_iv, crypt_stat,
|
||||
(extent_base + extent_offset));
|
||||
if (rc) {
|
||||
ecryptfs_printk(KERN_ERR, "Error attempting to "
|
||||
"derive IV for extent [0x%.16x]; "
|
||||
"rc = [%d]\n", (extent_base + extent_offset),
|
||||
rc);
|
||||
ecryptfs_printk(KERN_ERR, "Error attempting to derive IV for "
|
||||
"extent [0x%.16llx]; rc = [%d]\n",
|
||||
(unsigned long long)(extent_base + extent_offset), rc);
|
||||
goto out;
|
||||
}
|
||||
if (unlikely(ecryptfs_verbosity > 0)) {
|
||||
@@ -571,9 +569,9 @@ static int ecryptfs_decrypt_extent(struct page *page,
|
||||
}
|
||||
rc = 0;
|
||||
if (unlikely(ecryptfs_verbosity > 0)) {
|
||||
ecryptfs_printk(KERN_DEBUG, "Decrypt extent [0x%.16x]; "
|
||||
"rc = [%d]\n", (extent_base + extent_offset),
|
||||
rc);
|
||||
ecryptfs_printk(KERN_DEBUG, "Decrypt extent [0x%.16llx]; "
|
||||
"rc = [%d]\n",
|
||||
(unsigned long long)(extent_base + extent_offset), rc);
|
||||
ecryptfs_printk(KERN_DEBUG, "First 8 bytes after "
|
||||
"decryption:\n");
|
||||
ecryptfs_dump_hex((char *)(page_address(page)
|
||||
|
Reference in New Issue
Block a user