Skip to content

Commit d3590eb

Browse files
committed
Merge tag 'audit-pr-20200729' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit fixes from Paul Moore: "One small audit fix that you can hopefully merge before v5.8 is released. Unfortunately it is a revert of a patch that went in during the v5.7 window and we just recently started to see some bug reports relating to that commit. We are working on a proper fix, but I'm not yet clear on when that will be ready and we need to fix the v5.7 kernels anyway, so in the interest of time a revert seemed like the best solution right now" * tag 'audit-pr-20200729' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: revert: 1320a40 ("audit: trigger accompanying records when no rules present")
2 parents 2139152 + 8ac68dc commit d3590eb

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

kernel/audit.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,6 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
18511851
}
18521852

18531853
audit_get_stamp(ab->ctx, &t, &serial);
1854-
audit_clear_dummy(ab->ctx);
18551854
audit_log_format(ab, "audit(%llu.%03lu:%u): ",
18561855
(unsigned long long)t.tv_sec, t.tv_nsec/1000000, serial);
18571856

kernel/audit.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,6 @@ extern int audit_signal_info_syscall(struct task_struct *t);
290290
extern void audit_filter_inodes(struct task_struct *tsk,
291291
struct audit_context *ctx);
292292
extern struct list_head *audit_killed_trees(void);
293-
294-
static inline void audit_clear_dummy(struct audit_context *ctx)
295-
{
296-
if (ctx)
297-
ctx->dummy = 0;
298-
}
299-
300293
#else /* CONFIG_AUDITSYSCALL */
301294
#define auditsc_get_stamp(c, t, s) 0
302295
#define audit_put_watch(w) {}
@@ -330,7 +323,6 @@ static inline int audit_signal_info_syscall(struct task_struct *t)
330323
}
331324

332325
#define audit_filter_inodes(t, c) AUDIT_DISABLED
333-
#define audit_clear_dummy(c) {}
334326
#endif /* CONFIG_AUDITSYSCALL */
335327

336328
extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);

kernel/auditsc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,9 @@ static void audit_log_proctitle(void)
14171417
struct audit_context *context = audit_context();
14181418
struct audit_buffer *ab;
14191419

1420+
if (!context || context->dummy)
1421+
return;
1422+
14201423
ab = audit_log_start(context, GFP_KERNEL, AUDIT_PROCTITLE);
14211424
if (!ab)
14221425
return; /* audit_panic or being filtered */

0 commit comments

Comments
 (0)