Date: Tue, 7 Nov 2006 18:48:11 GMT From: Alex Lyashkov <als@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 109462 for review Message-ID: <200611071848.kA7ImBSV020410@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109462 Change 109462 by als@als_head on 2006/11/07 18:47:58 disable linker debug. add to default in for jail only kernel_linker_file. other modules only init jail_0 and must be kldloaded when need init selected context. Affected files ... .. //depot/projects/jail2/sys/kern/kern_linker.c#7 edit Differences ... ==== //depot/projects/jail2/sys/kern/kern_linker.c#7 (text+ko) ==== @@ -31,8 +31,6 @@ #include "opt_hwpmc_hooks.h" #include "opt_mac.h" -#define KLD_DEBUG - #include <sys/param.h> #include <sys/kernel.h> #include <sys/systm.h> @@ -67,7 +65,7 @@ #endif #ifdef KLD_DEBUG -int kld_debug = 1; +int kld_debug = 0; #endif #define KLD_LOCK() sx_xlock(&kld_sx) @@ -365,6 +363,26 @@ } static void +linker_file_register_jaildefault(linker_file_t lf) +{ + struct jailinit **start, **stop, **sipp; + + KLD_DPF(FILE, + ("linker_file_register_jaildefault: registering default for jail." + "file %s\n", lf->filename)); + + if (linker_file_lookup_set(lf, "jailinit_set", &start, &stop, NULL) != 0) + return; + + for (sipp = start; sipp < stop; sipp++) { + if ((*sipp)->subsystem == SI_SUB_DUMMY) + continue; /* skip dummy task(s) */ + + jailsysinit_add(*sipp); + } +} + +static void linker_file_jailuninit(linker_file_t lf, struct prison *pr) { struct jailinit **start, **stop, **sipp, **xipp, *save; @@ -394,8 +412,6 @@ if ((*sipp)->subsystem == SI_SUB_DUMMY) continue; /* skip dummy task(s) */ - if (!pr_jailed(pr)) - jailsysinit_del(*sipp); /* Call function */ (*((*sipp)->fini)) (pr); } @@ -490,6 +506,7 @@ linker_file_register_modules(linker_kernel_file); #ifdef JAIL + linker_file_register_jaildefault(linker_kernel_file); linker_file_register_jailinit(linker_kernel_file, &jail_0); #endif }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611071848.kA7ImBSV020410>