The usage is simpler and more common.
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential D14227
Use syscall_helper_register() rather than syscall_register(). brooks on Feb 6 2018, 6:59 PM. Authored by Tags None Referenced Files
Details The usage is simpler and more common. Obtained from: CheriBSD
Diff Detail
Event TimelineComment Actions I looked for a manual page for syscall_helper_register but it didn't exist :-(. The conversion looks good to me. Comment Actions Huh, it surprises me that MOD_UNLOAD gets invoked if MOD_LOAD returns an error. But I can see it in module_register_init(). Comment Actions Since MOD_UNLOAD is not allowed and just fails, I don't see a reason The old code just left the module loaded and usable. Again, since I know nothing about the interface, I'll take myself off Comment Actions FWIW, the syscall_register/unregister stuff does its own thread counter now to handle this race for you. Once syscall_unregister() returns, no thread is currently in that syscall and no new thread can enter the syscall. Thus, if system calls are the only places threads can enter the system taht you are worried about, then syscall_helper_unregister() should be sufficient to permit you to unload. (You will still need to ensure you cleanup global variables such as locks, etc.)
Comment Actions I'm sure there's a way to add this to the above comment box,
---> For the NFS/Krpc modules it isn't normally syscall threads. Usually they are called through the VFS or via a set of function pointers or... - There really isn't any reason to unload any of these as far as I know.
|