Skip to content

Commit 0fb02e7

Browse files
committed
Merge tag 'audit-pr-20170907' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit updates from Paul Moore: "A small pull request for audit this time, only four patches and only two with any real code changes. Those two changes are the removal of a pointless SELinux AVC initialization audit event and a fix to improve the audit timestamp overhead. The other two patches are comment cleanup and administrative updates, nothing very exciting. Everything passes our tests" * tag 'audit-pr-20170907' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: update the function comments selinux: remove AVC init audit log message audit: update the audit info in MAINTAINERS audit: Reduce overhead using a coarse clock
2 parents 828f425 + 196a508 commit 0fb02e7

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

MAINTAINERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,9 +2413,10 @@ AUDIT SUBSYSTEM
24132413
M: Paul Moore <[email protected]>
24142414
M: Eric Paris <[email protected]>
24152415
L: [email protected] (moderated for non-subscribers)
2416-
W: http://people.redhat.com/sgrubb/audit/
2417-
T: git git://git.infradead.org/users/pcmoore/audit
2418-
S: Maintained
2416+
W: https://github.com/linux-audit
2417+
W: https://people.redhat.com/sgrubb/audit
2418+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git
2419+
S: Supported
24192420
F: include/linux/audit.h
24202421
F: include/uapi/linux/audit.h
24212422
F: kernel/audit*

kernel/audit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ static inline void audit_get_stamp(struct audit_context *ctx,
16621662
struct timespec64 *t, unsigned int *serial)
16631663
{
16641664
if (!ctx || !auditsc_get_stamp(ctx, t, serial)) {
1665-
ktime_get_real_ts64(t);
1665+
*t = current_kernel_time64();
16661666
*serial = audit_serial();
16671667
}
16681668
}
@@ -1833,7 +1833,7 @@ void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
18331833
}
18341834

18351835
/**
1836-
* audit_log_hex - convert a buffer to hex and append it to the audit skb
1836+
* audit_log_n_hex - convert a buffer to hex and append it to the audit skb
18371837
* @ab: the audit_buffer
18381838
* @buf: buffer to convert to hex
18391839
* @len: length of @buf to be converted

kernel/auditsc.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
14621462
}
14631463

14641464
/**
1465-
* audit_free - free a per-task audit context
1465+
* __audit_free - free a per-task audit context
14661466
* @tsk: task whose audit context block to free
14671467
*
14681468
* Called from copy_process and do_exit
@@ -1489,7 +1489,7 @@ void __audit_free(struct task_struct *tsk)
14891489
}
14901490

14911491
/**
1492-
* audit_syscall_entry - fill in an audit record at syscall entry
1492+
* __audit_syscall_entry - fill in an audit record at syscall entry
14931493
* @major: major syscall type (function)
14941494
* @a1: additional syscall register 1
14951495
* @a2: additional syscall register 2
@@ -1536,14 +1536,14 @@ void __audit_syscall_entry(int major, unsigned long a1, unsigned long a2,
15361536
return;
15371537

15381538
context->serial = 0;
1539-
ktime_get_real_ts64(&context->ctime);
1539+
context->ctime = current_kernel_time64();
15401540
context->in_syscall = 1;
15411541
context->current_state = state;
15421542
context->ppid = 0;
15431543
}
15441544

15451545
/**
1546-
* audit_syscall_exit - deallocate audit context after a system call
1546+
* __audit_syscall_exit - deallocate audit context after a system call
15471547
* @success: success value of the syscall
15481548
* @return_code: return value of the syscall
15491549
*
@@ -1705,7 +1705,7 @@ static struct audit_names *audit_alloc_name(struct audit_context *context,
17051705
}
17061706

17071707
/**
1708-
* audit_reusename - fill out filename with info from existing entry
1708+
* __audit_reusename - fill out filename with info from existing entry
17091709
* @uptr: userland ptr to pathname
17101710
*
17111711
* Search the audit_names list for the current audit context. If there is an
@@ -1730,7 +1730,7 @@ __audit_reusename(const __user char *uptr)
17301730
}
17311731

17321732
/**
1733-
* audit_getname - add a name to the list
1733+
* __audit_getname - add a name to the list
17341734
* @name: name to add
17351735
*
17361736
* Add a name to the list of audit names for this context.
@@ -2135,7 +2135,7 @@ void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
21352135
}
21362136

21372137
/**
2138-
* audit_ipc_obj - record audit data for ipc object
2138+
* __audit_ipc_obj - record audit data for ipc object
21392139
* @ipcp: ipc permissions
21402140
*
21412141
*/
@@ -2151,7 +2151,7 @@ void __audit_ipc_obj(struct kern_ipc_perm *ipcp)
21512151
}
21522152

21532153
/**
2154-
* audit_ipc_set_perm - record audit data for new ipc permissions
2154+
* __audit_ipc_set_perm - record audit data for new ipc permissions
21552155
* @qbytes: msgq bytes
21562156
* @uid: msgq user id
21572157
* @gid: msgq group id
@@ -2180,7 +2180,7 @@ void __audit_bprm(struct linux_binprm *bprm)
21802180

21812181

21822182
/**
2183-
* audit_socketcall - record audit data for sys_socketcall
2183+
* __audit_socketcall - record audit data for sys_socketcall
21842184
* @nargs: number of args, which should not be more than AUDITSC_ARGS.
21852185
* @args: args array
21862186
*
@@ -2211,7 +2211,7 @@ void __audit_fd_pair(int fd1, int fd2)
22112211
}
22122212

22132213
/**
2214-
* audit_sockaddr - record audit data for sys_bind, sys_connect, sys_sendto
2214+
* __audit_sockaddr - record audit data for sys_bind, sys_connect, sys_sendto
22152215
* @len: data length in user space
22162216
* @a: data address in kernel space
22172217
*

security/selinux/avc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ void __init avc_init(void)
197197
avc_xperms_data_cachep = kmem_cache_create("avc_xperms_data",
198198
sizeof(struct extended_perms_data),
199199
0, SLAB_PANIC, NULL);
200-
201-
audit_log(current->audit_context, GFP_KERNEL, AUDIT_KERNEL, "AVC INITIALIZED\n");
202200
}
203201

204202
int avc_get_hash_stats(char *page)

0 commit comments

Comments
 (0)