From owner-p4-projects@FreeBSD.ORG Fri Nov 27 20:41:49 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C26CB1065670; Fri, 27 Nov 2009 20:41:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DA5E106566B for ; Fri, 27 Nov 2009 20:41:49 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 599FD8FC0A for ; Fri, 27 Nov 2009 20:41:49 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nARKfnHg015758 for ; Fri, 27 Nov 2009 20:41:49 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nARKfntH015756 for perforce@freebsd.org; Fri, 27 Nov 2009 20:41:49 GMT (envelope-from mav@freebsd.org) Date: Fri, 27 Nov 2009 20:41:49 GMT Message-Id: <200911272041.nARKfntH015756@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 171108 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 20:41:50 -0000 http://p4web.freebsd.org/chv.cgi?CH=171108 Change 171108 by mav@mav_mavbook on 2009/11/27 20:41:27 IFC Affected files ... .. //depot/projects/scottl-camlock/src/include/signal.h#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/compat-43/Makefile.inc#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/compat-43/Symbol.map#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/compat-43/sigcompat.c#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/compat-43/sigpause.2#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/gen/exec.c#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/gen/fts.3#4 integrate .. //depot/projects/scottl-camlock/src/lib/libc/gen/fts.c#4 integrate .. //depot/projects/scottl-camlock/src/lib/libthr/Makefile#3 integrate .. //depot/projects/scottl-camlock/src/lib/libutil/pw_util.c#2 integrate .. //depot/projects/scottl-camlock/src/libexec/rtld-elf/rtld.c#8 integrate .. //depot/projects/scottl-camlock/src/libexec/rtld-elf/rtld.h#6 integrate .. //depot/projects/scottl-camlock/src/sbin/atacontrol/atacontrol.c#5 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/mfi.4#6 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/sctp.4#3 integrate .. //depot/projects/scottl-camlock/src/share/misc/bsd-family-tree#6 integrate .. //depot/projects/scottl-camlock/src/sys/amd64/amd64/trap.c#24 integrate .. //depot/projects/scottl-camlock/src/sys/arm/arm/trap.c#14 integrate .. //depot/projects/scottl-camlock/src/sys/boot/forth/loader.conf.5#7 integrate .. //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/Makefile#10 integrate .. //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/spinconsole.c#1 branch .. //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/vidconsole.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/boot/i386/loader/conf.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/boot/pc98/loader/conf.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/conf/files#57 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#41 integrate .. //depot/projects/scottl-camlock/src/sys/dev/cxgb/ulp/tom/cxgb_vm.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/dev/sound/pci/hda/hdac.c#21 integrate .. //depot/projects/scottl-camlock/src/sys/i386/i386/trap.c#21 integrate .. //depot/projects/scottl-camlock/src/sys/i386/xen/exception.s#2 integrate .. //depot/projects/scottl-camlock/src/sys/ia64/ia64/trap.c#17 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/trap.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/modules/ata/atausb/Makefile#3 delete .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_constants.h#11 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/aim/trap.c#7 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/booke/trap.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/sparc64/sparc64/trap.c#16 integrate .. //depot/projects/scottl-camlock/src/sys/sun4v/sun4v/trap.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/sys/ata.h#16 integrate .. //depot/projects/scottl-camlock/src/sys/sys/elf_common.h#11 integrate .. //depot/projects/scottl-camlock/src/sys/sys/signal.h#7 integrate .. //depot/projects/scottl-camlock/src/sys/sys/signalvar.h#15 integrate .. //depot/projects/scottl-camlock/src/sys/vm/vm_fault.c#29 integrate .. //depot/projects/scottl-camlock/src/sys/vm/vm_map.h#12 integrate .. //depot/projects/scottl-camlock/src/usr.bin/unifdef/unifdef.c#4 integrate .. //depot/projects/scottl-camlock/src/usr.bin/unifdef/unifdefall.sh#3 integrate Differences ... ==== //depot/projects/scottl-camlock/src/include/signal.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)signal.h 8.3 (Berkeley) 3/30/94 - * $FreeBSD: src/include/signal.h,v 1.30 2009/04/17 14:19:18 das Exp $ + * $FreeBSD: src/include/signal.h,v 1.31 2009/11/26 13:49:37 kib Exp $ */ #ifndef _SIGNAL_H_ @@ -99,7 +99,12 @@ #if __XSI_VISIBLE int killpg(__pid_t, int); int sigaltstack(const stack_t * __restrict, stack_t * __restrict); -int sigpause(int); +int sighold(int sig); +int sigignore(int sig); +int sigpause(int sigmask); +int sigrelse(int sig); +void (*sigset(int sig, void (*disp)(int)))(int); +int xsi_sigpause(int sig); #endif #if __XSI_VISIBLE >= 600 ==== //depot/projects/scottl-camlock/src/lib/libc/compat-43/Makefile.inc#2 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/2/93 -# $FreeBSD: src/lib/libc/compat-43/Makefile.inc,v 1.13 2006/03/13 01:14:55 deischen Exp $ +# $FreeBSD: src/lib/libc/compat-43/Makefile.inc,v 1.14 2009/11/26 13:49:37 kib Exp $ # compat-43 sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/compat-43 ${.CURDIR}/compat-43 @@ -13,6 +13,11 @@ MAN+= gethostid.3 setruid.3 MLINKS+=gethostid.3 sethostid.3 +MLINKS+=sigpause.2 sighold.2 +MLINKS+=sigpause.2 sigignore.2 +MLINKS+=sigpause.2 sigrelse.2 +MLINKS+=sigpause.2 sigset.2 +MLINKS+=sigpause.2 xsi_sigpause.2 MLINKS+=setruid.3 setrgid.3 MLINKS+=sigsetmask.2 sigblock.2 ==== //depot/projects/scottl-camlock/src/lib/libc/compat-43/Symbol.map#3 (text) ==== @@ -1,5 +1,5 @@ /* - * $FreeBSD: src/lib/libc/compat-43/Symbol.map,v 1.2 2007/04/29 14:05:16 deischen Exp $ + * $FreeBSD: src/lib/libc/compat-43/Symbol.map,v 1.3 2009/11/26 13:49:37 kib Exp $ */ FBSD_1.0 { @@ -17,6 +17,14 @@ sigvec; }; +FBSD_1.2 { + sighold; + sigignore; + sigrelse; + sigset; + xsi_sigpause; +}; + FBSDprivate_1.0 { __creat; _creat; ==== //depot/projects/scottl-camlock/src/lib/libc/compat-43/sigcompat.c#2 (text+ko) ==== @@ -31,11 +31,12 @@ static char sccsid[] = "@(#)sigcompat.c 8.1 (Berkeley) 6/2/93"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/compat-43/sigcompat.c,v 1.11 2007/01/09 00:27:49 imp Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/compat-43/sigcompat.c,v 1.12 2009/11/26 13:49:37 kib Exp $"); #include "namespace.h" #include #include +#include #include "un-namespace.h" #include "libc_private.h" @@ -97,8 +98,7 @@ } int -sigpause(mask) - int mask; +sigpause(int mask) { sigset_t set; @@ -106,3 +106,84 @@ set.__bits[0] = mask; return (_sigsuspend(&set)); } + +int +xsi_sigpause(int sig) +{ + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, sig); + return (_sigsuspend(&set)); +} + +int +sighold(int sig) +{ + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, sig); + return (_sigprocmask(SIG_BLOCK, &set, NULL)); +} + +int +sigignore(int sig) +{ + struct sigaction sa; + + bzero(&sa, sizeof(sa)); + sa.sa_handler = SIG_IGN; + return (_sigaction(sig, &sa, NULL)); +} + +int +sigrelse(int sig) +{ + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, sig); + return (_sigprocmask(SIG_UNBLOCK, &set, NULL)); +} + +void +(*sigset(int sig, void (*disp)(int)))(int) +{ + sigset_t set, pset; + struct sigaction sa, psa; + int error; + + sigemptyset(&set); + sigaddset(&set, sig); + error = _sigprocmask(SIG_BLOCK, NULL, &pset); + if (error == -1) + return (SIG_ERR); + if ((__sighandler_t *)disp == SIG_HOLD) { + error = _sigprocmask(SIG_BLOCK, &set, &pset); + if (error == -1) + return (SIG_ERR); + if (sigismember(&pset, sig)) + return (SIG_HOLD); + else { + error = _sigaction(sig, NULL, &psa); + if (error == -1) + return (SIG_ERR); + return (psa.sa_handler); + } + } else { + error = _sigprocmask(SIG_UNBLOCK, &set, &pset); + if (error == -1) + return (SIG_ERR); + } + + bzero(&sa, sizeof(sa)); + sa.sa_handler = disp; + error = _sigaction(sig, &sa, &psa); + if (error == -1) + return (SIG_ERR); + if (sigismember(&pset, sig)) + return (SIG_HOLD); + else + return (psa.sa_handler); +} ==== //depot/projects/scottl-camlock/src/lib/libc/compat-43/sigpause.2#2 (text+ko) ==== @@ -26,23 +26,120 @@ .\" SUCH DAMAGE. .\" .\" @(#)sigpause.2 8.1 (Berkeley) 6/2/93 -.\" $FreeBSD: src/lib/libc/compat-43/sigpause.2,v 1.14 2007/01/09 00:27:49 imp Exp $ +.\" $FreeBSD: src/lib/libc/compat-43/sigpause.2,v 1.15 2009/11/26 13:49:37 kib Exp $ +.\" +.\" Part of the content of the man page was derived from +.\" The Open Group Base Specifications Issue 7 +.\" IEEE Std 1003.1-2008 .\" .Dd June 2, 1993 .Dt SIGPAUSE 2 .Os .Sh NAME -.Nm sigpause -.Nd atomically release blocked signals and wait for interrupt +.Nm sighold , +.Nm sigignore , +.Nm sigpause , +.Nm sigrelse , +.Nm sigset +.Nd legacy interface for signal management .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In signal.h .Ft int +.Fn sighold "int sig" +.Ft int +.Fn sigignore "int sig" +.Ft int +.Fn xsi_sigpause "int sigmask" +.Ft int +.Fn sigrelse "int sig" +.Ft void (*)(int) +.Fn sigset "int" "void (*disp)(int)" +.Ft int .Fn sigpause "int sigmask" .Sh DESCRIPTION .Sy This interface is made obsolete by -.Xr sigsuspend 2 . +.Xr sigsuspend 2 +.Sy and +.Xr sigaction 2 +.Pp +The +.Fn sigset +function modifies signal dispositions. +The +.Fa sig +argument specifies the signal, which may be any signal except +.Dv SIGKILL +and +.Dv SIGSTOP . +The +.Fa disp +argument specifies the signal's disposition, +which may be +.Dv SIG_DFL , +.Dv SIG_IGN , +or the address of a signal handler. +If +.Fn sigset +is used, and +.Fa disp +is the address of a signal handler, the +system adds +.Fa sig +to the signal mask of the calling process before executing the signal +handler; when the signal handler returns, the system restores the +signal mask of the calling process to its state prior to the delivery +of the signal. +In addition, if +.Fn sigset +is used, and +.Fa disp +is equal to +.Dv SIG_HOLD , +.Fa sig +is added to the signal +mask of the calling process and +.Fa sig 's +disposition remains unchanged. +If +.Fn sigset +is used, and +.Fa disp +is not equal to +.Dv SIG_HOLD , +.Fa sig +is removed from the signal mask of the calling process. +.Pp +The +.Fn sighold +function adds +.Fa sig +to the signal mask of the calling process. +.Pp +The +.Fn sigrelse +function removes +.Fa sig +from the signal mask of the calling process. +.Pp +The +.Fn sigignore +function sets the disposition of +.Fa sig +to +.Dv SIG_IGN . +.Pp +The +.Fn xsi_sigpause +function removes +.Fa sig +from the signal mask of the calling process and suspend the calling process +until a signal is received. +The +.Fn xsi_sigpause +function restores the signal mask of the process to its original state before +returning. .Pp The .Fn sigpause @@ -57,13 +154,47 @@ argument is usually 0 to indicate that no signals are to be blocked. +.Sh RETURN VALUES The .Fn sigpause -function -always terminates by being interrupted, returning -1 with +and +.Fn xsi_sigpause +functions +always terminate by being interrupted, returning -1 with .Va errno set to -.Er EINTR +.Er EINTR . +.Pp +Upon successful completion, +.Fn sigset +returns +.Dv SIG_HOLD +if the signal had been blocked and the signal's previous disposition if +it had not been blocked. +Otherwise, +.Dv SIG_ERR is returned and +.Va errno +set to indicate the error. +.Pp +For all other functions, upon successful completion, 0 is returned. +Otherwise, -1 is returned and +.Va errno +is set to indicate the error: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa sig +argument +is not a valid signal number. +.It Bq Er EINVAL +For +.Fn sigset +and +.Fn sigignore +functions, an attempt was made to catch or ignore +.Dv SIGKILL +or +.Dv SIGSTOP . .Sh SEE ALSO .Xr kill 2 , .Xr sigaction 2 , @@ -85,9 +216,26 @@ .Pq Tn XSI option of .St -p1003.1-2001 . +.Fx +implements it under the name +.Fn xsi_sigpause . +The +.Fn sighold , +.Fn sigignore , +.Fn sigrelse +and +.Fn sigset +functions are implemented for compatibility with +.Sy System V +and +.Sy XSI +interfaces. .Sh HISTORY The .Fn sigpause function appeared in .Bx 4.2 and has been deprecated. +All other functions appeared in +.Fx 9.0 +and were deprecated before being implemented. ==== //depot/projects/scottl-camlock/src/lib/libc/gen/exec.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/exec.c,v 1.25 2008/06/23 05:22:06 ed Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/exec.c,v 1.26 2009/11/27 13:05:14 ed Exp $"); #include "namespace.h" #include @@ -209,7 +209,7 @@ bcopy(name, buf + lp + 1, ln); buf[lp + ln + 1] = '\0'; -retry: (void)_execve(bp, argv, environ); +retry: (void)_execve(bp, argv, envp); switch (errno) { case E2BIG: goto done; @@ -228,7 +228,7 @@ memp[0] = "sh"; memp[1] = bp; bcopy(argv + 1, memp + 2, cnt * sizeof(char *)); - (void)_execve(_PATH_BSHELL, memp, environ); + (void)_execve(_PATH_BSHELL, memp, envp); goto done; case ENOMEM: goto done; ==== //depot/projects/scottl-camlock/src/lib/libc/gen/fts.3#4 (text+ko) ==== @@ -26,9 +26,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)fts.3 8.5 (Berkeley) 4/16/94 -.\" $FreeBSD: src/lib/libc/gen/fts.3,v 1.25 2009/10/05 21:11:04 delphij Exp $ +.\" $FreeBSD: src/lib/libc/gen/fts.3,v 1.26 2009/11/26 19:09:10 jh Exp $ .\" -.Dd October 5, 2009 +.Dd November 25, 2009 .Dt FTS 3 .Os .Sh NAME @@ -198,10 +198,9 @@ The contents of the .Vt FTSENT structure will be unchanged from when -it was returned in pre-order, i.e., with the +the directory was visited in pre-order, except for the .Fa fts_info -field set to -.Dv FTS_D . +field. .It Dv FTS_ERR This is an error return, and the .Fa fts_errno ==== //depot/projects/scottl-camlock/src/lib/libc/gen/fts.c#4 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libc/gen/fts.c,v 1.31 2009/10/05 21:11:04 delphij Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/fts.c,v 1.32 2009/11/26 19:11:44 jh Exp $"); #include "namespace.h" #include @@ -842,11 +842,8 @@ * If not changing directories, reset the path back to original * state. */ - if (ISSET(FTS_NOCHDIR)) { - if (len == sp->fts_pathlen || nitems == 0) - --cp; - *cp = '\0'; - } + if (ISSET(FTS_NOCHDIR)) + sp->fts_path[cur->fts_pathlen] = '\0'; /* * If descended after called from fts_children or after called from ==== //depot/projects/scottl-camlock/src/lib/libthr/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libthr/Makefile,v 1.40 2009/03/31 02:50:18 davidxu Exp $ +# $FreeBSD: src/lib/libthr/Makefile,v 1.41 2009/11/26 14:01:14 kib Exp $ # # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does @@ -25,7 +25,7 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline -LDFLAGS+=-Wl,-znodelete +LDFLAGS+=-Wl,-znodelete -Wl,-znodlopen VERSION_DEF=${.CURDIR}/../libc/Versions.def SYMBOL_MAPS=${.CURDIR}/pthread.map ==== //depot/projects/scottl-camlock/src/lib/libutil/pw_util.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94"; #endif static const char rcsid[] = - "$FreeBSD: src/lib/libutil/pw_util.c,v 1.38 2007/01/09 01:02:05 imp Exp $"; + "$FreeBSD: src/lib/libutil/pw_util.c,v 1.39 2009/11/26 13:41:15 kib Exp $"; #endif /* not lint */ /* @@ -289,7 +289,7 @@ pw_edit(int notsetuid) { struct sigaction sa, sa_int, sa_quit; - sigset_t oldsigset, sigset; + sigset_t oldsigset, nsigset; struct stat st1, st2; const char *editor; int pstat; @@ -303,9 +303,9 @@ sa.sa_flags = 0; sigaction(SIGINT, &sa, &sa_int); sigaction(SIGQUIT, &sa, &sa_quit); - sigemptyset(&sigset); - sigaddset(&sigset, SIGCHLD); - sigprocmask(SIG_BLOCK, &sigset, &oldsigset); + sigemptyset(&nsigset); + sigaddset(&nsigset, SIGCHLD); + sigprocmask(SIG_BLOCK, &nsigset, &oldsigset); switch ((editpid = fork())) { case -1: return (-1); ==== //depot/projects/scottl-camlock/src/libexec/rtld-elf/rtld.c#8 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.141 2009/11/14 15:08:44 rwatson Exp $ + * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.143 2009/11/26 13:57:20 kib Exp $ */ /* @@ -87,7 +87,7 @@ static void digest_dynamic(Obj_Entry *, int); static Obj_Entry *digest_phdr(const Elf_Phdr *, int, caddr_t, const char *); static Obj_Entry *dlcheck(void *); -static Obj_Entry *do_load_object(int, const char *, char *, struct stat *); +static Obj_Entry *do_load_object(int, const char *, char *, struct stat *, int); static int do_search_info(const Obj_Entry *obj, int, struct dl_serinfo *); static bool donelist_check(DoneList *, const Obj_Entry *); static void errmsg_restore(char *); @@ -103,7 +103,7 @@ static bool is_exported(const Elf_Sym *); static void linkmap_add(Obj_Entry *); static void linkmap_delete(Obj_Entry *); -static int load_needed_objects(Obj_Entry *); +static int load_needed_objects(Obj_Entry *, int); static int load_preload_objects(void); static Obj_Entry *load_object(const char *, const Obj_Entry *, int); static Obj_Entry *obj_from_addr(const void *); @@ -485,7 +485,7 @@ preload_tail = obj_tail; dbg("loading needed objects"); - if (load_needed_objects(obj_main) == -1) + if (load_needed_objects(obj_main, 0) == -1) die(); /* Make a list of all objects loaded at startup. */ @@ -898,7 +898,7 @@ #endif case DT_FLAGS: - if ((dynp->d_un.d_val & DF_1_ORIGIN) && trust) + if ((dynp->d_un.d_val & DF_ORIGIN) && trust) obj->z_origin = true; if (dynp->d_un.d_val & DF_SYMBOLIC) obj->symbolic = true; @@ -932,6 +932,8 @@ #endif case DT_FLAGS_1: + if (dynp->d_un.d_val & DF_1_NOOPEN) + obj->z_noopen = true; if ((dynp->d_un.d_val & DF_1_ORIGIN) && trust) obj->z_origin = true; if (dynp->d_un.d_val & DF_1_GLOBAL) @@ -1425,7 +1427,7 @@ * returns -1 on failure. */ static int -load_needed_objects(Obj_Entry *first) +load_needed_objects(Obj_Entry *first, int flags) { Obj_Entry *obj, *obj1; @@ -1434,7 +1436,7 @@ for (needed = obj->needed; needed != NULL; needed = needed->next) { obj1 = needed->obj = load_object(obj->strtab + needed->name, obj, - false); + flags & ~RTLD_LO_NOLOAD); if (obj1 == NULL && !ld_tracing) return -1; if (obj1 != NULL && obj1->z_nodelete && !obj1->ref_nodel) { @@ -1465,7 +1467,7 @@ savech = p[len]; p[len] = '\0'; - if (load_object(p, NULL, false) == NULL) + if (load_object(p, NULL, 0) == NULL) return -1; /* XXX - cleanup */ p[len] = savech; p += len; @@ -1482,7 +1484,7 @@ * on failure. */ static Obj_Entry * -load_object(const char *name, const Obj_Entry *refobj, int noload) +load_object(const char *name, const Obj_Entry *refobj, int flags) { Obj_Entry *obj; int fd = -1; @@ -1528,11 +1530,11 @@ close(fd); return obj; } - if (noload) + if (flags & RTLD_LO_NOLOAD) return (NULL); /* First use of this object, so we must map it in */ - obj = do_load_object(fd, name, path, &sb); + obj = do_load_object(fd, name, path, &sb, flags); if (obj == NULL) free(path); close(fd); @@ -1541,7 +1543,8 @@ } static Obj_Entry * -do_load_object(int fd, const char *name, char *path, struct stat *sbp) +do_load_object(int fd, const char *name, char *path, struct stat *sbp, + int flags) { Obj_Entry *obj; struct statfs fs; @@ -1568,6 +1571,13 @@ object_add_name(obj, name); obj->path = path; digest_dynamic(obj, 0); + if (obj->z_noopen && (flags & RTLD_LO_DLOPEN)) { + dbg("refusing to load non-loadable \"%s\"", obj->path); + _rtld_error("Cannot dlopen non-loadable %s\n", obj->path); + munmap(obj->mapbase, obj->mapsize); + obj_free(obj); + return (NULL); + } *obj_tail = obj; obj_tail = &obj->next; @@ -1986,14 +1996,16 @@ Obj_Entry **old_obj_tail; Obj_Entry *obj; Objlist initlist; - int result, lockstate, nodelete, noload; + int result, lockstate, nodelete, lo_flags; LD_UTRACE(UTRACE_DLOPEN_START, NULL, NULL, 0, mode, name); ld_tracing = (mode & RTLD_TRACE) == 0 ? NULL : "1"; if (ld_tracing != NULL) environ = (char **)*get_program_var_addr("environ"); nodelete = mode & RTLD_NODELETE; - noload = mode & RTLD_NOLOAD; + lo_flags = RTLD_LO_DLOPEN; + if (mode & RTLD_NOLOAD) + lo_flags |= RTLD_LO_NOLOAD; objlist_init(&initlist); @@ -2006,7 +2018,7 @@ obj = obj_main; obj->refcount++; } else { - obj = load_object(name, obj_main, noload); + obj = load_object(name, obj_main, lo_flags); } if (obj) { @@ -2016,7 +2028,7 @@ mode &= RTLD_MODEMASK; if (*old_obj_tail != NULL) { /* We loaded something new. */ assert(*old_obj_tail == obj); - result = load_needed_objects(obj); + result = load_needed_objects(obj, RTLD_LO_DLOPEN); init_dag(obj); if (result != -1) result = rtld_verify_versions(&obj->dagmembers); ==== //depot/projects/scottl-camlock/src/libexec/rtld-elf/rtld.h#6 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/rtld.h,v 1.43 2009/06/20 14:16:41 kan Exp $ + * $FreeBSD: src/libexec/rtld-elf/rtld.h,v 1.44 2009/11/26 13:57:20 kib Exp $ */ #ifndef RTLD_H /* { */ @@ -218,6 +218,7 @@ bool phdr_alloc : 1; /* Phdr is allocated and needs to be freed. */ bool z_origin : 1; /* Process rpath and soname tokens */ bool z_nodelete : 1; /* Do not unload the object and dependencies */ + bool z_noopen : 1; /* Do not load on dlopen */ bool ref_nodel : 1; /* Refcount increased to prevent dlclose */ bool init_scanned: 1; /* Object is already on init list. */ bool on_fini_list: 1; /* Object is already on fini list. */ @@ -240,6 +241,10 @@ #define SYMLOOK_DLSYM 0x02 /* Return newes versioned symbol. Used by dlsym. */ +/* Flags for load_object(). */ +#define RTLD_LO_NOLOAD 0x01 /* dlopen() specified RTLD_NOLOAD */ +#define RTLD_LO_DLOPEN 0x02 /* load_object() called from dlopen(). */ + /* * Symbol cache entry used during relocation to avoid multiple lookups * of the same symbol. ==== //depot/projects/scottl-camlock/src/sbin/atacontrol/atacontrol.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.53 2009/11/22 10:53:26 mav Exp $ + * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.54 2009/11/26 12:41:43 mav Exp $ */ #include ==== //depot/projects/scottl-camlock/src/share/man/man4/mfi.4#6 (text) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/mfi.4,v 1.10 2009/11/24 08:14:22 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/mfi.4,v 1.11 2009/11/26 13:25:07 brueffer Exp $ .\" -.Dd November 24, 2009 +.Dd November 26, 2009 .Dt MFI 4 .Os .Sh NAME @@ -90,6 +90,8 @@ Dell PERC5 .It Dell PERC6 +.It +IBM ServeRAID-MR10i .El .Sh FILES .Bl -tag -width ".Pa /dev/mfid?" -compact ==== //depot/projects/scottl-camlock/src/share/man/man4/sctp.4#3 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/sctp.4,v 1.3 2007/09/25 16:03:10 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/sctp.4,v 1.4 2009/11/27 13:08:25 roam Exp $ .\" .Dd December 15, 2006 .Dt SCTP 4 @@ -179,7 +179,7 @@ and tested with .Xr getsockopt 2 or -.Xr sctp_opt_info 2 : +.Xr sctp_opt_info 3 : .Bl -tag -width ".Dv SCTP_SET_PEER_PRIMARY_ADDR" .It Dv SCTP_NODELAY Under most circumstances, ==== //depot/projects/scottl-camlock/src/share/misc/bsd-family-tree#6 (text+ko) ==== @@ -232,7 +232,12 @@ | | | | | DragonFly 2.4.0 | V | | OpenBSD 4.6 | | | | | | -FreeBSD 8 -current | NetBSD -current OpenBSD -current | + *--FreeBSD | | | | + | 8.0 | | | | + | | | | | | + | V | | | | + | | | | | +FreeBSD 9 -current | NetBSD -current OpenBSD -current | | | | | | v v v v v @@ -505,6 +510,7 @@ FreeBSD 7.2 2009-05-04 [FBD] DragonFly 2.4.0 2009-09-16 [DFB] OpenBSD 4.6 2009-10-18 [OBD] +FreeBSD 8.0 2009-11-26 [FBD] Bibliography ------------------------ @@ -565,4 +571,4 @@ Copyright (c) 1997-2007 Wolfram Schneider URL: http://cvsweb.freebsd.org/src/share/misc/bsd-family-tree -$FreeBSD: src/share/misc/bsd-family-tree,v 1.132 2009/10/18 17:10:39 maxim Exp $ +$FreeBSD: src/share/misc/bsd-family-tree,v 1.134 2009/11/27 07:55:39 maxim Exp $ ==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/trap.c#24 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.337 2009/11/10 11:43:07 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.338 2009/11/27 20:24:11 alc Exp $"); /* * AMD64 Trap and System call handling @@ -750,9 +750,7 @@ PROC_UNLOCK(p); /* Fault in the user page: */ - rv = vm_fault(map, va, ftype, - (ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY - : VM_FAULT_NORMAL); + rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL); PROC_LOCK(p); --p->p_lock; ==== //depot/projects/scottl-camlock/src/sys/arm/arm/trap.c#14 (text+ko) ==== @@ -82,7 +82,7 @@ #include "opt_ktrace.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.40 2009/11/10 11:43:07 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.41 2009/11/27 20:24:11 alc Exp $"); #include #include @@ -425,8 +425,7 @@ p->p_lock++; PROC_UNLOCK(p); } - error = vm_fault(map, va, ftype, (ftype & VM_PROT_WRITE) ? - VM_FAULT_DIRTY : VM_FAULT_NORMAL); + error = vm_fault(map, va, ftype, VM_FAULT_NORMAL); pcb->pcb_onfault = onfault; if (map != kernel_map) { ==== //depot/projects/scottl-camlock/src/sys/boot/forth/loader.conf.5#7 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sys/boot/forth/loader.conf.5,v 1.28 2008/01/16 07:00:55 keramida Exp $ +.\" $FreeBSD: src/sys/boot/forth/loader.conf.5,v 1.29 2009/11/27 03:55:42 sobomax Exp $ .Dd January 16, 2008 .Dt LOADER.CONF 5 .Os @@ -180,10 +180,15 @@ .Dq comconsole selects serial console, .Dq vidconsole -selects the video console, and +selects the video console, .Dq nullconsole selects a mute console -(useful for systems with neither a video console nor a serial port). +(useful for systems with neither a video console nor a serial port), and +.Dq spinconsole +selects the video console which prevents any input and hides all output +replacing it with +.Dq spinning +character (useful for embedded products and such). .It Va kernel .Pq Dq Pa /boot/kernel/kernel .It Va loader_conf_files ==== //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/Makefile#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.46 2009/06/05 18:44:36 jkim Exp $ +# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.47 2009/11/27 03:55:42 sobomax Exp $ # LIB= i386 INTERNALLIB= @@ -8,7 +8,7 @@ comconsole.c devicename.c elf32_freebsd.c \ elf64_freebsd.c \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ - smbios.c time.c vidconsole.c amd64_tramp.S + smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c # Enable PXE TFTP or NFS support, not both. .if defined(LOADER_TFTP_SUPPORT) ==== //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/vidconsole.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/vidconsole.c,v 1.20 2005/04/09 14:07:13 stefanf Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/vidconsole.c,v 1.21 2009/11/27 03:55:42 sobomax Exp $"); #include #include @@ -57,8 +57,8 @@ void end_term(void); void bail_out(int c); void vidc_term_emu(int c); -void get_pos(void); -void curs_move(int x, int y); +void get_pos(int *x, int *y); +void curs_move(int *_x, int *_y, int x, int y); void write_char(int c, int fg, int bg); void scroll_up(int rows, int fg, int bg); void CD(void); @@ -110,8 +110,8 @@ #ifdef TERM_EMU /* Init terminal emulator */ end_term(); - get_pos(); - curs_move(curx, cury); + get_pos(&curx, &cury); + curs_move(&curx, &cury, curx, cury); fg_c = DEFAULT_FGCOLOR; bg_c = DEFAULT_BGCOLOR; #endif @@ -120,7 +120,7 @@ return (0); /* XXX reinit? */ } -static void >>> TRUNCATED FOR MAIL (1000 lines) <<<