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.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -159,7 +159,6 @@ extern void audit_log_key(struct audit_buffer *ab, · 158 unmodified lines | ||
| 159 | 159 | extern void audit_log_link_denied(const char *operation); |
| 160 | 160 | extern void audit_log_lost(const char *message); |
| 161 | 161 | |
| 162 | −extern void audit_log_task(struct audit_buffer *ab); | |
| 163 | 162 | extern int audit_log_task_context(struct audit_buffer *ab); |
| 164 | 163 | extern void audit_log_task_info(struct audit_buffer *ab); |
| 165 | 164 | |
| @@ -220,8 +219,6 @@ static inline void audit_log_key(struct audit_buffer *ab, char *key) · 54 unmodified lines | ||
| 220 | 219 | { } |
| 221 | 220 | static inline void audit_log_link_denied(const char *string) |
| 222 | 221 | { } |
| 223 | −static inline void audit_log_task(struct audit_buffer *ab) | |
| 224 | −{ } | |
| 225 | 222 | static inline int audit_log_task_context(struct audit_buffer *ab) |
| 226 | 223 | { |
| 227 | 224 | return 0; |
| @@ -361,6 +358,8 @@ static inline void audit_ptrace(struct task_struct *t) · 133 unmodified lines | ||
| 361 | 358 | __audit_ptrace(t); |
| 362 | 359 | } |
| 363 | 360 | |
| 361 | +extern void audit_log_task(struct audit_buffer *ab); | |
| 362 | + | |
| 364 | 363 | /* Private API (for audit.c only) */ |
| 365 | 364 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
| 366 | 365 | 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) · 281 unmodified lines | ||
| 648 | 647 | |
| 649 | 648 | static inline void audit_ptrace(struct task_struct *t) |
| 650 | 649 | { } |
| 650 | + | |
| 651 | +static inline void audit_log_task(struct audit_buffer *ab) | |
| 652 | +{ } | |
| 651 | 653 | #define audit_n_rules 0 |
| 652 | 654 | #define audit_signals 0 |
| 653 | 655 | #endif /* CONFIG_AUDITSYSCALL */ |