Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107490165
D48448.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48448.diff
View Options
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c
--- a/sys/kern/subr_syscall.c
+++ b/sys/kern/subr_syscall.c
@@ -141,9 +141,8 @@
sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0;
- if (__predict_false(SYSTRACE_ENABLED() ||
- AUDIT_SYSCALL_ENTER(sa->code, td) ||
- !sy_thr_static)) {
+ if (__predict_false(AUDIT_SYSCALL_ENABLED() ||
+ SYSTRACE_ENABLED() || !sy_thr_static)) {
if (!sy_thr_static) {
error = syscall_thread_enter(td, &se);
sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0;
@@ -158,6 +157,9 @@
if (__predict_false(se->sy_entry != 0))
(*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0);
#endif
+
+ AUDIT_SYSCALL_ENTER(sa->code, td);
+
error = (se->sy_call)(td, sa->args);
/* Save the latest error return value. */
if (__predict_false((td->td_pflags & TDP_NERRNO) != 0))
diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h
--- a/sys/security/audit/audit.h
+++ b/sys/security/audit/audit.h
@@ -389,9 +389,11 @@
audit_arg_vnode2((vp)); \
} while (0)
+#define AUDIT_SYSCALL_ENABLED() audit_syscalls_enabled
+
#define AUDIT_SYSCALL_ENTER(code, td) ({ \
bool _audit_entered = false; \
- if (__predict_false(audit_syscalls_enabled)) { \
+ if (audit_syscalls_enabled) { \
audit_syscall_enter(code, td); \
_audit_entered = true; \
} \
@@ -468,6 +470,7 @@
#define AUDITING_TD(td) 0
+#define AUDIT_SYSCALL_ENABLED() 0
#define AUDIT_SYSCALL_ENTER(code, td) 0
#define AUDIT_SYSCALL_EXIT(error, td)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 15, 10:51 PM (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15814519
Default Alt Text
D48448.diff (1 KB)
Attached To
Mode
D48448: audit: Fix short-circuiting in syscallenter()
Attached
Detach File
Event Timeline
Log In to Comment