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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 19 Oct 2021 18:01:52 +0200 From: Jan Kara <jack@...e.cz> To: Gabriel Krisman Bertazi <krisman@...labora.com> Cc: jack@...e.com, amir73il@...il.com, djwong@...nel.org, tytso@....edu, david@...morbit.com, dhowells@...hat.com, khazhy@...gle.com, linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, linux-api@...r.kernel.org, kernel@...labora.com Subject: Re: [PATCH v8 30/32] ext4: Send notifications on error On Tue 19-10-21 17:44:26, Jan Kara wrote: > On Mon 18-10-21 21:00:13, Gabriel Krisman Bertazi wrote: > > Send a FS_ERROR message via fsnotify to a userspace monitoring tool > > whenever a ext4 error condition is triggered. This follows the existing > > error conditions in ext4, so it is hooked to the ext4_error* functions. > > > > It also follows the current dmesg reporting in the format. The > > filesystem message is composed mostly by the string that would be > > otherwise printed in dmesg. > > > > A new ext4 specific record format is exposed in the uapi, such that a > > monitoring tool knows what to expect when listening errors of an ext4 > > filesystem. > > > > Reviewed-by: Amir Goldstein <amir73il@...il.com> > > Reviewed-by: Theodore Ts'o <tytso@....edu> > > Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com> > > Looks good to me. Feel free to add: > > Reviewed-by: Jan Kara <jack@...e.cz> Hum, I actually retract this because the code doesn't match what is written in the documentation and I'm not 100% sure what is correct. In particular: > > @@ -759,6 +760,8 @@ void __ext4_error(struct super_block *sb, const char *function, > > sb->s_id, function, line, current->comm, &vaf); > > va_end(args); > > } > > + fsnotify_sb_error(sb, NULL, error); > > + E.g. here you pass the 'error' to fsnotify. This will be just standard 'errno' number, not ext4 error code as described in the documentation. Also note that frequently 'error' will be 0 which gets magically transformed to EFSCORRUPTED in save_error_info() in the ext4 error handling below. So there's clearly some more work to do... Honza -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists