Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/linux/linux_sysvec.c
Show First 20 Lines • Show All 1,000 Lines • ▼ Show 20 Lines | if (error == 0) { | ||||
NULL, 1000); | NULL, 1000); | ||||
linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec, | linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec, | ||||
NULL, 1000); | NULL, 1000); | ||||
linux_thread_dtor_tag = EVENTHANDLER_REGISTER(thread_dtor, | linux_thread_dtor_tag = EVENTHANDLER_REGISTER(thread_dtor, | ||||
linux_thread_dtor, NULL, EVENTHANDLER_PRI_ANY); | linux_thread_dtor, NULL, EVENTHANDLER_PRI_ANY); | ||||
linux_get_machine(&linux_kplatform); | linux_get_machine(&linux_kplatform); | ||||
linux_szplatform = roundup(strlen(linux_kplatform) + 1, | linux_szplatform = roundup(strlen(linux_kplatform) + 1, | ||||
sizeof(char *)); | sizeof(char *)); | ||||
linux_dev_shm_create(); | |||||
kib: So if both 64 and 32bit linix.ko are loaded, one of them would print an error. If another one… | |||||
linux_osd_jail_register(); | linux_osd_jail_register(); | ||||
stclohz = (stathz ? stathz : hz); | stclohz = (stathz ? stathz : hz); | ||||
if (bootverbose) | if (bootverbose) | ||||
printf("Linux ELF exec handler installed\n"); | printf("Linux ELF exec handler installed\n"); | ||||
} else | } else | ||||
printf("cannot insert Linux ELF brand handler\n"); | printf("cannot insert Linux ELF brand handler\n"); | ||||
break; | break; | ||||
case MOD_UNLOAD: | case MOD_UNLOAD: | ||||
Show All 9 Lines | case MOD_UNLOAD: | ||||
} | } | ||||
if (error == 0) { | if (error == 0) { | ||||
SET_FOREACH(lihp, linux_ioctl_handler_set) | SET_FOREACH(lihp, linux_ioctl_handler_set) | ||||
linux_ioctl_unregister_handler(*lihp); | linux_ioctl_unregister_handler(*lihp); | ||||
mtx_destroy(&futex_mtx); | mtx_destroy(&futex_mtx); | ||||
EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); | EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); | ||||
EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); | EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); | ||||
EVENTHANDLER_DEREGISTER(thread_dtor, linux_thread_dtor_tag); | EVENTHANDLER_DEREGISTER(thread_dtor, linux_thread_dtor_tag); | ||||
linux_dev_shm_destroy(); | |||||
linux_osd_jail_deregister(); | linux_osd_jail_deregister(); | ||||
if (bootverbose) | if (bootverbose) | ||||
printf("Linux ELF exec handler removed\n"); | printf("Linux ELF exec handler removed\n"); | ||||
} else | } else | ||||
printf("Could not deinstall ELF interpreter entry\n"); | printf("Could not deinstall ELF interpreter entry\n"); | ||||
break; | break; | ||||
default: | default: | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
Show All 12 Lines |
So if both 64 and 32bit linix.ko are loaded, one of them would print an error. If another one is unloaded before the module that printed an error, the node is destroyed. Which raises the next question, did you actually tried it ? I wonder what happens to the system when devfs directory goes away while being used as mount point (I have no idea and curious).