From: kernel test robot <lkp@intel.com> To: kbuild@lists.01.org Subject: Re: [PATCH RFC 12/15] fanotify: Introduce the FAN_ERROR mark Date: Tue, 27 Apr 2021 12:33:47 +0800 [thread overview] Message-ID: <202104271249.lGWZGyw2-lkp@intel.com> (raw) [-- Attachment #1: Type: text/plain, Size: 5856 bytes --] CC: kbuild-all(a)lists.01.org In-Reply-To: <20210426184201.4177978-13-krisman@collabora.com> References: <20210426184201.4177978-13-krisman@collabora.com> TO: Gabriel Krisman Bertazi <krisman@collabora.com> Hi Gabriel, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on pcmoore-audit/next] [also build test WARNING on ext4/dev linus/master v5.12] [cannot apply to ext3/fsnotify next-20210426] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Gabriel-Krisman-Bertazi/File-system-wide-monitoring/20210427-024627 base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next :::::: branch date: 10 hours ago :::::: commit date: 10 hours ago config: i386-randconfig-m021-20210426 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> New smatch warnings: fs/notify/fanotify/fanotify_user.c:112 fanotify_event_len() warn: this array is probably non-NULL. 'fee->fs_data' Old smatch warnings: fs/notify/fanotify/fanotify_user.c:1443 do_fanotify_mark() error: we previously assumed 'mnt' could be null (see line 1424) vim +112 fs/notify/fanotify/fanotify_user.c b5e798df944730 Gabriel Krisman Bertazi 2021-04-26 89 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 90 static size_t fanotify_event_len(struct fanotify_event *event, 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 91 unsigned int fid_mode) 5e469c830fdb5a Amir Goldstein 2019-01-10 92 { 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 93 size_t event_len = FAN_EVENT_METADATA_LEN; 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 94 struct fanotify_info *info; 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 95 int dir_fh_len; 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 96 int fh_len; 929943b38daf81 Amir Goldstein 2020-07-16 97 int dot_len = 0; f454fa610a69b9 Amir Goldstein 2020-07-16 98 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 99 if (fanotify_is_error_event(event->mask)) { 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 100 struct fanotify_error_event *fee = FANOTIFY_EE(event); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 101 /* 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 102 * Error events (FAN_ERROR) have a different format 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 103 * as follows: 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 104 * [ event_metadata ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 105 * [ fs-generic error header ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 106 * [ error location (optional) ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 107 * [ fs-specific blob ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 108 */ 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 109 event_len = fanotify_error_info_len(fee); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 110 if (fee->loc.function) 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 111 event_len += fanotify_location_info_len(&fee->loc); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 @112 if (fee->fs_data) 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 113 event_len += fanotify_error_fsdata_len(fee); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 114 return event_len; 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 115 } 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 116 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 117 if (!fid_mode) 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 118 return event_len; 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 119 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 120 info = fanotify_event_info(event); 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 121 dir_fh_len = fanotify_event_dir_fh_len(event); 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 122 fh_len = fanotify_event_object_fh_len(event); 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 123 929943b38daf81 Amir Goldstein 2020-07-16 124 if (dir_fh_len) { 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 125 event_len += fanotify_fid_info_len(dir_fh_len, info->name_len); 929943b38daf81 Amir Goldstein 2020-07-16 126 } else if ((fid_mode & FAN_REPORT_NAME) && (event->mask & FAN_ONDIR)) { 929943b38daf81 Amir Goldstein 2020-07-16 127 /* 929943b38daf81 Amir Goldstein 2020-07-16 128 * With group flag FAN_REPORT_NAME, if name was not recorded in 929943b38daf81 Amir Goldstein 2020-07-16 129 * event on a directory, we will report the name ".". 929943b38daf81 Amir Goldstein 2020-07-16 130 */ 929943b38daf81 Amir Goldstein 2020-07-16 131 dot_len = 1; 929943b38daf81 Amir Goldstein 2020-07-16 132 } afc894c784c84c Jan Kara 2020-03-24 133 44d705b0370b1d Amir Goldstein 2020-03-19 134 if (fh_len) 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 135 event_len += fanotify_fid_info_len(fh_len, dot_len); 5e469c830fdb5a Amir Goldstein 2019-01-10 136 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 137 return event_len; 5e469c830fdb5a Amir Goldstein 2019-01-10 138 } 5e469c830fdb5a Amir Goldstein 2019-01-10 139 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org [-- Attachment #2: config.gz --] [-- Type: application/gzip, Size: 41522 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH RFC 12/15] fanotify: Introduce the FAN_ERROR mark Date: Thu, 29 Apr 2021 14:31:21 +0300 [thread overview] Message-ID: <202104271249.lGWZGyw2-lkp@intel.com> (raw) In-Reply-To: <20210426184201.4177978-13-krisman@collabora.com> [-- Attachment #1: Type: text/plain, Size: 3393 bytes --] Hi Gabriel, url: https://github.com/0day-ci/linux/commits/Gabriel-Krisman-Bertazi/File-system-wide-monitoring/20210427-024627 base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next config: i386-randconfig-m021-20210426 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> New smatch warnings: fs/notify/fanotify/fanotify_user.c:112 fanotify_event_len() warn: this array is probably non-NULL. 'fee->fs_data' vim +112 fs/notify/fanotify/fanotify_user.c 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 90 static size_t fanotify_event_len(struct fanotify_event *event, 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 91 unsigned int fid_mode) 5e469c830fdb5a Amir Goldstein 2019-01-10 92 { 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 93 size_t event_len = FAN_EVENT_METADATA_LEN; 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 94 struct fanotify_info *info; 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 95 int dir_fh_len; 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 96 int fh_len; 929943b38daf81 Amir Goldstein 2020-07-16 97 int dot_len = 0; f454fa610a69b9 Amir Goldstein 2020-07-16 98 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 99 if (fanotify_is_error_event(event->mask)) { 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 100 struct fanotify_error_event *fee = FANOTIFY_EE(event); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 101 /* 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 102 * Error events (FAN_ERROR) have a different format 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 103 * as follows: 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 104 * [ event_metadata ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 105 * [ fs-generic error header ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 106 * [ error location (optional) ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 107 * [ fs-specific blob ] 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 108 */ 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 109 event_len = fanotify_error_info_len(fee); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 110 if (fee->loc.function) 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 111 event_len += fanotify_location_info_len(&fee->loc); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 @112 if (fee->fs_data) ^^^^^^^^^^^^ This is a zero length array, not a pointer. It can't be NULL. 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 113 event_len += fanotify_error_fsdata_len(fee); 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 114 return event_len; 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 115 } 6179a61e1067e6 Gabriel Krisman Bertazi 2021-04-26 116 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 117 if (!fid_mode) 380d986e6a7cb0 Gabriel Krisman Bertazi 2021-04-26 118 return event_len; --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2021-04-27 4:33 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-27 4:33 kernel test robot [this message] 2021-04-29 11:31 ` [PATCH RFC 12/15] fanotify: Introduce the FAN_ERROR mark Dan Carpenter -- strict thread matches above, loose matches on Subject: below -- 2021-04-27 8:36 [PATCH RFC 13/15] ext4: Send notifications on error kernel test robot 2021-04-29 13:19 ` Dan Carpenter 2021-04-26 18:41 [PATCH RFC 00/15] File system wide monitoring Gabriel Krisman Bertazi 2021-04-26 18:41 ` [PATCH RFC 01/15] fanotify: Fold event size calculation to its own function Gabriel Krisman Bertazi 2021-04-27 4:42 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 02/15] fanotify: Split fsid check from other fid mode checks Gabriel Krisman Bertazi 2021-04-27 4:53 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 03/15] fsnotify: Wire flags field on group allocation Gabriel Krisman Bertazi 2021-04-27 5:03 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 04/15] fsnotify: Wire up group information on event initialization Gabriel Krisman Bertazi 2021-04-26 18:41 ` [PATCH RFC 05/15] fsnotify: Support event submission through ring buffer Gabriel Krisman Bertazi 2021-04-26 22:00 ` kernel test robot 2021-04-26 22:43 ` kernel test robot 2021-04-27 5:39 ` Amir Goldstein 2021-04-29 18:33 ` Gabriel Krisman Bertazi 2021-04-26 18:41 ` [PATCH RFC 06/15] fanotify: Support " Gabriel Krisman Bertazi 2021-04-27 6:02 ` Amir Goldstein 2021-04-29 18:36 ` Gabriel Krisman Bertazi 2021-04-26 18:41 ` [PATCH RFC 07/15] fsnotify: Support FS_ERROR event type Gabriel Krisman Bertazi 2021-04-27 8:39 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 08/15] fsnotify: Introduce helpers to send error_events Gabriel Krisman Bertazi 2021-04-27 6:49 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 09/15] fanotify: Introduce generic error record Gabriel Krisman Bertazi 2021-04-27 7:01 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 10/15] fanotify: Introduce code location record Gabriel Krisman Bertazi 2021-04-27 7:11 ` Amir Goldstein 2021-04-29 18:40 ` Gabriel Krisman Bertazi 2021-05-11 5:35 ` Khazhy Kumykov 2021-04-26 18:41 ` [PATCH RFC 11/15] fanotify: Introduce filesystem specific data record Gabriel Krisman Bertazi 2021-04-27 7:12 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 12/15] fanotify: Introduce the FAN_ERROR mark Gabriel Krisman Bertazi 2021-04-26 22:45 ` kernel test robot 2021-04-27 7:25 ` Amir Goldstein 2021-04-26 18:41 ` [PATCH RFC 13/15] ext4: Send notifications on error Gabriel Krisman Bertazi 2021-04-26 23:10 ` kernel test robot 2021-04-27 4:32 ` Amir Goldstein 2021-04-29 0:57 ` Darrick J. Wong 2021-04-26 18:42 ` [PATCH RFC 14/15] samples: Add fs error monitoring example Gabriel Krisman Bertazi 2021-04-26 23:10 ` kernel test robot 2021-04-26 18:42 ` [PATCH RFC 15/15] Documentation: Document the FAN_ERROR framework Gabriel Krisman Bertazi 2021-04-27 4:11 ` [PATCH RFC 00/15] File system wide monitoring Amir Goldstein 2021-04-27 15:44 ` Gabriel Krisman Bertazi 2021-05-11 4:45 ` Khazhy Kumykov 2021-05-11 10:43 ` Jan Kara
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=202104271249.lGWZGyw2-lkp@intel.com \ --to=lkp@intel.com \ --cc=kbuild@lists.01.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.