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] [day] [month] [year] [list]
Date:	Wed, 16 Sep 2009 13:49:21 +0900
From:	Toshiyuki Okajima <toshi.okajima@...fujitsu.com>
To:	Andreas Dilger <adilger@....com>
Cc:	tytso@....edu, akpm@...ux-foundation.org,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 2/3][RFC] ext3: add a message in remount/umount for ext3

Hi Andreas,

On Tue, 15 Sep 2009 08:23:33 -0600
Andreas Dilger <adilger@....com> wrote:
> [NB - removed Stephen from CC list]
> 
> On Sep 15, 2009  15:24 +0900, Toshiyuki Okajima wrote:
> > +static void ext3_print_mount_message(struct super_block *sb, 
> > +					int is_remount)
> > +{
> > +	printk(KERN_INFO "EXT3 FS %s on %s, ", 
> > +			is_remount? "remounted": "mounted", sb->s_id);
> > +	if (EXT3_SB(sb)->s_journal->j_inode == NULL) {
> > +		char b[BDEVNAME_SIZE];
> > +
> > +		printk("external journal on %s\n",
> > +			bdevname(EXT3_SB(sb)->s_journal->j_dev, b));
> > +	} else {
> > +		printk("internal journal\n");
> > +	}
> 
> This won't necessarily work as you expected, because the separate
> printk() calls will result in the message being printed on separate
> lines of output.
Thanks for your comment.
I'll apply it into new patch.

> 
> Instead, this should print this all in a single line:
> 
> 	char jbuf[BDEVNAME_SIZE + 20] = "internal journal";
> 
> 	if (EXT3_SB(sb)->s_journal->j_inode == NULL) {
> 		sprintf(jbuf, "external journal on ");
> 		bdevname(EXT3_SB(sb)->s_journal->j_dev,
> 			 jbuf + 20));
> 	}
> 	
> 	printk(KERN_INFO "EXT3 FS %s on %s, %s\n", 
> 	       is_remount? "remounted": "mounted", sb->s_id, jbuf)
> 
> > @@ -1296,15 +1317,6 @@ static int ext3_setup_super(struct super
> > -	printk(KERN_INFO "EXT3 FS on %s, ", sb->s_id);
> > -	if (EXT3_SB(sb)->s_journal->j_inode == NULL) {
> > -		char b[BDEVNAME_SIZE];
> > -
> > -		printk("external journal on %s\n",
> > -			bdevname(EXT3_SB(sb)->s_journal->j_dev, b));
> > -	} else {
> > -		printk("internal journal\n");
> > -	}
> 
> Interesting, it was broken already...  Well, best to fix it anyways.
> The same should be done for the ext4 patch.

Thanks,
Toshiyuki Okajima
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ