From: Jiri Olsa <jolsa@kernel•org>
To: "David S. Miller" <davem@davemloft•net>
Cc: kbuild test robot <lkp@intel•com>,
netdev@vger•kernel.org, Steve Grubb <sgrubb@redhat•com>,
Alexei Starovoitov <ast@kernel•org>,
Daniel Borkmann <daniel@iogearbox•net>
Subject: [PATCH net-next] audit: Move audit_log_task declaration under CONFIG_AUDITSYSCALL
Date: Thu, 21 Nov 2019 16:58:53 +0100 [thread overview]
Message-ID: <20191121155853.3750-1-jolsa@kernel.org> (raw)
The 0-DAY found that audit_log_task is not declared under
CONFIG_AUDITSYSCALL which causes compilation error when
it is not defined:
kernel/bpf/syscall.o: In function `bpf_audit_prog.isra.30':
>> syscall.c:(.text+0x860): undefined reference to `audit_log_task'
Adding the audit_log_task declaration and stub within
CONFIG_AUDITSYSCALL ifdef.
Fixes: 91e6015b082b ("bpf: Emit audit messages upon successful prog load and unload")
Reported-by: kbuild test robot <lkp@intel•com>
Signed-off-by: Jiri Olsa <jolsa@kernel•org>
---
include/linux/audit.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/linux/audit.h b/include/linux/audit.h
index edd006f4597d..18925d924c73 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -159,7 +159,6 @@ extern void audit_log_key(struct audit_buffer *ab,
extern void audit_log_link_denied(const char *operation);
extern void audit_log_lost(const char *message);
-extern void audit_log_task(struct audit_buffer *ab);
extern int audit_log_task_context(struct audit_buffer *ab);
extern void audit_log_task_info(struct audit_buffer *ab);
@@ -220,8 +219,6 @@ static inline void audit_log_key(struct audit_buffer *ab, char *key)
{ }
static inline void audit_log_link_denied(const char *string)
{ }
-static inline void audit_log_task(struct audit_buffer *ab)
-{ }
static inline int audit_log_task_context(struct audit_buffer *ab)
{
return 0;
@@ -361,6 +358,8 @@ static inline void audit_ptrace(struct task_struct *t)
__audit_ptrace(t);
}
+extern void audit_log_task(struct audit_buffer *ab);
+
/* Private API (for audit.c only) */
extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
@@ -648,6 +647,9 @@ static inline void audit_ntp_log(const struct audit_ntp_data *ad)
static inline void audit_ptrace(struct task_struct *t)
{ }
+
+static inline void audit_log_task(struct audit_buffer *ab)
+{ }
#define audit_n_rules 0
#define audit_signals 0
#endif /* CONFIG_AUDITSYSCALL */
--
2.23.0
next reply other threads:[~2019-11-21 15:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 15:58 Jiri Olsa [this message]
2019-11-21 20:38 ` [PATCH net-next] audit: Move audit_log_task declaration under CONFIG_AUDITSYSCALL Daniel Borkmann
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=20191121155853.3750-1-jolsa@kernel.org \
--to=jolsa@kernel$(echo .)org \
--cc=ast@kernel$(echo .)org \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=lkp@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sgrubb@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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