Re: [PATCH] audit: Report suspicious O_CREAT usage

From: kbuild test robot
Date: Wed Sep 25 2019 - 18:12:54 EST


Hi Kees,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3 next-20190924]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Kees-Cook/audit-Report-suspicious-O_CREAT-usage/20190926-050423
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from include/linux/fsnotify.h:16:0,
from fs/namei.c:25:
include/linux/audit.h:222:1: error: expected identifier or '(' before '{' token
{ }
^
In file included from include/linux/fsnotify.h:16:0,
from fs/namei.c:25:
>> include/linux/audit.h:221:20: warning: 'audit_log_path_denied' used but never defined
static inline void audit_log_path_denied(int type, const char *string);
^~~~~~~~~~~~~~~~~~~~~

vim +/audit_log_path_denied +221 include/linux/audit.h

187
188 #else /* CONFIG_AUDIT */
189 static inline __printf(4, 5)
190 void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
191 const char *fmt, ...)
192 { }
193 static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
194 gfp_t gfp_mask, int type)
195 {
196 return NULL;
197 }
198 static inline __printf(2, 3)
199 void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
200 { }
201 static inline void audit_log_end(struct audit_buffer *ab)
202 { }
203 static inline void audit_log_n_hex(struct audit_buffer *ab,
204 const unsigned char *buf, size_t len)
205 { }
206 static inline void audit_log_n_string(struct audit_buffer *ab,
207 const char *buf, size_t n)
208 { }
209 static inline void audit_log_n_untrustedstring(struct audit_buffer *ab,
210 const char *string, size_t n)
211 { }
212 static inline void audit_log_untrustedstring(struct audit_buffer *ab,
213 const char *string)
214 { }
215 static inline void audit_log_d_path(struct audit_buffer *ab,
216 const char *prefix,
217 const struct path *path)
218 { }
219 static inline void audit_log_key(struct audit_buffer *ab, char *key)
220 { }
> 221 static inline void audit_log_path_denied(int type, const char *string);
> 222 { }
223 static inline int audit_log_task_context(struct audit_buffer *ab)
224 {
225 return 0;
226 }
227 static inline void audit_log_task_info(struct audit_buffer *ab)
228 { }
229

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip