tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Revisiting DTrace syscall provider



On Wed, 25 Feb 2015, Ryota Ozaki wrote:

On Wed, Feb 25, 2015 at 2:38 PM, Paul Goyette <paul%vps1.whooppee.com@localhost> wrote:
On Wed, 25 Feb 2015, Paul Goyette wrote:

modules that provide sys-calls.  Without the module loaded, the syscall
entry point is known no-op; when the module tries to unload, all of its
syscalls are checked, and if any of them points to somewhere NOT THE NOOP,
unload is prevented.


Actually, the code checks to see if any those syscalls are currently active
for any processes.

IIRC, the relevant code is in routine syscall_disestablish() in file
src/sys/kern_syscalls.c

Thank you for your suggestions! I'll check them.

BTW, how about using moudle_hold(9) for the refcount?
Shouldn't we use it for the purpose?

You could use module_hold(). But can you guarantee (for some value of guarantee) that module_release() will be called in all cases, including errors (ie, unexpected process exit). :)




-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index