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, 21 Oct 2020 11:21:04 -0400
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Gabriel Krisman Bertazi <krisman@...labora.com>
Cc:     dhowells@...hat.com, viro@...iv.linux.org.uk, khazhy@...gle.com,
        adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH RFC 6/7] fs: Add more superblock error subtypes

On Tue, Oct 20, 2020 at 03:15:42PM -0400, Gabriel Krisman Bertazi wrote:
> diff --git a/include/uapi/linux/watch_queue.h b/include/uapi/linux/watch_queue.h
> index d0a45a4ded7d..6bfe35dc7b5d 100644
> --- a/include/uapi/linux/watch_queue.h
> +++ b/include/uapi/linux/watch_queue.h
> @@ -110,6 +110,10 @@ enum superblock_notification_type {
>  	NOTIFY_SUPERBLOCK_ERROR		= 1, /* Error in filesystem or blockdev */
>  	NOTIFY_SUPERBLOCK_EDQUOT	= 2, /* EDQUOT notification */
>  	NOTIFY_SUPERBLOCK_NETWORK	= 3, /* Network status change */
> +	NOTIFY_SUPERBLOCK_INODE_ERROR	= 4, /* Inode Error */
> +	NOTIFY_SUPERBLOCK_WARNING	= 5, /* Filesystem warning */
> +	NOTIFY_SUPERBLOCK_INODE_WARNING	= 6, /* Filesystem inode warning */
> +	NOTIFY_SUPERBLOCK_MSG		= 7, /* Filesystem message */
>  };

Hmm, I wonder if this is the right break down.  In ext4 we have
ext4_error() and ext4_error_inode(), but that's just a convenience so
that if there is an error number, we can log information relating to
the inode.  It's unclear if we need to break apart *_WARNING and
*INODE_WARNING in the notification types.  So I'd suggest dropping
*_INODE_ERROR and *_INODE_WARNING and let those get subsumed into
*_ERROR and *_WARNING.  We can include the __64 for block and inode
numbers for *_ERROR and _*WARNING, which can be non-zero if they are
available for a particular notification.

I *do* thnk we should separate out file system error and blockdev
warnings, however.  So maybe NOTIFY_SUPERBLOCK_ERROR should be
redifined to mean only "file system level error" and we should add a
NOTIFY_SUPERBLOCK_EIO for an I/O errors coming from the block device.
For that notification type, we can add a __u8 or __u32 containing the
BLK_STS_* errors.

I suspect in the future we should also consider a new block device
notification scheme, where we can provide more detailed information
such as SCSI sense codes, etc.  But that's a separable feature, I
think.

Cheers,

					- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ