From owner-svn-src-stable-10@FreeBSD.ORG Sun Nov 24 23:30:24 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B3C9E5; Sun, 24 Nov 2013 23:30:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC552BEB; Sun, 24 Nov 2013 23:30:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAONUOG2064409; Sun, 24 Nov 2013 23:30:24 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAONUOXH064407; Sun, 24 Nov 2013 23:30:24 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201311242330.rAONUOXH064407@svn.freebsd.org> From: Colin Percival Date: Sun, 24 Nov 2013 23:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258536 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 23:30:24 -0000 Author: cperciva Date: Sun Nov 24 23:30:23 2013 New Revision: 258536 URL: http://svnweb.freebsd.org/changeset/base/258536 Log: MFC r258086: Strip the -pN patch level from the VERSION string which gets encoded into CTF data. Otherwise FreeBSD Update builds think every kernel file has changed every time there's a security advisory, since the FreeBSD Update build code isn't smart enough to look inside CTF data to ignore those changes. Approved by: re (gjb) Modified: stable/10/Makefile.inc1 (contents, props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Nov 24 23:12:13 2013 (r258535) +++ stable/10/Makefile.inc1 Sun Nov 24 23:30:23 2013 (r258536) @@ -133,7 +133,7 @@ REVISION!= make -C ${SRCDIR}/release -V BRANCH!= make -C ${SRCDIR}/release -V BRANCH SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ ${SRCDIR}/sys/sys/param.h -VERSION= FreeBSD ${REVISION}-${BRANCH} ${TARGET_ARCH} ${SRCRELDATE} +VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} .endif KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 15:34:58 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5A35F6D; Mon, 25 Nov 2013 15:34:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9514D221B; Mon, 25 Nov 2013 15:34:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFYwJu096594; Mon, 25 Nov 2013 15:34:58 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFYweo096592; Mon, 25 Nov 2013 15:34:58 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201311251534.rAPFYweo096592@svn.freebsd.org> From: Grzegorz Bernacki Date: Mon, 25 Nov 2013 15:34:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258554 - stable/10/sys/dev/nand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:34:58 -0000 Author: gber Date: Mon Nov 25 15:34:57 2013 New Revision: 258554 URL: http://svnweb.freebsd.org/changeset/base/258554 Log: MFC: r258387,r258425 Split raw reading/programming into smaller chunks to avoid allocating too big chunk of kernel memory. Validate size of data. Add error handling to avoid calling copyout() when data has not been read correctly. Also MFC of change r258425 which fixes problem introduced by r258387. Reviewed by: zbb Reported by: x90c Approved by: re Modified: stable/10/sys/dev/nand/nand_cdev.c stable/10/sys/dev/nand/nand_geom.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/nand/nand_cdev.c ============================================================================== --- stable/10/sys/dev/nand/nand_cdev.c Mon Nov 25 15:01:59 2013 (r258553) +++ stable/10/sys/dev/nand/nand_cdev.c Mon Nov 25 15:34:57 2013 (r258554) @@ -294,19 +294,40 @@ nand_ioctl(struct cdev *dev, u_long cmd, struct thread *td) { struct nand_chip *chip; + struct chip_geom *cg; struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; + size_t bufsize = 0, len = 0; + size_t raw_size; + off_t off; uint8_t *buf = NULL; int ret = 0; uint8_t status; chip = (struct nand_chip *)dev->si_drv1; + cg = &chip->chip_geom; nandbus = device_get_parent(chip->dev); if ((cmd == NAND_IO_RAW_READ) || (cmd == NAND_IO_RAW_PROG)) { raw_rw = (struct nand_raw_rw *)data; - buf = malloc(raw_rw->len, M_NAND, M_WAITOK); + raw_size = cg->pgs_per_blk * (cg->page_size + cg->oob_size); + + /* Check if len is not bigger than chip size */ + if (raw_rw->len > raw_size) + return (EFBIG); + + /* + * Do not ask for too much memory, in case of large transfers + * read/write in 16-pages chunks + */ + bufsize = 16 * (cg->page_size + cg->oob_size); + if (raw_rw->len < bufsize) + bufsize = raw_rw->len; + + buf = malloc(bufsize, M_NAND, M_WAITOK); + len = raw_rw->len; + off = 0; } switch(cmd) { case NAND_IO_ERASE: @@ -335,19 +356,37 @@ nand_ioctl(struct cdev *dev, u_long cmd, break; case NAND_IO_RAW_PROG: - ret = copyin(raw_rw->data, buf, raw_rw->len); - if (ret) - break; - ret = nand_prog_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + ret = copyin(raw_rw->data + off, buf, bufsize); + if (ret) + break; + ret = nand_prog_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_RAW_READ: - ret = nand_read_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); - if (ret) - break; - ret = copyout(buf, raw_rw->data, raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + + ret = nand_read_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + + ret = copyout(buf, raw_rw->data + off, bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_PAGE_STAT: Modified: stable/10/sys/dev/nand/nand_geom.c ============================================================================== --- stable/10/sys/dev/nand/nand_geom.c Mon Nov 25 15:01:59 2013 (r258553) +++ stable/10/sys/dev/nand/nand_geom.c Mon Nov 25 15:34:57 2013 (r258554) @@ -193,20 +193,42 @@ nand_ioctl(struct disk *ndisk, u_long cm struct thread *td) { struct nand_chip *chip; + struct chip_geom *cg; struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; + size_t bufsize = 0, len = 0; + size_t raw_size; + off_t off; uint8_t *buf = NULL; int ret = 0; uint8_t status; chip = (struct nand_chip *)ndisk->d_drv1; + cg = &chip->chip_geom; nandbus = device_get_parent(chip->dev); if ((cmd == NAND_IO_RAW_READ) || (cmd == NAND_IO_RAW_PROG)) { raw_rw = (struct nand_raw_rw *)data; - buf = malloc(raw_rw->len, M_NAND, M_WAITOK); + raw_size = cg->pgs_per_blk * (cg->page_size + cg->oob_size); + + /* Check if len is not bigger than chip size */ + if (raw_rw->len > raw_size) + return (EFBIG); + + /* + * Do not ask for too much memory, in case of large transfers + * read/write in 16-pages chunks + */ + bufsize = 16 * (cg->page_size + cg->oob_size); + if (raw_rw->len < bufsize) + bufsize = raw_rw->len; + + buf = malloc(bufsize, M_NAND, M_WAITOK); + len = raw_rw->len; + off = 0; } + switch (cmd) { case NAND_IO_ERASE: ret = nand_erase_blocks(chip, ((off_t *)data)[0], @@ -234,15 +256,38 @@ nand_ioctl(struct disk *ndisk, u_long cm break; case NAND_IO_RAW_PROG: - copyin(raw_rw->data, buf, raw_rw->len); - ret = nand_prog_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + + ret = copyin(raw_rw->data + off, buf, bufsize); + if (ret) + break; + ret = nand_prog_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_RAW_READ: - ret = nand_read_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); - copyout(buf, raw_rw->data, raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + + ret = nand_read_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + + ret = copyout(buf, raw_rw->data + off, bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_GET_CHIP_PARAM: From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 15:54:19 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68767C3F; Mon, 25 Nov 2013 15:54:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57567237E; Mon, 25 Nov 2013 15:54:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFsJGd003292; Mon, 25 Nov 2013 15:54:19 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFsJOE003291; Mon, 25 Nov 2013 15:54:19 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201311251554.rAPFsJOE003291@svn.freebsd.org> From: Ed Maste Date: Mon, 25 Nov 2013 15:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258558 - stable/10/contrib/libexecinfo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:54:19 -0000 Author: emaste Date: Mon Nov 25 15:54:18 2013 New Revision: 258558 URL: http://svnweb.freebsd.org/changeset/base/258558 Log: MFC r258426: libexecinfo: Include terminating null in byte count Otherwise, a formatted string with a strlen equal to the remaining buffer space would have the last character omitted (because vsnprintf always null-terminates), and later the assert in backtrace_symbols_fmt would fail. Sponsored by: DARPA, AFRL Approved by: re (gjb) Modified: stable/10/contrib/libexecinfo/backtrace.c Directory Properties: stable/10/contrib/libexecinfo/ (props changed) Modified: stable/10/contrib/libexecinfo/backtrace.c ============================================================================== --- stable/10/contrib/libexecinfo/backtrace.c Mon Nov 25 15:53:08 2013 (r258557) +++ stable/10/contrib/libexecinfo/backtrace.c Mon Nov 25 15:54:18 2013 (r258558) @@ -89,7 +89,7 @@ rasprintf(char **buf, size_t *bufsiz, si len = vsnprintf(*buf + offs, *bufsiz - offs, fmt, ap); va_end(ap); - if (len < 0 || (size_t)len < *bufsiz - offs) + if (len < 0 || (size_t)len + 1 < *bufsiz - offs) return len; nbufsiz = MAX(*bufsiz + 512, (size_t)len + 1); } else From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 15:58:50 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B720ED3; Mon, 25 Nov 2013 15:58:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47A0A23BD; Mon, 25 Nov 2013 15:58:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFwoig003912; Mon, 25 Nov 2013 15:58:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFwmTA003904; Mon, 25 Nov 2013 15:58:48 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201311251558.rAPFwmTA003904@svn.freebsd.org> From: Ed Maste Date: Mon, 25 Nov 2013 15:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258559 - in stable/10/sys: amd64/amd64 amd64/ia32 amd64/linux32 i386/i386 i386/include i386/linux pc98/pc98 x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:58:50 -0000 Author: emaste Date: Mon Nov 25 15:58:48 2013 New Revision: 258559 URL: http://svnweb.freebsd.org/changeset/base/258559 Log: MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...) Debuggers may need to change PSL_RF. Note that tf_eflags is already stored in the signal context during signal handling and PSL_RF previously could be modified via sigreturn, so this change should not provide any new ability to userspace. For background see the thread at: http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html Reviewed by: jhb, kib Sponsored by: DARPA, AFRL Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/amd64/ia32/ia32_signal.c stable/10/sys/amd64/linux32/linux32_sysvec.c stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/include/vm86.h stable/10/sys/i386/linux/linux_sysvec.c stable/10/sys/pc98/pc98/machdep.c stable/10/sys/x86/include/psl.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/amd64/amd64/machdep.c Mon Nov 25 15:58:48 2013 (r258559) @@ -486,17 +486,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_rflags for faults. Debuggers - * should sometimes set it there too. tf_rflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(rflags, regs->tf_rflags)) { uprintf("pid %d (%s): sigreturn rflags = 0x%lx\n", p->p_pid, td->td_name, rflags); return (EINVAL); Modified: stable/10/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/10/sys/amd64/ia32/ia32_signal.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/amd64/ia32/ia32_signal.c Mon Nov 25 15:58:48 2013 (r258559) @@ -719,7 +719,7 @@ ofreebsd32_sigreturn(struct thread *td, return (error); scp = ≻ eflags = scp->sc_eflags; - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { return (EINVAL); } if (!CS_SECURE(scp->sc_cs)) { @@ -787,17 +787,7 @@ freebsd4_freebsd32_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { uprintf("pid %d (%s): freebsd4_freebsd32_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -873,17 +863,7 @@ freebsd32_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { uprintf("pid %d (%s): freebsd32_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_sysvec.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/amd64/linux32/linux32_sysvec.c Mon Nov 25 15:58:48 2013 (r258559) @@ -587,17 +587,7 @@ linux_sigreturn(struct thread *td, struc */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) return(EINVAL); /* @@ -689,17 +679,7 @@ linux_rt_sigreturn(struct thread *td, st */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) return(EINVAL); /* Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/i386/i386/machdep.c Mon Nov 25 15:58:48 2013 (r258559) @@ -842,17 +842,7 @@ osigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { return (EINVAL); } @@ -968,17 +958,7 @@ freebsd4_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -1082,17 +1062,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/10/sys/i386/include/vm86.h ============================================================================== --- stable/10/sys/i386/include/vm86.h Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/i386/include/vm86.h Mon Nov 25 15:58:48 2013 (r258559) @@ -113,7 +113,7 @@ struct vm86context { } pmap[VM86_PMAPSIZE]; }; -#define VM_USERCHANGE (PSL_USERCHANGE | PSL_RF) +#define VM_USERCHANGE (PSL_USERCHANGE) #define VME_USERCHANGE (VM_USERCHANGE | PSL_VIP | PSL_VIF) struct vm86_kernel { Modified: stable/10/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysvec.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/i386/linux/linux_sysvec.c Mon Nov 25 15:58:48 2013 (r258559) @@ -684,17 +684,7 @@ linux_sigreturn(struct thread *td, struc */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) return(EINVAL); /* @@ -785,17 +775,7 @@ linux_rt_sigreturn(struct thread *td, st */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) return(EINVAL); /* Modified: stable/10/sys/pc98/pc98/machdep.c ============================================================================== --- stable/10/sys/pc98/pc98/machdep.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/pc98/pc98/machdep.c Mon Nov 25 15:58:48 2013 (r258559) @@ -773,17 +773,7 @@ osigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { return (EINVAL); } @@ -899,17 +889,7 @@ freebsd4_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -1013,17 +993,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/10/sys/x86/include/psl.h ============================================================================== --- stable/10/sys/x86/include/psl.h Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/x86/include/psl.h Mon Nov 25 15:58:48 2013 (r258559) @@ -77,8 +77,16 @@ * is undesirable but it may as well be allowed since users can inflict * it on the kernel directly. Changes to PSL_AC are silently ignored on * 386's. + * + * Users are allowed to change the privileged flag PSL_RF. The cpu sets PSL_RF + * in tf_eflags for faults. Debuggers should sometimes set it there too. + * tf_eflags is kept in the signal context during signal handling and there is + * no other place to remember it, so the PSL_RF bit may be corrupted by the + * signal handler without us knowing. Corruption of the PSL_RF bit at worst + * causes one more or one less debugger trap, so allowing it is fairly + * harmless. */ #define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \ - | PSL_D | PSL_V | PSL_NT | PSL_AC | PSL_ID) + | PSL_D | PSL_V | PSL_NT | PSL_RF | PSL_AC | PSL_ID) #endif /* !_MACHINE_PSL_H_ */ From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 16:31:31 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAB31E3C; Mon, 25 Nov 2013 16:31:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F30325EC; Mon, 25 Nov 2013 16:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPGVV97017287; Mon, 25 Nov 2013 16:31:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPGVVdU017286; Mon, 25 Nov 2013 16:31:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251631.rAPGVVdU017286@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 16:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258563 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 16:31:31 -0000 Author: avg Date: Mon Nov 25 16:31:31 2013 New Revision: 258563 URL: http://svnweb.freebsd.org/changeset/base/258563 Log: MFC r258353: zfs page_busy: fix the boundaries of the cleared range This is a fix for a regression introduced in r246293. vm_page_clear_dirty expects the range to have DEV_BSIZE aligned boundaries, otherwise it extends them. Thus it can happen that the whole page is marked clean while actually having some small dirty region(s). This commit makes the range properly aligned and ensures that only the clean data is marked as such. It would interesting to evaluate how much benefit clearing with DEV_BSIZE granularity produces. Perhaps instead we should clear the whole page when it is completely overwritten and don't bother clearing any bits if only a portion a page is written. Reviewed by: kib Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 16:19:21 2013 (r258562) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 16:31:31 2013 (r258563) @@ -329,6 +329,20 @@ page_busy(vnode_t *vp, int64_t start, in { vm_object_t obj; vm_page_t pp; + int64_t end; + + /* + * At present vm_page_clear_dirty extends the cleared range to DEV_BSIZE + * aligned boundaries, if the range is not aligned. As a result a + * DEV_BSIZE subrange with partially dirty data may get marked as clean. + * It may happen that all DEV_BSIZE subranges are marked clean and thus + * the whole page would be considred clean despite have some dirty data. + * For this reason we should shrink the range to DEV_BSIZE aligned + * boundaries before calling vm_page_clear_dirty. + */ + end = rounddown2(off + nbytes, DEV_BSIZE); + off = roundup2(off, DEV_BSIZE); + nbytes = end - off; obj = vp->v_object; zfs_vmobject_assert_wlocked(obj); @@ -363,7 +377,8 @@ page_busy(vnode_t *vp, int64_t start, in ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); vm_object_pip_add(obj, 1); pmap_remove_write(pp); - vm_page_clear_dirty(pp, off, nbytes); + if (nbytes != 0) + vm_page_clear_dirty(pp, off, nbytes); } break; } From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 17:19:05 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE1B9277; Mon, 25 Nov 2013 17:19:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBD302979; Mon, 25 Nov 2013 17:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPHJ587032555; Mon, 25 Nov 2013 17:19:05 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPHJ5Yo032554; Mon, 25 Nov 2013 17:19:05 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251719.rAPHJ5Yo032554@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 17:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258565 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 17:19:05 -0000 Author: avg Date: Mon Nov 25 17:19:05 2013 New Revision: 258565 URL: http://svnweb.freebsd.org/changeset/base/258565 Log: MFV r258377: 4088 use after free in arc_release() illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772 Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 16:44:02 2013 (r258564) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 17:19:05 2013 (r258565) @@ -3540,6 +3540,7 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { mutex_enter(&l2arc_buflist_mtx); hdr->b_l2hdr = NULL; + list_remove(l2hdr->b_dev->l2ad_buflist, hdr); } buf_size = hdr->b_size; @@ -3627,7 +3628,6 @@ arc_release(arc_buf_t *buf, void *tag) ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); trim_map_free(l2hdr->b_dev->l2ad_vdev, l2hdr->b_daddr, hdr->b_size, 0); - list_remove(l2hdr->b_dev->l2ad_buflist, hdr); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); ARCSTAT_INCR(arcstat_l2_size, -buf_size); mutex_exit(&l2arc_buflist_mtx); From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 17:30:19 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 013C872A; Mon, 25 Nov 2013 17:30:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5AC72A77; Mon, 25 Nov 2013 17:30:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPHUIFb037667; Mon, 25 Nov 2013 17:30:18 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPHUIaK037666; Mon, 25 Nov 2013 17:30:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251730.rAPHUIaK037666@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 17:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258566 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 17:30:19 -0000 Author: avg Date: Mon Nov 25 17:30:18 2013 New Revision: 258566 URL: http://svnweb.freebsd.org/changeset/base/258566 Log: MFV r258378: 4089 NULL pointer dereference in arc_read() illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea Tested by: adrian Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 17:19:05 2013 (r258565) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 17:30:18 2013 (r258566) @@ -20,9 +20,9 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ /* @@ -3173,6 +3173,8 @@ top: vdev_t *vd = NULL; uint64_t addr = 0; boolean_t devw = B_FALSE; + enum zio_compress b_compress = ZIO_COMPRESS_OFF; + uint64_t b_asize = 0; if (hdr == NULL) { /* this block is not in the cache */ @@ -3242,10 +3244,12 @@ top: hdr->b_acb = acb; hdr->b_flags |= ARC_IO_IN_PROGRESS; - if (HDR_L2CACHE(hdr) && hdr->b_l2hdr != NULL && + if (hdr->b_l2hdr != NULL && (vd = hdr->b_l2hdr->b_dev->l2ad_vdev) != NULL) { devw = hdr->b_l2hdr->b_dev->l2ad_writing; addr = hdr->b_l2hdr->b_daddr; + b_compress = hdr->b_l2hdr->b_compress; + b_asize = hdr->b_l2hdr->b_asize; /* * Lock out device removal. */ @@ -3296,7 +3300,7 @@ top: cb->l2rcb_bp = *bp; cb->l2rcb_zb = *zb; cb->l2rcb_flags = zio_flags; - cb->l2rcb_compress = hdr->b_l2hdr->b_compress; + cb->l2rcb_compress = b_compress; ASSERT(addr >= VDEV_LABEL_START_SIZE && addr + size < vd->vdev_psize - @@ -3308,8 +3312,7 @@ top: * Issue a null zio if the underlying buffer * was squashed to zero size by compression. */ - if (hdr->b_l2hdr->b_compress == - ZIO_COMPRESS_EMPTY) { + if (b_compress == ZIO_COMPRESS_EMPTY) { rzio = zio_null(pio, spa, vd, l2arc_read_done, cb, zio_flags | ZIO_FLAG_DONT_CACHE | @@ -3318,8 +3321,8 @@ top: ZIO_FLAG_DONT_RETRY); } else { rzio = zio_read_phys(pio, vd, addr, - hdr->b_l2hdr->b_asize, - buf->b_data, ZIO_CHECKSUM_OFF, + b_asize, buf->b_data, + ZIO_CHECKSUM_OFF, l2arc_read_done, cb, priority, zio_flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_CANFAIL | @@ -3328,8 +3331,7 @@ top: } DTRACE_PROBE2(l2arc__read, vdev_t *, vd, zio_t *, rzio); - ARCSTAT_INCR(arcstat_l2_read_bytes, - hdr->b_l2hdr->b_asize); + ARCSTAT_INCR(arcstat_l2_read_bytes, b_asize); if (*arc_flags & ARC_NOWAIT) { zio_nowait(rzio); From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 20:39:11 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30F7FB02; Mon, 25 Nov 2013 20:39:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF1627E2; Mon, 25 Nov 2013 20:39:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKdAOH026000; Mon, 25 Nov 2013 20:39:10 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKdAUA025995; Mon, 25 Nov 2013 20:39:10 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311252039.rAPKdAUA025995@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 25 Nov 2013 20:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258593 - in stable/10/release/doc: de_DE.ISO8859-1/readme en_US.ISO8859-1/readme ru_RU.KOI8-R/readme zh_CN.GB2312/readme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:39:11 -0000 Author: rodrigc Date: Mon Nov 25 20:39:09 2013 New Revision: 258593 URL: http://svnweb.freebsd.org/changeset/base/258593 Log: MFC 258570 Change sysinstall.8 references to bsdinstall.8. Submitted by: skreuzer Approved by: re (delphij) Modified: stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml stable/10/release/doc/en_US.ISO8859-1/readme/article.xml stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml stable/10/release/doc/zh_CN.GB2312/readme/article.xml Directory Properties: stable/10/release/ (props changed) stable/10/release/doc/ (props changed) Modified: stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -390,13 +390,13 @@ gehört, steht immer am Anfang des Textes. - Auf den Plattformen, auf denen &man.sysinstall.8; zur + Auf den Plattformen, auf denen &man.bsdinstall.8; zur Verfügung steht (zur Zeit alpha, i386, ia64, pc98 und sparc64) finden Sie diese Dokumente während der Installation normalerweise unter dem Menüpunkt Dokumentation. Um nach der Installation des Systems dieses Menü zugreifen zu können, müssen Sie das - Programm &man.sysinstall.8; erneut aufrufen. + Programm &man.bsdinstall.8; erneut aufrufen. Sie sollten auf jeden Fall die Errata zur jeweiligen Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -324,11 +324,11 @@ - On platforms that support &man.sysinstall.8; (currently + On platforms that support &man.bsdinstall.8; (currently &arch.amd64;, &arch.i386;, &arch.ia64;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the Documentation menu during installation. Once the system is installed, you can revisit this menu by re-running the - &man.sysinstall.8; utility. + &man.bsdinstall.8; utility. It is extremely important to read the errata for any Modified: stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml ============================================================================== --- stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -347,12 +347,12 @@ - îÁ ÐÌÁÔÆÏÒÍÁÈ, ËÏÔÏÒÙÅ ÐÏÄÄÅÒÖÉ×ÁÀÔ &man.sysinstall.8; (× + îÁ ÐÌÁÔÆÏÒÍÁÈ, ËÏÔÏÒÙÅ ÐÏÄÄÅÒÖÉ×ÁÀÔ &man.bsdinstall.8; (× ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ alpha, &i386;, ia64, pc98, É &sparc64;), ÜÔÉ ÄÏËÕÍÅÎÔÙ ÏÂÙÞÎÏ ÄÏÓÔÕÐÎÙ ÞÅÒÅÚ ÍÅÎÀ Documentation ×Ï ×ÒÅÍÑ ÕÓÔÁÎÏ×ËÉ. ëÁË ÔÏÌØËÏ ÓÉÓÔÅÍÁ ÂÕÄÅÔ ÕÓÔÁÎÏ×ÌÅÎÁ, ×Ù ÍÏÖÅÔÅ ÐÏ×ÔÏÒÎÏ ×ÏÊÔÉ × ÜÔÏ ÍÅÎÀ, ÐÏ×ÔÏÒÎÏ ÚÁÐÕÓÔÉ× - &man.sysinstall.8;. + &man.bsdinstall.8;. ëÒÁÊÎÅ ×ÁÖÎÏ ÐÒÏÞÅÓÔØ ÓÐÉÓÏË ÐÒÏÂÌÅÍ ÌÀÂÏÇÏ ÓÕÝÅÓÔ×ÕÀÝÅÇÏ Modified: stable/10/release/doc/zh_CN.GB2312/readme/article.xml ============================================================================== --- stable/10/release/doc/zh_CN.GB2312/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/zh_CN.GB2312/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -302,11 +302,11 @@ - ÔÚÖ§³Ö &man.sysinstall.8; µÄƽ̨ÉÏ (Ä¿Ç°ÓÐ + ÔÚÖ§³Ö &man.bsdinstall.8; µÄƽ̨ÉÏ (Ä¿Ç°ÓÐ &arch.amd64;¡¢ &arch.i386;¡¢ &arch.ia64;¡¢ &arch.pc98; ÒÔ¼° &arch.sparc64;)£¬ ÕâЩÎĵµÔÚ°²×°Ê±¶¼¿ÉÒÔͨ¹ý Documentation ²Ëµ¥·ÃÎÊ¡£ Ò»µ©ÏµÍ³ÒѾ­°²×°£¬Äú¿ÉÒÔͨ¹ýÖØÐÂÔËÐÐ - &man.sysinstall.8; ¹¤¾ßÀ´ÖØзÃÎʲ˵¥¡£ + &man.bsdinstall.8; ¹¤¾ßÀ´ÖØзÃÎʲ˵¥¡£ ÔÚ°²×°ÄúÄõ½µÄÈκη¢Ðаæ֮ǰÔĶÁ¿±ÎóÊǷdz£ÖØÒªµÄ£¬ From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 20:47:38 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05DBDE0F; Mon, 25 Nov 2013 20:47:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8D5F284F; Mon, 25 Nov 2013 20:47:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKlbYi029220; Mon, 25 Nov 2013 20:47:37 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKlbFE029219; Mon, 25 Nov 2013 20:47:37 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201311252047.rAPKlbFE029219@svn.freebsd.org> From: Steven Hartland Date: Mon, 25 Nov 2013 20:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258595 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:47:38 -0000 Author: smh Date: Mon Nov 25 20:47:37 2013 New Revision: 258595 URL: http://svnweb.freebsd.org/changeset/base/258595 Log: MFC r258294: Fix ZFS deadlock when sending a snapshot which is mounted. Approved by: re (glebius) Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Mon Nov 25 20:45:30 2013 (r258594) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Mon Nov 25 20:47:37 2013 (r258595) @@ -564,21 +564,23 @@ dsl_dataset_user_release_impl(nvlist_t * ddura.ddura_holdfunc = dsl_dataset_hold_obj_string; pool = spa_name(tmpdp->dp_spa); #ifdef _KERNEL - dsl_pool_config_enter(tmpdp, FTAG); for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; pair = nvlist_next_nvpair(holds, pair)) { dsl_dataset_t *ds; + dsl_pool_config_enter(tmpdp, FTAG); error = dsl_dataset_hold_obj_string(tmpdp, nvpair_name(pair), FTAG, &ds); if (error == 0) { char name[MAXNAMELEN]; dsl_dataset_name(ds, name); + dsl_pool_config_exit(tmpdp, FTAG); dsl_dataset_rele(ds, FTAG); (void) zfs_unmount_snap(name); + } else { + dsl_pool_config_exit(tmpdp, FTAG); } } - dsl_pool_config_exit(tmpdp, FTAG); #endif } else { /* Non-temporary holds are specified by name. */ From owner-svn-src-stable-10@FreeBSD.ORG Mon Nov 25 22:56:46 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 901E4EA3; Mon, 25 Nov 2013 22:56:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F19E2045; Mon, 25 Nov 2013 22:56:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPMukbR074056; Mon, 25 Nov 2013 22:56:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPMukkv074055; Mon, 25 Nov 2013 22:56:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311252256.rAPMukkv074055@svn.freebsd.org> From: Dimitry Andric Date: Mon, 25 Nov 2013 22:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258607 - stable/10/contrib/llvm/lib/Analysis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 22:56:46 -0000 Author: dim Date: Mon Nov 25 22:56:46 2013 New Revision: 258607 URL: http://svnweb.freebsd.org/changeset/base/258607 Log: MFC r258350: Pull in r191896 from upstream llvm trunk: CaptureTracking: Plug a loophole in the "too many uses" heuristic. The heuristic was added to avoid spending too much compile time in a specially crafted test case (PR17461, PR16474) with many uses on a select or bitcast instruction can still trigger the slow case. Add a check for that case. This only affects compile time, don't have a good way to test it. This fixes the excessive compile time spent on a specific file of the graphics/rawtherapee port. Reported by: mandree Approved by: re (gjb) Modified: stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp Directory Properties: stable/10/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp Mon Nov 25 22:55:47 2013 (r258606) +++ stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp Mon Nov 25 22:56:46 2013 (r258607) @@ -146,8 +146,14 @@ void llvm::PointerMayBeCaptured(const Va case Instruction::PHI: case Instruction::Select: // The original value is not captured via this if the new value isn't. + Count = 0; for (Instruction::use_iterator UI = I->use_begin(), UE = I->use_end(); UI != UE; ++UI) { + // If there are lots of uses, conservatively say that the value + // is captured to avoid taking too much compile time. + if (Count++ >= Threshold) + return Tracker->tooManyUses(); + Use *U = &UI.getUse(); if (Visited.insert(U)) if (Tracker->shouldExplore(U)) From owner-svn-src-stable-10@FreeBSD.ORG Tue Nov 26 08:46:40 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EFEBC98; Tue, 26 Nov 2013 08:46:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E58E2C21; Tue, 26 Nov 2013 08:46:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8kd5X080224; Tue, 26 Nov 2013 08:46:39 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8kd9l080223; Tue, 26 Nov 2013 08:46:39 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201311260846.rAQ8kd9l080223@svn.freebsd.org> From: John-Mark Gurney Date: Tue, 26 Nov 2013 08:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258623 - stable/10/sys/crypto/aesni X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:46:40 -0000 Author: jmg Date: Tue Nov 26 08:46:39 2013 New Revision: 258623 URL: http://svnweb.freebsd.org/changeset/base/258623 Log: MFC r258399,258492: mark aesni module _SYNC, improves performance ~27%... Approved by: re (glebius) Modified: stable/10/sys/crypto/aesni/aesni.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/crypto/aesni/aesni.c ============================================================================== --- stable/10/sys/crypto/aesni/aesni.c Tue Nov 26 08:46:27 2013 (r258622) +++ stable/10/sys/crypto/aesni/aesni.c Tue Nov 26 08:46:39 2013 (r258623) @@ -92,7 +92,8 @@ aesni_attach(device_t dev) sc = device_get_softc(dev); TAILQ_INIT(&sc->sessions); sc->sid = 1; - sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE); + sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | + CRYPTOCAP_F_SYNC); if (sc->cid < 0) { device_printf(dev, "Could not get crypto driver id.\n"); return (ENOMEM); From owner-svn-src-stable-10@FreeBSD.ORG Tue Nov 26 14:50:39 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7DA6B6A; Tue, 26 Nov 2013 14:50:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C6E7623E3; Tue, 26 Nov 2013 14:50:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQEod4R007419; Tue, 26 Nov 2013 14:50:39 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQEodOG007418; Tue, 26 Nov 2013 14:50:39 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201311261450.rAQEodOG007418@svn.freebsd.org> From: "Justin T. Gibbs" Date: Tue, 26 Nov 2013 14:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258650 - stable/10/sys/dev/xen/blkfront X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 14:50:39 -0000 Author: gibbs Date: Tue Nov 26 14:50:39 2013 New Revision: 258650 URL: http://svnweb.freebsd.org/changeset/base/258650 Log: [Forced commit to correct checkin comment for r256757] MFC: r256423 Allow FreeBSD to be booted from CDROM media on XenServer 6.2 and prior releases. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (gjb) sys/dev/xen/blkfront/blkfront.c: On XenServer versions up to an including 6.2, paravirtualized CDROM support is broken. When running in an HVM domain, ignore paravirtualized instances of CDROM media, and instead rely on native drivers attaching to emulated hardware. This functions correctly on all currently known Xen based platforms. ------------------------------------------------------------------------ Modified: stable/10/sys/dev/xen/blkfront/blkfront.c Modified: stable/10/sys/dev/xen/blkfront/blkfront.c ============================================================================== From owner-svn-src-stable-10@FreeBSD.ORG Tue Nov 26 16:12:41 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 409A6245; Tue, 26 Nov 2013 16:12:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EFB92A0B; Tue, 26 Nov 2013 16:12:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQGCf2v037945; Tue, 26 Nov 2013 16:12:41 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQGCeKt037941; Tue, 26 Nov 2013 16:12:40 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201311261612.rAQGCeKt037941@svn.freebsd.org> From: Brooks Davis Date: Tue, 26 Nov 2013 16:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258655 - stable/10/contrib/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 16:12:41 -0000 Author: brooks Date: Tue Nov 26 16:12:40 2013 New Revision: 258655 URL: http://svnweb.freebsd.org/changeset/base/258655 Log: MFC r258437: Sync with NetBSD. The functional change is to make the output when comparing a directory to an mtree file more compatible with fmtree when FreeBSD 9 compatiblity mode is on. This output is clearly intended for humans not computers, but some tools such as mergemaster's -U option rely on it. Approved by: re (glebius) Modified: stable/10/contrib/mtree/compare.c stable/10/contrib/mtree/create.c stable/10/contrib/mtree/spec.c Directory Properties: stable/10/contrib/mtree/ (props changed) Modified: stable/10/contrib/mtree/compare.c ============================================================================== --- stable/10/contrib/mtree/compare.c Tue Nov 26 15:23:56 2013 (r258654) +++ stable/10/contrib/mtree/compare.c Tue Nov 26 16:12:40 2013 (r258655) @@ -1,4 +1,4 @@ -/* $NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $ */ +/* $NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $"); +__RCSID("$NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $"); #endif #endif /* not lint */ @@ -47,8 +47,8 @@ __RCSID("$NetBSD: compare.c,v 1.56 2013/ #include #include -#include #include +#include #include #include #include @@ -72,13 +72,18 @@ __RCSID("$NetBSD: compare.c,v 1.56 2013/ #define INDENTNAMELEN 8 #define MARK \ do { \ - len = printf("%s: ", RP(p)); \ - if (len > INDENTNAMELEN) { \ + if (flavor == F_FREEBSD9) { \ + len = printf("%s changed\n", RP(p)); \ tab = "\t"; \ - printf("\n"); \ } else { \ - tab = ""; \ - printf("%*s", INDENTNAMELEN - (int)len, ""); \ + len = printf("%s: ", RP(p)); \ + if (len > INDENTNAMELEN) { \ + tab = "\t"; \ + printf("\n"); \ + } else { \ + tab = ""; \ + printf("%*s", INDENTNAMELEN - (int)len, ""); \ + } \ } \ } while (0) #define LABEL if (!label++) MARK @@ -171,7 +176,8 @@ compare(NODE *s, FTSENT *p) break; #endif typeerr: LABEL; - printf("\ttype (%s, %s)\n", + printf(flavor == F_FREEBSD9 ? + "\ttype expected %s found %s\n" : "\ttype (%s, %s)\n", nodetype(s->type), inotype(p->fts_statp->st_mode)); return (label); } @@ -193,7 +199,9 @@ typeerr: LABEL; (s->type == F_BLOCK || s->type == F_CHAR) && s->st_rdev != p->fts_statp->st_rdev) { LABEL; - printf("%sdevice (%#jx, %#jx", + printf(flavor == F_FREEBSD9 ? + "%sdevice expected %#jx found %#jx" : + "%sdevice (%#jx, %#jx", tab, (uintmax_t)s->st_rdev, (uintmax_t)p->fts_statp->st_rdev); if (uflag) { @@ -203,10 +211,12 @@ typeerr: LABEL; s->st_rdev) == -1) || (lchown(p->fts_accpath, p->fts_statp->st_uid, p->fts_statp->st_gid) == -1) ) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); tab = "\t"; @@ -214,28 +224,34 @@ typeerr: LABEL; /* Set the uid/gid first, then set the mode. */ if (s->flags & (F_UID | F_UNAME) && s->st_uid != p->fts_statp->st_uid) { LABEL; - printf("%suser (%lu, %lu", + printf(flavor == F_FREEBSD9 ? + "%suser expected %lu found %lu" : "%suser (%lu, %lu", tab, (u_long)s->st_uid, (u_long)p->fts_statp->st_uid); if (uflag) { if (lchown(p->fts_accpath, s->st_uid, -1)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); tab = "\t"; } if (s->flags & (F_GID | F_GNAME) && s->st_gid != p->fts_statp->st_gid) { LABEL; - printf("%sgid (%lu, %lu", + printf(flavor == F_FREEBSD9 ? + "%sgid expected %lu found %lu" : "%sgid (%lu, %lu", tab, (u_long)s->st_gid, (u_long)p->fts_statp->st_gid); if (uflag) { if (lchown(p->fts_accpath, -1, s->st_gid)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); @@ -260,15 +276,19 @@ typeerr: LABEL; } LABEL; - printf("%spermissions (%#lo, %#lo", + printf(flavor == F_FREEBSD9 ? + "%spermissions expcted %#lo found %#lo" : + "%spermissions (%#lo, %#lo", tab, (u_long)s->st_mode, (u_long)p->fts_statp->st_mode & MBITS); if (uflag) { if (lchmod(p->fts_accpath, s->st_mode)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); @@ -278,13 +298,16 @@ typeerr: LABEL; if (s->flags & F_NLINK && s->type != F_DIR && s->st_nlink != p->fts_statp->st_nlink) { LABEL; - printf("%slink count (%lu, %lu)\n", + printf(flavor == F_FREEBSD9 ? + "%slink count expected %lu found %lu\n" : + "%slink count (%lu, %lu)\n", tab, (u_long)s->st_nlink, (u_long)p->fts_statp->st_nlink); tab = "\t"; } if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) { LABEL; - printf("%ssize (%ju, %ju)\n", + printf(flavor == F_FREEBSD9 ? + "%ssize expected %ju found %ju\n" : "%ssize (%ju, %ju)\n", tab, (uintmax_t)s->st_size, (uintmax_t)p->fts_statp->st_size); tab = "\t"; @@ -319,18 +342,22 @@ typeerr: LABEL; if (tv[0].tv_sec != tv[1].tv_sec || tv[0].tv_usec != tv[1].tv_usec) { LABEL; - printf("%smodification time (%.24s, ", + printf(flavor == F_FREEBSD9 ? + "%smodification time expected %.24s found " : + "%smodification time (%.24s, ", tab, ctime(&smtime)); printf("%.24s", ctime(&pmtime)); if (tflag) { tv[1] = tv[0]; if (utimes(p->fts_accpath, tv)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else - printf(")\n"); + printf("%s\n", flavor == F_FREEBSD9 ? "" : ")"); tab = "\t"; } } @@ -347,7 +374,9 @@ typeerr: LABEL; char *f_s; LABEL; f_s = flags_to_string(s->st_flags, "none"); - printf("%sflags (\"%s\" is not ", tab, f_s); + printf(flavor == F_FREEBSD9 ? + "%sflags expected \"%s\" found " : + "%sflags (\"%s\" is not ", tab, f_s); free(f_s); f_s = flags_to_string(p->fts_statp->st_flags, "none"); printf("\"%s\"", f_s); @@ -361,7 +390,7 @@ typeerr: LABEL; else SETFLAGS(0, (~SP_FLGS & CH_MASK)); } else - printf(")\n"); + printf("%s\n", flavor == F_FREEBSD9 ? "" : ")"); tab = "\t"; } #endif /* HAVE_STRUCT_STAT_ST_FLAGS */ @@ -387,7 +416,9 @@ typeerr: LABEL; close(fd); if (s->cksum != val) { LABEL; - printf("%scksum (%lu, %lu)\n", + printf(flavor == F_FREEBSD9 ? + "%scksum expected %lu found %lu\n" : + "%scksum (%lu, %lu)\n", tab, s->cksum, (unsigned long)val); } tab = "\t"; @@ -403,7 +434,9 @@ typeerr: LABEL; } else { if (strcmp(s->md5digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, MD5KEY, s->md5digest, digestbuf); } tab = "\t"; @@ -421,7 +454,9 @@ typeerr: LABEL; } else { if (strcmp(s->rmd160digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, RMD160KEY, s->rmd160digest, digestbuf); } tab = "\t"; @@ -439,7 +474,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha1digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA1KEY, s->sha1digest, digestbuf); } tab = "\t"; @@ -457,7 +494,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha256digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA256KEY, s->sha256digest, digestbuf); } tab = "\t"; @@ -474,7 +513,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha384digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA384KEY, s->sha384digest, digestbuf); } tab = "\t"; @@ -491,7 +532,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha512digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA512KEY, s->sha512digest, digestbuf); } tab = "\t"; @@ -502,16 +545,20 @@ typeerr: LABEL; if (s->flags & F_SLINK && strcmp(cp = rlink(p->fts_accpath), s->slink)) { LABEL; - printf("%slink ref (%s, %s", tab, cp, s->slink); + printf(flavor == F_FREEBSD9 ? + "%slink ref expected %s found %s" : + "%slink ref (%s, %s", tab, cp, s->slink); if (uflag) { if ((unlink(p->fts_accpath) == -1) || (symlink(s->slink, p->fts_accpath) == -1) ) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else - printf(")\n"); + printf("%s\n", flavor == F_FREEBSD9 ? "" : ")"); } return (label); } Modified: stable/10/contrib/mtree/create.c ============================================================================== --- stable/10/contrib/mtree/create.c Tue Nov 26 15:23:56 2013 (r258654) +++ stable/10/contrib/mtree/create.c Tue Nov 26 16:12:40 2013 (r258655) @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $ */ +/* $NetBSD: create.c,v 1.72 2013/10/17 17:22:59 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.72 2013/10/17 17:22:59 christos Exp $"); #endif #endif /* not lint */ @@ -53,9 +53,9 @@ __RCSID("$NetBSD: create.c,v 1.71 2013/1 #include #include #include -#include #include #include +#include #include #include #include Modified: stable/10/contrib/mtree/spec.c ============================================================================== --- stable/10/contrib/mtree/spec.c Tue Nov 26 15:23:56 2013 (r258654) +++ stable/10/contrib/mtree/spec.c Tue Nov 26 16:12:40 2013 (r258655) @@ -1,4 +1,4 @@ -/* $NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $ */ +/* $NetBSD: spec.c,v 1.88 2013/10/17 17:22:59 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -67,7 +67,7 @@ #if 0 static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $"); +__RCSID("$NetBSD: spec.c,v 1.88 2013/10/17 17:22:59 christos Exp $"); #endif #endif /* not lint */ @@ -80,8 +80,8 @@ __RCSID("$NetBSD: spec.c,v 1.87 2013/10/ #include #include #include -#include #include +#include #include #include #include From owner-svn-src-stable-10@FreeBSD.ORG Tue Nov 26 16:13:49 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23FE93A0; Tue, 26 Nov 2013 16:13:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 131422A22; Tue, 26 Nov 2013 16:13:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQGDmg6038254; Tue, 26 Nov 2013 16:13:48 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQGDm3J038253; Tue, 26 Nov 2013 16:13:48 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201311261613.rAQGDm3J038253@svn.freebsd.org> From: Brooks Davis Date: Tue, 26 Nov 2013 16:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258657 - stable/10/usr.sbin/mergemaster X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 16:13:49 -0000 Author: brooks Date: Tue Nov 26 16:13:48 2013 New Revision: 258657 URL: http://svnweb.freebsd.org/changeset/base/258657 Log: MFC: r258456 Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is nmtree. The mtree output used by mergemaster in this case was clearly not meant for computer consumption and an approach based on -f -f would probably be a better idea, but this is a minimal change. Approved by: re (glebius) Modified: stable/10/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/10/usr.sbin/mergemaster/ (props changed) Modified: stable/10/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/10/usr.sbin/mergemaster/mergemaster.sh Tue Nov 26 16:13:38 2013 (r258656) +++ stable/10/usr.sbin/mergemaster/mergemaster.sh Tue Nov 26 16:13:48 2013 (r258657) @@ -492,8 +492,14 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCED # files the user changed from the reference files. # if [ -n "${AUTO_UPGRADE}" -a -s "${MTREEFILE}" ]; then + # Force FreeBSD 9 compatible output when available. + if mtree -F freebsd9 -c -p /var/empty/ > /dev/null 2>&1; then + MTREE_FLAVOR="-F freebsd9" + else + MTREE_FLAVOR= + fi CHANGED=: - for file in `mtree -eqL -f ${MTREEFILE} -p ${DESTDIR}/ \ + for file in `mtree -eqL ${MTREE_FLAVOR} -f ${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED}${DESTDIR}/${file}:" From owner-svn-src-stable-10@FreeBSD.ORG Thu Nov 28 09:30:06 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA167A2C; Thu, 28 Nov 2013 09:30:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A86B1070; Thu, 28 Nov 2013 09:30:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAS9U6Qs066586; Thu, 28 Nov 2013 09:30:06 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAS9U59h066580; Thu, 28 Nov 2013 09:30:05 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311280930.rAS9U59h066580@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Thu, 28 Nov 2013 09:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258706 - stable/10/sys/dev/drm2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 09:30:06 -0000 Author: dumbbell Date: Thu Nov 28 09:30:05 2013 New Revision: 258706 URL: http://svnweb.freebsd.org/changeset/base/258706 Log: MFC r258262: drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability This fixes DPMS with KDE and radeonkms. Without this, the display would freeze when the monitor is put into sleep state, and only resumes after several dozens of minutes once the monitor is powered on again. Tested by: Mathias Picker Approved by: re (kib) Modified: stable/10/sys/dev/drm2/drm.h stable/10/sys/dev/drm2/drmP.h stable/10/sys/dev/drm2/drm_drv.c stable/10/sys/dev/drm2/drm_ioctl.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/drm2/drm.h ============================================================================== --- stable/10/sys/dev/drm2/drm.h Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drm.h Thu Nov 28 09:30:05 2013 (r258706) @@ -1015,6 +1015,8 @@ struct drm_event_vblank { #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 +#define DRM_CAP_PRIME 0x5 +#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 #include "drm_mode.h" Modified: stable/10/sys/dev/drm2/drmP.h ============================================================================== --- stable/10/sys/dev/drm2/drmP.h Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drmP.h Thu Nov 28 09:30:05 2013 (r258706) @@ -1067,6 +1067,7 @@ extern int drm_debug_flag; extern int drm_notyet_flag; extern unsigned int drm_vblank_offdelay; extern unsigned int drm_timestamp_precision; +extern unsigned int drm_timestamp_monotonic; /* Device setup support (drm_drv.c) */ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist); Modified: stable/10/sys/dev/drm2/drm_drv.c ============================================================================== --- stable/10/sys/dev/drm2/drm_drv.c Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drm_drv.c Thu Nov 28 09:30:05 2013 (r258706) @@ -56,6 +56,12 @@ int drm_notyet_flag = 0; unsigned int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */ unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */ +/* + * Default to use monotonic timestamps for wait-for-vblank and page-flip + * complete events. + */ +unsigned int drm_timestamp_monotonic = 1; + static int drm_load(struct drm_device *dev); static void drm_unload(struct drm_device *dev); static drm_pci_id_list_t *drm_find_description(int vendor, int device, Modified: stable/10/sys/dev/drm2/drm_ioctl.c ============================================================================== --- stable/10/sys/dev/drm2/drm_ioctl.c Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drm_ioctl.c Thu Nov 28 09:30:05 2013 (r258706) @@ -250,6 +250,9 @@ int drm_getcap(struct drm_device *dev, v case DRM_CAP_DUMB_PREFER_SHADOW: req->value = dev->mode_config.prefer_shadow; break; + case DRM_CAP_TIMESTAMP_MONOTONIC: + req->value = drm_timestamp_monotonic; + break; default: return EINVAL; } From owner-svn-src-stable-10@FreeBSD.ORG Thu Nov 28 10:04:53 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF9AA69B; Thu, 28 Nov 2013 10:04:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FAF812AD; Thu, 28 Nov 2013 10:04:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASA4rO8079142; Thu, 28 Nov 2013 10:04:53 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASA4rwY079141; Thu, 28 Nov 2013 10:04:53 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311281004.rASA4rwY079141@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Thu, 28 Nov 2013 10:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258707 - stable/10/sys/dev/drm2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 10:04:54 -0000 Author: dumbbell Date: Thu Nov 28 10:04:53 2013 New Revision: 258707 URL: http://svnweb.freebsd.org/changeset/base/258707 Log: MFC r258549 and r258553: drm: Dereference pointers given to qsort_r()'s cmp callback drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the array passed to qsort_r(), not the elements themselves. Before this fix, the use of qsort_r() shuffled the array, not sorted it, because the compare callback accessed random memory locations, not the expected elements. This bug triggered an infinite loop in KDE/xserver: 1. KDE has a kded module called "randrmonitor" which queries xserver for current monitors at startup and then listens to RandR notifications from xserver. 2. xserver handles the query from "randrmonitor" by polling the video device using the "drm_mode_getconnector()" ioctl. This ioctl returns a list of connectors and, for those with a connected monitor, the available modes. Each modes list is sorted by the kernel before returning. When xserver gets the connectors list, it sorts the modes lists again. In the case of this bug, when two modes are equal (in xserver's compare function PoV), their order is kept stable (ie. the kernel order is kept for those two modes). And because the list was shuffled by the kernel, the order of two equal modes was frequently changed in the final modes list in xserver. 3. xserver compares the returned connectors list with the list obtained earlier. In particular, it compares the sorted modes lists for each connector. If a property of a connector changes (eg. modes), xserver sends a "RRNotify_OutputChange" notification. Because of the change of order between equal modes, xserver sent a notification after each polling of the connectors. 4. "randrmonitor" receives a notification, triggered by its query. The notification doesn't contain the new connectors list, therefore, it asks for the new list using the same function: go back to step #2. Approved by: re (kib) Modified: stable/10/sys/dev/drm2/drm_linux_list_sort.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/drm2/drm_linux_list_sort.c ============================================================================== --- stable/10/sys/dev/drm2/drm_linux_list_sort.c Thu Nov 28 09:30:05 2013 (r258706) +++ stable/10/sys/dev/drm2/drm_linux_list_sort.c Thu Nov 28 10:04:53 2013 (r258707) @@ -42,8 +42,8 @@ drm_le_cmp(void *priv, const void *d1, c struct drm_list_sort_thunk *thunk; thunk = priv; - le1 = __DECONST(struct list_head *, d1); - le2 = __DECONST(struct list_head *, d2); + le1 = *(__DECONST(struct list_head **, d1)); + le2 = *(__DECONST(struct list_head **, d2)); return ((thunk->cmp)(thunk->priv, le1, le2)); } From owner-svn-src-stable-10@FreeBSD.ORG Thu Nov 28 14:24:27 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31D54D51; Thu, 28 Nov 2013 14:24:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DC6810CD; Thu, 28 Nov 2013 14:24:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASEOQsJ067545; Thu, 28 Nov 2013 14:24:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASEOQ3A067544; Thu, 28 Nov 2013 14:24:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311281424.rASEOQ3A067544@svn.freebsd.org> From: Glen Barber Date: Thu, 28 Nov 2013 14:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258710 - stable/10/etc/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 14:24:27 -0000 Author: gjb Date: Thu Nov 28 14:24:26 2013 New Revision: 258710 URL: http://svnweb.freebsd.org/changeset/base/258710 Log: MFC r258227 (bapt): Enabled should be a boolean, not a string Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/pkg/FreeBSD.conf Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/etc/pkg/FreeBSD.conf ============================================================================== --- stable/10/etc/pkg/FreeBSD.conf Thu Nov 28 11:06:18 2013 (r258709) +++ stable/10/etc/pkg/FreeBSD.conf Thu Nov 28 14:24:26 2013 (r258710) @@ -4,5 +4,5 @@ FreeBSD: { mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", - enabled: "yes" + enabled: yes } From owner-svn-src-stable-10@FreeBSD.ORG Thu Nov 28 22:06:38 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31CBCBFB; Thu, 28 Nov 2013 22:06:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C52717CB; Thu, 28 Nov 2013 22:06:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASM6bPC024930; Thu, 28 Nov 2013 22:06:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASM6bvg024929; Thu, 28 Nov 2013 22:06:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311282206.rASM6bvg024929@svn.freebsd.org> From: Xin LI Date: Thu, 28 Nov 2013 22:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258723 - stable/10/usr.sbin/freebsd-update X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 22:06:38 -0000 Author: delphij Date: Thu Nov 28 22:06:37 2013 New Revision: 258723 URL: http://svnweb.freebsd.org/changeset/base/258723 Log: MFC r257879: Fix typo in r256646: We want to generate lists of directories in INDEX-OLD and INDEX-NEW and compare them, not generate the same list of directories from INDEX-OLD twice... Pointy hats to: cperciva & everybody who didn't proofread EN-13:04 enough Errata Notice: FreeBSD-EN-13:05.freebsd-update Approved by: re (gjb) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/usr.sbin/freebsd-update/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 21:57:17 2013 (r258722) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 22:06:37 2013 (r258723) @@ -2884,8 +2884,8 @@ again to finish installing updates. install_delete INDEX-OLD INDEX-NEW || return 1 # Remove old directories - grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '^[^|]+\|d\|' > INDEX-OLD + grep -vE '^/boot/' $1/INDEX-NEW | + grep -E '^[^|]+\|d\|' > INDEX-NEW grep -vE '^/boot/' $1/INDEX-OLD | grep -E '^[^|]+\|d\|' > INDEX-OLD install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-stable-10@FreeBSD.ORG Fri Nov 29 07:12:11 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C9AE7A2; Fri, 29 Nov 2013 07:12:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 785621280; Fri, 29 Nov 2013 07:12:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT7CBjc022362; Fri, 29 Nov 2013 07:12:11 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT7CBLF022361; Fri, 29 Nov 2013 07:12:11 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311290712.rAT7CBLF022361@svn.freebsd.org> From: Craig Rodrigues Date: Fri, 29 Nov 2013 07:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258734 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 07:12:11 -0000 Author: rodrigc Date: Fri Nov 29 07:12:10 2013 New Revision: 258734 URL: http://svnweb.freebsd.org/changeset/base/258734 Log: MFC r258714 Add some text to clarify that nslookup and dig are no longer in the base system after the removal of BIND. Approved by: re (delphij) Modified: stable/10/UPDATING (contents, props changed) Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Fri Nov 29 07:08:17 2013 (r258733) +++ stable/10/UPDATING Fri Nov 29 07:12:10 2013 (r258734) @@ -55,7 +55,12 @@ older version of current is a bit fragil BIND has been removed from the base system. If all you need is a local resolver, simply enable and start the local_unbound service instead. Otherwise, several versions of BIND are - available in the ports tree. + available in the ports tree. The dns/bind99 port is one example. + + With this change, nslookup(1) and dig(1) are no longer in the base + system. Users should instead use host(1) which is still + in the base system. Alternatively, nslookup and dig can + be obtained by installing the dns/bind-tools port. 20130916: With the addition of unbound(8), a new unbound user is now From owner-svn-src-stable-10@FreeBSD.ORG Fri Nov 29 18:06:03 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D100CC4; Fri, 29 Nov 2013 18:06:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 282611577; Fri, 29 Nov 2013 18:06:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATI638X047903; Fri, 29 Nov 2013 18:06:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATI62bQ047902; Fri, 29 Nov 2013 18:06:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311291806.rATI62bQ047902@svn.freebsd.org> From: Dimitry Andric Date: Fri, 29 Nov 2013 18:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258747 - stable/10/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 18:06:03 -0000 Author: dim Date: Fri Nov 29 18:06:02 2013 New Revision: 258747 URL: http://svnweb.freebsd.org/changeset/base/258747 Log: MFC r258620: Pull in r195558 from upstream clang trunk: Fix a SSE2 intrinsics typo Full discourse at: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html Patch by Dimitry Andric and Alexey Dokuchaev! Reported by: danfe Approved by: re (gjb) Modified: stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Directory Properties: stable/10/contrib/llvm/ (props changed) stable/10/contrib/llvm/tools/clang/ (props changed) Modified: stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Fri Nov 29 15:39:39 2013 (r258746) +++ stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Fri Nov 29 18:06:02 2013 (r258747) @@ -1344,7 +1344,7 @@ _mm_movepi64_pi64(__m128i __a) } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) -_mm_movpi64_pi64(__m64 __a) +_mm_movpi64_epi64(__m64 __a) { return (__m128i){ (long long)__a, 0 }; } From owner-svn-src-stable-10@FreeBSD.ORG Fri Nov 29 19:44:34 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5FA8488; Fri, 29 Nov 2013 19:44:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE5B91BD3; Fri, 29 Nov 2013 19:44:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATJiY5L082474; Fri, 29 Nov 2013 19:44:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATJiUoB082454; Fri, 29 Nov 2013 19:44:30 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311291944.rATJiUoB082454@svn.freebsd.org> From: Glen Barber Date: Fri, 29 Nov 2013 19:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258750 - in stable/10: include lib/libc lib/libc/iconv lib/libc_nonshared X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 19:44:35 -0000 Author: gjb Date: Fri Nov 29 19:44:30 2013 New Revision: 258750 URL: http://svnweb.freebsd.org/changeset/base/258750 Log: MFC r258537, r258587: r258537 (hrs): Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQ when there is an invalid character in the output codeset while it is valid in the input. However, POSIX requires iconv() to perform an implementation-defined conversion on the character. So, Citrus iconv converts such a character to a special character which means it is invalid in the output codeset. This is not a problem in most cases but some software like libxml2 depends on GNU's behavior to determine if a character is output as-is or another form such as a character entity (&#NNN;). r258587 (peter): Move the iconv wrapper source from libc_nonshared to libc/iconv so that it is all in the one place again. Rename libc/iconv/iconv.c to bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT works again. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Added: stable/10/lib/libc/iconv/__iconv.c - copied unchanged from r258587, head/lib/libc/iconv/__iconv.c stable/10/lib/libc/iconv/__iconv_free_list.c - copied unchanged from r258587, head/lib/libc/iconv/__iconv_free_list.c stable/10/lib/libc/iconv/__iconv_get_list.c - copied unchanged from r258587, head/lib/libc/iconv/__iconv_get_list.c stable/10/lib/libc/iconv/bsd_iconv.c - copied unchanged from r258587, head/lib/libc/iconv/bsd_iconv.c stable/10/lib/libc/iconv/iconv_canonicalize.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_canonicalize.c stable/10/lib/libc/iconv/iconv_close.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_close.c stable/10/lib/libc/iconv/iconv_open.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_open.c stable/10/lib/libc/iconv/iconv_open_into.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_open_into.c stable/10/lib/libc/iconv/iconv_set_relocation_prefix.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_set_relocation_prefix.c stable/10/lib/libc/iconv/iconvctl.c - copied unchanged from r258587, head/lib/libc/iconv/iconvctl.c stable/10/lib/libc/iconv/iconvlist.c - copied unchanged from r258587, head/lib/libc/iconv/iconvlist.c stable/10/lib/libc_nonshared/Makefile.iconv - copied unchanged from r258587, head/lib/libc_nonshared/Makefile.iconv Replaced: stable/10/lib/libc/iconv/iconv.c - copied unchanged from r258587, head/lib/libc/iconv/iconv.c Deleted: stable/10/lib/libc_nonshared/__iconv.c stable/10/lib/libc_nonshared/__iconv_free_list.c stable/10/lib/libc_nonshared/__iconv_get_list.c stable/10/lib/libc_nonshared/iconv.c stable/10/lib/libc_nonshared/iconv_canonicalize.c stable/10/lib/libc_nonshared/iconv_close.c stable/10/lib/libc_nonshared/iconv_open.c stable/10/lib/libc_nonshared/iconv_open_into.c stable/10/lib/libc_nonshared/iconv_set_relocation_prefix.c stable/10/lib/libc_nonshared/iconvctl.c stable/10/lib/libc_nonshared/iconvlist.c Modified: stable/10/include/iconv.h stable/10/lib/libc/Makefile stable/10/lib/libc/iconv/Makefile.inc stable/10/lib/libc/iconv/citrus_iconv_local.h stable/10/lib/libc/iconv/iconvctl.3 stable/10/lib/libc_nonshared/Makefile Directory Properties: stable/10/include/ (props changed) stable/10/lib/libc/ (props changed) stable/10/lib/libc_nonshared/ (props changed) Modified: stable/10/include/iconv.h ============================================================================== --- stable/10/include/iconv.h Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/include/iconv.h Fri Nov 29 19:44:30 2013 (r258750) @@ -86,6 +86,8 @@ void iconv_set_relocation_prefix(const #define ICONV_SET_DISCARD_ILSEQ 4 #define ICONV_SET_HOOKS 5 #define ICONV_SET_FALLBACKS 6 +#define ICONV_GET_ILSEQ_INVALID 128 +#define ICONV_SET_ILSEQ_INVALID 129 typedef void (*iconv_unicode_char_hook) (unsigned int mbr, void *data); typedef void (*iconv_wide_char_hook) (wchar_t wc, void *data); Modified: stable/10/lib/libc/Makefile ============================================================================== --- stable/10/lib/libc/Makefile Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/Makefile Fri Nov 29 19:44:30 2013 (r258750) @@ -50,6 +50,9 @@ LDADD+= -lgcc LDADD+= -lssp_nonshared .endif +# Extras that live in either libc.a or libc_nonshared.a +LIBC_NONSHARED_SRCS= + # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: MDSRCS= @@ -114,6 +117,8 @@ CFLAGS+= -DNS_CACHING CFLAGS+=-D_FREEFALL_CONFIG .endif +STATICOBJS+=${LIBC_NONSHARED_SRCS:S/.c$/.o/} + VERSION_DEF=${.CURDIR}/Versions.def SYMBOL_MAPS=${SYM_MAPS} CFLAGS+= -DSYMBOL_VERSIONING Modified: stable/10/lib/libc/iconv/Makefile.inc ============================================================================== --- stable/10/lib/libc/iconv/Makefile.inc Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/iconv/Makefile.inc Fri Nov 29 19:44:30 2013 (r258750) @@ -14,5 +14,9 @@ SRCS+= citrus_bcs.c citrus_bcs_strtol.c citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \ citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \ citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \ - citrus_prop.c citrus_stdenc.c iconv.c iconv_compat.c + citrus_prop.c citrus_stdenc.c bsd_iconv.c iconv_compat.c SYM_MAPS+= ${.CURDIR}/iconv/Symbol.map + +.if ${MK_ICONV} == yes +.include "${.CURDIR}/../libc_nonshared/Makefile.iconv" +.endif Copied: stable/10/lib/libc/iconv/__iconv.c (from r258587, head/lib/libc/iconv/__iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/__iconv.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/__iconv.c) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +size_t +__iconv(iconv_t a, const char **b, size_t *c, char **d, + size_t *e, __uint32_t f, size_t *g) +{ + return __bsd___iconv(a, b, c, d, e, f, g); +} Copied: stable/10/lib/libc/iconv/__iconv_free_list.c (from r258587, head/lib/libc/iconv/__iconv_free_list.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/__iconv_free_list.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/__iconv_free_list.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +void +__iconv_free_list(char **a, size_t b) +{ + __bsd___iconv_free_list(a, b); +} Copied: stable/10/lib/libc/iconv/__iconv_get_list.c (from r258587, head/lib/libc/iconv/__iconv_get_list.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/__iconv_get_list.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/__iconv_get_list.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +int +__iconv_get_list(char ***a, size_t *b, __iconv_bool c) +{ + return __bsd___iconv_get_list(a, b, c); +} Copied: stable/10/lib/libc/iconv/bsd_iconv.c (from r258587, head/lib/libc/iconv/bsd_iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/bsd_iconv.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/bsd_iconv.c) @@ -0,0 +1,318 @@ +/* $FreeBSD$ */ +/* $NetBSD: iconv.c,v 1.11 2009/03/03 16:22:33 explorer Exp $ */ + +/*- + * Copyright (c) 2003 Citrus Project, + * Copyright (c) 2009, 2010 Gabor Kovesdan , + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "citrus_types.h" +#include "citrus_module.h" +#include "citrus_esdb.h" +#include "citrus_hash.h" +#include "citrus_iconv.h" + +#include "iconv-internal.h" + +#define ISBADF(_h_) (!(_h_) || (_h_) == (iconv_t)-1) + +static iconv_t +__bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle) +{ + const char *out_slashes; + char *out_noslashes; + int ret; + + /* + * Remove anything following a //, as these are options (like + * //ignore, //translate, etc) and we just don't handle them. + * This is for compatibility with software that uses these + * blindly. + */ + out_slashes = strstr(out, "//"); + if (out_slashes != NULL) { + out_noslashes = strndup(out, out_slashes - out); + if (out_noslashes == NULL) { + errno = ENOMEM; + return ((iconv_t)-1); + } + ret = _citrus_iconv_open(&handle, in, out_noslashes); + free(out_noslashes); + } else { + ret = _citrus_iconv_open(&handle, in, out); + } + + if (ret) { + errno = ret == ENOENT ? EINVAL : ret; + return ((iconv_t)-1); + } + + handle->cv_shared->ci_discard_ilseq = strcasestr(out, "//IGNORE"); + handle->cv_shared->ci_hooks = NULL; + + return ((iconv_t)(void *)handle); +} + +iconv_t +__bsd_iconv_open(const char *out, const char *in) +{ + + return (__bsd___iconv_open(out, in, NULL)); +} + +int +__bsd_iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr) +{ + struct _citrus_iconv *handle; + + handle = (struct _citrus_iconv *)ptr; + return ((__bsd___iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0); +} + +int +__bsd_iconv_close(iconv_t handle) +{ + + if (ISBADF(handle)) { + errno = EBADF; + return (-1); + } + + _citrus_iconv_close((struct _citrus_iconv *)(void *)handle); + + return (0); +} + +size_t +__bsd_iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) +{ + size_t ret; + int err; + + if (ISBADF(handle)) { + errno = EBADF; + return ((size_t)-1); + } + + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, 0, &ret); + if (err) { + errno = err; + ret = (size_t)-1; + } + + return (ret); +} + +size_t +__bsd___iconv(iconv_t handle, const char **in, size_t *szin, char **out, + size_t *szout, uint32_t flags, size_t *invalids) +{ + size_t ret; + int err; + + if (ISBADF(handle)) { + errno = EBADF; + return ((size_t)-1); + } + + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, flags, &ret); + if (invalids) + *invalids = ret; + if (err) { + errno = err; + ret = (size_t)-1; + } + + return (ret); +} + +int +__bsd___iconv_get_list(char ***rlist, size_t *rsz, bool sorted) +{ + int ret; + + ret = _citrus_esdb_get_list(rlist, rsz, sorted); + if (ret) { + errno = ret; + return (-1); + } + + return (0); +} + +void +__bsd___iconv_free_list(char **list, size_t sz) +{ + + _citrus_esdb_free_list(list, sz); +} + +/* + * GNU-compatibile non-standard interfaces. + */ +static int +qsort_helper(const void *first, const void *second) +{ + const char * const *s1; + const char * const *s2; + + s1 = first; + s2 = second; + return (strcmp(*s1, *s2)); +} + +void +__bsd_iconvlist(int (*do_one) (unsigned int, const char * const *, + void *), void *data) +{ + char **list, **names; + const char * const *np; + char *curitem, *curkey, *slashpos; + size_t sz; + unsigned int i, j; + + i = 0; + + if (__bsd___iconv_get_list(&list, &sz, true)) + list = NULL; + qsort((void *)list, sz, sizeof(char *), qsort_helper); + while (i < sz) { + j = 0; + slashpos = strchr(list[i], '/'); + curkey = (char *)malloc(slashpos - list[i] + 2); + names = (char **)malloc(sz * sizeof(char *)); + if ((curkey == NULL) || (names == NULL)) { + __bsd___iconv_free_list(list, sz); + return; + } + strlcpy(curkey, list[i], slashpos - list[i] + 1); + names[j++] = strdup(curkey); + for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { + slashpos = strchr(list[i], '/'); + curitem = (char *)malloc(strlen(slashpos) + 1); + if (curitem == NULL) { + __bsd___iconv_free_list(list, sz); + return; + } + strlcpy(curitem, &slashpos[1], strlen(slashpos) + 1); + if (strcmp(curkey, curitem) == 0) { + continue; + } + names[j++] = strdup(curitem); + } + np = (const char * const *)names; + do_one(j, np, data); + free(names); + } + + __bsd___iconv_free_list(list, sz); +} + +__inline const char * +__bsd_iconv_canonicalize(const char *name) +{ + + return (_citrus_iconv_canonicalize(name)); +} + +int +__bsd_iconvctl(iconv_t cd, int request, void *argument) +{ + struct _citrus_iconv *cv; + struct iconv_hooks *hooks; + const char *convname; + char src[PATH_MAX], *dst; + int *i; + + cv = (struct _citrus_iconv *)(void *)cd; + hooks = (struct iconv_hooks *)argument; + i = (int *)argument; + + if (ISBADF(cd)) { + errno = EBADF; + return (-1); + } + + switch (request) { + case ICONV_TRIVIALP: + convname = cv->cv_shared->ci_convname; + dst = strchr(convname, '/'); + + strlcpy(src, convname, dst - convname + 1); + dst++; + if ((convname == NULL) || (src == NULL) || (dst == NULL)) + return (-1); + *i = strcmp(src, dst) == 0 ? 1 : 0; + return (0); + case ICONV_GET_TRANSLITERATE: + *i = 1; + return (0); + case ICONV_SET_TRANSLITERATE: + return ((*i == 1) ? 0 : -1); + case ICONV_GET_DISCARD_ILSEQ: + *i = cv->cv_shared->ci_discard_ilseq ? 1 : 0; + return (0); + case ICONV_SET_DISCARD_ILSEQ: + cv->cv_shared->ci_discard_ilseq = *i; + return (0); + case ICONV_SET_HOOKS: + cv->cv_shared->ci_hooks = hooks; + return (0); + case ICONV_SET_FALLBACKS: + errno = EOPNOTSUPP; + return (-1); + case ICONV_GET_ILSEQ_INVALID: + *i = cv->cv_shared->ci_ilseq_invalid ? 1 : 0; + return (0); + case ICONV_SET_ILSEQ_INVALID: + cv->cv_shared->ci_ilseq_invalid = *i; + return (0); + default: + errno = EINVAL; + return (-1); + } +} + +void +__bsd_iconv_set_relocation_prefix(const char *orig_prefix __unused, + const char *curr_prefix __unused) +{ + +} Modified: stable/10/lib/libc/iconv/citrus_iconv_local.h ============================================================================== --- stable/10/lib/libc/iconv/citrus_iconv_local.h Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/iconv/citrus_iconv_local.h Fri Nov 29 19:44:30 2013 (r258750) @@ -99,6 +99,7 @@ struct _citrus_iconv_shared { char *ci_convname; bool ci_discard_ilseq; struct iconv_hooks *ci_hooks; + bool ci_ilseq_invalid; }; struct _citrus_iconv { Copied: stable/10/lib/libc/iconv/iconv.c (from r258587, head/lib/libc/iconv/iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv.c) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +size_t +iconv(iconv_t a, const char ** __restrict b, + size_t * __restrict c, char ** __restrict d, + size_t * __restrict e) +{ + return __bsd_iconv(a, b, c, d, e); +} Copied: stable/10/lib/libc/iconv/iconv_canonicalize.c (from r258587, head/lib/libc/iconv/iconv_canonicalize.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_canonicalize.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_canonicalize.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +const char * +iconv_canonicalize(const char *a) +{ + return __bsd_iconv_canonicalize(a); +} Copied: stable/10/lib/libc/iconv/iconv_close.c (from r258587, head/lib/libc/iconv/iconv_close.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_close.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_close.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconv_close(iconv_t a) +{ + return __bsd_iconv_close(a); +} Copied: stable/10/lib/libc/iconv/iconv_open.c (from r258587, head/lib/libc/iconv/iconv_open.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_open.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_open.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +iconv_t +iconv_open(const char *a, const char *b) +{ + return __bsd_iconv_open(a, b); +} Copied: stable/10/lib/libc/iconv/iconv_open_into.c (from r258587, head/lib/libc/iconv/iconv_open_into.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_open_into.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_open_into.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconv_open_into(const char *a, const char *b, iconv_allocation_t *c) +{ + return __bsd_iconv_open_into(a, b, c); +} Copied: stable/10/lib/libc/iconv/iconv_set_relocation_prefix.c (from r258587, head/lib/libc/iconv/iconv_set_relocation_prefix.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_set_relocation_prefix.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_set_relocation_prefix.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +void +iconv_set_relocation_prefix(const char *a, const char *b) +{ + return __bsd_iconv_set_relocation_prefix(a, b); +} Modified: stable/10/lib/libc/iconv/iconvctl.3 ============================================================================== --- stable/10/lib/libc/iconv/iconvctl.3 Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/iconv/iconvctl.3 Fri Nov 29 19:44:30 2013 (r258750) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2009 +.Dd November 25, 2009 .Dt ICONVCTL 3 .Os .Sh NAME @@ -110,6 +110,31 @@ variable, which is passed to via .Fa argument by its address. +.It ICONV_GET_ILSEQ_INVALID +Determines if a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +The answer is stored in +.Fa argument , +which is of +.Ft int * . +It will be set to 1 if this feature is enabled or set to 0 otherwise. +.It ICONV_SET_ILSEQ_INVALID +Sets whether a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +If +.Fa argument , +which is of +.Ft int * +is set to 1 it will be enabled, +and if +.Fa argument +is set to 0 it will be disabled. .El .\" XXX: fallbacks are unimplemented and trying to set them will always .\" return EOPNOTSUPP but definitions are provided for source-level Copied: stable/10/lib/libc/iconv/iconvctl.c (from r258587, head/lib/libc/iconv/iconvctl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconvctl.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconvctl.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconvctl(iconv_t a, int b, void *c) +{ + return __bsd_iconvctl(a, b, c); +} Copied: stable/10/lib/libc/iconv/iconvlist.c (from r258587, head/lib/libc/iconv/iconvlist.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconvlist.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconvlist.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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$ + */ + +#include +#include +#include "iconv-internal.h" + +void +iconvlist(int (*a) (unsigned int, const char * const *, void *), void *b) +{ + return __bsd_iconvlist(a, b); +} Modified: stable/10/lib/libc_nonshared/Makefile ============================================================================== --- stable/10/lib/libc_nonshared/Makefile Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc_nonshared/Makefile Fri Nov 29 19:44:30 2013 (r258750) @@ -12,16 +12,17 @@ CFLAGS+=${PICFLAG} -DPIC -fvisibility=hi LIB= c_nonshared +LIBC_NONSHARED_SRCS= + # So that an empty .a file doesn't cause errors. SRCS= __stub.c .if ${MK_ICONV} == "yes" -SRCS+= __iconv.c __iconv_free_list.c __iconv_get_list.c \ - iconv.c iconv_canonicalize.c iconv_close.c \ - iconv_open.c iconv_open_into.c \ - iconv_set_relocation_prefix.c iconvctl.c iconvlist.c +.PATH: ${.CURDIR}/../libc/iconv +.include "Makefile.iconv" CFLAGS+=-I${.CURDIR}/../libc/iconv .endif -.include +SRCS+= ${LIBC_NONSHARED_SRCS} +.include Copied: stable/10/lib/libc_nonshared/Makefile.iconv (from r258587, head/lib/libc_nonshared/Makefile.iconv) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc_nonshared/Makefile.iconv Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc_nonshared/Makefile.iconv) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.if ${MK_ICONV} == "yes" +LIBC_NONSHARED_SRCS+= \ + __iconv.c __iconv_free_list.c __iconv_get_list.c \ + iconv.c iconv_canonicalize.c iconv_close.c \ + iconv_open.c iconv_open_into.c \ + iconv_set_relocation_prefix.c iconvctl.c iconvlist.c +.endif From owner-svn-src-stable-10@FreeBSD.ORG Fri Nov 29 21:12:35 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC4D2BD6; Fri, 29 Nov 2013 21:12:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D76CC1FD8; Fri, 29 Nov 2013 21:12:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATLCZXm014497; Fri, 29 Nov 2013 21:12:35 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATLCZmG014496; Fri, 29 Nov 2013 21:12:35 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311292112.rATLCZmG014496@svn.freebsd.org> From: Bryan Drewery Date: Fri, 29 Nov 2013 21:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258755 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 21:12:36 -0000 Author: bdrewery (ports committer) Date: Fri Nov 29 21:12:35 2013 New Revision: 258755 URL: http://svnweb.freebsd.org/changeset/base/258755 Log: MFC r258348: Document 'enabled' as boolean instead of string. Approved by: bapt (implicit) Approved by: re (gjb) Modified: stable/10/usr.sbin/pkg/pkg.7 Directory Properties: stable/10/usr.sbin/pkg/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.7 ============================================================================== --- stable/10/usr.sbin/pkg/pkg.7 Fri Nov 29 20:28:37 2013 (r258754) +++ stable/10/usr.sbin/pkg/pkg.7 Fri Nov 29 21:12:35 2013 (r258755) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 4, 2013 +.Dd November 19, 2013 .Dt PKG 7 .Os .Sh NAME @@ -108,7 +108,7 @@ FreeBSD: { mirror_type: "srv", signature_type: "none", fingerprints: "/usr/share/keys/pkg", - enabled: "yes" + enabled: yes } .Ed .Bl -tag -width signature_type -compact From owner-svn-src-stable-10@FreeBSD.ORG Fri Nov 29 21:13:31 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E96DDE4; Fri, 29 Nov 2013 21:13:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07A141FDF; Fri, 29 Nov 2013 21:13:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATLDUZh014731; Fri, 29 Nov 2013 21:13:30 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATLDUEY014730; Fri, 29 Nov 2013 21:13:30 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311292113.rATLDUEY014730@svn.freebsd.org> From: Bryan Drewery Date: Fri, 29 Nov 2013 21:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258756 - stable/10/lib/libfetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 21:13:31 -0000 Author: bdrewery (ports committer) Date: Fri Nov 29 21:13:30 2013 New Revision: 258756 URL: http://svnweb.freebsd.org/changeset/base/258756 Log: MFC r258347,r258349: Support SNI in libfetch SNI is Server Name Indentification which is a protocol for TLS that indicates the host that is being connected to at the start of the handshake. It allows to use Virtual Hosts on HTTPS. PR: kern/183583 Approved by: bapt (implicit) Approved by: re (gjb) Modified: stable/10/lib/libfetch/common.c Directory Properties: stable/10/lib/libfetch/ (props changed) Modified: stable/10/lib/libfetch/common.c ============================================================================== --- stable/10/lib/libfetch/common.c Fri Nov 29 21:12:35 2013 (r258755) +++ stable/10/lib/libfetch/common.c Fri Nov 29 21:13:30 2013 (r258756) @@ -829,6 +829,16 @@ fetch_ssl(conn_t *conn, const struct url return (-1); } SSL_set_fd(conn->ssl, conn->sd); + +#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) + if (!SSL_set_tlsext_host_name(conn->ssl, + __DECONST(struct url *, URL)->host)) { + fprintf(stderr, + "TLS server name indication extension failed for host %s\n", + URL->host); + return (-1); + } +#endif while ((ret = SSL_connect(conn->ssl)) == -1) { ssl_err = SSL_get_error(conn->ssl, ret); if (ssl_err != SSL_ERROR_WANT_READ && From owner-svn-src-stable-10@FreeBSD.ORG Sat Nov 30 03:31:40 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A28717C2; Sat, 30 Nov 2013 03:31:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3CB14C1; Sat, 30 Nov 2013 03:31:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAU3Ve1L049219; Sat, 30 Nov 2013 03:31:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAU3Veqq049218; Sat, 30 Nov 2013 03:31:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311300331.rAU3Veqq049218@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 03:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258761 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 03:31:40 -0000 Author: gjb Date: Sat Nov 30 03:31:40 2013 New Revision: 258761 URL: http://svnweb.freebsd.org/changeset/base/258761 Log: MFC r258669: Document the dvdrom target and NODVD variable. Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Directory Properties: stable/10/release/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Fri Nov 29 22:36:00 2013 (r258760) +++ stable/10/release/Makefile Sat Nov 30 03:31:40 2013 (r258761) @@ -4,6 +4,7 @@ # # User-driven targets: # cdrom: Builds release CD-ROM media (disc1.iso) +# dvdrom: Builds release DVD-ROM media (dvd1.iso) # memstick: Builds memory stick image (memstick.img) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area @@ -17,6 +18,7 @@ # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation +# NODVD: if set, do not generate dvd1.iso # TARGET/TARGET_ARCH: architecture of built release # From owner-svn-src-stable-10@FreeBSD.ORG Sat Nov 30 07:03:19 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 388D6634; Sat, 30 Nov 2013 07:03:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 242DC1FF0; Sat, 30 Nov 2013 07:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAU73JBL021786; Sat, 30 Nov 2013 07:03:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAU73IgV021785; Sat, 30 Nov 2013 07:03:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311300703.rAU73IgV021785@svn.freebsd.org> From: Xin LI Date: Sat, 30 Nov 2013 07:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258762 - stable/10/etc/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 07:03:19 -0000 Author: delphij Date: Sat Nov 30 07:03:18 2013 New Revision: 258762 URL: http://svnweb.freebsd.org/changeset/base/258762 Log: MFC r258664: Create /var/cache with mode 0755 instead of 0750. This directory is used by many third party applications and having permission 0750 makes it impossible to drop group privileges. Approved by: re (glebius) Modified: stable/10/etc/mtree/BSD.var.dist Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/etc/mtree/BSD.var.dist ============================================================================== --- stable/10/etc/mtree/BSD.var.dist Sat Nov 30 03:31:40 2013 (r258761) +++ stable/10/etc/mtree/BSD.var.dist Sat Nov 30 07:03:18 2013 (r258762) @@ -28,7 +28,7 @@ /set gname=wheel backups .. - cache + cache mode=0755 .. crash .. From owner-svn-src-stable-10@FreeBSD.ORG Sat Nov 30 14:36:33 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 022D98D0; Sat, 30 Nov 2013 14:36:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C8BD8178B; Sat, 30 Nov 2013 14:36:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUEaWWF076109; Sat, 30 Nov 2013 14:36:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUEaWOD076107; Sat, 30 Nov 2013 14:36:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311301436.rAUEaWOD076107@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Nov 2013 14:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258766 - stable/10/lib/libthr/thread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 14:36:33 -0000 Author: kib Date: Sat Nov 30 14:36:32 2013 New Revision: 258766 URL: http://svnweb.freebsd.org/changeset/base/258766 Log: MFC r258499: Fix for the spurious signal handler call with zero signo in the threaded process. Approved by: re (hrs) Modified: stable/10/lib/libthr/thread/thr_private.h stable/10/lib/libthr/thread/thr_sig.c Directory Properties: stable/10/lib/libthr/ (props changed) Modified: stable/10/lib/libthr/thread/thr_private.h ============================================================================== --- stable/10/lib/libthr/thread/thr_private.h Sat Nov 30 12:51:19 2013 (r258765) +++ stable/10/lib/libthr/thread/thr_private.h Sat Nov 30 14:36:32 2013 (r258766) @@ -433,6 +433,9 @@ struct pthread { /* the sigaction should be used for deferred signal. */ struct sigaction deferred_sigact; + /* deferred signal delivery is performed, do not reenter. */ + int deferred_run; + /* Force new thread to exit. */ int force_exit; Modified: stable/10/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/10/lib/libthr/thread/thr_sig.c Sat Nov 30 12:51:19 2013 (r258765) +++ stable/10/lib/libthr/thread/thr_sig.c Sat Nov 30 14:36:32 2013 (r258766) @@ -162,6 +162,7 @@ thr_sighandler(int sig, siginfo_t *info, act = _thr_sigact[sig-1].sigact; _thr_rwl_unlock(&_thr_sigact[sig-1].lock); errno = err; + curthread->deferred_run = 0; /* * if a thread is in critical region, for example it holds low level locks, @@ -320,14 +321,18 @@ check_deferred_signal(struct pthread *cu siginfo_t info; int uc_len; - if (__predict_true(curthread->deferred_siginfo.si_signo == 0)) + if (__predict_true(curthread->deferred_siginfo.si_signo == 0 || + curthread->deferred_run)) return; + curthread->deferred_run = 1; uc_len = __getcontextx_size(); uc = alloca(uc_len); getcontext(uc); - if (curthread->deferred_siginfo.si_signo == 0) + if (curthread->deferred_siginfo.si_signo == 0) { + curthread->deferred_run = 0; return; + } __fillcontextx2((char *)uc); act = curthread->deferred_sigact; uc->uc_sigmask = curthread->deferred_sigmask; From owner-svn-src-stable-10@FreeBSD.ORG Sat Nov 30 17:33:50 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6982AFB7; Sat, 30 Nov 2013 17:33:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 550901EAD; Sat, 30 Nov 2013 17:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUHXo4L038327; Sat, 30 Nov 2013 17:33:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUHXosr038326; Sat, 30 Nov 2013 17:33:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311301733.rAUHXosr038326@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 17:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258773 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:33:50 -0000 Author: gjb Date: Sat Nov 30 17:33:49 2013 New Revision: 258773 URL: http://svnweb.freebsd.org/changeset/base/258773 Log: MFC r258550: Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/usr.sbin/pkg/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Sat Nov 30 17:31:04 2013 (r258772) +++ stable/10/usr.sbin/pkg/pkg.c Sat Nov 30 17:33:49 2013 (r258773) @@ -747,12 +747,9 @@ cleanup: static int bootstrap_pkg(bool force) { - FILE *config; int fd_pkg, fd_sig; int ret; - char *site; char url[MAXPATHLEN]; - char conf[MAXPATHLEN]; char tmppkg[MAXPATHLEN]; char tmpsig[MAXPATHLEN]; const char *packagesite; @@ -761,7 +758,6 @@ bootstrap_pkg(bool force) fd_sig = -1; ret = -1; - config = NULL; if (config_string(PACKAGESITE, &packagesite) != 0) { warnx("No PACKAGESITE defined"); @@ -808,26 +804,6 @@ bootstrap_pkg(bool force) if ((ret = extract_pkg_static(fd_pkg, pkgstatic, MAXPATHLEN)) == 0) ret = install_pkg_static(pkgstatic, tmppkg, force); - snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf", - getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); - - if (access(conf, R_OK) == -1) { - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - - config = fopen(conf, "w+"); - if (config == NULL) - goto cleanup; - fprintf(config, "packagesite: %s\n", url); - fclose(config); - } - goto cleanup; fetchfail: From owner-svn-src-stable-10@FreeBSD.ORG Sat Nov 30 17:40:49 2013 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E39422B; Sat, 30 Nov 2013 17:40:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE3AE1ECF; Sat, 30 Nov 2013 17:40:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUHemID039738; Sat, 30 Nov 2013 17:40:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUHemO6039737; Sat, 30 Nov 2013 17:40:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311301740.rAUHemO6039737@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 17:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258774 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:40:49 -0000 Author: gjb Date: Sat Nov 30 17:40:48 2013 New Revision: 258774 URL: http://svnweb.freebsd.org/changeset/base/258774 Log: Update stable/10 to BETA4 as part of the 10.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Sat Nov 30 17:33:49 2013 (r258773) +++ stable/10/sys/conf/newvers.sh Sat Nov 30 17:40:48 2013 (r258774) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="BETA3" +BRANCH="BETA4" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi