opnsense-src/sys/security
Konstantin Belousov c6d31b8306 AST: rework
Make most AST handlers dynamically registered.  This allows to have
subsystem-specific handler source located in the subsystem files,
instead of making subr_trap.c aware of it.  For instance, signal
delivery code on return to userspace is now moved to kern_sig.c.

Also, it allows to have some handlers designated as the cleanup (kclear)
type, which are called both at AST and on thread/process exit.  For
instance, ast(), exit1(), and NFS server no longer need to be aware
about UFS softdep processing.

The dynamic registration also allows third-party modules to register AST
handlers if needed.  There is one caveat with loadable modules: the
code does not make any effort to ensure that the module is not unloaded
before all threads processed through AST handler in it.  In fact, this
is already present behavior for hwpmc.ko and ufs.ko.  I do not think it
is worth the efforts and the runtime overhead to try to fix it.

Reviewed by:	markj
Tested by:	emaste (arm64), pho
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:09 +03:00
..
audit audit: Initialize vattr fields before calling VOP_GETATTR 2022-03-28 11:23:45 -04:00
mac mac: kdb/ddb framework hooks 2022-07-18 22:06:13 +00:00
mac_biba Add PRIV_SCHED_IDPRIO 2021-12-10 04:54:48 +02:00
mac_bsdextended Deduplicate fsid comparisons 2020-05-21 01:55:35 +00:00
mac_ddb Revert "mac_ddb: Make db_show_vnet_valid() handle !VIMAGE" 2022-07-21 14:26:54 +00:00
mac_ifoff Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mac_lomac AST: rework 2022-08-02 21:11:09 +03:00
mac_mls security: clean up empty lines in .c and .h files 2020-09-01 21:26:00 +00:00
mac_none Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_ntpd Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mac_partition Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mac_pimd mac_pimd: Support for privilege drop in pimd 2022-04-20 08:07:37 +02:00
mac_portacl Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mac_priority Thread creation privilege for realtime group 2021-12-15 00:01:58 +02:00
mac_seeotheruids Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mac_stub mac: kdb/ddb framework hooks 2022-07-18 22:06:13 +00:00
mac_test mac: kdb/ddb framework hooks 2022-07-18 22:06:13 +00:00
mac_veriexec mac_veriexec: Authorize reads of secured sysctls 2022-06-29 10:48:01 +02:00
mac_veriexec_parser vfs: NDFREE(&nd, NDF_ONLY_PNBUF) -> NDFREE_PNBUF(&nd) 2022-03-24 10:20:51 +00:00