Date: Thu, 29 Nov 2018 08:37:33 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341218 - head/sys/security/audit Message-ID: <201811290837.wAT8bXJF082039@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Nov 29 08:37:33 2018 New Revision: 341218 URL: https://svnweb.freebsd.org/changeset/base/341218 Log: audit: change audit_syscalls_enabled type to bool So that it fits better in __read_frequently. Sponsored by: The FreeBSD Foundation Modified: head/sys/security/audit/audit.c head/sys/security/audit/audit.h Modified: head/sys/security/audit/audit.c ============================================================================== --- head/sys/security/audit/audit.c Thu Nov 29 07:41:05 2018 (r341217) +++ head/sys/security/audit/audit.c Thu Nov 29 08:37:33 2018 (r341218) @@ -103,7 +103,7 @@ int audit_trail_suspended; #ifdef KDTRACE_HOOKS u_int audit_dtrace_enabled; #endif -int __read_frequently audit_syscalls_enabled; +bool __read_frequently audit_syscalls_enabled; /* * Flags controlling behavior in low storage situations. Should we panic if @@ -216,13 +216,13 @@ audit_syscalls_enabled_update(void) mtx_lock(&audit_mtx); #ifdef KDTRACE_HOOKS if (audit_dtrace_enabled) - audit_syscalls_enabled = 1; + audit_syscalls_enabled = true; else { #endif if (audit_trail_enabled && !audit_trail_suspended) - audit_syscalls_enabled = 1; + audit_syscalls_enabled = true; else - audit_syscalls_enabled = 0; + audit_syscalls_enabled = false; #ifdef KDTRACE_HOOKS } #endif @@ -336,7 +336,7 @@ audit_init(void) audit_trail_enabled = 0; audit_trail_suspended = 0; - audit_syscalls_enabled = 0; + audit_syscalls_enabled = false; audit_panic_on_write_fail = 0; audit_fail_stop = 0; audit_in_failure = 0; Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Thu Nov 29 07:41:05 2018 (r341217) +++ head/sys/security/audit/audit.h Thu Nov 29 08:37:33 2018 (r341218) @@ -71,7 +71,7 @@ extern u_int audit_dtrace_enabled; extern int audit_trail_enabled; extern int audit_trail_suspended; -extern int audit_syscalls_enabled; +extern bool audit_syscalls_enabled; void audit_syscall_enter(unsigned short code, struct thread *td); void audit_syscall_exit(int error, struct thread *td);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811290837.wAT8bXJF082039>