summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_hhook.c
Commit message (Collapse)AuthorAgeFilesLines
* Move hhook's per-vnet initialisation to an earlier SYSINIT SI_SUB stage tolstewart2013-06-151-2/+2
| | | | | | | | | | | | | | | | | | | | ensure all per-vnet related hhook initialisation is completed prior to any virtualised hhook points attempting registration. vnet_register_sysinit() requires that a stage later than SI_SUB_VNET be chosen. There are no per-vnet initialisors in the source tree at this time which run earlier than SI_SUB_INIT_IF. A quick audit of non-virtualised SYSINITs indicates there are no subsystems pre SI_SUB_MBUF that would likely be interested in registering a virtualised hhook point. Settle on SI_SUB_MBUF as hhook's per-vnet initialisation stage as it's the first overtly network-related initilisation stage to run after SI_SUB_VNET. If a subsystem that initialises earlier than SI_SUB_MBUF ends up wanting to register virtualised hhook points in future, hhook's use of SI_SUB_MBUF will need to be revisited and would probably warrant creating a dedicated SI_SUB_HHOOK which runs immediately after SI_SUB_VNET. MFC after: 1 week
* Add a private KPI between hhook and khelp that allows khelp modules to insertlstewart2013-06-151-6/+9
| | | | | | | hook functions into hhook points which register after the modules were loaded - potentially useful during boot or if hhook points are dynamically registered. MFC after: 1 week
* Internalise handling of virtualised hook points insidelstewart2013-06-151-17/+74
| | | | | | | | | hhook_{add|remove}_hook_lookup() so that khelp (and other potential API consumers) do not have to care when they attempt to (un)hook a particular hook point identified by id and type. Reviewed by: scottl MFC after: 1 week
* Fix a major oversight in r251732 which causes non-VIMAGE kernels to trigger alstewart2013-06-141-0/+6
| | | | | | | | | | KASSERT during TCP hhook registration at boot. Virtualised hook points only require extra housekeeping and sanity checking when "options VIMAGE" is present. Reported by: bdrewery,jh,dhw Tested by: dhw MFC after: 1 week X-MFC with: 251732
* Add support for non-virtualised hhook points, which are uniquely identified bylstewart2013-06-141-19/+21
| | | | | | | | | | | | | type and id, as compared to virtualised hook points which are now uniquely identified by type, id and a vid (which for vimage is the pointer to the vnet that the hhook resides in). All hhook_head structs for both virtualised and non-virtualised hook points coexist in hhook_head_list, and a separate list is maintained for hhook points within each vnet to simplify some vimage-related housekeeping. Reviewed by: scottl MFC after: 1 week
* Fix a potential NULL-pointer dereference that would trigger if the hhooklstewart2013-06-141-4/+3
| | | | | | registration site did not provide storage for a copy of the hhook_head struct. MFC after: 3 days
* Staticize malloc types.pluknet2011-04-131-2/+1
| | | | | Approved by: lstewart MFC after: 1 week
* Use the full and proper company name for Swinburne University of Technologylstewart2011-04-121-3/+3
| | | | | | | | throughout the source tree. Requested by: Grenville Armitage, Director of CAIA at Swinburne University of Technology MFC after: 3 days
* Fix hhook_head_is_virtualised() so that "ret" can't be used uninitialised.lstewart2011-01-111-4/+5
| | | | | | | Sponsored by: FreeBSD Foundation Submitted by: pjd MFC after: 9 weeks X-MFC with: r216615
* Fix some minor style/readability nits in hhook.lstewart2011-01-111-6/+3
| | | | | | | Sponsored by: FreeBSD Foundation Submitted by: pjd MFC after: 9 weeks X-MFC with: r216615
* - Introduce the Hhook (Helper Hook) KPI. The KPI is closely modelled on pfil(9),lstewart2010-12-211-0/+457
and in many respects can be thought of as a more generic superset of pfil. Hhook provides a way for kernel subsystems to export hook points that Khelp modules can hook to provide enhanced or new functionality to the kernel. The KPI has been designed to ensure hook points pose no noticeable overhead when no hook functions are registered. - Introduce the Khelp (Kernel Helpers) KPI. Khelp provides a framework for managing Khelp modules, which indirectly use the Hhook KPI to register their hook functions with hook points of interest within the kernel. Khelp modules aim to provide a structured way to dynamically extend the kernel at runtime in an ABI preserving manner. Depending on the subsystem providing hook points, a Khelp module may be able to associate per-object data for maintaining relevant state between hook calls. - pjd's Object Specific Data (OSD) KPI is used to manage the per-object data allocated to Khelp modules. Create a new "OSD_KHELP" OSD type for use by the Khelp framework. - Bump __FreeBSD_version to 900028 to mark the introduction of the new KPIs. In collaboration with: David Hayes <dahayes at swin edu au> and Grenville Armitage <garmitage at swin edu au> Sponsored by: FreeBSD Foundation Reviewed by: bz, others along the way MFC after: 3 months
OpenPOWER on IntegriCloud