opnsense-src/sys/security
Konstantin Belousov 0452f5f7b3 audit: move the wait from the queue length from the commit to alloc
AUDIT_SYSCALL_EXIT() and indirectly audit_commit() is intended to be
called from arbitrary top-level context.  This means that any sleepable
locks can be owned by the caller, and which makes the sleeping in
audit_commit() forbidden.

Since we need to sleep for the record in audit_alloc() anyway, move the
sleep for the queue limit there.  At worst, if the audit is suspended is
disabled when we actually reach the commit location, this means that we
lost time uselessly.

PR:	287566
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50879
2025-06-18 20:57:49 +03:00
..
audit audit: move the wait from the queue length from the commit to alloc 2025-06-18 20:57:49 +03:00
mac New setcred() system call and associated MAC hooks 2024-12-16 15:42:39 +01:00
mac_biba MAC: mac_biba, mac_lomac: Fix setting loader tunables 2025-02-09 23:53:29 +08:00
mac_bsdextended MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_ddb mac_ddb: Fix the show rman validator. 2022-08-12 10:20:05 -07:00
mac_do machine/stdarg.h -> sys/stdarg.h 2025-06-11 17:39:02 +01:00
mac_grantbylabel grantbylabel_syscall check p_textvp != NULL 2025-05-16 15:19:06 -07:00
mac_ifoff MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_ipacl MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_lomac MAC: mac_biba, mac_lomac: Fix setting loader tunables 2025-02-09 23:53:29 +08:00
mac_mls MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_none sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_ntpd MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_partition MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_pimd MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_portacl MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_priority MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_seeotheruids MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_stub New setcred() system call and associated MAC hooks 2024-12-16 15:42:39 +01:00
mac_test New setcred() system call and associated MAC hooks 2024-12-16 15:42:39 +01:00
mac_veriexec MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_veriexec_parser mac_veriexec_parser: Fix open_file error handling 2024-09-20 09:22:56 -06:00