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 16:41:14 +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 27/32] fanotify: Report fid info for file related file system errors On Mon 18-10-21 21:00:10, Gabriel Krisman Bertazi wrote: > Plumb the pieces to add a FID report to error records. Since all error > event memory must be pre-allocated, we pre-allocate the maximum file > handle size possible, such that it should always fit. > > For errors that don't expose a file handle report it with an invalid > FID. > > Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com> ... > diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c > index 45df610debbe..335ce8f88eb8 100644 > --- a/fs/notify/fanotify/fanotify.c > +++ b/fs/notify/fanotify/fanotify.c > @@ -609,7 +609,9 @@ static struct fanotify_event *fanotify_alloc_error_event( > { > struct fs_error_report *report = > fsnotify_data_error_report(data, data_type); > + struct inode *inode = report->inode; > struct fanotify_error_event *fee; > + int fh_len; > > if (WARN_ON_ONCE(!report)) > return NULL; This WARN_ON_ONCE is now pointless since you dereference report->inode above... So I guess move the dereference after WARN? > @@ -267,6 +274,10 @@ static inline int fanotify_event_dir_fh_len(struct fanotify_event *event) > > static inline bool fanotify_event_has_object_fh(struct fanotify_event *event) > { > + > + /* For error events, even zeroed fh are reported. */ > + if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR) > + return true; > if (fanotify_event_object_fh_len(event) > 0) > return true; This hunk belongs into patch 25. With these fixed feel free to add: Reviewed-by: Jan Kara <jack@...e.cz> Honza -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists