From: kbuild test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@01.org, "Paul Moore" <paul@paul-moore.com>,
linux-kernel@vger.kernel.org,
"Jérémie Galarneau" <jeremie.galarneau@efficios.com>,
s.mesoraca16@gmail.com, viro@zeniv.linux.org.uk,
dan.carpenter@oracle.com, akpm@linux-foundation.org,
"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
kernel-hardening@lists.openwall.com, linux-audit@redhat.com,
torvalds@linux-foundation.org
Subject: Re: [PATCH] audit: Report suspicious O_CREAT usage
Date: Thu, 26 Sep 2019 05:40:43 +0800 [thread overview]
Message-ID: <201909260555.ZAKEgB2R%lkp@intel.com> (raw)
In-Reply-To: <201909251348.A1542A52@keescook>
[-- Attachment #1: Type: text/plain, Size: 5190 bytes --]
Hi Kees,
I love your patch! Yet something to improve:
[auto build test ERROR 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@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/fsnotify.h:16:0,
from fs///attr.c:15:
>> include/linux/audit.h:222:1: error: expected identifier or '(' before '{' token
{ }
^
include/linux/audit.h:221:20: warning: 'audit_log_path_denied' declared 'static' but never defined [-Wunused-function]
static inline void audit_log_path_denied(int type, const char *string);
^~~~~~~~~~~~~~~~~~~~~
vim +222 include/linux/audit.h
b48345aafb2038 Richard Guy Briggs 2019-05-10 187
96368701e1c890 Paul Moore 2016-01-13 188 #else /* CONFIG_AUDIT */
96368701e1c890 Paul Moore 2016-01-13 189 static inline __printf(4, 5)
96368701e1c890 Paul Moore 2016-01-13 190 void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
96368701e1c890 Paul Moore 2016-01-13 191 const char *fmt, ...)
96368701e1c890 Paul Moore 2016-01-13 192 { }
96368701e1c890 Paul Moore 2016-01-13 193 static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
96368701e1c890 Paul Moore 2016-01-13 194 gfp_t gfp_mask, int type)
96368701e1c890 Paul Moore 2016-01-13 195 {
96368701e1c890 Paul Moore 2016-01-13 196 return NULL;
96368701e1c890 Paul Moore 2016-01-13 197 }
96368701e1c890 Paul Moore 2016-01-13 198 static inline __printf(2, 3)
96368701e1c890 Paul Moore 2016-01-13 199 void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
96368701e1c890 Paul Moore 2016-01-13 200 { }
96368701e1c890 Paul Moore 2016-01-13 201 static inline void audit_log_end(struct audit_buffer *ab)
96368701e1c890 Paul Moore 2016-01-13 202 { }
96368701e1c890 Paul Moore 2016-01-13 203 static inline void audit_log_n_hex(struct audit_buffer *ab,
96368701e1c890 Paul Moore 2016-01-13 204 const unsigned char *buf, size_t len)
96368701e1c890 Paul Moore 2016-01-13 205 { }
96368701e1c890 Paul Moore 2016-01-13 206 static inline void audit_log_n_string(struct audit_buffer *ab,
96368701e1c890 Paul Moore 2016-01-13 207 const char *buf, size_t n)
96368701e1c890 Paul Moore 2016-01-13 208 { }
96368701e1c890 Paul Moore 2016-01-13 209 static inline void audit_log_n_untrustedstring(struct audit_buffer *ab,
96368701e1c890 Paul Moore 2016-01-13 210 const char *string, size_t n)
96368701e1c890 Paul Moore 2016-01-13 211 { }
96368701e1c890 Paul Moore 2016-01-13 212 static inline void audit_log_untrustedstring(struct audit_buffer *ab,
96368701e1c890 Paul Moore 2016-01-13 213 const char *string)
96368701e1c890 Paul Moore 2016-01-13 214 { }
96368701e1c890 Paul Moore 2016-01-13 215 static inline void audit_log_d_path(struct audit_buffer *ab,
96368701e1c890 Paul Moore 2016-01-13 216 const char *prefix,
96368701e1c890 Paul Moore 2016-01-13 217 const struct path *path)
96368701e1c890 Paul Moore 2016-01-13 218 { }
96368701e1c890 Paul Moore 2016-01-13 219 static inline void audit_log_key(struct audit_buffer *ab, char *key)
96368701e1c890 Paul Moore 2016-01-13 220 { }
21e61058cf0f22 Kees Cook 2019-09-25 221 static inline void audit_log_path_denied(int type, const char *string);
96368701e1c890 Paul Moore 2016-01-13 @222 { }
96368701e1c890 Paul Moore 2016-01-13 223 static inline int audit_log_task_context(struct audit_buffer *ab)
96368701e1c890 Paul Moore 2016-01-13 224 {
96368701e1c890 Paul Moore 2016-01-13 225 return 0;
96368701e1c890 Paul Moore 2016-01-13 226 }
2a1fe215e7300c Paul Moore 2018-11-26 227 static inline void audit_log_task_info(struct audit_buffer *ab)
96368701e1c890 Paul Moore 2016-01-13 228 { }
4b7d248b3a1de4 Richard Guy Briggs 2019-01-22 229
:::::: The code at line 222 was first introduced by commit
:::::: 96368701e1c89057bbf39222e965161c68a85b4b audit: force seccomp event logging to honor the audit_enabled flag
:::::: TO: Paul Moore <pmoore@redhat.com>
:::::: CC: Paul Moore <paul@paul-moore.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 7205 bytes --]
next prev parent reply other threads:[~2019-09-25 21:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 21:02 [PATCH] audit: Report suspicious O_CREAT usage Kees Cook
2019-09-25 21:40 ` kbuild test robot [this message]
2019-09-25 22:02 ` kbuild test robot
2019-09-25 23:14 ` Kees Cook
2019-09-26 15:31 ` Paul Moore
2019-09-30 13:50 ` Steve Grubb
2019-09-30 18:29 ` Kees Cook
2019-10-01 5:31 ` Paul Moore
2019-10-01 5:37 ` Paul Moore
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=201909260555.ZAKEgB2R%lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=jeremie.galarneau@efficios.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paul@paul-moore.com \
--cc=s.mesoraca16@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).