From owner-svn-src-stable-11@freebsd.org Sun Dec 11 00:39:47 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87DAAC658DA for ; Sun, 11 Dec 2016 00:39:47 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2881D11AD for ; Sun, 11 Dec 2016 00:39:46 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x233.google.com with SMTP id t79so19945275wmt.0 for ; Sat, 10 Dec 2016 16:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/9LPNTLiryahzmBlogVqClB3y0rEPmqSnLE8v+Byjj0=; b=Tj8JTtBCsJCao+uj8kna+oPS+Myjc+ihxNF+Nx04WNkqG/uyZw9JheoKquFtjH4u+e dz3dmq0F5mpLbRmGeHJhrUAOGgzNPFf+jrfaZakq0oVxVLN3AdHrlzWzjC8CglJE5/XK BvhoYFn8o6MtIy07TFDgpC08xkufl8rg9okzPBwf0j6K2Fiup8csMhTX3asqw7M3ZZn6 xRk0luVAXWXVGgAMWVYLcfUDvL3QNa5C5DvWZbqcWSFLZeOHQijyjigM4hd+Ka6ee8Jb ewFYiNPX2lJLWmpULyI9755v1e8yDKLgolq6NJG2HY4LPRPwOIKFJ2NywffFficBOzuY EzFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/9LPNTLiryahzmBlogVqClB3y0rEPmqSnLE8v+Byjj0=; b=RMHZkREPRMILuYgpZ4WCGzCIc1Pw8uPI4VsvG/uEmyk17upKtBuZJZCVMiyl8teWXh gKi9M4UKHzU48Odf2q25EYaiDB8QM7EgDExTPIc6TzJUS0E/PnoeiATmIcXx5SP+oYqd SpXXPV13Rm1mmbI7wg86JqiSEOZW9W/4dRci1FmPWGbAl34PutGZy9zgh4wCH2mbIwXa ecPaw+IQhCO6a+uvZj7FaVNiAUfOSC1T9CaJvkBKxOFWX7Gt2R/8PmOyIFsijel+0bQ6 qlhi9Ny6nuhBjTAvR6HfvYcmmwou1iBhSbsi0fy9iwQ+OlMBfDSafphOJtDrKbPznFfr 3dww== X-Gm-Message-State: AKaTC03WzWkuUQn9MgOqtKceMF6I4OMxRPXq7EEeNnrb/9wOv6vbIOuC7iCxpP0/oOhcjwtS+4Crkou4AVX2ghcP X-Received: by 10.28.18.129 with SMTP id 123mr11539976wms.2.1481416785304; Sat, 10 Dec 2016 16:39:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.253.65 with HTTP; Sat, 10 Dec 2016 16:39:44 -0800 (PST) In-Reply-To: <201611052015.uA5KFxZM068332@repo.freebsd.org> References: <201611052015.uA5KFxZM068332@repo.freebsd.org> From: Oliver Pinter Date: Sun, 11 Dec 2016 01:39:44 +0100 Message-ID: Subject: Re: svn commit: r308350 - stable/11/sys/kern To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 00:39:47 -0000 On 11/5/16, Mark Johnston wrote: > Author: markj > Date: Sat Nov 5 20:15:58 2016 > New Revision: 308350 > URL: https://svnweb.freebsd.org/changeset/base/308350 > > Log: > MFC r308097: > Fix WITNESS hints for pagequeue locks. I think this commit required for 10-STABLE too: op@opn hardenedBSD.git> git grep "vm pagequeue" sys/vm/vm_page.c: mtx_init(&pq->pq_mutex, pq->pq_name, "vm pagequeue", op@opn hardenedBSD.git> git grep "vm page queue" sys/kern/subr_witness.c: { "vm page queue", &lock_class_mtx_sleep }, sys/kern/subr_witness.c: { "vm page queue", &lock_class_mtx_sleep }, op@opn hardenedBSD.git> It would be nice to MFC them to 10-STABLE too. > > Modified: > stable/11/sys/kern/subr_witness.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/kern/subr_witness.c > ============================================================================== > --- stable/11/sys/kern/subr_witness.c Sat Nov 5 20:14:23 2016 (r308349) > +++ stable/11/sys/kern/subr_witness.c Sat Nov 5 20:15:58 2016 (r308350) > @@ -599,7 +599,7 @@ static struct witness_order_list_entry o > * CDEV > */ > { "vm map (system)", &lock_class_mtx_sleep }, > - { "vm page queue", &lock_class_mtx_sleep }, > + { "vm pagequeue", &lock_class_mtx_sleep }, > { "vnode interlock", &lock_class_mtx_sleep }, > { "cdev", &lock_class_mtx_sleep }, > { NULL, NULL }, > @@ -609,7 +609,7 @@ static struct witness_order_list_entry o > { "vm map (user)", &lock_class_sx }, > { "vm object", &lock_class_rw }, > { "vm page", &lock_class_mtx_sleep }, > - { "vm page queue", &lock_class_mtx_sleep }, > + { "vm pagequeue", &lock_class_mtx_sleep }, > { "pmap pv global", &lock_class_rw }, > { "pmap", &lock_class_mtx_sleep }, > { "pmap pv list", &lock_class_rw }, > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to > "svn-src-stable-11-unsubscribe@freebsd.org" > From owner-svn-src-stable-11@freebsd.org Sun Dec 11 02:01:58 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 854BEC65FFD; Sun, 11 Dec 2016 02:01:58 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9EC1B16; Sun, 11 Dec 2016 02:01:58 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB21vA4068791; Sun, 11 Dec 2016 02:01:57 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB21vvF068789; Sun, 11 Dec 2016 02:01:57 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201612110201.uBB21vvF068789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Sun, 11 Dec 2016 02:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309841 - in stable/11/sys/modules: . bios X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 02:01:58 -0000 Author: rpokala Date: Sun Dec 11 02:01:57 2016 New Revision: 309841 URL: https://svnweb.freebsd.org/changeset/base/309841 Log: MFC r309491: Build smbios.ko as a module for amd64 and i386 For whatever reason, smapi, smbios, vpd are all under the "bios" directory. smapi is only for i386, so the entire "bios" directory is only built for i386. Break smapi out, and make only it i386-specific. Then, build the "bios" directory for both amd64 and i386. Modified: stable/11/sys/modules/Makefile stable/11/sys/modules/bios/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Sat Dec 10 23:58:14 2016 (r309840) +++ stable/11/sys/modules/Makefile Sun Dec 11 02:01:57 2016 (r309841) @@ -544,6 +544,7 @@ _igb= igb _agp= agp _an= an _aout= aout +_bios= bios _bktr= bktr _bxe= bxe _cardbus= cardbus @@ -726,7 +727,6 @@ _wds= wds .if ${MK_EISA} != "no" _ahb= ahb .endif -_bios= bios _cm= cm .if ${MK_SOURCELESS_UCODE} != "no" _ctau= ctau Modified: stable/11/sys/modules/bios/Makefile ============================================================================== --- stable/11/sys/modules/bios/Makefile Sat Dec 10 23:58:14 2016 (r309840) +++ stable/11/sys/modules/bios/Makefile Sun Dec 11 02:01:57 2016 (r309841) @@ -1,6 +1,10 @@ # $FreeBSD$ # -SUBDIR= smapi smbios vpd +SUBDIR= smbios vpd + +.if ${MACHINE_ARCH} == "i386" +SUBDIR+= smapi +.endif .include From owner-svn-src-stable-11@freebsd.org Sun Dec 11 03:57:24 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 923D7C65E08; Sun, 11 Dec 2016 03:57:24 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6D0ED4; Sun, 11 Dec 2016 03:57:24 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB3vNjH016607; Sun, 11 Dec 2016 03:57:23 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB3vMZi016590; Sun, 11 Dec 2016 03:57:22 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201612110357.uBB3vMZi016590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 11 Dec 2016 03:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309843 - in stable/11: . contrib/ofed/usr.lib/libsdp gnu/lib/libgcc gnu/lib/libgcov lib/libc/stdlib lib/libedit lib/libprocstat lib/libthr/support share/mk sys/conf usr.sbin/bsnmpd/mod... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 03:57:24 -0000 Author: marcel Date: Sun Dec 11 03:57:21 2016 New Revision: 309843 URL: https://svnweb.freebsd.org/changeset/base/309843 Log: MFC r305855, r306297, r306300, r306312-r306313 When MAKEOBJDIRPREFIX points to a case-insensitive file system, the build can break when different source files create the same object files (case-insensitivity speaking). This is the case for object files compiled with -fpic and shared libraries. The former uses an extension of ".So", and the latter an extension ".so". Rename shared object files from *.So to *.pico to match what NetBSD does. Also: o Compile _Exit.c as C99_Exit.c, as it conflicts with _exit.s o Add entry to UPDATING o Document .pico extension Modified: stable/11/UPDATING stable/11/contrib/ofed/usr.lib/libsdp/Makefile stable/11/gnu/lib/libgcc/Makefile stable/11/gnu/lib/libgcov/Makefile stable/11/lib/libc/stdlib/Makefile.inc stable/11/lib/libedit/Makefile stable/11/lib/libprocstat/Makefile stable/11/lib/libthr/support/Makefile.inc stable/11/share/mk/bsd.README stable/11/share/mk/bsd.dep.mk stable/11/share/mk/bsd.lib.mk stable/11/share/mk/meta.autodep.mk stable/11/sys/conf/kern.post.mk stable/11/sys/conf/kern.pre.mk stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/UPDATING Sun Dec 11 03:57:21 2016 (r309843) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20161210: + Relocatable object files with the extension of .So have been renamed + to use an extension of .pico instead. The purpose of this change is + to avoid a name clash with shared libraries on case-insensitive file + systems. On those file systems, foo.So is the same file as foo.so. + 20160622: The libc stub for the pipe(2) system call has been replaced with a wrapper that calls the pipe2(2) system call and the pipe(2) Modified: stable/11/contrib/ofed/usr.lib/libsdp/Makefile ============================================================================== --- stable/11/contrib/ofed/usr.lib/libsdp/Makefile Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/contrib/ofed/usr.lib/libsdp/Makefile Sun Dec 11 03:57:21 2016 (r309843) @@ -22,4 +22,4 @@ CFLAGS+= -I${OFEDSYS}/include # Remove .[ly] since the checked-in version is preferred. .SUFFIXES: -.SUFFIXES: .o .po .So .c .ln +.SUFFIXES: .o .po .pico .c .ln Modified: stable/11/gnu/lib/libgcc/Makefile ============================================================================== --- stable/11/gnu/lib/libgcc/Makefile Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/gnu/lib/libgcc/Makefile Sun Dec 11 03:57:21 2016 (r309843) @@ -254,8 +254,8 @@ OBJ_GRPS += FPBIT DPBIT .for T in ${OBJ_GRPS} ${T}_OBJS_T = ${${T}_FUNCS:S/$/.o/} ${T}_OBJS_P = ${${T}_FUNCS:S/$/.po/} -${T}_OBJS_S = ${${T}_FUNCS:S/$/.So/} -SOBJS += ${${T}_FUNCS:S/$/.So/} +${T}_OBJS_S = ${${T}_FUNCS:S/$/.pico/} +SOBJS += ${${T}_FUNCS:S/$/.pico/} ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS} ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} @@ -270,7 +270,7 @@ ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHD # Extra objects coming from separate files # .if !empty(LIB2ADD) -SOBJS += ${LIB2ADD:R:S/$/.So/} +SOBJS += ${LIB2ADD:R:S/$/.pico/} .endif #----------------------------------------------------------------------- @@ -294,9 +294,9 @@ ${STAT_OBJS_P}: ${STD_CFILE} ${COMMONHDR .if defined(LIB1ASMSRC) ASM_T = ${LIB1ASMFUNCS:S/$/.o/} ASM_P = ${LIB1ASMFUNCS:S/$/.po/} -ASM_S = ${LIB1ASMFUNCS:S/$/.So/} +ASM_S = ${LIB1ASMFUNCS:S/$/.pico/} ASM_V = ${LIB1ASMFUNCS:S/$/.vis/} -SOBJS += ${LIB1ASMFUNCS:S/$/.So/} +SOBJS += ${LIB1ASMFUNCS:S/$/.pico/} ${ASM_T}: ${LIB1ASMSRC} ${.PREFIX}.vis ${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \ @@ -323,7 +323,7 @@ CLEANFILES += ${ASM_V} ${ASM_V:R:S/$/.vo # EH_OBJS_T = ${LIB2ADDEHSTATIC:R:S/$/.o/} EH_OBJS_P = ${LIB2ADDEHSTATIC:R:S/$/.po/} -EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.So/} +EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.pico/} EH_CFLAGS = -fexceptions -D__GLIBC__=3 -DElfW=__ElfN .if ${TARGET_CPUARCH} != "riscv64" # RISCVTODO: unwinding support @@ -337,7 +337,7 @@ ${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS ${CC_P} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC} .endfor .for _src in ${LIB2ADDEHSHARED:M*.c} -${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS} +${_src:R:S/$/.pico/}: ${_src} ${COMMONHDRS} ${CC_S} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC} .endfor Modified: stable/11/gnu/lib/libgcov/Makefile ============================================================================== --- stable/11/gnu/lib/libgcov/Makefile Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/gnu/lib/libgcov/Makefile Sun Dec 11 03:57:21 2016 (r309843) @@ -35,7 +35,7 @@ SYMS = _gcov _gcov_merge_add _gcov_merge OBJS= ${SYMS:S/$/.o/} OBJS_T= ${SYMS:S/$/.o/} OBJS_P= ${SYMS:S/$/.po/} -OBJS_S= ${SYMS:S/$/.So/} +OBJS_S= ${SYMS:S/$/.pico/} #----------------------------------------------------------------------- # Modified: stable/11/lib/libc/stdlib/Makefile.inc ============================================================================== --- stable/11/lib/libc/stdlib/Makefile.inc Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/lib/libc/stdlib/Makefile.inc Sun Dec 11 03:57:21 2016 (r309843) @@ -4,7 +4,7 @@ # machine-independent stdlib sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib -MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ +MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ bsearch.c cxa_thread_atexit.c div.c exit.c getenv.c getopt.c getopt_long.c \ getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ hsearch_r.c imaxabs.c imaxdiv.c \ @@ -16,6 +16,13 @@ MISRCS+=_Exit.c a64l.c abort.c abs.c ate strtol.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \ strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c +# Work around an issue on case-insensitive file systems. +# libc has both _Exit.c and _exit.s and they both yield +# _exit.o (case insensitively speaking). +CLEANFILES+=C99_Exit.c +C99_Exit.c: ${LIBC_SRCTOP}/stdlib/_Exit.c .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} + SYM_MAPS+= ${LIBC_SRCTOP}/stdlib/Symbol.map # machine-dependent stdlib sources Modified: stable/11/lib/libedit/Makefile ============================================================================== --- stable/11/lib/libedit/Makefile Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/lib/libedit/Makefile Sun Dec 11 03:57:21 2016 (r309843) @@ -76,7 +76,7 @@ historyn.c: makelist Makefile sh ${.CURDIR}/makelist -n history.c > ${.TARGET} # minimal dependency to make "make depend" optional -editline.o editline.po editline.So editline.ln: \ +editline.o editline.po editline.pico editline.ln: \ common.h emacs.h fcns.c fcns.h help.c help.h vi.h tc1.o: ${.CURDIR}/TEST/tc1.c Modified: stable/11/lib/libprocstat/Makefile ============================================================================== --- stable/11/lib/libprocstat/Makefile Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/lib/libprocstat/Makefile Sun Dec 11 03:57:21 2016 (r309843) @@ -58,13 +58,13 @@ MLINKS+=libprocstat.3 procstat_close.3 \ .if ${MK_CDDL} != "no" CFLAGS+= -DLIBPROCSTAT_ZFS OBJS+= zfs/zfs.o -SOBJS+= zfs/zfs.So +SOBJS+= zfs/zfs.pico POBJS+= zfs/zfs.po SUBDIR= zfs zfs/zfs.o: .PHONY @cd ${.CURDIR}/zfs && ${MAKE} zfs.o -zfs/zfs.So: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs.So +zfs/zfs.pico: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs.pico zfs/zfs.po: .PHONY @cd ${.CURDIR}/zfs && ${MAKE} zfs.po .endif Modified: stable/11/lib/libthr/support/Makefile.inc ============================================================================== --- stable/11/lib/libthr/support/Makefile.inc Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/lib/libthr/support/Makefile.inc Sun Dec 11 03:57:21 2016 (r309843) @@ -15,15 +15,15 @@ CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ SYSCALLS= thr_new SYSCALL_SRC= ${SYSCALLS:S/$/.S/} -SYSCALL_OBJ= ${SYSCALLS:S/$/.So/} +SYSCALL_OBJ= ${SYSCALLS:S/$/.pico/} ${SYSCALL_SRC}: printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} LIBC_OBJS= -SOBJS+= thr_libc.So +SOBJS+= thr_libc.pico CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS} -thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS} +thr_libc.pico: ${SYSCALL_OBJ} ${LIBC_OBJS} ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC} Modified: stable/11/share/mk/bsd.README ============================================================================== --- stable/11/share/mk/bsd.README Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/share/mk/bsd.README Sun Dec 11 03:57:21 2016 (r309843) @@ -114,7 +114,7 @@ the tree where the file gets installed. The profiled libraries are no longer built in a different directory than the regular libraries. A new suffix, ".po", is used to denote a profiled -object. +object, and ".pico" denotes a position-independent relocatable object. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Modified: stable/11/share/mk/bsd.dep.mk ============================================================================== --- stable/11/share/mk/bsd.dep.mk Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/share/mk/bsd.dep.mk Sun Dec 11 03:57:21 2016 (r309843) @@ -152,8 +152,8 @@ ${_D}.o: ${_DSRC} ${OBJS:S/^${_D}.o$//} @rm -f ${.TARGET} ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC:N*.h} .if defined(LIB) -CLEANFILES+= ${_D}.So ${_D}.po -${_D}.So: ${_DSRC} ${SOBJS:S/^${_D}.So$//} +CLEANFILES+= ${_D}.pico ${_D}.po +${_D}.pico: ${_DSRC} ${SOBJS:S/^${_D}.pico$//} @rm -f ${.TARGET} ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC:N*.h} ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//} Modified: stable/11/share/mk/bsd.lib.mk ============================================================================== --- stable/11/share/mk/bsd.lib.mk Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/share/mk/bsd.lib.mk Sun Dec 11 03:57:21 2016 (r309843) @@ -77,9 +77,9 @@ CTFFLAGS+= -g .include # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries -# .So used for PIC object files +# .pico used for PIC object files .SUFFIXES: -.SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln +.SUFFIXES: .out .o .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln .if !defined(PICFLAG) .if ${MACHINE_CPUARCH} == "sparc64" @@ -99,7 +99,7 @@ PO_FLAG=-pg ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} -.c.So: +.c.pico: ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} @@ -109,18 +109,18 @@ PO_FLAG=-pg .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.cc.So .C.So .cpp.So .cxx.So: +.cc.pico .C.pico .cpp.pico .cxx.pico: ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} ${CTFCONVERT_CMD} -.f.So: +.f.pico: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} ${CTFCONVERT_CMD} -.s.po .s.So: +.s.po .s.pico: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} ${CTFCONVERT_CMD} @@ -129,7 +129,7 @@ PO_FLAG=-pg ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} -.asm.So: +.asm.pico: ${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${PICFLAG} -DPIC \ ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} @@ -139,7 +139,7 @@ PO_FLAG=-pg -o ${.TARGET} ${CTFCONVERT_CMD} -.S.So: +.S.pico: ${CC:N${CCACHE_BIN}} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} @@ -207,7 +207,7 @@ lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) -SOBJS+= ${OBJS:.o=.So} +SOBJS+= ${OBJS:.o=.pico} DEPENDOBJS+= ${SOBJS} CLEANFILES+= ${SOBJS} .endif @@ -430,7 +430,7 @@ OBJS_DEPEND_GUESS.${_S:R}.po+= ${_S} .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) .for _S in ${SRCS:N*.[hly]} -OBJS_DEPEND_GUESS.${_S:R}.So+= ${_S} +OBJS_DEPEND_GUESS.${_S:R}.pico+= ${_S} .endfor .endif Modified: stable/11/share/mk/meta.autodep.mk ============================================================================== --- stable/11/share/mk/meta.autodep.mk Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/share/mk/meta.autodep.mk Sun Dec 11 03:57:21 2016 (r309843) @@ -23,7 +23,7 @@ __${_this}__: .NOTMAIN .if defined(SRCS) # it would be nice to be able to query .SUFFIXES -OBJ_EXTENSIONS+= .o .po .lo .So +OBJ_EXTENSIONS+= .o .po .lo .pico # explicit dependencies help short-circuit .SUFFIX searches SRCS_DEP_FILTER+= N*.[hly] @@ -179,7 +179,7 @@ DEPEND_SUFFIXES += .c .h .cpp .hpp .cxx @case "${.MAKE.META.FILES:T:M*.po.*}" in \ *.po.*) mv $@.${.MAKE.PID} $@;; \ *) { cat $@.${.MAKE.PID}; \ - sed 's,\.So:,.o:,;s,\.o:,.po:,' $@.${.MAKE.PID}; } | sort -u > $@; \ + sed 's,\.pico:,.o:,;s,\.o:,.po:,' $@.${.MAKE.PID}; } | sort -u > $@; \ rm -f $@.${.MAKE.PID};; \ esac .else @@ -244,7 +244,7 @@ META_FILES = *.meta .elif ${OPTIMIZE_OBJECT_META_FILES:Uno:tl} == "no" META_FILES = ${.MAKE.META.FILES:T:N.depend*:O:u} .else -# if we have 1000's of .o.meta, .So.meta etc we need only look at one set +# if we have 1000's of .o.meta, .pico.meta etc we need only look at one set # it is left as an exercise for the reader to work out what this does META_FILES = ${.MAKE.META.FILES:T:N.depend*:N*o.meta:O:u} \ ${.MAKE.META.FILES:T:M*.${.MAKE.META.FILES:M*o.meta:R:E:O:u:[1]}.meta:O:u} Modified: stable/11/sys/conf/kern.post.mk ============================================================================== --- stable/11/sys/conf/kern.post.mk Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/sys/conf/kern.post.mk Sun Dec 11 03:57:21 2016 (r309843) @@ -165,7 +165,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} .endfor kernel-clean: - rm -f *.o *.so *.So *.ko *.s eddep errs \ + rm -f *.o *.so *.pico *.ko *.s eddep errs \ ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ linterrs tags vers.c \ vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ @@ -180,9 +180,9 @@ lint: ${LNFILES} # dynamic references. We could probably do a '-Bforcedynamic' mode like # in the a.out ld. For now, this works. HACK_EXTRA_FLAGS?= -shared -hack.So: Makefile +hack.pico: Makefile :> hack.c - ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So + ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico rm -f hack.c assym.s: $S/kern/genassym.sh genassym.o Modified: stable/11/sys/conf/kern.pre.mk ============================================================================== --- stable/11/sys/conf/kern.pre.mk Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/sys/conf/kern.pre.mk Sun Dec 11 03:57:21 2016 (r309843) @@ -176,7 +176,7 @@ SYSTEM_CFILES= config.c env.c hints.c vn SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} -SYSTEM_OBJS+= hack.So +SYSTEM_OBJS+= hack.pico MD_ROOT_SIZE_CONFIGURED!= grep MD_ROOT_SIZE opt_md.h || true ; echo .if ${MFS_IMAGE:Uno} != "no" Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sun Dec 11 02:01:59 2016 (r309842) +++ stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sun Dec 11 03:57:21 2016 (r309843) @@ -73,7 +73,7 @@ LIBADD= kvm devinfo m geom memstat .include -printcap.So: printcap.c +printcap.pico: printcap.c ${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET} smilint: From owner-svn-src-stable-11@freebsd.org Sun Dec 11 03:59:38 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C5EAC65EB5; Sun, 11 Dec 2016 03:59:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 370281043; Sun, 11 Dec 2016 03:59:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB3xbEQ016729; Sun, 11 Dec 2016 03:59:37 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB3xbc1016728; Sun, 11 Dec 2016 03:59:37 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201612110359.uBB3xbc1016728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 11 Dec 2016 03:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309844 - stable/11/usr.bin/mkimg X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 03:59:38 -0000 Author: marcel Date: Sun Dec 11 03:59:37 2016 New Revision: 309844 URL: https://svnweb.freebsd.org/changeset/base/309844 Log: MFC r306299: Update local variable 'block' after calling capacity_resize(), otherwise format_resize(), which is called right after, isn't getting the current/actual image size. Rather than rounding up, format_resize() could end up truncating the size and we don't allow that by design. Modified: stable/11/usr.bin/mkimg/mkimg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkimg/mkimg.c ============================================================================== --- stable/11/usr.bin/mkimg/mkimg.c Sun Dec 11 03:57:21 2016 (r309843) +++ stable/11/usr.bin/mkimg/mkimg.c Sun Dec 11 03:59:37 2016 (r309844) @@ -463,13 +463,16 @@ mkimg(void) block = scheme_metadata(SCHEME_META_IMG_END, block); error = image_set_size(block); - if (!error) + if (!error) { error = capacity_resize(block); - if (!error) + block = image_get_size(); + } + if (!error) { error = format_resize(block); + block = image_get_size(); + } if (error) errc(EX_IOERR, error, "image sizing"); - block = image_get_size(); ncyls = block / (nsecs * nheads); error = scheme_write(block); if (error) From owner-svn-src-stable-11@freebsd.org Sun Dec 11 04:02:40 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03462C70099; Sun, 11 Dec 2016 04:02:40 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B457A14A6; Sun, 11 Dec 2016 04:02:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB42cnq020577; Sun, 11 Dec 2016 04:02:38 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB42c1x020576; Sun, 11 Dec 2016 04:02:38 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201612110402.uBB42c1x020576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 11 Dec 2016 04:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309845 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 04:02:40 -0000 Author: marcel Date: Sun Dec 11 04:02:38 2016 New Revision: 309845 URL: https://svnweb.freebsd.org/changeset/base/309845 Log: MFC r309394, r309787 Fix use-after-free bugs in pfsync(4) Modified: stable/11/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/if_pfsync.c ============================================================================== --- stable/11/sys/netpfil/pf/if_pfsync.c Sun Dec 11 03:59:37 2016 (r309844) +++ stable/11/sys/netpfil/pf/if_pfsync.c Sun Dec 11 04:02:38 2016 (r309845) @@ -161,8 +161,8 @@ static struct pfsync_q pfsync_qs[] = { { pfsync_out_del, sizeof(struct pfsync_del_c), PFSYNC_ACT_DEL_C } }; -static void pfsync_q_ins(struct pf_state *, int); -static void pfsync_q_del(struct pf_state *); +static void pfsync_q_ins(struct pf_state *, int, bool); +static void pfsync_q_del(struct pf_state *, bool); static void pfsync_update_state(struct pf_state *); @@ -542,7 +542,7 @@ pfsync_state_import(struct pfsync_state if (!(flags & PFSYNC_SI_IOCTL)) { st->state_flags &= ~PFSTATE_NOSYNC; if (st->state_flags & PFSTATE_ACK) { - pfsync_q_ins(st, PFSYNC_S_IACK); + pfsync_q_ins(st, PFSYNC_S_IACK, true); pfsync_push(sc); } } @@ -1509,7 +1509,7 @@ pfsync_sendout(int schedswi) struct ip *ip; struct pfsync_header *ph; struct pfsync_subheader *subh; - struct pf_state *st; + struct pf_state *st, *st_next; struct pfsync_upd_req_item *ur; int offset; int q, count = 0; @@ -1559,7 +1559,7 @@ pfsync_sendout(int schedswi) offset += sizeof(*subh); count = 0; - TAILQ_FOREACH(st, &sc->sc_qs[q], sync_list) { + TAILQ_FOREACH_SAFE(st, &sc->sc_qs[q], sync_list, st_next) { KASSERT(st->sync_state == q, ("%s: st->sync_state == q", __func__)); @@ -1668,7 +1668,7 @@ pfsync_insert_state(struct pf_state *st) if (sc->sc_len == PFSYNC_MINPKT) callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif); - pfsync_q_ins(st, PFSYNC_S_INS); + pfsync_q_ins(st, PFSYNC_S_INS, true); PFSYNC_UNLOCK(sc); st->sync_updates = 0; @@ -1789,7 +1789,7 @@ static void pfsync_update_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; - int sync = 0; + bool sync = false, ref = true; PF_STATE_LOCK_ASSERT(st); PFSYNC_LOCK(sc); @@ -1798,7 +1798,7 @@ pfsync_update_state(struct pf_state *st) pfsync_undefer_state(st, 0); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st); + pfsync_q_del(st, true); PFSYNC_UNLOCK(sc); return; } @@ -1815,14 +1815,17 @@ pfsync_update_state(struct pf_state *st) if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) { st->sync_updates++; if (st->sync_updates >= sc->sc_maxupdates) - sync = 1; + sync = true; } break; case PFSYNC_S_IACK: - pfsync_q_del(st); + pfsync_q_del(st, false); + ref = false; + /* FALLTHROUGH */ + case PFSYNC_S_NONE: - pfsync_q_ins(st, PFSYNC_S_UPD_C); + pfsync_q_ins(st, PFSYNC_S_UPD_C, ref); st->sync_updates = 0; break; @@ -1880,13 +1883,14 @@ static void pfsync_update_state_req(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; + bool ref = true; PF_STATE_LOCK_ASSERT(st); PFSYNC_LOCK(sc); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st); + pfsync_q_del(st, true); PFSYNC_UNLOCK(sc); return; } @@ -1894,9 +1898,12 @@ pfsync_update_state_req(struct pf_state switch (st->sync_state) { case PFSYNC_S_UPD_C: case PFSYNC_S_IACK: - pfsync_q_del(st); + pfsync_q_del(st, false); + ref = false; + /* FALLTHROUGH */ + case PFSYNC_S_NONE: - pfsync_q_ins(st, PFSYNC_S_UPD); + pfsync_q_ins(st, PFSYNC_S_UPD, ref); pfsync_push(sc); break; @@ -1917,13 +1924,14 @@ static void pfsync_delete_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; + bool ref = true; PFSYNC_LOCK(sc); if (st->state_flags & PFSTATE_ACK) pfsync_undefer_state(st, 1); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st); + pfsync_q_del(st, true); PFSYNC_UNLOCK(sc); return; } @@ -1934,22 +1942,24 @@ pfsync_delete_state(struct pf_state *st) switch (st->sync_state) { case PFSYNC_S_INS: /* We never got to tell the world so just forget about it. */ - pfsync_q_del(st); + pfsync_q_del(st, true); break; case PFSYNC_S_UPD_C: case PFSYNC_S_UPD: case PFSYNC_S_IACK: - pfsync_q_del(st); - /* FALLTHROUGH to putting it on the del list */ + pfsync_q_del(st, false); + ref = false; + /* FALLTHROUGH */ case PFSYNC_S_NONE: - pfsync_q_ins(st, PFSYNC_S_DEL); + pfsync_q_ins(st, PFSYNC_S_DEL, ref); break; default: panic("%s: unexpected sync state %d", __func__, st->sync_state); } + PFSYNC_UNLOCK(sc); } @@ -1977,7 +1987,7 @@ pfsync_clear_states(u_int32_t creatorid, } static void -pfsync_q_ins(struct pf_state *st, int q) +pfsync_q_ins(struct pf_state *st, int q, bool ref) { struct pfsync_softc *sc = V_pfsyncif; size_t nlen = pfsync_qs[q].len; @@ -2001,11 +2011,12 @@ pfsync_q_ins(struct pf_state *st, int q) sc->sc_len += nlen; TAILQ_INSERT_TAIL(&sc->sc_qs[q], st, sync_list); st->sync_state = q; - pf_ref_state(st); + if (ref) + pf_ref_state(st); } static void -pfsync_q_del(struct pf_state *st) +pfsync_q_del(struct pf_state *st, bool unref) { struct pfsync_softc *sc = V_pfsyncif; int q = st->sync_state; @@ -2017,7 +2028,8 @@ pfsync_q_del(struct pf_state *st) sc->sc_len -= pfsync_qs[q].len; TAILQ_REMOVE(&sc->sc_qs[q], st, sync_list); st->sync_state = PFSYNC_S_NONE; - pf_release_state(st); + if (unref) + pf_release_state(st); if (TAILQ_EMPTY(&sc->sc_qs[q])) sc->sc_len -= sizeof(struct pfsync_subheader); From owner-svn-src-stable-11@freebsd.org Sun Dec 11 06:08:03 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83AC5C71941; Sun, 11 Dec 2016 06:08:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51D169B6; Sun, 11 Dec 2016 06:08:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB682fU069095; Sun, 11 Dec 2016 06:08:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB682JB069091; Sun, 11 Dec 2016 06:08:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612110608.uBB682JB069091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 11 Dec 2016 06:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309846 - in stable/11: contrib/libdivsufsort usr.bin/bsdiff/bsdiff X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 06:08:03 -0000 Author: delphij Date: Sun Dec 11 06:08:01 2016 New Revision: 309846 URL: https://svnweb.freebsd.org/changeset/base/309846 Log: MFC r303285: Change bsdiff to use divsufsort suffix sort library instead of qsufsort, which is more efficient. Note that for now we do not create a separate library for libdivsufsort because it's not used anywhere else. Obtained from: Chromium Added: stable/11/contrib/libdivsufsort/ - copied from r303285, head/contrib/libdivsufsort/ stable/11/usr.bin/bsdiff/bsdiff/config.h - copied unchanged from r303285, head/usr.bin/bsdiff/bsdiff/config.h stable/11/usr.bin/bsdiff/bsdiff/divsufsort64.h - copied unchanged from r303285, head/usr.bin/bsdiff/bsdiff/divsufsort64.h Modified: stable/11/usr.bin/bsdiff/bsdiff/Makefile stable/11/usr.bin/bsdiff/bsdiff/bsdiff.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/bsdiff/bsdiff/Makefile ============================================================================== --- stable/11/usr.bin/bsdiff/bsdiff/Makefile Sun Dec 11 04:02:38 2016 (r309845) +++ stable/11/usr.bin/bsdiff/bsdiff/Makefile Sun Dec 11 06:08:01 2016 (r309846) @@ -1,6 +1,17 @@ # $FreeBSD$ -PROG= bsdiff +PROG= bsdiff + +# libdivsufsort configured with: +# cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_DIVSUFSORT64=ON +.PATH: ${.CURDIR}/../../../contrib/libdivsufsort/lib +CFLAGS+= -DHAVE_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE +CFLAGS+= -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS +CFLAGS+= -D__STDC_LIMIT_MACROS -DBUILD_DIVSUFSORT64 +CFLAGS+= -I${.CURDIR}/../../../contrib/libdivsufsort/include -I${.CURDIR} +SRCS= divsufsort.c sssort.c trsort.c utils.c + +SRCS+= bsdiff.c LIBADD= bz2 Modified: stable/11/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- stable/11/usr.bin/bsdiff/bsdiff/bsdiff.c Sun Dec 11 04:02:38 2016 (r309845) +++ stable/11/usr.bin/bsdiff/bsdiff/bsdiff.c Sun Dec 11 06:08:01 2016 (r309846) @@ -44,106 +44,11 @@ __FBSDID("$FreeBSD$"); #define O_BINARY 0 #endif -#define MIN(x,y) (((x)<(y)) ? (x) : (y)) - -static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h) -{ - off_t i,j,k,x,tmp,jj,kk; - - if(len<16) { - for(k=start;kstart) split(I,V,start,jj-start,h); - - for(i=0;ikk) split(I,V,kk,start+len-kk,h); -} - -static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize) -{ - off_t buckets[256]; - off_t i,h,len; - - for(i=0;i<256;i++) buckets[i]=0; - for(i=0;i0;i--) buckets[i]=buckets[i-1]; - buckets[0]=0; - - for(i=0;i + +#ifndef DIVSUFSORT_API +# ifdef DIVSUFSORT_BUILD_DLL +# define DIVSUFSORT_API +# else +# define DIVSUFSORT_API +# endif +#endif + +/*- Datatypes -*/ +#ifndef SAUCHAR_T +#define SAUCHAR_T +typedef uint8_t sauchar_t; +#endif /* SAUCHAR_T */ +#ifndef SAINT_T +#define SAINT_T +typedef int32_t saint_t; +#endif /* SAINT_T */ +#ifndef SAIDX64_T +#define SAIDX64_T +typedef int64_t saidx64_t; +#endif /* SAIDX64_T */ +#ifndef PRIdSAINT_T +#define PRIdSAINT_T PRId32 +#endif /* PRIdSAINT_T */ +#ifndef PRIdSAIDX64_T +#define PRIdSAIDX64_T PRId64 +#endif /* PRIdSAIDX64_T */ + + +/*- Prototypes -*/ + +/** + * Constructs the suffix array of a given string. + * @param T[0..n-1] The input string. + * @param SA[0..n-1] The output array of suffixes. + * @param n The length of the given string. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saint_t +divsufsort64(const sauchar_t *T, saidx64_t *SA, saidx64_t n); + +/** + * Constructs the burrows-wheeler transformed string of a given string. + * @param T[0..n-1] The input string. + * @param U[0..n-1] The output string. (can be T) + * @param A[0..n-1] The temporary array. (can be NULL) + * @param n The length of the given string. + * @return The primary index if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saidx64_t +divbwt64(const sauchar_t *T, sauchar_t *U, saidx64_t *A, saidx64_t n); + +/** + * Returns the version of the divsufsort library. + * @return The version number string. + */ +DIVSUFSORT_API +const char * +divsufsort64_version(void); + + +/** + * Constructs the burrows-wheeler transformed string of a given string and suffix array. + * @param T[0..n-1] The input string. + * @param U[0..n-1] The output string. (can be T) + * @param SA[0..n-1] The suffix array. (can be NULL) + * @param n The length of the given string. + * @param idx The output primary index. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saint_t +bw_transform64(const sauchar_t *T, sauchar_t *U, + saidx64_t *SA /* can NULL */, + saidx64_t n, saidx64_t *idx); + +/** + * Inverse BW-transforms a given BWTed string. + * @param T[0..n-1] The input string. + * @param U[0..n-1] The output string. (can be T) + * @param A[0..n-1] The temporary array. (can be NULL) + * @param n The length of the given string. + * @param idx The primary index. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saint_t +inverse_bw_transform64(const sauchar_t *T, sauchar_t *U, + saidx64_t *A /* can NULL */, + saidx64_t n, saidx64_t idx); + +/** + * Checks the correctness of a given suffix array. + * @param T[0..n-1] The input string. + * @param SA[0..n-1] The input suffix array. + * @param n The length of the given string. + * @param verbose The verbose mode. + * @return 0 if no error occurred. + */ +DIVSUFSORT_API +saint_t +sufcheck64(const sauchar_t *T, const saidx64_t *SA, saidx64_t n, saint_t verbose); + +/** + * Search for the pattern P in the string T. + * @param T[0..Tsize-1] The input string. + * @param Tsize The length of the given string. + * @param P[0..Psize-1] The input pattern string. + * @param Psize The length of the given pattern string. + * @param SA[0..SAsize-1] The input suffix array. + * @param SAsize The length of the given suffix array. + * @param idx The output index. + * @return The count of matches if no error occurred, -1 otherwise. + */ +DIVSUFSORT_API +saidx64_t +sa_search64(const sauchar_t *T, saidx64_t Tsize, + const sauchar_t *P, saidx64_t Psize, + const saidx64_t *SA, saidx64_t SAsize, + saidx64_t *left); + +/** + * Search for the character c in the string T. + * @param T[0..Tsize-1] The input string. + * @param Tsize The length of the given string. + * @param SA[0..SAsize-1] The input suffix array. + * @param SAsize The length of the given suffix array. + * @param c The input character. + * @param idx The output index. + * @return The count of matches if no error occurred, -1 otherwise. + */ +DIVSUFSORT_API +saidx64_t +sa_simplesearch64(const sauchar_t *T, saidx64_t Tsize, + const saidx64_t *SA, saidx64_t SAsize, + saint_t c, saidx64_t *left); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* _DIVSUFSORT64_H */ From owner-svn-src-stable-11@freebsd.org Sun Dec 11 07:33:04 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52C7DC709AA; Sun, 11 Dec 2016 07:33:04 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13321F5F; Sun, 11 Dec 2016 07:33:04 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB7X3eR005814; Sun, 11 Dec 2016 07:33:03 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB7X3o2005809; Sun, 11 Dec 2016 07:33:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612110733.uBB7X3o2005809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 11 Dec 2016 07:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309847 - in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 07:33:04 -0000 Author: delphij Date: Sun Dec 11 07:33:02 2016 New Revision: 309847 URL: https://svnweb.freebsd.org/changeset/base/309847 Log: MFC r308420: MFV r308392: file 5.29. Added: stable/11/contrib/file/magic/Magdir/algol68 - copied unchanged from r308420, head/contrib/file/magic/Magdir/algol68 stable/11/contrib/file/magic/Magdir/application - copied unchanged from r308420, head/contrib/file/magic/Magdir/application stable/11/contrib/file/magic/Magdir/apt - copied unchanged from r308420, head/contrib/file/magic/Magdir/apt stable/11/contrib/file/magic/Magdir/psl - copied unchanged from r308420, head/contrib/file/magic/Magdir/psl Modified: stable/11/contrib/file/ChangeLog stable/11/contrib/file/TODO stable/11/contrib/file/config.guess stable/11/contrib/file/config.sub stable/11/contrib/file/configure stable/11/contrib/file/configure.ac stable/11/contrib/file/doc/file.man stable/11/contrib/file/doc/magic.man stable/11/contrib/file/ltmain.sh stable/11/contrib/file/magic/Magdir/animation stable/11/contrib/file/magic/Magdir/apple stable/11/contrib/file/magic/Magdir/bioinformatics stable/11/contrib/file/magic/Magdir/c-lang stable/11/contrib/file/magic/Magdir/claris stable/11/contrib/file/magic/Magdir/commands stable/11/contrib/file/magic/Magdir/compress stable/11/contrib/file/magic/Magdir/cups stable/11/contrib/file/magic/Magdir/editors stable/11/contrib/file/magic/Magdir/filesystems stable/11/contrib/file/magic/Magdir/fonts stable/11/contrib/file/magic/Magdir/gcc stable/11/contrib/file/magic/Magdir/gnu stable/11/contrib/file/magic/Magdir/images stable/11/contrib/file/magic/Magdir/jpeg stable/11/contrib/file/magic/Magdir/msdos stable/11/contrib/file/magic/Magdir/pgp stable/11/contrib/file/magic/Magdir/python stable/11/contrib/file/magic/Magdir/ruby stable/11/contrib/file/magic/Magdir/sgml stable/11/contrib/file/magic/Magdir/sql stable/11/contrib/file/magic/Makefile.am stable/11/contrib/file/magic/Makefile.in stable/11/contrib/file/python/magic.py stable/11/contrib/file/src/apprentice.c stable/11/contrib/file/src/ascmagic.c stable/11/contrib/file/src/cdf.c stable/11/contrib/file/src/cdf.h stable/11/contrib/file/src/compress.c stable/11/contrib/file/src/der.c stable/11/contrib/file/src/file.c stable/11/contrib/file/src/file.h stable/11/contrib/file/src/funcs.c stable/11/contrib/file/src/magic.c stable/11/contrib/file/src/readcdf.c stable/11/contrib/file/src/readelf.c stable/11/contrib/file/src/softmagic.c stable/11/lib/libmagic/config.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/file/ChangeLog ============================================================================== --- stable/11/contrib/file/ChangeLog Sun Dec 11 06:08:01 2016 (r309846) +++ stable/11/contrib/file/ChangeLog Sun Dec 11 07:33:02 2016 (r309847) @@ -1,3 +1,32 @@ +2016-10-25 10:40 Christos Zoulas + + * release 5.28 + +2016-10-24 11:20 Christos Zoulas + + * der getlength overflow (Jonas Wagner) + * multiple magic file load failure (Christoph Biedl) + +2016-10-17 11:26 Christos Zoulas + + * CDF parsing improvements (Guy Helmer) + +2016-07-20 7:26 Christos Zoulas + + * Add support for signed indirect offsets + +2016-07-18 7:41 Christos Zoulas + + * cat /dev/null | file - should print empty (Christoph Biedl) + +2016-07-05 15:20 Christos Zoulas + + * Bump string size from 64 to 96. + +2016-06-13 20:20 Christos Zoulas + + * PR/556: Fix separators on annotations. + 2016-06-13 19:40 Christos Zoulas * release 5.28 Modified: stable/11/contrib/file/TODO ============================================================================== --- stable/11/contrib/file/TODO Sun Dec 11 06:08:01 2016 (r309846) +++ stable/11/contrib/file/TODO Sun Dec 11 07:33:02 2016 (r309847) @@ -6,7 +6,6 @@ file, not here. More speculative materia listed in the BUGS section of the man page had been fixed!) --- - It would be nice to simplify file considerably. For example, reimplement the apprentice and non-pattern magic methods in Python, and compile the magic patterns to a giant regex (or something similar; @@ -15,8 +14,23 @@ small amount of C is needed (because fas required for soft magic, not the more detailed information given by hard-wired routines). In this regard, note that hplip, which is BSD-licensed, has a magic reimplementation in Python. - +--- Read the kerberos magic entry for more ideas. - +--- Write a string merger to make magic entry sizes dynamic. Strings will be converted to offsets from the string table. +--- +Programming language support, we can introduce the concept of a group +of rules where n rules need to match before the rule is positive. This +could require structural changes to the matching code :-( + +0 group 2 # require 2 matches +# rule 1 +>0 .... +... +# rule 2 +>0 .... +... + +christos + Modified: stable/11/contrib/file/config.guess ============================================================================== --- stable/11/contrib/file/config.guess Sun Dec 11 06:08:01 2016 (r309846) +++ stable/11/contrib/file/config.guess Sun Dec 11 07:33:02 2016 (r309847) @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2015-03-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -153,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -182,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -198,7 +227,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` @@ -302,7 +335,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -560,8 +593,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -801,10 +835,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +889,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +916,57 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +985,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1245,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1274,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1315,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,157 +1389,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2409C727C7; Sun, 11 Dec 2016 08:14:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 915DB15F4; Sun, 11 Dec 2016 08:14:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB8Eg2e022483; Sun, 11 Dec 2016 08:14:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB8EgSu022482; Sun, 11 Dec 2016 08:14:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612110814.uBB8EgSu022482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 11 Dec 2016 08:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309850 - stable/11/usr.bin/gzip X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 08:14:43 -0000 Author: delphij Date: Sun Dec 11 08:14:42 2016 New Revision: 309850 URL: https://svnweb.freebsd.org/changeset/base/309850 Log: MFC r304875: Use printable ASCII instead of octal representation. Modified: stable/11/usr.bin/gzip/gzip.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/gzip/gzip.c ============================================================================== --- stable/11/usr.bin/gzip/gzip.c Sun Dec 11 07:39:10 2016 (r309849) +++ stable/11/usr.bin/gzip/gzip.c Sun Dec 11 08:14:42 2016 (r309850) @@ -88,7 +88,7 @@ enum filetype { #include #define BZ2_SUFFIX ".bz2" -#define BZIP2_MAGIC "\102\132\150" +#define BZIP2_MAGIC "BZh" #endif #ifndef NO_COMPRESS_SUPPORT From owner-svn-src-stable-11@freebsd.org Sun Dec 11 18:42:18 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A2CDC729F0; Sun, 11 Dec 2016 18:42:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2761301; Sun, 11 Dec 2016 18:42:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBBIgHBh081811; Sun, 11 Dec 2016 18:42:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBBIgHw1081810; Sun, 11 Dec 2016 18:42:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612111842.uBBIgHw1081810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Dec 2016 18:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309853 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 18:42:18 -0000 Author: kib Date: Sun Dec 11 18:42:17 2016 New Revision: 309853 URL: https://svnweb.freebsd.org/changeset/base/309853 Log: MFC r309539: Restructure the code to handle reporting of non-exited processes from wait(2). Modified: stable/11/sys/kern/kern_exit.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_exit.c ============================================================================== --- stable/11/sys/kern/kern_exit.c Sun Dec 11 17:15:25 2016 (r309852) +++ stable/11/sys/kern/kern_exit.c Sun Dec 11 18:42:17 2016 (r309853) @@ -1106,6 +1106,38 @@ kern_wait(struct thread *td, pid_t pid, return (ret); } +static void +report_alive_proc(struct thread *td, struct proc *p, siginfo_t *siginfo, + int *status, int options, int si_code) +{ + bool cont; + + PROC_LOCK_ASSERT(p, MA_OWNED); + sx_assert(&proctree_lock, SA_XLOCKED); + MPASS(si_code == CLD_TRAPPED || si_code == CLD_STOPPED || + si_code == CLD_CONTINUED); + + cont = si_code == CLD_CONTINUED; + if ((options & WNOWAIT) == 0) { + if (cont) + p->p_flag &= ~P_CONTINUED; + else + p->p_flag |= P_WAITED; + PROC_LOCK(td->td_proc); + sigqueue_take(p->p_ksi); + PROC_UNLOCK(td->td_proc); + } + sx_xunlock(&proctree_lock); + if (siginfo != NULL) { + siginfo->si_code = si_code; + siginfo->si_status = cont ? SIGCONT : p->p_xsig; + } + if (status != NULL) + *status = cont ? SIGCONT : W_STOPCODE(p->p_xsig); + PROC_UNLOCK(p); + td->td_retval[0] = p->p_pid; +} + int kern_wait6(struct thread *td, idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo) @@ -1163,82 +1195,41 @@ loop: } PROC_LOCK(p); - PROC_SLOCK(p); + + if ((options & (WTRAPPED | WUNTRACED)) != 0) + PROC_SLOCK(p); if ((options & WTRAPPED) != 0 && (p->p_flag & P_TRACED) != 0 && (p->p_flag & (P_STOPPED_TRACE | P_STOPPED_SIG)) != 0 && - (p->p_suspcount == p->p_numthreads) && - ((p->p_flag & P_WAITED) == 0)) { + p->p_suspcount == p->p_numthreads && + (p->p_flag & P_WAITED) == 0) { PROC_SUNLOCK(p); - if ((options & WNOWAIT) == 0) - p->p_flag |= P_WAITED; - sx_xunlock(&proctree_lock); - - if (status != NULL) - *status = W_STOPCODE(p->p_xsig); - if (siginfo != NULL) { - siginfo->si_status = p->p_xsig; - siginfo->si_code = CLD_TRAPPED; - } - if ((options & WNOWAIT) == 0) { - PROC_LOCK(q); - sigqueue_take(p->p_ksi); - PROC_UNLOCK(q); - } - CTR4(KTR_PTRACE, - "wait: returning trapped pid %d status %#x (xstat %d) xthread %d", + "wait: returning trapped pid %d status %#x " + "(xstat %d) xthread %d", p->p_pid, W_STOPCODE(p->p_xsig), p->p_xsig, - p->p_xthread != NULL ? p->p_xthread->td_tid : -1); - PROC_UNLOCK(p); - td->td_retval[0] = pid; + p->p_xthread != NULL ? + p->p_xthread->td_tid : -1); + report_alive_proc(td, p, siginfo, status, options, + CLD_TRAPPED); return (0); - } + } if ((options & WUNTRACED) != 0 && (p->p_flag & P_STOPPED_SIG) != 0 && - (p->p_suspcount == p->p_numthreads) && - ((p->p_flag & P_WAITED) == 0)) { + p->p_suspcount == p->p_numthreads && + (p->p_flag & P_WAITED) == 0) { PROC_SUNLOCK(p); - if ((options & WNOWAIT) == 0) - p->p_flag |= P_WAITED; - sx_xunlock(&proctree_lock); - - if (status != NULL) - *status = W_STOPCODE(p->p_xsig); - if (siginfo != NULL) { - siginfo->si_status = p->p_xsig; - siginfo->si_code = CLD_STOPPED; - } - if ((options & WNOWAIT) == 0) { - PROC_LOCK(q); - sigqueue_take(p->p_ksi); - PROC_UNLOCK(q); - } - - PROC_UNLOCK(p); - td->td_retval[0] = pid; + report_alive_proc(td, p, siginfo, status, options, + CLD_STOPPED); return (0); } - PROC_SUNLOCK(p); + if ((options & (WTRAPPED | WUNTRACED)) != 0) + PROC_SUNLOCK(p); if ((options & WCONTINUED) != 0 && (p->p_flag & P_CONTINUED) != 0) { - sx_xunlock(&proctree_lock); - if ((options & WNOWAIT) == 0) { - p->p_flag &= ~P_CONTINUED; - PROC_LOCK(q); - sigqueue_take(p->p_ksi); - PROC_UNLOCK(q); - } - PROC_UNLOCK(p); - - if (status != NULL) - *status = SIGCONT; - if (siginfo != NULL) { - siginfo->si_status = SIGCONT; - siginfo->si_code = CLD_CONTINUED; - } - td->td_retval[0] = pid; + report_alive_proc(td, p, siginfo, status, options, + CLD_CONTINUED); return (0); } PROC_UNLOCK(p); From owner-svn-src-stable-11@freebsd.org Sun Dec 11 19:58:15 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03BB2C72BEC; Sun, 11 Dec 2016 19:58:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB10B1625; Sun, 11 Dec 2016 19:58:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBBJwEoR011758; Sun, 11 Dec 2016 19:58:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBBJwDvN011757; Sun, 11 Dec 2016 19:58:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612111958.uBBJwDvN011757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 11 Dec 2016 19:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309857 - in stable: 10/contrib/llvm/lib/Analysis 11/contrib/llvm/lib/Analysis 9/contrib/llvm/lib/Analysis X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 19:58:15 -0000 Author: dim Date: Sun Dec 11 19:58:13 2016 New Revision: 309857 URL: https://svnweb.freebsd.org/changeset/base/309857 Log: MFC r309722: Pull in r281586 from upstream llvm trunk (by Wei Mi): Add some shortcuts in LazyValueInfo to reduce compile time of Correlated Value Propagation. The patch is to partially fix PR10584. Correlated Value Propagation queries LVI to check non-null for pointer params of each callsite. If we know the def of param is an alloca instruction, we know it is non-null and can return early from LVI. Similarly, CVP queries LVI to check whether pointer for each mem access is constant. If the def of the pointer is an alloca instruction, we know it is not a constant pointer. These shortcuts can reduce the cost of CVP significantly. Differential Revision: https://reviews.llvm.org/D18066 This significantly reduces memory usage and compilation time when compiling a particular C++ source file of the graphics/colmap port. PR: 215136 Modified: stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Directory Properties: stable/10/ (props changed) stable/9/contrib/llvm/ (props changed) Modified: stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Sun Dec 11 19:50:39 2016 (r309856) +++ stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Sun Dec 11 19:58:13 2016 (r309857) @@ -1203,8 +1203,27 @@ void LazyValueInfo::releaseMemory() { } } + +/// Returns true if we can statically tell that this value will never be a +/// "useful" constant. In practice, this means we've got something like an +/// alloca or a malloc call for which a comparison against a constant can +/// only be guarding dead code. Note that we are potentially giving up some +/// precision in dead code (a constant result) in favour of avoiding a +/// expensive search for a easily answered common query. +static bool isKnownNonConstant(Value *V) { + V = V->stripPointerCasts(); + // The return val of alloc cannot be a Constant. + if (isa(V)) + return true; + return false; +} + Constant *LazyValueInfo::getConstant(Value *V, BasicBlock *BB, Instruction *CxtI) { + // Bail out early if V is known not to be a Constant. + if (isKnownNonConstant(V)) + return nullptr; + const DataLayout &DL = BB->getModule()->getDataLayout(); LVILatticeVal Result = getCache(PImpl, AC, &DL, DT).getValueInBlock(V, BB, CxtI); @@ -1322,6 +1341,17 @@ LazyValueInfo::getPredicateOnEdge(unsign LazyValueInfo::Tristate LazyValueInfo::getPredicateAt(unsigned Pred, Value *V, Constant *C, Instruction *CxtI) { + // Is or is not NonNull are common predicates being queried. If + // isKnownNonNull can tell us the result of the predicate, we can + // return it quickly. But this is only a fastpath, and falling + // through would still be correct. + if (V->getType()->isPointerTy() && C->isNullValue() && + isKnownNonNull(V->stripPointerCasts())) { + if (Pred == ICmpInst::ICMP_EQ) + return LazyValueInfo::False; + else if (Pred == ICmpInst::ICMP_NE) + return LazyValueInfo::True; + } const DataLayout &DL = CxtI->getModule()->getDataLayout(); LVILatticeVal Result = getCache(PImpl, AC, &DL, DT).getValueAt(V, CxtI); Tristate Ret = getPredicateResult(Pred, C, Result, DL, TLI); From owner-svn-src-stable-11@freebsd.org Sun Dec 11 23:36:12 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AEFCC73A7D; Sun, 11 Dec 2016 23:36:12 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FFFF1B23; Sun, 11 Dec 2016 23:36:12 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBBNaB0F001116; Sun, 11 Dec 2016 23:36:11 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBBNaB9u001115; Sun, 11 Dec 2016 23:36:11 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201612112336.uBBNaB9u001115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Sun, 11 Dec 2016 23:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309859 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 23:36:12 -0000 Author: hiren Date: Sun Dec 11 23:36:11 2016 New Revision: 309859 URL: https://svnweb.freebsd.org/changeset/base/309859 Log: MFC r307745 In sendit(), if mp->msg_control is present, then in sockargs() we are allocating mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(), will check validity of file pointer passed, if this fails EBADF is returned but mbuf allocated in sockargs() is not freed. Made code changes to free the same. Since freeing control mbuf in sendit() after checking (control != NULL) may lead to double freeing of control mbuf in sendit(), we can free control mbuf in kern_sendit() if there are any errors in the routine. Submitted by: Lohith Bellad Modified: stable/11/sys/kern/uipc_syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_syscalls.c ============================================================================== --- stable/11/sys/kern/uipc_syscalls.c Sun Dec 11 23:14:47 2016 (r309858) +++ stable/11/sys/kern/uipc_syscalls.c Sun Dec 11 23:36:11 2016 (r309859) @@ -806,8 +806,10 @@ kern_sendit(td, s, mp, flags, control, s cap_rights_set(&rights, CAP_CONNECT); } error = getsock_cap(td, s, &rights, &fp, NULL); - if (error != 0) + if (error != 0) { + m_freem(control); return (error); + } so = (struct socket *)fp->f_data; #ifdef KTRACE @@ -818,12 +820,16 @@ kern_sendit(td, s, mp, flags, control, s if (mp->msg_name != NULL) { error = mac_socket_check_connect(td->td_ucred, so, mp->msg_name); - if (error != 0) + if (error != 0) { + m_freem(control); goto bad; + } } error = mac_socket_check_send(td->td_ucred, so); - if (error != 0) + if (error != 0) { + m_freem(control); goto bad; + } #endif auio.uio_iov = mp->msg_iov; @@ -837,6 +843,7 @@ kern_sendit(td, s, mp, flags, control, s for (i = 0; i < mp->msg_iovlen; i++, iov++) { if ((auio.uio_resid += iov->iov_len) < 0) { error = EINVAL; + m_freem(control); goto bad; } } From owner-svn-src-stable-11@freebsd.org Mon Dec 12 00:45:44 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90351C6F623; Mon, 12 Dec 2016 00:45:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 457E212F0; Mon, 12 Dec 2016 00:45:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC0jhx5029508; Mon, 12 Dec 2016 00:45:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC0jhQN029506; Mon, 12 Dec 2016 00:45:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612120045.uBC0jhQN029506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 12 Dec 2016 00:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309861 - stable/11/usr.bin/sort X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 00:45:44 -0000 Author: delphij Date: Mon Dec 12 00:45:43 2016 New Revision: 309861 URL: https://svnweb.freebsd.org/changeset/base/309861 Log: MFC r309232-309234: r309232: Fix an obvious typo. r309233: Eliminate variables that are computed, assigned but never used. r309234: pages and psize are always assigned, so there is no need to initialize them as zero. Modified: stable/11/usr.bin/sort/bwstring.c stable/11/usr.bin/sort/sort.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sort/bwstring.c ============================================================================== --- stable/11/usr.bin/sort/bwstring.c Mon Dec 12 00:09:08 2016 (r309860) +++ stable/11/usr.bin/sort/bwstring.c Mon Dec 12 00:45:43 2016 (r309861) @@ -910,7 +910,6 @@ bws_month_score(const struct bwstring *s if (MB_CUR_MAX == 1) { const unsigned char *end, *s; - size_t len; s = s0->data.cstr; end = s + s0->len; @@ -918,8 +917,6 @@ bws_month_score(const struct bwstring *s while (isblank(*s) && s < end) ++s; - len = strlen((const char*)s); - for (int i = 11; i >= 0; --i) { if (cmonths[i] && (s == (unsigned char*)strstr((const char*)s, (char*)(cmonths[i])))) @@ -928,7 +925,6 @@ bws_month_score(const struct bwstring *s } else { const wchar_t *end, *s; - size_t len; s = s0->data.wstr; end = s + s0->len; @@ -936,8 +932,6 @@ bws_month_score(const struct bwstring *s while (iswblank(*s) && s < end) ++s; - len = wcslen(s); - for (int i = 11; i >= 0; --i) { if (wmonths[i] && (s == wcsstr(s, wmonths[i]))) return (i); Modified: stable/11/usr.bin/sort/sort.c ============================================================================== --- stable/11/usr.bin/sort/sort.c Mon Dec 12 00:09:08 2016 (r309860) +++ stable/11/usr.bin/sort/sort.c Mon Dec 12 00:45:43 2016 (r309861) @@ -209,14 +209,10 @@ sort_modifier_empty(struct sort_mods *sm static void usage(bool opt_err) { - struct option *o; FILE *out; - out = stdout; - o = &(long_options[0]); + out = opt_err ? stderr : stdout; - if (opt_err) - out = stderr; fprintf(out, getstr(12), getprogname()); if (opt_err) exit(2); @@ -271,8 +267,6 @@ set_hw_params(void) { long pages, psize; - pages = psize = 0; - #if defined(SORT_THREADS) ncpu = 1; #endif @@ -280,7 +274,7 @@ set_hw_params(void) pages = sysconf(_SC_PHYS_PAGES); if (pages < 1) { perror("sysconf pages"); - psize = 1; + pages = 1; } psize = sysconf(_SC_PAGESIZE); if (psize < 1) { From owner-svn-src-stable-11@freebsd.org Mon Dec 12 02:13:37 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3BE8C73E9B; Mon, 12 Dec 2016 02:13:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9DEA7B; Mon, 12 Dec 2016 02:13:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC2DZAf065830; Mon, 12 Dec 2016 02:13:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC2DZVE065829; Mon, 12 Dec 2016 02:13:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612120213.uBC2DZVE065829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 12 Dec 2016 02:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309866 - stable/11/bin/kenv X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 02:13:37 -0000 Author: delphij Date: Mon Dec 12 02:13:35 2016 New Revision: 309866 URL: https://svnweb.freebsd.org/changeset/base/309866 Log: MFC r309238,309239: r309238: Plug a potential memory leak. r309239: style(9). Modified: stable/11/bin/kenv/kenv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/kenv/kenv.c ============================================================================== --- stable/11/bin/kenv/kenv.c Mon Dec 12 02:12:51 2016 (r309865) +++ stable/11/bin/kenv/kenv.c Mon Dec 12 02:13:35 2016 (r309866) @@ -63,7 +63,6 @@ main(int argc, char **argv) char *env, *eq, *val; int ch, error; - error = 0; val = NULL; env = NULL; while ((ch = getopt(argc, argv, "hNquv")) != -1) { @@ -128,7 +127,7 @@ main(int argc, char **argv) static int kdumpenv(void) { - char *buf, *cp; + char *buf, *bp, *cp; int buflen, envlen; envlen = kenv(KENV_DUMP, NULL, NULL, 0); @@ -136,10 +135,9 @@ kdumpenv(void) return (-1); for (;;) { buflen = envlen * 120 / 100; - buf = malloc(buflen + 1); + buf = calloc(1, buflen + 1); if (buf == NULL) return (-1); - memset(buf, 0, buflen + 1); /* Be defensive */ envlen = kenv(KENV_DUMP, NULL, buf, buflen); if (envlen < 0) { free(buf); @@ -151,21 +149,23 @@ kdumpenv(void) break; } - for (; *buf != '\0'; buf += strlen(buf) + 1) { + for (bp = buf; *bp != '\0'; bp += strlen(bp) + 1) { if (hflag) { - if (strncmp(buf, "hint.", 5) != 0) + if (strncmp(bp, "hint.", 5) != 0) continue; } - cp = strchr(buf, '='); + cp = strchr(bp, '='); if (cp == NULL) continue; *cp++ = '\0'; if (Nflag) - printf("%s\n", buf); + printf("%s\n", bp); else - printf("%s=\"%s\"\n", buf, cp); - buf = cp; + printf("%s=\"%s\"\n", bp, cp); + bp = cp; } + + free(buf); return (0); } @@ -190,7 +190,7 @@ ksetenv(const char *env, char *val) { int ret; - ret = kenv(KENV_SET, env, val, strlen(val)+1); + ret = kenv(KENV_SET, env, val, strlen(val) + 1); if (ret == 0) printf("%s=\"%s\"\n", env, val); return (ret); @@ -200,7 +200,7 @@ static int kunsetenv(const char *env) { int ret; - + ret = kenv(KENV_UNSET, env, NULL, 0); return (ret); } From owner-svn-src-stable-11@freebsd.org Mon Dec 12 02:20:21 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C45AC730F0; Mon, 12 Dec 2016 02:20:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B77676E; Mon, 12 Dec 2016 02:20:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC2KKAu066314; Mon, 12 Dec 2016 02:20:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC2KKAX066313; Mon, 12 Dec 2016 02:20:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612120220.uBC2KKAX066313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 12 Dec 2016 02:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309868 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 02:20:21 -0000 Author: delphij Date: Mon Dec 12 02:20:20 2016 New Revision: 309868 URL: https://svnweb.freebsd.org/changeset/base/309868 Log: MFC r309241,309243: Plug memory leaks. Modified: stable/11/usr.sbin/ctld/ctld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/ctld.c ============================================================================== --- stable/11/usr.sbin/ctld/ctld.c Mon Dec 12 02:14:42 2016 (r309867) +++ stable/11/usr.sbin/ctld/ctld.c Mon Dec 12 02:20:20 2016 (r309868) @@ -401,6 +401,7 @@ auth_portal_new(struct auth_group *ag, c return (ap); error: + free(str); free(ap); log_warnx("incorrect initiator portal \"%s\"", portal); return (NULL); @@ -675,8 +676,10 @@ parse_addr_port(char *arg, const char *d */ arg++; addr = strsep(&arg, "]"); - if (arg == NULL) + if (arg == NULL) { + free(str); return (1); + } if (arg[0] == '\0') { port = def_port; } else if (arg[0] == ':') { From owner-svn-src-stable-11@freebsd.org Mon Dec 12 02:24:55 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8C9FC7336D; Mon, 12 Dec 2016 02:24:55 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75AFBE87; Mon, 12 Dec 2016 02:24:55 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC2OsE4070206; Mon, 12 Dec 2016 02:24:54 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC2OsSC070200; Mon, 12 Dec 2016 02:24:54 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201612120224.uBC2OsSC070200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 12 Dec 2016 02:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309872 - stable/11/usr.sbin/ypldap X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 02:24:55 -0000 Author: araujo Date: Mon Dec 12 02:24:54 2016 New Revision: 309872 URL: https://svnweb.freebsd.org/changeset/base/309872 Log: MFC r309392, r309393 r309392: String terminators are called NUL, not NULL, also the variable mentioned in the comment is p and not u. Obtained from: OpenBSD (r1.34) r309393: Use memset(3) instead of bzero(3). Obtained from: OpenBSD (r1.12, r1.20, r1.18 and r1.37) Modified: stable/11/usr.sbin/ypldap/aldap.c stable/11/usr.sbin/ypldap/ldapclient.c stable/11/usr.sbin/ypldap/yp.c stable/11/usr.sbin/ypldap/ypldap.c stable/11/usr.sbin/ypldap/ypldap_dns.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ypldap/aldap.c ============================================================================== --- stable/11/usr.sbin/ypldap/aldap.c Mon Dec 12 02:24:46 2016 (r309871) +++ stable/11/usr.sbin/ypldap/aldap.c Mon Dec 12 02:24:54 2016 (r309872) @@ -1206,7 +1206,7 @@ isu8cont(unsigned char c) /* * Parse a LDAP value * notes: - * the argument u should be a NULL terminated sequence of ASCII bytes. + * the argument p should be a NUL-terminated sequence of ASCII bytes. */ char * parseval(char *p, size_t len) Modified: stable/11/usr.sbin/ypldap/ldapclient.c ============================================================================== --- stable/11/usr.sbin/ypldap/ldapclient.c Mon Dec 12 02:24:46 2016 (r309871) +++ stable/11/usr.sbin/ypldap/ldapclient.c Mon Dec 12 02:24:54 2016 (r309872) @@ -363,7 +363,7 @@ ldapclient(int pipe_main2client[2]) return (pid); } - bzero(&env, sizeof(env)); + memset(&env, 0, sizeof(env)); TAILQ_INIT(&env.sc_idms); if ((pw = getpwnam(YPLDAP_USER)) == NULL) @@ -437,7 +437,7 @@ client_build_req(struct idm *idm, struct char **ldap_attrs; int i, k; - bzero(ir, sizeof(*ir)); + memset(ir, 0, sizeof(*ir)); for (i = min_attr; i < max_attr; i++) { if (idm->idm_flags & F_FIXED_ATTR(i)) { if (strlcat(ir->ir_line, idm->idm_attrs[i], @@ -594,7 +594,7 @@ client_try_idm(struct env *env, struct i aldap_freemsg(m); } - bzero(attrs, sizeof(attrs)); + memset(attrs, 0, sizeof(attrs)); for (i = 0, j = 0; i < ATTR_MAX; i++) { if (idm->idm_flags & F_FIXED_ATTR(i)) continue; @@ -611,7 +611,7 @@ client_try_idm(struct env *env, struct i idm->idm_filters[FILTER_USER], 0, ATTR_MAX, IMSG_PW_ENTRY) == -1) goto bad; - bzero(attrs, sizeof(attrs)); + memset(attrs, 0, sizeof(attrs)); for (i = ATTR_GR_MIN, j = 0; i < ATTR_GR_MAX; i++) { if (idm->idm_flags & F_FIXED_ATTR(i)) continue; Modified: stable/11/usr.sbin/ypldap/yp.c ============================================================================== --- stable/11/usr.sbin/ypldap/yp.c Mon Dec 12 02:24:46 2016 (r309871) +++ stable/11/usr.sbin/ypldap/yp.c Mon Dec 12 02:24:54 2016 (r309872) @@ -342,7 +342,7 @@ ypproc_match_2_svc(ypreq_key *arg, struc log_debug("argument too long"); return (NULL); } - bzero(key, sizeof(key)); + memset(key, 0, sizeof(key)); (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); if (strcmp(arg->map, "passwd.byname") == 0 || @@ -486,7 +486,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct if (strcmp(arg->map, "passwd.byname") == 0 || strcmp(arg->map, "master.passwd.byname") == 0) { - bzero(key, sizeof(key)); + memset(key, 0, sizeof(key)); (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); ukey.ue_line = key; @@ -517,7 +517,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct } else if (strcmp(arg->map, "group.byname") == 0) { - bzero(key, sizeof(key)); + memset(key, 0, sizeof(key)); (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); @@ -567,7 +567,7 @@ ypproc_master_2_svc(ypreq_nokey *arg, st static struct ypresp_master res; static char master[YPMAXPEER + 1]; - bzero(&res, sizeof(res)); + memset(&res, 0, sizeof(res)); if (yp_valid_domain(arg->domain, (struct ypresp_val *)&res) == -1) return (&res); @@ -620,7 +620,7 @@ yp_make_val(struct ypresp_val *res, char { static char buf[LINE_WIDTH]; - bzero(buf, sizeof(buf)); + memset(buf, 0, sizeof(buf)); if (replacecolon) line[strlen(line)] = ':'; @@ -640,8 +640,8 @@ yp_make_keyval(struct ypresp_key_val *re static char keybuf[YPMAXRECORD+1]; static char buf[LINE_WIDTH]; - bzero(keybuf, sizeof(keybuf)); - bzero(buf, sizeof(buf)); + memset(keybuf, 0, sizeof(keybuf)); + memset(buf, 0, sizeof(buf)); (void)strlcpy(keybuf, key, sizeof(keybuf)); res->key.keydat_len = strlen(keybuf); Modified: stable/11/usr.sbin/ypldap/ypldap.c ============================================================================== --- stable/11/usr.sbin/ypldap/ypldap.c Mon Dec 12 02:24:46 2016 (r309871) +++ stable/11/usr.sbin/ypldap/ypldap.c Mon Dec 12 02:24:54 2016 (r309872) @@ -609,7 +609,7 @@ main(int argc, char *argv[]) #warning disabling privilege revocation in debug mode #endif - bzero(&tv, sizeof(tv)); + memset(&tv, 0, sizeof(tv)); evtimer_set(&ev_timer, main_init_timer, &env); evtimer_add(&ev_timer, &tv); Modified: stable/11/usr.sbin/ypldap/ypldap_dns.c ============================================================================== --- stable/11/usr.sbin/ypldap/ypldap_dns.c Mon Dec 12 02:24:46 2016 (r309871) +++ stable/11/usr.sbin/ypldap/ypldap_dns.c Mon Dec 12 02:24:54 2016 (r309872) @@ -212,7 +212,7 @@ host_dns(const char *s, struct ypldap_ad struct sockaddr_in6 *sa_in6; struct ypldap_addr *h; - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; /* DUMMY */ error = getaddrinfo(s, NULL, &hints, &res0); From owner-svn-src-stable-11@freebsd.org Mon Dec 12 06:56:20 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2DCCC73458; Mon, 12 Dec 2016 06:56:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609A5F32; Mon, 12 Dec 2016 06:56:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC6uJ7b082266; Mon, 12 Dec 2016 06:56:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC6uJk3082265; Mon, 12 Dec 2016 06:56:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612120656.uBC6uJk3082265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 06:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309876 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 06:56:20 -0000 Author: bapt Date: Mon Dec 12 06:56:19 2016 New Revision: 309876 URL: https://svnweb.freebsd.org/changeset/base/309876 Log: MFC r309795: Update pci ids database to 2016.11.21 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Mon Dec 12 05:18:03 2016 (r309875) +++ stable/11/share/misc/pci_vendors Mon Dec 12 06:56:19 2016 (r309876) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2016.10.20 -# Date: 2016-10-20 03:15:02 +# Version: 2016.11.21 +# Date: 2016-11-21 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -50,9 +50,11 @@ 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] 0270 Hauppauge computer works Inc. (Wrong ID) +0291 Davicom Semiconductor, Inc. (Wrong ID) # SpeedStream is Efficient Networks, Inc, a Siemens Company 02ac SpeedStream 1012 1012 PCMCIA 10/100 Ethernet Card [RTL81xx] +02e0 XFX Pine Group Inc. (Wrong ID) 0303 Hewlett-Packard Company (Wrong ID) 0308 ZyXEL Communications Corporation (Wrong ID) 0315 SK-Electronics Co., Ltd. @@ -548,12 +550,12 @@ 1028 1fd3 HBA330 MMZ 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) - 1d49 0201 ThinkSystem 9400-16i PCIe 12Gb HBA - 1d49 0203 ThinkSystem 9400-16e PCIe 12Gb HBA + 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA + 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) - 1d49 0200 ThinkSystem 9400-8i PCIe 12Gb HBA - 1d49 0202 ThinkSystem 9400-8e PCIe 12Gb HBA + 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA + 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 00be SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00bf SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00c0 SAS3324 PCI-Express Fusion-MPT SAS-3 @@ -7531,7 +7533,7 @@ 1885 0700 Tsunami FPGA PMC with Altera Stratix S40 1885 0701 Tsunami FPGA PMC with Altera Stratix S30 9733 PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch - 1d49 0001 ThinkSystem P310W-4P NVMe Switch Card + 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch a100 Blackmagic Design DeckLink bb04 B&B 3PCIOSD1A Isolated PCI Serial @@ -8377,6 +8379,7 @@ 1048 0c45 GLoria II 1048 0c4a GLoria II-64 Pro 1048 0c4b GLoria II-64 Pro DVII + 10a9 9002 VPro VR3 0110 NV11 [GeForce2 MX/MX 400] 1043 4015 AGP-V7100 Pro 1043 4021 V7100 Deluxe Combo @@ -10649,6 +10652,7 @@ 1b00 GP102 [TITAN X] 1b01 GP102 1b30 GP102GL [Quadro P6000] + 1b38 GP102GL [Tesla P40] 1b70 GP102GL 1b78 GP102GL 1b80 GP104 [GeForce GTX 1080] @@ -10668,10 +10672,11 @@ 1c03 GP106 [GeForce GTX 1060 6GB] 1c20 GP106M [GeForce GTX 1060] 1c30 GP106GL + 1c35 GP106 1c60 GP106M [GeForce GTX 1060] 1c70 GP106GL 1c80 GP107 - 1c81 GP107 + 1c81 GP107 [GeForce GTX 1050] 1c82 GP107 [GeForce GTX 1050 Ti] 1ca7 GP107GL 1ca8 GP107GL @@ -13729,6 +13734,7 @@ 7375 PM7375 [LASAR-155 ATM SAR] 7384 PM7384 [FREEDM - 84P672 Frm Engine & Datalink Mgr] 8000 PM8000 [SPC - SAS Protocol Controller] + 8009 PM8009 SPCve 8x6G 8032 ATTO Celerity FC8xEN 117c 003b Celerity FC-82EN Fibre Channel Adapter 117c 003c Celerity FC-84EN Fibre Channel Adapter @@ -13742,6 +13748,8 @@ 8071 PM8071 Tachyon SPCve 12G eight-port SAS/SATA controller 8072 PM8072 Tachyon SPCv 12G 16-port SAS/SATA controller 8073 PM8073 Tachyon SPCve 12G 16-port SAS/SATA controller + 8531 PM8531 PFX 24xG3 Fanout PCIe Switches + 8546 PM8546 B-FEIP PSX 96xG3 PCIe Storage Switch 11f9 I-Cube Inc 11fa Kasan Electronics Company, Ltd. 11fb Datel Inc @@ -16213,6 +16221,71 @@ 589a T520-509A Unified Wire Ethernet Controller [VF] 589b T540-509B Unified Wire Ethernet Controller [VF] 589c T520-509C Unified Wire Ethernet Controller [VF] + 6001 T6225-CR Unified Wire Ethernet Controller + 6002 T6225-SO-CR Unified Wire Ethernet Controller + 6003 T6425-CR Unified Wire Ethernet Controller + 6004 T6425-SO-CR Unified Wire Ethernet Controller + 6005 T6225-OCP-SO Unified Wire Ethernet Controller + 6006 T62100-OCP-SO Unified Wire Ethernet Controller + 6007 T62100-LP-CR Unified Wire Ethernet Controller + 6008 T62100-SO-CR Unified Wire Ethernet Controller + 6009 T6210-BT Unified Wire Ethernet Controller + 600d T62100-CR Unified Wire Ethernet Controller + 6011 T6225-LL-CR Unified Wire Ethernet Controller + 6014 T61100-OCP-SO Unified Wire Ethernet Controller + 6015 T6201-BT Unified Wire Ethernet Controller + 6401 T6225-CR Unified Wire Ethernet Controller + 6402 T6225-SO-CR Unified Wire Ethernet Controller + 6403 T6425-CR Unified Wire Ethernet Controller + 6404 T6425-SO-CR Unified Wire Ethernet Controller + 6405 T6225-OCP-SO Unified Wire Ethernet Controller + 6406 T62100-OCP-SO Unified Wire Ethernet Controller + 6407 T62100-LP-CR Unified Wire Ethernet Controller + 6408 T62100-SO-CR Unified Wire Ethernet Controller + 6409 T6210-BT Unified Wire Ethernet Controller + 640d T62100-CR Unified Wire Ethernet Controller + 6411 T6225-LL-CR Unified Wire Ethernet Controller + 6414 T61100-OCP-SO Unified Wire Ethernet Controller + 6415 T6201-BT Unified Wire Ethernet Controller + 6501 T6225-CR Unified Wire Storage Controller + 6502 T6225-SO-CR Unified Wire Storage Controller + 6503 T6425-CR Unified Wire Storage Controller + 6504 T6425-SO-CR Unified Wire Storage Controller + 6505 T6225-OCP-SO Unified Wire Storage Controller + 6506 T62100-OCP-SO Unified Wire Storage Controller + 6507 T62100-LP-CR Unified Wire Storage Controller + 6508 T62100-SO-CR Unified Wire Storage Controller + 6509 T6210-BT Unified Wire Storage Controller + 650d T62100-CR Unified Wire Storage Controller + 6511 T6225-LL-CR Unified Wire Storage Controller + 6514 T61100-OCP-SO Unified Wire Storage Controller + 6515 T6201-BT Unified Wire Storage Controller + 6601 T6225-CR Unified Wire Storage Controller + 6602 T6225-SO-CR Unified Wire Storage Controller + 6603 T6425-CR Unified Wire Storage Controller + 6604 T6425-SO-CR Unified Wire Storage Controller + 6605 T6225-OCP-SO Unified Wire Storage Controller + 6606 T62100-OCP-SO Unified Wire Storage Controller + 6607 T62100-LP-CR Unified Wire Storage Controller + 6608 T62100-SO-CR Unified Wire Storage Controller + 6609 T6210-BT Unified Wire Storage Controller + 660d T62100-CR Unified Wire Storage Controller + 6611 T6225-LL-CR Unified Wire Storage Controller + 6614 T61100-OCP-SO Unified Wire Storage Controller + 6615 T6201-BT Unified Wire Storage Controller + 6801 T6225-CR Unified Wire Ethernet Controller [VF] + 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] + 6803 T6425-CR Unified Wire Ethernet Controller [VF] + 6804 T6425-SO-CR Unified Wire Ethernet Controller [VF] + 6805 T6225-OCP-SO Unified Wire Ethernet Controller [VF] + 6806 T62100-OCP-SO Unified Wire Ethernet Controller [VF] + 6807 T62100-LP-CR Unified Wire Ethernet Controller [VF] + 6808 T62100-SO-CR Unified Wire Ethernet Controller [VF] + 6809 T6210-BT Unified Wire Ethernet Controller [VF] + 680d T62100-CR Unified Wire Ethernet Controller [VF] + 6811 T6225-LL-CR Unified Wire Ethernet Controller [VF] + 6814 T61100-OCP-SO Unified Wire Ethernet Controller [VF] + 6815 T6201-BT Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -16923,6 +16996,7 @@ 16bc BCM57765/57785 SDXC/MMC Card Reader 16be BCM57765/57785 MS Card Reader 16bf BCM57765/57785 xD-Picture Card Reader + 16c1 NetXtreme-E RDMA Virtual Function 16c6 NetXtreme BCM5702A3 Gigabit Ethernet 10b7 1100 3C1000B-T 10/100/1000 PCI 14e4 000c BCM5702 1000Base-T @@ -16969,7 +17043,9 @@ 16e8 BCM57406 NetXtreme-E Ethernet Partition 16e9 BCM57407 NetXtreme-E 25Gb Ethernet Controller 16ec BCM57414 NetXtreme-E Ethernet Partition + 16ed BCM57414 NetXtreme-E RDMA Partition 16ee BCM57416 NetXtreme-E Ethernet Partition + 16ef BCM57416 NetXtreme-E RDMA Partition 16f3 NetXtreme BCM5727 Gigabit Ethernet PCIe 16f7 NetXtreme BCM5753 Gigabit Ethernet PCI Express 16fd NetXtreme BCM5753M Gigabit Ethernet PCI Express @@ -17896,6 +17972,7 @@ 0209 MT27700 Family [ConnectX-4 Flash Recovery] 020b MT27710 Family [ConnectX-4 Lx Flash Recovery] 020d MT28800 Family [ConnectX-5 Flash Recovery] + 020f MT28908A0 Family [ConnectX-6 Flash Recovery] # reserved for RM#105916 024e MT53100 [Spectrum-2, Flash recovery mode] # Actual value to be used @@ -17913,6 +17990,7 @@ 1005 MT27510 Family 1006 MT27511 Family 1007 MT27520 Family [ConnectX-3 Pro] + 1014 04eb 2-Port 10GbE NIC and RoCE SR PCIe3 103c 22f3 InfiniBand FDR/Ethernet 10Gb/40Gb 2-port 544+QSFP Adapter 103c 22f4 InfiniBand FDR/Ethernet 10Gb/40Gb 2-port 544+FLR-QSFP Adapter 103c 801f Ethernet 10G 2-port 546SFP+ Adapter @@ -17938,8 +18016,8 @@ 1018 MT27800 Family [ConnectX-5 Virtual Function] 1019 MT28800 Family [ConnectX-5 Ex] 101a MT28800 Family [ConnectX-5 Ex Virtual Function] - 101b MT28831 - 101c MT28840 + 101b MT28908 Family [ConnectX-6] + 101c MT28908 Family [ConnectX-6 Virtual Function] 101d MT28841 101e MT28850 101f MT28851 @@ -17969,6 +18047,7 @@ 103c 1781 NC543i 1-port 4x QDR IB/Flex-10 10Gb Adapter 103c 3349 NC543i 2-port 4xQDR IB/10Gb Adapter 6750 MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s] + 1014 0461 2-Port 10 GbE RoCE SR LP PCIe2 (rev b0) 15b3 0018 HP 10 GbE PCI-e G2 Dual-Port NIC (rev C1) 675a MT25408 [ConnectX EN 10GigE 10GBaseT, PCIe Gen2 5GT/s] 6764 MT26468 [ConnectX EN 10GigE, PCIe 2.0 5GT/s Virtualization+] @@ -17981,8 +18060,8 @@ 7121 NPS-600 configuration and management interface 7122 NPS-600 network interface PF 7123 NPS-600 network interface VF - a2d0 MT416842 - a2d1 MT416842 + a2d0 MT416842 BlueField SoC Crypto enabled + a2d1 MT416842 BlueField SoC Crypto disabled a2d3 MT416842 BlueField multicore SoC family VF # SwitchX-2, 40GbE switch c738 MT51136 @@ -19231,7 +19310,7 @@ 18bc GeCube Technologies, Inc. 18c3 Micronas Semiconductor Holding AG 0720 nGene PCI-Express Multimedia Controller - 07ca 032e Hybrid M779 PCI-E + 1461 032e Hybrid M779 PCI-E # Nee Octigabay System 18c8 Cray Inc 18c9 ARVOO Engineering BV @@ -19330,6 +19409,8 @@ 0155 NT100E3-1-PTP Network Adapter 1x100Gb 0165 NT80E3-2-PTP Network Adapter 2x40Gb 0175 NT20E3-2-PTP Network Adapter 2x10Gb + 0185 NT40A01-4x1 Network Adapter 4x1Gb + 01a5 NT200A01 Network Adapter 2x100Gb 18f6 NextIO 1000 [Nexsis] Switch Virtual P2P PCIe Bridge 1001 [Texsis] Switch Virtual P2P PCIe Bridge @@ -19763,6 +19844,7 @@ 0714 OneConnect 10Gb FCoE Initiator (be3) 103c 3315 NC553i 10Gb 2-port FlexFabric Converged Network Adapter 103c 337b NC554FLB 10Gb 2-port FlexFabric Converged Network Adapter + 0800 ServerView iRMC HTI 19a8 DAQDATA GmbH 19ac Kasten Chase Applied Research 0001 ACA2400 Crypto Accelerator @@ -20121,7 +20203,9 @@ 1bb1 6523 Nytro XP6500-8A4096 0100 Nytro Flash Storage 1bb1 0101 Nytro XF1440 + 1bb1 0103 Nytro 5000 1bb1 0121 Nytro XM1440 + 1bb1 0123 Nytro 5000 1bb1 01a1 Nytro XP7102 1bb3 Bluecherry 4304 BC-04120A MPEG4 4 port video encoder / decoder @@ -20179,7 +20263,9 @@ 00a5 FBC2XLG Capture 2x40Gb 00a6 FBC1CG Capture 1x100Gb 00a9 FBC2XGHH Capture 2x10Gb + 00ad FBC2CGG3HL Capture 2x200Gb 00af Capture slave device + a001 FBC2CGG3 Capture 2x200Gb # Used on V120 VME Crate Controller 1c32 Highland Technology, Inc. 1c33 Daktronics, Inc @@ -20259,10 +20345,15 @@ 100b K35-2SFP 100c K35-4SFP 100d AR-ARKA-FX0 [Arkville 32B DPDK Data Mover] + 1d6c 2001 DPDK-Aware Virtual Function [Arkville VF] 100e AR-ARKA-FX1 [Arkville 64B DPDK Data Mover] + 1d6c 2001 DPDK-Aware Virtual Function [Arkville VF] 4200 A5PL-E1-10GETI [10 GbE Ethernet Traffic Instrument] 1d78 DERA +1d7c Aerotech, Inc. 1d8f Enyx +1d95 Graphcore Ltd +1da1 Teko Telecom S.r.l. 1de1 Tekram Technology Co.,Ltd. 0391 TRM-S1040 [DC-315 / DC-395 series] 2020 DC-390 @@ -20346,6 +20437,7 @@ 2bd8 ROPEX Industrie-Elektronik GmbH 3000 Hansol Electronics Inc. 3112 Satelco Ingenieria S.A. +3130 AUDIOTRAK 3142 Post Impression Systems. 31ab Zonet 1faa ZEW1602 802.11b/g Wireless Adapter @@ -22681,6 +22773,8 @@ 8086 5004 Ethernet 10G 2P X540-t Adapter 1529 82599 10 Gigabit Dual Port Network Connection with FCoE 152a 82599 10 Gigabit Dual Port Backplane Connection with FCoE + 152e 82599 Virtual Function + 1530 X540 Virtual Function 1533 I210 Gigabit Network Connection 103c 0003 Ethernet I210-T1 GbE NIC 1093 7706 Compact Vision System Ethernet Adapter @@ -22736,6 +22830,7 @@ 8086 0001 Ethernet Converged Network Adapter X550-T2 8086 001a Ethernet Converged Network Adapter X550-T2 8086 0022 Ethernet Converged Network Adapter X550-T2 + 1564 X550 Virtual Function 1565 X550 Virtual Function 1566 DSL4410 Thunderbolt NHI [Redwood Ridge 2C 2013] 1567 DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] @@ -22755,10 +22850,12 @@ 103c 0000 Ethernet 10Gb 562SFP+ Adapter 103c 22fc HP Ethernet 10Gb 2-port 562FLR-SFP+ Adapter 103c 22fd HP Ethernet 10Gb 2-port 562SFP+ Adapter - 1137 0000 Ethernet Converged NIC X710-4 - 1137 013b Ethernet Converged NIC X710-4 - 1590 0000 Ethernet 10GbE 4P 563SFP+ Adapter + 1137 0000 Ethernet Converged NIC X710-DA + 1137 013b Ethernet Converged NIC X710-DA4 + 1137 020a Ethernet Converged NIC X710-DA2 + 1590 0000 Ethernet Controller X710 for 10GbE SFP+ 1590 0225 Ethernet 10GbE 4P 563SFP+ Adapter + 1590 022f Ethernet 10Gb 2-port 564i Communication Board 17aa 0000 ThinkServer X710 AnyFabric for 10GbE SFP+ 17aa 4001 ThinkServer X710-4 AnyFabric for 10GbE SFP+ 17aa 4002 ThinkServer X710-2 AnyFabric for 10GbE SFP+ @@ -22775,7 +22872,7 @@ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ 8086 0010 Ethernet Converged Network Adapter X710 - 8086 4005 Ethernet Controller XL710 for 10 Gigabit SFP+ + 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ 1575 DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] 1576 DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] @@ -22847,12 +22944,14 @@ 15a4 Ethernet Switch FM10000 Host Interface 15a5 Ethernet Switch FM10000 Host Virtual Interface 15a8 Ethernet Connection X552 Virtual Function + 15a9 X552 Virtual Function 15aa Ethernet Connection X552 10 GbE Backplane 1059 0120 T4008 10GbE interface 15ab Ethernet Connection X552 10 GbE Backplane 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T 15ae Ethernet Connection X552 1000BASE-T + 15b4 X553 Virtual Function 15b5 DSL6340 USB 3.1 Controller [Alpine Ridge] 15b6 DSL6540 USB 3.1 Controller [Alpine Ridge] 15b7 Ethernet Connection (2) I219-LM @@ -22860,6 +22959,7 @@ 15b9 Ethernet Connection (3) I219-LM 15bf JHL6240 Thunderbolt 3 NHI (Low Power) [Alpine Ridge LP 2016] 15c0 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] + 15c5 X553 Virtual Function 15d0 Ethernet SDI Adapter FM10420-100GbE-QDA2 15d1 Ethernet Controller 10G X550T 8086 0002 Ethernet Converged Network Adapter X550-T1 @@ -22974,7 +23074,30 @@ e4bf 3100 CX1-BAND 1962 80960RM (i960RM) Microprocessor 105a 0000 SuperTrak SX6000 I2O CPU + 19ac DNV SMBus Contoller - Host + 19b0 DNV SATA Controller 0 + 19b1 DNV SATA Controller 0 + 19b2 DNV SATA Controller 0 + 19b3 DNV SATA Controller 0 + 19b4 DNV SATA Controller 0 + 19b5 DNV SATA Controller 0 + 19b6 DNV SATA Controller 0 + 19b7 DNV SATA Controller 0 + 19be DNV SATA Controller 0 + 19bf DNV SATA Controller 0 + 19c0 DNV SATA Controller 1 + 19c1 DNV SATA Controller 1 + 19c2 DNV SATA Controller 1 + 19c3 DNV SATA Controller 1 + 19c4 DNV SATA Controller 1 + 19c5 DNV SATA Controller 1 + 19c6 DNV SATA Controller 1 + 19c7 DNV SATA Controller 1 + 19ce DNV SATA Controller 1 + 19cf DNV SATA Controller 1 + 19dc DNV LPC or eSPI 19df DNV SMBus controller + 19e0 DNV SPI Controller 1a21 82840 840 [Carmel] Chipset Host Bridge (Hub A) 1a23 82840 840 [Carmel] Chipset AGP Bridge 1a24 82840 840 [Carmel] Chipset PCI Bridge (Hub B) @@ -25845,6 +25968,9 @@ 2f09 Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 2f0a Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 2f0b Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 + 2f0d Haswell Xeon Non-Transparent Bridge (Back-to-back) + 2f0e Haswell Xeon Non-Transparent Bridge (Primary Side) + 2f0f Haswell Xeon Non-Transparent Bridge (Secondary Side) 2f10 Xeon E7 v3/Xeon E5 v3/Core i7 IIO Debug 2f11 Xeon E7 v3/Xeon E5 v3/Core i7 IIO Debug 2f12 Xeon E7 v3/Xeon E5 v3/Core i7 IIO Debug @@ -26272,19 +26398,22 @@ 17aa 4023 Intel Ethernet Connection X722 for 10GbE backplane 37cf Ethernet Connection X722 for 10GbE QSFP+ 37d0 Ethernet Connection X722 for 10GbE SFP+ + 17aa 4020 Intel Ethernet Connection X722 for 10G SFP+ + 17aa 4021 Intel Ethernet Connection X722 for 10G SFP+ + 17aa 4022 Ethernet Connection X722 for 10GbE SFP+ 37d1 Ethernet Connection X722 for 1GbE + 1590 0216 Ethernet 1Gb 2-port 368i Adapter + 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter 17aa 4020 Intel Ethernet Connection X722 for 1GbE 17aa 4021 Intel Ethernet Connection X722 for 1GbE 17aa 4022 Intel Ethernet Connection X722 for 1GbE - 8086 4020 Ethernet Connection X722 for 1GbE - 8086 4021 Ethernet Connection X722 for 1GbE - 8086 4022 Ethernet Connection X722 for 1GbE 37d2 Ethernet Connection X722 for 10GBASE-T + 1590 0218 Ethernet 10Gb 2-port 568FLR-MMT Adapter 17aa 4020 Intel Ethernet Connection X722 for 10GBASE 17aa 4021 Intel Ethernet Connection X722 for 10GBASE - 8086 4020 Ethernet Connection X722 for 10GBASE - 8086 4021 Ethernet Connection X722 for 10GBASE + 17aa 4022 Ethernet Connection X722 for 10GBASE-T 37d3 Ethernet Connection X722 for 10GbE SFP+ + 1590 0219 Ethernet 10Gb 2-port 568FLR-MMSFP+ Adapter 37d4 Ethernet Connection X722 for 10GbE QSFP+ 37d9 X722 Hyper-V Virtual Function 3a00 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller @@ -27641,6 +27770,7 @@ a16a Sunrise Point-H PCI Root Port #20 a170 Sunrise Point-H HD Audio a182 Lewisburg SATA Controller [AHCI mode] + a186 Lewisburg SATA Controller [RAID mode] a190 Lewisburg PCI Express Root Port #1 a191 Lewisburg PCI Express Root Port #2 a192 Lewisburg PCI Express Root Port #3 @@ -27676,6 +27806,7 @@ a1c6 Lewisburg LPC Controller a1c7 Lewisburg LPC Controller a1d2 Lewisburg SSATA Controller [AHCI mode] + a1d6 Lewisburg SSATA Controller [RAID mode] a1e7 Lewisburg PCI Express Root Port #17 a1e8 Lewisburg PCI Express Root Port #18 a1e9 Lewisburg PCI Express Root Port #19 @@ -27687,6 +27818,14 @@ a1fa Lewisburg IE: IDE-r a1fb Lewisburg IE: KT Controller a1fc Lewisburg IE: HECI #3 + a202 Lewisburg SATA Controller [AHCI mode] + a206 Lewisburg SATA Controller [RAID mode] + a223 Lewisburg SMBus + a224 Lewisburg SPI Controller + a242 Lewisburg LPC or eSPI Controller + a243 Lewisburg LPC or eSPI Controller + a252 Lewisburg SSATA Controller [AHCI mode] + a256 Lewisburg SSATA Controller [RAID mode] a620 6400/6402 Advanced Memory Buffer (AMB) abc0 Omni-Path Fabric Switch Silicon 100 Series b152 21152 PCI-to-PCI Bridge From owner-svn-src-stable-11@freebsd.org Mon Dec 12 07:00:16 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42DA1C7358B; Mon, 12 Dec 2016 07:00:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11D0C1271; Mon, 12 Dec 2016 07:00:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC70F2s083108; Mon, 12 Dec 2016 07:00:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC70F0s083106; Mon, 12 Dec 2016 07:00:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612120700.uBC70F0s083106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 07:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309878 - in stable/11/contrib/groff: contrib/mm src/utils/afmtodit X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 07:00:16 -0000 Author: bapt Date: Mon Dec 12 07:00:14 2016 New Revision: 309878 URL: https://svnweb.freebsd.org/changeset/base/309878 Log: MFC r309796: Perl is not available in base fix scripts depending on it to use the version from ports PR: 215159 Reported by: Anatoly Kamchatnov Modified: stable/11/contrib/groff/contrib/mm/mmroff.pl stable/11/contrib/groff/src/utils/afmtodit/afmtodit.pl Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/groff/contrib/mm/mmroff.pl ============================================================================== --- stable/11/contrib/groff/contrib/mm/mmroff.pl Mon Dec 12 06:58:44 2016 (r309877) +++ stable/11/contrib/groff/contrib/mm/mmroff.pl Mon Dec 12 07:00:14 2016 (r309878) @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#! /usr/bin/env perl use strict; # runs groff in safe mode, that seems to be the default Modified: stable/11/contrib/groff/src/utils/afmtodit/afmtodit.pl ============================================================================== --- stable/11/contrib/groff/src/utils/afmtodit/afmtodit.pl Mon Dec 12 06:58:44 2016 (r309877) +++ stable/11/contrib/groff/src/utils/afmtodit/afmtodit.pl Mon Dec 12 07:00:14 2016 (r309878) @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! /usr/bin/env perl -w # -*- Perl -*- # Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. From owner-svn-src-stable-11@freebsd.org Mon Dec 12 07:02:55 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E073C7377C; Mon, 12 Dec 2016 07:02:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E17691846; Mon, 12 Dec 2016 07:02:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC72sdq086771; Mon, 12 Dec 2016 07:02:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC72sb7086770; Mon, 12 Dec 2016 07:02:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612120702.uBC72sb7086770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 07:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309880 - stable/11/usr.sbin/pw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 07:02:55 -0000 Author: bapt Date: Mon Dec 12 07:02:53 2016 New Revision: 309880 URL: https://svnweb.freebsd.org/changeset/base/309880 Log: MFC r309803: Fix pw groupshow PR: 204676 Submitted by: longwitz@incore.de Modified: stable/11/usr.sbin/pw/pw_group.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pw/pw_group.c ============================================================================== --- stable/11/usr.sbin/pw/pw_group.c Mon Dec 12 07:01:05 2016 (r309879) +++ stable/11/usr.sbin/pw/pw_group.c Mon Dec 12 07:02:53 2016 (r309880) @@ -282,7 +282,7 @@ int pw_group_show(int argc, char **argv, char *arg1) { struct group *grp = NULL; - char *name; + char *name = NULL; intmax_t id = -1; int ch; bool all, force, quiet, pretty; From owner-svn-src-stable-11@freebsd.org Mon Dec 12 09:43:50 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 140CBC705FE; Mon, 12 Dec 2016 09:43:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D131FA7A; Mon, 12 Dec 2016 09:43:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC9hnxC051228; Mon, 12 Dec 2016 09:43:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC9hmmh051227; Mon, 12 Dec 2016 09:43:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612120943.uBC9hmmh051227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Dec 2016 09:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309882 - stable/11/sys/x86/iommu X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 09:43:50 -0000 Author: kib Date: Mon Dec 12 09:43:48 2016 New Revision: 309882 URL: https://svnweb.freebsd.org/changeset/base/309882 Log: MFC r309550: Rename fast taskqueues used by DMAR. Modified: stable/11/sys/x86/iommu/intel_fault.c stable/11/sys/x86/iommu/intel_qi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/iommu/intel_fault.c ============================================================================== --- stable/11/sys/x86/iommu/intel_fault.c Mon Dec 12 07:03:10 2016 (r309881) +++ stable/11/sys/x86/iommu/intel_fault.c Mon Dec 12 09:43:48 2016 (r309882) @@ -271,7 +271,7 @@ dmar_init_fault_log(struct dmar_unit *un M_DEVBUF, M_WAITOK | M_ZERO); TASK_INIT(&unit->fault_task, 0, dmar_fault_task, unit); - unit->fault_taskqueue = taskqueue_create_fast("dmar", M_WAITOK, + unit->fault_taskqueue = taskqueue_create_fast("dmarff", M_WAITOK, taskqueue_thread_enqueue, &unit->fault_taskqueue); taskqueue_start_threads(&unit->fault_taskqueue, 1, PI_AV, "dmar%d fault taskq", unit->unit); Modified: stable/11/sys/x86/iommu/intel_qi.c ============================================================================== --- stable/11/sys/x86/iommu/intel_qi.c Mon Dec 12 07:03:10 2016 (r309881) +++ stable/11/sys/x86/iommu/intel_qi.c Mon Dec 12 09:43:48 2016 (r309882) @@ -378,7 +378,7 @@ dmar_init_qi(struct dmar_unit *unit) TAILQ_INIT(&unit->tlb_flush_entries); TASK_INIT(&unit->qi_task, 0, dmar_qi_task, unit); - unit->qi_taskqueue = taskqueue_create_fast("dmar", M_WAITOK, + unit->qi_taskqueue = taskqueue_create_fast("dmarqf", M_WAITOK, taskqueue_thread_enqueue, &unit->qi_taskqueue); taskqueue_start_threads(&unit->qi_taskqueue, 1, PI_AV, "dmar%d qi taskq", unit->unit); From owner-svn-src-stable-11@freebsd.org Mon Dec 12 11:02:57 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 291CFC71E83; Mon, 12 Dec 2016 11:02:57 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC0ED155F; Mon, 12 Dec 2016 11:02:56 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCB2uhi083476; Mon, 12 Dec 2016 11:02:56 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCB2uW1083475; Mon, 12 Dec 2016 11:02:56 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201612121102.uBCB2uW1083475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 12 Dec 2016 11:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309884 - stable/11/tools/tools/nanobsd/Files/root X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 11:02:57 -0000 Author: brueffer Date: Mon Dec 12 11:02:55 2016 New Revision: 309884 URL: https://svnweb.freebsd.org/changeset/base/309884 Log: MFC: r309060 Fix comment typo. PR: 208484 Submitted by: madpilot Modified: stable/11/tools/tools/nanobsd/Files/root/save_cfg Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/nanobsd/Files/root/save_cfg ============================================================================== --- stable/11/tools/tools/nanobsd/Files/root/save_cfg Mon Dec 12 10:57:32 2016 (r309883) +++ stable/11/tools/tools/nanobsd/Files/root/save_cfg Mon Dec 12 11:02:55 2016 (r309884) @@ -66,7 +66,7 @@ do # i) -> add file to ignore list (/cfg/.ignore hiereachy) and never save # try to add this file to /cfg. # - # touch is ised to add files to /cfg to keep the script flow straight and easy + # touch is used to add files to /cfg to keep the script flow straight and easy # read -p "New file /etc/$filename found. Add to /cfg (y/n/i)? " key case "$key" in From owner-svn-src-stable-11@freebsd.org Mon Dec 12 17:56:57 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9731AC7415B; Mon, 12 Dec 2016 17:56:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66266CC0; Mon, 12 Dec 2016 17:56:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCHuuux052612; Mon, 12 Dec 2016 17:56:56 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCHuuaZ052611; Mon, 12 Dec 2016 17:56:56 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612121756.uBCHuuaZ052611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 12 Dec 2016 17:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309899 - stable/11/usr.sbin/bsdconfig/share X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 17:56:57 -0000 Author: dteske Date: Mon Dec 12 17:56:56 2016 New Revision: 309899 URL: https://svnweb.freebsd.org/changeset/base/309899 Log: MFC r307402: Guard against bad service name argument(s) to load_rc_config() Modified: stable/11/usr.sbin/bsdconfig/share/sysrc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/share/sysrc.subr ============================================================================== --- stable/11/usr.sbin/bsdconfig/share/sysrc.subr Mon Dec 12 17:47:09 2016 (r309898) +++ stable/11/usr.sbin/bsdconfig/share/sysrc.subr Mon Dec 12 17:56:56 2016 (r309899) @@ -256,7 +256,9 @@ f_sysrc_service_configs() last_name= print_name() { local name="$1" - [ "$name" = "$last_name" ] && return + case "$name" in + ""|.|..|*/*|"$last_name") return ;; + esac echo "$name" >&9 last_name="$name" } From owner-svn-src-stable-11@freebsd.org Mon Dec 12 21:02:35 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FA35C73603; Mon, 12 Dec 2016 21:02:35 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A39F1852; Mon, 12 Dec 2016 21:02:35 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCL2YhU033286; Mon, 12 Dec 2016 21:02:34 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCL2Yof033285; Mon, 12 Dec 2016 21:02:34 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201612122102.uBCL2Yof033285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 12 Dec 2016 21:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309943 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 21:02:35 -0000 Author: ken Date: Mon Dec 12 21:02:34 2016 New Revision: 309943 URL: https://svnweb.freebsd.org/changeset/base/309943 Log: MFC r307684, r307747 ------------------------------------------------------------------------ r307684 | ken | 2016-10-20 13:42:26 -0600 (Thu, 20 Oct 2016) | 13 lines For CCBs allocated on the stack, we need to clear the entire CCB, not just the header. Otherwise stack garbage can lead to random flags getting set. This showed up as 'camcontrol rescan all' failing with EINVAL because the address type wasn't CAM_DATA_VADDR. sbin/camcontrol/camcontrol.c: In rescan_or_reset_bus(), bzero the stack-allocated CCBs before use instead of clearing the body. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r307747 | ken | 2016-10-21 12:54:56 -0600 (Fri, 21 Oct 2016) | 27 lines Fix a problem in camcontrol(8) that cropped up with r307684. In r307684, I changed rescan_or_reset_bus() to bzero stack-allocated CCBs before sending them to the kernel because there was stack garbage in there that wound up meaning that bogus CCB flags were set. While this fixed the 'camcontrol rescan all' case (XPT_DEV_MATCH CCBs were failing previously), it broke the 'camcontrol rescan 0' (or any other number) case when INVARIANTS are turned on. Rescanning a single bus reliably produced an assert in cam_periph_runccb(): panic: cam_periph_runccb: ccb=0xfffff80044ffe000, func_code=0x708, flags=0xffffdde0 The flags values don't make sense from the code. Changing the CCBs in rescan_or_reset_bus() from stack to heap allocated avoids the problem. It would be better to understand why userland stack allocated CCBs don't work properly, since there may be other code that breaks if stack allocated CCBs don't work. sbin/camcontrol/camcontrol.c: In rescan_or_reset_bus(), allocate the CCBs using malloc(3) instead of on the stack to avoid an assertion in cam_periph_runccb(). Sponsored by: Spectra Logic ------------------------------------------------------------------------ Sponsored by: Spectra Logic Modified: stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Mon Dec 12 21:01:20 2016 (r309942) +++ stable/11/sbin/camcontrol/camcontrol.c Mon Dec 12 21:02:34 2016 (r309943) @@ -3127,8 +3127,8 @@ dorescan_or_reset(int argc, char **argv, static int rescan_or_reset_bus(path_id_t bus, int rescan) { - union ccb ccb, matchccb; - int fd, retval; + union ccb *ccb = NULL, *matchccb = NULL; + int fd = -1, retval; int bufsize; retval = 0; @@ -3139,35 +3139,41 @@ rescan_or_reset_bus(path_id_t bus, int r return(1); } + ccb = malloc(sizeof(*ccb)); + if (ccb == NULL) { + warn("failed to allocate CCB"); + retval = 1; + goto bailout; + } + bzero(ccb, sizeof(*ccb)); + if (bus != CAM_BUS_WILDCARD) { - ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; - ccb.ccb_h.path_id = bus; - ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; - ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; - ccb.crcn.flags = CAM_FLAG_NONE; + ccb->ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; + ccb->ccb_h.path_id = bus; + ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; + ccb->crcn.flags = CAM_FLAG_NONE; /* run this at a low priority */ - ccb.ccb_h.pinfo.priority = 5; + ccb->ccb_h.pinfo.priority = 5; - if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { + if (ioctl(fd, CAMIOCOMMAND, ccb) == -1) { warn("CAMIOCOMMAND ioctl failed"); - close(fd); - return(1); + retval = 1; + goto bailout; } - if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { fprintf(stdout, "%s of bus %d was successful\n", rescan ? "Re-scan" : "Reset", bus); } else { fprintf(stdout, "%s of bus %d returned error %#x\n", rescan ? "Re-scan" : "Reset", bus, - ccb.ccb_h.status & CAM_STATUS_MASK); + ccb->ccb_h.status & CAM_STATUS_MASK); retval = 1; } - close(fd); - return(retval); - + goto bailout; } @@ -3181,58 +3187,64 @@ rescan_or_reset_bus(path_id_t bus, int r * no-op, sending a rescan to the xpt bus would result in a status of * CAM_REQ_INVALID. */ - CCB_CLEAR_ALL_EXCEPT_HDR(&matchccb.cdm); - matchccb.ccb_h.func_code = XPT_DEV_MATCH; - matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; + matchccb = malloc(sizeof(*matchccb)); + if (matchccb == NULL) { + warn("failed to allocate CCB"); + retval = 1; + goto bailout; + } + bzero(matchccb, sizeof(*matchccb)); + matchccb->ccb_h.func_code = XPT_DEV_MATCH; + matchccb->ccb_h.path_id = CAM_BUS_WILDCARD; bufsize = sizeof(struct dev_match_result) * 20; - matchccb.cdm.match_buf_len = bufsize; - matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); - if (matchccb.cdm.matches == NULL) { + matchccb->cdm.match_buf_len = bufsize; + matchccb->cdm.matches=(struct dev_match_result *)malloc(bufsize); + if (matchccb->cdm.matches == NULL) { warnx("can't malloc memory for matches"); retval = 1; goto bailout; } - matchccb.cdm.num_matches = 0; + matchccb->cdm.num_matches = 0; - matchccb.cdm.num_patterns = 1; - matchccb.cdm.pattern_buf_len = sizeof(struct dev_match_pattern); + matchccb->cdm.num_patterns = 1; + matchccb->cdm.pattern_buf_len = sizeof(struct dev_match_pattern); - matchccb.cdm.patterns = (struct dev_match_pattern *)malloc( - matchccb.cdm.pattern_buf_len); - if (matchccb.cdm.patterns == NULL) { + matchccb->cdm.patterns = (struct dev_match_pattern *)malloc( + matchccb->cdm.pattern_buf_len); + if (matchccb->cdm.patterns == NULL) { warnx("can't malloc memory for patterns"); retval = 1; goto bailout; } - matchccb.cdm.patterns[0].type = DEV_MATCH_BUS; - matchccb.cdm.patterns[0].pattern.bus_pattern.flags = BUS_MATCH_ANY; + matchccb->cdm.patterns[0].type = DEV_MATCH_BUS; + matchccb->cdm.patterns[0].pattern.bus_pattern.flags = BUS_MATCH_ANY; do { unsigned int i; - if (ioctl(fd, CAMIOCOMMAND, &matchccb) == -1) { + if (ioctl(fd, CAMIOCOMMAND, matchccb) == -1) { warn("CAMIOCOMMAND ioctl failed"); retval = 1; goto bailout; } - if ((matchccb.ccb_h.status != CAM_REQ_CMP) - || ((matchccb.cdm.status != CAM_DEV_MATCH_LAST) - && (matchccb.cdm.status != CAM_DEV_MATCH_MORE))) { + if ((matchccb->ccb_h.status != CAM_REQ_CMP) + || ((matchccb->cdm.status != CAM_DEV_MATCH_LAST) + && (matchccb->cdm.status != CAM_DEV_MATCH_MORE))) { warnx("got CAM error %#x, CDM error %d\n", - matchccb.ccb_h.status, matchccb.cdm.status); + matchccb->ccb_h.status, matchccb->cdm.status); retval = 1; goto bailout; } - for (i = 0; i < matchccb.cdm.num_matches; i++) { + for (i = 0; i < matchccb->cdm.num_matches; i++) { struct bus_match_result *bus_result; /* This shouldn't happen. */ - if (matchccb.cdm.matches[i].type != DEV_MATCH_BUS) + if (matchccb->cdm.matches[i].type != DEV_MATCH_BUS) continue; - bus_result = &matchccb.cdm.matches[i].result.bus_result; + bus_result =&matchccb->cdm.matches[i].result.bus_result; /* * We don't want to rescan or reset the xpt bus. @@ -3241,23 +3253,23 @@ rescan_or_reset_bus(path_id_t bus, int r if (bus_result->path_id == CAM_XPT_PATH_ID) continue; - ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : + ccb->ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; - ccb.ccb_h.path_id = bus_result->path_id; - ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; - ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; - ccb.crcn.flags = CAM_FLAG_NONE; + ccb->ccb_h.path_id = bus_result->path_id; + ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; + ccb->crcn.flags = CAM_FLAG_NONE; /* run this at a low priority */ - ccb.ccb_h.pinfo.priority = 5; + ccb->ccb_h.pinfo.priority = 5; - if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { + if (ioctl(fd, CAMIOCOMMAND, ccb) == -1) { warn("CAMIOCOMMAND ioctl failed"); retval = 1; goto bailout; } - if ((ccb.ccb_h.status & CAM_STATUS_MASK) ==CAM_REQ_CMP){ + if ((ccb->ccb_h.status & CAM_STATUS_MASK)==CAM_REQ_CMP){ fprintf(stdout, "%s of bus %d was successful\n", rescan? "Re-scan" : "Reset", bus_result->path_id); @@ -3270,22 +3282,24 @@ rescan_or_reset_bus(path_id_t bus, int r fprintf(stderr, "%s of bus %d returned error " "%#x\n", rescan? "Re-scan" : "Reset", bus_result->path_id, - ccb.ccb_h.status & CAM_STATUS_MASK); + ccb->ccb_h.status & CAM_STATUS_MASK); retval = 1; } } - } while ((matchccb.ccb_h.status == CAM_REQ_CMP) - && (matchccb.cdm.status == CAM_DEV_MATCH_MORE)); + } while ((matchccb->ccb_h.status == CAM_REQ_CMP) + && (matchccb->cdm.status == CAM_DEV_MATCH_MORE)); bailout: if (fd != -1) close(fd); - if (matchccb.cdm.patterns != NULL) - free(matchccb.cdm.patterns); - if (matchccb.cdm.matches != NULL) - free(matchccb.cdm.matches); + if (matchccb != NULL) { + free(matchccb->cdm.patterns); + free(matchccb->cdm.matches); + free(matchccb); + } + free(ccb); return(retval); } From owner-svn-src-stable-11@freebsd.org Mon Dec 12 21:43:18 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAA4FC7457C; Mon, 12 Dec 2016 21:43:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 954C41AD3; Mon, 12 Dec 2016 21:43:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCLhHOB049635; Mon, 12 Dec 2016 21:43:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCLhHZ9049634; Mon, 12 Dec 2016 21:43:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612122143.uBCLhHZ9049634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 21:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309953 - stable/11/tools/build/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 21:43:18 -0000 Author: bapt Date: Mon Dec 12 21:43:17 2016 New Revision: 309953 URL: https://svnweb.freebsd.org/changeset/base/309953 Log: MFC r309797-r309802 r309797: Add entries to remove timed files with make delete-old if WITHOUT_TIMED is set r309798: Also remove auditdistd files if src.conf has WITHOUT_AUDIT r309799: Respect WITHOUT_RBOOTD in src.conf when running make delete-old r309800: Respect WITHOUT_BOOTPARAMD in src.conf when running make delete-old r309801: Respect WITHOUT_BOOTPD in src.conf when running make delete-old r309802: Respect WITHOUT_FINGER in src.conf when running make delete-old PR: 213719, 213720, 213721, 213722, 213723, 213724 Submitted by: philippe.michel7@sfr.fr Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Mon Dec 12 21:29:48 2016 (r309952) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Mon Dec 12 21:43:17 2016 (r309953) @@ -166,12 +166,15 @@ OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-A .if ${MK_AUDIT} == no OLD_FILES+=usr/sbin/audit OLD_FILES+=usr/sbin/auditd +OLD_FILES+=usr/sbin/auditdistd OLD_FILES+=usr/sbin/auditreduce OLD_FILES+=usr/sbin/praudit OLD_FILES+=usr/share/man/man1/auditreduce.1.gz OLD_FILES+=usr/share/man/man1/praudit.1.gz +OLD_FILES+=usr/share/man/man5/auditdistd.conf.5.gz OLD_FILES+=usr/share/man/man8/audit.8.gz OLD_FILES+=usr/share/man/man8/auditd.8.gz +OLD_FILES+=usr/share/man/man8/auditdistd.8.gz .endif .if ${MK_AUTHPF} == no @@ -650,6 +653,24 @@ OLD_FILES+=usr/share/man/man8/zfsboot.8. OLD_FILES+=usr/share/man/man8/zfsloader.8.gz .endif +.if ${MK_BOOTPARAMD} == no +OLD_FILES+=usr/sbin/bootparamd +OLD_FILES+=usr/share/man/man5/bootparams.5.gz +OLD_FILES+=usr/share/man/man8/bootparamd.8.gz +OLD_FILES+=usr/sbin/callbootd +.endif + +.if ${MK_BOOTPD} == no +OLD_FILES+=usr/libexec/bootpd +OLD_FILES+=usr/share/man/man5/bootptab.5.gz +OLD_FILES+=usr/share/man/man8/bootpd.8.gz +OLD_FILES+=usr/libexec/bootpgw +OLD_FILES+=usr/sbin/bootpef +OLD_FILES+=usr/share/man/man8/bootpef.8.gz +OLD_FILES+=usr/sbin/bootptest +OLD_FILES+=usr/share/man/man8/bootptest.8.gz +.endif + .if ${MK_BSD_CPIO} == no OLD_FILES+=usr/bin/bsdcpio OLD_FILES+=usr/bin/cpio @@ -1978,6 +1999,14 @@ OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee # to be filled in #.endif +.if ${MK_FINGER} == no +OLD_FILES+=usr/bin/finger +OLD_FILES+=usr/share/man/man1/finger.1.gz +OLD_FILES+=usr/share/man/man5/finger.conf.5.gz +OLD_FILES+=usr/libexec/fingerd +OLD_FILES+=usr/share/man/man8/fingerd.8.gz +.endif + .if ${MK_FLOPPY} == no OLD_FILES+=usr/sbin/fdcontrol OLD_FILES+=usr/sbin/fdformat @@ -6777,6 +6806,11 @@ OLD_FILES+=usr/share/man/man8/quotaon.8. OLD_FILES+=usr/share/man/man8/repquota.8.gz .endif +.if ${MK_RBOOTD} == no +OLD_FILES+=usr/libexec/rbootd +OLD_FILES+=usr/share/man/man8/rbootd.8.gz +.endif + .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp OLD_FILES+=etc/rc.d/rwho @@ -7998,6 +8032,13 @@ OLD_FILES+=usr/share/man/man1/colcrt.1.g OLD_FILES+=usr/share/man/man1/ul.1.gz .endif +.if ${MK_TIMED} == no +OLD_FILES+=usr/sbin/timed +OLD_FILES+=usr/sbin/timedc +OLD_FILES+=usr/share/man/man8/timed.8.gz +OLD_FILES+=usr/share/man/man8/timedc.8.gz +.endif + .if ${MK_TOOLCHAIN} == no OLD_FILES+=usr/bin/addr2line OLD_FILES+=usr/bin/as From owner-svn-src-stable-11@freebsd.org Mon Dec 12 21:45:27 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1957FC7465C; Mon, 12 Dec 2016 21:45:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCD2C1CF6; Mon, 12 Dec 2016 21:45:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCLjQiL049842; Mon, 12 Dec 2016 21:45:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCLjQwc049841; Mon, 12 Dec 2016 21:45:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612122145.uBCLjQwc049841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 21:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309954 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 21:45:27 -0000 Author: bapt Date: Mon Dec 12 21:45:25 2016 New Revision: 309954 URL: https://svnweb.freebsd.org/changeset/base/309954 Log: MFC r309805: Make WITHOUT_CAPSICUM implying WITHOUT_CASPER PR: 214562 Reported by: dewayne@heuristicsystems.com.au Modified: stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Mon Dec 12 21:43:17 2016 (r309953) +++ stable/11/share/mk/src.opts.mk Mon Dec 12 21:45:25 2016 (r309954) @@ -286,6 +286,10 @@ MK_${var}:= no # Force some options off if their dependencies are off. # Order is somewhat important. # +.if ${MK_CAPSICUM} == "no" +MK_CASPER:= no +.endif + .if ${MK_LIBPTHREAD} == "no" MK_LIBTHR:= no .endif From owner-svn-src-stable-11@freebsd.org Mon Dec 12 21:49:30 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FA43C74753; Mon, 12 Dec 2016 21:49:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F31861EF1; Mon, 12 Dec 2016 21:49:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCLnTK4050035; Mon, 12 Dec 2016 21:49:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCLnTcE050034; Mon, 12 Dec 2016 21:49:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612122149.uBCLnTcE050034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 21:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309955 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 21:49:30 -0000 Author: bapt Date: Mon Dec 12 21:49:29 2016 New Revision: 309955 URL: https://svnweb.freebsd.org/changeset/base/309955 Log: Regen after r309954 Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon Dec 12 21:45:25 2016 (r309954) +++ stable/11/share/man/man5/src.conf.5 Mon Dec 12 21:49:29 2016 (r309955) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery +.\" from FreeBSD: stable/11/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd June 28, 2016 +.Dd December 12, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -94,56 +94,56 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTOFS 296264 2016-03-01 11:36:10Z trasz +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUTOFS 296264 2016-03-01 11:36:10Z trasz Set to not build .Xr autofs 5 related programs, libraries, and kernel modules. .It Va WITH_AUTO_OBJ -.\" from FreeBSD: head/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg +.\" from FreeBSD: stable/11/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg Enable automatic creation of objdirs. .Pp This must be set in the environment, make command line, or @@ -151,14 +151,14 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_BHYVE -.\" from FreeBSD: head/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie Set to not build or install .Xr bhyve 8 , associated utilities, and examples. .Pp This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 286332 2015-08-05 18:30:00Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BINUTILS 286332 2015-08-05 18:30:00Z emaste Set to not build or install binutils (as, ld, objcopy, and objdump ) as part of the normal system build. The resulting system cannot build programs from source. @@ -166,14 +166,14 @@ The resulting system cannot build progra It is a default setting on arm64/aarch64. .It Va WITH_BINUTILS -.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS 295491 2016-02-11 00:14:00Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITH_BINUTILS 295491 2016-02-11 00:14:00Z emaste Set to build and install binutils (as, ld, objcopy, and objdump) as part of the normal system build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 295490 2016-02-10 23:57:09Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 295490 2016-02-10 23:57:09Z emaste Set to not build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Bf -symbolic @@ -184,14 +184,14 @@ toolchain is provided. It is a default setting on arm64/aarch64. .It Va WITH_BINUTILS_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITH_BINUTILS_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BLACKLIST -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLACKLIST 301554 2016-06-07 16:35:55Z lidl +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLACKLIST 301554 2016-06-07 16:35:55Z lidl Set this if you do not want to build blacklistd / blacklistctl. When set, it also enforces the following options: .Pp @@ -200,7 +200,7 @@ When set, it also enforces the following .Va WITHOUT_BLACKLIST_SUPPORT .El .It Va WITHOUT_BLACKLIST_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT 301554 2016-06-07 16:35:55Z lidl +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLACKLIST_SUPPORT 301554 2016-06-07 16:35:55Z lidl Set to build some programs without blacklistd support, like .Xr fingerd 8 , .Xr ftpd 8 , @@ -209,39 +209,39 @@ Set to build some programs without black and .Xr sshd 8 . .It Va WITHOUT_BLUETOOTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BOOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. .It Va WITHOUT_BOOTPARAMD -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOTPARAMD 278192 2015-02-04 10:19:32Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOTPARAMD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootparamd 8 . .It Va WITHOUT_BOOTPD -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOTPD 278192 2015-02-04 10:19:32Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOTPD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootpd 8 . .It Va WITHOUT_BSDINSTALL -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSDINSTALL 277677 2015-01-25 04:43:13Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSDINSTALL 277677 2015-01-25 04:43:13Z ngie Set to not build .Xr bsdinstall 8 , .Xr sade 8 , and related programs. .It Va WITHOUT_BSD_CPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . .It Va WITH_BSD_GREP -.\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien +.\" from FreeBSD: stable/11/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install .Xr bsnmpd 1 and related libraries and data files. .It Va WITHOUT_BZIP2 -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru Set to not build contributed bzip2 software as a part of the base system. .Bf -symbolic The option has no effect yet. @@ -253,20 +253,26 @@ When set, it also enforces the following .Va WITHOUT_BZIP2_SUPPORT .El .It Va WITHOUT_BZIP2_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij Set to build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR -.\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM -.\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_CASPER +.El .It Va WITHOUT_CASPER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd Set to not build Casper program and related libraries. .It Va WITH_CCACHE_BUILD -.\" from FreeBSD: head/tools/build/options/WITH_CCACHE_BUILD 297436 2016-03-30 23:53:12Z bdrewery +.\" from FreeBSD: stable/11/tools/build/options/WITH_CCACHE_BUILD 297436 2016-03-30 23:53:12Z bdrewery Set to use .Xr ccache 1 for the build. @@ -306,12 +312,12 @@ See .Xr ccache 1 for more configuration options. .It Va WITHOUT_CCD -.\" from FreeBSD: head/tools/build/options/WITHOUT_CCD 277678 2015-01-25 04:52:48Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CCD 277678 2015-01-25 04:52:48Z ngie Set to not build .Xr geom_ccd 4 and related utilities. .It Va WITHOUT_CDDL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. When set, it also enforces the following options: .Pp @@ -322,7 +328,7 @@ When set, it also enforces the following .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG 264660 2014-04-18 17:03:58Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG 264660 2014-04-18 17:03:58Z imp Set to not build the Clang C/C++ compiler during the regular phase of the build. .Pp It is a default setting on @@ -336,13 +342,13 @@ When set, it also enforces the following .Va WITHOUT_CLANG_FULL .El .It Va WITH_CLANG -.\" from FreeBSD: head/tools/build/options/WITH_CLANG 264660 2014-04-18 17:03:58Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. You must enable either gcc or clang bootstrap to be able to build the system, unless an alternative compiler is provided via @@ -351,30 +357,30 @@ XCC. It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_CLANG_EXTRAS -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim +.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CLANG_FULL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. .It Va WITH_CLANG_FULL -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim +.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks Set to install the GCC compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -384,7 +390,7 @@ and It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb +.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -394,11 +400,11 @@ and It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITHOUT_CPP -.\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 275138 2014-11-26 20:43:09Z gjb +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CROSS_COMPILER 275138 2014-11-26 20:43:09Z gjb Set to not build any cross compiler in the cross-tools stage of buildworld. If you are compiling a different version of .Fx @@ -424,7 +430,7 @@ When set, it also enforces the following .Va WITHOUT_GCC_BOOTSTRAP .El .It Va WITHOUT_CRYPT -.\" from FreeBSD: head/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru Set to not build any crypto code. When set, it also enforces the following options: .Pp @@ -448,20 +454,20 @@ When set, the following options are also is set explicitly) .El .It Va WITH_CTF -.\" from FreeBSD: head/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe +.\" from FreeBSD: stable/11/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. .It Va WITHOUT_CTM -.\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CUSE -.\" from FreeBSD: head/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 15:40:26Z hselasky +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 15:40:26Z hselasky Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 281053 2015-04-03 23:55:04Z bdrewery +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CXX 281053 2015-04-03 23:55:04Z bdrewery Set to not build .Xr c++ 1 and related libraries. @@ -484,14 +490,14 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_DEBUG_FILES -.\" from FreeBSD: head/tools/build/options/WITHOUT_DEBUG_FILES 290059 2015-10-27 20:49:56Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DEBUG_FILES 290059 2015-10-27 20:49:56Z emaste Set to avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITHOUT_DICT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD -.\" from FreeBSD: head/tools/build/options/WITH_DIRDEPS_BUILD 298007 2016-04-14 22:00:49Z bdrewery +.\" from FreeBSD: stable/11/tools/build/options/WITH_DIRDEPS_BUILD 298007 2016-04-14 22:00:49Z bdrewery This is an experimental build system. For details see http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. @@ -571,7 +577,7 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_DIRDEPS_CACHE -.\" from FreeBSD: head/tools/build/options/WITH_DIRDEPS_CACHE 290816 2015-11-14 03:24:48Z sjg +.\" from FreeBSD: stable/11/tools/build/options/WITH_DIRDEPS_CACHE 290816 2015-11-14 03:24:48Z sjg Cache result of dirdeps.mk which can save significant time for subsequent builds. Depends on @@ -582,47 +588,47 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_DMAGENT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DMAGENT 262335 2014-02-22 13:05:23Z bapt +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DMAGENT 262335 2014-02-22 13:05:23Z bapt Set to not build dma Mail Transport Agent .It Va WITHOUT_DOCCOMPRESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 266752 2014-05-27 15:52:27Z gjb +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DOCCOMPRESS 266752 2014-05-27 15:52:27Z gjb Set to not to install compressed system documentation. Only the uncompressed version will be installed. .It Va WITH_DTRACE_TESTS -.\" from FreeBSD: head/tools/build/options/WITH_DTRACE_TESTS 286174 2015-08-02 00:37:33Z markj +.\" from FreeBSD: stable/11/tools/build/options/WITH_DTRACE_TESTS 286174 2015-08-02 00:37:33Z markj Set to build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . This test suite is considered experimental on architectures other than amd64/amd64 and running it may cause system instability. .It Va WITHOUT_DYNAMICROOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va WITHOUT_ED_CRYPTO -.\" from FreeBSD: head/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ed 1 without support for encryption/decryption. .It Va WITHOUT_EE -.\" from FreeBSD: head/tools/build/options/WITHOUT_EE 277663 2015-01-25 00:03:44Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_EE 277663 2015-01-25 00:03:44Z ngie Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. .It Va WITH_EISA -.\" from FreeBSD: head/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY 296193 2016-02-29 16:39:38Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY 296193 2016-02-29 16:39:38Z emaste Set to build and install .Xr objcopy 1 from GNU Binutils, instead of the one from ELF Tool Chain. This option is provided as a transition aid and will be removed in due time. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set to not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) as part of the bootstrap process. @@ -630,76 +636,76 @@ as part of the bootstrap process. An alternate bootstrap tool chain must be provided. .Ef .It Va WITHOUT_EXAMPLES -.\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITH_EXTRA_TCP_STACKS -.\" from FreeBSD: head/tools/build/options/WITH_EXTRA_TCP_STACKS 302247 2016-06-28 13:37:01Z jtl +.\" from FreeBSD: stable/11/tools/build/options/WITH_EXTRA_TCP_STACKS 302247 2016-06-28 13:37:01Z jtl Set to build extra TCP stack modules. .It Va WITHOUT_FDT -.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .It Va WITHOUT_FILE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FILE 278193 2015-02-04 10:24:40Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FILE 278193 2015-02-04 10:24:40Z ngie Set to not build .Xr file 1 and related programs. .It Va WITHOUT_FINGER -.\" from FreeBSD: head/tools/build/options/WITHOUT_FINGER 278192 2015-02-04 10:19:32Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FINGER 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr finger 1 and .Xr fingerd 8 . .It Va WITHOUT_FLOPPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs for operating floppy disk driver. .It Va WITHOUT_FMTREE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FMTREE 261299 2014-01-30 21:37:43Z brooks +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FMTREE 261299 2014-01-30 21:37:43Z brooks Set to not build and install .Pa /usr/sbin/fmtree . .It Va WITHOUT_FORMAT_EXTENSIONS -.\" from FreeBSD: head/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks Set to not enable .Fl fformat-extensions when compiling the kernel. Also disables all format checking. .It Va WITHOUT_FORTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru Set to build bootloaders without Forth support. .It Va WITHOUT_FP_LIBC -.\" from FreeBSD: head/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru Set to build .Nm libc without floating-point support. .It Va WITHOUT_FREEBSD_UPDATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . .It Va WITHOUT_FTP -.\" from FreeBSD: head/tools/build/options/WITHOUT_FTP 278192 2015-02-04 10:19:32Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FTP 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr ftp 1 and .Xr ftpd 8 . .It Va WITHOUT_GAMES -.\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 264660 2014-04-18 17:03:58Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCC 264660 2014-04-18 17:03:58Z imp Set to not build and install gcc and g++ as part of the normal build process. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC -.\" from FreeBSD: head/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising +.\" from FreeBSD: stable/11/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising Set to build and install gcc and g++. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCC_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCC_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build gcc and g++ as part of the bootstrap process. You must enable either gcc or clang bootstrap to be able to build the system, unless an alternative compiler is provided via @@ -708,32 +714,32 @@ XCC. It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITH_GCC_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITH_GCC_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build gcc and g++ as part of the bootstrap process. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr gcov 1 tool. .It Va WITHOUT_GDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru Set to not build .Xr gdb 1 . .Pp It is a default setting on arm64/aarch64. .It Va WITH_GDB -.\" from FreeBSD: head/tools/build/options/WITH_GDB 295493 2016-02-11 00:30:51Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITH_GDB 295493 2016-02-11 00:30:51Z emaste Set to build .Xr gdb 1 . .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. This option can be useful if the system built must not contain any code covered by the GNU Public License due to legal reasons. @@ -747,37 +753,37 @@ When set, it also enforces the following .Va WITHOUT_GNU_SUPPORT .El .It Va WITHOUT_GNUCXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GNUCXX -.\" from FreeBSD: head/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven +.\" from FreeBSD: stable/11/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_GREP_COMPAT -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste Set this option to omit the gnu extensions to grep from being included in BSD grep. .It Va WITHOUT_GNU_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. .It Va WITHOUT_GPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITHOUT_GPL_DTC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPL_DTC 264515 2014-04-15 20:41:55Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GPL_DTC 264515 2014-04-15 20:41:55Z imp Set to build the BSD licensed version of the device tree compiler, instead of the GPL'd one from elinux.org. .It Va WITHOUT_GROFF -.\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -785,27 +791,27 @@ and You should consider installing the textproc/groff port to not break .Xr man 1 . .It Va WITHOUT_GSSAPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. .It Va WITHOUT_HAST -.\" from FreeBSD: head/tools/build/options/WITHOUT_HAST 277725 2015-01-26 06:27:07Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HAST 277725 2015-01-26 06:27:07Z ngie Set to not build .Xr hastd 8 and related utilities. .It Va WITH_HESIOD -.\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. .It Va WITHOUT_HTML -.\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_HYPERV -.\" from FreeBSD: head/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 02:15:31Z delphij +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 02:15:31Z delphij Set to not build or install HyperV utilities. .It Va WITHOUT_ICONV -.\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. .It Va WITHOUT_INCLUDES -.\" from FreeBSD: head/tools/build/options/WITHOUT_INCLUDES 275138 2014-11-26 20:43:09Z gjb +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INCLUDES 275138 2014-11-26 20:43:09Z gjb Set to not install header files. This option used to be spelled .Va NO_INCS . @@ -813,7 +819,7 @@ This option used to be spelled The option does not work for build targets. .Ef .It Va WITHOUT_INET -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it also enforces the following options: .Pp @@ -822,7 +828,7 @@ When set, it also enforces the following .Va WITHOUT_INET_SUPPORT .El .It Va WITHOUT_INET6 -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPv6 networking. When set, it also enforces the following options: @@ -832,17 +838,17 @@ When set, it also enforces the following .Va WITHOUT_INET6_SUPPORT .El .It Va WITHOUT_INET6_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. .It Va WITHOUT_INETD -.\" from FreeBSD: head/tools/build/options/WITHOUT_INETD 278192 2015-02-04 10:19:32Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INETD 278192 2015-02-04 10:19:32Z ngie Set to not build .Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 297941 2016-04-13 21:01:58Z bdrewery +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INSTALLLIB 297941 2016-04-13 21:01:58Z bdrewery Set this if you do not want to install optional libraries. For example when creating a .Xr nanobsd 8 @@ -851,7 +857,7 @@ image. The option does not work for build targets. .Ef .It Va WITH_INSTALL_AS_USER -.\" from FreeBSD: head/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel +.\" from FreeBSD: stable/11/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel Set to make install targets succeed for non-root users by installing files with owner and group attributes set to that of the user running the @@ -861,28 +867,28 @@ The user still has to set the .Va DESTDIR variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. .It Va WITHOUT_IPFW -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. .It Va WITHOUT_ISCSI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ISCSI 277675 2015-01-25 04:20:11Z ngie +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ISCSI 277675 2015-01-25 04:20:11Z ngie Set to not build .Xr iscid 8 and related utilities. .It Va WITHOUT_JAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" from FreeBSD: head/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and .Xr truss 1 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). When set, it also enforces the following options: .Pp @@ -900,7 +906,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like .Xr ssh 1 , .Xr telnet 1 , @@ -908,13 +914,13 @@ Set to build some programs without Kerbe and .Xr telnetd 8 . .It Va WITHOUT_KERNEL_SYMBOLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp Set to not install kernel symbol files. .Bf -symbolic This option is recommended for those people who have small root partitions. .Ef .It Va WITHOUT_KVM -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the .Nm libkvm library as a part of the base system. @@ -928,12 +934,12 @@ When set, it also enforces the following .Va WITHOUT_KVM_SUPPORT .El .It Va WITHOUT_KVM_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin Set to build some programs without optional .Nm libkvm support. .It Va WITHOUT_LDNS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des Setting this variable will prevent the LDNS library from being built. When set, it also enforces the following options: .Pp @@ -944,27 +950,27 @@ When set, it also enforces the following .Va WITHOUT_UNBOUND .El .It Va WITHOUT_LDNS_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des Setting this variable will prevent building the LDNS utilities .Xr drill 1 and .Xr host 1 . .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 296264 2016-03-01 11:36:10Z trasz +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LEGACY_CONSOLE 296264 2016-03-01 11:36:10Z trasz Set to not build programs that support a legacy PC console; e.g., .Xr kbdcontrol 1 and .Xr vidcontrol 1 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp On 64-bit platforms, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. .It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim Set to avoid building libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -976,63 +982,63 @@ When set, it also enforces the following .Va WITHOUT_LIBTHR .El .It Va WITH_LIBSOFT -.\" from FreeBSD: head/tools/build/options/WITH_LIBSOFT 300325 2016-05-20 19:23:07Z bdrewery +.\" from FreeBSD: stable/11/tools/build/options/WITH_LIBSOFT 300325 2016-05-20 19:23:07Z bdrewery On armv6 only, set to enable soft float ABI compatibility libraries. This option is for transitioning to the new hard float ABI. .It Va WITHOUT_LIBTHR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru Set to not build the .Nm libthr (1:1 threading) library. .It Va WITHOUT_LLDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLDB 289275 2015-10-14 00:23:31Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLDB 289275 2015-10-14 00:23:31Z emaste Set to not build the LLDB debugger. .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLDB -.\" from FreeBSD: head/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste Set to build the LLDB debugger. .Pp It is a default setting on amd64/amd64 and arm64/aarch64. .It Va WITHOUT_LLVM_LIBUNWIND -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLVM_LIBUNWIND -.\" from FreeBSD: head/tools/build/options/WITH_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste +.\" from FreeBSD: stable/11/tools/build/options/WITH_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). .Pp It is a default setting on arm64/aarch64. .It Va WITHOUT_LOCALES -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see .Xr locale 1 . .It Va WITHOUT_LOCATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr locate 1 and related programs. .It Va WITHOUT_LPR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr lpr 1 and related programs. .It Va WITHOUT_LS_COLORS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ls 1 without support for colors to distinguish file types. .It Va WITHOUT_LZMA_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_LZMA_SUPPORT 245171 2013-01-08 18:37:12Z obrien +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LZMA_SUPPORT 245171 2013-01-08 18:37:12Z obrien Set to build some programs without optional lzma compression support. .It Va WITHOUT_MAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). When set, it also enforces the following options: .Pp @@ -1045,17 +1051,17 @@ When set, it also enforces the following .Va WITHOUT_SENDMAIL .El .It Va WITHOUT_MAILWRAPPER -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr mailwrapper 8 MTA selector. .It Va WITHOUT_MAKE -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam Set to not install .Xr make 1 and related support files. .It Va WITHOUT_MAN -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. When set, the following options are also in effect: .Pp @@ -1066,18 +1072,18 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_MANCOMPRESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_MANCOMPRESS 266752 2014-05-27 15:52:27Z gjb +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MANCOMPRESS 266752 2014-05-27 15:52:27Z gjb Set to not to install compressed man pages. Only the uncompressed versions will be installed. .It Va WITHOUT_MANDOCDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_MANDOCDB 283777 2015-05-30 17:41:37Z bapt +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MANDOCDB 283777 2015-05-30 17:41:37Z bapt Use the .Xr mandoc 1 version of .Xr makewhatis 8 database and utilities. .It Va WITHOUT_MAN_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, .Xr apropos 1 , .Xr catman 1 , @@ -1087,7 +1093,7 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 301889 2016-06-14 16:20:25Z bdrewery +.\" from FreeBSD: stable/11/tools/build/options/WITH_META_MODE 301889 2016-06-14 16:20:25Z bdrewery Creates .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1155,19 +1161,19 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_NAND -.\" from FreeBSD: head/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber +.\" from FreeBSD: stable/11/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. .It Va WITHOUT_NDIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries related to NDIS emulation support. .It Va WITHOUT_NETCAT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru Set to not build .Xr nc 1 utility. .It Va WITHOUT_NETGRAPH -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam Set to not build applications to support .Xr netgraph 4 . When set, it also enforces the following options: @@ -1181,10 +1187,10 @@ When set, it also enforces the following .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr NIS 8 support and related programs. @@ -1194,14 +1200,14 @@ and remove .Sq nis entries. .It Va WITHOUT_NLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalogs. .It Va WITHOUT_NLS_CATALOGS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . .It Va WITHOUT_NS_CACHING -.\" from FreeBSD: head/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the .Pa nsswitch subsystem. @@ -1209,23 +1215,23 @@ The generic caching daemon, .Xr nscd 8 , will not be built either if this option is set. .It Va WITHOUT_NTP -.\" from FreeBSD: head/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: head/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:24:43 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 457FBC7437C; Tue, 13 Dec 2016 04:24:43 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA2315EF; Tue, 13 Dec 2016 04:24:42 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4Ogim012763; Tue, 13 Dec 2016 04:24:42 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4OgVN012762; Tue, 13 Dec 2016 04:24:42 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130424.uBD4OgVN012762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310001 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:24:43 -0000 Author: dteske Date: Tue Dec 13 04:24:41 2016 New Revision: 310001 URL: https://svnweb.freebsd.org/changeset/base/310001 Log: Merge missing mergeinfo for r303877 Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:35:21 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 173ABC747D4; Tue, 13 Dec 2016 04:35:21 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA88D1B09; Tue, 13 Dec 2016 04:35:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4ZKqU016728; Tue, 13 Dec 2016 04:35:20 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4ZKv2016727; Tue, 13 Dec 2016 04:35:20 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130435.uBD4ZKv2016727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310002 - stable/11/etc/defaults X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:35:21 -0000 Author: dteske Date: Tue Dec 13 04:35:19 2016 New Revision: 310002 URL: https://svnweb.freebsd.org/changeset/base/310002 Log: MFC r302798 [cy]: Restore lost comment from r301295. PR: 211027 Reported by: Trond.Endrestol@ximalas.info Modified: stable/11/etc/defaults/periodic.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/defaults/periodic.conf ============================================================================== --- stable/11/etc/defaults/periodic.conf Tue Dec 13 04:24:41 2016 (r310001) +++ stable/11/etc/defaults/periodic.conf Tue Dec 13 04:35:19 2016 (r310002) @@ -137,6 +137,7 @@ daily_status_mail_rejects_shorten="NO" # 480.leapfile-ntpd daily_ntpd_leapfile_enable="YES" # Fetch NTP leapfile daily_ntpd_avoid_congestion="YES" # Avoid congesting + # leapfile sources # 480.status-ntpd daily_status_ntpd_enable="NO" # Check NTP status From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:37:15 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE95FC748DB; Tue, 13 Dec 2016 04:37:15 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFC21CB4; Tue, 13 Dec 2016 04:37:15 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4bELG016875; Tue, 13 Dec 2016 04:37:14 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4bEMo016874; Tue, 13 Dec 2016 04:37:14 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130437.uBD4bEMo016874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310003 - stable/11/etc/rc.d X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:37:15 -0000 Author: dteske Date: Tue Dec 13 04:37:14 2016 New Revision: 310003 URL: https://svnweb.freebsd.org/changeset/base/310003 Log: MFC r303943: Allow enforce_statfs (see jail(8)) to be set per jail Reviewed by: jelischer Modified: stable/11/etc/rc.d/jail Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/jail ============================================================================== --- stable/11/etc/rc.d/jail Tue Dec 13 04:35:19 2016 (r310002) +++ stable/11/etc/rc.d/jail Tue Dec 13 04:37:14 2016 (r310003) @@ -260,6 +260,7 @@ parse_options() extract_var $_jv set_hostname_allow allow.set_hostname YN NO extract_var $_jv sysvipc_allow allow.sysvipc YN NO + extract_var $_jv enforce_statfs enforce_statfs - 2 extract_var $_jv osreldate osreldate extract_var $_jv osrelease osrelease for _p in $_parameters; do From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:39:45 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1934C74AB7; Tue, 13 Dec 2016 04:39:45 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B07111E4A; Tue, 13 Dec 2016 04:39:45 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4di6D017013; Tue, 13 Dec 2016 04:39:44 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4diVc017012; Tue, 13 Dec 2016 04:39:44 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130439.uBD4diVc017012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310004 - stable/11/etc/autofs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:39:46 -0000 Author: dteske Date: Tue Dec 13 04:39:44 2016 New Revision: 310004 URL: https://svnweb.freebsd.org/changeset/base/310004 Log: MFC r305968 [trasz]: Make autofs use the "async" flag for msdosfs and ufs filesystems mounted on /media. Modified: stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Tue Dec 13 04:37:14 2016 (r310003) +++ stable/11/etc/autofs/special_media Tue Dec 13 04:39:44 2016 (r310004) @@ -46,6 +46,8 @@ print_map_entry() { "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi + elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" else echo "-fstype=${_fstype},nosuid :/dev/${_p}" fi From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:41:50 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3CE9C74CAD; Tue, 13 Dec 2016 04:41:50 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3172120F; Tue, 13 Dec 2016 04:41:50 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4fnIm020811; Tue, 13 Dec 2016 04:41:49 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4fnqb020810; Tue, 13 Dec 2016 04:41:49 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130441.uBD4fnqb020810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310005 - stable/11/etc/autofs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:41:51 -0000 Author: dteske Date: Tue Dec 13 04:41:49 2016 New Revision: 310005 URL: https://svnweb.freebsd.org/changeset/base/310005 Log: MFC r305969 [trasz]: Make autofs use the "noatime" flag for msdosfs, ntfs, and ufs filesystems mounted on /media. Modified: stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Tue Dec 13 04:39:44 2016 (r310004) +++ stable/11/etc/autofs/special_media Tue Dec 13 04:41:49 2016 (r310005) @@ -40,14 +40,14 @@ print_map_entry() { if [ "${_fstype}" = "ntfs" ]; then if [ -f "/usr/local/bin/ntfs-3g" ]; then - echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" + echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid,noatime :/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then - echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" + echo "-fstype=${_fstype},nosuid,noatime,async :/dev/${_p}" else echo "-fstype=${_fstype},nosuid :/dev/${_p}" fi From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:43:04 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B762C74D2F; Tue, 13 Dec 2016 04:43:04 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AB2F141A; Tue, 13 Dec 2016 04:43:04 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4h3kV020914; Tue, 13 Dec 2016 04:43:03 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4h3ls020913; Tue, 13 Dec 2016 04:43:03 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130443.uBD4h3ls020913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310006 - stable/11/etc/autofs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:43:04 -0000 Author: dteske Date: Tue Dec 13 04:43:03 2016 New Revision: 310006 URL: https://svnweb.freebsd.org/changeset/base/310006 Log: MFC r306009 [trasz]: Make autofs(5) -media map also use "async" and "noatime" for ext2fs(5). Modified: stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Tue Dec 13 04:41:49 2016 (r310005) +++ stable/11/etc/autofs/special_media Tue Dec 13 04:43:03 2016 (r310006) @@ -38,7 +38,8 @@ print_map_entry() { _fstype="$1" _p="$2" - if [ "${_fstype}" = "ntfs" ]; then + case "${_fstype}" in + "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid,noatime :/dev/${_p}" else @@ -46,11 +47,14 @@ print_map_entry() { "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi - elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then + ;; + "ext2fs" | "msdosfs" | "ufs") echo "-fstype=${_fstype},nosuid,noatime,async :/dev/${_p}" - else + ;; + *) echo "-fstype=${_fstype},nosuid :/dev/${_p}" - fi + ;; + esac } # Determine map entry contents for the given key and print out the entry. From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:44:07 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6121C74DCA; Tue, 13 Dec 2016 04:44:07 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B6D215D0; Tue, 13 Dec 2016 04:44:07 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4i6qv021035; Tue, 13 Dec 2016 04:44:06 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4i6Bb021034; Tue, 13 Dec 2016 04:44:06 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130444.uBD4i6Bb021034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310007 - in stable/11/etc: . autofs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:44:07 -0000 Author: dteske Date: Tue Dec 13 04:44:06 2016 New Revision: 310007 URL: https://svnweb.freebsd.org/changeset/base/310007 Log: MFC r306011 [trasz]: Stop appending "noatime" in the autofs -media map, and instead add it to auto_master, since all filesystems seem to support it. It's cleaner this way, and easier to customize. Modified: stable/11/etc/auto_master stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/auto_master ============================================================================== --- stable/11/etc/auto_master Tue Dec 13 04:43:03 2016 (r310006) +++ stable/11/etc/auto_master Tue Dec 13 04:44:06 2016 (r310007) @@ -5,5 +5,5 @@ /net -hosts -nobrowse,nosuid,intr # When using the -media special map, make sure to edit devd.conf(5) # to move the call to "automount -c" out of the comments section. -#/media -media -nosuid +#/media -media -nosuid,noatime #/- -noauto Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Tue Dec 13 04:43:03 2016 (r310006) +++ stable/11/etc/autofs/special_media Tue Dec 13 04:44:06 2016 (r310007) @@ -41,7 +41,7 @@ print_map_entry() { case "${_fstype}" in "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then - echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid,noatime :/dev/${_p}" + echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" @@ -49,7 +49,7 @@ print_map_entry() { fi ;; "ext2fs" | "msdosfs" | "ufs") - echo "-fstype=${_fstype},nosuid,noatime,async :/dev/${_p}" + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" ;; *) echo "-fstype=${_fstype},nosuid :/dev/${_p}" From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:45:23 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3282FC74E3F; Tue, 13 Dec 2016 04:45:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01D9F172D; Tue, 13 Dec 2016 04:45:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4jMJb021143; Tue, 13 Dec 2016 04:45:22 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4jMpO021142; Tue, 13 Dec 2016 04:45:22 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130445.uBD4jMpO021142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310008 - stable/11/etc/autofs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:45:23 -0000 Author: dteske Date: Tue Dec 13 04:45:21 2016 New Revision: 310008 URL: https://svnweb.freebsd.org/changeset/base/310008 Log: MFC r306012 [trasz]: Fix -media to not mount ufs with "async"; it doesn't make sense when there is softupdates. Modified: stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Tue Dec 13 04:44:06 2016 (r310007) +++ stable/11/etc/autofs/special_media Tue Dec 13 04:45:21 2016 (r310008) @@ -48,7 +48,7 @@ print_map_entry() { exit 1 fi ;; - "ext2fs" | "msdosfs" | "ufs") + "ext2fs" | "msdosfs") echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" ;; *) From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:47:22 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72C36C74F59; Tue, 13 Dec 2016 04:47:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41C9318D4; Tue, 13 Dec 2016 04:47:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4lLc6021265; Tue, 13 Dec 2016 04:47:21 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4lLvn021263; Tue, 13 Dec 2016 04:47:21 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130447.uBD4lLvn021263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310009 - in stable/11/etc: defaults rc.d X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:47:22 -0000 Author: dteske Date: Tue Dec 13 04:47:21 2016 New Revision: 310009 URL: https://svnweb.freebsd.org/changeset/base/310009 Log: MFC r307159: Add jail_confwarn="NO" (default YES) Differential Revision: https://reviews.freebsd.org/D7465 Reviewed by: jelischer Sponsored by: FIS Global, Inc. Modified: stable/11/etc/defaults/rc.conf stable/11/etc/rc.d/jail Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/defaults/rc.conf ============================================================================== --- stable/11/etc/defaults/rc.conf Tue Dec 13 04:45:21 2016 (r310008) +++ stable/11/etc/defaults/rc.conf Tue Dec 13 04:47:21 2016 (r310009) @@ -701,6 +701,7 @@ iovctl_files="" # Config files for iovc ### Jail Configuration (see rc.conf(5) manual page) ########## ############################################################## jail_enable="NO" # Set to NO to disable starting of any jails +jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails jail_reverse_stop="NO" # Stop jails in reverse order Modified: stable/11/etc/rc.d/jail ============================================================================== --- stable/11/etc/rc.d/jail Tue Dec 13 04:45:21 2016 (r310008) +++ stable/11/etc/rc.d/jail Tue Dec 13 04:47:21 2016 (r310009) @@ -147,7 +147,8 @@ parse_options() # # To relieve confusion, show a warning message. # - _confwarn=1 + : ${jail_confwarn:=YES} + checkyesno jail_confwarn && _confwarn=1 if [ -r "$jail_conf" -o -r "$_jconf" ]; then if ! checkyesno jail_parallel_start; then warn "$_conf is created and used for jail $_j." From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:50:46 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75731C7405B; Tue, 13 Dec 2016 04:50:46 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E17A1A8C; Tue, 13 Dec 2016 04:50:46 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4ojw8021448; Tue, 13 Dec 2016 04:50:45 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4ojNL021447; Tue, 13 Dec 2016 04:50:45 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130450.uBD4ojNL021447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310010 - stable/11/etc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:50:46 -0000 Author: dteske Date: Tue Dec 13 04:50:45 2016 New Revision: 310010 URL: https://svnweb.freebsd.org/changeset/base/310010 Log: MFC r309504: Fix bug preventing limits(1) from being applied PR: misc/212493 Differential Revision: https://reviews.freebsd.org/D8232 Submitted by: girgen Reviewed by: adrian Modified: stable/11/etc/rc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.subr ============================================================================== --- stable/11/etc/rc.subr Tue Dec 13 04:47:21 2016 (r310009) +++ stable/11/etc/rc.subr Tue Dec 13 04:50:45 2016 (r310010) @@ -1045,6 +1045,7 @@ run_rc_command() # check_startmsgs && echo "Starting ${name}." if [ -n "$_chroot" ]; then + _cd= _doit="\ ${_nice:+nice -n $_nice }\ ${_fib:+setfib -F $_fib }\ @@ -1052,8 +1053,8 @@ ${_env:+env $_env }\ chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ $_chroot $command $rc_flags $command_args" else + _cd="${_chdir:+cd $_chdir && }" _doit="\ -${_chdir:+cd $_chdir && }\ ${_fib:+setfib -F $_fib }\ ${_env:+env $_env }\ $command $rc_flags $command_args" @@ -1072,7 +1073,7 @@ $command $rc_flags $command_args" fi # Prepend default limits - _doit="limits -C $_login_class $_doit" + _doit="$_cd limits -C $_login_class $_doit" # run the full command # From owner-svn-src-stable-11@freebsd.org Tue Dec 13 04:53:26 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5A31C74279; Tue, 13 Dec 2016 04:53:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B04A51E7E; Tue, 13 Dec 2016 04:53:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD4rPtT025403; Tue, 13 Dec 2016 04:53:25 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD4rPP2025401; Tue, 13 Dec 2016 04:53:25 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130453.uBD4rPP2025401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 04:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310011 - stable/11/share/examples/jails X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 04:53:26 -0000 Author: dteske Date: Tue Dec 13 04:53:25 2016 New Revision: 310011 URL: https://svnweb.freebsd.org/changeset/base/310011 Log: MFC r308615 [brd]: Attempt to make the parts that people are supposed to change stand out more by capitalizing them. Approved by: me Modified: stable/11/share/examples/jails/rc.conf.jails stable/11/share/examples/jails/rcjail.xxx.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/share/examples/jails/rc.conf.jails ============================================================================== --- stable/11/share/examples/jails/rc.conf.jails Tue Dec 13 04:50:45 2016 (r310010) +++ stable/11/share/examples/jails/rc.conf.jails Tue Dec 13 04:53:25 2016 (r310011) @@ -5,7 +5,7 @@ ############################################################################### jail_enable="YES" -jail_list="xxx" +jail_list="XXX" # # Global presets for all jails @@ -57,19 +57,19 @@ jail_devfs_enable="YES" # mount devfs # # XXX # -jail_xxx_hostname="xxx.yyy" # hostname -jail_xxx_rootdir="/vm/xxx" # root directory +jail_XXX_hostname="XXX.YYY" # hostname +jail_XXX_rootdir="/vm/XXX" # root directory # netgraph -jail_xxx_vnet_interface="ng0_xxx" # vnet interface(s) -jail_xxx_exec_prestart0="jng bridge xxx em0" # bridge interface(s) -jail_xxx_exec_poststop0="jng shutdown xxx" # destroy interface(s) +jail_XXX_vnet_interface="ng0_XXX" # vnet interface(s) +jail_XXX_exec_prestart0="jng bridge XXX em0" # bridge interface(s) +jail_XXX_exec_poststop0="jng shutdown XXX" # destroy interface(s) # if_bridge -#jail_xxx_vnet_interface="e0b_xxx" # vnet interface(s) -#jail_xxx_exec_prestart0="jib addm xxx em0" # bridge interface(s) -#jail_xxx_exec_poststop0="jib destroy xxx" # destroy interface(s) +#jail_XXX_vnet_interface="e0b_XXX" # vnet interface(s) +#jail_XXX_exec_prestart0="jib addm XXX em0" # bridge interface(s) +#jail_XXX_exec_poststop0="jib destroy XXX" # destroy interface(s) # Optional (default off) -#jail_xxx_devfs_ruleset="11" # rule to unhide bpf for DHCP -#jail_xxx_mount_enable="YES" # mount /etc/fstab.xxx +#jail_XXX_devfs_ruleset="11" # rule to unhide bpf for DHCP +#jail_XXX_mount_enable="YES" # mount /etc/fstab.XXX ################################################################################ # END Modified: stable/11/share/examples/jails/rcjail.xxx.conf ============================================================================== --- stable/11/share/examples/jails/rcjail.xxx.conf Tue Dec 13 04:50:45 2016 (r310010) +++ stable/11/share/examples/jails/rcjail.xxx.conf Tue Dec 13 04:53:25 2016 (r310011) @@ -1,25 +1,25 @@ # $FreeBSD$ -jail_xxx_hostname="xxx.yyy" # hostname -jail_xxx_rootdir="/vm/xxx" # root directory +jail_XXX_hostname="XXX.YYY" # hostname +jail_XXX_rootdir="/vm/XXX" # root directory # # NB: Below 3 lines required # # netgraph -jail_xxx_vnet_interface="ng0_xxx" # vnet interface(s) -jail_xxx_exec_prestart0="jng bridge xxx em0" # bridge interface(s) -jail_xxx_exec_poststop0="jng shutdown xxx" # destroy interface(s) +jail_XXX_vnet_interface="ng0_XXX" # vnet interface(s) +jail_XXX_exec_prestart0="jng bridge XXX em0" # bridge interface(s) +jail_XXX_exec_poststop0="jng shutdown XXX" # destroy interface(s) # if_bridge -#jail_xxx_vnet_interface="e0b_xxx" # vnet interface(s) -#jail_xxx_exec_prestart0="jib addm xxx em0" # bridge interface(s) -#jail_xxx_exec_poststop0="jib destroy xxx" # destroy interface(s) +#jail_XXX_vnet_interface="e0b_XXX" # vnet interface(s) +#jail_XXX_exec_prestart0="jib addm XXX em0" # bridge interface(s) +#jail_XXX_exec_poststop0="jib destroy XXX" # destroy interface(s) # Standard recipe -jail_xxx_devfs_enable="YES" # mount devfs +jail_XXX_devfs_enable="YES" # mount devfs # Optional (default off) -#jail_xxx_devfs_ruleset="11" # rule to unhide bpf for DHCP -#jail_xxx_mount_enable="YES" # mount /etc/fstab.xxx -#jail_xxx_set_hostname_allow="YES" # Allow hostname to change -#jail_xxx_sysvipc_allow="YES" # Allow SysV Interprocess Comm. +#jail_XXX_devfs_ruleset="11" # rule to unhide bpf for DHCP +#jail_XXX_mount_enable="YES" # mount /etc/fstab.XXX +#jail_XXX_set_hostname_allow="YES" # Allow hostname to change +#jail_XXX_sysvipc_allow="YES" # Allow SysV Interprocess Comm. From owner-svn-src-stable-11@freebsd.org Tue Dec 13 09:17:32 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E44C6B3DA; Tue, 13 Dec 2016 09:17:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBCDE819; Tue, 13 Dec 2016 09:17:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD9HVVx029800; Tue, 13 Dec 2016 09:17:31 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD9HVBQ029799; Tue, 13 Dec 2016 09:17:31 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612130917.uBD9HVBQ029799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Dec 2016 09:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310015 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 09:17:32 -0000 Author: ae Date: Tue Dec 13 09:17:30 2016 New Revision: 310015 URL: https://svnweb.freebsd.org/changeset/base/310015 Log: MFC r309660: Convert result of hash_packet6() into host byte order. For IPv4 similar function uses addresses and ports in host byte order, but for IPv6 it used network byte order. This led to very bad hash distribution for IPv6 flows. Now the result looks similar to IPv4. Modified: stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Dec 13 07:58:30 2016 (r310014) +++ stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Dec 13 09:17:30 2016 (r310015) @@ -256,9 +256,8 @@ hash_packet6(struct ipfw_flow_id *id) i = (id->dst_ip6.__u6_addr.__u6_addr32[2]) ^ (id->dst_ip6.__u6_addr.__u6_addr32[3]) ^ (id->src_ip6.__u6_addr.__u6_addr32[2]) ^ - (id->src_ip6.__u6_addr.__u6_addr32[3]) ^ - (id->dst_port) ^ (id->src_port); - return i; + (id->src_ip6.__u6_addr.__u6_addr32[3]); + return ntohl(i); } #endif @@ -277,9 +276,9 @@ hash_packet(struct ipfw_flow_id *id, int i = hash_packet6(id); else #endif /* INET6 */ - i = (id->dst_ip) ^ (id->src_ip) ^ (id->dst_port) ^ (id->src_port); - i &= (buckets - 1); - return i; + i = (id->dst_ip) ^ (id->src_ip); + i ^= (id->dst_port) ^ (id->src_port); + return (i & (buckets - 1)); } /** From owner-svn-src-stable-11@freebsd.org Tue Dec 13 09:43:50 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9657C6BF39; Tue, 13 Dec 2016 09:43:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7D49165F; Tue, 13 Dec 2016 09:43:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD9hncd041647; Tue, 13 Dec 2016 09:43:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD9hnCN041646; Tue, 13 Dec 2016 09:43:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612130943.uBD9hnCN041646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 13 Dec 2016 09:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310016 - stable/11/lib/libthr/thread X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 09:43:51 -0000 Author: kib Date: Tue Dec 13 09:43:49 2016 New Revision: 310016 URL: https://svnweb.freebsd.org/changeset/base/310016 Log: MFC r309630: Do not leak curthread->inact_mtx when cancelling in pthread_cond_wait(3). Modified: stable/11/lib/libthr/thread/thr_cond.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_cond.c ============================================================================== --- stable/11/lib/libthr/thread/thr_cond.c Tue Dec 13 09:17:30 2016 (r310015) +++ stable/11/lib/libthr/thread/thr_cond.c Tue Dec 13 09:43:49 2016 (r310016) @@ -224,16 +224,26 @@ cond_wait_kernel(struct pthread_cond *cv * state and unlock the mutex without making the state * consistent and the state will be unrecoverable. */ - if (error2 == 0 && cancel) + if (error2 == 0 && cancel) { + if (robust) { + _mutex_leave_robust(curthread, mp); + robust = false; + } _thr_testcancel(curthread); + } if (error == EINTR) error = 0; } else { /* We know that it didn't unlock the mutex. */ _mutex_cv_attach(mp, recurse); - if (cancel) + if (cancel) { + if (robust) { + _mutex_leave_robust(curthread, mp); + robust = false; + } _thr_testcancel(curthread); + } error2 = 0; } if (robust) From owner-svn-src-stable-11@freebsd.org Tue Dec 13 23:09:23 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C23F6C7680C; Tue, 13 Dec 2016 23:09:23 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 847F2A5D; Tue, 13 Dec 2016 23:09:23 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDN9MaP076553; Tue, 13 Dec 2016 23:09:22 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDN9M36076551; Tue, 13 Dec 2016 23:09:22 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612132309.uBDN9M36076551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 13 Dec 2016 23:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310040 - stable/11/usr.bin/locale X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 23:09:23 -0000 Author: vangyzen Date: Tue Dec 13 23:09:22 2016 New Revision: 310040 URL: https://svnweb.freebsd.org/changeset/base/310040 Log: MFC r309364 r309367 r309624 locale: fix buffer management Also, handle signed and unsigned chars, and more gracefully handle invalid input. locale: enable more warnings; fix them Do not set WARNS, so it gets the current default of 6. Fix the warnings by sprinkling static, const, or strdup. Make some constant data tables const. Fix whitespace. Sponsored by: Dell EMC Modified: stable/11/usr.bin/locale/Makefile stable/11/usr.bin/locale/locale.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/locale/Makefile ============================================================================== --- stable/11/usr.bin/locale/Makefile Tue Dec 13 22:40:09 2016 (r310039) +++ stable/11/usr.bin/locale/Makefile Tue Dec 13 23:09:22 2016 (r310040) @@ -1,7 +1,6 @@ # $FreeBSD$ PROG= locale -WARNS?= 3 CFLAGS+= -I${.CURDIR}/../../lib/libc/locale .include Modified: stable/11/usr.bin/locale/locale.c ============================================================================== --- stable/11/usr.bin/locale/locale.c Tue Dec 13 22:40:09 2016 (r310039) +++ stable/11/usr.bin/locale/locale.c Tue Dec 13 23:09:22 2016 (r310040) @@ -57,8 +57,8 @@ void list_charmaps(void); void list_locales(void); const char *lookup_localecat(int); char *kwval_lconv(int); -int kwval_lookup(char *, char **, int *, int *); -void showdetails(char *); +int kwval_lookup(const char *, char **, int *, int *); +void showdetails(const char *); void showkeywordslist(char *substring); void showlocale(void); void usage(void); @@ -66,13 +66,12 @@ void usage(void); /* Global variables */ static StringList *locales = NULL; -int all_locales = 0; -int all_charmaps = 0; -int prt_categories = 0; -int prt_keywords = 0; -int more_params = 0; +static int all_locales = 0; +static int all_charmaps = 0; +static int prt_categories = 0; +static int prt_keywords = 0; -struct _lcinfo { +static const struct _lcinfo { const char *name; int id; } lcinfo [] = { @@ -110,7 +109,7 @@ struct _lcinfo { #define KW_INT_P_SIGN_POSN (KW_ZERO+21) #define KW_INT_N_SIGN_POSN (KW_ZERO+22) -struct _kwinfo { +static const struct _kwinfo { const char *name; int isstr; /* true - string, false - number */ int catid; /* LC_* */ @@ -224,7 +223,7 @@ struct _kwinfo { }; #define NKWINFO (nitems(kwinfo)) -const char *boguslocales[] = { "UTF-8" }; +static const char *boguslocales[] = { "UTF-8" }; #define NBOGUS (nitems(boguslocales)) int @@ -296,7 +295,7 @@ main(int argc, char *argv[]) } else { uint i; for (i = 0; i < nitems(kwinfo); i++) - showdetails ((char *)kwinfo [i].name); + showdetails(kwinfo[i].name); } exit(0); } @@ -341,7 +340,7 @@ list_locales(void) static int scmp(const void *s1, const void *s2) { - return strcmp(*(const char **)s1, *(const char **)s2); + return strcmp(*(const char * const *)s1, *(const char * const *)s2); } /* @@ -378,7 +377,7 @@ list_charmaps(void) /* add US-ASCII, if not yet added */ if (sl_find(charmaps, "US-ASCII") == NULL) - sl_add(charmaps, "US-ASCII"); + sl_add(charmaps, strdup("US-ASCII")); /* sort the list */ qsort(charmaps->sl_str, charmaps->sl_cur, sizeof(char *), scmp); @@ -437,10 +436,10 @@ init_locales_list(void) * we also list 'C' for constistency */ if (sl_find(locales, "POSIX") == NULL) - sl_add(locales, "POSIX"); + sl_add(locales, strdup("POSIX")); if (sl_find(locales, "C") == NULL) - sl_add(locales, "C"); + sl_add(locales, strdup("C")); /* make output nicer, sort the list */ qsort(locales->sl_str, locales->sl_cur, sizeof(char *), scmp); @@ -495,29 +494,31 @@ format_grouping(const char *binary) { static char rval[64]; const char *cp; - size_t len; + size_t roff; + int len; rval[0] = '\0'; + roff = 0; for (cp = binary; *cp != '\0'; ++cp) { - char group[sizeof("127;")]; - snprintf(group, sizeof(group), "%hhd;", *cp); - len = strlcat(rval, group, sizeof(rval)); - if (len >= sizeof(rval)) { - len = sizeof(rval) - 1; - break; - } - if (*cp == CHAR_MAX) { - break; - } - } - - /* Remove the trailing ';'. */ - rval[len - 1] = '\0'; +#if CHAR_MIN != 0 + if (*cp < 0) + break; /* garbage input */ +#endif + len = snprintf(&rval[roff], sizeof(rval) - roff, "%u;", *cp); + if (len < 0 || (unsigned)len >= sizeof(rval) - roff) + break; /* insufficient space for output */ + roff += len; + if (*cp == CHAR_MAX) + break; /* special termination */ + } + + /* Truncate at the last successfully snprintf()ed semicolon. */ + if (roff != 0) + rval[roff - 1] = '\0'; - return (rval); + return (&rval[0]); } - /* * keyword value lookup helper (via localeconv()) */ @@ -606,7 +607,7 @@ kwval_lconv(int id) * keyword value and properties lookup */ int -kwval_lookup(char *kwname, char **kwval, int *cat, int *isstr) +kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr) { int rval; size_t i; @@ -634,7 +635,7 @@ kwval_lookup(char *kwname, char **kwval, * command line options specified. */ void -showdetails(char *kw) +showdetails(const char *kw) { int isstr, cat, tmpval; char *kwval; @@ -649,9 +650,9 @@ showdetails(char *kw) } if (prt_categories) { - if (prt_keywords) + if (prt_keywords) printf("%-20s ", lookup_localecat(cat)); - else + else printf("%-20s\t%s\n", kw, lookup_localecat(cat)); } From owner-svn-src-stable-11@freebsd.org Tue Dec 13 23:13:00 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D61A0C76AF4; Tue, 13 Dec 2016 23:13:00 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96D881105; Tue, 13 Dec 2016 23:13:00 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDNCxMT080607; Tue, 13 Dec 2016 23:12:59 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDNCxuA080606; Tue, 13 Dec 2016 23:12:59 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612132312.uBDNCxuA080606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 13 Dec 2016 23:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310042 - stable/11/sbin/rcorder X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 23:13:00 -0000 Author: vangyzen Date: Tue Dec 13 23:12:59 2016 New Revision: 310042 URL: https://svnweb.freebsd.org/changeset/base/310042 Log: MFC r309625 This is imported from NetBSD. The author--Joerg Sonnenberger--agreed to apply a two-clause BSD license, just so the license was clear. This source tree location matches NetBSD, and is the first place someone might look for such a tool. Obtained from: Joerg Sonnenberger via NetBSD Sponsored by: Dell EMC Added: stable/11/sbin/rcorder/rcorder-visualize.sh - copied unchanged from r309625, head/sbin/rcorder/rcorder-visualize.sh Modified: Directory Properties: stable/11/ (props changed) Copied: stable/11/sbin/rcorder/rcorder-visualize.sh (from r309625, head/sbin/rcorder/rcorder-visualize.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sbin/rcorder/rcorder-visualize.sh Tue Dec 13 23:12:59 2016 (r310042, copy of r309625, head/sbin/rcorder/rcorder-visualize.sh) @@ -0,0 +1,52 @@ +#!/bin/sh +# $NetBSD: rcorder-visualize.sh,v 1.5 2009/08/09 17:08:53 apb Exp $ +# +# Copyright (c) 2009 by Joerg Sonnenberger +# 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 ``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 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$ +# +# Simple script to show the dependency graph for rc scripts. +# Output is in the dot(1) language and can be rendered using +# sh rcorder-visualize | dot -T svg -o rcorder.svg +# dot(1) can be found in graphics/graphviz in pkgsrc. + +rc_files=${*:-/etc/rc.d/*} + +{ +echo ' digraph {' +for f in $rc_files; do +< $f awk ' +/# PROVIDE: / { provide = $3 } +/# REQUIRE: / { for (i = 3; i <= NF; i++) requires[$i] = $i } +/# BEFORE: / { for (i = 3; i <= NF; i++) befores[$i] = $i } + +END { + print " \"" provide "\";" + for (x in requires) print " \"" provide "\"->\"" x "\";" + for (x in befores) print " \"" x "\"->\"" provide "\";" +} +' +done +echo '}' +} From owner-svn-src-stable-11@freebsd.org Tue Dec 13 23:34:08 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1AA5C76104; Tue, 13 Dec 2016 23:34:08 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B72C1C66; Tue, 13 Dec 2016 23:34:08 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDNY7qC088611; Tue, 13 Dec 2016 23:34:07 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDNY7Uh088608; Tue, 13 Dec 2016 23:34:07 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612132334.uBDNY7Uh088608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 13 Dec 2016 23:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310044 - in stable/11: lib/libc/sys share/man/man3 sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 23:34:08 -0000 Author: vangyzen Date: Tue Dec 13 23:34:07 2016 New Revision: 310044 URL: https://svnweb.freebsd.org/changeset/base/310044 Log: MFC r309460 thr_set_name(): silently truncate the given name as needed Instead of failing with ENAMETOOLONG, which is swallowed by pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1 bytes. This is more likely what the user wants, and saves the caller from truncating it before the call (which was the only recourse). Polish pthread_set_name_np(3) and add a .Xr to thr_set_name(2) so the user might find the documentation for this behavior. Sponsored by: Dell EMC Modified: stable/11/lib/libc/sys/thr_set_name.2 stable/11/share/man/man3/pthread_set_name_np.3 stable/11/sys/kern/kern_thr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/thr_set_name.2 ============================================================================== --- stable/11/lib/libc/sys/thr_set_name.2 Tue Dec 13 23:13:03 2016 (r310043) +++ stable/11/lib/libc/sys/thr_set_name.2 Tue Dec 13 23:34:07 2016 (r310044) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2016 +.Dd December 2, 2016 .Dt THR_SET_NAME 2 .Os .Sh NAME @@ -43,37 +43,34 @@ .Sh DESCRIPTION The .Fn thr_set_name -sets the user-visible name for the kernel thread with the identifier +system call sets the user-visible name for the thread with the identifier .Va id -in the current process, to the NUL-terminated string +in the current process to the NUL-terminated string .Va name . +The name will be silently truncated to fit into a buffer of +.Dv MAXCOMLEN + 1 +bytes. The thread name can be seen in the output of the .Xr ps 1 and .Xr top 1 commands, in the kernel debuggers and kernel tracing facility outputs, -also in userland debuggers and program core files, as notes. +and in userland debuggers and program core files, as notes. .Sh RETURN VALUES If successful, .Fn thr_set_name -will return zero, otherwise \-1 is returned, and +returns zero; otherwise, \-1 is returned, and .Va errno is set to indicate the error. .Sh ERRORS The .Fn thr_set_name -operation may return the following errors: +system call may return the following errors: .Bl -tag -width Er .It Bq Er EFAULT The memory pointed to by the .Fa name argument is not valid. -.It Bq Er ENAMETOOLONG -The string pointed to by the -.Fa name -argument exceeds -.Dv MAXCOMLEN + 1 -bytes in length. .It Bq Er ESRCH The thread with the identifier .Fa id @@ -92,6 +89,6 @@ does not exist in the current process. .Xr ktr 9 .Sh STANDARDS The -.Fn thr_new -system call is non-standard and is used by +.Fn thr_set_name +system call is non-standard and is used by the .Lb libthr . Modified: stable/11/share/man/man3/pthread_set_name_np.3 ============================================================================== --- stable/11/share/man/man3/pthread_set_name_np.3 Tue Dec 13 23:13:03 2016 (r310043) +++ stable/11/share/man/man3/pthread_set_name_np.3 Tue Dec 13 23:34:07 2016 (r310044) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2003 +.Dd December 2, 2016 .Dt PTHREAD_SET_NAME_NP 3 .Os .Sh NAME @@ -35,18 +35,19 @@ .Sh SYNOPSIS .In pthread_np.h .Ft void -.Fn pthread_set_name_np "pthread_t tid" "const char *name" +.Fn pthread_set_name_np "pthread_t thread" "const char *name" .Sh DESCRIPTION The .Fn pthread_set_name_np -function sets internal name for thread specified by -.Fa tid -argument to string value specified by +function applies a copy of the given .Fa name -argument. +to the given +.Fa thread . .Sh ERRORS Because of the debugging nature of this function, all errors that may appear inside are silently ignored. +.Sh SEE ALSO +.Xr thr_set_name 2 .Sh AUTHORS This manual page was written by .An Alexey Zelkin Aq Mt phantom@FreeBSD.org . Modified: stable/11/sys/kern/kern_thr.c ============================================================================== --- stable/11/sys/kern/kern_thr.c Tue Dec 13 23:13:03 2016 (r310043) +++ stable/11/sys/kern/kern_thr.c Tue Dec 13 23:34:07 2016 (r310044) @@ -579,8 +579,11 @@ sys_thr_set_name(struct thread *td, stru error = 0; name[0] = '\0'; if (uap->name != NULL) { - error = copyinstr(uap->name, name, sizeof(name), - NULL); + error = copyinstr(uap->name, name, sizeof(name), NULL); + if (error == ENAMETOOLONG) { + error = copyin(uap->name, name, sizeof(name) - 1); + name[sizeof(name) - 1] = '\0'; + } if (error) return (error); } From owner-svn-src-stable-11@freebsd.org Wed Dec 14 14:20:33 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7A89C772F5; Wed, 14 Dec 2016 14:20:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 823BCA2D; Wed, 14 Dec 2016 14:20:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEEKWEw045238; Wed, 14 Dec 2016 14:20:32 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEEKWNZ045234; Wed, 14 Dec 2016 14:20:32 GMT (envelope-from des@FreeBSD.org) Message-Id: <201612141420.uBEEKWNZ045234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 14 Dec 2016 14:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310059 - stable/11/lib/libfetch X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 14:20:33 -0000 Author: des Date: Wed Dec 14 14:20:32 2016 New Revision: 310059 URL: https://svnweb.freebsd.org/changeset/base/310059 Log: MFH (r308996, r309051, r309738): refactor, avoid repeating DNS requests Modified: stable/11/lib/libfetch/common.c stable/11/lib/libfetch/common.h stable/11/lib/libfetch/ftp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libfetch/common.c ============================================================================== --- stable/11/lib/libfetch/common.c Wed Dec 14 14:13:44 2016 (r310058) +++ stable/11/lib/libfetch/common.c Wed Dec 14 14:20:32 2016 (r310059) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2014 Dag-Erling Smørgrav + * Copyright (c) 1998-2016 Dag-Erling Smørgrav * Copyright (c) 2013 Michael Gmelin * All rights reserved. * @@ -241,27 +241,79 @@ fetch_ref(conn_t *conn) /* + * Resolve an address + */ +struct addrinfo * +fetch_resolve(const char *addr, int port, int af) +{ + char hbuf[256], sbuf[8]; + struct addrinfo hints, *res; + const char *sep, *host, *service; + int err, len; + + /* split address if necessary */ + err = EAI_SYSTEM; + if ((sep = strchr(addr, ':')) != NULL) { + len = snprintf(hbuf, sizeof(hbuf), + "%.*s", (int)(sep - addr), addr); + if (len < 0) + return (NULL); + if (len >= (int)sizeof(hbuf)) { + errno = ENAMETOOLONG; + fetch_syserr(); + return (NULL); + } + host = hbuf; + service = sep + 1; + } else if (port != 0) { + if (port < 1 || port > 65535) { + errno = EINVAL; + fetch_syserr(); + return (NULL); + } + if (snprintf(sbuf, sizeof(sbuf), "%d", port) < 0) { + fetch_syserr(); + return (NULL); + } + host = addr; + service = sbuf; + } else { + host = addr; + service = NULL; + } + + /* resolve */ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = af; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_ADDRCONFIG; + if ((err = getaddrinfo(host, service, &hints, &res)) != 0) { + netdb_seterr(err); + return (NULL); + } + return (res); +} + + + +/* * Bind a socket to a specific local address */ int fetch_bind(int sd, int af, const char *addr) { - struct addrinfo hints, *res, *res0; + struct addrinfo *cliai, *ai; int err; - memset(&hints, 0, sizeof(hints)); - hints.ai_family = af; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - if ((err = getaddrinfo(addr, NULL, &hints, &res0)) != 0) + if ((cliai = fetch_resolve(addr, 0, af)) == NULL) return (-1); - for (res = res0; res; res = res->ai_next) - if (bind(sd, res->ai_addr, res->ai_addrlen) == 0) { - freeaddrinfo(res0); - return (0); - } - freeaddrinfo(res0); - return (-1); + for (ai = cliai; ai != NULL; ai = ai->ai_next) + if ((err = bind(sd, ai->ai_addr, ai->ai_addrlen)) == 0) + break; + if (err != 0) + fetch_syserr(); + freeaddrinfo(cliai); + return (err == 0 ? 0 : -1); } @@ -271,59 +323,76 @@ fetch_bind(int sd, int af, const char *a conn_t * fetch_connect(const char *host, int port, int af, int verbose) { - conn_t *conn; - char pbuf[10]; + struct addrinfo *cais = NULL, *sais = NULL, *cai, *sai; const char *bindaddr; - struct addrinfo hints, *res, *res0; - int sd, err; + conn_t *conn = NULL; + int err = 0, sd = -1; DEBUG(fprintf(stderr, "---> %s:%d\n", host, port)); + /* resolve server address */ if (verbose) - fetch_info("looking up %s", host); + fetch_info("resolving server address: %s:%d", host, port); + if ((sais = fetch_resolve(host, port, af)) == NULL) + goto fail; - /* look up host name and set up socket address structure */ - snprintf(pbuf, sizeof(pbuf), "%d", port); - memset(&hints, 0, sizeof(hints)); - hints.ai_family = af; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - if ((err = getaddrinfo(host, pbuf, &hints, &res0)) != 0) { - netdb_seterr(err); - return (NULL); - } + /* resolve client address */ bindaddr = getenv("FETCH_BIND_ADDRESS"); + if (bindaddr != NULL && *bindaddr != '\0') { + if (verbose) + fetch_info("resolving client address: %s", bindaddr); + if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) + goto fail; + } - if (verbose) - fetch_info("connecting to %s:%d", host, port); - - /* try to connect */ - for (sd = -1, res = res0; res; sd = -1, res = res->ai_next) { - if ((sd = socket(res->ai_family, res->ai_socktype, - res->ai_protocol)) == -1) - continue; - if (bindaddr != NULL && *bindaddr != '\0' && - fetch_bind(sd, res->ai_family, bindaddr) != 0) { - fetch_info("failed to bind to '%s'", bindaddr); - close(sd); - continue; + /* try each server address in turn */ + for (err = 0, sai = sais; sai != NULL; sai = sai->ai_next) { + /* open socket */ + if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) + goto syserr; + /* attempt to bind to client address */ + for (err = 0, cai = cais; cai != NULL; cai = cai->ai_next) { + if (cai->ai_family != sai->ai_family) + continue; + if ((err = bind(sd, cai->ai_addr, cai->ai_addrlen)) == 0) + break; + } + if (err != 0) { + if (verbose) + fetch_info("failed to bind to %s", bindaddr); + goto syserr; } - if (connect(sd, res->ai_addr, res->ai_addrlen) == 0 && - fcntl(sd, F_SETFL, O_NONBLOCK) == 0) + /* attempt to connect to server address */ + if ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) == 0) break; + /* clean up before next attempt */ close(sd); + sd = -1; } - freeaddrinfo(res0); - if (sd == -1) { - fetch_syserr(); - return (NULL); + if (err != 0) { + if (verbose) + fetch_info("failed to connect to %s:%s", host, port); + goto syserr; } - if ((conn = fetch_reopen(sd)) == NULL) { - fetch_syserr(); - close(sd); - } + if ((conn = fetch_reopen(sd)) == NULL) + goto syserr; + if (cais != NULL) + freeaddrinfo(cais); + if (sais != NULL) + freeaddrinfo(sais); return (conn); +syserr: + fetch_syserr(); + goto fail; +fail: + if (sd >= 0) + close(sd); + if (cais != NULL) + freeaddrinfo(cais); + if (sais != NULL) + freeaddrinfo(sais); + return (NULL); } #ifdef WITH_SSL Modified: stable/11/lib/libfetch/common.h ============================================================================== --- stable/11/lib/libfetch/common.h Wed Dec 14 14:13:44 2016 (r310058) +++ stable/11/lib/libfetch/common.h Wed Dec 14 14:20:32 2016 (r310059) @@ -76,6 +76,7 @@ void fetch_syserr(void); void fetch_info(const char *, ...); int fetch_default_port(const char *); int fetch_default_proxy_port(const char *); +struct addrinfo *fetch_resolve(const char *, int, int); int fetch_bind(int, int, const char *); conn_t *fetch_connect(const char *, int, int, int); conn_t *fetch_reopen(int); Modified: stable/11/lib/libfetch/ftp.c ============================================================================== --- stable/11/lib/libfetch/ftp.c Wed Dec 14 14:13:44 2016 (r310058) +++ stable/11/lib/libfetch/ftp.c Wed Dec 14 14:20:32 2016 (r310059) @@ -768,8 +768,8 @@ ftp_transfer(conn_t *conn, const char *o fetch_info("opening data connection"); bindaddr = getenv("FETCH_BIND_ADDRESS"); if (bindaddr != NULL && *bindaddr != '\0' && - fetch_bind(sd, sa.ss_family, bindaddr) != 0) - goto sysouch; + (e = fetch_bind(sd, sa.ss_family, bindaddr)) != 0) + goto ouch; if (connect(sd, (struct sockaddr *)&sa, sa.ss_len) == -1) goto sysouch; From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:04:05 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1E1FC665C2; Wed, 14 Dec 2016 16:04:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 810081577; Wed, 14 Dec 2016 16:04:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEG44ou089811; Wed, 14 Dec 2016 16:04:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEG44x2089810; Wed, 14 Dec 2016 16:04:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141604.uBEG44x2089810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310064 - stable/11/sys/dev/hwpmc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:04:05 -0000 Author: avg Date: Wed Dec 14 16:04:04 2016 New Revision: 310064 URL: https://svnweb.freebsd.org/changeset/base/310064 Log: MFC r308480: pmc_process_csw_out: ignore deleted counters Modified: stable/11/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_mod.c Wed Dec 14 16:03:23 2016 (r310063) +++ stable/11/sys/dev/hwpmc/hwpmc_mod.c Wed Dec 14 16:04:04 2016 (r310064) @@ -1431,8 +1431,8 @@ pmc_process_csw_out(struct thread *td) * save the reading. */ - if (pp != NULL && pp->pp_pmcs[ri].pp_pmc != NULL) { - + if (pm->pm_state != PMC_STATE_DELETED && pp != NULL && + pp->pp_pmcs[ri].pp_pmc != NULL) { KASSERT(pm == pp->pp_pmcs[ri].pp_pmc, ("[pmc,%d] pm %p != pp_pmcs[%d] %p", __LINE__, pm, ri, pp->pp_pmcs[ri].pp_pmc)); From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:05:49 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF770C666C5; Wed, 14 Dec 2016 16:05:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86730182B; Wed, 14 Dec 2016 16:05:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEG5mi3090089; Wed, 14 Dec 2016 16:05:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEG5mgV090087; Wed, 14 Dec 2016 16:05:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141605.uBEG5mgV090087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310065 - stable/11/sys/dev/smbus X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:05:49 -0000 Author: avg Date: Wed Dec 14 16:05:48 2016 New Revision: 310065 URL: https://svnweb.freebsd.org/changeset/base/310065 Log: MFC r308527: smb: fix SMB_READB, SMB_READW, SMB_PCALL to work as documented Modified: stable/11/sys/dev/smbus/smb.c stable/11/sys/dev/smbus/smb.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/smbus/smb.c ============================================================================== --- stable/11/sys/dev/smbus/smb.c Wed Dec 14 16:04:04 2016 (r310064) +++ stable/11/sys/dev/smbus/smb.c Wed Dec 14 16:05:48 2016 (r310065) @@ -41,7 +41,9 @@ #include "smbus_if.h" -#define BUFSIZE 1024 +#define SMB_OLD_READB _IOW('i', 7, struct smbcmd) +#define SMB_OLD_READW _IOW('i', 8, struct smbcmd) +#define SMB_OLD_PCALL _IOW('i', 9, struct smbcmd) struct smb_softc { device_t sc_dev; @@ -224,7 +226,9 @@ smbioctl(struct cdev *dev, u_long cmd, c s->cmd, s->wdata.word)); break; + case SMB_OLD_READB: case SMB_READB: + /* NB: for SMB_OLD_READB the read data goes to rbuf only. */ error = smbus_error(smbus_readb(parent, s->slave, s->cmd, &s->rdata.byte)); if (error) @@ -235,7 +239,9 @@ smbioctl(struct cdev *dev, u_long cmd, c } break; + case SMB_OLD_READW: case SMB_READW: + /* NB: for SMB_OLD_READW the read data goes to rbuf only. */ error = smbus_error(smbus_readw(parent, s->slave, s->cmd, &s->rdata.word)); if (error) @@ -248,7 +254,9 @@ smbioctl(struct cdev *dev, u_long cmd, c } break; + case SMB_OLD_PCALL: case SMB_PCALL: + /* NB: for SMB_OLD_PCALL the read data goes to rbuf only. */ error = smbus_error(smbus_pcall(parent, s->slave, s->cmd, s->wdata.word, &s->rdata.word)); if (error) Modified: stable/11/sys/dev/smbus/smb.h ============================================================================== --- stable/11/sys/dev/smbus/smb.h Wed Dec 14 16:04:04 2016 (r310064) +++ stable/11/sys/dev/smbus/smb.h Wed Dec 14 16:05:48 2016 (r310065) @@ -66,11 +66,10 @@ struct smbcmd { #define SMB_RECVB _IOWR('i', 4, struct smbcmd) #define SMB_WRITEB _IOW('i', 5, struct smbcmd) #define SMB_WRITEW _IOW('i', 6, struct smbcmd) -#define SMB_READB _IOW('i', 7, struct smbcmd) -#define SMB_READW _IOW('i', 8, struct smbcmd) -#define SMB_PCALL _IOW('i', 9, struct smbcmd) +#define SMB_READB _IOWR('i', 7, struct smbcmd) +#define SMB_READW _IOWR('i', 8, struct smbcmd) +#define SMB_PCALL _IOWR('i', 9, struct smbcmd) #define SMB_BWRITE _IOW('i', 10, struct smbcmd) -#define SMB_OLD_BREAD _IOW('i', 11, struct smbcmd) #define SMB_BREAD _IOWR('i', 11, struct smbcmd) #define SMB_TRANS _IOWR('i', 12, struct smbcmd) From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:08:30 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DD5CC667C3; Wed, 14 Dec 2016 16:08:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE101AD2; Wed, 14 Dec 2016 16:08:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEG8Tu6090759; Wed, 14 Dec 2016 16:08:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEG8TrT090757; Wed, 14 Dec 2016 16:08:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141608.uBEG8TrT090757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310066 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:08:30 -0000 Author: avg Date: Wed Dec 14 16:08:28 2016 New Revision: 310066 URL: https://svnweb.freebsd.org/changeset/base/310066 Log: MFC r308887,309090: fix unsafe modification of zfs_vnodeops when DIAGNOSTIC is enabled Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 14 16:05:48 2016 (r310065) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 14 16:08:28 2016 (r310066) @@ -5976,26 +5976,17 @@ zfs_lock(ap) int line; } */ *ap; { - zfsvfs_t *zfsvfs; - znode_t *zp; vnode_t *vp; - int flags; + znode_t *zp; int err; - vp = ap->a_vp; - flags = ap->a_flags; - if ((flags & LK_INTERLOCK) == 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && - (zp->z_pflags & ZFS_XATTR) == 0) { - zfsvfs = zp->z_zfsvfs; - VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); - } err = vop_stdlock(ap); - if ((flags & LK_INTERLOCK) != 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && - (zp->z_pflags & ZFS_XATTR) == 0) { - zfsvfs = zp->z_zfsvfs; - VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); + if (err == 0 && (ap->a_flags & LK_NOWAIT) == 0) { + vp = ap->a_vp; + zp = vp->v_data; + if (vp->v_mount != NULL && (vp->v_iflag & VI_DOOMED) == 0 && + zp != NULL && (zp->z_pflags & ZFS_XATTR) == 0) + VERIFY(!RRM_LOCK_HELD(&zp->z_zfsvfs->z_teardown_lock)); } return (err); } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Dec 14 16:05:48 2016 (r310065) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Dec 14 16:08:28 2016 (r310066) @@ -727,14 +727,7 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu /* * Acquire vnode lock before making it available to the world. */ -#ifdef DIAGNOSTIC - vop_lock1_t *orig_lock = vp->v_op->vop_lock1; - vp->v_op->vop_lock1 = vop_stdlock; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - vp->v_op->vop_lock1 = orig_lock; -#else - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); -#endif VN_LOCK_AREC(vp); if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:10:59 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50918C66A14; Wed, 14 Dec 2016 16:10:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD691E3D; Wed, 14 Dec 2016 16:10:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGAwu7091188; Wed, 14 Dec 2016 16:10:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGAw0r091187; Wed, 14 Dec 2016 16:10:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141610.uBEGAw0r091187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310068 - stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:10:59 -0000 Author: avg Date: Wed Dec 14 16:10:58 2016 New Revision: 310068 URL: https://svnweb.freebsd.org/changeset/base/310068 Log: MFC r308985: revert r304520, set canmount=on is not supposed to mount the filesystem Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Dec 14 16:08:35 2016 (r310067) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Dec 14 16:10:58 2016 (r310068) @@ -1615,17 +1615,12 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl assert(cl_idx < nvl_len); /* * We don't want to unmount & remount the dataset when changing - * its canmount property. We only use the changelist logic to - * unmount when setting canmount=off for a mounted filesystem - * or when setting canmount=on for an unmounted filesystem. - * For all other changes to canmount property the filesystem - * remains the same. + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. */ if (prop != ZFS_PROP_CANMOUNT || (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF && - zfs_is_mounted(zhp, NULL)) || - (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_ON && - !zfs_is_mounted(zhp, NULL))) { + zfs_is_mounted(zhp, NULL))) { cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); if (cls[cl_idx] == NULL) goto error; From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:20:52 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56914C80146; Wed, 14 Dec 2016 16:20:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25E321BCE; Wed, 14 Dec 2016 16:20:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGKpAI095338; Wed, 14 Dec 2016 16:20:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGKpqQ095337; Wed, 14 Dec 2016 16:20:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141620.uBEGKpqQ095337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310070 - stable/11/sys/dev/iicbus X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:20:52 -0000 Author: avg Date: Wed Dec 14 16:20:51 2016 New Revision: 310070 URL: https://svnweb.freebsd.org/changeset/base/310070 Log: MFC r306589: Implement iicbus_write_ivar and impelemnt the NOSTOP ivar in both read and write. Modified: stable/11/sys/dev/iicbus/iicbus.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iicbus/iicbus.c ============================================================================== --- stable/11/sys/dev/iicbus/iicbus.c Wed Dec 14 16:11:19 2016 (r310069) +++ stable/11/sys/dev/iicbus/iicbus.c Wed Dec 14 16:20:51 2016 (r310070) @@ -192,6 +192,26 @@ iicbus_read_ivar(device_t bus, device_t case IICBUS_IVAR_ADDR: *result = devi->addr; break; + case IICBUS_IVAR_NOSTOP: + *result = devi->nostop; + break; + } + return (0); +} + +static int +iicbus_write_ivar(device_t bus, device_t child, int which, uintptr_t value) +{ + struct iicbus_ivar *devi = IICBUS_IVAR(child); + + switch (which) { + default: + return (EINVAL); + case IICBUS_IVAR_ADDR: + return (EINVAL); + case IICBUS_IVAR_NOSTOP: + devi->nostop = value; + break; } return (0); } @@ -328,6 +348,7 @@ static device_method_t iicbus_methods[] DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), DEVMETHOD(bus_read_ivar, iicbus_read_ivar), + DEVMETHOD(bus_write_ivar, iicbus_write_ivar), DEVMETHOD(bus_child_pnpinfo_str, iicbus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, iicbus_child_location_str), DEVMETHOD(bus_hinted_child, iicbus_hinted_child), From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:27:31 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A0CC80389; Wed, 14 Dec 2016 16:27:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0210F1223; Wed, 14 Dec 2016 16:27:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGRUlj099387; Wed, 14 Dec 2016 16:27:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGRTjc099374; Wed, 14 Dec 2016 16:27:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141627.uBEGRTjc099374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310072 - in stable/11: . share/man/man4 sys/conf sys/dev/chromebook_platform sys/dev/cyapa sys/dev/ichiic sys/dev/iicbus sys/dev/isl sys/modules sys/modules/chromebook_platform sys/mod... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:27:31 -0000 Author: avg Date: Wed Dec 14 16:27:28 2016 New Revision: 310072 URL: https://svnweb.freebsd.org/changeset/base/310072 Log: MFC r308104: add iic interface to ig4 driver, move isl and cyapa to iicbus Added: stable/11/share/man/man4/chromebook_platform.4 - copied unchanged from r308104, head/share/man/man4/chromebook_platform.4 stable/11/sys/dev/chromebook_platform/ - copied from r308104, head/sys/dev/chromebook_platform/ stable/11/sys/modules/chromebook_platform/ - copied from r308104, head/sys/modules/chromebook_platform/ Modified: stable/11/UPDATING stable/11/share/man/man4/cyapa.4 stable/11/share/man/man4/ig4.4 stable/11/share/man/man4/isl.4 stable/11/sys/conf/files stable/11/sys/dev/cyapa/cyapa.c stable/11/sys/dev/ichiic/ig4_iic.c stable/11/sys/dev/ichiic/ig4_pci.c stable/11/sys/dev/ichiic/ig4_var.h stable/11/sys/dev/iicbus/iicbus.c stable/11/sys/dev/isl/isl.c stable/11/sys/modules/Makefile stable/11/sys/modules/i2c/controllers/ichiic/Makefile stable/11/sys/modules/i2c/cyapa/Makefile stable/11/sys/modules/i2c/isl/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/UPDATING Wed Dec 14 16:27:28 2016 (r310072) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20161030: + isl(4) and cyapa(4) drivers now require a new driver, + chromebook_platform(4), to work properly on Chromebook-class hardware. + On other types of hardware the drivers may need to be configured using + device hints. Please see the corresponding manual pages for details. + 20161210: Relocatable object files with the extension of .So have been renamed to use an extension of .pico instead. The purpose of this change is Copied: stable/11/share/man/man4/chromebook_platform.4 (from r308104, head/share/man/man4/chromebook_platform.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/chromebook_platform.4 Wed Dec 14 16:27:28 2016 (r310072, copy of r308104, head/share/man/man4/chromebook_platform.4) @@ -0,0 +1,68 @@ +.\" Copyright (c) 2016 Andriy Gapon +.\" 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$ +.\" +.Dd October 13, 2016 +.Dt CHROMEBOOK_PLATFORM 4 +.Os +.Sh NAME +.Nm chromebook_platform +.Nd support driver for hardware on various Chromebook models +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +the kernel configuration file: +.Bd -ragged -offset indent +.Cd "device chromebook_platform" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +chromebook_platform_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides automatic configuration for devices that cannot be enumerated +or safely probed. +In particular, I2C peripherals are different from model to model. +.Nm +has a model-specific information about the I2C peripherals, their drivers, +their bus attachments and slave addresses. +.Pp +Note that +.Nm +does not load driver modules for the peripherals. +Those have to be compiled into the kernel or loaded separately. +.Sh SEE ALSO +.Xr cyapa 4 , +.Xr iicbus 4 , +.Xr isl 4 , +.Sh AUTHORS +.An -nosplit +The +.Nm +driver and this manual page were written by +.An Andriy Gapon Aq Mt avg@FreeBSD.org . Modified: stable/11/share/man/man4/cyapa.4 ============================================================================== --- stable/11/share/man/man4/cyapa.4 Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/share/man/man4/cyapa.4 Wed Dec 14 16:27:28 2016 (r310072) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2015 +.Dd October 03, 2016 .Dt CYAPA 4 .Os .Sh NAME @@ -36,7 +36,7 @@ the kernel configuration file: .Bd -ragged -offset indent .Cd "device cyapa" .Cd "device ig4" -.Cd "device smbus" +.Cd "device iicbus" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in @@ -45,6 +45,13 @@ Alternatively, to load the driver as a m cyapa_load="YES" ig4_load="YES" .Ed +.Pp +In +.Pa /boot/device.hints : +.Cd hint.cyapa.0.at="iicbus0" +.Cd hint.cyapa.0.addr="0xCE" +.Cd hint.cyapa.1.at="iicbus1" +.Cd hint.cyapa.1.addr="0xCE" .Sh DESCRIPTION The .Nm @@ -86,6 +93,20 @@ The upper right corner issues a MIDDLE b The lower right corner issues a RIGHT button. Optionally, tap to click can be enabled (see below). .El +.Pp +On a system using +.Xr device.hints 5 , +these values are configurable for +.Nm : +.Bl -tag -width "hint.cyapa.%d.addr" +.It Va hint.cyapa.%d.at +target +.Xr iicbus 4 . +.It Va hint.cyapa.%d.addr +.Nm +i2c address on the +.Xr iicbus 4 . +.El .Sh SYSCTL VARIABLES These .Xr sysctl 8 @@ -175,7 +196,7 @@ file: .Dl debug.cyapa_enable_tapclick=2 .Sh SEE ALSO .Xr ig4 4 , -.Xr smbus 4 , +.Xr iicbus 4 , .Xr sysmouse 4 , .Xr moused 8 .Sh AUTHORS @@ -195,6 +216,6 @@ This manual page was written by .Sh BUGS The .Nm -driver detects the device based on its I2C address (0x67). +driver detects the device from the I2C address. This might have unforeseen consequences if the initialization sequence is sent to an unknown device at that address. Modified: stable/11/share/man/man4/ig4.4 ============================================================================== --- stable/11/share/man/man4/ig4.4 Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/share/man/man4/ig4.4 Wed Dec 14 16:27:28 2016 (r310072) @@ -24,18 +24,18 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2015 +.Dd October 03, 2016 .Dt IG4 4 .Os .Sh NAME .Nm ig4 -.Nd Intel(R) fourth generation mobile CPU integrated I2C SMBus driver +.Nd Intel(R) fourth generation mobile CPU integrated I2C driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines into the kernel configuration file: .Bd -ragged -offset indent .Cd "device ig4" -.Cd "device smbus" +.Cd "device iicbus" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in @@ -46,9 +46,10 @@ ig4_load="YES" .Sh DESCRIPTION The .Nm -driver provides access to peripherals attached to an I2C SMB controller. +driver provides access to peripherals attached to an I2C controller. +.Sh HARDWARE .Nm -supports the SMBus controller found in fourth generation Intel(R) Core(TM) +supports the I2C controllers found in fourth generation Intel(R) Core(TM) processors based on the mobile U-processor line for intelligent systems. This includes the i7-4650U, i5-4300U, i3-4010U, and 2980U. .Sh SYSCTL VARIABLES @@ -57,13 +58,15 @@ These variables are available: .Bl -tag -width "debug.ig4_dump" .It Va debug.ig4_dump -Setting this to a non-zero value dumps controller registers to console and -syslog once. -The sysctl resets to zero immediately. +This sysctl is a zero-based bit mask. +When any of the bits are set, a register dump is printed for +every I2C transfer on an +.Nm +device with the same unit number. .El .Sh SEE ALSO -.Xr smb 4 , -.Xr smbus 4 +.Xr iic 4 , +.Xr iicbus 4 .Sh AUTHORS .An -nosplit The Modified: stable/11/share/man/man4/isl.4 ============================================================================== --- stable/11/share/man/man4/isl.4 Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/share/man/man4/isl.4 Wed Dec 14 16:27:28 2016 (r310072) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2015 +.Dd October 03, 2016 .Dt ISL 4 .Os .Sh NAME @@ -36,7 +36,7 @@ the kernel configuration file: .Bd -ragged -offset indent .Cd "device isl" .Cd "device ig4" -.Cd "device smbus" +.Cd "device iicbus" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in @@ -45,6 +45,13 @@ Alternatively, to load the driver as a m isl_load="YES" ig4_load="YES" .Ed +.Pp +In +.Pa /boot/device.hints : +.Cd hint.isl.0.at="iicbus0" +.Cd hint.isl.0.addr="0x88" +.Cd hint.isl.1.at="iicbus1" +.Cd hint.isl.1.addr="0x88" .Sh DESCRIPTION The .Nm @@ -54,6 +61,20 @@ Function. Functionality is basic and provided through the .Xr sysctl 8 interface. +.Pp +On a system using +.Xr device.hints 5 , +these values are configurable for +.Nm : +.Bl -tag -width "hint.isl.%d.addr" +.It Va hint.isl.%d.at +target +.Xr iicbus 4 . +.It Va hint.isl.%d.addr +.Nm +i2c address on the +.Xr iicbus 4 . +.El .Sh SYSCTL VARIABLES The following .Xr sysctl 8 @@ -86,7 +107,7 @@ $ sh /usr/local/share/examples/intel-bac .Ed .Sh SEE ALSO .Xr ig4 4 , -.Xr smbus 4 +.Xr iicbus 4 .Sh AUTHORS .An -nosplit The @@ -99,6 +120,6 @@ This manual page was written by .Sh BUGS The .Nm -driver detects the device based on its I2C address (0x44). +driver detects the device based from the I2C address. This might have unforeseen consequences if the initialization sequence is sent to an unknown device at that address. Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/sys/conf/files Wed Dec 14 16:27:28 2016 (r310072) @@ -1222,6 +1222,7 @@ dev/cfi/cfi_bus_nexus.c optional cfi dev/cfi/cfi_core.c optional cfi dev/cfi/cfi_dev.c optional cfi dev/cfi/cfi_disk.c optional cfid +dev/chromebook_platform/chromebook_platform.c optional chromebook_platform dev/ciss/ciss.c optional ciss dev/cm/smc90cx6.c optional cm dev/cmx/cmx.c optional cmx @@ -1362,7 +1363,7 @@ t6fw.fw optional cxgbe \ dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci -dev/cyapa/cyapa.c optional cyapa smbus +dev/cyapa/cyapa.c optional cyapa iicbus dev/dc/if_dc.c optional dc pci dev/dc/dcphy.c optional dc pci dev/dc/pnphy.c optional dc pci @@ -1613,8 +1614,8 @@ dev/hptiop/hptiop.c optional hptiop scb dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc -dev/ichiic/ig4_iic.c optional ig4 smbus -dev/ichiic/ig4_pci.c optional ig4 pci smbus +dev/ichiic/ig4_iic.c optional ig4 iicbus +dev/ichiic/ig4_pci.c optional ig4 pci iicbus dev/ichsmb/ichsmb.c optional ichsmb dev/ichsmb/ichsmb_pci.c optional ichsmb pci dev/ida/ida.c optional ida @@ -1710,7 +1711,7 @@ dev/iscsi_initiator/isc_soc.c optional i dev/iscsi_initiator/isc_sm.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_subr.c optional iscsi_initiator scbus dev/ismt/ismt.c optional ismt -dev/isl/isl.c optional isl smbus +dev/isl/isl.c optional isl iicbus dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp dev/isp/isp_library.c optional isp Modified: stable/11/sys/dev/cyapa/cyapa.c ============================================================================== --- stable/11/sys/dev/cyapa/cyapa.c Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/sys/dev/cyapa/cyapa.c Wed Dec 14 16:27:28 2016 (r310072) @@ -122,11 +122,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include #include -#include "smbus_if.h" +#include "iicbus_if.h" #include "bus_if.h" #include "device_if.h" @@ -149,7 +149,6 @@ struct cyapa_fifo { struct cyapa_softc { device_t dev; int count; /* >0 if device opened */ - int addr; struct cdev *devnode; struct selinfo selinfo; struct mtx mutex; @@ -273,6 +272,30 @@ static int cyapa_reset = 0; SYSCTL_INT(_debug, OID_AUTO, cyapa_reset, CTLFLAG_RW, &cyapa_reset, 0, "Reset track pad"); +static int +cyapa_read_bytes(device_t dev, uint8_t reg, uint8_t *val, int cnt) +{ + uint16_t addr = iicbus_get_addr(dev); + struct iic_msg msgs[] = { + { addr, IIC_M_WR | IIC_M_NOSTOP, 1, ® }, + { addr, IIC_M_RD, cnt, val }, + }; + + return (iicbus_transfer(dev, msgs, nitems(msgs))); +} + +static int +cyapa_write_bytes(device_t dev, uint8_t reg, const uint8_t *val, int cnt) +{ + uint16_t addr = iicbus_get_addr(dev); + struct iic_msg msgs[] = { + { addr, IIC_M_WR | IIC_M_NOSTOP, 1, ® }, + { addr, IIC_M_WR | IIC_M_NOSTART, cnt, __DECONST(uint8_t *, val) }, + }; + + return (iicbus_transfer(dev, msgs, nitems(msgs))); +} + static void cyapa_lock(struct cyapa_softc *sc) { @@ -318,7 +341,7 @@ cyapa_notify(struct cyapa_softc *sc) * Initialize the device */ static int -init_device(device_t dev, struct cyapa_cap *cap, int addr, int probe) +init_device(device_t dev, struct cyapa_cap *cap, int probe) { static char bl_exit[] = { 0x00, 0xff, 0xa5, 0x00, 0x01, @@ -326,17 +349,13 @@ init_device(device_t dev, struct cyapa_c static char bl_deactivate[] = { 0x00, 0xff, 0x3b, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }; - device_t bus; struct cyapa_boot_regs boot; int error; int retries; - bus = device_get_parent(dev); /* smbus */ - /* Get status */ - error = smbus_trans(bus, addr, CMD_BOOT_STATUS, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - NULL, 0, (void *)&boot, sizeof(boot), NULL); + error = cyapa_read_bytes(dev, CMD_BOOT_STATUS, + (void *)&boot, sizeof(boot)); if (error) goto done; @@ -350,25 +369,21 @@ init_device(device_t dev, struct cyapa_c /* Busy, wait loop. */ } else if (boot.error & CYAPA_ERROR_BOOTLOADER) { /* Magic */ - error = smbus_trans(bus, addr, CMD_BOOT_STATUS, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - bl_deactivate, sizeof(bl_deactivate), - NULL, 0, NULL); + error = cyapa_write_bytes(dev, CMD_BOOT_STATUS, + bl_deactivate, sizeof(bl_deactivate)); if (error) goto done; } else { /* Magic */ - error = smbus_trans(bus, addr, CMD_BOOT_STATUS, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - bl_exit, sizeof(bl_exit), NULL, 0, NULL); + error = cyapa_write_bytes(dev, CMD_BOOT_STATUS, + bl_exit, sizeof(bl_exit)); if (error) goto done; } pause("cyapab1", (hz * 2) / 10); --retries; - error = smbus_trans(bus, addr, CMD_BOOT_STATUS, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - NULL, 0, (void *)&boot, sizeof(boot), NULL); + error = cyapa_read_bytes(dev, CMD_BOOT_STATUS, + (void *)&boot, sizeof(boot)); if (error) goto done; } @@ -381,9 +396,8 @@ init_device(device_t dev, struct cyapa_c /* Check identity */ if (cap) { - error = smbus_trans(bus, addr, CMD_QUERY_CAPABILITIES, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - NULL, 0, (void *)cap, sizeof(*cap), NULL); + error = cyapa_read_bytes(dev, CMD_QUERY_CAPABILITIES, + (void *)cap, sizeof(*cap)); if (strncmp(cap->prod_ida, "CYTRA", 5) != 0) { device_printf(dev, "Product ID \"%5.5s\" mismatch\n", @@ -391,9 +405,8 @@ init_device(device_t dev, struct cyapa_c error = ENXIO; } } - error = smbus_trans(bus, addr, CMD_BOOT_STATUS, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - NULL, 0, (void *)&boot, sizeof(boot), NULL); + error = cyapa_read_bytes(dev, CMD_BOOT_STATUS, + (void *)&boot, sizeof(boot)); if (probe == 0) /* official init */ device_printf(dev, "cyapa init status %02x\n", boot.stat); @@ -452,16 +465,16 @@ cyapa_probe(device_t dev) int addr; int error; - addr = smbus_get_addr(dev); + addr = iicbus_get_addr(dev); /* * 0x67 - cypress trackpad on the acer c720 * (other devices might use other ids). */ - if (addr != 0x67) + if (addr != 0xce) return (ENXIO); - error = init_device(dev, &cap, addr, 1); + error = init_device(dev, &cap, 1); if (error != 0) return (ENXIO); @@ -482,15 +495,14 @@ cyapa_attach(device_t dev) sc->reporting_mode = 1; unit = device_get_unit(dev); - addr = smbus_get_addr(dev); + addr = iicbus_get_addr(dev); - if (init_device(dev, &cap, addr, 0)) + if (init_device(dev, &cap, 0)) return (ENXIO); mtx_init(&sc->mutex, "cyapa", NULL, MTX_DEF); sc->dev = dev; - sc->addr = addr; knlist_init_mtx(&sc->selinfo.si_note, &sc->mutex); @@ -1159,7 +1171,7 @@ cyapa_poll_thread(void *arg) { struct cyapa_softc *sc; struct cyapa_regs regs; - device_t bus; /* smbus */ + device_t bus; /* iicbus */ int error; int freq; int isidle; @@ -1180,12 +1192,10 @@ cyapa_poll_thread(void *arg) while (!sc->detaching) { cyapa_unlock(sc); - error = smbus_request_bus(bus, sc->dev, SMB_WAIT); + error = iicbus_request_bus(bus, sc->dev, IIC_WAIT); if (error == 0) { - error = smbus_trans(bus, sc->addr, CMD_DEV_STATUS, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - NULL, 0, - (void *)®s, sizeof(regs), NULL); + error = cyapa_read_bytes(sc->dev, CMD_DEV_STATUS, + (void *)®s, sizeof(regs)); if (error == 0) { isidle = cyapa_raw_input(sc, ®s, freq); } @@ -1200,9 +1210,9 @@ cyapa_poll_thread(void *arg) (unsigned)(ticks - last_reset) > TIME_TO_RESET)) { cyapa_reset = 0; last_reset = ticks; - init_device(sc->dev, NULL, sc->addr, 2); + init_device(sc->dev, NULL, 2); } - smbus_release_bus(bus, sc->dev); + iicbus_release_bus(bus, sc->dev); } pause("cyapw", hz / freq); ++sc->poll_ticks; @@ -1531,18 +1541,16 @@ cyapa_set_power_mode(struct cyapa_softc int error; bus = device_get_parent(sc->dev); - error = smbus_request_bus(bus, sc->dev, SMB_WAIT); + error = iicbus_request_bus(bus, sc->dev, IIC_WAIT); if (error == 0) { - error = smbus_trans(bus, sc->addr, CMD_POWER_MODE, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - NULL, 0, (void *)&data, 1, NULL); + error = cyapa_read_bytes(sc->dev, CMD_POWER_MODE, + &data, 1); data = (data & ~0xFC) | mode; if (error == 0) { - error = smbus_trans(bus, sc->addr, CMD_POWER_MODE, - SMB_TRANS_NOCNT | SMB_TRANS_7BIT, - (void *)&data, 1, NULL, 0, NULL); + error = cyapa_write_bytes(sc->dev, CMD_POWER_MODE, + &data, 1); } - smbus_release_bus(bus, sc->dev); + iicbus_release_bus(bus, sc->dev); } } @@ -1697,6 +1705,6 @@ cyapa_fuzz(int delta, int *fuzzp) return (delta); } -DRIVER_MODULE(cyapa, smbus, cyapa_driver, cyapa_devclass, NULL, NULL); -MODULE_DEPEND(cyapa, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); +DRIVER_MODULE(cyapa, iicbus, cyapa_driver, cyapa_devclass, NULL, NULL); +MODULE_DEPEND(cyapa, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); MODULE_VERSION(cyapa, 1); Modified: stable/11/sys/dev/ichiic/ig4_iic.c ============================================================================== --- stable/11/sys/dev/ichiic/ig4_iic.c Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/sys/dev/ichiic/ig4_iic.c Wed Dec 14 16:27:28 2016 (r310072) @@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -120,7 +122,7 @@ set_controller(ig4iic_softc_t *sc, uint3 reg_write(sc, IG4_REG_INTR_MASK, 0); reg_write(sc, IG4_REG_I2C_EN, ctl); - error = SMB_ETIMEOUT; + error = IIC_ETIMEOUT; for (retry = 100; retry > 0; --retry) { v = reg_read(sc, IG4_REG_ENABLE_STATUS); @@ -148,7 +150,7 @@ wait_status(ig4iic_softc_t *sc, uint32_t u_int count_us = 0; u_int limit_us = 25000; /* 25ms */ - error = SMB_ETIMEOUT; + error = IIC_ETIMEOUT; for (;;) { /* @@ -484,6 +486,236 @@ done: } /* + * IICBUS API FUNCTIONS + */ +static int +ig4iic_xfer_start(ig4iic_softc_t *sc, uint16_t slave) +{ + /* XXX 10-bit address support? */ + set_slave_addr(sc, slave >> 1, 0); + return (0); +} + +static int +ig4iic_read(ig4iic_softc_t *sc, uint8_t *buf, uint16_t len, + bool repeated_start, bool stop) +{ + uint32_t cmd; + uint16_t i; + int error; + + if (len == 0) + return (0); + + cmd = IG4_DATA_COMMAND_RD; + cmd |= repeated_start ? IG4_DATA_RESTART : 0; + cmd |= stop && len == 1 ? IG4_DATA_STOP : 0; + + /* Issue request for the first byte (could be last as well). */ + reg_write(sc, IG4_REG_DATA_CMD, cmd); + + for (i = 0; i < len; i++) { + /* + * Maintain a pipeline by queueing the allowance for the next + * read before waiting for the current read. + */ + cmd = IG4_DATA_COMMAND_RD; + if (i < len - 1) { + cmd = IG4_DATA_COMMAND_RD; + cmd |= stop && i == len - 2 ? IG4_DATA_STOP : 0; + reg_write(sc, IG4_REG_DATA_CMD, cmd); + } + error = wait_status(sc, IG4_STATUS_RX_NOTEMPTY); + if (error) + break; + buf[i] = data_read(sc); + } + + (void)reg_read(sc, IG4_REG_TX_ABRT_SOURCE); + return (error); +} + +static int +ig4iic_write(ig4iic_softc_t *sc, uint8_t *buf, uint16_t len, + bool repeated_start, bool stop) +{ + uint32_t cmd; + uint16_t i; + int error; + + if (len == 0) + return (0); + + cmd = repeated_start ? IG4_DATA_RESTART : 0; + for (i = 0; i < len; i++) { + error = wait_status(sc, IG4_STATUS_TX_NOTFULL); + if (error) + break; + cmd |= buf[i]; + cmd |= stop && i == len - 1 ? IG4_DATA_STOP : 0; + reg_write(sc, IG4_REG_DATA_CMD, cmd); + cmd = 0; + } + + (void)reg_read(sc, IG4_REG_TX_ABRT_SOURCE); + return (error); +} + +int +ig4iic_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) +{ + ig4iic_softc_t *sc = device_get_softc(dev); + const char *reason = NULL; + uint32_t i; + int error; + int unit; + bool rpstart; + bool stop; + + /* + * The hardware interface imposes limits on allowed I2C messages. + * It is not possible to explicitly send a start or stop. + * They are automatically sent (or not sent, depending on the + * configuration) when a data byte is transferred. + * For this reason it's impossible to send a message with no data + * at all (like an SMBus quick message). + * The start condition is automatically generated after the stop + * condition, so it's impossible to not have a start after a stop. + * The repeated start condition is automatically sent if a change + * of the transfer direction happens, so it's impossible to have + * a change of direction without a (repeated) start. + * The repeated start can be forced even without the change of + * direction. + * Changing the target slave address requires resetting the hardware + * state, so it's impossible to do that without the stop followed + * by the start. + */ + for (i = 0; i < nmsgs; i++) { +#if 0 + if (i == 0 && (msgs[i].flags & IIC_M_NOSTART) != 0) { + reason = "first message without start"; + break; + } + if (i == nmsgs - 1 && (msgs[i].flags & IIC_M_NOSTOP) != 0) { + reason = "last message without stop"; + break; + } +#endif + if (msgs[i].len == 0) { + reason = "message with no data"; + break; + } + if (i > 0) { + if ((msgs[i].flags & IIC_M_NOSTART) != 0 && + (msgs[i - 1].flags & IIC_M_NOSTOP) == 0) { + reason = "stop not followed by start"; + break; + } + if ((msgs[i - 1].flags & IIC_M_NOSTOP) != 0 && + msgs[i].slave != msgs[i - 1].slave) { + reason = "change of slave without stop"; + break; + } + if ((msgs[i].flags & IIC_M_NOSTART) != 0 && + (msgs[i].flags & IIC_M_RD) != + (msgs[i - 1].flags & IIC_M_RD)) { + reason = "change of direction without repeated" + " start"; + break; + } + } + } + if (reason != NULL) { + if (bootverbose) + device_printf(dev, "%s\n", reason); + return (IIC_ENOTSUPP); + } + + sx_xlock(&sc->call_lock); + mtx_lock(&sc->io_lock); + + /* Debugging - dump registers. */ + if (ig4_dump) { + unit = device_get_unit(dev); + if (ig4_dump & (1 << unit)) { + ig4_dump &= ~(1 << unit); + ig4iic_dump(sc); + } + } + + /* + * Clear any previous abort condition that may have been holding + * the txfifo in reset. + */ + reg_read(sc, IG4_REG_CLR_TX_ABORT); + + /* + * Clean out any previously received data. + */ + if (sc->rpos != sc->rnext && bootverbose) { + device_printf(sc->dev, "discarding %d bytes of spurious data\n", + sc->rnext - sc->rpos); + } + sc->rpos = 0; + sc->rnext = 0; + + rpstart = false; + error = 0; + for (i = 0; i < nmsgs; i++) { + if ((msgs[i].flags & IIC_M_NOSTART) == 0) { + error = ig4iic_xfer_start(sc, msgs[i].slave); + } else { + if (!sc->slave_valid || + (msgs[i].slave >> 1) != sc->last_slave) { + device_printf(dev, "start condition suppressed" + "but slave address is not set up"); + error = EINVAL; + break; + } + rpstart = false; + } + if (error != 0) + break; + + stop = (msgs[i].flags & IIC_M_NOSTOP) == 0; + if (msgs[i].flags & IIC_M_RD) + error = ig4iic_read(sc, msgs[i].buf, msgs[i].len, + rpstart, stop); + else + error = ig4iic_write(sc, msgs[i].buf, msgs[i].len, + rpstart, stop); + if (error != 0) + break; + + rpstart = !stop; + } + + mtx_unlock(&sc->io_lock); + sx_unlock(&sc->call_lock); + return (error); +} + +int +ig4iic_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) +{ + ig4iic_softc_t *sc = device_get_softc(dev); + + sx_xlock(&sc->call_lock); + mtx_lock(&sc->io_lock); + + /* TODO handle speed configuration? */ + if (oldaddr != NULL) + *oldaddr = sc->last_slave << 1; + set_slave_addr(sc, addr >> 1, 0); + if (addr == IIC_UNKNOWN) + sc->slave_valid = false; + + mtx_unlock(&sc->io_lock); + sx_unlock(&sc->call_lock); + return (0); +} + +/* * SMBUS API FUNCTIONS * * Called from ig4iic_pci_attach/detach() @@ -549,9 +781,9 @@ ig4iic_attach(ig4iic_softc_t *sc) IG4_CTL_RESTARTEN | IG4_CTL_SPEED_STD); - sc->smb = device_add_child(sc->dev, "smbus", -1); - if (sc->smb == NULL) { - device_printf(sc->dev, "smbus driver not found\n"); + sc->iicbus = device_add_child(sc->dev, "iicbus", -1); + if (sc->iicbus == NULL) { + device_printf(sc->dev, "iicbus driver not found\n"); error = ENXIO; goto done; } @@ -624,15 +856,15 @@ ig4iic_detach(ig4iic_softc_t *sc) if (error) return (error); } - if (sc->smb) - device_delete_child(sc->dev, sc->smb); + if (sc->iicbus) + device_delete_child(sc->dev, sc->iicbus); if (sc->intr_handle) bus_teardown_intr(sc->dev, sc->intr_res, sc->intr_handle); sx_xlock(&sc->call_lock); mtx_lock(&sc->io_lock); - sc->smb = NULL; + sc->iicbus = NULL; sc->intr_handle = NULL; reg_write(sc, IG4_REG_INTR_MASK, 0); set_controller(sc, 0); @@ -976,4 +1208,4 @@ ig4iic_dump(ig4iic_softc_t *sc) } #undef REGDUMP -DRIVER_MODULE(smbus, ig4iic, smbus_driver, smbus_devclass, NULL, NULL); +DRIVER_MODULE(iicbus, ig4iic, iicbus_driver, iicbus_devclass, NULL, NULL); Modified: stable/11/sys/dev/ichiic/ig4_pci.c ============================================================================== --- stable/11/sys/dev/ichiic/ig4_pci.c Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/sys/dev/ichiic/ig4_pci.c Wed Dec 14 16:27:28 2016 (r310072) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "smbus_if.h" @@ -180,6 +181,10 @@ static device_method_t ig4iic_pci_method DEVMETHOD(smbus_bread, ig4iic_smb_bread), DEVMETHOD(smbus_trans, ig4iic_smb_trans), + DEVMETHOD(iicbus_transfer, ig4iic_transfer), + DEVMETHOD(iicbus_reset, ig4iic_reset), + DEVMETHOD(iicbus_callback, iicbus_null_callback), + DEVMETHOD_END }; @@ -191,7 +196,9 @@ static driver_t ig4iic_pci_driver = { static devclass_t ig4iic_pci_devclass; -DRIVER_MODULE(ig4iic, pci, ig4iic_pci_driver, ig4iic_pci_devclass, 0, 0); +DRIVER_MODULE_ORDERED(ig4iic, pci, ig4iic_pci_driver, ig4iic_pci_devclass, 0, 0, + SI_ORDER_ANY); MODULE_DEPEND(ig4iic, pci, 1, 1, 1); MODULE_DEPEND(ig4iic, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); +MODULE_DEPEND(ig4iic, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); MODULE_VERSION(ig4iic, 1); Modified: stable/11/sys/dev/ichiic/ig4_var.h ============================================================================== --- stable/11/sys/dev/ichiic/ig4_var.h Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/sys/dev/ichiic/ig4_var.h Wed Dec 14 16:27:28 2016 (r310072) @@ -42,6 +42,7 @@ #include "device_if.h" #include "pci_if.h" #include "smbus_if.h" +#include "iicbus_if.h" #define IG4_RBUFSIZE 128 #define IG4_RBUFMASK (IG4_RBUFSIZE - 1) @@ -51,7 +52,7 @@ enum ig4_op { IG4_IDLE, IG4_READ, IG4_WR struct ig4iic_softc { device_t dev; struct intr_config_hook enum_hook; - device_t smb; + device_t iicbus; struct resource *regs_res; int regs_rid; struct resource *intr_res; @@ -115,5 +116,7 @@ extern smbus_pcall_t ig4iic_smb_pcall extern smbus_bwrite_t ig4iic_smb_bwrite; extern smbus_bread_t ig4iic_smb_bread; extern smbus_trans_t ig4iic_smb_trans; +extern iicbus_transfer_t ig4iic_transfer; +extern iicbus_reset_t ig4iic_reset; #endif Modified: stable/11/sys/dev/iicbus/iicbus.c ============================================================================== --- stable/11/sys/dev/iicbus/iicbus.c Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/sys/dev/iicbus/iicbus.c Wed Dec 14 16:27:28 2016 (r310072) @@ -208,7 +208,9 @@ iicbus_write_ivar(device_t bus, device_t default: return (EINVAL); case IICBUS_IVAR_ADDR: - return (EINVAL); + if (devi->addr != 0) + return (EINVAL); + devi->addr = value; case IICBUS_IVAR_NOSTOP: devi->nostop = value; break; Modified: stable/11/sys/dev/isl/isl.c ============================================================================== --- stable/11/sys/dev/isl/isl.c Wed Dec 14 16:21:10 2016 (r310071) +++ stable/11/sys/dev/isl/isl.c Wed Dec 14 16:27:28 2016 (r310072) @@ -52,14 +52,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include -#include +#include +#include #include -#include "smbus_if.h" +#include "iicbus_if.h" #include "bus_if.h" #include "device_if.h" @@ -71,46 +69,58 @@ __FBSDID("$FreeBSD$"); struct isl_softc { device_t dev; - int addr; - struct sx isl_sx; }; /* Returns < 0 on problem. */ -static int isl_read_sensor(device_t dev, int addr, uint8_t cmd_mask); +static int isl_read_sensor(device_t dev, uint8_t cmd_mask); + +static int +isl_read_byte(device_t dev, uint8_t reg, uint8_t *val) +{ + uint16_t addr = iicbus_get_addr(dev); + struct iic_msg msgs[] = { + { addr, IIC_M_WR | IIC_M_NOSTOP, 1, ® }, + { addr, IIC_M_RD, 1, val }, + }; + + return (iicbus_transfer(dev, msgs, nitems(msgs))); +} + +static int +isl_write_byte(device_t dev, uint8_t reg, uint8_t val) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:30:48 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7881C804FA; Wed, 14 Dec 2016 16:30:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86FF213DE; Wed, 14 Dec 2016 16:30:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGUl8b099571; Wed, 14 Dec 2016 16:30:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGUlZl099570; Wed, 14 Dec 2016 16:30:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141630.uBEGUlZl099570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310073 - stable/11/sys/dev/firewire X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:30:48 -0000 Author: avg Date: Wed Dec 14 16:30:47 2016 New Revision: 310073 URL: https://svnweb.freebsd.org/changeset/base/310073 Log: MFC r309092: fwohci: report whether PhysicalUpperBound register is implemented Modified: stable/11/sys/dev/firewire/fwohci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/firewire/fwohci.c ============================================================================== --- stable/11/sys/dev/firewire/fwohci.c Wed Dec 14 16:27:28 2016 (r310072) +++ stable/11/sys/dev/firewire/fwohci.c Wed Dec 14 16:30:47 2016 (r310073) @@ -1860,6 +1860,16 @@ fwohci_intr_core(struct fwohci_softc *sc prequpper = OHCI_PREQUPPER_MAX; } OWRITE(sc, OHCI_PREQUPPER, prequpper & 0xffffffff); + if (OREAD(sc, OHCI_PREQUPPER) != + (prequpper & 0xffffffff)) { + device_printf(fc->dev, + "PhysicalUpperBound register is not " + "implemented. Physical memory access " + "is limited to the first 4GB\n"); + device_printf(fc->dev, + "PhysicalUpperBound = 0x%08x\n", + OREAD(sc, OHCI_PREQUPPER)); + } } /* Set ATRetries register */ OWRITE(sc, OHCI_ATRETRY, 1<<(13 + 16) | 0xfff); From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:34:14 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ACC1C806C1; Wed, 14 Dec 2016 16:34:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 305281B47; Wed, 14 Dec 2016 16:34:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGYD5X003584; Wed, 14 Dec 2016 16:34:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGYDn5003583; Wed, 14 Dec 2016 16:34:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141634.uBEGYDn5003583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310075 - stable/11/sys/dev/intpm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:34:14 -0000 Author: avg Date: Wed Dec 14 16:34:13 2016 New Revision: 310075 URL: https://svnweb.freebsd.org/changeset/base/310075 Log: MFC r308529: intpm: clean up intsmb_bread and intsmb_pcall Modified: stable/11/sys/dev/intpm/intpm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/intpm/intpm.c ============================================================================== --- stable/11/sys/dev/intpm/intpm.c Wed Dec 14 16:30:53 2016 (r310074) +++ stable/11/sys/dev/intpm/intpm.c Wed Dec 14 16:34:13 2016 (r310075) @@ -785,39 +785,11 @@ intsmb_readw(device_t dev, u_char slave, return (error); } -/* - * Data sheet claims that it implements all function, but also claims - * that it implements 7 function and not mention PCALL. So I don't know - * whether it will work. - */ static int intsmb_pcall(device_t dev, u_char slave, char cmd, short sdata, short *rdata) { -#ifdef PROCCALL_TEST - struct intsmb_softc *sc = device_get_softc(dev); - int error; - INTSMB_LOCK(sc); - error = intsmb_free(sc); - if (error) { - INTSMB_UNLOCK(sc); - return (error); - } - bus_write_1(sc->io_res, PIIX4_SMBHSTADD, slave & ~LSB); - bus_write_1(sc->io_res, PIIX4_SMBHSTCMD, cmd); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT0, sdata & 0xff); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT1, (sdata & 0xff) >> 8); - intsmb_start(sc, PIIX4_SMBHSTCNT_PROT_WDATA, 0); - error = intsmb_stop(sc); - if (error == 0) { - *rdata = bus_read_1(sc->io_res, PIIX4_SMBHSTDAT0); - *rdata |= bus_read_1(sc->io_res, PIIX4_SMBHSTDAT1) << 8; - } - INTSMB_UNLOCK(sc); - return (error); -#else return (SMB_ENOTSUPP); -#endif } static int @@ -857,9 +829,6 @@ intsmb_bread(device_t dev, u_char slave, int error, i; u_char data, nread; - if (*count > SMBBLOCKTRANS_MAX || *count == 0) - return (SMB_EINVAL); - INTSMB_LOCK(sc); error = intsmb_free(sc); if (error) { @@ -872,18 +841,14 @@ intsmb_bread(device_t dev, u_char slave, bus_write_1(sc->io_res, PIIX4_SMBHSTADD, slave | LSB); bus_write_1(sc->io_res, PIIX4_SMBHSTCMD, cmd); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT0, *count); intsmb_start(sc, PIIX4_SMBHSTCNT_PROT_BLOCK, 0); error = intsmb_stop(sc); if (error == 0) { nread = bus_read_1(sc->io_res, PIIX4_SMBHSTDAT0); if (nread != 0 && nread <= SMBBLOCKTRANS_MAX) { - for (i = 0; i < nread; i++) { - data = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); - if (i < *count) - buf[i] = data; - } *count = nread; + for (i = 0; i < nread; i++) + data = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); } else error = SMB_EBUSERR; } From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:43:05 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3995C80ABF; Wed, 14 Dec 2016 16:43:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2ED27C2; Wed, 14 Dec 2016 16:43:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGh4oq007704; Wed, 14 Dec 2016 16:43:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGh45K007703; Wed, 14 Dec 2016 16:43:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141643.uBEGh45K007703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310077 - stable/11/sys/dev/firewire X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:43:05 -0000 Author: avg Date: Wed Dec 14 16:43:04 2016 New Revision: 310077 URL: https://svnweb.freebsd.org/changeset/base/310077 Log: MFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc() Modified: stable/11/sys/dev/firewire/firewire.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/firewire/firewire.c ============================================================================== --- stable/11/sys/dev/firewire/firewire.c Wed Dec 14 16:35:17 2016 (r310076) +++ stable/11/sys/dev/firewire/firewire.c Wed Dec 14 16:43:04 2016 (r310077) @@ -1098,6 +1098,7 @@ fw_xfer_alloc(struct malloc_type *type) return xfer; xfer->malloc = type; + xfer->tl = -1; return xfer; } From owner-svn-src-stable-11@freebsd.org Wed Dec 14 16:44:35 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36C88C80B93; Wed, 14 Dec 2016 16:44:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 060AEA8E; Wed, 14 Dec 2016 16:44:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGiYmc007885; Wed, 14 Dec 2016 16:44:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGiYMa007884; Wed, 14 Dec 2016 16:44:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141644.uBEGiYMa007884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310079 - stable/11/sys/dev/virtio/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:44:35 -0000 Author: avg Date: Wed Dec 14 16:44:33 2016 New Revision: 310079 URL: https://svnweb.freebsd.org/changeset/base/310079 Log: MFC r309119: virtio_pci: fix announcement of MSI-X interrupts for queues Modified: stable/11/sys/dev/virtio/pci/virtio_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- stable/11/sys/dev/virtio/pci/virtio_pci.c Wed Dec 14 16:43:09 2016 (r310078) +++ stable/11/sys/dev/virtio/pci/virtio_pci.c Wed Dec 14 16:44:33 2016 (r310079) @@ -1087,7 +1087,8 @@ vtpci_set_host_msix_vectors(struct vtpci * For shared MSIX, all the virtqueues share the first * interrupt. */ - if ((sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) == 0) + if (!sc->vtpci_vqs[idx].vtv_no_intr && + (sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) == 0) intr++; } From owner-svn-src-stable-11@freebsd.org Wed Dec 14 21:29:13 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87949C804B0; Wed, 14 Dec 2016 21:29:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56C8A1B2C; Wed, 14 Dec 2016 21:29:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBELTCLj023668; Wed, 14 Dec 2016 21:29:12 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBELTCJW023667; Wed, 14 Dec 2016 21:29:12 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201612142129.uBELTCJW023667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 14 Dec 2016 21:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310093 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 21:29:13 -0000 Author: kp Date: Wed Dec 14 21:29:12 2016 New Revision: 310093 URL: https://svnweb.freebsd.org/changeset/base/310093 Log: MFC r309563: pflog: Correctly initialise subrulenr subrulenr is considered unset if it's set to -1, not if it's set to 1. See contrib/tcpdump/print-pflog.c pflog_print() for a user. This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0): rule 0..16777216(match) instead of the correct output of rule 0/0(match) PR: 214832 Submitted by: andywhite@gmail.com Modified: stable/11/sys/netpfil/pf/if_pflog.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/if_pflog.c ============================================================================== --- stable/11/sys/netpfil/pf/if_pflog.c Wed Dec 14 21:26:43 2016 (r310092) +++ stable/11/sys/netpfil/pf/if_pflog.c Wed Dec 14 21:29:12 2016 (r310093) @@ -221,7 +221,7 @@ pflog_packet(struct pfi_kif *kif, struct if (am == NULL) { hdr.rulenr = htonl(rm->nr); - hdr.subrulenr = 1; + hdr.subrulenr = -1; } else { hdr.rulenr = htonl(am->nr); hdr.subrulenr = htonl(rm->nr); From owner-svn-src-stable-11@freebsd.org Thu Dec 15 08:10:49 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 403CAC81A51; Thu, 15 Dec 2016 08:10:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1E62623; Thu, 15 Dec 2016 08:10:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBF8Am9q084896; Thu, 15 Dec 2016 08:10:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBF8AmU0084895; Thu, 15 Dec 2016 08:10:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201612150810.uBF8AmU0084895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Dec 2016 08:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310105 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 08:10:49 -0000 Author: mav Date: Thu Dec 15 08:10:47 2016 New Revision: 310105 URL: https://svnweb.freebsd.org/changeset/base/310105 Log: MFC 309714: Fix spa_alloc_tree sorting by offset in r305331. Original commit "7090 zfs should improve allocation order" declares alloc queue sorted by time and offset. But in practice io_offset is always zero, so sorting happened only by time, while order of writes with equal time was completely random. On Illumos this did not affected much thanks to using high resolution timestamps. On FreeBSD due to using much faster but low resolution timestamps it caused bad data placement on disks, affecting further read performance. This change switches zio_timestamp_compare() from comparing uninitialized io_offset to really populated io_bookmark values. I haven't decided yet what to do with timestampts, but on simple tests this change gives the same peformance results by just making code to work as declared. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Dec 15 08:03:16 2016 (r310104) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Dec 15 08:10:47 2016 (r310105) @@ -563,9 +563,24 @@ zio_timestamp_compare(const void *x1, co if (z1->io_queued_timestamp > z2->io_queued_timestamp) return (1); - if (z1->io_offset < z2->io_offset) + if (z1->io_bookmark.zb_objset < z2->io_bookmark.zb_objset) return (-1); - if (z1->io_offset > z2->io_offset) + if (z1->io_bookmark.zb_objset > z2->io_bookmark.zb_objset) + return (1); + + if (z1->io_bookmark.zb_object < z2->io_bookmark.zb_object) + return (-1); + if (z1->io_bookmark.zb_object > z2->io_bookmark.zb_object) + return (1); + + if (z1->io_bookmark.zb_level < z2->io_bookmark.zb_level) + return (-1); + if (z1->io_bookmark.zb_level > z2->io_bookmark.zb_level) + return (1); + + if (z1->io_bookmark.zb_blkid < z2->io_bookmark.zb_blkid) + return (-1); + if (z1->io_bookmark.zb_blkid > z2->io_bookmark.zb_blkid) return (1); if (z1 < z2) From owner-svn-src-stable-11@freebsd.org Thu Dec 15 10:42:15 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A525C8023D; Thu, 15 Dec 2016 10:42:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4992A1F7A; Thu, 15 Dec 2016 10:42:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFAgEZh049533; Thu, 15 Dec 2016 10:42:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFAgE9j049532; Thu, 15 Dec 2016 10:42:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612151042.uBFAgE9j049532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Dec 2016 10:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310108 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 10:42:15 -0000 Author: kib Date: Thu Dec 15 10:42:14 2016 New Revision: 310108 URL: https://svnweb.freebsd.org/changeset/base/310108 Log: MFC r309708: Style. Modified: stable/11/sys/vm/phys_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/phys_pager.c ============================================================================== --- stable/11/sys/vm/phys_pager.c Thu Dec 15 10:36:34 2016 (r310107) +++ stable/11/sys/vm/phys_pager.c Thu Dec 15 10:42:14 2016 (r310108) @@ -56,9 +56,6 @@ phys_pager_init(void) mtx_init(&phys_pager_mtx, "phys_pager list", NULL, MTX_DEF); } -/* - * MPSAFE - */ static vm_object_t phys_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t foff, struct ucred *cred) @@ -101,8 +98,8 @@ phys_pager_alloc(void *handle, vm_ooffse object = object1; object1 = NULL; object->handle = handle; - TAILQ_INSERT_TAIL(&phys_pager_object_list, object, - pager_object_list); + TAILQ_INSERT_TAIL(&phys_pager_object_list, + object, pager_object_list); } } else { if (pindex > object->size) @@ -117,9 +114,6 @@ phys_pager_alloc(void *handle, vm_ooffse return (object); } -/* - * MPSAFE - */ static void phys_pager_dealloc(vm_object_t object) { @@ -165,7 +159,7 @@ phys_pager_getpages(vm_object_t object, static void phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, boolean_t sync, - int *rtvals) + int *rtvals) { panic("phys_pager_putpage called"); @@ -183,7 +177,7 @@ phys_pager_putpages(vm_object_t object, #endif static boolean_t phys_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, - int *after) + int *after) { vm_pindex_t base, end; From owner-svn-src-stable-11@freebsd.org Thu Dec 15 10:44:46 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 805D5C802F5; Thu, 15 Dec 2016 10:44:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB432DF; Thu, 15 Dec 2016 10:44:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFAijiB049690; Thu, 15 Dec 2016 10:44:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFAijri049689; Thu, 15 Dec 2016 10:44:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612151044.uBFAijri049689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Dec 2016 10:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310109 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 10:44:46 -0000 Author: kib Date: Thu Dec 15 10:44:45 2016 New Revision: 310109 URL: https://svnweb.freebsd.org/changeset/base/310109 Log: MFC r309709: Move map_generation snapshot value into struct faultstate. Modified: stable/11/sys/vm/vm_fault.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_fault.c ============================================================================== --- stable/11/sys/vm/vm_fault.c Thu Dec 15 10:42:14 2016 (r310108) +++ stable/11/sys/vm/vm_fault.c Thu Dec 15 10:44:45 2016 (r310109) @@ -122,6 +122,7 @@ struct faultstate { vm_pindex_t first_pindex; vm_map_t map; vm_map_entry_t entry; + int map_generation; bool lookup_still_valid; struct vnode *vp; }; @@ -338,7 +339,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t struct vnode *vp; vm_offset_t e_end, e_start; int ahead, alloc_req, behind, cluster_offset, error, era, faultcount; - int locked, map_generation, nera, result, rv; + int locked, nera, result, rv; u_char behavior; boolean_t wired; /* Passed by reference. */ bool dead, growstack, hardfault, is_first_object_locked; @@ -372,7 +373,7 @@ RetryFault:; return (result); } - map_generation = fs.map->timestamp; + fs.map_generation = fs.map->timestamp; if (fs.entry->eflags & MAP_ENTRY_NOFAULT) { panic("vm_fault: fault on nofault entry, addr: %lx", @@ -976,7 +977,7 @@ readrest: goto RetryFault; } fs.lookup_still_valid = true; - if (fs.map->timestamp != map_generation) { + if (fs.map->timestamp != fs.map_generation) { result = vm_map_lookup_locked(&fs.map, vaddr, fault_type, &fs.entry, &retry_object, &retry_pindex, &retry_prot, &wired); From owner-svn-src-stable-11@freebsd.org Thu Dec 15 16:51:35 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69692C81AC0; Thu, 15 Dec 2016 16:51:35 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 371A71BD9; Thu, 15 Dec 2016 16:51:35 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFGpYaO096534; Thu, 15 Dec 2016 16:51:34 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFGpX7Y096522; Thu, 15 Dec 2016 16:51:33 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612151651.uBFGpX7Y096522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 15 Dec 2016 16:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310120 - in stable/11: bin/ps lib/libkvm sys/compat/freebsd32 sys/kern sys/sys usr.bin/procstat usr.bin/top X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 16:51:35 -0000 Author: vangyzen Date: Thu Dec 15 16:51:33 2016 New Revision: 310120 URL: https://svnweb.freebsd.org/changeset/base/310120 Log: MFC r309676 Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC Modified: stable/11/bin/ps/print.c stable/11/lib/libkvm/kvm_proc.c stable/11/sys/compat/freebsd32/freebsd32.h stable/11/sys/kern/kern_proc.c stable/11/sys/sys/param.h stable/11/sys/sys/user.h stable/11/usr.bin/procstat/procstat.c stable/11/usr.bin/procstat/procstat.h stable/11/usr.bin/procstat/procstat_cs.c stable/11/usr.bin/procstat/procstat_kstack.c stable/11/usr.bin/procstat/procstat_threads.c stable/11/usr.bin/top/machine.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ps/print.c ============================================================================== --- stable/11/bin/ps/print.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/bin/ps/print.c Thu Dec 15 16:51:33 2016 (r310120) @@ -120,11 +120,12 @@ command(KINFO *k, VARENT *ve) if (cflag) { /* If it is the last field, then don't pad */ if (STAILQ_NEXT(ve, next_ve) == NULL) { - asprintf(&str, "%s%s%s%s", + asprintf(&str, "%s%s%s%s%s", k->ki_d.prefix ? k->ki_d.prefix : "", k->ki_p->ki_comm, (showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "", - (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : ""); + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "", + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_moretdname : ""); } else str = strdup(k->ki_p->ki_comm); @@ -172,14 +173,16 @@ ucomm(KINFO *k, VARENT *ve) char *str; if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */ - asprintf(&str, "%s%s%s%s", + asprintf(&str, "%s%s%s%s%s", k->ki_d.prefix ? k->ki_d.prefix : "", k->ki_p->ki_comm, (showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "", - (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : ""); + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "", + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_moretdname : ""); } else { if (showthreads && k->ki_p->ki_numthreads > 1) - asprintf(&str, "%s/%s", k->ki_p->ki_comm, k->ki_p->ki_tdname); + asprintf(&str, "%s/%s%s", k->ki_p->ki_comm, + k->ki_p->ki_tdname, k->ki_p->ki_moretdname); else str = strdup(k->ki_p->ki_comm); } @@ -192,7 +195,8 @@ tdnam(KINFO *k, VARENT *ve __unused) char *str; if (showthreads && k->ki_p->ki_numthreads > 1) - str = strdup(k->ki_p->ki_tdname); + asprintf(&str, "%s%s", k->ki_p->ki_tdname, + k->ki_p->ki_moretdname); else str = strdup(" "); Modified: stable/11/lib/libkvm/kvm_proc.c ============================================================================== --- stable/11/lib/libkvm/kvm_proc.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/lib/libkvm/kvm_proc.c Thu Dec 15 16:51:33 2016 (r310120) @@ -426,8 +426,6 @@ nopgrp: kp->ki_pri.pri_native = mtd.td_base_pri; kp->ki_lastcpu = mtd.td_lastcpu; kp->ki_wchan = mtd.td_wchan; - if (mtd.td_name[0] != 0) - strlcpy(kp->ki_tdname, mtd.td_name, MAXCOMLEN); kp->ki_oncpu = mtd.td_oncpu; if (mtd.td_name[0] != '\0') strlcpy(kp->ki_tdname, mtd.td_name, sizeof(kp->ki_tdname)); Modified: stable/11/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32.h Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/sys/compat/freebsd32/freebsd32.h Thu Dec 15 16:51:33 2016 (r310120) @@ -315,7 +315,8 @@ struct kinfo_proc32 { char ki_comm[COMMLEN+1]; char ki_emul[KI_EMULNAMELEN+1]; char ki_loginclass[LOGINCLASSLEN+1]; - char ki_sparestrings[50]; + char ki_moretdname[MAXCOMLEN-TDNAMLEN+1]; + char ki_sparestrings[46]; int ki_spareints[KI_NSPARE_INT]; int ki_oncpu; int ki_lastcpu; Modified: stable/11/sys/kern/kern_proc.c ============================================================================== --- stable/11/sys/kern/kern_proc.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/sys/kern/kern_proc.c Thu Dec 15 16:51:33 2016 (r310120) @@ -1034,7 +1034,14 @@ fill_kinfo_thread(struct thread *td, str strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg)); else bzero(kp->ki_wmesg, sizeof(kp->ki_wmesg)); - strlcpy(kp->ki_tdname, td->td_name, sizeof(kp->ki_tdname)); + if (strlcpy(kp->ki_tdname, td->td_name, sizeof(kp->ki_tdname)) >= + sizeof(kp->ki_tdname)) { + strlcpy(kp->ki_moretdname, + td->td_name + sizeof(kp->ki_tdname) - 1, + sizeof(kp->ki_moretdname)); + } else { + bzero(kp->ki_moretdname, sizeof(kp->ki_moretdname)); + } if (TD_ON_LOCK(td)) { kp->ki_kiflag |= KI_LOCKBLOCK; strlcpy(kp->ki_lockname, td->td_lockname, @@ -1279,6 +1286,7 @@ freebsd32_kinfo_proc_out(const struct ki bcopy(ki->ki_comm, ki32->ki_comm, COMMLEN + 1); bcopy(ki->ki_emul, ki32->ki_emul, KI_EMULNAMELEN + 1); bcopy(ki->ki_loginclass, ki32->ki_loginclass, LOGINCLASSLEN + 1); + bcopy(ki->ki_moretdname, ki32->ki_moretdname, MAXCOMLEN - TDNAMLEN + 1); CP(*ki, *ki32, ki_tracer); CP(*ki, *ki32, ki_flag2); CP(*ki, *ki32, ki_fibnum); Modified: stable/11/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/sys/sys/param.h Thu Dec 15 16:51:33 2016 (r310120) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100506 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100507 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: stable/11/sys/sys/user.h ============================================================================== --- stable/11/sys/sys/user.h Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/sys/sys/user.h Thu Dec 15 16:51:33 2016 (r310120) @@ -180,12 +180,13 @@ struct kinfo_proc { char ki_comm[COMMLEN+1]; /* command name */ char ki_emul[KI_EMULNAMELEN+1]; /* emulation name */ char ki_loginclass[LOGINCLASSLEN+1]; /* login class */ + char ki_moretdname[MAXCOMLEN-TDNAMLEN+1]; /* more thread name */ /* * When adding new variables, take space for char-strings from the * front of ki_sparestrings, and ints from the end of ki_spareints. * That way the spare room from both arrays will remain contiguous. */ - char ki_sparestrings[50]; /* spare string space */ + char ki_sparestrings[46]; /* spare string space */ int ki_spareints[KI_NSPARE_INT]; /* spare room for growth */ int ki_oncpu; /* Which cpu we are on */ int ki_lastcpu; /* Last cpu we were on */ Modified: stable/11/usr.bin/procstat/procstat.c ============================================================================== --- stable/11/usr.bin/procstat/procstat.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/usr.bin/procstat/procstat.c Thu Dec 15 16:51:33 2016 (r310120) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -126,6 +127,21 @@ kinfo_proc_sort(struct kinfo_proc *kipp, qsort(kipp, count, sizeof(*kipp), kinfo_proc_compare); } +const char * +kinfo_proc_thread_name(const struct kinfo_proc *kipp) +{ + static char name[MAXCOMLEN+1]; + + strlcpy(name, kipp->ki_tdname, sizeof(name)); + strlcat(name, kipp->ki_moretdname, sizeof(name)); + if (name[0] == '\0' || strcmp(kipp->ki_comm, name) == 0) { + name[0] = '-'; + name[1] = '\0'; + } + + return (name); +} + int main(int argc, char *argv[]) { Modified: stable/11/usr.bin/procstat/procstat.h ============================================================================== --- stable/11/usr.bin/procstat/procstat.h Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/usr.bin/procstat/procstat.h Thu Dec 15 16:51:33 2016 (r310120) @@ -38,6 +38,7 @@ extern int hflag, nflag, Cflag, Hflag; struct kinfo_proc; void kinfo_proc_sort(struct kinfo_proc *kipp, int count); +const char * kinfo_proc_thread_name(const struct kinfo_proc *kipp); void procstat_args(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_auxv(struct procstat *prstat, struct kinfo_proc *kipp); Modified: stable/11/usr.bin/procstat/procstat_cs.c ============================================================================== --- stable/11/usr.bin/procstat/procstat_cs.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/usr.bin/procstat/procstat_cs.c Thu Dec 15 16:51:33 2016 (r310120) @@ -53,7 +53,7 @@ procstat_cs(struct procstat *procstat, s int once, twice, lastcpu, cpu; if (!hflag) - xo_emit("{T:/%5s %6s %-16s %-16s %2s %4s %-7s}\n", "PID", + xo_emit("{T:/%5s %6s %-19s %-19s %2s %4s %-7s}\n", "PID", "TID", "COMM", "TDNAME", "CPU", "CSID", "CPU MASK"); kip = procstat_getprocs(procstat, KERN_PROC_PID | KERN_PROC_INC_THREAD, @@ -65,11 +65,10 @@ procstat_cs(struct procstat *procstat, s kipp = &kip[i]; xo_emit("{k:process_id/%5d/%d} ", kipp->ki_pid); xo_emit("{:thread_id/%6d/%d} ", kipp->ki_tid); - xo_emit("{:command/%-16s/%s} ", strlen(kipp->ki_comm) ? + xo_emit("{:command/%-19s/%s} ", strlen(kipp->ki_comm) ? kipp->ki_comm : "-"); - xo_emit("{:thread_name/%-16s/%s} ", (strlen(kipp->ki_tdname) && - (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? - kipp->ki_tdname : "-"); + xo_emit("{:thread_name/%-19s/%s} ", + kinfo_proc_thread_name(kipp)); if (kipp->ki_oncpu != 255) xo_emit("{:cpu/%3d/%d} ", kipp->ki_oncpu); else if (kipp->ki_lastcpu != 255) Modified: stable/11/usr.bin/procstat/procstat_kstack.c ============================================================================== --- stable/11/usr.bin/procstat/procstat_kstack.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/usr.bin/procstat/procstat_kstack.c Thu Dec 15 16:51:33 2016 (r310120) @@ -171,7 +171,7 @@ procstat_kstack(struct procstat *procsta unsigned int kip_count, kstk_count; if (!hflag) - xo_emit("{T:/%5s %6s %-16s %-16s %-29s}\n", "PID", "TID", "COMM", + xo_emit("{T:/%5s %6s %-19s %-19s %-29s}\n", "PID", "TID", "COMM", "TDNAME", "KSTACK"); kkstp = kkstp_free = procstat_getkstack(procstat, kipp, &kstk_count); @@ -208,10 +208,9 @@ procstat_kstack(struct procstat *procsta xo_emit("{k:process_id/%5d/%d} ", kipp->ki_pid); xo_emit("{:thread_id/%6d/%d} ", kkstp->kkst_tid); - xo_emit("{:command/%-16s/%s} ", kipp->ki_comm); - xo_emit("{:thread_name/%-16s/%s} ", (strlen(kipp->ki_tdname) && - (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? - kipp->ki_tdname : "-"); + xo_emit("{:command/%-19s/%s} ", kipp->ki_comm); + xo_emit("{:thread_name/%-19s/%s} ", + kinfo_proc_thread_name(kipp)); switch (kkstp->kkst_state) { case KKST_STATE_RUNNING: Modified: stable/11/usr.bin/procstat/procstat_threads.c ============================================================================== --- stable/11/usr.bin/procstat/procstat_threads.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/usr.bin/procstat/procstat_threads.c Thu Dec 15 16:51:33 2016 (r310120) @@ -49,7 +49,7 @@ procstat_threads(struct procstat *procst char *threadid; if (!hflag) - xo_emit("{T:/%5s %6s %-16s %-16s %2s %4s %-7s %-9s}\n", "PID", + xo_emit("{T:/%5s %6s %-19s %-19s %2s %4s %-7s %-9s}\n", "PID", "TID", "COMM", "TDNAME", "CPU", "PRI", "STATE", "WCHAN"); xo_emit("{ek:process_id/%d}", kipp->ki_pid); @@ -71,11 +71,10 @@ procstat_threads(struct procstat *procst xo_open_container(threadid); xo_emit("{dk:process_id/%5d/%d} ", kipp->ki_pid); xo_emit("{:thread_id/%6d/%d} ", kipp->ki_tid); - xo_emit("{d:command/%-16s/%s} ", strlen(kipp->ki_comm) ? + xo_emit("{d:command/%-19s/%s} ", strlen(kipp->ki_comm) ? kipp->ki_comm : "-"); - xo_emit("{:thread_name/%-16s/%s} ", (strlen(kipp->ki_tdname) && - (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? - kipp->ki_tdname : "-"); + xo_emit("{:thread_name/%-19s/%s} ", + kinfo_proc_thread_name(kipp)); if (kipp->ki_oncpu != 255) xo_emit("{:cpu/%3d/%d} ", kipp->ki_oncpu); else if (kipp->ki_lastcpu != 255) Modified: stable/11/usr.bin/top/machine.c ============================================================================== --- stable/11/usr.bin/top/machine.c Thu Dec 15 16:27:39 2016 (r310119) +++ stable/11/usr.bin/top/machine.c Thu Dec 15 16:51:33 2016 (r310120) @@ -991,8 +991,8 @@ format_next_process(caddr_t handle, char if (!(flags & FMT_SHOWARGS)) { if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) { - snprintf(cmdbuf, cmdlen, "%s{%s}", pp->ki_comm, - pp->ki_tdname); + snprintf(cmdbuf, cmdlen, "%s{%s%s}", pp->ki_comm, + pp->ki_tdname, pp->ki_moretdname); } else { snprintf(cmdbuf, cmdlen, "%s", pp->ki_comm); } @@ -1004,7 +1004,8 @@ format_next_process(caddr_t handle, char if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) { snprintf(cmdbuf, cmdlen, - "[%s{%s}]", pp->ki_comm, pp->ki_tdname); + "[%s{%s%s}]", pp->ki_comm, pp->ki_tdname, + pp->ki_moretdname); } else { snprintf(cmdbuf, cmdlen, "[%s]", pp->ki_comm); @@ -1052,8 +1053,9 @@ format_next_process(caddr_t handle, char if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) snprintf(cmdbuf, cmdlen, - "%s (%s){%s}", argbuf, pp->ki_comm, - pp->ki_tdname); + "%s (%s){%s%s}", argbuf, + pp->ki_comm, pp->ki_tdname, + pp->ki_moretdname); else snprintf(cmdbuf, cmdlen, "%s (%s)", argbuf, pp->ki_comm); @@ -1061,7 +1063,8 @@ format_next_process(caddr_t handle, char if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) snprintf(cmdbuf, cmdlen, - "%s{%s}", argbuf, pp->ki_tdname); + "%s{%s%s}", argbuf, pp->ki_tdname, + pp->ki_moretdname); else strlcpy(cmdbuf, argbuf, cmdlen); } From owner-svn-src-stable-11@freebsd.org Thu Dec 15 20:10:22 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1169FC817AA; Thu, 15 Dec 2016 20:10:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4CBDAF4; Thu, 15 Dec 2016 20:10:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFKALoG077101; Thu, 15 Dec 2016 20:10:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFKALaU077100; Thu, 15 Dec 2016 20:10:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201612152010.uBFKALaU077100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 15 Dec 2016 20:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310126 - stable/11/tools/build/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 20:10:22 -0000 Author: ngie Date: Thu Dec 15 20:10:20 2016 New Revision: 310126 URL: https://svnweb.freebsd.org/changeset/base/310126 Log: MFC r309602: Remove svn[lite]{bench,fsfs} if either MK_SVN == no or MK_SVNLITE == no Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Thu Dec 15 17:41:30 2016 (r310125) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Thu Dec 15 20:10:20 2016 (r310126) @@ -8821,7 +8821,9 @@ OLD_FILES+=usr/share/man/man8/wpa_suppli .if ${MK_SVNLITE} == no || ${MK_SVN} == yes OLD_FILES+=usr/bin/svnlite OLD_FILES+=usr/bin/svnliteadmin +OLD_FILES+=usr/bin/svnlitebench OLD_FILES+=usr/bin/svnlitedumpfilter +OLD_FILES+=usr/bin/svnlitefsfs OLD_FILES+=usr/bin/svnlitelook OLD_FILES+=usr/bin/svnlitemucc OLD_FILES+=usr/bin/svnliterdump @@ -8834,7 +8836,9 @@ OLD_FILES+=usr/share/man/man1/svnlite.1. .if ${MK_SVN} == no OLD_FILES+=usr/bin/svn OLD_FILES+=usr/bin/svnadmin +OLD_FILES+=usr/bin/svnbench OLD_FILES+=usr/bin/svndumpfilter +OLD_FILES+=usr/bin/svnfsfs OLD_FILES+=usr/bin/svnlook OLD_FILES+=usr/bin/svnmucc OLD_FILES+=usr/bin/svnrdump From owner-svn-src-stable-11@freebsd.org Thu Dec 15 22:39:53 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8433BC82BC8; Thu, 15 Dec 2016 22:39:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 538DC1990; Thu, 15 Dec 2016 22:39:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFMdqcv039306; Thu, 15 Dec 2016 22:39:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFMdqnY039305; Thu, 15 Dec 2016 22:39:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201612152239.uBFMdqnY039305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 15 Dec 2016 22:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310129 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 22:39:53 -0000 Author: jhb Date: Thu Dec 15 22:39:52 2016 New Revision: 310129 URL: https://svnweb.freebsd.org/changeset/base/310129 Log: MFC 308565: Allow scheduling during early boot. - Send IPI wakeups once SMP is started even if cold is true. - Permit preemptions when cold is true. These changes are needed for EARLY_AP_STARTUP. Modified: stable/11/sys/kern/sched_4bsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sched_4bsd.c ============================================================================== --- stable/11/sys/kern/sched_4bsd.c Thu Dec 15 21:26:58 2016 (r310128) +++ stable/11/sys/kern/sched_4bsd.c Thu Dec 15 22:39:52 2016 (r310129) @@ -326,7 +326,6 @@ maybe_preempt(struct thread *td) * - The current thread has a higher (numerically lower) or * equivalent priority. Note that this prevents curthread from * trying to preempt to itself. - * - It is too early in the boot for context switches (cold is set). * - The current thread has an inhibitor set or is in the process of * exiting. In this case, the current thread is about to switch * out anyways, so there's no point in preempting. If we did, @@ -347,7 +346,7 @@ maybe_preempt(struct thread *td) ("maybe_preempt: trying to run inhibited thread")); pri = td->td_priority; cpri = ctd->td_priority; - if (panicstr != NULL || pri >= cpri || cold /* || dumping */ || + if (panicstr != NULL || pri >= cpri /* || dumping */ || TD_IS_INHIBITED(ctd)) return (0); #ifndef FULL_PREEMPTION @@ -1105,7 +1104,7 @@ forward_wakeup(int cpunum) if ((!forward_wakeup_enabled) || (forward_wakeup_use_mask == 0 && forward_wakeup_use_loop == 0)) return (0); - if (!smp_started || cold || panicstr) + if (!smp_started || panicstr) return (0); forward_wakeups_requested++; From owner-svn-src-stable-11@freebsd.org Fri Dec 16 01:06:37 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F197C76A68; Fri, 16 Dec 2016 01:06:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2539153B; Fri, 16 Dec 2016 01:06:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBG16aX3000523; Fri, 16 Dec 2016 01:06:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBG16a9X000522; Fri, 16 Dec 2016 01:06:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201612160106.uBG16a9X000522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 16 Dec 2016 01:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310133 - in stable: 10/sys/mips/mips 11/sys/mips/mips X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 01:06:37 -0000 Author: jhb Date: Fri Dec 16 01:06:35 2016 New Revision: 310133 URL: https://svnweb.freebsd.org/changeset/base/310133 Log: MFC 308690: Sync instruction cache's after writing user breakpoints on MIPS. Add an implementation for pmaps_sync_icache() on MIPS that sync's the instruction cache on all CPUs via smp_rendezvous() after a debugger inserts a breakpoint via ptrace(PT_IO). Modified: stable/11/sys/mips/mips/pmap.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/mips/mips/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/mips/mips/pmap.c ============================================================================== --- stable/11/sys/mips/mips/pmap.c Fri Dec 16 00:35:59 2016 (r310132) +++ stable/11/sys/mips/mips/pmap.c Fri Dec 16 01:06:35 2016 (r310133) @@ -74,11 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#else -#include -#endif #include #include @@ -3284,9 +3280,19 @@ pmap_activate(struct thread *td) critical_exit(); } +static void +pmap_sync_icache_one(void *arg __unused) +{ + + mips_icache_sync_all(); + mips_dcache_wbinv_all(); +} + void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { + + smp_rendezvous(NULL, pmap_sync_icache_one, NULL, NULL); } /* From owner-svn-src-stable-11@freebsd.org Fri Dec 16 01:14:01 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1570C8201C; Fri, 16 Dec 2016 01:14:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B097F1CF0; Fri, 16 Dec 2016 01:14:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBG1E03B004649; Fri, 16 Dec 2016 01:14:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBG1E0tr004648; Fri, 16 Dec 2016 01:14:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201612160114.uBG1E0tr004648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 16 Dec 2016 01:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310134 - in stable: 10/include 11/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 01:14:02 -0000 Author: jhb Date: Fri Dec 16 01:14:00 2016 New Revision: 310134 URL: https://svnweb.freebsd.org/changeset/base/310134 Log: MFC 309274: Use the correct name for the GCC macro indicating max_align_t is defined. Modified: stable/11/include/stddef.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/include/stddef.h Directory Properties: stable/10/ (props changed) Modified: stable/11/include/stddef.h ============================================================================== --- stable/11/include/stddef.h Fri Dec 16 01:06:35 2016 (r310133) +++ stable/11/include/stddef.h Fri Dec 16 01:14:00 2016 (r310134) @@ -66,7 +66,7 @@ typedef ___wchar_t wchar_t; #ifndef __CLANG_MAX_ALIGN_T_DEFINED typedef __max_align_t max_align_t; #define __CLANG_MAX_ALIGN_T_DEFINED -#define __GCC_MAX_ALIGN_T +#define _GCC_MAX_ALIGN_T #endif #endif From owner-svn-src-stable-11@freebsd.org Fri Dec 16 15:33:23 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D250C837DA; Fri, 16 Dec 2016 15:33:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 304E1161C; Fri, 16 Dec 2016 15:33:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGFXMg0056703; Fri, 16 Dec 2016 15:33:22 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGFXMWv056700; Fri, 16 Dec 2016 15:33:22 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201612161533.uBGFXMWv056700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 16 Dec 2016 15:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310156 - in stable/11/sys/arm: at91 broadcom/bcm2835 ti X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 15:33:23 -0000 Author: manu Date: Fri Dec 16 15:33:21 2016 New Revision: 310156 URL: https://svnweb.freebsd.org/changeset/base/310156 Log: MFC r309912: CS ivar is uint32_t, not int. Modified: stable/11/sys/arm/at91/at91_spi.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_spi.c stable/11/sys/arm/ti/ti_spi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/at91/at91_spi.c ============================================================================== --- stable/11/sys/arm/at91/at91_spi.c Fri Dec 16 14:23:08 2016 (r310155) +++ stable/11/sys/arm/at91/at91_spi.c Fri Dec 16 15:33:21 2016 (r310156) @@ -291,7 +291,8 @@ at91_spi_transfer(device_t dev, device_t { struct at91_spi_softc *sc; bus_addr_t addr; - int err, i, j, mode[4], cs; + int err, i, j, mode[4]; + uint32_t cs; KASSERT(cmd->tx_cmd_sz == cmd->rx_cmd_sz, ("%s: TX/RX command sizes should be equal", __func__)); @@ -315,7 +316,7 @@ at91_spi_transfer(device_t dev, device_t * PSCDEC = 0 has a range of 0..3 for chip select. We * don't support PSCDEC = 1 which has a range of 0..15. */ - if (cs < 0 || cs > 3) { + if (cs > 3) { device_printf(dev, "Invalid chip select %d requested by %s\n", cs, device_get_nameunit(child)); Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_spi.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_spi.c Fri Dec 16 14:23:08 2016 (r310155) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_spi.c Fri Dec 16 15:33:21 2016 (r310156) @@ -422,7 +422,8 @@ static int bcm_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) { struct bcm_spi_softc *sc; - int cs, err; + uint32_t cs; + int err; sc = device_get_softc(dev); @@ -433,7 +434,7 @@ bcm_spi_transfer(device_t dev, device_t /* Get the proper chip select for this child. */ spibus_get_cs(child, &cs); - if (cs < 0 || cs > 2) { + if (cs > 2) { device_printf(dev, "Invalid chip select %d requested by %s\n", cs, device_get_nameunit(child)); Modified: stable/11/sys/arm/ti/ti_spi.c ============================================================================== --- stable/11/sys/arm/ti/ti_spi.c Fri Dec 16 14:23:08 2016 (r310155) +++ stable/11/sys/arm/ti/ti_spi.c Fri Dec 16 15:33:21 2016 (r310156) @@ -445,9 +445,9 @@ ti_spi_gcd(int a, int b) static int ti_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) { - int cs, err; + int err; struct ti_spi_softc *sc; - uint32_t reg; + uint32_t reg, cs; sc = device_get_softc(dev); @@ -458,7 +458,7 @@ ti_spi_transfer(device_t dev, device_t c /* Get the proper chip select for this child. */ spibus_get_cs(child, &cs); - if (cs < 0 || cs > sc->sc_numcs) { + if (cs > sc->sc_numcs) { device_printf(dev, "Invalid chip select %d requested by %s\n", cs, device_get_nameunit(child)); return (EINVAL); From owner-svn-src-stable-11@freebsd.org Fri Dec 16 15:37:20 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C1FDC838D5; Fri, 16 Dec 2016 15:37:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 086BC18E2; Fri, 16 Dec 2016 15:37:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGFbJnE057120; Fri, 16 Dec 2016 15:37:19 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGFbJvO057119; Fri, 16 Dec 2016 15:37:19 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201612161537.uBGFbJvO057119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 16 Dec 2016 15:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310157 - stable/11/sys/arm/allwinner X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 15:37:20 -0000 Author: manu Date: Fri Dec 16 15:37:18 2016 New Revision: 310157 URL: https://svnweb.freebsd.org/changeset/base/310157 Log: MFC r309063: Test that the emac device is enabled in probe function Modified: stable/11/sys/arm/allwinner/if_emac.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/allwinner/if_emac.c ============================================================================== --- stable/11/sys/arm/allwinner/if_emac.c Fri Dec 16 15:33:21 2016 (r310156) +++ stable/11/sys/arm/allwinner/if_emac.c Fri Dec 16 15:37:18 2016 (r310157) @@ -784,6 +784,9 @@ static int emac_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-emac")) return (ENXIO); From owner-svn-src-stable-11@freebsd.org Fri Dec 16 15:45:10 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA7B5C83E50; Fri, 16 Dec 2016 15:45:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB1D110; Fri, 16 Dec 2016 15:45:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGFj9EQ061279; Fri, 16 Dec 2016 15:45:09 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGFj91O061274; Fri, 16 Dec 2016 15:45:09 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201612161545.uBGFj91O061274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 16 Dec 2016 15:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310158 - in stable/11/sys: arm/lpc mips/atheros mips/mediatek mips/rt305x X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 15:45:11 -0000 Author: manu Date: Fri Dec 16 15:45:09 2016 New Revision: 310158 URL: https://svnweb.freebsd.org/changeset/base/310158 Log: MFC r309935: Use the spibus accessor when applicable. Modified: stable/11/sys/arm/lpc/lpc_spi.c stable/11/sys/mips/atheros/ar71xx_spi.c stable/11/sys/mips/mediatek/mtk_spi_v1.c stable/11/sys/mips/mediatek/mtk_spi_v2.c stable/11/sys/mips/rt305x/rt305x_spi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/lpc/lpc_spi.c ============================================================================== --- stable/11/sys/arm/lpc/lpc_spi.c Fri Dec 16 15:37:18 2016 (r310157) +++ stable/11/sys/arm/lpc/lpc_spi.c Fri Dec 16 15:45:09 2016 (r310158) @@ -141,12 +141,14 @@ static int lpc_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) { struct lpc_spi_softc *sc = device_get_softc(dev); - struct spibus_ivar *devi = SPIBUS_IVAR(child); + uint32_t cs; uint8_t *in_buf, *out_buf; int i; + spibus_get_cs(child, &cs); + /* Set CS active */ - lpc_gpio_set_state(child, devi->cs, 0); + lpc_gpio_set_state(child, cs, 0); /* Wait for FIFO to be ready */ while ((lpc_spi_read_4(sc, LPC_SSP_SR) & LPC_SSP_SR_TNF) == 0); @@ -168,7 +170,7 @@ lpc_spi_transfer(device_t dev, device_t } /* Set CS inactive */ - lpc_gpio_set_state(child, devi->cs, 1); + lpc_gpio_set_state(child, cs, 1); return (0); } Modified: stable/11/sys/mips/atheros/ar71xx_spi.c ============================================================================== --- stable/11/sys/mips/atheros/ar71xx_spi.c Fri Dec 16 15:37:18 2016 (r310157) +++ stable/11/sys/mips/atheros/ar71xx_spi.c Fri Dec 16 15:45:09 2016 (r310158) @@ -204,13 +204,15 @@ static int ar71xx_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) { struct ar71xx_spi_softc *sc; + uint32_t cs; uint8_t *buf_in, *buf_out; - struct spibus_ivar *devi = SPIBUS_IVAR(child); int i; sc = device_get_softc(dev); - ar71xx_spi_chip_activate(sc, devi->cs); + spibus_get_cs(child, &cs); + + ar71xx_spi_chip_activate(sc, cs); KASSERT(cmd->tx_cmd_sz == cmd->rx_cmd_sz, ("TX/RX command sizes should be equal")); @@ -223,7 +225,7 @@ ar71xx_spi_transfer(device_t dev, device buf_out = (uint8_t *)cmd->tx_cmd; buf_in = (uint8_t *)cmd->rx_cmd; for (i = 0; i < cmd->tx_cmd_sz; i++) - buf_in[i] = ar71xx_spi_txrx(sc, devi->cs, buf_out[i]); + buf_in[i] = ar71xx_spi_txrx(sc, cs, buf_out[i]); /* * Receive/transmit data (depends on command) @@ -231,9 +233,9 @@ ar71xx_spi_transfer(device_t dev, device buf_out = (uint8_t *)cmd->tx_data; buf_in = (uint8_t *)cmd->rx_data; for (i = 0; i < cmd->tx_data_sz; i++) - buf_in[i] = ar71xx_spi_txrx(sc, devi->cs, buf_out[i]); + buf_in[i] = ar71xx_spi_txrx(sc, cs, buf_out[i]); - ar71xx_spi_chip_deactivate(sc, devi->cs); + ar71xx_spi_chip_deactivate(sc, cs); return (0); } Modified: stable/11/sys/mips/mediatek/mtk_spi_v1.c ============================================================================== --- stable/11/sys/mips/mediatek/mtk_spi_v1.c Fri Dec 16 15:37:18 2016 (r310157) +++ stable/11/sys/mips/mediatek/mtk_spi_v1.c Fri Dec 16 15:45:09 2016 (r310158) @@ -224,12 +224,14 @@ mtk_spi_transfer(device_t dev, device_t { struct mtk_spi_softc *sc; uint8_t *buf, byte, *tx_buf; - struct spibus_ivar *devi = SPIBUS_IVAR(child); + uint32_t cs; int i, sz, error = 0, write = 0; sc = device_get_softc(dev); - if (devi->cs != 0) + spibus_get_cs(child, &cs); + + if (cs != 0) /* Only 1 CS */ return (ENXIO); Modified: stable/11/sys/mips/mediatek/mtk_spi_v2.c ============================================================================== --- stable/11/sys/mips/mediatek/mtk_spi_v2.c Fri Dec 16 15:37:18 2016 (r310157) +++ stable/11/sys/mips/mediatek/mtk_spi_v2.c Fri Dec 16 15:45:09 2016 (r310158) @@ -229,12 +229,14 @@ mtk_spi_transfer(device_t dev, device_t { struct mtk_spi_softc *sc; uint8_t *buf, byte, *tx_buf; - struct spibus_ivar *devi = SPIBUS_IVAR(child); + uint32_t cs; int i, sz, error, write = 0; sc = device_get_softc(dev); - if (devi->cs != 0) + spibus_get_cs(child, &cs); + + if (cs != 0) /* Only 1 CS */ return (ENXIO); Modified: stable/11/sys/mips/rt305x/rt305x_spi.c ============================================================================== --- stable/11/sys/mips/rt305x/rt305x_spi.c Fri Dec 16 15:37:18 2016 (r310157) +++ stable/11/sys/mips/rt305x/rt305x_spi.c Fri Dec 16 15:45:09 2016 (r310158) @@ -218,13 +218,15 @@ static int rt305x_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) { struct rt305x_spi_softc *sc; + uint32_t cs; uint8_t *buf, byte, *tx_buf; - struct spibus_ivar *devi = SPIBUS_IVAR(child); int i, sz, error = 0, write = 0; sc = device_get_softc(dev); - if (devi->cs != 0) + spibus_get_cs(child, &cs); + + if (cs != 0) /* Only 1 CS */ return (ENXIO); From owner-svn-src-stable-11@freebsd.org Fri Dec 16 20:24:49 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6BD7C82179; Fri, 16 Dec 2016 20:24:49 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7976D10C1; Fri, 16 Dec 2016 20:24:49 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGKOmB4075596; Fri, 16 Dec 2016 20:24:48 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGKOm8i075589; Fri, 16 Dec 2016 20:24:48 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201612162024.uBGKOm8i075589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 16 Dec 2016 20:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310174 - in stable/11: sbin/camcontrol sys/cam/scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 20:24:49 -0000 Author: ken Date: Fri Dec 16 20:24:47 2016 New Revision: 310174 URL: https://svnweb.freebsd.org/changeset/base/310174 Log: MFC r309374, r309513, r309839, r309840: ------------------------------------------------------------------------ r309374 | ken | 2016-12-01 15:20:27 -0700 (Thu, 01 Dec 2016) | 41 lines Add SCSI REPORT TIMESTAMP and SET TIMESTAMP support. This adds support to camcontrol(8) and libcam(3) for getting and setting the time on SCSI protocol drives. This is more commonly found on tape drives, but is a SPC (SCSI Primary Commands) command, and may be found on any device that speaks SCSI. The new camcontrol timestamp subcommand allows getting the current device time or setting the time to the current system time or any arbitrary time. sbin/camcontrol/Makefile: Add timestamp.c. sbin/camcontrol/camcontrol.8: Document the new timestamp subcommand. sbin/camcontrol/camcontrol.c: Add the timestamp subcommand to camcontrol. sbin/camcontrol/camcontrol.h: Add the timestamp() function prototype. sbin/camcontrol/timestamp.c: Timestamp setting and reporting functionality. sys/cam/scsi/scsi_all.c: Add two new CCB building functions, scsi_set_timestamp() and scsi_report_timestamp(). Also, add a new helper function, scsi_create_timestamp(). sys/cam/scsi/scsi_all.h: Add CDB and parameter data for the the set and report timestamp commands. Add function declarations for the new CCB building and helper functions. Submitted by: Sam Klopsch Sponsored by: Spectra Logic ------------------------------------------------------------------------ r309513 | adrian | 2016-12-03 13:35:39 -0700 (Sat, 03 Dec 2016) | 7 lines [camcontrol] init ts=0 to quieten gcc. It "looks" like ts is set to something on success, and not modified on error. Checked on IRC with: cem ------------------------------------------------------------------------ r309839 | ngie | 2016-12-10 16:26:34 -0700 (Sat, 10 Dec 2016) | 6 lines free/NULL out variables prior to calling strdup to avoid leaking memory if arguments are specified more than once with "camcontrol timestamp". CID: 1366829, 1366831 ------------------------------------------------------------------------ r309840 | ngie | 2016-12-10 16:58:14 -0700 (Sat, 10 Dec 2016) | 8 lines Cut to the chase and just call free instead of free(x) + x = NULL NULLing out x wasn't required as the memory was immediately scribbled over with strdup in the following call. Submitted by: imp ------------------------------------------------------------------------ Added: stable/11/sbin/camcontrol/timestamp.c - copied, changed from r309374, head/sbin/camcontrol/timestamp.c Modified: stable/11/sbin/camcontrol/Makefile stable/11/sbin/camcontrol/camcontrol.8 stable/11/sbin/camcontrol/camcontrol.c stable/11/sbin/camcontrol/camcontrol.h stable/11/sys/cam/scsi/scsi_all.c stable/11/sys/cam/scsi/scsi_all.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/Makefile ============================================================================== --- stable/11/sbin/camcontrol/Makefile Fri Dec 16 20:10:55 2016 (r310173) +++ stable/11/sbin/camcontrol/Makefile Fri Dec 16 20:24:47 2016 (r310174) @@ -4,7 +4,7 @@ PACKAGE=runtime PROG= camcontrol SRCS= camcontrol.c util.c .if !defined(RELEASE_CRUNCH) -SRCS+= attrib.c epc.c fwdownload.c modeedit.c persist.c progress.c zone.c +SRCS+= attrib.c epc.c fwdownload.c modeedit.c persist.c progress.c timestamp.c zone.c .else CFLAGS+= -DMINIMALISTIC .endif Modified: stable/11/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.8 Fri Dec 16 20:10:55 2016 (r310173) +++ stable/11/sbin/camcontrol/camcontrol.8 Fri Dec 16 20:24:47 2016 (r310174) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2016 +.Dd November 30, 2016 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -343,6 +343,11 @@ .Op Fl S Ar power_src .Op Fl T Ar timer .Nm +.Ic timestamp +.Op device id +.Op generic args +.Ao Fl r Oo Ns Fl f Ar format | Fl m | Fl U Oc | Fl s Ao Fl f Ar format Fl T Ar time | Fl U Ac Ac +.Nm .Ic help .Sh DESCRIPTION The @@ -2417,6 +2422,54 @@ supports, and a number of parameters abo whether it is enabled and what the timer value is. .El .El +.It Ic timestamp +Issue REPORT TIMESTAMP or SET TIMESTAMP +.Tn SCSI +commands. Either the +.Fl r +option or the +.Fl s +option must be specified. +.Bl -tag -width 6n +.It Fl r +Report the device's timestamp. +If no more arguments are specified, the timestamp will be reported using +the national representation of the date and time, followed by the time +zone. +.Bl -tag -width 9n +.It Fl f Ar format +Specify the strftime format string, as documented in strftime(3), to be used +to format the reported timestamp. +.It Fl m +Report the timestamp as milliseconds since the epoch. +.It Fl U +Report the timestamp using the national representation of the date and +time, but override the system time zone and use UTC instead. +.El +.El +.Bl -tag -width 6n +.It Fl s +Set the device's timestamp. Either the +.Fl f +and +.Fl T +options or the +.Fl U +option must be specified. +.Bl -tag -width 9n +.It Fl f Ar format +Specify the strptime format string, as documented in strptime(3). +The time must also be specified with the +.Fl T +option. +.It Fl T +Provide the time in the format specified with the +.Fl f +option. +.It Fl U +Set the timestamp to the host system's time in UTC. +.El +.El .It Ic help Print out verbose usage information. .El @@ -2730,6 +2783,18 @@ camcontrol epc ada0 -c list Display the ATA Power Conditions log (Log Address 0x08) for drive .Pa ada0 . +.Pp +.Bd -literal -offset indent +camcontrol timestamp sa0 -s -f "%A %c" \e + -T "Wednesday Wed Oct 26 21:43:57 2016" +.Ed +.Pp +Set the timestamp of drive +.Pa sa0 +using a +.Xr strptime 3 +format string followed by a time string +that was created using this format string. .Sh SEE ALSO .Xr cam 3 , .Xr cam_cdbparse 3 , Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Fri Dec 16 20:10:55 2016 (r310173) +++ stable/11/sbin/camcontrol/camcontrol.c Fri Dec 16 20:24:47 2016 (r310174) @@ -103,7 +103,8 @@ typedef enum { CAM_CMD_OPCODES = 0x00000024, CAM_CMD_REPROBE = 0x00000025, CAM_CMD_ZONE = 0x00000026, - CAM_CMD_EPC = 0x00000027 + CAM_CMD_EPC = 0x00000027, + CAM_CMD_TIMESTAMP = 0x00000028 } cam_cmdmask; typedef enum { @@ -234,6 +235,7 @@ static struct camcontrol_opts option_tab {"opcodes", CAM_CMD_OPCODES, CAM_ARG_NONE, "No:s:T"}, {"zone", CAM_CMD_ZONE, CAM_ARG_NONE, "ac:l:No:P:"}, {"epc", CAM_CMD_EPC, CAM_ARG_NONE, "c:dDeHp:Pr:sS:T:"}, + {"timestamp", CAM_CMD_TIMESTAMP, CAM_ARG_NONE, "f:mrsUT:"}, #endif /* MINIMALISTIC */ {"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, @@ -8922,6 +8924,9 @@ usage(int printlong) " camcontrol epc [dev_id][generic_args]<-c cmd> [-d] [-D] [-e]\n" " [-H] [-p power_cond] [-P] [-r rst_src] [-s]\n" " [-S power_src] [-T timer]\n" +" camcontrol timestamp [dev_id][generic_args] <-r [-f format|-m|-U]>|\n" +" <-s <-f format -T time | -U >>\n" +" \n" #endif /* MINIMALISTIC */ " camcontrol help\n"); if (!printlong) @@ -8966,6 +8971,7 @@ usage(int printlong) "opcodes send the SCSI REPORT SUPPORTED OPCODES command\n" "zone manage Zoned Block (Shingled) devices\n" "epc send ATA Extended Power Conditions commands\n" +"timestamp report or set the device's timestamp\n" "help this message\n" "Device Identifiers:\n" "bus:target specify the bus and target, lun defaults to 0\n" @@ -9157,6 +9163,17 @@ usage(int printlong) "-s save mode (timer, state, restore)\n" "-S power_src set power source: battery, nonbattery (source)\n" "-T timer set timer, seconds, .1 sec resolution (timer)\n" +"timestamp arguments:\n" +"-r report the timestamp of the device\n" +"-f format report the timestamp of the device with the given\n" +" strftime(3) format string\n" +"-m report the timestamp of the device as milliseconds since\n" +" January 1st, 1970\n" +"-U report the time with UTC instead of the local time zone\n" +"-s set the timestamp of the device\n" +"-f format the format of the time string passed into strptime(3)\n" +"-T time the time value passed into strptime(3)\n" +"-U set the timestamp of the device to UTC time\n" ); #endif /* MINIMALISTIC */ } @@ -9520,6 +9537,10 @@ main(int argc, char **argv) error = epc(cam_dev, argc, argv, combinedopt, retry_count, timeout, arglist & CAM_ARG_VERBOSE); break; + case CAM_CMD_TIMESTAMP: + error = timestamp(cam_dev, argc, argv, combinedopt, + retry_count, timeout, arglist & CAM_ARG_VERBOSE); + break; #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: usage(1); Modified: stable/11/sbin/camcontrol/camcontrol.h ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.h Fri Dec 16 20:10:55 2016 (r310173) +++ stable/11/sbin/camcontrol/camcontrol.h Fri Dec 16 20:24:47 2016 (r310174) @@ -81,6 +81,9 @@ int zone(struct cam_device *device, int int retry_count, int timeout, int verbosemode); int epc(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout, int verbosemode); +int timestamp(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout, + int verbosemode); void mode_sense(struct cam_device *device, int mode_page, int page_control, int dbd, int retry_count, int timeout, u_int8_t *data, int datalen); Copied and modified: stable/11/sbin/camcontrol/timestamp.c (from r309374, head/sbin/camcontrol/timestamp.c) ============================================================================== --- head/sbin/camcontrol/timestamp.c Thu Dec 1 22:20:27 2016 (r309374, copy source) +++ stable/11/sbin/camcontrol/timestamp.c Fri Dec 16 20:24:47 2016 (r310174) @@ -328,7 +328,7 @@ timestamp(struct cam_device *device, int int retry_count, int timeout, int verbosemode __unused) { int c; - uint64_t ts; + uint64_t ts = 0; char *format_string = NULL; char *timestamp_string = NULL; int action = -1; @@ -358,6 +358,7 @@ timestamp(struct cam_device *device, int } case 'f': { single_arg++; + free(format_string); format_string = strdup(optarg); if (format_string == NULL) { warn("Error allocating memory for format " @@ -369,6 +370,7 @@ timestamp(struct cam_device *device, int } case 'm': { single_arg++; + free(format_string); format_string = strdup(MIL); if (format_string == NULL) { warn("Error allocating memory"); @@ -382,6 +384,7 @@ timestamp(struct cam_device *device, int break; } case 'T': + free(timestamp_string); timestamp_string = strdup(optarg); if (timestamp_string == NULL) { warn("Error allocating memory for format " Modified: stable/11/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.c Fri Dec 16 20:10:55 2016 (r310173) +++ stable/11/sys/cam/scsi/scsi_all.c Fri Dec 16 20:24:47 2016 (r310174) @@ -7947,6 +7947,32 @@ scsi_report_target_group(struct ccb_scsi } void +scsi_report_timestamp(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, u_int8_t pdf, + void *buf, u_int32_t alloc_len, + u_int8_t sense_len, u_int32_t timeout) +{ + struct scsi_timestamp *scsi_cmd; + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/CAM_DIR_IN, + tag_action, + /*data_ptr*/(u_int8_t *)buf, + /*dxfer_len*/alloc_len, + sense_len, + sizeof(*scsi_cmd), + timeout); + scsi_cmd = (struct scsi_timestamp *)&csio->cdb_io.cdb_bytes; + bzero(scsi_cmd, sizeof(*scsi_cmd)); + scsi_cmd->opcode = MAINTENANCE_IN; + scsi_cmd->service_action = REPORT_TIMESTAMP | pdf; + scsi_ulto4b(alloc_len, scsi_cmd->length); +} + +void scsi_set_target_group(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, void *buf, u_int32_t alloc_len, @@ -7971,6 +7997,45 @@ scsi_set_target_group(struct ccb_scsiio scsi_ulto4b(alloc_len, scsi_cmd->length); } +void +scsi_create_timestamp(uint8_t *timestamp_6b_buf, + uint64_t timestamp) +{ + uint8_t buf[8]; + scsi_u64to8b(timestamp, buf); + /* + * Using memcopy starting at buf[2] because the set timestamp parameters + * only has six bytes for the timestamp to fit into, and we don't have a + * scsi_u64to6b function. + */ + memcpy(timestamp_6b_buf, &buf[2], 6); +} + +void +scsi_set_timestamp(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, void *buf, u_int32_t alloc_len, + u_int8_t sense_len, u_int32_t timeout) +{ + struct scsi_timestamp *scsi_cmd; + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/CAM_DIR_OUT, + tag_action, + /*data_ptr*/(u_int8_t *) buf, + /*dxfer_len*/alloc_len, + sense_len, + sizeof(*scsi_cmd), + timeout); + scsi_cmd = (struct scsi_timestamp *)&csio->cdb_io.cdb_bytes; + bzero(scsi_cmd, sizeof(*scsi_cmd)); + scsi_cmd->opcode = MAINTENANCE_OUT; + scsi_cmd->service_action = SET_TIMESTAMP; + scsi_ulto4b(alloc_len, scsi_cmd->length); +} + /* * Syncronize the media to the contents of the cache for * the given lba/count pair. Specifying 0/0 means sync Modified: stable/11/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.h Fri Dec 16 20:10:55 2016 (r310173) +++ stable/11/sys/cam/scsi/scsi_all.h Fri Dec 16 20:24:47 2016 (r310174) @@ -702,7 +702,9 @@ struct scsi_control_page { struct scsi_control_ext_page { uint8_t page_code; +#define SCEP_PAGE_CODE 0x0a uint8_t subpage_code; +#define SCEP_SUBPAGE_CODE 0x01 uint8_t page_length[2]; uint8_t flags; #define SCEP_TCMOS 0x04 /* Timestamp Changeable by */ @@ -2971,6 +2973,31 @@ struct scsi_target_group uint8_t control; }; +struct scsi_timestamp +{ + uint8_t opcode; + uint8_t service_action; + uint8_t reserved1[4]; + uint8_t length[4]; + uint8_t reserved2; + uint8_t control; +}; + +struct scsi_set_timestamp_parameters +{ + uint8_t reserved1[4]; + uint8_t timestamp[6]; + uint8_t reserved2[4]; +}; + +struct scsi_report_timestamp_parameter_data +{ + uint8_t length[2]; + uint8_t reserved1[2]; + uint8_t timestamp[6]; + uint8_t reserved2[2]; +}; + struct scsi_target_port_descriptor { uint8_t reserved[2]; uint8_t relative_target_port_identifier[2]; @@ -3966,12 +3993,29 @@ void scsi_report_target_group(struct cc u_int32_t alloc_len, u_int8_t sense_len, u_int32_t timeout); +void scsi_report_timestamp(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, + union ccb *), u_int8_t tag_action, + u_int8_t pdf, + void *buf, + u_int32_t alloc_len, u_int8_t sense_len, + u_int32_t timeout); + void scsi_set_target_group(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, void *buf, u_int32_t alloc_len, u_int8_t sense_len, u_int32_t timeout); +void scsi_create_timestamp(uint8_t *timestamp_6b_buf, + uint64_t timestamp); + +void scsi_set_timestamp(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, + union ccb *), u_int8_t tag_action, + void *buf, u_int32_t alloc_len, + u_int8_t sense_len, u_int32_t timeout); + void scsi_synchronize_cache(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, From owner-svn-src-stable-11@freebsd.org Fri Dec 16 20:49:52 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14331C82739; Fri, 16 Dec 2016 20:49:52 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8C251DEB; Fri, 16 Dec 2016 20:49:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGKnoOO083762; Fri, 16 Dec 2016 20:49:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGKnofM083756; Fri, 16 Dec 2016 20:49:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201612162049.uBGKnofM083756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 16 Dec 2016 20:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310176 - in stable/11: lib/libutil usr.sbin/pw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 20:49:52 -0000 Author: asomers Date: Fri Dec 16 20:49:50 2016 New Revision: 310176 URL: https://svnweb.freebsd.org/changeset/base/310176 Log: MFC r308806 Speed up pw operations that edit /etc/group or /etc/passwd r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group corruption on power loss. However, it fixed it by opening those files with O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC with appropriately placed fsync()s instead, which is much faster. Using a ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s. Modified: stable/11/lib/libutil/gr_util.c stable/11/lib/libutil/pw_util.c stable/11/usr.sbin/pw/grupd.c stable/11/usr.sbin/pw/pw_nis.c stable/11/usr.sbin/pw/pwupd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libutil/gr_util.c ============================================================================== --- stable/11/lib/libutil/gr_util.c Fri Dec 16 20:44:14 2016 (r310175) +++ stable/11/lib/libutil/gr_util.c Fri Dec 16 20:49:50 2016 (r310176) @@ -141,7 +141,7 @@ gr_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkostemp(tempname, O_SYNC)) == -1) + if ((tfd = mkostemp(tempname, 0)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) Modified: stable/11/lib/libutil/pw_util.c ============================================================================== --- stable/11/lib/libutil/pw_util.c Fri Dec 16 20:44:14 2016 (r310175) +++ stable/11/lib/libutil/pw_util.c Fri Dec 16 20:49:50 2016 (r310176) @@ -225,7 +225,7 @@ pw_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkostemp(tempname, O_SYNC)) == -1) + if ((tfd = mkostemp(tempname, 0)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) Modified: stable/11/usr.sbin/pw/grupd.c ============================================================================== --- stable/11/usr.sbin/pw/grupd.c Fri Dec 16 20:44:14 2016 (r310175) +++ stable/11/usr.sbin/pw/grupd.c Fri Dec 16 20:49:50 2016 (r310176) @@ -77,6 +77,7 @@ gr_update(struct group * grp, char const close(tfd); err(1, "gr_copy()"); } + fsync(tfd); close(tfd); if (gr_mkdb() == -1) { gr_fini(); Modified: stable/11/usr.sbin/pw/pw_nis.c ============================================================================== --- stable/11/usr.sbin/pw/pw_nis.c Fri Dec 16 20:44:14 2016 (r310175) +++ stable/11/usr.sbin/pw/pw_nis.c Fri Dec 16 20:49:50 2016 (r310176) @@ -67,6 +67,7 @@ pw_nisupdate(const char * path, struct p close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); if (chmod(pw_tempname(), 0644) == -1) err(1, "chmod()"); Modified: stable/11/usr.sbin/pw/pwupd.c ============================================================================== --- stable/11/usr.sbin/pw/pwupd.c Fri Dec 16 20:44:14 2016 (r310175) +++ stable/11/usr.sbin/pw/pwupd.c Fri Dec 16 20:49:50 2016 (r310176) @@ -114,6 +114,7 @@ pw_update(struct passwd * pwd, char cons close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); /* * in case of deletion of a user, the whole database From owner-svn-src-stable-11@freebsd.org Sat Dec 17 03:47:11 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93732C8464E; Sat, 17 Dec 2016 03:47:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DFCB8E5; Sat, 17 Dec 2016 03:47:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBH3lAB1054730; Sat, 17 Dec 2016 03:47:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBH3lAUH054725; Sat, 17 Dec 2016 03:47:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201612170347.uBH3lAUH054725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 17 Dec 2016 03:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310188 - stable/11/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2016 03:47:11 -0000 Author: ngie Date: Sat Dec 17 03:47:09 2016 New Revision: 310188 URL: https://svnweb.freebsd.org/changeset/base/310188 Log: MFC r309774,r309778,r309779,r309780: r309774: Only run mdconfig -d -u 3 if /dev/md3 exists on the system This will prevent "cleanup failures" (exit code != 0 returned) when tmpfs is not loaded r309778: Make test_unmount usable in cleanup subroutines - Duplicate test_unmount to _test_unmount - Remove atf_check calls - Call _test_unmount from test_unmount, checking the exit code at the end, and returning it to maintain the test_unmount "contract" r309779: - Ignore errors from umount - Use _test_unmount instead of test_unmount in cleanup r309780: Use _test_unmount instead of test_unmount in cleanup to avoid false positives with atf_check when tmpfs is not loaded, etc Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr stable/11/contrib/netbsd-tests/fs/tmpfs/t_link.sh stable/11/contrib/netbsd-tests/fs/tmpfs/t_mount.sh stable/11/contrib/netbsd-tests/fs/tmpfs/t_remove.sh stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr ============================================================================== --- stable/11/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr Sat Dec 17 03:41:16 2016 (r310187) +++ stable/11/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr Sat Dec 17 03:47:09 2016 (r310188) @@ -59,12 +59,31 @@ test_mount() { # Unmounts the file system mounted by test_mount. # test_unmount() { + # Begin FreeBSD + _test_unmount + exit_code=$? + atf_check_equal "$exit_code" "0" + return $exit_code + # End FreeBSD cd - >/dev/null atf_check -s eq:0 -o empty -e empty umount ${Mount_Point} atf_check -s eq:0 -o empty -e empty rmdir ${Mount_Point} Mount_Point= } +# Begin FreeBSD +_test_unmount() { + if [ -z "${Mount_Point}" -o ! -d "${Mount_Point}" ]; then + return 0 + fi + + cd - >/dev/null + umount ${Mount_Point} + rmdir ${Mount_Point} + Mount_Point= +} +# End FreeBSD + # # kqueue_monitor expected_nevents file1 [.. fileN] # Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_link.sh ============================================================================== --- stable/11/contrib/netbsd-tests/fs/tmpfs/t_link.sh Sat Dec 17 03:41:16 2016 (r310187) +++ stable/11/contrib/netbsd-tests/fs/tmpfs/t_link.sh Sat Dec 17 03:47:09 2016 (r310188) @@ -97,7 +97,7 @@ subdirs_body() { if true; then atf_test_case kqueue cleanup kqueue_cleanup() { - Mount_Point=$(pwd)/mntpt test_unmount || : + Mount_Point=$(pwd)/mntpt _test_unmount || : } else # End FreeBSD Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_mount.sh ============================================================================== --- stable/11/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Sat Dec 17 03:41:16 2016 (r310187) +++ stable/11/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Sat Dec 17 03:47:09 2016 (r310188) @@ -97,7 +97,8 @@ negative_body() { if true; then atf_test_case large cleanup large_cleanup() { - umount -f tmp 2>/dev/null + umount -f tmp 2>/dev/null || : + Mount_Point=$(pwd)/mnt _test_unmount || : } else # End FreeBSD Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_remove.sh ============================================================================== --- stable/11/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Sat Dec 17 03:41:16 2016 (r310187) +++ stable/11/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Sat Dec 17 03:47:09 2016 (r310188) @@ -50,7 +50,7 @@ single_body() { if true; then atf_test_case uchg cleanup uchg_cleanup() { - Mount_Point=$(pwd)/mntpt test_unmount || : + Mount_Point=$(pwd)/mntpt _test_unmount } else # End FreeBSD Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat Dec 17 03:41:16 2016 (r310187) +++ stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat Dec 17 03:47:09 2016 (r310188) @@ -85,7 +85,7 @@ basic_cleanup() { umount mnt 2>/dev/null 1>&2 # Begin FreeBSD if true; then - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 + [ ! -c /dev/md3 ] || mdconfig -d -u 3 else # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2