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, 07 Oct 2009 14:56:40 +0900
From:	Toshiyuki Okajima <toshi.okajima@...fujitsu.com>
To:	Sunil Mushran <sunil.mushran@...cle.com>
CC:	viro@...iv.linux.org.uk, tytso@....edu,
	linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [PATCH][RFC] vfs: add message print mechanism for the mount/umount
 into the VFS layer

Hi Sunil,
thank you for your comment.

Sunil Mushran wrote:
> Toshiyuki Okajima wrote:
>>       up_write(&namespace_sem);
>> +    /* +     * message output at mount for log observers
>> +     */
>> +    if (newmnt->mnt_flags & MNT_VERBOSE_MSG) {
>> +        printk(KERN_INFO "Device %s mounted file system type %s 
>> read-%s\n",
>> +                    sb->s_id, sb->s_type->name,
>> +                    sb->s_flags & MS_RDONLY ? "only" : "write");
>> +        /* fs specific messages for mount */
>> +        if (sb->s_op != NULL && sb->s_op->mount_msg != NULL)
>> +            sb->s_op->mount_msg(sb);
>> +    }
>>      return 0;
> 
> How about allowing the fs to over-ride the default message? Reduces the 
> clutter.
> Same on the umount.
> 
> 
> +    if (newmnt->mnt_flags & MNT_VERBOSE_MSG) {
> +        if (sb->s_op != NULL && sb->s_op->mount_msg != NULL)
> +            sb->s_op->mount_msg(sb);
> +        else
> +            printk(KERN_INFO "Device %s mounted file system type %s 
> read-%s\n",
> +                sb->s_id, sb->s_type->name,
> +                sb->s_flags & MS_RDONLY ? "only" : "write");
> +    }

My purpose is to print the common message on the VFS layer.
By using "sop->mount_msg" or "sop->umount_msg", we can print the additional
messages as the filesystem specific information about mount/umount operation
at the same time if necessary.

- at the mount time
[VFS mount message]     <= We can understand a certain filesystem is being
                           mounted at this moment.
[fs specific messages
...                   ] <- additional messages as the filesystem specific info
                           at the mount time.

- at the umount time
[fs specific messages   <- additional messages as the filesystem specific info
  ...                 ]    at the umount time.
[VFS umount message]     <= We can understand a certain filesystem has been
                            unmounted at this moment.

(NOTE: VFS messages == "Device ??? mounted file system type ??? read-???")

Best Regards,
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