lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 May 2011 17:23:06 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	John Stultz <john.stultz@...aro.org>, "Ted Ts'o" <tytso@....edu>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	David Rientjes <rientjes@...gle.com>,
	Dave Hansen <dave@...ux.vnet.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Subject: [PATCH 3/3] comm: ext4: Protect task->comm access by using %ptc

Converts ext4 comm access to use the safe printk %ptc accessor.

CC: Ted Ts'o <tytso@....edu>
CC: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
CC: David Rientjes <rientjes@...gle.com>
CC: Dave Hansen <dave@...ux.vnet.ibm.com>
CC: Andrew Morton <akpm@...ux-foundation.org>
CC: linux-mm@...ck.org
Signed-off-by: John Stultz <john.stultz@...aro.org>
---
 fs/ext4/file.c  |    4 ++--
 fs/ext4/super.c |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 7b80d54..31438a0 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -126,9 +126,9 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
 		/* Warn about this once per day */
 		if (printk_timed_ratelimit(&unaligned_warn_time, 60*60*24*HZ))
 			ext4_msg(inode->i_sb, KERN_WARNING,
-				 "Unaligned AIO/DIO on inode %ld by %s; "
+				 "Unaligned AIO/DIO on inode %ld by %ptc; "
 				 "performance will be poor.",
-				 inode->i_ino, current->comm);
+				 inode->i_ino, current);
 		mutex_lock(ext4_aio_mutex(inode));
 		ext4_aiodio_wait(inode);
 	}
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 8553dfb..d4ab4c0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -413,8 +413,8 @@ void __ext4_error(struct super_block *sb, const char *function,
 	va_start(args, fmt);
 	vaf.fmt = fmt;
 	vaf.va = &args;
-	printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: comm %s: %pV\n",
-	       sb->s_id, function, line, current->comm, &vaf);
+	printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: comm %ptc: %pV\n",
+	       sb->s_id, function, line, current, &vaf);
 	va_end(args);
 
 	ext4_handle_error(sb);
@@ -438,7 +438,7 @@ void ext4_error_inode(struct inode *inode, const char *function,
 	       inode->i_sb->s_id, function, line, inode->i_ino);
 	if (block)
 		printk(KERN_CONT "block %llu: ", block);
-	printk(KERN_CONT "comm %s: %pV\n", current->comm, &vaf);
+	printk(KERN_CONT "comm %ptc: %pV\n", current, &vaf);
 	va_end(args);
 
 	ext4_handle_error(inode->i_sb);
@@ -468,7 +468,7 @@ void ext4_error_file(struct file *file, const char *function,
 	va_start(args, fmt);
 	vaf.fmt = fmt;
 	vaf.va = &args;
-	printk(KERN_CONT "comm %s: path %s: %pV\n", current->comm, path, &vaf);
+	printk(KERN_CONT "comm %ptc: path %s: %pV\n", current, path, &vaf);
 	va_end(args);
 
 	ext4_handle_error(inode->i_sb);
-- 
1.7.3.2.146.gca209

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ