From owner-svn-src-all@freebsd.org Sun Sep 18 02:41:52 2016 Return-Path: Delivered-To: svn-src-all@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 586C6BD61A2; Sun, 18 Sep 2016 02:41:52 +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 1528E994; Sun, 18 Sep 2016 02:41:52 +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 u8I2fpQH085987; Sun, 18 Sep 2016 02:41:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I2fpgU085984; Sun, 18 Sep 2016 02:41:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180241.u8I2fpgU085984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 02:41: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: r305909 - in stable/11/cddl/usr.sbin/zfsd: . tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 02:41:52 -0000 Author: ngie Date: Sun Sep 18 02:41:50 2016 New Revision: 305909 URL: https://svnweb.freebsd.org/changeset/base/305909 Log: MFC r305018,r305019,r305020: r305018: Use SRCTOP instead of a homegrown definition for it (SRCDIR) r305019: Remove unnecessary variable (SRCDIR) replaced by SRCTOP in Makefile.common r305020: Remove redundant declarations and simplify ../ in pathing - TESTSBASE and LOCALBASE are already defined in bsd.tests.mk - TESTSDIR is automatically divined as ${TESTSBASE}${RELDIR:H} after r289158. - Replace SRCDIR with SRCTOP Modified: stable/11/cddl/usr.sbin/zfsd/Makefile stable/11/cddl/usr.sbin/zfsd/Makefile.common stable/11/cddl/usr.sbin/zfsd/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/usr.sbin/zfsd/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/Makefile Sat Sep 17 23:08:49 2016 (r305908) +++ stable/11/cddl/usr.sbin/zfsd/Makefile Sun Sep 18 02:41:50 2016 (r305909) @@ -1,6 +1,5 @@ # $FreeBSD$ -SRCDIR=${.CURDIR}/../../.. .include "Makefile.common" PROG_CXX= zfsd Modified: stable/11/cddl/usr.sbin/zfsd/Makefile.common ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/Makefile.common Sat Sep 17 23:08:49 2016 (r305908) +++ stable/11/cddl/usr.sbin/zfsd/Makefile.common Sun Sep 18 02:41:50 2016 (r305909) @@ -15,20 +15,20 @@ WARNS?= 3 # Ignore warnings about Solaris specific pragmas. IGNORE_PRAGMA= YES -INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzpool/common -INCFLAGS+= -I${SRCDIR}/cddl/compat/opensolaris/include -INCFLAGS+= -I${SRCDIR}/cddl/compat/opensolaris/lib/libumem -INCFLAGS+= -I${SRCDIR}/sys/cddl/compat/opensolaris -INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/head -INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libuutil/common -INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libumem/common -INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzfs_core/common -INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzfs/common -INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libnvpair -INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/common/zfs -INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common -INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/sys +INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +INCFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +INCFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +INCFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common +INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS} Modified: stable/11/cddl/usr.sbin/zfsd/tests/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/tests/Makefile Sat Sep 17 23:08:49 2016 (r305908) +++ stable/11/cddl/usr.sbin/zfsd/tests/Makefile Sun Sep 18 02:41:50 2016 (r305909) @@ -1,10 +1,7 @@ # $FreeBSD$ -SRCDIR=${.CURDIR}/../../../.. .include "${.CURDIR}/../Makefile.common" -.PATH: ${.CURDIR}/.. - -TESTSDIR?= ${TESTSBASE}/cddl/usr.sbin/zfsd +.PATH: ${.CURDIR:H} PLAIN_TESTS_CXX= zfsd_unittest SRCS.zfsd_unittest:= ${SRCS:Nzfsd_main.cc} @@ -12,7 +9,7 @@ SRCS.zfsd_unittest+= libmocks.c zfsd_un SRCS= # Use #include in test programs. -INCFLAGS+= -I${.CURDIR}/../.. +INCFLAGS+= -I${.CURDIR:H:H} .if defined(DESTDIR) INCFLAGS+= -I${DESTDIR}/usr/include @@ -27,7 +24,6 @@ LIBRARY_PATH= .endif # Googletest options -LOCALBASE?= /usr/local INCFLAGS+= -I${LOCALBASE}/include -D_THREAD_SAFE -pthread LDFLAGS.zfsd_unittest+= -L${LOCALBASE}/lib -D_THREAD_SAFE -pthread LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgtest.a @@ -39,7 +35,4 @@ LDADD.zfsd_unittest+= ${LOCALBASE}/lib/l # https://groups.google.com/forum/#!msg/googletestframework/h8ixEPCFm0o/amwfu4xGJb0J CFLAGS.zfsd_unittest+= -DGTEST_HAS_PTHREAD -# Install the tests -TESTSBASE?= /usr/tests - .include From owner-svn-src-all@freebsd.org Sun Sep 18 02:45:36 2016 Return-Path: Delivered-To: svn-src-all@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 3C1D6BD63B1; Sun, 18 Sep 2016 02:45:36 +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 165E9C8B; Sun, 18 Sep 2016 02:45:36 +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 u8I2jZFH086812; Sun, 18 Sep 2016 02:45:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I2jZq7086810; Sun, 18 Sep 2016 02:45:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180245.u8I2jZq7086810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 02:45: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: r305910 - in stable/11/lib/atf: libatf-c libatf-c++ X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 02:45:36 -0000 Author: ngie Date: Sun Sep 18 02:45:35 2016 New Revision: 305910 URL: https://svnweb.freebsd.org/changeset/base/305910 Log: MFC r305033,r305041,r305170: r305033: Minor Makefile simplifications for lib/atf/... - Replace uses of `${.CURDIR:H:H:H}` with ${SRCTOP} - Use built-in :H operator instead of ".." when enumerating paths. r305041: Filter certain compile-time options into -DATF_BUILD_* Items filtered through are: - Constant defines (-D) - Include flags (-I) - Linker flags (-L) - Optimization level (-O) - Warnings / linker flags (-W) - Preprocessor options (-f) This fixes the scenario hit by the Jenkins job where it's infecting the build with --sysroot, etc options from the Jenkins build in the tests. Prefix all intermediate variables (_CFLAGS, etc) with "ATF_BUILD" [*]. Requested by: jmmv r305170: Don't bake all of CC/CPP/CXX into CFLAGS Capture executable names for CC, CPP, CXX (assumed to be the first non-CCACHE_BIN word). This change strips out all of the cross-compiler arguments, (-target, -B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it doesn't infect the build and subsequently the test. Add comments noting why this logic is being added, and why the logic in r305041 was necessary/what it was trying to achieve. This is required after recent changes made to the toolchain to always specify --sysroot, -target, -B, etc with clang in buildworld (presumably r304681). Modified: stable/11/lib/atf/libatf-c++/Makefile stable/11/lib/atf/libatf-c/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/11/lib/atf/libatf-c++/Makefile Sun Sep 18 02:41:50 2016 (r305909) +++ stable/11/lib/atf/libatf-c++/Makefile Sun Sep 18 02:45:35 2016 (r305910) @@ -35,15 +35,15 @@ SHLIB_MAJOR= 2 # libatf-c++ depends on the C version of the ATF library to build. LIBADD+= atf_c -LDFLAGS+= -L${.OBJDIR}/../libatf-c +LDFLAGS+= -L${.OBJDIR:H}/libatf-c -ATF= ${.CURDIR:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail CFLAGS+= -I${ATF} -CFLAGS+= -I${.CURDIR}/../libatf-c +CFLAGS+= -I${.CURDIR:H}/libatf-c CFLAGS+= -I. CFLAGS+= -DHAVE_CONFIG_H Modified: stable/11/lib/atf/libatf-c/Makefile ============================================================================== --- stable/11/lib/atf/libatf-c/Makefile Sun Sep 18 02:41:50 2016 (r305909) +++ stable/11/lib/atf/libatf-c/Makefile Sun Sep 18 02:45:35 2016 (r305910) @@ -28,25 +28,37 @@ .include .include -_CFLAGS:= ${CFLAGS} -_CPPFLAGS:= ${CPPFLAGS} -_CXXFLAGS:= ${CXXFLAGS} +# Store the toolchain executable in ATF_BUILD_{CC,CPP,CXX} to ensure other +# values -- like -target, -B ..., etc -- don't get leaked into the tests. +# +# Be sure to omit ${CCACHE_BIN} (if specified) from the variable as it gets +# automatically appended to the variables in bsd.compiler.mk when +# ${MK_CCACHE_BUILD} != no. +ATF_BUILD_CC:= ${CC:N${CCACHE_BIN}:[1]} +ATF_BUILD_CPP:= ${CPP:N${CCACHE_BIN}:[1]} +ATF_BUILD_CXX:= ${CXX:N${CCACHE_BIN}:[1]} + +# Only capture defines, includes, linker flags, optimization levels, warnings +# and preprocessor flags when building ATF_BUILD_{C,CPP,CXX}FLAGS. +ATF_BUILD_CFLAGS:= ${CFLAGS:M-[DILOWf]*} +ATF_BUILD_CPPFLAGS:= ${CPPFLAGS:M-[DILOWf]*} +ATF_BUILD_CXXFLAGS:= ${CXXFLAGS:M-[DILOWf]*} LIB= atf-c PRIVATELIB= true SHLIB_MAJOR= 1 -ATF= ${.CURDIR:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail -CFLAGS+= -DATF_BUILD_CC='"${CC}"' -CFLAGS+= -DATF_BUILD_CFLAGS='"${_CFLAGS}"' -CFLAGS+= -DATF_BUILD_CPP='"${CPP}"' -CFLAGS+= -DATF_BUILD_CPPFLAGS='"${_CPPFLAGS}"' -CFLAGS+= -DATF_BUILD_CXX='"${CXX}"' -CFLAGS+= -DATF_BUILD_CXXFLAGS='"${_CXXFLAGS}"' +CFLAGS+= -DATF_BUILD_CC='"${ATF_BUILD_CC}"' +CFLAGS+= -DATF_BUILD_CFLAGS='"${ATF_BUILD_CFLAGS}"' +CFLAGS+= -DATF_BUILD_CPP='"${ATF_BUILD_CPP}"' +CFLAGS+= -DATF_BUILD_CPPFLAGS='"${ATF_BUILD_CPPFLAGS}"' +CFLAGS+= -DATF_BUILD_CXX='"${ATF_BUILD_CXX}"' +CFLAGS+= -DATF_BUILD_CXXFLAGS='"${ATF_BUILD_CXXFLAGS}"' CFLAGS+= -I${ATF} CFLAGS+= -I${.CURDIR} CFLAGS+= -I. From owner-svn-src-all@freebsd.org Sun Sep 18 02:51:19 2016 Return-Path: Delivered-To: svn-src-all@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 497C5BD64C0; Sun, 18 Sep 2016 02:51:19 +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 27443EC3; Sun, 18 Sep 2016 02:51:19 +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 u8I2pI9D087080; Sun, 18 Sep 2016 02:51:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I2pIfQ087078; Sun, 18 Sep 2016 02:51:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180251.u8I2pIfQ087078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 02:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r305911 - in stable/10/lib/atf: libatf-c libatf-c++ X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 02:51:19 -0000 Author: ngie Date: Sun Sep 18 02:51:18 2016 New Revision: 305911 URL: https://svnweb.freebsd.org/changeset/base/305911 Log: MFstable/11 r305910: MFC r305033,r305041,r305170: r305033: Minor Makefile simplifications for lib/atf/... - Replace uses of `${.CURDIR:H:H:H}` with ${SRCTOP} - Use built-in :H operator instead of ".." when enumerating paths. r305041: Filter certain compile-time options into -DATF_BUILD_* Items filtered through are: - Constant defines (-D) - Include flags (-I) - Linker flags (-L) - Optimization level (-O) - Warnings / linker flags (-W) - Preprocessor options (-f) This fixes the scenario hit by the Jenkins job where it's infecting the build with --sysroot, etc options from the Jenkins build in the tests. Prefix all intermediate variables (_CFLAGS, etc) with "ATF_BUILD" [*]. Requested by: jmmv r305170: Don't bake all of CC/CPP/CXX into CFLAGS Capture executable names for CC, CPP, CXX (assumed to be the first non-CCACHE_BIN word). This change strips out all of the cross-compiler arguments, (-target, -B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it doesn't infect the build and subsequently the test. Add comments noting why this logic is being added, and why the logic in r305041 was necessary/what it was trying to achieve. This is required after recent changes made to the toolchain to always specify --sysroot, -target, -B, etc with clang in buildworld (presumably r304681). Modified: stable/10/lib/atf/libatf-c++/Makefile stable/10/lib/atf/libatf-c/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/Makefile Sun Sep 18 02:45:35 2016 (r305910) +++ stable/10/lib/atf/libatf-c++/Makefile Sun Sep 18 02:51:18 2016 (r305911) @@ -35,15 +35,15 @@ SHLIB_MAJOR= 2 DPADD= ${LIBATF_C} LDADD= -latf-c -LDFLAGS+= -L${.OBJDIR}/../libatf-c +LDFLAGS+= -L${.OBJDIR:H}/libatf-c -ATF= ${.CURDIR:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail CFLAGS+= -I${ATF} -CFLAGS+= -I${.CURDIR}/../libatf-c +CFLAGS+= -I${.CURDIR:H}/libatf-c CFLAGS+= -I. CFLAGS+= -DHAVE_CONFIG_H Modified: stable/10/lib/atf/libatf-c/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/Makefile Sun Sep 18 02:45:35 2016 (r305910) +++ stable/10/lib/atf/libatf-c/Makefile Sun Sep 18 02:51:18 2016 (r305911) @@ -27,25 +27,37 @@ .include -_CFLAGS:= ${CFLAGS} -_CPPFLAGS:= ${CPPFLAGS} -_CXXFLAGS:= ${CXXFLAGS} +# Store the toolchain executable in ATF_BUILD_{CC,CPP,CXX} to ensure other +# values -- like -target, -B ..., etc -- don't get leaked into the tests. +# +# Be sure to omit ${CCACHE_BIN} (if specified) from the variable as it gets +# automatically appended to the variables in bsd.compiler.mk when +# ${MK_CCACHE_BUILD} != no. +ATF_BUILD_CC:= ${CC:N${CCACHE_BIN}:[1]} +ATF_BUILD_CPP:= ${CPP:N${CCACHE_BIN}:[1]} +ATF_BUILD_CXX:= ${CXX:N${CCACHE_BIN}:[1]} + +# Only capture defines, includes, linker flags, optimization levels, warnings +# and preprocessor flags when building ATF_BUILD_{C,CPP,CXX}FLAGS. +ATF_BUILD_CFLAGS:= ${CFLAGS:M-[DILOWf]*} +ATF_BUILD_CPPFLAGS:= ${CPPFLAGS:M-[DILOWf]*} +ATF_BUILD_CXXFLAGS:= ${CXXFLAGS:M-[DILOWf]*} LIB= atf-c PRIVATELIB= true SHLIB_MAJOR= 1 -ATF= ${.CURDIR:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail -CFLAGS+= -DATF_BUILD_CC='"${CC}"' -CFLAGS+= -DATF_BUILD_CFLAGS='"${_CFLAGS}"' -CFLAGS+= -DATF_BUILD_CPP='"${CPP}"' -CFLAGS+= -DATF_BUILD_CPPFLAGS='"${_CPPFLAGS}"' -CFLAGS+= -DATF_BUILD_CXX='"${CXX}"' -CFLAGS+= -DATF_BUILD_CXXFLAGS='"${_CXXFLAGS}"' +CFLAGS+= -DATF_BUILD_CC='"${ATF_BUILD_CC}"' +CFLAGS+= -DATF_BUILD_CFLAGS='"${ATF_BUILD_CFLAGS}"' +CFLAGS+= -DATF_BUILD_CPP='"${ATF_BUILD_CPP}"' +CFLAGS+= -DATF_BUILD_CPPFLAGS='"${ATF_BUILD_CPPFLAGS}"' +CFLAGS+= -DATF_BUILD_CXX='"${ATF_BUILD_CXX}"' +CFLAGS+= -DATF_BUILD_CXXFLAGS='"${ATF_BUILD_CXXFLAGS}"' CFLAGS+= -I${ATF} CFLAGS+= -I${.CURDIR} CFLAGS+= -I. From owner-svn-src-all@freebsd.org Sun Sep 18 02:56:17 2016 Return-Path: Delivered-To: svn-src-all@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 6A69CBD66BC; Sun, 18 Sep 2016 02:56:17 +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 375F728D; Sun, 18 Sep 2016 02:56:17 +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 u8I2uGOm090601; Sun, 18 Sep 2016 02:56:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I2uG4f090600; Sun, 18 Sep 2016 02:56:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180256.u8I2uG4f090600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 02:56:16 +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: r305912 - stable/11/tests/sys/acl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 02:56:17 -0000 Author: ngie Date: Sun Sep 18 02:56:16 2016 New Revision: 305912 URL: https://svnweb.freebsd.org/changeset/base/305912 Log: MFC r305356: Add a missing "Bail out!" if zpool create fails This will make the exit info more meaningful if/when zpool create fails, and establishes parity with the other 2 zfs acl testcases (01, 03). Modified: stable/11/tests/sys/acl/04.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/acl/04.sh ============================================================================== --- stable/11/tests/sys/acl/04.sh Sun Sep 18 02:51:18 2016 (r305911) +++ stable/11/tests/sys/acl/04.sh Sun Sep 18 02:56:16 2016 (r305912) @@ -50,6 +50,7 @@ MNT=`mktemp -dt acltools` zpool create -m $MNT acltools /dev/$MD if [ $? -ne 0 ]; then echo "not ok 1 - 'zpool create' failed." + echo 'Bail out!' exit 1 fi From owner-svn-src-all@freebsd.org Sun Sep 18 03:00:47 2016 Return-Path: Delivered-To: svn-src-all@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 4552DBD6831; Sun, 18 Sep 2016 03:00:47 +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 158288CD; Sun, 18 Sep 2016 03:00:47 +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 u8I30k5F093542; Sun, 18 Sep 2016 03:00:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I30kkE093541; Sun, 18 Sep 2016 03:00:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180300.u8I30kkE093541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 03:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r305913 - stable/10/tests/sys/acl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 03:00:47 -0000 Author: ngie Date: Sun Sep 18 03:00:46 2016 New Revision: 305913 URL: https://svnweb.freebsd.org/changeset/base/305913 Log: MFstable/11 r305912: MFC r305356: Add a missing "Bail out!" if zpool create fails This will make the exit info more meaningful if/when zpool create fails, and establishes parity with the other 2 zfs acl testcases (01, 03). Modified: stable/10/tests/sys/acl/04.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/acl/04.sh ============================================================================== --- stable/10/tests/sys/acl/04.sh Sun Sep 18 02:56:16 2016 (r305912) +++ stable/10/tests/sys/acl/04.sh Sun Sep 18 03:00:46 2016 (r305913) @@ -50,6 +50,7 @@ MNT=`mktemp -dt acltools` zpool create -m $MNT acltools /dev/$MD if [ $? -ne 0 ]; then echo "not ok 1 - 'zpool create' failed." + echo 'Bail out!' exit 1 fi From owner-svn-src-all@freebsd.org Sun Sep 18 04:19:44 2016 Return-Path: Delivered-To: svn-src-all@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 85674BDF286; Sun, 18 Sep 2016 04:19:44 +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 384A4FAF; Sun, 18 Sep 2016 04:19:44 +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 u8I4Jh1D021261; Sun, 18 Sep 2016 04:19:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I4JhTj021260; Sun, 18 Sep 2016 04:19:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180419.u8I4JhTj021260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 04:19: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: r305914 - stable/11/tests/sys/mac/bsdextended X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 04:19:44 -0000 Author: ngie Date: Sun Sep 18 04:19:43 2016 New Revision: 305914 URL: https://svnweb.freebsd.org/changeset/base/305914 Log: MFC r305357: Skip testcases 9/10 if jail(8) isn't installed These testcases require jail support Modified: stable/11/tests/sys/mac/bsdextended/matches_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/mac/bsdextended/matches_test.sh ============================================================================== --- stable/11/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 03:00:46 2016 (r305913) +++ stable/11/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 04:19:43 2016 (r305914) @@ -144,30 +144,36 @@ else fail $desc fi -# -# Subject Match on jail -# -rm -f $playground/test-jail - -desc="subject matching jailid" -jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` -ugidfw set 1 subject jailid $jailid object mode rasx -sleep 10 - -if [ -f $playground/test-jail ]; then - fail "TODO $desc: this testcase fails (see bug # 205481)" -else - pass $desc -fi - -rm -f $playground/test-jail -desc="subject nonmatching jailid" -jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` -sleep 10 -if [ -f $playground/test-jail ]; then - pass $desc -else - fail $desc +if which jail >/dev/null; then + # + # Subject Match on jail + # + rm -f $playground/test-jail + + desc="subject matching jailid" + jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` + ugidfw set 1 subject jailid $jailid object mode rasx + sleep 10 + + if [ -f $playground/test-jail ]; then + fail "TODO $desc: this testcase fails (see bug # 205481)" + else + pass $desc + fi + + rm -f $playground/test-jail + desc="subject nonmatching jailid" + jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` + sleep 10 + if [ -f $playground/test-jail ]; then + pass $desc + else + fail $desc + fi +else + # XXX: kyua is too dumb to parse skip ranges, still.. + pass "skip jail(8) not installed" + pass "skip jail(8) not installed" fi # From owner-svn-src-all@freebsd.org Sun Sep 18 04:34:34 2016 Return-Path: Delivered-To: svn-src-all@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 54323BDF746; Sun, 18 Sep 2016 04:34:34 +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 0810518B5; Sun, 18 Sep 2016 04:34:33 +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 u8I4YXPZ028794; Sun, 18 Sep 2016 04:34:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I4YXfh028793; Sun, 18 Sep 2016 04:34:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180434.u8I4YXfh028793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 04:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r305915 - stable/10/tests/sys/mac/bsdextended X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 04:34:34 -0000 Author: ngie Date: Sun Sep 18 04:34:32 2016 New Revision: 305915 URL: https://svnweb.freebsd.org/changeset/base/305915 Log: MFstable/11 r305914: MFC r305357: Skip testcases 9/10 if jail(8) isn't installed These testcases require jail support Modified: stable/10/tests/sys/mac/bsdextended/matches_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/mac/bsdextended/matches_test.sh ============================================================================== --- stable/10/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 04:19:43 2016 (r305914) +++ stable/10/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 04:34:32 2016 (r305915) @@ -144,30 +144,36 @@ else fail $desc fi -# -# Subject Match on jail -# -rm -f $playground/test-jail - -desc="subject matching jailid" -jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` -ugidfw set 1 subject jailid $jailid object mode rasx -sleep 10 - -if [ -f $playground/test-jail ]; then - fail "TODO $desc: this testcase fails (see bug # 205481)" -else - pass $desc -fi - -rm -f $playground/test-jail -desc="subject nonmatching jailid" -jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` -sleep 10 -if [ -f $playground/test-jail ]; then - pass $desc -else - fail $desc +if which jail >/dev/null; then + # + # Subject Match on jail + # + rm -f $playground/test-jail + + desc="subject matching jailid" + jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` + ugidfw set 1 subject jailid $jailid object mode rasx + sleep 10 + + if [ -f $playground/test-jail ]; then + fail "TODO $desc: this testcase fails (see bug # 205481)" + else + pass $desc + fi + + rm -f $playground/test-jail + desc="subject nonmatching jailid" + jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` + sleep 10 + if [ -f $playground/test-jail ]; then + pass $desc + else + fail $desc + fi +else + # XXX: kyua is too dumb to parse skip ranges, still.. + pass "skip jail(8) not installed" + pass "skip jail(8) not installed" fi # From owner-svn-src-all@freebsd.org Sun Sep 18 05:06:16 2016 Return-Path: Delivered-To: svn-src-all@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 62BFCBDFCD9; Sun, 18 Sep 2016 05:06:16 +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 3530935E; Sun, 18 Sep 2016 05:06:16 +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 u8I56Fxw039899; Sun, 18 Sep 2016 05:06:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I56FGV039898; Sun, 18 Sep 2016 05:06:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180506.u8I56FGV039898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 05:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305916 - head/tests/sys/mac/bsdextended X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 05:06:16 -0000 Author: ngie Date: Sun Sep 18 05:06:15 2016 New Revision: 305916 URL: https://svnweb.freebsd.org/changeset/base/305916 Log: Make sure $TMPDIR is created with 0755 permissions This is required to ensure that the temporary script can be executed, as the default mode is apparently too restrictive MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/mac/bsdextended/matches_test.sh Modified: head/tests/sys/mac/bsdextended/matches_test.sh ============================================================================== --- head/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 04:34:32 2016 (r305915) +++ head/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 05:06:15 2016 (r305916) @@ -36,6 +36,10 @@ if ! sysctl -N security.mac.bsdextended echo "1..0 # SKIP mac_bsdextended(4) support isn't available" exit 0 fi +if ! chmod -Rf 0755 $TMPDIR; then + echo "1..0 # SKIP failed to chmod $TMPDIR" + exit 0 +fi if ! playground=$(mktemp -d $TMPDIR/tmp.XXXXXXX); then echo "1..0 # SKIP failed to create temporary directory" exit 0 From owner-svn-src-all@freebsd.org Sun Sep 18 05:07:19 2016 Return-Path: Delivered-To: svn-src-all@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 C59F2BDFD65; Sun, 18 Sep 2016 05:07:19 +0000 (UTC) (envelope-from adrian@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 A1E24758; Sun, 18 Sep 2016 05:07:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8I57I3a039987; Sun, 18 Sep 2016 05:07:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I57Ivo039986; Sun, 18 Sep 2016 05:07:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609180507.u8I57Ivo039986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 18 Sep 2016 05:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305917 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 05:07:19 -0000 Author: adrian Date: Sun Sep 18 05:07:18 2016 New Revision: 305917 URL: https://svnweb.freebsd.org/changeset/base/305917 Log: [iwm] fix up RSSI calculations for both scan results and normal RX operations. * hard code a noise floor of -96 for now. The noise floor update code returns some "interesting" values that I can't map to anything useful right now. * Ensure a default noise floor is set - otherwise the initial scan results have a noise floor of '0'. * Fix up the RSSI calculation to be correctly relative to the noise floor. The RSSI routines return an absolute value in dBm - so fix this up. * Cap RSSI values appropriately. * Ensure we pass in a 1/2 dB unit value in to net80211. Tested: * Intel 7260, STA mode iwm0: mem 0xf1400000-0xf1401fff irq 17 at device 0.0 on pci2 iwm0: hw rev 0x140, fw ver 16.242414.0, address xx:xx:xx:xx:xx:xx Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Sun Sep 18 05:06:15 2016 (r305916) +++ head/sys/dev/iwm/if_iwm.c Sun Sep 18 05:07:18 2016 (r305917) @@ -312,7 +312,8 @@ static int iwm_mvm_get_signal_strength(s static void iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *, struct iwm_rx_packet *, struct iwm_rx_data *); -static int iwm_get_noise(const struct iwm_mvm_statistics_rx_non_phy *); +static int iwm_get_noise(struct iwm_softc *sc, + const struct iwm_mvm_statistics_rx_non_phy *); static void iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct iwm_rx_packet *, struct iwm_rx_data *); static int iwm_mvm_rx_tx_cmd_single(struct iwm_softc *, @@ -2871,21 +2872,34 @@ iwm_mvm_rx_rx_phy_cmd(struct iwm_softc * * Retrieve the average noise (in dBm) among receivers. */ static int -iwm_get_noise(const struct iwm_mvm_statistics_rx_non_phy *stats) +iwm_get_noise(struct iwm_softc *sc, + const struct iwm_mvm_statistics_rx_non_phy *stats) { int i, total, nbant, noise; total = nbant = noise = 0; for (i = 0; i < 3; i++) { noise = le32toh(stats->beacon_silence_rssi[i]) & 0xff; + IWM_DPRINTF(sc, IWM_DEBUG_RECV, "%s: i=%d, noise=%d\n", + __func__, + i, + noise); + if (noise) { total += noise; nbant++; } } + IWM_DPRINTF(sc, IWM_DEBUG_RECV, "%s: nbant=%d, total=%d\n", + __func__, nbant, total); +#if 0 /* There should be at least one antenna but check anyway. */ return (nbant == 0) ? -127 : (total / nbant) - 107; +#else + /* For now, just hard-code it to -96 to be safe */ + return (-96); +#endif } /* @@ -2940,8 +2954,15 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, } else { rssi = iwm_mvm_calc_rssi(sc, phy_info); } - rssi = (0 - IWM_MIN_DBM) + rssi; /* normalize */ - rssi = MIN(rssi, sc->sc_max_rssi); /* clip to max. 100% */ + + /* Note: RSSI is absolute (ie a -ve value) */ + if (rssi < IWM_MIN_DBM) + rssi = IWM_MIN_DBM; + else if (rssi > IWM_MAX_DBM) + rssi = IWM_MAX_DBM; + + /* Map it to relative value */ + rssi = rssi - sc->sc_noise; /* replenish ring for the buffer we're going to feed to the sharks */ if (iwm_rx_addbuf(sc, IWM_RBUF_SIZE, sc->rxq.cur) != 0) { @@ -2950,6 +2971,9 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, return; } + IWM_DPRINTF(sc, IWM_DEBUG_RECV, + "%s: rssi=%d, noise=%d\n", __func__, rssi, sc->sc_noise); + ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); IWM_DPRINTF(sc, IWM_DEBUG_RECV, @@ -2970,7 +2994,9 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, } else { rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_5GHZ); } - rxs.rssi = rssi - sc->sc_noise; + + /* rssi is in 1/2db units */ + rxs.rssi = rssi * 2; rxs.nf = sc->sc_noise; if (ieee80211_radiotap_active_vap(vap)) { @@ -5172,7 +5198,7 @@ iwm_notif_intr(struct iwm_softc *sc) struct iwm_notif_statistics *stats; SYNC_RESP_STRUCT(stats, pkt); memcpy(&sc->sc_stats, stats, sizeof(sc->sc_stats)); - sc->sc_noise = iwm_get_noise(&stats->rx.general); + sc->sc_noise = iwm_get_noise(sc, &stats->rx.general); break; } case IWM_NVM_ACCESS_CMD: @@ -5823,8 +5849,12 @@ iwm_attach(device_t dev) sc->sc_phyctxt[i].channel = NULL; } + /* Default noise floor */ + sc->sc_noise = -96; + /* Max RSSI */ sc->sc_max_rssi = IWM_MAX_DBM - IWM_MIN_DBM; + sc->sc_preinit_hook.ich_func = iwm_preinit; sc->sc_preinit_hook.ich_arg = sc; if (config_intrhook_establish(&sc->sc_preinit_hook) != 0) { From owner-svn-src-all@freebsd.org Sun Sep 18 05:10:16 2016 Return-Path: Delivered-To: svn-src-all@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 702CABDFDF2; Sun, 18 Sep 2016 05:10:16 +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 3DB2C90E; Sun, 18 Sep 2016 05:10:16 +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 u8I5AFHA040140; Sun, 18 Sep 2016 05:10:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I5AF5c040139; Sun, 18 Sep 2016 05:10:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180510.u8I5AF5c040139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 05:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305918 - head/tests/sys/mac/bsdextended X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 05:10:16 -0000 Author: ngie Date: Sun Sep 18 05:10:15 2016 New Revision: 305918 URL: https://svnweb.freebsd.org/changeset/base/305918 Log: Only chmod $TMPDIR if it's not /tmp This is a safety belt to ensure that the /tmp sticky bit stuff doesn't get whacked by accident if someone runs the script outright MFC after: 1 week X-MFC with: r305916 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/mac/bsdextended/matches_test.sh Modified: head/tests/sys/mac/bsdextended/matches_test.sh ============================================================================== --- head/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 05:07:18 2016 (r305917) +++ head/tests/sys/mac/bsdextended/matches_test.sh Sun Sep 18 05:10:15 2016 (r305918) @@ -36,9 +36,11 @@ if ! sysctl -N security.mac.bsdextended echo "1..0 # SKIP mac_bsdextended(4) support isn't available" exit 0 fi -if ! chmod -Rf 0755 $TMPDIR; then - echo "1..0 # SKIP failed to chmod $TMPDIR" - exit 0 +if [ "$TMPDIR" != "/tmp" ]; then + if ! chmod -Rf 0755 $TMPDIR; then + echo "1..0 # SKIP failed to chmod $TMPDIR" + exit 0 + fi fi if ! playground=$(mktemp -d $TMPDIR/tmp.XXXXXXX); then echo "1..0 # SKIP failed to create temporary directory" From owner-svn-src-all@freebsd.org Sun Sep 18 05:12:24 2016 Return-Path: Delivered-To: svn-src-all@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 D239ABDFE81; Sun, 18 Sep 2016 05:12:24 +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 A23A2C88; Sun, 18 Sep 2016 05:12:24 +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 u8I5CNb4043726; Sun, 18 Sep 2016 05:12:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I5CN6h043724; Sun, 18 Sep 2016 05:12:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180512.u8I5CN6h043724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 05:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305919 - in head/lib/libc/tests: iconv net/getaddrinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 05:12:24 -0000 Author: ngie Date: Sun Sep 18 05:12:23 2016 New Revision: 305919 URL: https://svnweb.freebsd.org/changeset/base/305919 Log: Don't define PACKAGE in lib/libc/tests/{iconv,net/getaddrinfo} needlessly This is already being done by bsd.test.mk The other subdirectory Makefiles were intentionally left alone MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/iconv/Makefile head/lib/libc/tests/net/getaddrinfo/Makefile Modified: head/lib/libc/tests/iconv/Makefile ============================================================================== --- head/lib/libc/tests/iconv/Makefile Sun Sep 18 05:10:15 2016 (r305918) +++ head/lib/libc/tests/iconv/Makefile Sun Sep 18 05:12:23 2016 (r305919) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE= tests - TESTSDIR= ${TESTSBASE}/lib/libc/iconv ATF_TESTS_C+= iconvctl_test Modified: head/lib/libc/tests/net/getaddrinfo/Makefile ============================================================================== --- head/lib/libc/tests/net/getaddrinfo/Makefile Sun Sep 18 05:10:15 2016 (r305918) +++ head/lib/libc/tests/net/getaddrinfo/Makefile Sun Sep 18 05:12:23 2016 (r305919) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE= tests - TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} .include From owner-svn-src-all@freebsd.org Sun Sep 18 05:54:15 2016 Return-Path: Delivered-To: svn-src-all@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 53DCBBDF4D8; Sun, 18 Sep 2016 05:54:15 +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 EA9AFB74; Sun, 18 Sep 2016 05:54:14 +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 u8I5sE6c058568; Sun, 18 Sep 2016 05:54:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I5sEtF058566; Sun, 18 Sep 2016 05:54:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180554.u8I5sEtF058566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 05:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305920 - head/lib/libc/tests/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 05:54:15 -0000 Author: ngie Date: Sun Sep 18 05:54:13 2016 New Revision: 305920 URL: https://svnweb.freebsd.org/changeset/base/305920 Log: Remove spurious newlines from atf_tc_fail calls This changes the results from broken (incorrect) to failed (correct) on i386 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printbasic_test.c head/lib/libc/tests/stdio/printfloat_test.c Modified: head/lib/libc/tests/stdio/printbasic_test.c ============================================================================== --- head/lib/libc/tests/stdio/printbasic_test.c Sun Sep 18 05:12:23 2016 (r305919) +++ head/lib/libc/tests/stdio/printbasic_test.c Sun Sep 18 05:54:13 2016 (r305920) @@ -80,7 +80,7 @@ _testfmt(const char *result, const char vsnprintf(s, sizeof(s), fmt, ap); if (strcmp(result, s) != 0) { atf_tc_fail( - "printf(\"%s\", %s) ==> [%s], expected [%s]\n", + "printf(\"%s\", %s) ==> [%s], expected [%s]", fmt, argstr, s, result); } @@ -91,7 +91,7 @@ _testfmt(const char *result, const char vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); if (wcscmp(wresult, ws) != 0) { atf_tc_fail( - "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]\n", + "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", wfmt, argstr, ws, wresult); } va_end(ap); Modified: head/lib/libc/tests/stdio/printfloat_test.c ============================================================================== --- head/lib/libc/tests/stdio/printfloat_test.c Sun Sep 18 05:12:23 2016 (r305919) +++ head/lib/libc/tests/stdio/printfloat_test.c Sun Sep 18 05:54:13 2016 (r305920) @@ -72,7 +72,7 @@ _testfmt(const char *result, const char vsnprintf(s, sizeof(s), fmt, ap); if (strcmp(result, s) != 0) { atf_tc_fail( - "printf(\"%s\", %s) ==> [%s], expected [%s]\n", + "printf(\"%s\", %s) ==> [%s], expected [%s]", fmt, argstr, s, result); } @@ -83,7 +83,7 @@ _testfmt(const char *result, const char vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); if (wcscmp(wresult, ws) != 0) { atf_tc_fail( - "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]\n", + "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", wfmt, argstr, ws, wresult); } va_end(ap); From owner-svn-src-all@freebsd.org Sun Sep 18 06:00:09 2016 Return-Path: Delivered-To: svn-src-all@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 2FE1BBDF550; Sun, 18 Sep 2016 06:00:09 +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 DEA55D03; Sun, 18 Sep 2016 06:00:08 +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 u8I6088k058862; Sun, 18 Sep 2016 06:00:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I607Xo058860; Sun, 18 Sep 2016 06:00:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609180600.u8I607Xo058860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 18 Sep 2016 06:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305921 - head/lib/libc/tests/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 06:00:09 -0000 Author: ngie Date: Sun Sep 18 06:00:07 2016 New Revision: 305921 URL: https://svnweb.freebsd.org/changeset/base/305921 Log: Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/open_memstream2_test.c head/lib/libc/tests/stdio/open_wmemstream_test.c Modified: head/lib/libc/tests/stdio/open_memstream2_test.c ============================================================================== --- head/lib/libc/tests/stdio/open_memstream2_test.c Sun Sep 18 05:54:13 2016 (r305920) +++ head/lib/libc/tests/stdio/open_memstream2_test.c Sun Sep 18 06:00:07 2016 (r305921) @@ -159,11 +159,11 @@ ATF_TC_BODY(seek_tests, tc) #define SEEK_FAIL(offset, whence, error) do { \ errno = 0; \ ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) != 0, \ - "fseeko(%s, %s) did not fail, set pos to %jd\n", \ + "fseeko(%s, %s) did not fail, set pos to %jd", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp)); \ ATF_REQUIRE_MSG(errno == (error), \ - "fseeko(%s, %s) failed with %d rather than %s\n", \ + "fseeko(%s, %s) failed with %d rather than %s", \ __STRING(offset), __STRING(whence), errno, \ __STRING(error)); \ } while (0) @@ -173,7 +173,7 @@ ATF_TC_BODY(seek_tests, tc) "fseeko(%s, %s) failed: %s", \ __STRING(offset), __STRING(whence), strerror(errno)); \ ATF_REQUIRE_MSG(ftello(fp) == (result), \ - "fseeko(%s, %s) seeked to %jd rather than %s\n", \ + "fseeko(%s, %s) seeked to %jd rather than %s", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp), __STRING(result)); \ } while (0) Modified: head/lib/libc/tests/stdio/open_wmemstream_test.c ============================================================================== --- head/lib/libc/tests/stdio/open_wmemstream_test.c Sun Sep 18 05:54:13 2016 (r305920) +++ head/lib/libc/tests/stdio/open_wmemstream_test.c Sun Sep 18 06:00:07 2016 (r305921) @@ -159,11 +159,11 @@ ATF_TC_BODY(seek_tests, tc) #define SEEK_FAIL(offset, whence, error) do { \ errno = 0; \ ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) != 0, \ - "fseeko(%s, %s) did not fail, set pos to %jd\n", \ + "fseeko(%s, %s) did not fail, set pos to %jd", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp)); \ ATF_REQUIRE_MSG(errno == (error), \ - "fseeko(%s, %s) failed with %d rather than %s\n", \ + "fseeko(%s, %s) failed with %d rather than %s", \ __STRING(offset), __STRING(whence), errno, \ __STRING(error)); \ } while (0) @@ -173,7 +173,7 @@ ATF_TC_BODY(seek_tests, tc) "fseeko(%s, %s) failed: %s", \ __STRING(offset), __STRING(whence), strerror(errno)); \ ATF_REQUIRE_MSG(ftello(fp) == (result), \ - "fseeko(%s, %s) seeked to %jd rather than %s\n", \ + "fseeko(%s, %s) seeked to %jd rather than %s", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp), __STRING(result)); \ } while (0) From owner-svn-src-all@freebsd.org Sun Sep 18 07:37:01 2016 Return-Path: Delivered-To: svn-src-all@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 552CCBDD5CC; Sun, 18 Sep 2016 07:37:01 +0000 (UTC) (envelope-from sephe@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 25827298; Sun, 18 Sep 2016 07:37:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8I7b0QC095997; Sun, 18 Sep 2016 07:37:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I7b0S0095996; Sun, 18 Sep 2016 07:37:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609180737.u8I7b0S0095996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Sun, 18 Sep 2016 07:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305922 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 07:37:01 -0000 Author: sephe Date: Sun Sep 18 07:37:00 2016 New Revision: 305922 URL: https://svnweb.freebsd.org/changeset/base/305922 Log: Fix LINT building. Sponsored by: Microsoft Modified: head/sys/kern/kern_lockf.c Modified: head/sys/kern/kern_lockf.c ============================================================================== --- head/sys/kern/kern_lockf.c Sun Sep 18 06:00:07 2016 (r305921) +++ head/sys/kern/kern_lockf.c Sun Sep 18 07:37:00 2016 (r305922) @@ -83,7 +83,9 @@ __FBSDID("$FreeBSD$"); #ifdef LOCKF_DEBUG #include +#include #include +#include #include static int lockf_debug = 0; /* control debug output */ @@ -2500,7 +2502,7 @@ lf_print(char *tag, struct lockf_entry * if (lock->lf_inode != (struct inode *)0) printf(" in ino %ju on dev <%s>,", (uintmax_t)lock->lf_inode->i_number, - devtoname(lock->lf_inode->i_dev)); + devtoname(ITODEV(lock->lf_inode))); printf(" %s, start %jd, end ", lock->lf_type == F_RDLCK ? "shared" : lock->lf_type == F_WRLCK ? "exclusive" : @@ -2528,7 +2530,7 @@ lf_printlist(char *tag, struct lockf_ent printf("%s: Lock list for ino %ju on dev <%s>:\n", tag, (uintmax_t)lock->lf_inode->i_number, - devtoname(lock->lf_inode->i_dev)); + devtoname(ITODEV(lock->lf_inode))); LIST_FOREACH(lf, &lock->lf_vnode->v_lockf->ls_active, lf_link) { printf("\tlock %p for ",(void *)lf); lf_print_owner(lock->lf_owner); From owner-svn-src-all@freebsd.org Sun Sep 18 07:38:00 2016 Return-Path: Delivered-To: svn-src-all@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 AD07DBDD66F; Sun, 18 Sep 2016 07:38:00 +0000 (UTC) (envelope-from sephe@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 6BAFE644; Sun, 18 Sep 2016 07:38:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8I7bxX6096068; Sun, 18 Sep 2016 07:37:59 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I7bxvA096067; Sun, 18 Sep 2016 07:37:59 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609180737.u8I7bxvA096067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Sun, 18 Sep 2016 07:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305923 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 07:38:00 -0000 Author: sephe Date: Sun Sep 18 07:37:59 2016 New Revision: 305923 URL: https://svnweb.freebsd.org/changeset/base/305923 Log: hyperv/hn: Regroup ifnet setup code. While I'm here, add comment along the attach DEVMETHOD. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7874 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:37:00 2016 (r305922) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:37:59 2016 (r305923) @@ -456,6 +456,9 @@ netvsc_attach(device_t dev) sc->hn_prichan = vmbus_get_channel(dev); HN_LOCK_INIT(sc); + /* + * Setup taskqueue for transmission. + */ if (hn_tx_taskq == NULL) { sc->hn_tx_taskq = taskqueue_create("hn_tx", M_WAITOK, taskqueue_thread_enqueue, &sc->hn_tx_taskq); @@ -477,11 +480,22 @@ netvsc_attach(device_t dev) sc->hn_tx_taskq = hn_tx_taskq; } + /* + * Allocate ifnet and setup its name earlier, so that if_printf + * can be used by functions, which will be called after + * ether_ifattach(). + */ ifp = sc->hn_ifp = if_alloc(IFT_ETHER); ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); /* + * Initialize ifmedia earlier so that it can be unconditionally + * destroyed, if error happened later on. + */ + ifmedia_init(&sc->hn_media, 0, hn_ifmedia_upd, hn_ifmedia_sts); + + /* * Figure out the # of RX rings (ring_cnt) and the # of TX rings * to use (tx_ring_cnt). * @@ -511,6 +525,10 @@ netvsc_attach(device_t dev) */ sc->hn_cpu = atomic_fetchadd_int(&hn_cpu_index, ring_cnt) % mp_ncpus; + /* + * Create enough TX/RX rings, even if only limited number of + * channels can be allocated. + */ error = hn_create_tx_data(sc, tx_ring_cnt); if (error) goto failed; @@ -533,6 +551,51 @@ netvsc_attach(device_t dev) if (error) goto failed; + error = hn_rndis_get_linkstatus(sc, &link_status); + if (error) + goto failed; + if (link_status == NDIS_MEDIA_STATE_CONNECTED) + sc->hn_carrier = 1; + + error = hn_rndis_get_eaddr(sc, eaddr); + if (error) + goto failed; + +#if __FreeBSD_version >= 1100099 + if (sc->hn_rx_ring_inuse > 1) { + /* + * Reduce TCP segment aggregation limit for multiple + * RX rings to increase ACK timeliness. + */ + hn_set_lro_lenlim(sc, HN_LRO_LENLIM_MULTIRX_DEF); + } +#endif + + hn_set_chim_size(sc, sc->hn_chim_szmax); + if (hn_tx_chimney_size > 0 && + hn_tx_chimney_size < sc->hn_chim_szmax) + hn_set_chim_size(sc, hn_tx_chimney_size); + + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "nvs_version", CTLFLAG_RD, + &sc->hn_nvs_ver, 0, "NVS version"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "ndis_version", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_ndis_version_sysctl, "A", "NDIS version"); + + /* + * Setup the ifmedia, which has been initialized earlier. + */ + ifmedia_add(&sc->hn_media, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&sc->hn_media, IFM_ETHER | IFM_AUTO); + /* XXX ifmedia_set really should do this for us */ + sc->hn_media.ifm_media = sc->hn_media.ifm_cur->ifm_media; + + /* + * Setup the ifnet for this interface. + */ + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = hn_ioctl; ifp->if_init = hn_init; @@ -548,15 +611,6 @@ netvsc_attach(device_t dev) ifp->if_qflush = hn_xmit_qflush; } - ifmedia_init(&sc->hn_media, 0, hn_ifmedia_upd, hn_ifmedia_sts); - ifmedia_add(&sc->hn_media, IFM_ETHER | IFM_AUTO, 0, NULL); - ifmedia_set(&sc->hn_media, IFM_ETHER | IFM_AUTO); - /* XXX ifmedia_set really should do this for us */ - sc->hn_media.ifm_media = sc->hn_media.ifm_cur->ifm_media; - - /* - * Tell upper layers that we support full VLAN capability. - */ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_TSO | IFCAP_LRO; @@ -565,34 +619,14 @@ netvsc_attach(device_t dev) IFCAP_LRO; ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist | CSUM_TSO; -#if __FreeBSD_version >= 1100099 - if (sc->hn_rx_ring_inuse > 1) { - /* - * Reduce TCP segment aggregation limit for multiple - * RX rings to increase ACK timeliness. - */ - hn_set_lro_lenlim(sc, HN_LRO_LENLIM_MULTIRX_DEF); - } -#endif - - error = hn_rndis_get_linkstatus(sc, &link_status); - if (error) - goto failed; - if (link_status == NDIS_MEDIA_STATE_CONNECTED) - sc->hn_carrier = 1; - tso_maxlen = hn_tso_maxlen; if (tso_maxlen <= 0 || tso_maxlen > IP_MAXPACKET) tso_maxlen = IP_MAXPACKET; - ifp->if_hw_tsomaxsegcount = HN_TX_DATA_SEGCNT_MAX; ifp->if_hw_tsomaxsegsize = PAGE_SIZE; ifp->if_hw_tsomax = tso_maxlen - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); - error = hn_rndis_get_eaddr(sc, eaddr); - if (error) - goto failed; ether_ifattach(ifp, eaddr); if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, @@ -601,21 +635,9 @@ netvsc_attach(device_t dev) /* Inform the upper layer about the long frame support. */ ifp->if_hdrlen = sizeof(struct ether_vlan_header); - hn_set_chim_size(sc, sc->hn_chim_szmax); - if (hn_tx_chimney_size > 0 && - hn_tx_chimney_size < sc->hn_chim_szmax) - hn_set_chim_size(sc, hn_tx_chimney_size); - - ctx = device_get_sysctl_ctx(dev); - child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "nvs_version", CTLFLAG_RD, - &sc->hn_nvs_ver, 0, "NVS version"); - SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "ndis_version", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - hn_ndis_version_sysctl, "A", "NDIS version"); - return (0); failed: + /* TODO: reuse netvsc_detach() */ hn_destroy_tx_data(sc); if (ifp != NULL) if_free(ifp); From owner-svn-src-all@freebsd.org Sun Sep 18 07:47:58 2016 Return-Path: Delivered-To: svn-src-all@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 B414EBDDDF3; Sun, 18 Sep 2016 07:47:58 +0000 (UTC) (envelope-from sephe@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 86FB0F75; Sun, 18 Sep 2016 07:47:58 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8I7lvbd099713; Sun, 18 Sep 2016 07:47:57 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I7lv1l099712; Sun, 18 Sep 2016 07:47:57 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609180747.u8I7lv1l099712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Sun, 18 Sep 2016 07:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305924 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 07:47:58 -0000 Author: sephe Date: Sun Sep 18 07:47:57 2016 New Revision: 305924 URL: https://svnweb.freebsd.org/changeset/base/305924 Log: hyperv/hn: Put debug message under bootverbose MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7875 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:37:59 2016 (r305923) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:47:57 2016 (r305924) @@ -629,8 +629,10 @@ netvsc_attach(device_t dev) ether_ifattach(ifp, eaddr); - if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, - ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); + if (bootverbose) { + if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, + ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); + } /* Inform the upper layer about the long frame support. */ ifp->if_hdrlen = sizeof(struct ether_vlan_header); From owner-svn-src-all@freebsd.org Sun Sep 18 08:10:41 2016 Return-Path: Delivered-To: svn-src-all@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 D88BEBDF5F7; Sun, 18 Sep 2016 08:10:41 +0000 (UTC) (envelope-from sephe@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 A8C33B17; Sun, 18 Sep 2016 08:10:41 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8I8AeGT008379; Sun, 18 Sep 2016 08:10:40 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I8AeT4008378; Sun, 18 Sep 2016 08:10:40 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609180810.u8I8AeT4008378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Sun, 18 Sep 2016 08:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305925 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 08:10:41 -0000 Author: sephe Date: Sun Sep 18 08:10:40 2016 New Revision: 305925 URL: https://svnweb.freebsd.org/changeset/base/305925 Log: hyperv/hn: Don't mess up RSS key and indirect table after attachment. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7889 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:47:57 2016 (r305924) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 08:10:40 2016 (r305925) @@ -3159,13 +3159,25 @@ hn_synth_attach(struct hn_softc *sc, int * are allocated. */ - /* Setup default RSS key. */ - memcpy(rss->rss_key, hn_rss_key_default, sizeof(rss->rss_key)); + if (!device_is_attached(sc->hn_dev)) { + /* + * Setup default RSS key and indirect table for the + * attach DEVMETHOD. They can be altered later on, + * so don't mess them up once this interface is attached. + */ + if (bootverbose) { + if_printf(sc->hn_ifp, "setup default RSS key and " + "indirect table\n"); + } - /* Setup default RSS indirect table. */ - /* TODO: Take ndis_rss_caps.ndis_nind into account. */ - for (i = 0; i < NDIS_HASH_INDCNT; ++i) - rss->rss_ind[i] = i % nchan; + /* Setup default RSS key. */ + memcpy(rss->rss_key, hn_rss_key_default, sizeof(rss->rss_key)); + + /* Setup default RSS indirect table. */ + /* TODO: Take ndis_rss_caps.ndis_nind into account. */ + for (i = 0; i < NDIS_HASH_INDCNT; ++i) + rss->rss_ind[i] = i % nchan; + } error = hn_rndis_conf_rss(sc); if (error) { From owner-svn-src-all@freebsd.org Sun Sep 18 08:19:34 2016 Return-Path: Delivered-To: svn-src-all@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 75640BDF7D9; Sun, 18 Sep 2016 08:19:34 +0000 (UTC) (envelope-from sephe@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 52E21F41; Sun, 18 Sep 2016 08:19:34 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8I8JX7i011313; Sun, 18 Sep 2016 08:19:33 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8I8JXGD011309; Sun, 18 Sep 2016 08:19:33 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609180819.u8I8JXGD011309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Sun, 18 Sep 2016 08:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305926 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 08:19:34 -0000 Author: sephe Date: Sun Sep 18 08:19:33 2016 New Revision: 305926 URL: https://svnweb.freebsd.org/changeset/base/305926 Log: hyperv/hn: Add sysctls to dynamic adjust RSS key and indirect table MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7890 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/if_hnvar.h head/sys/dev/hyperv/netvsc/ndis.h Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 08:10:40 2016 (r305925) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 08:19:33 2016 (r305926) @@ -325,6 +325,8 @@ static int hn_rx_stat_ulong_sysctl(SYSCT static int hn_tx_stat_ulong_sysctl(SYSCTL_HANDLER_ARGS); static int hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARGS); static int hn_ndis_version_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); static int hn_check_iplen(const struct mbuf *, int); static int hn_create_tx_ring(struct hn_softc *, int); static void hn_destroy_tx_ring(struct hn_tx_ring *); @@ -391,6 +393,42 @@ hn_get_txswq_depth(const struct hn_tx_ri } static int +hn_rss_reconfig(struct hn_softc *sc) +{ + int error; + + HN_LOCK_ASSERT(sc); + + /* + * Disable RSS first. + * + * NOTE: + * Direct reconfiguration by setting the UNCHG flags does + * _not_ work properly. + */ + if (bootverbose) + if_printf(sc->hn_ifp, "disable RSS\n"); + error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_DISABLE); + if (error) { + if_printf(sc->hn_ifp, "RSS disable failed\n"); + return (error); + } + + /* + * Reenable the RSS w/ the updated RSS key or indirect + * table. + */ + if (bootverbose) + if_printf(sc->hn_ifp, "reconfig RSS\n"); + error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE); + if (error) { + if_printf(sc->hn_ifp, "RSS reconfig failed\n"); + return (error); + } + return (0); +} + +static int hn_ifmedia_upd(struct ifnet *ifp __unused) { @@ -583,6 +621,12 @@ netvsc_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "ndis_version", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_ndis_version_sysctl, "A", "NDIS version"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_key", + CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + hn_rss_key_sysctl, "IU", "RSS key"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_ind", + CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + hn_rss_ind_sysctl, "IU", "RSS indirect table"); /* * Setup the ifmedia, which has been initialized earlier. @@ -2031,6 +2075,50 @@ hn_ndis_version_sysctl(SYSCTL_HANDLER_AR } static int +hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int error; + + HN_LOCK(sc); + + error = SYSCTL_OUT(req, sc->hn_rss.rss_key, sizeof(sc->hn_rss.rss_key)); + if (error || req->newptr == NULL) + goto back; + + error = SYSCTL_IN(req, sc->hn_rss.rss_key, sizeof(sc->hn_rss.rss_key)); + if (error) + goto back; + + error = hn_rss_reconfig(sc); +back: + HN_UNLOCK(sc); + return (error); +} + +static int +hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int error; + + HN_LOCK(sc); + + error = SYSCTL_OUT(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); + if (error || req->newptr == NULL) + goto back; + + error = SYSCTL_IN(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); + if (error) + goto back; + + error = hn_rss_reconfig(sc); +back: + HN_UNLOCK(sc); + return (error); +} + +static int hn_check_iplen(const struct mbuf *m, int hoff) { const struct ip *ip; @@ -3179,7 +3267,7 @@ hn_synth_attach(struct hn_softc *sc, int rss->rss_ind[i] = i % nchan; } - error = hn_rndis_conf_rss(sc); + error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE); if (error) { /* * Failed to configure RSS key or indirect table; only Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Sun Sep 18 08:10:40 2016 (r305925) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Sun Sep 18 08:19:33 2016 (r305926) @@ -837,7 +837,7 @@ hn_rndis_conf_offload(struct hn_softc *s } int -hn_rndis_conf_rss(struct hn_softc *sc) +hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags) { struct ndis_rssprm_toeplitz *rss = &sc->hn_rss; struct ndis_rss_params *prm = &rss->rss_params; @@ -858,6 +858,7 @@ hn_rndis_conf_rss(struct hn_softc *sc) prm->ndis_hdr.ndis_type = NDIS_OBJTYPE_RSS_PARAMS; prm->ndis_hdr.ndis_rev = NDIS_RSS_PARAMS_REV_2; prm->ndis_hdr.ndis_size = sizeof(*rss); + prm->ndis_flags = flags; prm->ndis_hash = NDIS_HASH_FUNCTION_TOEPLITZ | NDIS_HASH_IPV4 | NDIS_HASH_TCP_IPV4 | NDIS_HASH_IPV6 | NDIS_HASH_TCP_IPV6; Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Sun Sep 18 08:10:40 2016 (r305925) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Sun Sep 18 08:19:33 2016 (r305926) @@ -118,7 +118,7 @@ uint32_t hn_chim_alloc(struct hn_softc * void hn_chim_free(struct hn_softc *sc, uint32_t chim_idx); int hn_rndis_attach(struct hn_softc *sc); -int hn_rndis_conf_rss(struct hn_softc *sc); +int hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags); void *hn_rndis_pktinfo_append(struct rndis_packet_msg *, size_t pktsize, size_t pi_dlen, uint32_t pi_type); int hn_rndis_get_rsscaps(struct hn_softc *sc, int *rxr_cnt); Modified: head/sys/dev/hyperv/netvsc/ndis.h ============================================================================== --- head/sys/dev/hyperv/netvsc/ndis.h Sun Sep 18 08:10:40 2016 (r305925) +++ head/sys/dev/hyperv/netvsc/ndis.h Sun Sep 18 08:19:33 2016 (r305926) @@ -188,6 +188,7 @@ struct ndis_rss_params { #define NDIS_RSS_PARAMS_REV_1 1 /* NDIS 6.0 */ #define NDIS_RSS_PARAMS_REV_2 2 /* NDIS 6.20 */ +#define NDIS_RSS_FLAG_NONE 0x0000 #define NDIS_RSS_FLAG_BCPU_UNCHG 0x0001 #define NDIS_RSS_FLAG_HASH_UNCHG 0x0002 #define NDIS_RSS_FLAG_IND_UNCHG 0x0004 From owner-svn-src-all@freebsd.org Sun Sep 18 10:06:37 2016 Return-Path: Delivered-To: svn-src-all@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 22F77BDFFF8; Sun, 18 Sep 2016 10:06:37 +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 EA157E6; Sun, 18 Sep 2016 10:06:36 +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 u8IA6aNH052866; Sun, 18 Sep 2016 10:06:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IA6aqx052865; Sun, 18 Sep 2016 10:06:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181006.u8IA6aqx052865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 10:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305927 - head/usr.bin/sdiff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 10:06:37 -0000 Author: bapt Date: Sun Sep 18 10:06:35 2016 New Revision: 305927 URL: https://svnweb.freebsd.org/changeset/base/305927 Log: Remove reference of z(s)diff which was dropped before importing Modified: head/usr.bin/sdiff/sdiff.c Modified: head/usr.bin/sdiff/sdiff.c ============================================================================== --- head/usr.bin/sdiff/sdiff.c Sun Sep 18 08:19:33 2016 (r305926) +++ head/usr.bin/sdiff/sdiff.c Sun Sep 18 10:06:35 2016 (r305927) @@ -477,8 +477,8 @@ main(int argc, char **argv) } /* - * When sdiff/zsdiff detects a binary file as input, executes them with - * diff/zdiff to maintain the same behavior as GNU sdiff with binary input. + * When sdiff detects a binary file as input, executes them with + * diff to maintain the same behavior as GNU sdiff with binary input. */ static void binexec(char *diffprog, char *f1, char *f2) From owner-svn-src-all@freebsd.org Sun Sep 18 11:36:56 2016 Return-Path: Delivered-To: svn-src-all@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 38CCBBDFA29; Sun, 18 Sep 2016 11:36:56 +0000 (UTC) (envelope-from ed@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 0275B796; Sun, 18 Sep 2016 11:36:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8IBatUA087254; Sun, 18 Sep 2016 11:36:55 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IBat4Y087251; Sun, 18 Sep 2016 11:36:55 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609181136.u8IBat4Y087251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 18 Sep 2016 11:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305928 - in head/sys: arm/cloudabi32 conf contrib/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 11:36:56 -0000 Author: ed Date: Sun Sep 18 11:36:54 2016 New Revision: 305928 URL: https://svnweb.freebsd.org/changeset/base/305928 Log: Add very preliminary support for CloudABI for ARMv6. In order to make CloudABI work on ARMv6, start off by copying over the sysvec for ARM64 and adjust it to use 32-bit registers. Also add code for fetching arguments from the stack if needed, as there are fewer register than on ARM64. Also import the vDSO that is needed to invoke system calls. This vDSO uses the intra procedure call register (ip) to store the system call number. This is a bit simpler than what native FreeBSD does, as FreeBSD uses r7, while preserving the original r7 into ip. This sysvec seems to be complete enough to start CloudABI processes. These processes are capable of linking in the vDSO and are therefore capable of executing (most?) system calls successfully. Unfortunately, the biggest show stopper is still that TLS is completely broken: - The linker used by CloudABI, LLD, still has troubles with some of the relocations needed for TLS. See LLVM bug 30218 for more details. - Whereas FreeBSD uses the tpidruro register for TLS, for CloudABI I want to make use of tpidrurw, so that userspace can modify the base address directly. This is needed for efficient emulation. Unfortunately, this register doesn't seem to be preserved across context switches yet. Obtained from: https://github.com/NuxiNL/cloudabi (the vDSO) Added: head/sys/arm/cloudabi32/ head/sys/arm/cloudabi32/cloudabi32_sysvec.c - copied, changed from r305926, head/sys/arm64/cloudabi64/cloudabi64_sysvec.c head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S (contents, props changed) Modified: head/sys/conf/files.arm Copied and modified: head/sys/arm/cloudabi32/cloudabi32_sysvec.c (from r305926, head/sys/arm64/cloudabi64/cloudabi64_sysvec.c) ============================================================================== --- head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Sun Sep 18 08:19:33 2016 (r305926, copy source) +++ head/sys/arm/cloudabi32/cloudabi32_sysvec.c Sun Sep 18 11:36:54 2016 (r305928) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -41,14 +41,14 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include -extern const char *cloudabi64_syscallnames[]; -extern struct sysent cloudabi64_sysent[]; +extern const char *cloudabi32_syscallnames[]; +extern struct sysent cloudabi32_sysent[]; static void -cloudabi64_proc_setregs(struct thread *td, struct image_params *imgp, +cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp, unsigned long stack) { struct trapframe *regs; @@ -57,66 +57,74 @@ cloudabi64_proc_setregs(struct thread *t /* * The stack now contains a pointer to the TCB and the auxiliary - * vector. Let x0 point to the auxiliary vector, and set - * tpidr_el0 to the TCB. + * vector. Let r0 point to the auxiliary vector, and set + * tpidrurw to the TCB. */ regs = td->td_frame; - regs->tf_x[0] = td->td_retval[0] = - stack + roundup(sizeof(cloudabi64_tcb_t), sizeof(register_t)); + regs->tf_r0 = td->td_retval[0] = + stack + roundup(sizeof(cloudabi32_tcb_t), sizeof(register_t)); (void)cpu_set_user_tls(td, (void *)stack); } static int -cloudabi64_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cloudabi32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) { struct trapframe *frame = td->td_frame; - int i; + int error; /* Obtain system call number. */ - sa->code = frame->tf_x[8]; - if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) + sa->code = frame->tf_r12; + if (sa->code >= CLOUDABI32_SYS_MAXSYSCALL) return (ENOSYS); - sa->callp = &cloudabi64_sysent[sa->code]; + sa->callp = &cloudabi32_sysent[sa->code]; sa->narg = sa->callp->sy_narg; - /* Fetch system call arguments. */ - for (i = 0; i < MAXARGS; i++) - sa->args[i] = frame->tf_x[i]; + /* Fetch system call arguments from registers and the stack. */ + sa->args[0] = frame->tf_r0; + sa->args[1] = frame->tf_r1; + sa->args[2] = frame->tf_r2; + sa->args[3] = frame->tf_r3; + if (sa->narg > 4) { + error = copyin((void *)td->td_frame->tf_usr_sp, &sa->args[4], + (sa->narg - 4) * sizeof(register_t)); + if (error != 0) + return (error); + } /* Default system call return values. */ td->td_retval[0] = 0; - td->td_retval[1] = frame->tf_x[1]; + td->td_retval[1] = frame->tf_r1; return (0); } static void -cloudabi64_set_syscall_retval(struct thread *td, int error) +cloudabi32_set_syscall_retval(struct thread *td, int error) { struct trapframe *frame = td->td_frame; switch (error) { case 0: /* System call succeeded. */ - frame->tf_x[0] = td->td_retval[0]; - frame->tf_x[1] = td->td_retval[1]; + frame->tf_r0 = td->td_retval[0]; + frame->tf_r1 = td->td_retval[1]; frame->tf_spsr &= ~PSR_C; break; case ERESTART: /* Restart system call. */ - frame->tf_elr -= 4; + frame->tf_pc -= 4; break; case EJUSTRETURN: break; default: /* System call returned an error. */ - frame->tf_x[0] = cloudabi_convert_errno(error); + frame->tf_r0 = cloudabi_convert_errno(error); frame->tf_spsr |= PSR_C; break; } } static void -cloudabi64_schedtail(struct thread *td) +cloudabi32_schedtail(struct thread *td) { struct trapframe *frame = td->td_frame; @@ -126,14 +134,14 @@ cloudabi64_schedtail(struct thread *td) * when creating a new thread. */ if ((td->td_pflags & TDP_FORKING) != 0) { - frame->tf_x[0] = CLOUDABI_PROCESS_CHILD; - frame->tf_x[1] = td->td_tid; + frame->tf_r0 = CLOUDABI_PROCESS_CHILD; + frame->tf_r1 = td->td_tid; } } int -cloudabi64_thread_setregs(struct thread *td, - const cloudabi64_threadattr_t *attr, uint64_t tcb) +cloudabi32_thread_setregs(struct thread *td, + const cloudabi32_threadattr_t *attr, uint32_t tcb) { struct trapframe *frame; stack_t stack; @@ -149,38 +157,37 @@ cloudabi64_thread_setregs(struct thread * entry point. */ frame = td->td_frame; - frame->tf_x[0] = td->td_tid; - frame->tf_x[1] = attr->argument; + frame->tf_r0 = td->td_tid; + frame->tf_r1 = attr->argument; /* Set up TLS. */ return (cpu_set_user_tls(td, (void *)tcb)); } -static struct sysentvec cloudabi64_elf_sysvec = { - .sv_size = CLOUDABI64_SYS_MAXSYSCALL, - .sv_table = cloudabi64_sysent, - .sv_fixup = cloudabi64_fixup, - .sv_name = "CloudABI ELF64", - .sv_coredump = elf64_coredump, +static struct sysentvec cloudabi32_elf_sysvec = { + .sv_size = CLOUDABI32_SYS_MAXSYSCALL, + .sv_table = cloudabi32_sysent, + .sv_fixup = cloudabi32_fixup, + .sv_name = "CloudABI ELF32", + .sv_coredump = elf32_coredump, .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, - .sv_copyout_strings = cloudabi64_copyout_strings, - .sv_setregs = cloudabi64_proc_setregs, - .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM | SV_LP64, - .sv_set_syscall_retval = cloudabi64_set_syscall_retval, - .sv_fetch_syscall_args = cloudabi64_fetch_syscall_args, - .sv_syscallnames = cloudabi64_syscallnames, - .sv_schedtail = cloudabi64_schedtail, + .sv_copyout_strings = cloudabi32_copyout_strings, + .sv_setregs = cloudabi32_proc_setregs, + .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM | SV_ILP32, + .sv_set_syscall_retval = cloudabi32_set_syscall_retval, + .sv_fetch_syscall_args = cloudabi32_fetch_syscall_args, + .sv_syscallnames = cloudabi32_syscallnames, + .sv_schedtail = cloudabi32_schedtail, }; -INIT_SYSENTVEC(elf_sysvec, &cloudabi64_elf_sysvec); +INIT_SYSENTVEC(elf_sysvec, &cloudabi32_elf_sysvec); -Elf64_Brandinfo cloudabi64_brand = { +Elf32_Brandinfo cloudabi32_brand = { .brand = ELFOSABI_CLOUDABI, - .machine = EM_AARCH64, - .sysvec = &cloudabi64_elf_sysvec, - .flags = BI_CAN_EXEC_DYN, + .machine = EM_ARM, + .sysvec = &cloudabi32_elf_sysvec, .compat_3_brand = "CloudABI", }; Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sun Sep 18 10:06:35 2016 (r305927) +++ head/sys/conf/files.arm Sun Sep 18 11:36:54 2016 (r305928) @@ -1,4 +1,16 @@ # $FreeBSD$ +cloudabi32_vdso.o optional compat_cloudabi32 \ + dependency "$S/contrib/cloudabi/cloudabi_vdso_armv6.S" \ + compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_armv6.S -o ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "cloudabi32_vdso.o" +# +cloudabi32_vdso_blob.o optional compat_cloudabi32 \ + dependency "cloudabi32_vdso.o" \ + compile-with "${OBJCOPY} --input-target binary --output-target elf32-littlearm --binary-architecture arm cloudabi32_vdso.o ${.TARGET}" \ + no-implicit-rule \ + clean "cloudabi32_vdso_blob.o" +# arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt arm/arm/autoconf.c standard @@ -85,6 +97,7 @@ arm/arm/undefined.c standard arm/arm/unwind.c optional ddb | kdtrace_hooks arm/arm/vm_machdep.c standard arm/arm/vfp.c standard +arm/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32 board_id.h standard \ dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \ compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ Added: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Sun Sep 18 11:36:54 2016 (r305928) @@ -0,0 +1,490 @@ +// Copyright (c) 2016 Nuxi (https://nuxi.nl/) and contributors. +// +// 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. +// +// This file is automatically generated. Do not edit. +// +// Source: https://github.com/NuxiNL/cloudabi + +#define ENTRY(name) \ + .text; \ + .p2align 2; \ + .global name; \ + .type name, %function; \ +name: + +#define END(name) .size name, . - name + +ENTRY(cloudabi_sys_clock_res_get) + str r1, [sp, #-4] + mov ip, #0 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2, 0] + str r1, [r2, 4] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_clock_res_get) + +ENTRY(cloudabi_sys_clock_time_get) + str r3, [sp, #-4] + mov ip, #1 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2, 0] + str r1, [r2, 4] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_clock_time_get) + +ENTRY(cloudabi_sys_condvar_signal) + mov ip, #2 + swi 0 + bx lr +END(cloudabi_sys_condvar_signal) + +ENTRY(cloudabi_sys_fd_close) + mov ip, #3 + swi 0 + bx lr +END(cloudabi_sys_fd_close) + +ENTRY(cloudabi_sys_fd_create1) + str r1, [sp, #-4] + mov ip, #4 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_create1) + +ENTRY(cloudabi_sys_fd_create2) + str r1, [sp, #-4] + str r2, [sp, #-8] + mov ip, #5 + swi 0 + ldr r2, [sp, #-4] + ldr r3, [sp, #-8] + bcs 1f + str r0, [r2] + str r1, [r3] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_create2) + +ENTRY(cloudabi_sys_fd_datasync) + mov ip, #6 + swi 0 + bx lr +END(cloudabi_sys_fd_datasync) + +ENTRY(cloudabi_sys_fd_dup) + str r1, [sp, #-4] + mov ip, #7 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_dup) + +ENTRY(cloudabi_sys_fd_pread) + mov ip, #8 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_pread) + +ENTRY(cloudabi_sys_fd_pwrite) + mov ip, #9 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_pwrite) + +ENTRY(cloudabi_sys_fd_read) + str r3, [sp, #-4] + mov ip, #10 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_read) + +ENTRY(cloudabi_sys_fd_replace) + mov ip, #11 + swi 0 + bx lr +END(cloudabi_sys_fd_replace) + +ENTRY(cloudabi_sys_fd_seek) + mov ip, #12 + swi 0 + bcs 1f + ldr r2, [sp, #4] + str r0, [r2, 0] + str r1, [r2, 4] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_seek) + +ENTRY(cloudabi_sys_fd_stat_get) + mov ip, #13 + swi 0 + bx lr +END(cloudabi_sys_fd_stat_get) + +ENTRY(cloudabi_sys_fd_stat_put) + mov ip, #14 + swi 0 + bx lr +END(cloudabi_sys_fd_stat_put) + +ENTRY(cloudabi_sys_fd_sync) + mov ip, #15 + swi 0 + bx lr +END(cloudabi_sys_fd_sync) + +ENTRY(cloudabi_sys_fd_write) + str r3, [sp, #-4] + mov ip, #16 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_write) + +ENTRY(cloudabi_sys_file_advise) + mov ip, #17 + swi 0 + bx lr +END(cloudabi_sys_file_advise) + +ENTRY(cloudabi_sys_file_allocate) + mov ip, #18 + swi 0 + bx lr +END(cloudabi_sys_file_allocate) + +ENTRY(cloudabi_sys_file_create) + mov ip, #19 + swi 0 + bx lr +END(cloudabi_sys_file_create) + +ENTRY(cloudabi_sys_file_link) + mov ip, #20 + swi 0 + bx lr +END(cloudabi_sys_file_link) + +ENTRY(cloudabi_sys_file_open) + mov ip, #21 + swi 0 + bcs 1f + ldr r2, [sp, #12] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_file_open) + +ENTRY(cloudabi_sys_file_readdir) + mov ip, #22 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_file_readdir) + +ENTRY(cloudabi_sys_file_readlink) + mov ip, #23 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_file_readlink) + +ENTRY(cloudabi_sys_file_rename) + mov ip, #24 + swi 0 + bx lr +END(cloudabi_sys_file_rename) + +ENTRY(cloudabi_sys_file_stat_fget) + mov ip, #25 + swi 0 + bx lr +END(cloudabi_sys_file_stat_fget) + +ENTRY(cloudabi_sys_file_stat_fput) + mov ip, #26 + swi 0 + bx lr +END(cloudabi_sys_file_stat_fput) + +ENTRY(cloudabi_sys_file_stat_get) + mov ip, #27 + swi 0 + bx lr +END(cloudabi_sys_file_stat_get) + +ENTRY(cloudabi_sys_file_stat_put) + mov ip, #28 + swi 0 + bx lr +END(cloudabi_sys_file_stat_put) + +ENTRY(cloudabi_sys_file_symlink) + mov ip, #29 + swi 0 + bx lr +END(cloudabi_sys_file_symlink) + +ENTRY(cloudabi_sys_file_unlink) + mov ip, #30 + swi 0 + bx lr +END(cloudabi_sys_file_unlink) + +ENTRY(cloudabi_sys_lock_unlock) + mov ip, #31 + swi 0 + bx lr +END(cloudabi_sys_lock_unlock) + +ENTRY(cloudabi_sys_mem_advise) + mov ip, #32 + swi 0 + bx lr +END(cloudabi_sys_mem_advise) + +ENTRY(cloudabi_sys_mem_lock) + mov ip, #33 + swi 0 + bx lr +END(cloudabi_sys_mem_lock) + +ENTRY(cloudabi_sys_mem_map) + mov ip, #34 + swi 0 + bcs 1f + ldr r2, [sp, #16] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_mem_map) + +ENTRY(cloudabi_sys_mem_protect) + mov ip, #35 + swi 0 + bx lr +END(cloudabi_sys_mem_protect) + +ENTRY(cloudabi_sys_mem_sync) + mov ip, #36 + swi 0 + bx lr +END(cloudabi_sys_mem_sync) + +ENTRY(cloudabi_sys_mem_unlock) + mov ip, #37 + swi 0 + bx lr +END(cloudabi_sys_mem_unlock) + +ENTRY(cloudabi_sys_mem_unmap) + mov ip, #38 + swi 0 + bx lr +END(cloudabi_sys_mem_unmap) + +ENTRY(cloudabi_sys_poll) + str r3, [sp, #-4] + mov ip, #39 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_poll) + +ENTRY(cloudabi_sys_poll_fd) + mov ip, #40 + swi 0 + bcs 1f + ldr r2, [sp, #12] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_poll_fd) + +ENTRY(cloudabi_sys_proc_exec) + mov ip, #41 + swi 0 + bx lr +END(cloudabi_sys_proc_exec) + +ENTRY(cloudabi_sys_proc_exit) + mov ip, #42 + swi 0 +END(cloudabi_sys_proc_exit) + +ENTRY(cloudabi_sys_proc_fork) + str r0, [sp, #-4] + str r1, [sp, #-8] + mov ip, #43 + swi 0 + ldr r2, [sp, #-4] + ldr r3, [sp, #-8] + bcs 1f + str r0, [r2] + str r1, [r3] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_proc_fork) + +ENTRY(cloudabi_sys_proc_raise) + mov ip, #44 + swi 0 + bx lr +END(cloudabi_sys_proc_raise) + +ENTRY(cloudabi_sys_random_get) + mov ip, #45 + swi 0 + bx lr +END(cloudabi_sys_random_get) + +ENTRY(cloudabi_sys_sock_accept) + str r2, [sp, #-4] + mov ip, #46 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_sock_accept) + +ENTRY(cloudabi_sys_sock_bind) + mov ip, #47 + swi 0 + bx lr +END(cloudabi_sys_sock_bind) + +ENTRY(cloudabi_sys_sock_connect) + mov ip, #48 + swi 0 + bx lr +END(cloudabi_sys_sock_connect) + +ENTRY(cloudabi_sys_sock_listen) + mov ip, #49 + swi 0 + bx lr +END(cloudabi_sys_sock_listen) + +ENTRY(cloudabi_sys_sock_recv) + mov ip, #50 + swi 0 + bx lr +END(cloudabi_sys_sock_recv) + +ENTRY(cloudabi_sys_sock_send) + mov ip, #51 + swi 0 + bx lr +END(cloudabi_sys_sock_send) + +ENTRY(cloudabi_sys_sock_shutdown) + mov ip, #52 + swi 0 + bx lr +END(cloudabi_sys_sock_shutdown) + +ENTRY(cloudabi_sys_sock_stat_get) + mov ip, #53 + swi 0 + bx lr +END(cloudabi_sys_sock_stat_get) + +ENTRY(cloudabi_sys_thread_create) + str r1, [sp, #-4] + mov ip, #54 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_thread_create) + +ENTRY(cloudabi_sys_thread_exit) + mov ip, #55 + swi 0 +END(cloudabi_sys_thread_exit) + +ENTRY(cloudabi_sys_thread_yield) + mov ip, #56 + swi 0 + bx lr +END(cloudabi_sys_thread_yield) From owner-svn-src-all@freebsd.org Sun Sep 18 12:49:24 2016 Return-Path: Delivered-To: svn-src-all@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 7F143BDE61C; Sun, 18 Sep 2016 12:49:24 +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 418BA38F; Sun, 18 Sep 2016 12:49:24 +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 u8ICnNSN015124; Sun, 18 Sep 2016 12:49:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ICnNPa015121; Sun, 18 Sep 2016 12:49:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181249.u8ICnNPa015121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 12:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305929 - in head: . etc share/man/man8 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 12:49:24 -0000 Author: bapt Date: Sun Sep 18 12:49:23 2016 New Revision: 305929 URL: https://svnweb.freebsd.org/changeset/base/305929 Log: Remove backup_uses_rcs from rc.subr In preparation for the removal of GNU rcs from base, remove the backup_uses_rcs functionality from the rc.subr backup_file feature. This functionnality was off by default Reviewed by: wblock Differential Revision: https://reviews.freebsd.org/D7883 Modified: head/UPDATING head/etc/rc.subr head/share/man/man8/rc.subr.8 Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 18 11:36:54 2016 (r305928) +++ head/UPDATING Sun Sep 18 12:49:23 2016 (r305929) @@ -31,6 +31,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160918: + The backup_uses_rcs functionality has been removed from rc.subr. + 20160908: The queue(3) debugging macro, QUEUE_MACRO_DEBUG, has been split into two separate components, QUEUE_MACRO_DEBUG_TRACE and Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sun Sep 18 11:36:54 2016 (r305928) +++ head/etc/rc.subr Sun Sep 18 12:49:23 2016 (r305929) @@ -1532,28 +1532,20 @@ debug() # # backup_file action file cur backup # Make a backup copy of `file' into `cur', and save the previous -# version of `cur' as `backup' or use rcs for archiving. -# -# This routine checks the value of the backup_uses_rcs variable, -# which can be either YES or NO. +# version of `cur' as `backup'. # # The `action' keyword can be one of the following: # # add `file' is now being backed up (and is possibly # being reentered into the backups system). `cur' -# is created and RCS files, if necessary, are -# created as well. +# is created. # # update `file' has changed and needs to be backed up. -# If `cur' exists, it is copied to to `back' or -# checked into RCS (if the repository file is old), -# and then `file' is copied to `cur'. Another RCS -# check in done here if RCS is being used. +# If `cur' exists, it is copied to to `back' +# and then `file' is copied to `cur'. # # remove `file' is no longer being tracked by the backups -# system. If RCS is not being used, `cur' is moved -# to `back', otherwise an empty file is checked in, -# and then `cur' is removed. +# system. `cur' is moved `back'. # # backup_file() @@ -1563,56 +1555,18 @@ backup_file() _cur=$3 _back=$4 - if checkyesno backup_uses_rcs; then - _msg0="backup archive" - _msg1="update" - - # ensure that history file is not locked - if [ -f $_cur,v ]; then - rcs -q -u -U -M $_cur - fi - - # ensure after switching to rcs that the - # current backup is not lost + case $_action in + add|update) if [ -f $_cur ]; then - # no archive, or current newer than archive - if [ ! -f $_cur,v -o $_cur -nt $_cur,v ]; then - ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur - rcs -q -kb -U $_cur - co -q -f -u $_cur - fi + cp -p $_cur $_back fi - - case $_action in - add|update) - cp -p $_file $_cur - ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur - rcs -q -kb -U $_cur - co -q -f -u $_cur - chown root:wheel $_cur $_cur,v - ;; - remove) - cp /dev/null $_cur - ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur - rcs -q -kb -U $_cur - chown root:wheel $_cur $_cur,v - rm $_cur - ;; - esac - else - case $_action in - add|update) - if [ -f $_cur ]; then - cp -p $_cur $_back - fi - cp -p $_file $_cur - chown root:wheel $_cur - ;; - remove) - mv -f $_cur $_back - ;; - esac - fi + cp -p $_file $_cur + chown root:wheel $_cur + ;; + remove) + mv -f $_cur $_back + ;; + esac } # make_symlink src link Modified: head/share/man/man8/rc.subr.8 ============================================================================== --- head/share/man/man8/rc.subr.8 Sun Sep 18 11:36:54 2016 (r305928) +++ head/share/man/man8/rc.subr.8 Sun Sep 18 12:49:23 2016 (r305929) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2016 +.Dd September 18, 2016 .Dt RC.SUBR 8 .Os .Sh NAME @@ -105,17 +105,7 @@ Make a backup copy of .Ar file into .Ar current . -If the -.Xr rc.conf 5 -variable -.Va backup_uses_rcs -is -.Dq Li YES , -use -.Xr rcs 1 -to archive the previous version of -.Ar current , -otherwise save the previous version of +Save the previous version of .Ar current as .Ar backup . @@ -129,9 +119,7 @@ may be one of the following: .Ar file is now being backed up by or possibly re-entered into this backup mechanism. .Ar current -is created, and if necessary, the -.Xr rcs 1 -files are created as well. +is created. .It Cm update .Ar file has changed and needs to be backed up. @@ -139,9 +127,6 @@ If .Ar current exists, it is copied to .Ar backup -or checked into -.Xr rcs 1 -(if the repository file is old), and then .Ar file is copied to @@ -149,12 +134,6 @@ is copied to .It Cm remove .Ar file is no longer being tracked by this backup mechanism. -If -.Xr rcs 1 -is being used, an empty file is checked in and -.Ar current -is removed, -otherwise .Ar current is moved to .Ar backup . From owner-svn-src-all@freebsd.org Sun Sep 18 14:48:29 2016 Return-Path: Delivered-To: svn-src-all@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 9F98CBDFAB8; Sun, 18 Sep 2016 14:48:29 +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 726A9230; Sun, 18 Sep 2016 14:48: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 u8IEmSjX060142; Sun, 18 Sep 2016 14:48:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IEmSNm060141; Sun, 18 Sep 2016 14:48:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181448.u8IEmSNm060141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 14:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305930 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 14:48:29 -0000 Author: bapt Date: Sun Sep 18 14:48:28 2016 New Revision: 305930 URL: https://svnweb.freebsd.org/changeset/base/305930 Log: In preparation for removal of GNU rcs, replace merge(1) usage with direct diff3(1) usage Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Sun Sep 18 12:49:23 2016 (r305929) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Sun Sep 18 14:48:28 2016 (r305930) @@ -2380,7 +2380,7 @@ upgrade_merge () { cp merge/old/${F} merge/new/${F} ;; *) - if ! merge -p -L "current version" \ + if ! diff3 -E -m -L "current version" \ -L "${OLDRELNUM}" -L "${RELNUM}" \ merge/old/${F} \ merge/${OLDRELNUM}/${F} \ From owner-svn-src-all@freebsd.org Sun Sep 18 15:01:12 2016 Return-Path: Delivered-To: svn-src-all@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 D9D78BDFD3A; Sun, 18 Sep 2016 15:01:12 +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 96D2796D; Sun, 18 Sep 2016 15:01:12 +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 u8IF1Bxa064722; Sun, 18 Sep 2016 15:01:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IF1B4X064718; Sun, 18 Sep 2016 15:01:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181501.u8IF1B4X064718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 15:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305931 - in head: . share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 15:01:12 -0000 Author: bapt Date: Sun Sep 18 15:01:11 2016 New Revision: 305931 URL: https://svnweb.freebsd.org/changeset/base/305931 Log: Disable GNU rcs by default All remaining tools using rcs has been switched to directly use diff3(1): - etcupdate(8) - freebsd-update(8) Note that the ident(1) tool is been already replaced long ago with a BSD licensed version, as such it remains installed. GNU rcs is still available from ports: - rcs: newer GPLv3 version - rcs57: the latest version from base (GPLv2) Added: head/tools/build/options/WITH_RCS - copied, changed from r305930, head/tools/build/options/WITHOUT_RCS Deleted: head/tools/build/options/WITHOUT_RCS Modified: head/UPDATING head/share/mk/src.libnames.mk head/share/mk/src.opts.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 18 14:48:28 2016 (r305930) +++ head/UPDATING Sun Sep 18 15:01:11 2016 (r305931) @@ -32,6 +32,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20160918: + GNU rcs has been turned off by default. It can (temporary) be built + again by adding WITH_RCS knob in src.conf. + +20160918: The backup_uses_rcs functionality has been removed from rc.subr. 20160908: Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sun Sep 18 14:48:28 2016 (r305930) +++ head/share/mk/src.libnames.mk Sun Sep 18 15:01:11 2016 (r305931) @@ -490,8 +490,8 @@ LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialo LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov LIBGOMPDIR= ${OBJTOP}/gnu/lib/libgomp LIBGNUREGEXDIR= ${OBJTOP}/gnu/lib/libregex -LIBSSPDIR= ${OBJTOP}/gnu/lib/libssp -LIBSSP_NONSHAREDDIR= ${OBJTOP}/gnu/lib/libssp/libssp_nonshared +LIBSSPDIR= ${OBJTOP}/lib/libssp +LIBSSP_NONSHAREDDIR= ${OBJTOP}/lib/libssp/libssp_nonshared LIBSUPCPLUSPLUSDIR= ${OBJTOP}/gnu/lib/libsupc++ LIBASN1DIR= ${OBJTOP}/kerberos5/lib/libasn1 LIBGSSAPI_KRB5DIR= ${OBJTOP}/kerberos5/lib/libgssapi_krb5 Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Sep 18 14:48:28 2016 (r305930) +++ head/share/mk/src.opts.mk Sun Sep 18 15:01:11 2016 (r305931) @@ -147,7 +147,6 @@ __DEFAULT_YES_OPTIONS = \ RADIUS_SUPPORT \ RCMDS \ RBOOTD \ - RCS \ RESCUE \ ROUTED \ SENDMAIL \ @@ -187,6 +186,7 @@ __DEFAULT_NO_OPTIONS = \ NAND \ OFED \ OPENLDAP \ + RCS \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ Copied and modified: head/tools/build/options/WITH_RCS (from r305930, head/tools/build/options/WITHOUT_RCS) ============================================================================== --- head/tools/build/options/WITHOUT_RCS Sun Sep 18 14:48:28 2016 (r305930, copy source) +++ head/tools/build/options/WITH_RCS Sun Sep 18 15:01:11 2016 (r305931) @@ -1,5 +1,4 @@ .\" $FreeBSD$ -Set to not build -.Xr rcs 1 , -.Xr etcupdate 8 , +Set to build +.Xr rcs 1 and related utilities. From owner-svn-src-all@freebsd.org Sun Sep 18 15:06:29 2016 Return-Path: Delivered-To: svn-src-all@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 9E618BDFDED; Sun, 18 Sep 2016 15:06:29 +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 624ECCC3; Sun, 18 Sep 2016 15:06: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 u8IF6Sx1067599; Sun, 18 Sep 2016 15:06:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IF6Sd4067598; Sun, 18 Sep 2016 15:06:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181506.u8IF6Sd4067598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 15:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305932 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 15:06:29 -0000 Author: bapt Date: Sun Sep 18 15:06:28 2016 New Revision: 305932 URL: https://svnweb.freebsd.org/changeset/base/305932 Log: Remove cruft that accidently crept in r305931 Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sun Sep 18 15:01:11 2016 (r305931) +++ head/share/mk/src.libnames.mk Sun Sep 18 15:06:28 2016 (r305932) @@ -490,8 +490,8 @@ LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialo LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov LIBGOMPDIR= ${OBJTOP}/gnu/lib/libgomp LIBGNUREGEXDIR= ${OBJTOP}/gnu/lib/libregex -LIBSSPDIR= ${OBJTOP}/lib/libssp -LIBSSP_NONSHAREDDIR= ${OBJTOP}/lib/libssp/libssp_nonshared +LIBSSPDIR= ${OBJTOP}/gnu/lib/libssp +LIBSSP_NONSHAREDDIR= ${OBJTOP}/gnu/lib/libssp/libssp_nonshared LIBSUPCPLUSPLUSDIR= ${OBJTOP}/gnu/lib/libsupc++ LIBASN1DIR= ${OBJTOP}/kerberos5/lib/libasn1 LIBGSSAPI_KRB5DIR= ${OBJTOP}/kerberos5/lib/libgssapi_krb5 From owner-svn-src-all@freebsd.org Sun Sep 18 15:40:37 2016 Return-Path: Delivered-To: svn-src-all@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 A0C66BDF458; Sun, 18 Sep 2016 15:40:37 +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 73665BF3; Sun, 18 Sep 2016 15:40:37 +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 u8IFea1h078713; Sun, 18 Sep 2016 15:40:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IFeaGO078712; Sun, 18 Sep 2016 15:40:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181540.u8IFeaGO078712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 15:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305933 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 15:40:37 -0000 Author: bapt Date: Sun Sep 18 15:40:36 2016 New Revision: 305933 URL: https://svnweb.freebsd.org/changeset/base/305933 Log: Modify manually given makeman is broken due to errors in share/mk/* Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sun Sep 18 15:06:28 2016 (r305932) +++ head/share/man/man5/src.conf.5 Sun Sep 18 15:40:36 2016 (r305933) @@ -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 .\" $FreeBSD$ -.Dd August 23, 2016 +.Dd September 18, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1319,11 +1319,10 @@ This includes .Xr rlogin 1 , .Xr rsh 1 , etc. -.It Va WITHOUT_RCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 275138 2014-11-26 20:43:09Z gjb -Set to not build -.Xr rcs 1 , -.Xr etcupdate 8 , +.It Va WITH_RCS +.\" from FreeBSD: head/tools/build/options/WITH_RCS 305931 2016-09-18 15:01:11Z bapt +Set to build +.Xr rcs 1 and related utilities. .It Va WITHOUT_RESCUE .\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru From owner-svn-src-all@freebsd.org Sun Sep 18 15:51:35 2016 Return-Path: Delivered-To: svn-src-all@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 43F9ABDF687; Sun, 18 Sep 2016 15:51:35 +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 11881128F; Sun, 18 Sep 2016 15:51:34 +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 u8IFpYhX085862; Sun, 18 Sep 2016 15:51:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IFpYrP085861; Sun, 18 Sep 2016 15:51:34 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181551.u8IFpYrP085861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 15:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305934 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 15:51:35 -0000 Author: bapt Date: Sun Sep 18 15:51:34 2016 New Revision: 305934 URL: https://svnweb.freebsd.org/changeset/base/305934 Log: Apparently we are supposed to use 2 spaces after full stop Reported by: danfe Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 18 15:40:36 2016 (r305933) +++ head/UPDATING Sun Sep 18 15:51:34 2016 (r305934) @@ -32,7 +32,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20160918: - GNU rcs has been turned off by default. It can (temporary) be built + GNU rcs has been turned off by default. It can (temporary) be built again by adding WITH_RCS knob in src.conf. 20160918: From owner-svn-src-all@freebsd.org Sun Sep 18 15:55:58 2016 Return-Path: Delivered-To: svn-src-all@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 A95CEBDFA56; Sun, 18 Sep 2016 15:55:58 +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 7AB70174B; Sun, 18 Sep 2016 15:55:58 +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 u8IFtvdt086060; Sun, 18 Sep 2016 15:55:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IFtvAR086059; Sun, 18 Sep 2016 15:55:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181555.u8IFtvAR086059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 15:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305935 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 15:55:58 -0000 Author: bapt Date: Sun Sep 18 15:55:57 2016 New Revision: 305935 URL: https://svnweb.freebsd.org/changeset/base/305935 Log: Use the proper word Reported by: danfe Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 18 15:51:34 2016 (r305934) +++ head/UPDATING Sun Sep 18 15:55:57 2016 (r305935) @@ -32,7 +32,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20160918: - GNU rcs has been turned off by default. It can (temporary) be built + GNU rcs has been turned off by default. It can (temporarily) be built again by adding WITH_RCS knob in src.conf. 20160918: From owner-svn-src-all@freebsd.org Sun Sep 18 16:25:42 2016 Return-Path: Delivered-To: svn-src-all@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 C19CCBDF1F8; Sun, 18 Sep 2016 16:25:42 +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 9F7E8868; Sun, 18 Sep 2016 16:25:42 +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 u8IGPfkU097288; Sun, 18 Sep 2016 16:25:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IGPfLd097287; Sun, 18 Sep 2016 16:25:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181625.u8IGPfLd097287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 16:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305936 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 16:25:42 -0000 Author: bapt Date: Sun Sep 18 16:25:41 2016 New Revision: 305936 URL: https://svnweb.freebsd.org/changeset/base/305936 Log: Capsicum-ize soelim(1). As a trick to be able to access all files passed in arguments (readonly) within the sandbox we first open the root directory, then consider all files as relative to this file descriptor. This might be improved once casper add supports for filesystem. MFC after: 1 month Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D7936 Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Sun Sep 18 15:55:57 2016 (r305935) +++ head/usr.bin/soelim/soelim.c Sun Sep 18 16:25:41 2016 (r305936) @@ -27,15 +27,19 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include +#include +#include #include #include #include #include #include +#include #include #define C_OPTION 0x1 @@ -51,18 +55,27 @@ usage(void) exit(EXIT_FAILURE); } +static const char * +relpath(const char *path) +{ + while (*path == '/' && *path != '\0') + path++; + + return (path); +} + static FILE * -soelim_fopen(const char *name) +soelim_fopen(int rootfd, const char *name) { - FILE *f; char path[PATH_MAX]; size_t i; + int fd; if (strcmp(name, "-") == 0) return (stdin); - if ((f = fopen(name, "r")) != NULL) - return (f); + if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) + return (fdopen(fd, "r")); if (*name == '/') { warn("can't open '%s'", name); @@ -72,17 +85,17 @@ soelim_fopen(const char *name) for (i = 0; i < includes->sl_cur; i++) { snprintf(path, sizeof(path), "%s/%s", includes->sl_str[i], name); - if ((f = fopen(path, "r")) != NULL) - return (f); + if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) + return (fdopen(fd, "r")); } warn("can't open '%s'", name); - return (f); + return (NULL); } static int -soelim_file(FILE *f, int flag) +soelim_file(int rootfd, FILE *f, int flag) { char *line = NULL; char *walk, *cp; @@ -118,7 +131,7 @@ soelim_file(FILE *f, int flag) printf("%s", line); continue; } - if (soelim_file(soelim_fopen(walk), flag) == 1) { + if (soelim_file(rootfd, soelim_fopen(rootfd, walk), flag) == 1) { free(line); return (1); } @@ -135,11 +148,15 @@ soelim_file(FILE *f, int flag) int main(int argc, char **argv) { - int ch, i; + int ch, i, rootfd; int ret = 0; int flags = 0; + unsigned long cmd; + char cwd[MAXPATHLEN]; + cap_rights_t rights; includes = sl_init(); + sl_add(includes, getcwd(cwd, sizeof(cwd))); if (includes == NULL) err(EXIT_FAILURE, "sl_init()"); @@ -165,13 +182,42 @@ main(int argc, char **argv) argc -= optind; argv += optind; + cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_IOCTL); + /* + * EBADF in case stdin is closed by the caller + */ + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS + && errno != EBADF) + err(EXIT_FAILURE, "unable to limit rights for stdin"); + cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stdout"); + if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stderr"); + rootfd = open("/", O_DIRECTORY | O_RDONLY); + cap_rights_init(&rights, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); + if (cap_rights_limit(rootfd, &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights"); + + cmd = TIOCGETA; + if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stdout"); + if (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stderr"); + if (cap_ioctls_limit(STDIN_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stdin"); + + if (cap_enter() < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to enter capability mode"); + if (argc == 0) - ret = soelim_file(stdin, flags); + ret = soelim_file(rootfd, stdin, flags); for (i = 0; i < argc; i++) - ret = soelim_file(soelim_fopen(argv[i]), flags); + ret = soelim_file(rootfd, soelim_fopen(rootfd, argv[i]), flags); sl_free(includes, 0); + close(rootfd); return (ret); } From owner-svn-src-all@freebsd.org Sun Sep 18 16:34:42 2016 Return-Path: Delivered-To: svn-src-all@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 402A1BDF470; Sun, 18 Sep 2016 16:34:42 +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 EC6FEC6F; Sun, 18 Sep 2016 16:34:41 +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 u8IGYfBq001154; Sun, 18 Sep 2016 16:34:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IGYf2k001153; Sun, 18 Sep 2016 16:34:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181634.u8IGYf2k001153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 16:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305937 - head/usr.bin/tee X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 16:34:42 -0000 Author: bapt Date: Sun Sep 18 16:34:40 2016 New Revision: 305937 URL: https://svnweb.freebsd.org/changeset/base/305937 Log: Capsicum-ize tee(1) Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D7940 Modified: head/usr.bin/tee/tee.c Modified: head/usr.bin/tee/tee.c ============================================================================== --- head/usr.bin/tee/tee.c Sun Sep 18 16:25:41 2016 (r305936) +++ head/usr.bin/tee/tee.c Sun Sep 18 16:34:40 2016 (r305937) @@ -41,14 +41,18 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include +#include + #include +#include #include #include #include #include #include +#include #include typedef struct _list { @@ -69,6 +73,8 @@ main(int argc, char *argv[]) char *bp; int append, ch, exitval; char *buf; + cap_rights_t rights; + unsigned long cmd; #define BSIZE (8 * 1024) append = 0; @@ -90,6 +96,16 @@ main(int argc, char *argv[]) if ((buf = malloc(BSIZE)) == NULL) err(1, "malloc"); + cap_rights_init(&rights, CAP_READ, CAP_FSTAT); + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stdin"); + cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); + if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stderr"); + cmd = TIOCGETA; + if (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stderr"); + add(STDOUT_FILENO, "stdout"); for (exitval = 0; *argv; ++argv) @@ -100,6 +116,8 @@ main(int argc, char *argv[]) } else add(fd, *argv); + if (cap_enter() < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to enter capability mode"); while ((rval = read(STDIN_FILENO, buf, BSIZE)) > 0) for (p = head; p; p = p->next) { n = rval; @@ -129,6 +147,21 @@ static void add(int fd, const char *name) { LIST *p; + cap_rights_t rights; + unsigned long cmd; + + if (fd == STDOUT_FILENO) + cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); + else + cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT); + if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights"); + + if (fd == STDOUT_FILENO) { + cmd = TIOCGETA; + if (cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stdout"); + } if ((p = malloc(sizeof(LIST))) == NULL) err(1, "malloc"); From owner-svn-src-all@freebsd.org Sun Sep 18 17:23:54 2016 Return-Path: Delivered-To: svn-src-all@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 7792ABE0248; Sun, 18 Sep 2016 17:23:54 +0000 (UTC) (envelope-from ed@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 4A31679C; Sun, 18 Sep 2016 17:23:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8IHNri2020263; Sun, 18 Sep 2016 17:23:53 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHNr4a020262; Sun, 18 Sep 2016 17:23:53 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609181723.u8IHNr4a020262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 18 Sep 2016 17:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305938 - head/sys/contrib/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 17:23:54 -0000 Author: ed Date: Sun Sep 18 17:23:53 2016 New Revision: 305938 URL: https://svnweb.freebsd.org/changeset/base/305938 Log: Fix badly computed register/stack offset of system call output arguments. Bugs in the Python code used to generate this vDSO caused us to miscompute the register numbers/stack offsets at which addresses of the system call output arguments were stored. Together with some other patches, this vDSO allows us to make all of the cloudlibc unit tests pass. Obtained from: https://github.com/NuxiNL/cloudabi Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Sun Sep 18 16:34:40 2016 (r305937) +++ head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Sun Sep 18 17:23:53 2016 (r305938) @@ -48,11 +48,10 @@ ENTRY(cloudabi_sys_clock_res_get) END(cloudabi_sys_clock_res_get) ENTRY(cloudabi_sys_clock_time_get) - str r3, [sp, #-4] mov ip, #1 swi 0 - ldr r2, [sp, #-4] bcs 1f + ldr r2, [sp, #0] str r0, [r2, 0] str r1, [r2, 4] mov r0, $0 @@ -227,7 +226,7 @@ ENTRY(cloudabi_sys_file_open) mov ip, #21 swi 0 bcs 1f - ldr r2, [sp, #12] + ldr r2, [sp, #8] str r0, [r2] mov r0, $0 1: @@ -249,7 +248,7 @@ ENTRY(cloudabi_sys_file_readlink) mov ip, #23 swi 0 bcs 1f - ldr r2, [sp, #8] + ldr r2, [sp, #4] str r0, [r2] mov r0, $0 1: @@ -367,7 +366,7 @@ ENTRY(cloudabi_sys_poll_fd) mov ip, #40 swi 0 bcs 1f - ldr r2, [sp, #12] + ldr r2, [sp, #8] str r0, [r2] mov r0, $0 1: From owner-svn-src-all@freebsd.org Sun Sep 18 17:33:50 2016 Return-Path: Delivered-To: svn-src-all@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 9F074BE0449; Sun, 18 Sep 2016 17:33: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 719F3CB4; Sun, 18 Sep 2016 17:33: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 u8IHXnup024101; Sun, 18 Sep 2016 17:33:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHXnfc024100; Sun, 18 Sep 2016 17:33:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609181733.u8IHXnfc024100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 17:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305939 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 17:33:50 -0000 Author: kib Date: Sun Sep 18 17:33:49 2016 New Revision: 305939 URL: https://svnweb.freebsd.org/changeset/base/305939 Log: Remove trailing space. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Sep 18 17:23:53 2016 (r305938) +++ head/sys/amd64/amd64/machdep.c Sun Sep 18 17:33:49 2016 (r305939) @@ -1091,7 +1091,7 @@ add_efi_map_entries(struct efi_map_heade * Boot Services API. */ efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; - map = (struct efi_md *)((uint8_t *)efihdr + efisz); + map = (struct efi_md *)((uint8_t *)efihdr + efisz); if (efihdr->descriptor_size == 0) return; From owner-svn-src-all@freebsd.org Sun Sep 18 17:35:18 2016 Return-Path: Delivered-To: svn-src-all@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 91F76BE04A8; Sun, 18 Sep 2016 17:35:18 +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 5FE90E2C; Sun, 18 Sep 2016 17:35:18 +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 u8IHZHlN024208; Sun, 18 Sep 2016 17:35:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHZHrJ024207; Sun, 18 Sep 2016 17:35:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201609181735.u8IHZHrJ024207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 18 Sep 2016 17:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305940 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 17:35:18 -0000 Author: ae Date: Sun Sep 18 17:35:17 2016 New Revision: 305940 URL: https://svnweb.freebsd.org/changeset/base/305940 Log: Move opcode rewriter init and destroy handlers into non-VENT code. PR: 212576,212649,212077 Submitted by: John Zielinski MFC after: 1 week Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Sun Sep 18 17:33:49 2016 (r305939) +++ head/sys/netpfil/ipfw/ip_fw2.c Sun Sep 18 17:35:17 2016 (r305940) @@ -2710,6 +2710,7 @@ ipfw_init(void) default_fw_tables = IPFW_TABLES_MAX; ipfw_init_sopt_handler(); + ipfw_init_obj_rewriter(); ipfw_iface_init(); return (error); } @@ -2723,6 +2724,7 @@ ipfw_destroy(void) ipfw_iface_destroy(); ipfw_destroy_sopt_handler(); + ipfw_destroy_obj_rewriter(); printf("IP firewall unloaded\n"); } @@ -2757,7 +2759,6 @@ vnet_ipfw_init(const void *unused) /* Init shared services hash table */ ipfw_init_srv(chain); - ipfw_init_obj_rewriter(); ipfw_init_counters(); /* insert the default rule and create the initial map */ chain->n_rules = 1; @@ -2862,7 +2863,6 @@ vnet_ipfw_uninit(const void *unused) IPFW_LOCK_DESTROY(chain); ipfw_dyn_uninit(1); /* free the remaining parts */ ipfw_destroy_counters(); - ipfw_destroy_obj_rewriter(); ipfw_bpf_uninit(last); return (0); } From owner-svn-src-all@freebsd.org Sun Sep 18 17:35:25 2016 Return-Path: Delivered-To: svn-src-all@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 9271CBE04E2; Sun, 18 Sep 2016 17:35:25 +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 57C0FF74; Sun, 18 Sep 2016 17:35:25 +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 u8IHZO8D024294; Sun, 18 Sep 2016 17:35:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHZOLd024293; Sun, 18 Sep 2016 17:35:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609181735.u8IHZOLd024293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 17:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305941 - head/sys/boot/efi/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 17:35:25 -0000 Author: kib Date: Sun Sep 18 17:35:24 2016 New Revision: 305941 URL: https://svnweb.freebsd.org/changeset/base/305941 Log: Add double-inclusion protection. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/boot/efi/include/efilib.h Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Sun Sep 18 17:35:17 2016 (r305940) +++ head/sys/boot/efi/include/efilib.h Sun Sep 18 17:35:24 2016 (r305941) @@ -27,6 +27,9 @@ * $FreeBSD$ */ +#ifndef _LOADER_EFILIB_H +#define _LOADER_EFILIB_H + #include extern EFI_HANDLE IH; @@ -61,3 +64,5 @@ void efi_time_fini(void); EFI_STATUS main(int argc, CHAR16 *argv[]); void exit(EFI_STATUS status); void delay(int usecs); + +#endif From owner-svn-src-all@freebsd.org Sun Sep 18 17:38:04 2016 Return-Path: Delivered-To: svn-src-all@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 12AFABE0649; Sun, 18 Sep 2016 17:38:04 +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 C84F4364; Sun, 18 Sep 2016 17:38:03 +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 u8IHc3Bd024427; Sun, 18 Sep 2016 17:38:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHc2bc024422; Sun, 18 Sep 2016 17:38:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609181738.u8IHc2bc024422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 17:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305942 - in head: sbin/sysctl sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 17:38:04 -0000 Author: kib Date: Sun Sep 18 17:38:02 2016 New Revision: 305942 URL: https://svnweb.freebsd.org/changeset/base/305942 Log: Consolidate four efi_next_descriptor() definitions. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sbin/sysctl/sysctl.c head/sys/amd64/amd64/machdep.c head/sys/arm/arm/machdep.c head/sys/arm64/arm64/machdep.c head/sys/sys/efi.h Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sbin/sysctl/sysctl.c Sun Sep 18 17:38:02 2016 (r305942) @@ -637,9 +637,6 @@ S_vmtotal(size_t l2, void *p) } #ifdef __amd64__ -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static int S_efi_map(size_t l2, void *p) { Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/amd64/amd64/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -1056,9 +1056,6 @@ bios_add_smap_entries(struct bios_smap * } } -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, int *physmap_idx) Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/arm/arm/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -1398,9 +1398,6 @@ set_stackptrs(int cpu) #endif #ifdef EFI -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, int *mrcnt) Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/arm64/arm64/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -699,9 +699,6 @@ add_fdt_mem_regions(struct mem_region *m } #endif -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, u_int *physmap_idxp) Modified: head/sys/sys/efi.h ============================================================================== --- head/sys/sys/efi.h Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/sys/efi.h Sun Sep 18 17:38:02 2016 (r305942) @@ -90,6 +90,9 @@ struct efi_md { #define EFI_MD_ATTR_RT 0x8000000000000000UL }; +#define efi_next_descriptor(ptr, size) \ + ((struct efi_md *)(((uint8_t *)(ptr)) + (size))) + struct efi_tm { uint16_t tm_year; /* 1998 - 20XX */ uint8_t tm_mon; /* 1 - 12 */ From owner-svn-src-all@freebsd.org Sun Sep 18 17:41:17 2016 Return-Path: Delivered-To: svn-src-all@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 B212EBE07B6; Sun, 18 Sep 2016 17:41:17 +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 6FDF9804; Sun, 18 Sep 2016 17:41:17 +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 u8IHfG2I024592; Sun, 18 Sep 2016 17:41:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHfGV3024591; Sun, 18 Sep 2016 17:41:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609181741.u8IHfGV3024591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 17:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305943 - head/sys/boot/efi/loader/arch/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 17:41:17 -0000 Author: kib Date: Sun Sep 18 17:41:16 2016 New Revision: 305943 URL: https://svnweb.freebsd.org/changeset/base/305943 Log: Utilize pmap.h names for constants and types used to construct EFI trampoline page table. Also do some style cleanup. Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D7934 Modified: head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Modified: head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Sun Sep 18 17:38:02 2016 (r305942) +++ head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Sun Sep 18 17:41:16 2016 (r305943) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -57,8 +59,14 @@ extern int bi_load(char *args, vm_offset static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); -static struct file_format amd64_elf = { elf64_loadfile, elf64_exec }; -static struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec }; +static struct file_format amd64_elf = { + .l_load = elf64_loadfile, + .l_exec = elf64_exec, +}; +static struct file_format amd64_elf_obj = { + .l_load = elf64_obj_loadfile, + .l_exec = elf64_obj_exec, +}; struct file_format *file_formats[] = { &amd64_elf, @@ -66,21 +74,12 @@ struct file_format *file_formats[] = { NULL }; -#define PG_V 0x001 -#define PG_RW 0x002 -#define PG_U 0x004 -#define PG_PS 0x080 - -typedef u_int64_t p4_entry_t; -typedef u_int64_t p3_entry_t; -typedef u_int64_t p2_entry_t; -static p4_entry_t *PT4; -static p3_entry_t *PT3; -static p2_entry_t *PT2; +static pml4_entry_t *PT4; +static pdp_entry_t *PT3; +static pd_entry_t *PT2; static void (*trampoline)(uint64_t stack, void *copy_finish, uint64_t kernend, - uint64_t modulep, p4_entry_t *pagetable, - uint64_t entry); + uint64_t modulep, pml4_entry_t *pagetable, uint64_t entry); extern uintptr_t amd64_tramp; extern uint32_t amd64_tramp_size; @@ -157,7 +156,7 @@ elf64_exec(struct preloaded_file *fp) bcopy((void *)&amd64_tramp, (void *)trampcode, amd64_tramp_size); trampoline = (void *)trampcode; - PT4 = (p4_entry_t *)0x0000000040000000; + PT4 = (pml4_entry_t *)0x0000000040000000; err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 3, (EFI_PHYSICAL_ADDRESS *)&PT4); bzero(PT4, 3 * EFI_PAGE_SIZE); @@ -172,11 +171,11 @@ elf64_exec(struct preloaded_file *fp) */ for (i = 0; i < 512; i++) { /* Each slot of the L4 pages points to the same L3 page. */ - PT4[i] = (p4_entry_t)PT3; + PT4[i] = (pml4_entry_t)PT3; PT4[i] |= PG_V | PG_RW | PG_U; /* Each slot of the L3 pages points to the same L2 page. */ - PT3[i] = (p3_entry_t)PT2; + PT3[i] = (pdp_entry_t)PT2; PT3[i] |= PG_V | PG_RW | PG_U; /* The L2 page slots are mapped with 2MB pages for 1GB. */ @@ -204,5 +203,6 @@ elf64_exec(struct preloaded_file *fp) static int elf64_obj_exec(struct preloaded_file *fp) { + return (EFTYPE); } From owner-svn-src-all@freebsd.org Sun Sep 18 17:56:15 2016 Return-Path: Delivered-To: svn-src-all@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 CBD65BE0BB8; Sun, 18 Sep 2016 17:56:15 +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 9C23E283; Sun, 18 Sep 2016 17:56: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 u8IHuE2E031827; Sun, 18 Sep 2016 17:56:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHuEWW031826; Sun, 18 Sep 2016 17:56:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181756.u8IHuEWW031826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 17:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305944 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 17:56:15 -0000 Author: bapt Date: Sun Sep 18 17:56:14 2016 New Revision: 305944 URL: https://svnweb.freebsd.org/changeset/base/305944 Log: style(9) fix Reported by: oshogbo Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Sun Sep 18 17:41:16 2016 (r305943) +++ head/usr.bin/soelim/soelim.c Sun Sep 18 17:56:14 2016 (r305944) @@ -58,6 +58,7 @@ usage(void) static const char * relpath(const char *path) { + while (*path == '/' && *path != '\0') path++; From owner-svn-src-all@freebsd.org Sun Sep 18 18:03:08 2016 Return-Path: Delivered-To: svn-src-all@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 333FABE0D85; Sun, 18 Sep 2016 18:03:08 +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 DB8EA982; Sun, 18 Sep 2016 18:03:07 +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 u8II37QG035406; Sun, 18 Sep 2016 18:03:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8II37mD035405; Sun, 18 Sep 2016 18:03:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181803.u8II37mD035405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 18:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305945 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 18:03:08 -0000 Author: bapt Date: Sun Sep 18 18:03:06 2016 New Revision: 305945 URL: https://svnweb.freebsd.org/changeset/base/305945 Log: Better error checking if getcwd fails: just ignore it and do not try to adding to the list of possible path where to find the files. if fdopen fails, warn and return NULL the rest of the code knows how to deal with it Reported by: oshogbo Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Sun Sep 18 17:56:14 2016 (r305944) +++ head/usr.bin/soelim/soelim.c Sun Sep 18 18:03:06 2016 (r305945) @@ -68,6 +68,7 @@ relpath(const char *path) static FILE * soelim_fopen(int rootfd, const char *name) { + FILE *f = NULL; char path[PATH_MAX]; size_t i; int fd; @@ -75,8 +76,10 @@ soelim_fopen(int rootfd, const char *nam if (strcmp(name, "-") == 0) return (stdin); - if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) - return (fdopen(fd, "r")); + if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) { + f = fdopen(fd, "r"); + goto out; + } if (*name == '/') { warn("can't open '%s'", name); @@ -86,13 +89,17 @@ soelim_fopen(int rootfd, const char *nam for (i = 0; i < includes->sl_cur; i++) { snprintf(path, sizeof(path), "%s/%s", includes->sl_str[i], name); - if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) - return (fdopen(fd, "r")); + if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) { + f = fdopen(fd, "r"); + break; + } } - warn("can't open '%s'", name); +out: + if (f == NULL) + warn("can't open '%s'", name); - return (NULL); + return (f); } static int @@ -157,7 +164,9 @@ main(int argc, char **argv) cap_rights_t rights; includes = sl_init(); - sl_add(includes, getcwd(cwd, sizeof(cwd))); + if (getcwd(cwd, sizeof(cwd)) != NULL) + sl_add(includes, cwd); + if (includes == NULL) err(EXIT_FAILURE, "sl_init()"); @@ -196,6 +205,8 @@ main(int argc, char **argv) if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights for stderr"); rootfd = open("/", O_DIRECTORY | O_RDONLY); + if (rootfd == -1) + err(EXIT_FAILURE, "unable to open '/'"); cap_rights_init(&rights, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); if (cap_rights_limit(rootfd, &rights) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights"); From owner-svn-src-all@freebsd.org Sun Sep 18 18:22:02 2016 Return-Path: Delivered-To: svn-src-all@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 1A794BDF70D; Sun, 18 Sep 2016 18:22:02 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FDD3908; Sun, 18 Sep 2016 18:22:01 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id lgitbN9P8eXEclgiubiAlF; Sun, 18 Sep 2016 12:21:54 -0600 X-Authority-Analysis: v=2.2 cv=T/3OdLCQ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=GW1xBdLrtEIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=6aJc3jqtoeB2KihOuyMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 8B037D47; Sun, 18 Sep 2016 11:21:51 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u8IILpFV022674; Sun, 18 Sep 2016 11:21:51 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201609181821.u8IILpFV022674@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305930 - head/usr.sbin/freebsd-update In-Reply-To: Message from Baptiste Daroussin of "Sun, 18 Sep 2016 14:48:28 -0000." <201609181448.u8IEmSNm060141@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 18 Sep 2016 11:21:51 -0700 X-CMAE-Envelope: MS4wfOa3Gronj3pGyGnLFw5gn9nHGXI/Wx6sZTwYoWo7PrzVDjkWGFJy0xzgs/vldmfGgV86zck8w0eZTw6sQuq8cwdW3Ot+kdTxy75V6OmKnCQ/kSWLgDng r3f4BuZX72H2529s5eubJfQE4EOVkHpnHbeV1tuZzV1WhP80Jwb9joMrvXd3C0ELXyggOacXgx9k6EQhNP2ZbZ0ZZsRVW1Irvyw6zzJ2x+Y7kTme7pDXmAZh SMDW4lGc1Laz/ALd3GaQA0le7RN9MMDllgFzRjaKoel16oLTb0WBFrC4JRHg9V+Q X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 18:22:02 -0000 In message <201609181448.u8IEmSNm060141@repo.freebsd.org>, Baptiste Daroussin w rites: > Author: bapt > Date: Sun Sep 18 14:48:28 2016 > New Revision: 305930 > URL: https://svnweb.freebsd.org/changeset/base/305930 > > Log: > In preparation for removal of GNU rcs, replace merge(1) usage with direct > diff3(1) usage When we do finally remove GNU RCS from base we should update UPDATING to say that ports/devel/rcs57 is 100% compatible with RCS presently in base/. ports/devel/rcs is not 100% compatible. Ports that depend on RCS should use devel/rcs57 (unless of course a base/rcs port is planned). -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Sep 18 18:27:29 2016 Return-Path: Delivered-To: svn-src-all@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 C9C62BDF887; Sun, 18 Sep 2016 18:27:29 +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 8D733AF7; Sun, 18 Sep 2016 18:27: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 u8IIRSBX043476; Sun, 18 Sep 2016 18:27:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IIRSpL043475; Sun, 18 Sep 2016 18:27:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181827.u8IIRSpL043475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 18:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305946 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 18:27:29 -0000 Author: bapt Date: Sun Sep 18 18:27:28 2016 New Revision: 305946 URL: https://svnweb.freebsd.org/changeset/base/305946 Log: Sperify that users can find rcs and rcs57 in ports Reported by: cy Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 18 18:03:06 2016 (r305945) +++ head/UPDATING Sun Sep 18 18:27:28 2016 (r305946) @@ -34,6 +34,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 20160918: GNU rcs has been turned off by default. It can (temporarily) be built again by adding WITH_RCS knob in src.conf. + Otherwise, GNU rcs is available from packages: + - rcs: Latest GPLv3 GNU rcs version. + - rcs57: Copy of the latest version of GNU rcs (GPLv2) from base. 20160918: The backup_uses_rcs functionality has been removed from rc.subr. From owner-svn-src-all@freebsd.org Sun Sep 18 18:40:28 2016 Return-Path: Delivered-To: svn-src-all@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 62D92BDFD06; Sun, 18 Sep 2016 18:40:28 +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 35B4A3DF; Sun, 18 Sep 2016 18:40:28 +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 u8IIeRFp047598; Sun, 18 Sep 2016 18:40:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IIeR6u047597; Sun, 18 Sep 2016 18:40:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609181840.u8IIeR6u047597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 18:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305947 - head/sys/boot/efi/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 18:40:28 -0000 Author: kib Date: Sun Sep 18 18:40:27 2016 New Revision: 305947 URL: https://svnweb.freebsd.org/changeset/base/305947 Log: Add comment for the closing guard. Requested by: tsoome MFC after: 1 week Modified: head/sys/boot/efi/include/efilib.h Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Sun Sep 18 18:27:28 2016 (r305946) +++ head/sys/boot/efi/include/efilib.h Sun Sep 18 18:40:27 2016 (r305947) @@ -65,4 +65,4 @@ EFI_STATUS main(int argc, CHAR16 *argv[] void exit(EFI_STATUS status); void delay(int usecs); -#endif +#endif /* _LOADER_EFILIB_H */ From owner-svn-src-all@freebsd.org Sun Sep 18 18:49:19 2016 Return-Path: Delivered-To: svn-src-all@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 8F09CBDFFAA; Sun, 18 Sep 2016 18:49:19 +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 45EE9B77; Sun, 18 Sep 2016 18:49:19 +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 u8IInIsW051195; Sun, 18 Sep 2016 18:49:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IInIpD051194; Sun, 18 Sep 2016 18:49:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181849.u8IInIpD051194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 18:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305948 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 18:49:19 -0000 Author: bapt Date: Sun Sep 18 18:49:18 2016 New Revision: 305948 URL: https://svnweb.freebsd.org/changeset/base/305948 Log: Fix building as bootstrap tools on pre-capsicum.h systems Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Sun Sep 18 18:40:27 2016 (r305947) +++ head/usr.bin/soelim/soelim.c Sun Sep 18 18:49:18 2016 (r305948) @@ -27,7 +27,10 @@ #include __FBSDID("$FreeBSD$"); +#include +#if __FreeBSD_version > 1001510 #include +#endif #include #include @@ -159,9 +162,11 @@ main(int argc, char **argv) int ch, i, rootfd; int ret = 0; int flags = 0; - unsigned long cmd; char cwd[MAXPATHLEN]; +#if __FreeBSD_version > 1001510 + unsigned long cmd; cap_rights_t rights; +#endif includes = sl_init(); if (getcwd(cwd, sizeof(cwd)) != NULL) @@ -192,6 +197,10 @@ main(int argc, char **argv) argc -= optind; argv += optind; + rootfd = open("/", O_DIRECTORY | O_RDONLY); + if (rootfd == -1) + err(EXIT_FAILURE, "unable to open '/'"); +#if __FreeBSD_version > 1001510 cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_IOCTL); /* * EBADF in case stdin is closed by the caller @@ -204,9 +213,6 @@ main(int argc, char **argv) err(EXIT_FAILURE, "unable to limit rights for stdout"); if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights for stderr"); - rootfd = open("/", O_DIRECTORY | O_RDONLY); - if (rootfd == -1) - err(EXIT_FAILURE, "unable to open '/'"); cap_rights_init(&rights, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); if (cap_rights_limit(rootfd, &rights) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights"); @@ -221,6 +227,7 @@ main(int argc, char **argv) if (cap_enter() < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to enter capability mode"); +#endif if (argc == 0) ret = soelim_file(rootfd, stdin, flags); From owner-svn-src-all@freebsd.org Sun Sep 18 19:16:50 2016 Return-Path: Delivered-To: svn-src-all@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 36E2FBE05CF; Sun, 18 Sep 2016 19:16:50 +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 06482D15; Sun, 18 Sep 2016 19:16:49 +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 u8IJGn9S062424; Sun, 18 Sep 2016 19:16:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IJGnG2062423; Sun, 18 Sep 2016 19:16:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609181916.u8IJGnG2062423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 18 Sep 2016 19:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305949 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 19:16:50 -0000 Author: bapt Date: Sun Sep 18 19:16:48 2016 New Revision: 305949 URL: https://svnweb.freebsd.org/changeset/base/305949 Log: Simplify the fix for bootstrap tools building head is not supported from prior to stable/10 where sys/capsicum.h was named sys/capabilities.h Reported by: kib Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Sun Sep 18 18:49:18 2016 (r305948) +++ head/usr.bin/soelim/soelim.c Sun Sep 18 19:16:48 2016 (r305949) @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include #if __FreeBSD_version > 1001510 #include +#else +#include #endif #include @@ -163,10 +165,8 @@ main(int argc, char **argv) int ret = 0; int flags = 0; char cwd[MAXPATHLEN]; -#if __FreeBSD_version > 1001510 unsigned long cmd; cap_rights_t rights; -#endif includes = sl_init(); if (getcwd(cwd, sizeof(cwd)) != NULL) @@ -200,7 +200,6 @@ main(int argc, char **argv) rootfd = open("/", O_DIRECTORY | O_RDONLY); if (rootfd == -1) err(EXIT_FAILURE, "unable to open '/'"); -#if __FreeBSD_version > 1001510 cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_IOCTL); /* * EBADF in case stdin is closed by the caller @@ -227,7 +226,6 @@ main(int argc, char **argv) if (cap_enter() < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to enter capability mode"); -#endif if (argc == 0) ret = soelim_file(rootfd, stdin, flags); From owner-svn-src-all@freebsd.org Sun Sep 18 20:23:27 2016 Return-Path: Delivered-To: svn-src-all@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 8945CBDF390; Sun, 18 Sep 2016 20:23:27 +0000 (UTC) (envelope-from emaste@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 3FABEEB8; Sun, 18 Sep 2016 20:23:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8IKNQQX088731; Sun, 18 Sep 2016 20:23:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IKNQsD088730; Sun, 18 Sep 2016 20:23:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609182023.u8IKNQsD088730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 18 Sep 2016 20:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305951 - head/usr.bin/elfdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 20:23:27 -0000 Author: emaste Date: Sun Sep 18 20:23:26 2016 New Revision: 305951 URL: https://svnweb.freebsd.org/changeset/base/305951 Log: elfdump: adjust stdout/stderr capabilities stdio uses fstat and the TIOCGETA ioctl. Also collapse the cap_rights_limit and new cap_ioctls_limit calls into one if statement. Errors here are not actionable by the user and distinguishing stdout from stderr doesn't really have value. Reported by: kib Reviewed by: allanjude, bapt MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7944 Modified: head/usr.bin/elfdump/elfdump.c Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Sun Sep 18 20:00:17 2016 (r305950) +++ head/usr.bin/elfdump/elfdump.c Sun Sep 18 20:23:26 2016 (r305951) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define ED_DYN (1<<0) @@ -504,6 +505,7 @@ main(int ac, char **av) u_int64_t name; u_int64_t type; struct stat sb; + unsigned long cmd; u_int flags; Elf32_Ehdr *e; void *p; @@ -572,11 +574,13 @@ main(int ac, char **av) if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) err(1, "unable to limit rights for %s", *av); close(STDIN_FILENO); - cap_rights_init(&rights, CAP_WRITE); - if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stdout"); - if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stderr"); + cap_rights_init(&rights, CAP_FSTAT, CAP_IOCTL, CAP_WRITE); + cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ + if ((cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) || + (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) || + (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) || + (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS)) + err(1, "unable to limit rights for stdout/stderr"); if (cap_enter() < 0 && errno != ENOSYS) err(1, "unable to enter capability mode"); e = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); From owner-svn-src-all@freebsd.org Sun Sep 18 20:47:56 2016 Return-Path: Delivered-To: svn-src-all@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 6EC86BDFFB3; Sun, 18 Sep 2016 20:47:56 +0000 (UTC) (envelope-from ed@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 491061DB8; Sun, 18 Sep 2016 20:47:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8IKltko096684; Sun, 18 Sep 2016 20:47:55 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IKlt4J096682; Sun, 18 Sep 2016 20:47:55 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609182047.u8IKlt4J096682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 18 Sep 2016 20:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305952 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 20:47:56 -0000 Author: ed Date: Sun Sep 18 20:47:55 2016 New Revision: 305952 URL: https://svnweb.freebsd.org/changeset/base/305952 Log: Replace dirname(3) by a copy that complies to POSIX. It turns out that the path normalization that our brand new copy of dirname(3) does is actually not allowed by the draft version of the upcoming version of POSIX. It has to behave identically to the dirname(1) utility. This change replaces our new dirname(3) implementation by yet another version that doesn't implement the path normalization logic; it merely looks for the end of the directory name and overwrites that with a null byte. More details: See note #3370 at http://austingroupbugs.net/view.php?id=1073 PR: 212193 Reviewed by: emaste, jilles Differential Revision: https://reviews.freebsd.org/D7790 Modified: head/lib/libc/gen/dirname.3 head/lib/libc/gen/dirname.c Modified: head/lib/libc/gen/dirname.3 ============================================================================== --- head/lib/libc/gen/dirname.3 Sun Sep 18 20:23:26 2016 (r305951) +++ head/lib/libc/gen/dirname.3 Sun Sep 18 20:47:55 2016 (r305952) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2016 +.Dd September 5, 2016 .Dt DIRNAME 3 .Os .Sh NAME @@ -60,11 +60,6 @@ space instead. The advantage of the former approach is that it ensures thread-safety, while also placing no upper limit on the supported length of the pathname. -.Pp -The algorithm used by this implementation also discards redundant -slashes and -.Qq \&. -pathname components from the pathname string. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , Modified: head/lib/libc/gen/dirname.c ============================================================================== --- head/lib/libc/gen/dirname.c Sun Sep 18 20:23:26 2016 (r305951) +++ head/lib/libc/gen/dirname.c Sun Sep 18 20:47:55 2016 (r305952) @@ -27,64 +27,47 @@ __FBSDID("$FreeBSD$"); #include -#include #include char * (dirname)(char *path) { - const char *in, *prev, *begin, *end; - char *out; - size_t prevlen; - bool skipslash; + char *end; /* * If path is a null pointer or points to an empty string, * dirname() shall return a pointer to the string ".". */ if (path == NULL || *path == '\0') - return ((char *)"."); + return (__DECONST(char *, ".")); - /* Retain at least one leading slash character. */ - in = out = *path == '/' ? path + 1 : path; - - skipslash = true; - prev = "."; - prevlen = 1; - for (;;) { - /* Extract the next pathname component. */ - while (*in == '/') - ++in; - begin = in; - while (*in != '/' && *in != '\0') - ++in; - end = in; - if (begin == end) - break; - - /* - * Copy over the previous pathname component, except if - * it's dot. There is no point in retaining those. - */ - if (prevlen != 1 || *prev != '.') { - if (!skipslash) - *out++ = '/'; - skipslash = false; - memmove(out, prev, prevlen); - out += prevlen; - } - - /* Preserve the pathname component for the next iteration. */ - prev = begin; - prevlen = end - begin; - } + /* Find end of last pathname component. */ + end = path + strlen(path); + while (end > path + 1 && *(end - 1) == '/') + --end; + + /* Strip off the last pathname component. */ + while (end > path && *(end - 1) != '/') + --end; /* * If path does not contain a '/', then dirname() shall return a * pointer to the string ".". */ - if (out == path) - *out++ = '.'; - *out = '\0'; + if (end == path) { + path[0] = '.'; + path[1] = '\0'; + return (path); + } + + /* + * Remove trailing slashes from the resulting directory name. Ensure + * that at least one character remains. + */ + while (end > path + 1 && *(end - 1) == '/') + --end; + + /* Null terminate directory name and return it. */ + *end = '\0'; return (path); } From owner-svn-src-all@freebsd.org Sun Sep 18 21:28:10 2016 Return-Path: Delivered-To: svn-src-all@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 D6C61BE0997; Sun, 18 Sep 2016 21:28:10 +0000 (UTC) (envelope-from landonf@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 A5174791; Sun, 18 Sep 2016 21:28:10 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ILS9sQ011628; Sun, 18 Sep 2016 21:28:09 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ILS9dl011620; Sun, 18 Sep 2016 21:28:09 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201609182128.u8ILS9dl011620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Sun, 18 Sep 2016 21:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305953 - in head/sys: dev/bhnd mips/broadcom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 21:28:10 -0000 Author: landonf Date: Sun Sep 18 21:28:09 2016 New Revision: 305953 URL: https://svnweb.freebsd.org/changeset/base/305953 Log: Split bcm_mipscore.c into bcm_bmips (BMIPS32/BMIPS3300) and bcm_mips74k drivers. The BMIPS32/BMIPS3300 cores use a register layout distinct from the MIPS74K core, and are only found on siba(4) devices. Reviewed by: mizhka Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7791 Added: head/sys/mips/broadcom/bcm_bmips.c (contents, props changed) head/sys/mips/broadcom/bcm_bmips_exts.h - copied, changed from r305952, head/sys/mips/broadcom/bcm_mips_exts.h head/sys/mips/broadcom/bcm_bmipsreg.h (contents, props changed) head/sys/mips/broadcom/bcm_mips74k.c - copied, changed from r305952, head/sys/mips/broadcom/bcm_mipscore.c head/sys/mips/broadcom/bcm_mips74kreg.h - copied, changed from r305952, head/sys/mips/broadcom/bcm_mipscore.h Deleted: head/sys/mips/broadcom/bcm_mips_exts.h head/sys/mips/broadcom/bcm_mipscore.c head/sys/mips/broadcom/bcm_mipscore.h Modified: head/sys/dev/bhnd/bhnd_subr.c head/sys/mips/broadcom/bcm_machdep.c head/sys/mips/broadcom/files.broadcom Modified: head/sys/dev/bhnd/bhnd_subr.c ============================================================================== --- head/sys/dev/bhnd/bhnd_subr.c Sun Sep 18 20:47:55 2016 (r305952) +++ head/sys/dev/bhnd/bhnd_subr.c Sun Sep 18 21:28:09 2016 (r305953) @@ -68,7 +68,7 @@ static const struct bhnd_core_desc { BHND_CDESC(BCM, SRAM, RAM, "SRAM"), BHND_CDESC(BCM, SDRAM, RAM, "SDRAM"), BHND_CDESC(BCM, PCI, PCI, "PCI Bridge"), - BHND_CDESC(BCM, MIPS, CPU, "MIPS Core"), + BHND_CDESC(BCM, MIPS, CPU, "BMIPS CPU"), BHND_CDESC(BCM, ENET, ENET_MAC, "Fast Ethernet MAC"), BHND_CDESC(BCM, CODEC, OTHER, "V.90 Modem Codec"), BHND_CDESC(BCM, USB, USB_DUAL, "USB 1.1 Device/Host Controller"), @@ -85,7 +85,7 @@ static const struct bhnd_core_desc { BHND_CDESC(BCM, APHY, WLAN_PHY, "802.11a PHY"), BHND_CDESC(BCM, BPHY, WLAN_PHY, "802.11b PHY"), BHND_CDESC(BCM, GPHY, WLAN_PHY, "802.11g PHY"), - BHND_CDESC(BCM, MIPS33, CPU, "MIPS3302 Core"), + BHND_CDESC(BCM, MIPS33, CPU, "BMIPS33 CPU"), BHND_CDESC(BCM, USB11H, USB_HOST, "USB 1.1 Host Controller"), BHND_CDESC(BCM, USB11D, USB_DEV, "USB 1.1 Device Controller"), BHND_CDESC(BCM, USB20H, USB_HOST, "USB 2.0 Host Controller"), Added: head/sys/mips/broadcom/bcm_bmips.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/broadcom/bcm_bmips.c Sun Sep 18 21:28:09 2016 (r305953) @@ -0,0 +1,123 @@ +/*- + * Copyright (c) 2016 Landon Fuller + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "bcm_bmipsreg.h" + +/* + * BMIPS32 and BMIPS3300 core driver. + * + * These cores are only found on siba(4) chipsets, allowing + * us to assume the availability of siba interrupt registers. + */ + +static const struct bhnd_device bcm_bmips_devs[] = { + BHND_DEVICE(BCM, MIPS33, NULL, NULL, BHND_DF_SOC), + BHND_DEVICE_END +}; + +struct bcm_bmips_softc { + device_t dev; + struct resource *mem_res; + int mem_rid; +}; + +static int +bcm_bmips_probe(device_t dev) +{ + const struct bhnd_device *id; + + id = bhnd_device_lookup(dev, bcm_bmips_devs, + sizeof(bcm_bmips_devs[0])); + if (id == NULL) + return (ENXIO); + + bhnd_set_default_core_desc(dev); + return (BUS_PROBE_DEFAULT); +} + +static int +bcm_bmips_attach(device_t dev) +{ + struct bcm_bmips_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + + /* Allocate bus resources */ + sc->mem_rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + RF_ACTIVE); + if (sc->mem_res == NULL) + return (ENXIO); + + return (0); +} + +static int +bcm_bmips_detach(device_t dev) +{ + struct bcm_bmips_softc *sc; + + sc = device_get_softc(dev); + + bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem_res); + + return (0); +} + +static device_method_t bcm_bmips_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, bcm_bmips_probe), + DEVMETHOD(device_attach, bcm_bmips_attach), + DEVMETHOD(device_detach, bcm_bmips_detach), + + DEVMETHOD_END +}; + +static devclass_t bcm_mips_devclass; + +DEFINE_CLASS_0(bcm_mips, bcm_bmips_driver, bcm_bmips_methods, sizeof(struct bcm_bmips_softc)); +EARLY_DRIVER_MODULE(bcm_bmips, bhnd, bcm_bmips_driver, bcm_mips_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_EARLY); + +MODULE_VERSION(bcm_bmips, 1); +MODULE_DEPEND(bcm_bmips, bhnd, 1, 1, 1); Copied and modified: head/sys/mips/broadcom/bcm_bmips_exts.h (from r305952, head/sys/mips/broadcom/bcm_mips_exts.h) ============================================================================== --- head/sys/mips/broadcom/bcm_mips_exts.h Sun Sep 18 20:47:55 2016 (r305952, copy source) +++ head/sys/mips/broadcom/bcm_bmips_exts.h Sun Sep 18 21:28:09 2016 (r305953) @@ -52,8 +52,8 @@ * *********************************************************************/ -#ifndef _MIPS_BROADCOM_BCM_MIPS_EXTS_H_ -#define _MIPS_BROADCOM_BCM_MIPS_EXTS_H_ +#ifndef _MIPS_BROADCOM_BCM_BMIPS_EXTS_H_ +#define _MIPS_BROADCOM_BCM_BMIPS_EXTS_H_ #include @@ -62,15 +62,15 @@ * BMIPS330x MIPS32 core. */ -#define MIPS_COP_0_BCMCFG 22 +#define BMIPS_COP_0_BCMCFG 22 /* * Custom CP0 Accessors */ -#define BCM_MIPS_RW32_COP0_SEL(n,r,s) \ +#define BCM_BMIPS_RW32_COP0_SEL(n,r,s) \ static __inline uint32_t \ -bcm_mips_rd_ ## n(void) \ +bcm_bmips_rd_ ## n(void) \ { \ int v0; \ __asm __volatile ("mfc0 %[v0], $"__XSTRING(r)", "__XSTRING(s)";" \ @@ -79,7 +79,7 @@ bcm_mips_rd_ ## n(void) \ return (v0); \ } \ static __inline void \ -bcm_mips_wr_ ## n(uint32_t a0) \ +bcm_bmips_wr_ ## n(uint32_t a0) \ { \ __asm __volatile ("mtc0 %[a0], $"__XSTRING(r)", "__XSTRING(s)";" \ __XSTRING(COP0_SYNC)";" \ @@ -90,101 +90,101 @@ bcm_mips_wr_ ## n(uint32_t a0) \ mips_barrier(); \ } struct __hack -BCM_MIPS_RW32_COP0_SEL(pllcfg1, MIPS_COP_0_CONFIG, 1); -BCM_MIPS_RW32_COP0_SEL(pllcfg2, MIPS_COP_0_CONFIG, 2); -BCM_MIPS_RW32_COP0_SEL(clksync, MIPS_COP_0_CONFIG, 3); -BCM_MIPS_RW32_COP0_SEL(pllcfg3, MIPS_COP_0_CONFIG, 4); -BCM_MIPS_RW32_COP0_SEL(rstcfg, MIPS_COP_0_CONFIG, 5); +BCM_BMIPS_RW32_COP0_SEL(pllcfg1, MIPS_COP_0_CONFIG, 1); +BCM_BMIPS_RW32_COP0_SEL(pllcfg2, MIPS_COP_0_CONFIG, 2); +BCM_BMIPS_RW32_COP0_SEL(clksync, MIPS_COP_0_CONFIG, 3); +BCM_BMIPS_RW32_COP0_SEL(pllcfg3, MIPS_COP_0_CONFIG, 4); +BCM_BMIPS_RW32_COP0_SEL(rstcfg, MIPS_COP_0_CONFIG, 5); /* * Broadcom PLLConfig1 Register (22, select 1) */ /* SoftMIPSPLLCfg */ -#define MIPS_BCMCFG_PLLCFG1_MC_SHIFT 10 -#define MIPS_BCMCFG_PLLCFG1_MC_MASK 0xFFFFFC00 +#define BMIPS_BCMCFG_PLLCFG1_MC_SHIFT 10 +#define BMIPS_BCMCFG_PLLCFG1_MC_MASK 0xFFFFFC00 /* SoftISBPLLCfg */ -#define MIPS_BCMCFG_PLLCFG1_BC_SHIFT 5 -#define MIPS_BCMCFG_PLLCFG1_BC_MASK 0x000003E0 +#define BMIPS_BCMCFG_PLLCFG1_BC_SHIFT 5 +#define BMIPS_BCMCFG_PLLCFG1_BC_MASK 0x000003E0 /* SoftRefPLLCfg */ -#define MIPS_BCMCFG_PLLCFG1_PC_SHIFT 0 -#define MIPS_BCMCFG_PLLCFG1_PC_MASK 0x0000001F +#define BMIPS_BCMCFG_PLLCFG1_PC_SHIFT 0 +#define BMIPS_BCMCFG_PLLCFG1_PC_MASK 0x0000001F /* * Broadcom PLLConfig2 Register (22, select 2) */ /* Soft1to1ClkRatio */ -#define MIPS_BCMCFG_PLLCFG2_CR (1<<23) +#define BMIPS_BCMCFG_PLLCFG2_CR (1<<23) /* SoftUSBxPLLCfg */ -#define MIPS_BCMCFG_PLLCFG2_UC_SHIFT 15 -#define MIPS_BCMCFG_PLLCFG2_UC_MASK 0x007F8000 +#define BMIPS_BCMCFG_PLLCFG2_UC_SHIFT 15 +#define BMIPS_BCMCFG_PLLCFG2_UC_MASK 0x007F8000 /* SoftIDExPLLCfg */ -#define MIPS_BCMCFG_PLLCFG2_IC_SHIFT 7 -#define MIPS_BCMCFG_PLLCFG2_IC_MASK 0x00007F80 +#define BMIPS_BCMCFG_PLLCFG2_IC_SHIFT 7 +#define BMIPS_BCMCFG_PLLCFG2_IC_MASK 0x00007F80 -#define MIPS_BCMCFG_PLLCFG2_BE (1<<6) /* ISBxSoftCfgEnable */ -#define MIPS_BCMCFG_PLLCFG2_UE (1<<5) /* USBxSoftCfgEnable */ -#define MIPS_BCMCFG_PLLCFG2_IE (1<<4) /* IDExSoftCfgEnable */ -#define MIPS_BCMCFG_PLLCFG2_CA (1<<3) /* CfgActive */ -#define MIPS_BCMCFG_PLLCFG2_CF (1<<2) /* RefSoftCfgEnable */ -#define MIPS_BCMCFG_PLLCFG2_CI (1<<1) /* ISBSoftCfgEnable */ -#define MIPS_BCMCFG_PLLCFG2_CC (1<<0) /* MIPSSoftCfgEnable */ +#define BMIPS_BCMCFG_PLLCFG2_BE (1<<6) /* ISBxSoftCfgEnable */ +#define BMIPS_BCMCFG_PLLCFG2_UE (1<<5) /* USBxSoftCfgEnable */ +#define BMIPS_BCMCFG_PLLCFG2_IE (1<<4) /* IDExSoftCfgEnable */ +#define BMIPS_BCMCFG_PLLCFG2_CA (1<<3) /* CfgActive */ +#define BMIPS_BCMCFG_PLLCFG2_CF (1<<2) /* RefSoftCfgEnable */ +#define BMIPS_BCMCFG_PLLCFG2_CI (1<<1) /* ISBSoftCfgEnable */ +#define BMIPS_BCMCFG_PLLCFG2_CC (1<<0) /* MIPSSoftCfgEnable */ /* * Broadcom ClkSync Register (22, select 3) */ /* SoftClkCfgHigh */ -#define MIPS_BCMCFG_CLKSYNC_CH_SHIFT 16 -#define MIPS_BCMCFG_CLKSYNC_CH_MASK 0xFFFF0000 +#define BMIPS_BCMCFG_CLKSYNC_CH_SHIFT 16 +#define BMIPS_BCMCFG_CLKSYNC_CH_MASK 0xFFFF0000 /* SoftClkCfgLow */ -#define MIPS_BCMCFG_CLKSYNC_CL_SHIFT 0 -#define MIPS_BCMCFG_CLKSYNC_CL_MASK 0x0000FFFF +#define BMIPS_BCMCFG_CLKSYNC_CL_SHIFT 0 +#define BMIPS_BCMCFG_CLKSYNC_CL_MASK 0x0000FFFF /* * Broadcom ISBxPLLConfig3 Register (22, select 4) */ /* AsyncClkRatio */ -#define MIPS_BCMCFG_PLLCFG3_AR_SHIFT 23 -#define MIPS_BCMCFG_PLLCFG3_AR_MASK 0x01800000 +#define BMIPS_BCMCFG_PLLCFG3_AR_SHIFT 23 +#define BMIPS_BCMCFG_PLLCFG3_AR_MASK 0x01800000 -#define MIPS_BCMCFG_PLLCFG3_SM (1<<22) /* SyncMode */ +#define BMIPS_BCMCFG_PLLCFG3_SM (1<<22) /* SyncMode */ /* SoftISBxPLLCfg */ -#define MIPS_BCMCFG_PLLCFG3_IC_SHIFT 0 -#define MIPS_BCMCFG_PLLCFG3_IC_MASK 0x003FFFFF +#define BMIPS_BCMCFG_PLLCFG3_IC_SHIFT 0 +#define BMIPS_BCMCFG_PLLCFG3_IC_MASK 0x003FFFFF /* * Broadcom BRCMRstConfig Register (22, select 5) */ -#define MIPS_BCMCFG_RSTCFG_SR (1<<18) /* SSMR */ -#define MIPS_BCMCFG_RSTCFG_DT (1<<16) /* BHTD */ +#define BMIPS_BCMCFG_RSTCFG_SR (1<<18) /* SSMR */ +#define BMIPS_BCMCFG_RSTCFG_DT (1<<16) /* BHTD */ /* RStSt */ -#define MIPS_BCMCFG_RSTCFG_RS_SHIFT 8 -#define MIPS_BCMCFG_RSTCFG_RS_MASK 0x00001F00 -#define MIPS_BCMCFG_RST_OTHER 0x00 -#define MIPS_BCMCFG_RST_SH 0x01 -#define MIPS_BCMCFG_RST_SS 0x02 -#define MIPS_BCMCFG_RST_EJTAG 0x04 -#define MIPS_BCMCFG_RST_WDOG 0x08 -#define MIPS_BCMCFG_RST_CRC 0x10 +#define BMIPS_BCMCFG_RSTCFG_RS_SHIFT 8 +#define BMIPS_BCMCFG_RSTCFG_RS_MASK 0x00001F00 +#define BMIPS_BCMCFG_RST_OTHER 0x00 +#define BMIPS_BCMCFG_RST_SH 0x01 +#define BMIPS_BCMCFG_RST_SS 0x02 +#define BMIPS_BCMCFG_RST_EJTAG 0x04 +#define BMIPS_BCMCFG_RST_WDOG 0x08 +#define BMIPS_BCMCFG_RST_CRC 0x10 -#define MIPS_BCMCFG_RSTCFG_CR (1<<7) /* RStCr */ +#define BMIPS_BCMCFG_RSTCFG_CR (1<<7) /* RStCr */ /* WBMD */ -#define MIPS_BCMCFG_RSTCFG_WD_SHIFT 3 -#define MIPS_BCMCFG_RSTCFG_WD_MASK 0x00000078 +#define BMIPS_BCMCFG_RSTCFG_WD_SHIFT 3 +#define BMIPS_BCMCFG_RSTCFG_WD_MASK 0x00000078 -#define MIPS_BCMCFG_RSTCFG_SS (1<<2) /* SSR */ -#define MIPS_BCMCFG_RSTCFG_SH (1<<1) /* SHR */ -#define MIPS_BCMCFG_RSTCFG_BR (1<<0) /* BdR */ +#define BMIPS_BCMCFG_RSTCFG_SS (1<<2) /* SSR */ +#define BMIPS_BCMCFG_RSTCFG_SH (1<<1) /* SHR */ +#define BMIPS_BCMCFG_RSTCFG_BR (1<<0) /* BdR */ -#endif /* _MIPS_BROADCOM_BCM_MIPS_EXTS_H_ */ +#endif /* _MIPS_BROADCOM_BCM_BMIPS_EXTS_H_ */ Added: head/sys/mips/broadcom/bcm_bmipsreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/broadcom/bcm_bmipsreg.h Sun Sep 18 21:28:09 2016 (r305953) @@ -0,0 +1,73 @@ +/*- + * Copyright (c) 2016 Landon Fuller + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * $FreeBSD$ + */ + +#ifndef _MIPS_BROADCOM_BMIPSREG_H_ +#define _MIPS_BROADCOM_BMIPSREG_H_ + +/* + * Common BMIPS32/BMIPS3300 Registers + */ +#define BCM_BMIPS_CORECTL 0x00 /**< core control */ +#define BCM_BMIPS_CORECTL_FORCE_RST 0x01 /**< force reset */ +#define BCM_BMIPS_CORECTL_NO_FLSH_EXC 0x02 /**< flash exception disable */ +#define BCM_BMIPS_INTR_STATUS 0x20 /**< interrupt status */ +#define BCM_BMIPS_INTR_MASK 0x24 /**< interrupt mask */ +#define BCM_BMIPS_TIMER_INTMASK 0x01 /**< timer interrupt mask */ +#define BCM_BMIPS_TIMER_CTRL 0x28 /**< timer interval (?) */ + +/* + * Broadcom BMIPS32 (BHND_COREID_MIPS) + */ + +#define BCM_BMIPS32_CORECTL BCM_BMIPS_CORECTL +#define BCM_BMIPS32_BIST_STATUS 0x04 /**< built-in self-test status */ +#define BCM_BMIPS32_INTR_STATUS BCM_BMIPS_INTR_STATUS +#define BCM_BMIPS32_INTR_MASK BCM_BMIPS_INTR_MASK +#define BCM_BMIPS32_TIMER_CTRL BCM_BMIPS_TIMER_CTRL + +/* + * Broadcom BMIPS3300+ (BHND_COREID_MIPS33) + */ + +#define BCM_BMIPS33_CORECTL BCM_BMIPS_CORECTL +#define BCM_BMIPS33_BIST_CTRL 0x04 /**< build-in self-test control */ +#define BCM_BMIPS33_BIST_CTRL_DUMP 0x01 /**< BIST dump */ +#define BCM_BMIPS33_BIST_CTRL_DEBUG 0x02 /**< BIST debug */ +#define BCM_BMIPS33_BIST_CTRL_HOLD 0x04 /**< BIST hold */ +#define BCM_BMIPS33_BIST_STATUS 0x08 /**< built-in self-test status */ +#define BCM_BMIPS33_INTR_STATUS BCM_BMIPS_INTR_STATUS +#define BCM_BMIPS33_INTR_MASK BCM_BMIPS_INTR_MASK +#define BCM_BMIPS33_TIMER_CTRL BCM_BMIPS_TIMER_CTRL +#define BCM_BMIPS33_TEST_MUX_SEL 0x30 /**< test multiplexer select (?) */ +#define BCM_BMIPS33_TEST_MUX_EN 0x34 /**< test multiplexer enable (?) */ +#define BCM_BMIPS33_EJTAG_GPIO_EN 0x2C /**< ejtag gpio enable */ + +#endif /* _MIPS_BROADCOM_BMIPSREG_H_ */ Modified: head/sys/mips/broadcom/bcm_machdep.c ============================================================================== --- head/sys/mips/broadcom/bcm_machdep.c Sun Sep 18 20:47:55 2016 (r305952) +++ head/sys/mips/broadcom/bcm_machdep.c Sun Sep 18 21:28:09 2016 (r305953) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include "bcm_machdep.h" -#include "bcm_mips_exts.h" +#include "bcm_bmips_exts.h" #ifdef CFE #include @@ -436,7 +436,7 @@ platform_reset(void) bcm4785war = true; /* Switch to async mode */ - bcm_mips_wr_pllcfg3(MIPS_BCMCFG_PLLCFG3_SM); + bcm_bmips_wr_pllcfg3(BMIPS_BCMCFG_PLLCFG3_SM); } /* Set watchdog (PMU or ChipCommon) */ Copied and modified: head/sys/mips/broadcom/bcm_mips74k.c (from r305952, head/sys/mips/broadcom/bcm_mipscore.c) ============================================================================== --- head/sys/mips/broadcom/bcm_mipscore.c Sun Sep 18 20:47:55 2016 (r305952, copy source) +++ head/sys/mips/broadcom/bcm_mips74k.c Sun Sep 18 21:28:09 2016 (r305953) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2016 Michael Zhilin + * Copyright (c) 2016 Landon Fuller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,41 +35,40 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include -#include #include +#include #include #include -#include -#include -#include "bcm_mipscore.h" +#include "bcm_mips74kreg.h" -static const struct resource_spec mipscore_rspec[MIPSCORE_MAX_RSPEC] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, - { -1, -1, 0 } -}; - -#define MIPSCORE_DEV(_vendor, _core) \ - BHND_DEVICE(_vendor, _core, NULL, NULL, BHND_DF_SOC) +/* + * Broadcom MIPS74K Core + * + * These cores are only found on bcma(4) chipsets, allowing + * us to assume the availability of bcma interrupt registers. + */ -struct bhnd_device mipscore_match[] = { - MIPSCORE_DEV(BCM, MIPS), - MIPSCORE_DEV(BCM, MIPS33), - MIPSCORE_DEV(MIPS, MIPS74K), +static const struct bhnd_device bcm_mips74k_devs[] = { + BHND_DEVICE(MIPS, MIPS74K, NULL, NULL, BHND_DF_SOC), BHND_DEVICE_END }; +struct bcm_mips74k_softc { + device_t dev; + struct resource *mem_res; + int mem_rid; +}; + static int -mipscore_probe(device_t dev) +bcm_mips74k_probe(device_t dev) { - const struct bhnd_device *id; + const struct bhnd_device *id; - id = bhnd_device_lookup(dev, mipscore_match, sizeof(mipscore_match[0])); + id = bhnd_device_lookup(dev, bcm_mips74k_devs, + sizeof(bcm_mips74k_devs[0])); if (id == NULL) return (ENXIO); @@ -77,50 +77,51 @@ mipscore_probe(device_t dev) } static int -mipscore_attach(device_t dev) +bcm_mips74k_attach(device_t dev) { - struct mipscore_softc *sc; - struct resource *res; - uint32_t intmask; - uint16_t devid; - int error; + struct bcm_mips74k_softc *sc; sc = device_get_softc(dev); - devid = bhnd_get_device(dev); - - sc->devid = devid; sc->dev = dev; /* Allocate bus resources */ - memcpy(sc->rspec, mipscore_rspec, sizeof(sc->rspec)); - error = bhnd_alloc_resources(dev, sc->rspec, sc->res); - if (error) - return (error); - - res = sc->res[0]->res; - if (res == NULL) + sc->mem_rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + RF_ACTIVE); + if (sc->mem_res == NULL) return (ENXIO); - if (devid == BHND_COREID_MIPS74K) { - intmask = (1 << 31); - /* Use intmask5 register to route the timer interrupt */ - bus_write_4(res, offsetof(struct mipscore_regs, intmask[5]), - intmask); - } + /* Route MIPS timer to IRQ5 */ + bus_write_4(sc->mem_res, BCM_MIPS74K_INTR5_SEL, + (1<mem_rid, sc->mem_res); return (0); } -static device_method_t mipscore_methods[] = { - DEVMETHOD(device_probe, mipscore_probe), - DEVMETHOD(device_attach, mipscore_attach), - DEVMETHOD_END +static device_method_t bcm_mips74k_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, bcm_mips74k_probe), + DEVMETHOD(device_attach, bcm_mips74k_attach), + DEVMETHOD(device_detach, bcm_mips74k_detach), + + DEVMETHOD_END }; -devclass_t bhnd_mipscore_devclass; +static devclass_t bcm_mips_devclass; -DEFINE_CLASS_0(bhnd_mips, mipscore_driver, mipscore_methods, - sizeof(struct mipscore_softc)); -EARLY_DRIVER_MODULE(bhnd_mips, bhnd, mipscore_driver, - bhnd_mipscore_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_EARLY); -MODULE_VERSION(bhnd_mips, 1); +DEFINE_CLASS_0(bcm_mips, bcm_mips74k_driver, bcm_mips74k_methods, sizeof(struct bcm_mips74k_softc)); +EARLY_DRIVER_MODULE(bcm_mips74k, bhnd, bcm_mips74k_driver, bcm_mips_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_EARLY); +MODULE_VERSION(bcm_mips74k, 1); +MODULE_DEPEND(bcm_mips74k, bhnd, 1, 1, 1); Copied and modified: head/sys/mips/broadcom/bcm_mips74kreg.h (from r305952, head/sys/mips/broadcom/bcm_mipscore.h) ============================================================================== --- head/sys/mips/broadcom/bcm_mipscore.h Sun Sep 18 20:47:55 2016 (r305952, copy source) +++ head/sys/mips/broadcom/bcm_mips74kreg.h Sun Sep 18 21:28:09 2016 (r305953) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Michael Zhilin + * Copyright (c) 2016 Landon Fuller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,38 @@ * 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 DAMAGES. - * - * $FreeBSD$ + * + * $FreeBSD$ */ -#ifndef _BHND_CORES_MIPS_MIPSCOREVAR_H_ -#define _BHND_CORES_MIPS_MIPSCOREVAR_H_ +#ifndef _MIPS_BROADCOM_MIPS74KREG_H_ +#define _MIPS_BROADCOM_MIPS74KREG_H_ + +#define BCM_MIPS74K_CORECTL 0x00 /**< core control */ +#define BCM_MIPS74K_EXCBASE 0x04 /**< exception base */ + +#define BCM_MIPS74K_BIST_STATUS 0x0C /**< built-in self-test status */ +#define BCM_MIPS74K_INTR_STATUS 0x10 /**< interrupt status */ + +/* INTR(0-5)_MASK map bcma(4) OOB interrupt bus lines to MIPS hardware + * interrupts. */ +#define BCM_MIPS74K_INTR0_SEL 0x14 /**< IRQ0 OOBSEL mask */ +#define BCM_MIPS74K_INTR1_SEL 0x18 /**< IRQ1 OOBSEL mask */ +#define BCM_MIPS74K_INTR2_SEL 0x1C /**< IRQ2 OOBSEL mask */ +#define BCM_MIPS74K_INTR3_SEL 0x20 /**< IRQ3 OOBSEL mask */ +#define BCM_MIPS74K_INTR4_SEL 0x24 /**< IRQ4 OOBSEL mask */ +#define BCM_MIPS74K_INTR5_SEL 0x28 /**< IRQ5 OOBSEL mask */ + +#define BCM_MIPS74K_INTR_SEL(_intr) \ + (BCM_MIPS74K_INTR0_SEL + ((_intr) * 4)) + +#define BCM_MIPS74K_NMI_MASK 0x2C /**< nmi mask */ + +#define BCM_MIPS74K_GPIO_SEL 0x40 /**< gpio select */ +#define BCM_MIPS74K_GPIO_OUT 0x44 /**< gpio output enable */ +#define BCM_MIPS74K_GPIO_EN 0x48 /**< gpio enable */ -#define MIPSCORE_MAX_RSPEC 2 -struct mipscore_softc { - device_t dev; /* CPU device */ - uint32_t devid; - struct resource_spec rspec[MIPSCORE_MAX_RSPEC]; - struct bhnd_resource *res[MIPSCORE_MAX_RSPEC]; -}; - -struct mipscore_regs { - uint32_t corecontrol; - uint32_t exceptionbase; - uint32_t PAD1[1]; /* unmapped address */ - uint32_t biststatus; - uint32_t intstatus; - uint32_t intmask[6]; - uint32_t nmimask; - uint32_t PAD2[4]; /* unmapped addresses */ - uint32_t gpioselect; - uint32_t gpiooutput; - uint32_t gpioenable; - uint32_t PAD3[101]; /* unmapped addresses */ - uint32_t clkcontrolstatus; -}; +#define BCM_MIPS74K_TIMER_IVEC 31 /**< MIPS timer OOBSEL value */ -#endif /* _BHND_CORES_MIPS_MIPSCOREVAR_H_ */ +#endif /* _MIPS_BROADCOM_MIPS74KREG_H_ */ Modified: head/sys/mips/broadcom/files.broadcom ============================================================================== --- head/sys/mips/broadcom/files.broadcom Sun Sep 18 20:47:55 2016 (r305952) +++ head/sys/mips/broadcom/files.broadcom Sun Sep 18 21:28:09 2016 (r305953) @@ -5,6 +5,8 @@ # which are believed to be devices we have drivers for # which just need to be tweaked for attachment to an BHND system bus. mips/broadcom/bcm_machdep.c standard +mips/broadcom/bcm_bmips.c optional siba_nexus siba +mips/broadcom/bcm_mips74k.c optional bcma_nexus bcma mips/broadcom/bcm_pmu.c standard mips/mips/tick.c standard mips/mips/mips_pic.c standard @@ -15,7 +17,6 @@ kern/msi_if.m optional intrng mips/broadcom/uart_cpu_chipc.c optional uart mips/broadcom/uart_bus_chipc.c optional uart -mips/broadcom/bcm_mipscore.c standard # TODO: Replace with BCM47xx/57xx/etc-aware geom_map geom/geom_flashmap.c standard @@ -23,4 +24,4 @@ geom/geom_flashmap.c standard # USB bits dev/bhnd/cores/usb/bhnd_usb.c optional usb dev/bhnd/cores/usb/bhnd_ehci.c optional ehci -dev/bhnd/cores/usb/bhnd_ohci.c optional ohci \ No newline at end of file +dev/bhnd/cores/usb/bhnd_ohci.c optional ohci From owner-svn-src-all@freebsd.org Sun Sep 18 22:03:08 2016 Return-Path: Delivered-To: svn-src-all@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 DC4A4BDF31F; Sun, 18 Sep 2016 22:03:08 +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 A2423B37; Sun, 18 Sep 2016 22:03:08 +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 u8IM37ad026450; Sun, 18 Sep 2016 22:03:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IM37x6026446; Sun, 18 Sep 2016 22:03:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609182203.u8IM37x6026446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 22:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305954 - head/sys/compat/freebsd32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 22:03:09 -0000 Author: kib Date: Sun Sep 18 22:03:07 2016 New Revision: 305954 URL: https://svnweb.freebsd.org/changeset/base/305954 Log: Add compat32 support for capsicum. Reviewed by: bapt, emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D7942 Added: head/sys/compat/freebsd32/capabilities.conf - copied, changed from r305950, head/sys/kern/capabilities.conf Modified: head/sys/compat/freebsd32/Makefile head/sys/compat/freebsd32/freebsd32_capability.c head/sys/compat/freebsd32/syscalls.master Modified: head/sys/compat/freebsd32/Makefile ============================================================================== --- head/sys/compat/freebsd32/Makefile Sun Sep 18 21:28:09 2016 (r305953) +++ head/sys/compat/freebsd32/Makefile Sun Sep 18 22:03:07 2016 (r305954) @@ -8,7 +8,7 @@ all: sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ - ../../kern/makesyscalls.sh syscalls.master syscalls.conf + ../../kern/makesyscalls.sh syscalls.master syscalls.conf capabilities.conf sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf clean: Copied and modified: head/sys/compat/freebsd32/capabilities.conf (from r305950, head/sys/kern/capabilities.conf) ============================================================================== --- head/sys/kern/capabilities.conf Sun Sep 18 20:00:17 2016 (r305950, copy source) +++ head/sys/compat/freebsd32/capabilities.conf Sun Sep 18 22:03:07 2016 (r305954) @@ -1,10 +1,14 @@ ## ## Copyright (c) 2008-2010 Robert N. M. Watson +## Copyright (c) 2016 The FreeBSD Foundation ## All rights reserved. ## ## This software was developed at the University of Cambridge Computer ## Laboratory with support from a grant from Google, Inc. ## +## Portions of this software were developed by Konstantin Belousov +## under sponsorship from the FreeBSD Foundation. +## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: @@ -26,20 +30,14 @@ ## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## -## List of system calls enabled in capability mode, one name per line. -## -## Notes: -## - sys_exit(2), abort2(2) and close(2) are very important. -## - Sorted alphabetically, please keep it that way. +## List of system calls enabled in freebsd32 capability mode, one name +## per line. See the original list in the sys/kern/capabilities.conf. +## Position of the compat syscall in this file must be identical to +## the master, to facilitate comparision and diagnostic. ## ## $FreeBSD$ ## -## -## Allow ACL and MAC label operations by file descriptor, subject to -## capability rights. Allow MAC label operations on the current process but -## we will need to scope __mac_get_pid(2). -## __acl_aclcheck_fd __acl_delete_fd __acl_get_fd @@ -49,249 +47,82 @@ __mac_get_fd __mac_get_proc __mac_set_fd __mac_set_proc - -## -## Allow sysctl(2) as we scope internal to the call; this is a global -## namespace, but there are several critical sysctls required for almost -## anything to run, such as hw.pagesize. For now that policy lives in the -## kernel for performance and simplicity, but perhaps it could move to a -## proxying daemon in userspace. -## -__sysctl - -## -## Allow umtx operations as these are scoped by address space. -## -## XXRW: Need to check this very carefully. -## -_umtx_op - -## -## Allow process termination using abort2(2). -## +freebsd32_sysctl +freebsd32_umtx_op abort2 - -## -## Allow accept(2) since it doesn't manipulate namespaces directly, rather -## relies on existing bindings on a socket, subject to capability rights. -## accept accept4 - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## aio_cancel -aio_error +freebsd32_aio_error aio_fsync -aio_read -aio_return -aio_suspend -aio_waitcomplete -aio_write - -## -## audit(2) is a global operation, submitting to the global trail, but it is -## controlled by privilege, and it might be useful to be able to submit -## records from sandboxes. For now, disallow, but we may want to think about -## providing some sort of proxy service for this. -## +freebsd32_aio_read +freebsd32_aio_return +freebsd32_aio_suspend +freebsd32_aio_waitcomplete +freebsd32_aio_write #audit - -## -## Allow bindat(2). -## bindat - -## -## Allow capability mode and capability system calls. -## cap_enter cap_fcntls_get cap_fcntls_limit cap_getmode -cap_ioctls_get -cap_ioctls_limit +freebsd32_cap_ioctls_get +freebsd32_cap_ioctls_limit __cap_rights_get cap_rights_limit - -## -## Allow read-only clock operations. -## -clock_getres -clock_gettime - -## -## Always allow file descriptor close(2). -## +freebsd32_clock_getres +freebsd32_clock_gettime close closefrom - -## -## Allow connectat(2). -## connectat - -## -## cpuset(2) and related calls require scoping by process, but should -## eventually be allowed, at least in the current process case. -## #cpuset -#cpuset_getaffinity -#cpuset_getid -#cpuset_setaffinity -#cpuset_setid - -## -## Always allow dup(2) and dup2(2) manipulation of the file descriptor table. -## +#freebsd32_cpuset_getaffinity +#freebsd32_cpuset_getid +#freebsd32_cpuset_setaffinity +#freebsd32_cpuset_setid dup dup2 - -## -## Allow extended attribute operations by file descriptor, subject to -## capability rights. -## extattr_delete_fd extattr_get_fd extattr_list_fd extattr_set_fd - -## -## Allow changing file flags, mode, and owner by file descriptor, subject to -## capability rights. -## fchflags fchmod fchown - -## -## For now, allow fcntl(2), subject to capability rights, but this probably -## needs additional scoping. -## -fcntl - -## -## Allow fexecve(2), subject to capability rights. We perform some scoping, -## such as disallowing privilege escalation. -## -fexecve - -## -## Allow flock(2), subject to capability rights. -## +freebsd32_fcntl +freebsd32_fexecve flock - -## -## Allow fork(2), even though it returns pids -- some applications seem to -## prefer this interface. -## fork - -## -## Allow fpathconf(2), subject to capability rights. -## fpathconf - -## -## Allow various file descriptor-based I/O operations, subject to capability -## rights. -## -freebsd6_ftruncate -freebsd6_lseek -freebsd6_mmap -freebsd6_pread -freebsd6_pwrite - -## -## Allow querying file and file system state with fstat(2) and fstatfs(2), -## subject to capability rights. -## -fstat +freebsd6_freebsd32_ftruncate +freebsd6_freebsd32_lseek +freebsd6_freebsd32_mmap +freebsd6_freebsd32_pread +freebsd6_freebsd32_pwrite +freebsd32_fstat fstatfs - -## -## Allow further file descriptor-based I/O operations, subject to capability -## rights. -## fsync ftruncate - -## -## Allow futimens(2) and futimes(2), subject to capability rights. -## -futimens -futimes - -## -## Allow querying process audit state, subject to normal access control. -## +freebsd32_futimens +freebsd32_futimes getaudit getaudit_addr getauid - -## -## Allow thread context management with getcontext(2). -## -getcontext - -## -## Allow directory I/O on a file descriptor, subject to capability rights. -## Originally we had separate capabilities for directory-specific read -## operations, but on BSD we allow reading the raw directory data, so we just -## rely on CAP_READ now. -## +freebsd32_getcontext getdents -getdirentries - -## -## Allow querying certain trivial global state. -## +freebsd32_getdirentries getdomainname - -## -## Allow querying certain per-process resource limit state. -## getdtablesize - -## -## Allow querying current process credential state. -## getegid geteuid - -## -## Allow querying certain trivial global state. -## gethostid gethostname - -## -## Allow querying per-process timer. -## -getitimer - -## -## Allow querying current process credential state. -## +freebsd32_getitimer getgid getgroups getlogin - -## -## Allow querying certain trivial global state. -## -getpagesize +freebsd32_getpagesize getpeername - -## -## Allow querying certain per-process scheduling, resource limit, and -## credential state. -## -## XXXRW: getpgid(2) needs scoping. It's not clear if it's worth scoping -## getppid(2). getpriority(2) needs scoping. getrusage(2) needs scoping. -## getsid(2) needs scoping. -## getpgid getpgrp getpid @@ -300,154 +131,53 @@ getpriority getresgid getresuid getrlimit -getrusage +freebsd32_getrusage getsid - -## -## Allow querying socket state, subject to capability rights. -## -## XXXRW: getsockopt(2) may need more attention. -## getsockname getsockopt - -## -## Allow querying the global clock. -## -gettimeofday - -## -## Allow querying current process credential state. -## +freebsd32_gettimeofday getuid - -## -## Allow ioctl(2), which hopefully will be limited by applications only to -## required commands with cap_ioctls_limit(2) syscall. -## -ioctl - -## -## Allow querying current process credential state. -## +freebsd32_ioctl issetugid - -## -## Allow kevent(2), as we will authorize based on capability rights on the -## target descriptor. -## -kevent - -## -## Allow kill(2), as we allow the process to send signals only to himself. -## +freebsd32_kevent kill - -## -## Allow message queue operations on file descriptors, subject to capability -## rights. -## -kmq_notify -kmq_setattr -kmq_timedreceive -kmq_timedsend - -## -## Allow kqueue(2), we will control use. -## +freebsd32_kmq_notify +freebsd32_kmq_setattr +freebsd32_kmq_timedreceive +freebsd32_kmq_timedsend kqueue - -## -## Allow managing per-process timers. -## -ktimer_create +freebsd32_ktimer_create ktimer_delete ktimer_getoverrun -ktimer_gettime -ktimer_settime - -## -## We can't allow ktrace(2) because it relies on a global namespace, but we -## might want to introduce an fktrace(2) of some sort. -## +freebsd32_ktimer_gettime +freebsd32_ktimer_settime #ktrace - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## -lio_listio - -## -## Allow listen(2), subject to capability rights. -## -## XXXRW: One might argue this manipulates a global namespace. -## +freebsd32_lio_listio listen - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -lseek - -## -## Allow simple VM operations on the current process. -## +freebsd32_lseek madvise mincore minherit mlock mlockall - -## -## Allow memory mapping a file descriptor, and updating protections, subject -## to capability rights. -## -mmap -mprotect - -## -## Allow simple VM operations on the current process. -## +freebsd32_mmap +freebsd32_mprotect msync munlock munlockall munmap - -## -## Allow the current process to sleep. -## -nanosleep - -## -## Allow querying the global clock. -## +freebsd32_nanosleep ntp_gettime - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## -oaio_read -oaio_write - -## -## Allow simple VM operations on the current process. -## +freebsd6_freebsd32_aio_read +freebsd6_freebsd32_aio_write obreak - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## -olio_listio - -## -## Operations relative to directory capabilities. -## +freebsd6_freebsd32_lio_listio chflagsat faccessat fchmodat fchownat -fstatat -futimesat +freebsd32_fstatat +freebsd32_futimesat linkat mkdirat mkfifoat @@ -457,290 +187,98 @@ readlinkat renameat symlinkat unlinkat -utimensat - -## -## Allow entry into open(2). This system call will fail, since access to the -## global file namespace has been disallowed, but allowing entry into the -## syscall means that an audit trail will be generated (which is also very -## useful for debugging). -## +freebsd32_utimensat open - -## -## Process descriptor-related system calls are allowed. -## pdfork pdgetpid pdkill #pdwait4 # not yet implemented - -## -## Allow pipe(2). -## -pipe +freebsd32_pipe pipe2 - -## -## Allow poll(2), which will be scoped by capability rights. -## XXXRW: We don't yet do that scoping. -## poll - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -pread -preadv - -## -## Allow access to profiling state on the current process. -## +freebsd32_pread +freebsd32_preadv profil - -## -## Disallow ptrace(2) for now, but we do need debugging facilities in -## capability mode, so we will want to revisit this, possibly by scoping its -## operation. -## #ptrace - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -pwrite -pwritev +freebsd32_pwrite +freebsd32_pwritev read -readv -recv -recvfrom -recvmsg - -## -## Allow real-time scheduling primitives to be used. -## -## XXXRW: These require scoping. -## +freebsd32_readv +freebsd6_freebsd32_recv +freebsd32_recvfrom +freebsd32_recvmsg rtprio rtprio_thread - -## -## Allow simple VM operations on the current process. -## sbrk - -## -## Allow querying trivial global scheduler state. -## sched_get_priority_max sched_get_priority_min - -## -## Allow various thread/process scheduler operations. -## -## XXXRW: Some of these require further scoping. -## sched_getparam sched_getscheduler sched_rr_get_interval sched_setparam sched_setscheduler sched_yield - -## -## Allow I/O-related file descriptors, subject to capability rights. -## sctp_generic_recvmsg sctp_generic_sendmsg sctp_generic_sendmsg_iov sctp_peeloff - -## -## Allow pselect(2) and select(2), which will be scoped by capability rights. -## -## XXXRW: But is it? -## -pselect -select - -## -## Allow I/O-related file descriptors, subject to capability rights. Use of -## explicit addresses here is restricted by the system calls themselves. -## -send -sendfile -sendmsg +freebsd32_pselect +freebsd32_select +freebsd6_freebsd32_send +freebsd32_sendfile +freebsd32_sendmsg sendto - -## -## Allow setting per-process audit state, which is controlled separately by -## privileges. -## setaudit setaudit_addr setauid - -## -## Allow setting thread context. -## -setcontext - -## -## Allow setting current process credential state, which is controlled -## separately by privilege. -## +freebsd32_setcontext setegid seteuid setgid - -## -## Allow use of the process interval timer. -## -setitimer - -## -## Allow setpriority(2). -## -## XXXRW: Requires scoping. -## +freebsd32_setitimer setpriority - -## -## Allow setting current process credential state, which is controlled -## separately by privilege. -## setregid setresgid setresuid setreuid - -## -## Allow setting process resource limits with setrlimit(2). -## setrlimit - -## -## Allow creating a new session with setsid(2). -## setsid - -## -## Allow setting socket options with setsockopt(2), subject to capability -## rights. -## -## XXXRW: Might require scoping. -## setsockopt - -## -## Allow setting current process credential state, which is controlled -## separately by privilege. -## setuid - -## -## shm_open(2) is scoped so as to allow only access to new anonymous objects. -## shm_open - -## -## Allow I/O-related file descriptors, subject to capability rights. -## shutdown - -## -## Allow signal control on current process. -## -sigaction -sigaltstack -sigblock -sigpending +freebsd32_sigaction +freebsd32_sigaltstack +freebsd32_sigblock +freebsd32_sigpending sigprocmask sigqueue -sigreturn -sigsetmask -sigstack +freebsd32_sigreturn +freebsd32_sigsetmask +ofreebsd32_sigstack sigsuspend -sigtimedwait -sigvec -sigwaitinfo +freebsd32_sigtimedwait +freebsd32_sigvec +freebsd32_sigwaitinfo sigwait - -## -## Allow creating new socket pairs with socket(2) and socketpair(2). -## socket socketpair - -## -## Allow simple VM operations on the current process. -## -## XXXRW: Kernel doesn't implement this, so drop? -## sstk - -## -## Do allow sync(2) for now, but possibly shouldn't. -## sync - -## -## Always allow process termination with sys_exit(2). -## sys_exit - -## -## sysarch(2) does rather diverse things, but is required on at least i386 -## in order to configure per-thread data. As such, it's scoped on each -## architecture. -## -sysarch - -## -## Allow thread operations operating only on current process. -## +freebsd32_sysarch thr_create thr_exit thr_kill - -## -## Disallow thr_kill2(2), as it may operate beyond the current process. -## -## XXXRW: Requires scoping. -## #thr_kill2 - -## -## Allow thread operations operating only on current process. -## -thr_new +freebsd32_thr_new thr_self thr_set_name -thr_suspend +freebsd32_thr_suspend thr_wake - -## -## Allow manipulation of the current process umask with umask(2). -## umask - -## -## Allow submitting of process trace entries with utrace(2). -## utrace - -## -## Allow generating UUIDs with uuidgen(2). -## uuidgen - -## -## Allow I/O-related file descriptors, subject to capability rights. -## write -writev - -## -## Allow processes to yield(2). -## +freebsd32_writev yield Modified: head/sys/compat/freebsd32/freebsd32_capability.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_capability.c Sun Sep 18 21:28:09 2016 (r305953) +++ head/sys/compat/freebsd32/freebsd32_capability.c Sun Sep 18 22:03:07 2016 (r305954) @@ -49,18 +49,6 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_FILECAPS); int -freebsd32_cap_enter(struct thread *td, - struct freebsd32_cap_enter_args *uap) -{ - - /* - * We do not have an equivalent of capabilities.conf for freebsd32 - * compatibility, so do not allow capability mode for now. - */ - return (ENOSYS); -} - -int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { @@ -148,14 +136,6 @@ out: #else /* !CAPABILITIES */ int -freebsd32_cap_enter(struct thread *td, - struct freebsd32_cap_enter_args *uap) -{ - - return (ENOSYS); -} - -int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Sun Sep 18 21:28:09 2016 (r305953) +++ head/sys/compat/freebsd32/syscalls.master Sun Sep 18 22:03:07 2016 (r305954) @@ -974,7 +974,7 @@ 514 AUE_NULL OBSOL cap_new 515 AUE_CAP_RIGHTS_GET NOPROTO { int __cap_rights_get(int version, \ int fd, cap_rights_t *rightsp); } -516 AUE_CAP_ENTER STD { int freebsd32_cap_enter(void); } +516 AUE_CAP_ENTER NOPROTO { int cap_enter(void); } 517 AUE_CAP_GETMODE NOPROTO { int cap_getmode(u_int *modep); } 518 AUE_PDFORK NOPROTO { int pdfork(int *fdp, int flags); } 519 AUE_PDKILL NOPROTO { int pdkill(int fd, int signum); } From owner-svn-src-all@freebsd.org Sun Sep 18 22:03:28 2016 Return-Path: Delivered-To: svn-src-all@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 53C2EBDF36F; Sun, 18 Sep 2016 22:03:28 +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 D364DCA7; Sun, 18 Sep 2016 22:03:27 +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 u8IM3RK6026507; Sun, 18 Sep 2016 22:03:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IM3QEG026502; Sun, 18 Sep 2016 22:03:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609182203.u8IM3QEG026502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 22:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305955 - head/sys/compat/freebsd32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 22:03:28 -0000 Author: kib Date: Sun Sep 18 22:03:26 2016 New Revision: 305955 URL: https://svnweb.freebsd.org/changeset/base/305955 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Sun Sep 18 22:03:07 2016 (r305954) +++ head/sys/compat/freebsd32/freebsd32_proto.h Sun Sep 18 22:03:26 2016 (r305955) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 304395 2016-08-18 10:50:40Z gnn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 305954 2016-09-18 22:03:07Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -578,9 +578,6 @@ struct freebsd32_shmctl_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char buf_l_[PADL_(struct shmid_ds32 *)]; struct shmid_ds32 * buf; char buf_r_[PADR_(struct shmid_ds32 *)]; }; -struct freebsd32_cap_enter_args { - register_t dummy; -}; struct freebsd32_pselect_args { char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)]; @@ -798,7 +795,6 @@ int freebsd32_jail_set(struct thread *, int freebsd32_semctl(struct thread *, struct freebsd32_semctl_args *); int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); -int freebsd32_cap_enter(struct thread *, struct freebsd32_cap_enter_args *); int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); #ifdef PAD64_REQUIRED int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); @@ -1258,7 +1254,6 @@ int freebsd10_freebsd32_pipe(struct thre #define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL #define FREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL #define FREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL -#define FREEBSD32_SYS_AUE_freebsd32_cap_enter AUE_CAP_ENTER #define FREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT #define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Sun Sep 18 22:03:07 2016 (r305954) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Sun Sep 18 22:03:26 2016 (r305955) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 304395 2016-08-18 10:50:40Z gnn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 305954 2016-09-18 22:03:07Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -420,7 +420,7 @@ #define FREEBSD32_SYS_lpathconf 513 /* 514 is obsolete cap_new */ #define FREEBSD32_SYS___cap_rights_get 515 -#define FREEBSD32_SYS_freebsd32_cap_enter 516 +#define FREEBSD32_SYS_cap_enter 516 #define FREEBSD32_SYS_cap_getmode 517 #define FREEBSD32_SYS_pdfork 518 #define FREEBSD32_SYS_pdkill 519 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Sep 18 22:03:07 2016 (r305954) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Sep 18 22:03:26 2016 (r305955) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 304395 2016-08-18 10:50:40Z gnn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 305954 2016-09-18 22:03:07Z kib */ const char *freebsd32_syscallnames[] = { @@ -539,7 +539,7 @@ const char *freebsd32_syscallnames[] = { "lpathconf", /* 513 = lpathconf */ "obs_cap_new", /* 514 = obsolete cap_new */ "__cap_rights_get", /* 515 = __cap_rights_get */ - "freebsd32_cap_enter", /* 516 = freebsd32_cap_enter */ + "cap_enter", /* 516 = cap_enter */ "cap_getmode", /* 517 = cap_getmode */ "pdfork", /* 518 = pdfork */ "pdkill", /* 519 = pdkill */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Sun Sep 18 22:03:07 2016 (r305954) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Sun Sep 18 22:03:26 2016 (r305955) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 304395 2016-08-18 10:50:40Z gnn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 305954 2016-09-18 22:03:07Z kib */ #include "opt_compat.h" @@ -54,12 +54,12 @@ struct sysent freebsd32_sysent[] = { #define PAD64_REQUIRED #endif { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 0 = syscall */ - { AS(sys_exit_args), (sy_call_t *)sys_sys_exit, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 1 = exit */ - { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 2 = fork */ - { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, 0, SY_THR_STATIC }, /* 3 = read */ - { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 4 = write */ - { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = open */ - { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 6 = close */ + { AS(sys_exit_args), (sy_call_t *)sys_sys_exit, AUE_EXIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 1 = exit */ + { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = fork */ + { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ + { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ + { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ + { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ { AS(freebsd32_wait4_args), (sy_call_t *)freebsd32_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = freebsd32_wait4 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 8 = obsolete old creat */ { AS(link_args), (sy_call_t *)sys_link, AUE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 9 = link */ @@ -70,125 +70,125 @@ struct sysent freebsd32_sysent[] = { { AS(mknod_args), (sy_call_t *)sys_mknod, AUE_MKNOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 14 = mknod */ { AS(chmod_args), (sy_call_t *)sys_chmod, AUE_CHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)sys_chown, AUE_CHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 16 = chown */ - { AS(obreak_args), (sy_call_t *)sys_obreak, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 17 = break */ + { AS(obreak_args), (sy_call_t *)sys_obreak, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 17 = break */ { compat4(AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 18 = freebsd4 freebsd32_getfsstat */ - { compat(AS(ofreebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 19 = old freebsd32_lseek */ - { 0, (sy_call_t *)sys_getpid, AUE_GETPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 20 = getpid */ + { compat(AS(ofreebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 19 = old freebsd32_lseek */ + { 0, (sy_call_t *)sys_getpid, AUE_GETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 20 = getpid */ { AS(mount_args), (sy_call_t *)sys_mount, AUE_MOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 21 = mount */ { AS(unmount_args), (sy_call_t *)sys_unmount, AUE_UMOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 22 = unmount */ - { AS(setuid_args), (sy_call_t *)sys_setuid, AUE_SETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 23 = setuid */ - { 0, (sy_call_t *)sys_getuid, AUE_GETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 24 = getuid */ - { 0, (sy_call_t *)sys_geteuid, AUE_GETEUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 25 = geteuid */ + { AS(setuid_args), (sy_call_t *)sys_setuid, AUE_SETUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 23 = setuid */ + { 0, (sy_call_t *)sys_getuid, AUE_GETUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 24 = getuid */ + { 0, (sy_call_t *)sys_geteuid, AUE_GETEUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 25 = geteuid */ { AS(ptrace_args), (sy_call_t *)sys_ptrace, AUE_PTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 26 = ptrace */ - { AS(freebsd32_recvmsg_args), (sy_call_t *)freebsd32_recvmsg, AUE_RECVMSG, NULL, 0, 0, 0, SY_THR_STATIC }, /* 27 = freebsd32_recvmsg */ - { AS(freebsd32_sendmsg_args), (sy_call_t *)freebsd32_sendmsg, AUE_SENDMSG, NULL, 0, 0, 0, SY_THR_STATIC }, /* 28 = freebsd32_sendmsg */ - { AS(freebsd32_recvfrom_args), (sy_call_t *)freebsd32_recvfrom, AUE_RECVFROM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 29 = freebsd32_recvfrom */ - { AS(accept_args), (sy_call_t *)sys_accept, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 30 = accept */ - { AS(getpeername_args), (sy_call_t *)sys_getpeername, AUE_GETPEERNAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 31 = getpeername */ - { AS(getsockname_args), (sy_call_t *)sys_getsockname, AUE_GETSOCKNAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 32 = getsockname */ + { AS(freebsd32_recvmsg_args), (sy_call_t *)freebsd32_recvmsg, AUE_RECVMSG, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 27 = freebsd32_recvmsg */ + { AS(freebsd32_sendmsg_args), (sy_call_t *)freebsd32_sendmsg, AUE_SENDMSG, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 28 = freebsd32_sendmsg */ + { AS(freebsd32_recvfrom_args), (sy_call_t *)freebsd32_recvfrom, AUE_RECVFROM, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 29 = freebsd32_recvfrom */ + { AS(accept_args), (sy_call_t *)sys_accept, AUE_ACCEPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 30 = accept */ + { AS(getpeername_args), (sy_call_t *)sys_getpeername, AUE_GETPEERNAME, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 31 = getpeername */ + { AS(getsockname_args), (sy_call_t *)sys_getsockname, AUE_GETSOCKNAME, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 32 = getsockname */ { AS(access_args), (sy_call_t *)sys_access, AUE_ACCESS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 33 = access */ { AS(chflags_args), (sy_call_t *)sys_chflags, AUE_CHFLAGS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 34 = chflags */ - { AS(fchflags_args), (sy_call_t *)sys_fchflags, AUE_FCHFLAGS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 35 = fchflags */ - { 0, (sy_call_t *)sys_sync, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 36 = sync */ - { AS(kill_args), (sy_call_t *)sys_kill, AUE_KILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 37 = kill */ + { AS(fchflags_args), (sy_call_t *)sys_fchflags, AUE_FCHFLAGS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 35 = fchflags */ + { 0, (sy_call_t *)sys_sync, AUE_SYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 36 = sync */ + { AS(kill_args), (sy_call_t *)sys_kill, AUE_KILL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 37 = kill */ { compat(AS(ofreebsd32_stat_args),freebsd32_stat), AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 38 = old freebsd32_stat */ - { 0, (sy_call_t *)sys_getppid, AUE_GETPPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 39 = getppid */ + { 0, (sy_call_t *)sys_getppid, AUE_GETPPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = getppid */ { compat(AS(ofreebsd32_lstat_args),freebsd32_lstat), AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 40 = old freebsd32_lstat */ - { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 41 = dup */ - { compat10(0,freebsd32_pipe), AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = freebsd10 freebsd32_pipe */ - { 0, (sy_call_t *)sys_getegid, AUE_GETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 43 = getegid */ - { AS(profil_args), (sy_call_t *)sys_profil, AUE_PROFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 44 = profil */ + { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = dup */ + { compat10(0,freebsd32_pipe), AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = freebsd10 freebsd32_pipe */ + { 0, (sy_call_t *)sys_getegid, AUE_GETEGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = getegid */ + { AS(profil_args), (sy_call_t *)sys_profil, AUE_PROFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = profil */ { AS(ktrace_args), (sy_call_t *)sys_ktrace, AUE_KTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 45 = ktrace */ - { compat(AS(ofreebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, 0, SY_THR_STATIC }, /* 46 = old freebsd32_sigaction */ - { 0, (sy_call_t *)sys_getgid, AUE_GETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 47 = getgid */ + { compat(AS(ofreebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = old freebsd32_sigaction */ + { 0, (sy_call_t *)sys_getgid, AUE_GETGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = getgid */ { compat(AS(ofreebsd32_sigprocmask_args),freebsd32_sigprocmask), AUE_SIGPROCMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 48 = old freebsd32_sigprocmask */ - { AS(getlogin_args), (sy_call_t *)sys_getlogin, AUE_GETLOGIN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 49 = getlogin */ + { AS(getlogin_args), (sy_call_t *)sys_getlogin, AUE_GETLOGIN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = getlogin */ { AS(setlogin_args), (sy_call_t *)sys_setlogin, AUE_SETLOGIN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 50 = setlogin */ { AS(acct_args), (sy_call_t *)sys_acct, AUE_ACCT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 51 = acct */ - { compat(0,freebsd32_sigpending), AUE_SIGPENDING, NULL, 0, 0, 0, SY_THR_STATIC }, /* 52 = old freebsd32_sigpending */ - { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGALTSTACK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 53 = freebsd32_sigaltstack */ - { AS(freebsd32_ioctl_args), (sy_call_t *)freebsd32_ioctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 54 = freebsd32_ioctl */ + { compat(0,freebsd32_sigpending), AUE_SIGPENDING, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 52 = old freebsd32_sigpending */ + { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGALTSTACK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 53 = freebsd32_sigaltstack */ + { AS(freebsd32_ioctl_args), (sy_call_t *)freebsd32_ioctl, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 54 = freebsd32_ioctl */ { AS(reboot_args), (sy_call_t *)sys_reboot, AUE_REBOOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 55 = reboot */ { AS(revoke_args), (sy_call_t *)sys_revoke, AUE_REVOKE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 56 = revoke */ { AS(symlink_args), (sy_call_t *)sys_symlink, AUE_SYMLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 57 = symlink */ { AS(readlink_args), (sy_call_t *)sys_readlink, AUE_READLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 58 = readlink */ { AS(freebsd32_execve_args), (sy_call_t *)freebsd32_execve, AUE_EXECVE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 59 = freebsd32_execve */ - { AS(umask_args), (sy_call_t *)sys_umask, AUE_UMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 60 = umask */ + { AS(umask_args), (sy_call_t *)sys_umask, AUE_UMASK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 60 = umask */ { AS(chroot_args), (sy_call_t *)sys_chroot, AUE_CHROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 61 = chroot */ - { compat(AS(ofreebsd32_fstat_args),freebsd32_fstat), AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 62 = old freebsd32_fstat */ + { compat(AS(ofreebsd32_fstat_args),freebsd32_fstat), AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 62 = old freebsd32_fstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 63 = obsolete ogetkerninfo */ - { compat(AS(ofreebsd32_getpagesize_args),freebsd32_getpagesize), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 64 = old freebsd32_getpagesize */ - { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 65 = msync */ + { compat(AS(ofreebsd32_getpagesize_args),freebsd32_getpagesize), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 64 = old freebsd32_getpagesize */ + { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 65 = msync */ { 0, (sy_call_t *)sys_vfork, AUE_VFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 66 = vfork */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 67 = obsolete vread */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 68 = obsolete vwrite */ - { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 69 = sbrk */ - { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 70 = sstk */ + { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 69 = sbrk */ + { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 70 = sstk */ { compat(AS(ommap_args),mmap), AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 71 = old mmap */ { AS(ovadvise_args), (sy_call_t *)sys_ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = vadvise */ - { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 73 = munmap */ - { AS(freebsd32_mprotect_args), (sy_call_t *)freebsd32_mprotect, AUE_MPROTECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 74 = freebsd32_mprotect */ - { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 75 = madvise */ + { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 73 = munmap */ + { AS(freebsd32_mprotect_args), (sy_call_t *)freebsd32_mprotect, AUE_MPROTECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 74 = freebsd32_mprotect */ + { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 75 = madvise */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 76 = obsolete vhangup */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 77 = obsolete vlimit */ - { AS(mincore_args), (sy_call_t *)sys_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 78 = mincore */ - { AS(getgroups_args), (sy_call_t *)sys_getgroups, AUE_GETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 79 = getgroups */ + { AS(mincore_args), (sy_call_t *)sys_mincore, AUE_MINCORE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 78 = mincore */ + { AS(getgroups_args), (sy_call_t *)sys_getgroups, AUE_GETGROUPS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 79 = getgroups */ { AS(setgroups_args), (sy_call_t *)sys_setgroups, AUE_SETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 80 = setgroups */ - { 0, (sy_call_t *)sys_getpgrp, AUE_GETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 81 = getpgrp */ + { 0, (sy_call_t *)sys_getpgrp, AUE_GETPGRP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 81 = getpgrp */ { AS(setpgid_args), (sy_call_t *)sys_setpgid, AUE_SETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 82 = setpgid */ - { AS(freebsd32_setitimer_args), (sy_call_t *)freebsd32_setitimer, AUE_SETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 83 = freebsd32_setitimer */ + { AS(freebsd32_setitimer_args), (sy_call_t *)freebsd32_setitimer, AUE_SETITIMER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 83 = freebsd32_setitimer */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 84 = obsolete owait */ { AS(swapon_args), (sy_call_t *)sys_swapon, AUE_SWAPON, NULL, 0, 0, 0, SY_THR_STATIC }, /* 85 = swapon */ - { AS(freebsd32_getitimer_args), (sy_call_t *)freebsd32_getitimer, AUE_GETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 86 = freebsd32_getitimer */ + { AS(freebsd32_getitimer_args), (sy_call_t *)freebsd32_getitimer, AUE_GETITIMER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 86 = freebsd32_getitimer */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 87 = obsolete ogethostname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 88 = obsolete osethostname */ - { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 89 = getdtablesize */ - { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, 0, SY_THR_STATIC }, /* 90 = dup2 */ + { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 89 = getdtablesize */ + { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 90 = dup2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 91 = getdopt */ - { AS(freebsd32_fcntl_args), (sy_call_t *)freebsd32_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = freebsd32_fcntl */ - { AS(freebsd32_select_args), (sy_call_t *)freebsd32_select, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 93 = freebsd32_select */ + { AS(freebsd32_fcntl_args), (sy_call_t *)freebsd32_fcntl, AUE_FCNTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 92 = freebsd32_fcntl */ + { AS(freebsd32_select_args), (sy_call_t *)freebsd32_select, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 93 = freebsd32_select */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 94 = setdopt */ - { AS(fsync_args), (sy_call_t *)sys_fsync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 95 = fsync */ - { AS(setpriority_args), (sy_call_t *)sys_setpriority, AUE_SETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 96 = setpriority */ - { AS(socket_args), (sy_call_t *)sys_socket, AUE_SOCKET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 97 = socket */ + { AS(fsync_args), (sy_call_t *)sys_fsync, AUE_FSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 95 = fsync */ + { AS(setpriority_args), (sy_call_t *)sys_setpriority, AUE_SETPRIORITY, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 96 = setpriority */ + { AS(socket_args), (sy_call_t *)sys_socket, AUE_SOCKET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 97 = socket */ { AS(connect_args), (sy_call_t *)sys_connect, AUE_CONNECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 98 = connect */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 99 = obsolete oaccept */ - { AS(getpriority_args), (sy_call_t *)sys_getpriority, AUE_GETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 100 = getpriority */ + { AS(getpriority_args), (sy_call_t *)sys_getpriority, AUE_GETPRIORITY, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 100 = getpriority */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 101 = obsolete osend */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 102 = obsolete orecv */ - { compat(AS(ofreebsd32_sigreturn_args),freebsd32_sigreturn), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 103 = old freebsd32_sigreturn */ + { compat(AS(ofreebsd32_sigreturn_args),freebsd32_sigreturn), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 103 = old freebsd32_sigreturn */ { AS(bind_args), (sy_call_t *)sys_bind, AUE_BIND, NULL, 0, 0, 0, SY_THR_STATIC }, /* 104 = bind */ - { AS(setsockopt_args), (sy_call_t *)sys_setsockopt, AUE_SETSOCKOPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 105 = setsockopt */ - { AS(listen_args), (sy_call_t *)sys_listen, AUE_LISTEN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 106 = listen */ + { AS(setsockopt_args), (sy_call_t *)sys_setsockopt, AUE_SETSOCKOPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 105 = setsockopt */ + { AS(listen_args), (sy_call_t *)sys_listen, AUE_LISTEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 106 = listen */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 107 = obsolete vtimes */ - { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), AUE_O_SIGVEC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ - { compat(AS(ofreebsd32_sigblock_args),freebsd32_sigblock), AUE_O_SIGBLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 109 = old freebsd32_sigblock */ - { compat(AS(ofreebsd32_sigsetmask_args),freebsd32_sigsetmask), AUE_O_SIGSETMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 110 = old freebsd32_sigsetmask */ + { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), AUE_O_SIGVEC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ + { compat(AS(ofreebsd32_sigblock_args),freebsd32_sigblock), AUE_O_SIGBLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 109 = old freebsd32_sigblock */ + { compat(AS(ofreebsd32_sigsetmask_args),freebsd32_sigsetmask), AUE_O_SIGSETMASK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 110 = old freebsd32_sigsetmask */ { compat(AS(ofreebsd32_sigsuspend_args),freebsd32_sigsuspend), AUE_SIGSUSPEND, NULL, 0, 0, 0, SY_THR_STATIC }, /* 111 = old freebsd32_sigsuspend */ { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), AUE_O_SIGSTACK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 113 = obsolete orecvmsg */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 114 = obsolete osendmsg */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 115 = obsolete vtrace */ - { AS(freebsd32_gettimeofday_args), (sy_call_t *)freebsd32_gettimeofday, AUE_GETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 116 = freebsd32_gettimeofday */ - { AS(freebsd32_getrusage_args), (sy_call_t *)freebsd32_getrusage, AUE_GETRUSAGE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 117 = freebsd32_getrusage */ - { AS(getsockopt_args), (sy_call_t *)sys_getsockopt, AUE_GETSOCKOPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 118 = getsockopt */ + { AS(freebsd32_gettimeofday_args), (sy_call_t *)freebsd32_gettimeofday, AUE_GETTIMEOFDAY, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 116 = freebsd32_gettimeofday */ + { AS(freebsd32_getrusage_args), (sy_call_t *)freebsd32_getrusage, AUE_GETRUSAGE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 117 = freebsd32_getrusage */ + { AS(getsockopt_args), (sy_call_t *)sys_getsockopt, AUE_GETSOCKOPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 118 = getsockopt */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 119 = resuba */ - { AS(freebsd32_readv_args), (sy_call_t *)freebsd32_readv, AUE_READV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 120 = freebsd32_readv */ - { AS(freebsd32_writev_args), (sy_call_t *)freebsd32_writev, AUE_WRITEV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 121 = freebsd32_writev */ + { AS(freebsd32_readv_args), (sy_call_t *)freebsd32_readv, AUE_READV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 120 = freebsd32_readv */ + { AS(freebsd32_writev_args), (sy_call_t *)freebsd32_writev, AUE_WRITEV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 121 = freebsd32_writev */ { AS(freebsd32_settimeofday_args), (sy_call_t *)freebsd32_settimeofday, AUE_SETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 122 = freebsd32_settimeofday */ - { AS(fchown_args), (sy_call_t *)sys_fchown, AUE_FCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 123 = fchown */ - { AS(fchmod_args), (sy_call_t *)sys_fchmod, AUE_FCHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 124 = fchmod */ + { AS(fchown_args), (sy_call_t *)sys_fchown, AUE_FCHOWN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 123 = fchown */ + { AS(fchmod_args), (sy_call_t *)sys_fchmod, AUE_FCHMOD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 124 = fchmod */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 125 = obsolete orecvfrom */ - { AS(setreuid_args), (sy_call_t *)sys_setreuid, AUE_SETREUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 126 = setreuid */ - { AS(setregid_args), (sy_call_t *)sys_setregid, AUE_SETREGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 127 = setregid */ + { AS(setreuid_args), (sy_call_t *)sys_setreuid, AUE_SETREUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 126 = setreuid */ + { AS(setregid_args), (sy_call_t *)sys_setregid, AUE_SETREGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 127 = setregid */ { AS(rename_args), (sy_call_t *)sys_rename, AUE_RENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 128 = rename */ { compat(AS(otruncate_args),truncate), AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 129 = old truncate */ - { compat(AS(oftruncate_args),ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 130 = old ftruncate */ - { AS(flock_args), (sy_call_t *)sys_flock, AUE_FLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 131 = flock */ + { compat(AS(oftruncate_args),ftruncate), AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 130 = old ftruncate */ + { AS(flock_args), (sy_call_t *)sys_flock, AUE_FLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 131 = flock */ { AS(mkfifo_args), (sy_call_t *)sys_mkfifo, AUE_MKFIFO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 132 = mkfifo */ - { AS(sendto_args), (sy_call_t *)sys_sendto, AUE_SENDTO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 133 = sendto */ - { AS(shutdown_args), (sy_call_t *)sys_shutdown, AUE_SHUTDOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 134 = shutdown */ - { AS(socketpair_args), (sy_call_t *)sys_socketpair, AUE_SOCKETPAIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 135 = socketpair */ + { AS(sendto_args), (sy_call_t *)sys_sendto, AUE_SENDTO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 133 = sendto */ + { AS(shutdown_args), (sy_call_t *)sys_shutdown, AUE_SHUTDOWN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 134 = shutdown */ + { AS(socketpair_args), (sy_call_t *)sys_socketpair, AUE_SOCKETPAIR, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 135 = socketpair */ { AS(mkdir_args), (sy_call_t *)sys_mkdir, AUE_MKDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 136 = mkdir */ { AS(rmdir_args), (sy_call_t *)sys_rmdir, AUE_RMDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 137 = rmdir */ { AS(freebsd32_utimes_args), (sy_call_t *)freebsd32_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 138 = freebsd32_utimes */ @@ -200,7 +200,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 144 = obsolete getrlimit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 145 = obsolete setrlimit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 146 = obsolete killpg */ - { 0, (sy_call_t *)sys_setsid, AUE_SETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 147 = setsid */ + { 0, (sy_call_t *)sys_setsid, AUE_SETSID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 147 = setsid */ { AS(quotactl_args), (sy_call_t *)sys_quotactl, AUE_QUOTACTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 148 = quotactl */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 149 = obsolete oquota */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 150 = obsolete ogetsockname */ @@ -209,7 +209,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 153 = asyncdaemon */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 154 = nlm_syscall */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 155 = nfssvc */ - { compat(AS(ofreebsd32_getdirentries_args),freebsd32_getdirentries), AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 156 = old freebsd32_getdirentries */ + { compat(AS(ofreebsd32_getdirentries_args),freebsd32_getdirentries), AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 156 = old freebsd32_getdirentries */ { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 157 = freebsd4 freebsd32_statfs */ { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 158 = freebsd4 freebsd32_fstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 159 = nosys */ @@ -218,51 +218,51 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 162 = obsolete getdomainname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 163 = obsolete setdomainname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 164 = obsolete uname */ - { AS(freebsd32_sysarch_args), (sy_call_t *)freebsd32_sysarch, AUE_SYSARCH, NULL, 0, 0, 0, SY_THR_STATIC }, /* 165 = freebsd32_sysarch */ - { AS(rtprio_args), (sy_call_t *)sys_rtprio, AUE_RTPRIO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 166 = rtprio */ + { AS(freebsd32_sysarch_args), (sy_call_t *)freebsd32_sysarch, AUE_SYSARCH, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 165 = freebsd32_sysarch */ + { AS(rtprio_args), (sy_call_t *)sys_rtprio, AUE_RTPRIO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 167 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 168 = nosys */ { AS(freebsd32_semsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 169 = freebsd32_semsys */ { AS(freebsd32_msgsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 170 = freebsd32_msgsys */ { AS(freebsd32_shmsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 171 = freebsd32_shmsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 172 = nosys */ - { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 173 = freebsd6 freebsd32_pread */ - { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 174 = freebsd6 freebsd32_pwrite */ + { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 173 = freebsd6 freebsd32_pread */ + { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 174 = freebsd6 freebsd32_pwrite */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 175 = nosys */ { AS(ntp_adjtime_args), (sy_call_t *)sys_ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = ntp_adjtime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 177 = sfork */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 178 = getdescriptor */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 179 = setdescriptor */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 180 = nosys */ - { AS(setgid_args), (sy_call_t *)sys_setgid, AUE_SETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 181 = setgid */ - { AS(setegid_args), (sy_call_t *)sys_setegid, AUE_SETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 182 = setegid */ - { AS(seteuid_args), (sy_call_t *)sys_seteuid, AUE_SETEUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 183 = seteuid */ + { AS(setgid_args), (sy_call_t *)sys_setgid, AUE_SETGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 181 = setgid */ + { AS(setegid_args), (sy_call_t *)sys_setegid, AUE_SETEGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 182 = setegid */ + { AS(seteuid_args), (sy_call_t *)sys_seteuid, AUE_SETEUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 183 = seteuid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 184 = lfs_bmapv */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 185 = lfs_markv */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 186 = lfs_segclean */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 187 = lfs_segwait */ { AS(freebsd32_stat_args), (sy_call_t *)freebsd32_stat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = freebsd32_stat */ - { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 189 = freebsd32_fstat */ + { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 189 = freebsd32_fstat */ { AS(freebsd32_lstat_args), (sy_call_t *)freebsd32_lstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = freebsd32_lstat */ { AS(pathconf_args), (sy_call_t *)sys_pathconf, AUE_PATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 191 = pathconf */ - { AS(fpathconf_args), (sy_call_t *)sys_fpathconf, AUE_FPATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 192 = fpathconf */ + { AS(fpathconf_args), (sy_call_t *)sys_fpathconf, AUE_FPATHCONF, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 192 = fpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 193 = nosys */ - { AS(__getrlimit_args), (sy_call_t *)sys_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 194 = getrlimit */ - { AS(__setrlimit_args), (sy_call_t *)sys_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 195 = setrlimit */ - { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 196 = freebsd32_getdirentries */ - { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 197 = freebsd6 freebsd32_mmap */ + { AS(__getrlimit_args), (sy_call_t *)sys_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 194 = getrlimit */ + { AS(__setrlimit_args), (sy_call_t *)sys_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 195 = setrlimit */ + { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 196 = freebsd32_getdirentries */ + { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 197 = freebsd6 freebsd32_mmap */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = __syscall */ - { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 199 = freebsd6 freebsd32_lseek */ + { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 199 = freebsd6 freebsd32_lseek */ { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = freebsd6 freebsd32_truncate */ { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 201 = freebsd6 freebsd32_ftruncate */ - { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 202 = freebsd32_sysctl */ - { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 203 = mlock */ - { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 204 = munlock */ + { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 202 = freebsd32_sysctl */ + { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 203 = mlock */ + { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 204 = munlock */ { AS(undelete_args), (sy_call_t *)sys_undelete, AUE_UNDELETE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 205 = undelete */ - { AS(freebsd32_futimes_args), (sy_call_t *)freebsd32_futimes, AUE_FUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 206 = freebsd32_futimes */ - { AS(getpgid_args), (sy_call_t *)sys_getpgid, AUE_GETPGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 207 = getpgid */ + { AS(freebsd32_futimes_args), (sy_call_t *)freebsd32_futimes, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 206 = freebsd32_futimes */ + { AS(getpgid_args), (sy_call_t *)sys_getpgid, AUE_GETPGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 207 = getpgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = newreboot */ - { AS(poll_args), (sy_call_t *)sys_poll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 209 = poll */ + { AS(poll_args), (sy_call_t *)sys_poll, AUE_POLL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 209 = poll */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 210 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 212 = lkmnosys */ @@ -285,15 +285,15 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 229 = freebsd7 freebsd32_shmctl */ { AS(shmdt_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 230 = shmdt */ { AS(shmget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 231 = shmget */ - { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 232 = freebsd32_clock_gettime */ + { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 232 = freebsd32_clock_gettime */ { AS(freebsd32_clock_settime_args), (sy_call_t *)freebsd32_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 233 = freebsd32_clock_settime */ - { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 234 = freebsd32_clock_getres */ - { AS(freebsd32_ktimer_create_args), (sy_call_t *)freebsd32_ktimer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 235 = freebsd32_ktimer_create */ - { AS(ktimer_delete_args), (sy_call_t *)sys_ktimer_delete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 236 = ktimer_delete */ - { AS(freebsd32_ktimer_settime_args), (sy_call_t *)freebsd32_ktimer_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 237 = freebsd32_ktimer_settime */ - { AS(freebsd32_ktimer_gettime_args), (sy_call_t *)freebsd32_ktimer_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 238 = freebsd32_ktimer_gettime */ - { AS(ktimer_getoverrun_args), (sy_call_t *)sys_ktimer_getoverrun, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 239 = ktimer_getoverrun */ - { AS(freebsd32_nanosleep_args), (sy_call_t *)freebsd32_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 240 = freebsd32_nanosleep */ + { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 234 = freebsd32_clock_getres */ + { AS(freebsd32_ktimer_create_args), (sy_call_t *)freebsd32_ktimer_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 235 = freebsd32_ktimer_create */ + { AS(ktimer_delete_args), (sy_call_t *)sys_ktimer_delete, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 236 = ktimer_delete */ + { AS(freebsd32_ktimer_settime_args), (sy_call_t *)freebsd32_ktimer_settime, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 237 = freebsd32_ktimer_settime */ + { AS(freebsd32_ktimer_gettime_args), (sy_call_t *)freebsd32_ktimer_gettime, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 238 = freebsd32_ktimer_gettime */ + { AS(ktimer_getoverrun_args), (sy_call_t *)sys_ktimer_getoverrun, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 239 = ktimer_getoverrun */ + { AS(freebsd32_nanosleep_args), (sy_call_t *)freebsd32_nanosleep, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 240 = freebsd32_nanosleep */ { AS(ffclock_getcounter_args), (sy_call_t *)sys_ffclock_getcounter, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 241 = ffclock_getcounter */ { AS(ffclock_setestimate_args), (sy_call_t *)sys_ffclock_setestimate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 242 = ffclock_setestimate */ { AS(ffclock_getestimate_args), (sy_call_t *)sys_ffclock_getestimate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 243 = ffclock_getestimate */ @@ -303,14 +303,14 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_clock_getcpuclockid2_args), (sy_call_t *)freebsd32_clock_getcpuclockid2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 247 = freebsd32_clock_getcpuclockid2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = ntp_gettime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = nosys */ - { AS(minherit_args), (sy_call_t *)sys_minherit, AUE_MINHERIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = minherit */ + { AS(minherit_args), (sy_call_t *)sys_minherit, AUE_MINHERIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 250 = minherit */ { AS(rfork_args), (sy_call_t *)sys_rfork, AUE_RFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 251 = rfork */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */ - { 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = issetugid */ + { 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 253 = issetugid */ { AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = lchown */ - { AS(freebsd32_aio_read_args), (sy_call_t *)freebsd32_aio_read, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = freebsd32_aio_read */ - { AS(freebsd32_aio_write_args), (sy_call_t *)freebsd32_aio_write, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = freebsd32_aio_write */ - { AS(freebsd32_lio_listio_args), (sy_call_t *)freebsd32_lio_listio, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = freebsd32_lio_listio */ + { AS(freebsd32_aio_read_args), (sy_call_t *)freebsd32_aio_read, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 255 = freebsd32_aio_read */ + { AS(freebsd32_aio_write_args), (sy_call_t *)freebsd32_aio_write, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 256 = freebsd32_aio_write */ + { AS(freebsd32_lio_listio_args), (sy_call_t *)freebsd32_lio_listio, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 257 = freebsd32_lio_listio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 258 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 259 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 260 = nosys */ @@ -325,12 +325,12 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 269 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 270 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 271 = nosys */ - { AS(getdents_args), (sy_call_t *)sys_getdents, AUE_O_GETDENTS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = getdents */ + { AS(getdents_args), (sy_call_t *)sys_getdents, AUE_O_GETDENTS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 272 = getdents */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = nosys */ { AS(lchmod_args), (sy_call_t *)sys_lchmod, AUE_LCHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = lchmod */ { AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = netbsd_lchown */ { AS(freebsd32_lutimes_args), (sy_call_t *)freebsd32_lutimes, AUE_LUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 276 = freebsd32_lutimes */ - { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 277 = netbsd_msync */ + { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 277 = netbsd_msync */ { AS(nstat_args), (sy_call_t *)sys_nstat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 278 = nstat */ { AS(nfstat_args), (sy_call_t *)sys_nfstat, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 279 = nfstat */ { AS(nlstat_args), (sy_call_t *)sys_nlstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = nlstat */ @@ -342,8 +342,8 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 286 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 287 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 288 = nosys */ - { AS(freebsd32_preadv_args), (sy_call_t *)freebsd32_preadv, AUE_PREADV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 289 = freebsd32_preadv */ - { AS(freebsd32_pwritev_args), (sy_call_t *)freebsd32_pwritev, AUE_PWRITEV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ + { AS(freebsd32_preadv_args), (sy_call_t *)freebsd32_preadv, AUE_PREADV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 289 = freebsd32_preadv */ + { AS(freebsd32_pwritev_args), (sy_call_t *)freebsd32_pwritev, AUE_PWRITEV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 291 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 292 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 293 = nosys */ @@ -363,60 +363,60 @@ struct sysent freebsd32_sysent[] = { { AS(kldnext_args), (sy_call_t *)sys_kldnext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 307 = kldnext */ { AS(freebsd32_kldstat_args), (sy_call_t *)freebsd32_kldstat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = freebsd32_kldstat */ { AS(kldfirstmod_args), (sy_call_t *)sys_kldfirstmod, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = kldfirstmod */ - { AS(getsid_args), (sy_call_t *)sys_getsid, AUE_GETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = getsid */ - { AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = setresuid */ - { AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = setresgid */ + { AS(getsid_args), (sy_call_t *)sys_getsid, AUE_GETSID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 310 = getsid */ + { AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 311 = setresuid */ + { AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 312 = setresgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = obsolete signanosleep */ - { AS(freebsd32_aio_return_args), (sy_call_t *)freebsd32_aio_return, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = freebsd32_aio_return */ - { AS(freebsd32_aio_suspend_args), (sy_call_t *)freebsd32_aio_suspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = freebsd32_aio_suspend */ - { AS(aio_cancel_args), (sy_call_t *)sys_aio_cancel, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = aio_cancel */ - { AS(freebsd32_aio_error_args), (sy_call_t *)freebsd32_aio_error, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = freebsd32_aio_error */ - { compat6(AS(freebsd6_freebsd32_aio_read_args),freebsd32_aio_read), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = freebsd6 freebsd32_aio_read */ - { compat6(AS(freebsd6_freebsd32_aio_write_args),freebsd32_aio_write), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = freebsd6 freebsd32_aio_write */ - { compat6(AS(freebsd6_freebsd32_lio_listio_args),freebsd32_lio_listio), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = freebsd6 freebsd32_lio_listio */ - { 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = yield */ + { AS(freebsd32_aio_return_args), (sy_call_t *)freebsd32_aio_return, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 314 = freebsd32_aio_return */ + { AS(freebsd32_aio_suspend_args), (sy_call_t *)freebsd32_aio_suspend, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 315 = freebsd32_aio_suspend */ + { AS(aio_cancel_args), (sy_call_t *)sys_aio_cancel, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 316 = aio_cancel */ + { AS(freebsd32_aio_error_args), (sy_call_t *)freebsd32_aio_error, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 317 = freebsd32_aio_error */ + { compat6(AS(freebsd6_freebsd32_aio_read_args),freebsd32_aio_read), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 318 = freebsd6 freebsd32_aio_read */ + { compat6(AS(freebsd6_freebsd32_aio_write_args),freebsd32_aio_write), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 319 = freebsd6 freebsd32_aio_write */ + { compat6(AS(freebsd6_freebsd32_lio_listio_args),freebsd32_lio_listio), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 320 = freebsd6 freebsd32_lio_listio */ + { 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 321 = yield */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 322 = obsolete thr_sleep */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 323 = obsolete thr_wakeup */ - { AS(mlockall_args), (sy_call_t *)sys_mlockall, AUE_MLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 324 = mlockall */ - { 0, (sy_call_t *)sys_munlockall, AUE_MUNLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 325 = munlockall */ + { AS(mlockall_args), (sy_call_t *)sys_mlockall, AUE_MLOCKALL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 324 = mlockall */ + { 0, (sy_call_t *)sys_munlockall, AUE_MUNLOCKALL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 325 = munlockall */ { AS(__getcwd_args), (sy_call_t *)sys___getcwd, AUE_GETCWD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = __getcwd */ - { AS(sched_setparam_args), (sy_call_t *)sys_sched_setparam, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = sched_setparam */ - { AS(sched_getparam_args), (sy_call_t *)sys_sched_getparam, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = sched_getparam */ - { AS(sched_setscheduler_args), (sy_call_t *)sys_sched_setscheduler, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = sched_setscheduler */ - { AS(sched_getscheduler_args), (sy_call_t *)sys_sched_getscheduler, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = sched_getscheduler */ - { 0, (sy_call_t *)sys_sched_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = sched_yield */ - { AS(sched_get_priority_max_args), (sy_call_t *)sys_sched_get_priority_max, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = sched_get_priority_max */ - { AS(sched_get_priority_min_args), (sy_call_t *)sys_sched_get_priority_min, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 333 = sched_get_priority_min */ - { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ - { AS(utrace_args), (sy_call_t *)sys_utrace, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 335 = utrace */ - { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 336 = freebsd4 freebsd32_sendfile */ + { AS(sched_setparam_args), (sy_call_t *)sys_sched_setparam, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 327 = sched_setparam */ + { AS(sched_getparam_args), (sy_call_t *)sys_sched_getparam, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 328 = sched_getparam */ + { AS(sched_setscheduler_args), (sy_call_t *)sys_sched_setscheduler, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 329 = sched_setscheduler */ + { AS(sched_getscheduler_args), (sy_call_t *)sys_sched_getscheduler, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 330 = sched_getscheduler */ + { 0, (sy_call_t *)sys_sched_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 331 = sched_yield */ + { AS(sched_get_priority_max_args), (sy_call_t *)sys_sched_get_priority_max, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 332 = sched_get_priority_max */ + { AS(sched_get_priority_min_args), (sy_call_t *)sys_sched_get_priority_min, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 333 = sched_get_priority_min */ + { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ + { AS(utrace_args), (sy_call_t *)sys_utrace, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 335 = utrace */ + { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 336 = freebsd4 freebsd32_sendfile */ { AS(kldsym_args), (sy_call_t *)sys_kldsym, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 337 = kldsym */ { AS(freebsd32_jail_args), (sy_call_t *)freebsd32_jail, AUE_JAIL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 338 = freebsd32_jail */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 339 = pioctl */ - { AS(sigprocmask_args), (sy_call_t *)sys_sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 340 = sigprocmask */ - { AS(sigsuspend_args), (sy_call_t *)sys_sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0, 0, SY_THR_STATIC }, /* 341 = sigsuspend */ - { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, 0, SY_THR_STATIC }, /* 342 = freebsd4 freebsd32_sigaction */ + { AS(sigprocmask_args), (sy_call_t *)sys_sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 340 = sigprocmask */ + { AS(sigsuspend_args), (sy_call_t *)sys_sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 341 = sigsuspend */ + { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 342 = freebsd4 freebsd32_sigaction */ { AS(sigpending_args), (sy_call_t *)sys_sigpending, AUE_SIGPENDING, NULL, 0, 0, 0, SY_THR_STATIC }, /* 343 = sigpending */ - { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 344 = freebsd4 freebsd32_sigreturn */ - { AS(freebsd32_sigtimedwait_args), (sy_call_t *)freebsd32_sigtimedwait, AUE_SIGWAIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 345 = freebsd32_sigtimedwait */ - { AS(freebsd32_sigwaitinfo_args), (sy_call_t *)freebsd32_sigwaitinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 346 = freebsd32_sigwaitinfo */ + { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 344 = freebsd4 freebsd32_sigreturn */ + { AS(freebsd32_sigtimedwait_args), (sy_call_t *)freebsd32_sigtimedwait, AUE_SIGWAIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 345 = freebsd32_sigtimedwait */ + { AS(freebsd32_sigwaitinfo_args), (sy_call_t *)freebsd32_sigwaitinfo, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 346 = freebsd32_sigwaitinfo */ { AS(__acl_get_file_args), (sy_call_t *)sys___acl_get_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 347 = __acl_get_file */ { AS(__acl_set_file_args), (sy_call_t *)sys___acl_set_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 348 = __acl_set_file */ - { AS(__acl_get_fd_args), (sy_call_t *)sys___acl_get_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 349 = __acl_get_fd */ - { AS(__acl_set_fd_args), (sy_call_t *)sys___acl_set_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 350 = __acl_set_fd */ + { AS(__acl_get_fd_args), (sy_call_t *)sys___acl_get_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 349 = __acl_get_fd */ + { AS(__acl_set_fd_args), (sy_call_t *)sys___acl_set_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 350 = __acl_set_fd */ { AS(__acl_delete_file_args), (sy_call_t *)sys___acl_delete_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 351 = __acl_delete_file */ - { AS(__acl_delete_fd_args), (sy_call_t *)sys___acl_delete_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 352 = __acl_delete_fd */ + { AS(__acl_delete_fd_args), (sy_call_t *)sys___acl_delete_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 352 = __acl_delete_fd */ { AS(__acl_aclcheck_file_args), (sy_call_t *)sys___acl_aclcheck_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 353 = __acl_aclcheck_file */ - { AS(__acl_aclcheck_fd_args), (sy_call_t *)sys___acl_aclcheck_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 354 = __acl_aclcheck_fd */ + { AS(__acl_aclcheck_fd_args), (sy_call_t *)sys___acl_aclcheck_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 354 = __acl_aclcheck_fd */ { AS(extattrctl_args), (sy_call_t *)sys_extattrctl, AUE_EXTATTRCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 355 = extattrctl */ { AS(extattr_set_file_args), (sy_call_t *)sys_extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 356 = extattr_set_file */ { AS(extattr_get_file_args), (sy_call_t *)sys_extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 357 = extattr_get_file */ { AS(extattr_delete_file_args), (sy_call_t *)sys_extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 358 = extattr_delete_file */ - { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)freebsd32_aio_waitcomplete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 359 = freebsd32_aio_waitcomplete */ - { AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 360 = getresuid */ - { AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 361 = getresgid */ - { 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 362 = kqueue */ - { AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 363 = freebsd32_kevent */ + { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)freebsd32_aio_waitcomplete, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 359 = freebsd32_aio_waitcomplete */ + { AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 360 = getresuid */ + { AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 361 = getresgid */ + { 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 362 = kqueue */ + { AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 363 = freebsd32_kevent */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 364 = __cap_get_proc */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 365 = __cap_set_proc */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 366 = __cap_get_fd */ @@ -424,9 +424,9 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 368 = __cap_set_fd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 369 = __cap_set_file */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 370 = nosys */ - { AS(extattr_set_fd_args), (sy_call_t *)sys_extattr_set_fd, AUE_EXTATTR_SET_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 371 = extattr_set_fd */ - { AS(extattr_get_fd_args), (sy_call_t *)sys_extattr_get_fd, AUE_EXTATTR_GET_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 372 = extattr_get_fd */ - { AS(extattr_delete_fd_args), (sy_call_t *)sys_extattr_delete_fd, AUE_EXTATTR_DELETE_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 373 = extattr_delete_fd */ + { AS(extattr_set_fd_args), (sy_call_t *)sys_extattr_set_fd, AUE_EXTATTR_SET_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 371 = extattr_set_fd */ + { AS(extattr_get_fd_args), (sy_call_t *)sys_extattr_get_fd, AUE_EXTATTR_GET_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 372 = extattr_get_fd */ + { AS(extattr_delete_fd_args), (sy_call_t *)sys_extattr_delete_fd, AUE_EXTATTR_DELETE_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 373 = extattr_delete_fd */ { AS(__setugid_args), (sy_call_t *)sys___setugid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 374 = __setugid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 375 = nfsclnt */ { AS(eaccess_args), (sy_call_t *)sys_eaccess, AUE_EACCESS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 376 = eaccess */ @@ -445,12 +445,12 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 389 = __mac_set_file */ { AS(kenv_args), (sy_call_t *)sys_kenv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 390 = kenv */ { AS(lchflags_args), (sy_call_t *)sys_lchflags, AUE_LCHFLAGS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 391 = lchflags */ - { AS(uuidgen_args), (sy_call_t *)sys_uuidgen, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 392 = uuidgen */ - { AS(freebsd32_sendfile_args), (sy_call_t *)freebsd32_sendfile, AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 393 = freebsd32_sendfile */ + { AS(uuidgen_args), (sy_call_t *)sys_uuidgen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 392 = uuidgen */ + { AS(freebsd32_sendfile_args), (sy_call_t *)freebsd32_sendfile, AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 393 = freebsd32_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 394 = mac_syscall */ { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = getfsstat */ { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = statfs */ - { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 397 = fstatfs */ + { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 397 = fstatfs */ { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = fhstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 399 = nosys */ { AS(ksem_close_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 400 = ksem_close */ @@ -469,82 +469,82 @@ struct sysent freebsd32_sysent[] = { { AS(extattr_get_link_args), (sy_call_t *)sys_extattr_get_link, AUE_EXTATTR_GET_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 413 = extattr_get_link */ { AS(extattr_delete_link_args), (sy_call_t *)sys_extattr_delete_link, AUE_EXTATTR_DELETE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 414 = extattr_delete_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 415 = __mac_execve */ - { AS(freebsd32_sigaction_args), (sy_call_t *)freebsd32_sigaction, AUE_SIGACTION, NULL, 0, 0, 0, SY_THR_STATIC }, /* 416 = freebsd32_sigaction */ - { AS(freebsd32_sigreturn_args), (sy_call_t *)freebsd32_sigreturn, AUE_SIGRETURN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 417 = freebsd32_sigreturn */ + { AS(freebsd32_sigaction_args), (sy_call_t *)freebsd32_sigaction, AUE_SIGACTION, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 416 = freebsd32_sigaction */ + { AS(freebsd32_sigreturn_args), (sy_call_t *)freebsd32_sigreturn, AUE_SIGRETURN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 417 = freebsd32_sigreturn */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 418 = __xstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 419 = __xfstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 420 = __xlstat */ - { AS(freebsd32_getcontext_args), (sy_call_t *)freebsd32_getcontext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 421 = freebsd32_getcontext */ - { AS(freebsd32_setcontext_args), (sy_call_t *)freebsd32_setcontext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 422 = freebsd32_setcontext */ + { AS(freebsd32_getcontext_args), (sy_call_t *)freebsd32_getcontext, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 421 = freebsd32_getcontext */ + { AS(freebsd32_setcontext_args), (sy_call_t *)freebsd32_setcontext, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 422 = freebsd32_setcontext */ { AS(freebsd32_swapcontext_args), (sy_call_t *)freebsd32_swapcontext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 423 = freebsd32_swapcontext */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 424 = swapoff */ { AS(__acl_get_link_args), (sy_call_t *)sys___acl_get_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 425 = __acl_get_link */ { AS(__acl_set_link_args), (sy_call_t *)sys___acl_set_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 426 = __acl_set_link */ { AS(__acl_delete_link_args), (sy_call_t *)sys___acl_delete_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 427 = __acl_delete_link */ { AS(__acl_aclcheck_link_args), (sy_call_t *)sys___acl_aclcheck_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 428 = __acl_aclcheck_link */ - { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 429 = sigwait */ + { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 429 = sigwait */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 430 = thr_create; */ - { AS(thr_exit_args), (sy_call_t *)sys_thr_exit, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 431 = thr_exit */ - { AS(thr_self_args), (sy_call_t *)sys_thr_self, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 432 = thr_self */ - { AS(thr_kill_args), (sy_call_t *)sys_thr_kill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 433 = thr_kill */ + { AS(thr_exit_args), (sy_call_t *)sys_thr_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 431 = thr_exit */ + { AS(thr_self_args), (sy_call_t *)sys_thr_self, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 432 = thr_self */ + { AS(thr_kill_args), (sy_call_t *)sys_thr_kill, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 433 = thr_kill */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 434 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 435 = nosys */ { AS(jail_attach_args), (sy_call_t *)sys_jail_attach, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 436 = jail_attach */ - { AS(extattr_list_fd_args), (sy_call_t *)sys_extattr_list_fd, AUE_EXTATTR_LIST_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 437 = extattr_list_fd */ + { AS(extattr_list_fd_args), (sy_call_t *)sys_extattr_list_fd, AUE_EXTATTR_LIST_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 437 = extattr_list_fd */ { AS(extattr_list_file_args), (sy_call_t *)sys_extattr_list_file, AUE_EXTATTR_LIST_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 438 = extattr_list_file */ { AS(extattr_list_link_args), (sy_call_t *)sys_extattr_list_link, AUE_EXTATTR_LIST_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 439 = extattr_list_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 440 = kse_switchin */ { AS(freebsd32_ksem_timedwait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 441 = freebsd32_ksem_timedwait */ - { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 442 = freebsd32_thr_suspend */ - { AS(thr_wake_args), (sy_call_t *)sys_thr_wake, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 443 = thr_wake */ + { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 442 = freebsd32_thr_suspend */ + { AS(thr_wake_args), (sy_call_t *)sys_thr_wake, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 443 = thr_wake */ { AS(kldunloadf_args), (sy_call_t *)sys_kldunloadf, AUE_MODUNLOAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 444 = kldunloadf */ { AS(audit_args), (sy_call_t *)sys_audit, AUE_AUDIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 445 = audit */ { AS(auditon_args), (sy_call_t *)sys_auditon, AUE_AUDITON, NULL, 0, 0, 0, SY_THR_STATIC }, /* 446 = auditon */ - { AS(getauid_args), (sy_call_t *)sys_getauid, AUE_GETAUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 447 = getauid */ - { AS(setauid_args), (sy_call_t *)sys_setauid, AUE_SETAUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 448 = setauid */ - { AS(getaudit_args), (sy_call_t *)sys_getaudit, AUE_GETAUDIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 449 = getaudit */ - { AS(setaudit_args), (sy_call_t *)sys_setaudit, AUE_SETAUDIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 450 = setaudit */ - { AS(getaudit_addr_args), (sy_call_t *)sys_getaudit_addr, AUE_GETAUDIT_ADDR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 451 = getaudit_addr */ - { AS(setaudit_addr_args), (sy_call_t *)sys_setaudit_addr, AUE_SETAUDIT_ADDR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 452 = setaudit_addr */ + { AS(getauid_args), (sy_call_t *)sys_getauid, AUE_GETAUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 447 = getauid */ + { AS(setauid_args), (sy_call_t *)sys_setauid, AUE_SETAUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 448 = setauid */ + { AS(getaudit_args), (sy_call_t *)sys_getaudit, AUE_GETAUDIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 449 = getaudit */ + { AS(setaudit_args), (sy_call_t *)sys_setaudit, AUE_SETAUDIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 450 = setaudit */ + { AS(getaudit_addr_args), (sy_call_t *)sys_getaudit_addr, AUE_GETAUDIT_ADDR, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 451 = getaudit_addr */ + { AS(setaudit_addr_args), (sy_call_t *)sys_setaudit_addr, AUE_SETAUDIT_ADDR, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 452 = setaudit_addr */ { AS(auditctl_args), (sy_call_t *)sys_auditctl, AUE_AUDITCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 453 = auditctl */ - { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 454 = freebsd32_umtx_op */ - { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 455 = freebsd32_thr_new */ - { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 456 = sigqueue */ + { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 454 = freebsd32_umtx_op */ + { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 455 = freebsd32_thr_new */ + { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 456 = sigqueue */ { AS(freebsd32_kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 457 = freebsd32_kmq_open */ - { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ - { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ - { AS(freebsd32_kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 460 = freebsd32_kmq_timedsend */ - { AS(freebsd32_kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 461 = freebsd32_kmq_notify */ + { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ + { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ + { AS(freebsd32_kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 460 = freebsd32_kmq_timedsend */ + { AS(freebsd32_kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 461 = freebsd32_kmq_notify */ { AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */ - { AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 463 = abort2 */ - { AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 464 = thr_set_name */ + { AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 463 = abort2 */ + { AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 464 = thr_set_name */ { AS(freebsd32_aio_fsync_args), (sy_call_t *)freebsd32_aio_fsync, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 465 = freebsd32_aio_fsync */ - { AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 466 = rtprio_thread */ + { AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 466 = rtprio_thread */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 467 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 469 = __getpath_fromfd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 470 = __getpath_fromaddr */ - { AS(sctp_peeloff_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 471 = sctp_peeloff */ - { AS(sctp_generic_sendmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ - { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ - { AS(sctp_generic_recvmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 474 = sctp_generic_recvmsg */ + { AS(sctp_peeloff_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 471 = sctp_peeloff */ + { AS(sctp_generic_sendmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ + { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ + { AS(sctp_generic_recvmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 474 = sctp_generic_recvmsg */ #ifdef PAD64_REQUIRED - { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 475 = freebsd32_pread */ - { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ - { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ - { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ + { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 475 = freebsd32_pread */ + { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ + { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ + { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #else - { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 475 = freebsd32_pread */ - { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ - { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ - { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ + { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 475 = freebsd32_pread */ + { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ + { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ + { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #endif { AS(thr_kill2_args), (sy_call_t *)sys_thr_kill2, AUE_KILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 481 = thr_kill2 */ - { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 482 = shm_open */ + { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 482 = shm_open */ { AS(shm_unlink_args), (sy_call_t *)sys_shm_unlink, AUE_SHMUNLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 483 = shm_unlink */ { AS(cpuset_args), (sy_call_t *)sys_cpuset, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 484 = cpuset */ #ifdef PAD64_REQUIRED @@ -555,40 +555,40 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_cpuset_getid_args), (sy_call_t *)freebsd32_cpuset_getid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 486 = freebsd32_cpuset_getid */ { AS(freebsd32_cpuset_getaffinity_args), (sy_call_t *)freebsd32_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 487 = freebsd32_cpuset_getaffinity */ { AS(freebsd32_cpuset_setaffinity_args), (sy_call_t *)freebsd32_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 488 = freebsd32_cpuset_setaffinity */ - { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 489 = faccessat */ - { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 490 = fchmodat */ - { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 491 = fchownat */ - { AS(freebsd32_fexecve_args), (sy_call_t *)freebsd32_fexecve, AUE_FEXECVE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 492 = freebsd32_fexecve */ - { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 493 = freebsd32_fstatat */ - { AS(freebsd32_futimesat_args), (sy_call_t *)freebsd32_futimesat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 494 = freebsd32_futimesat */ - { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 495 = linkat */ - { AS(mkdirat_args), (sy_call_t *)sys_mkdirat, AUE_MKDIRAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 496 = mkdirat */ - { AS(mkfifoat_args), (sy_call_t *)sys_mkfifoat, AUE_MKFIFOAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 497 = mkfifoat */ - { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 498 = mknodat */ - { AS(openat_args), (sy_call_t *)sys_openat, AUE_OPENAT_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 499 = openat */ - { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 500 = readlinkat */ - { AS(renameat_args), (sy_call_t *)sys_renameat, AUE_RENAMEAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 501 = renameat */ - { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 502 = symlinkat */ - { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 503 = unlinkat */ + { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 489 = faccessat */ + { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 490 = fchmodat */ + { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 491 = fchownat */ + { AS(freebsd32_fexecve_args), (sy_call_t *)freebsd32_fexecve, AUE_FEXECVE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 492 = freebsd32_fexecve */ + { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 493 = freebsd32_fstatat */ + { AS(freebsd32_futimesat_args), (sy_call_t *)freebsd32_futimesat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 494 = freebsd32_futimesat */ + { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 495 = linkat */ + { AS(mkdirat_args), (sy_call_t *)sys_mkdirat, AUE_MKDIRAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 496 = mkdirat */ + { AS(mkfifoat_args), (sy_call_t *)sys_mkfifoat, AUE_MKFIFOAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 497 = mkfifoat */ + { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 498 = mknodat */ + { AS(openat_args), (sy_call_t *)sys_openat, AUE_OPENAT_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 499 = openat */ + { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 500 = readlinkat */ + { AS(renameat_args), (sy_call_t *)sys_renameat, AUE_RENAMEAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 501 = renameat */ + { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 502 = symlinkat */ + { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 503 = unlinkat */ { AS(posix_openpt_args), (sy_call_t *)sys_posix_openpt, AUE_POSIX_OPENPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 504 = posix_openpt */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 505 = gssd_syscall */ { AS(freebsd32_jail_get_args), (sy_call_t *)freebsd32_jail_get, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 506 = freebsd32_jail_get */ { AS(freebsd32_jail_set_args), (sy_call_t *)freebsd32_jail_set, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 507 = freebsd32_jail_set */ { AS(jail_remove_args), (sy_call_t *)sys_jail_remove, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 508 = jail_remove */ - { AS(closefrom_args), (sy_call_t *)sys_closefrom, AUE_CLOSEFROM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 509 = closefrom */ + { AS(closefrom_args), (sy_call_t *)sys_closefrom, AUE_CLOSEFROM, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 509 = closefrom */ { AS(freebsd32_semctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 510 = freebsd32_semctl */ { AS(freebsd32_msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 511 = freebsd32_msgctl */ { AS(freebsd32_shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 512 = freebsd32_shmctl */ { AS(lpathconf_args), (sy_call_t *)sys_lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 513 = lpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 514 = obsolete cap_new */ - { AS(__cap_rights_get_args), (sy_call_t *)sys___cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 515 = __cap_rights_get */ - { 0, (sy_call_t *)freebsd32_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 516 = freebsd32_cap_enter */ - { AS(cap_getmode_args), (sy_call_t *)sys_cap_getmode, AUE_CAP_GETMODE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 517 = cap_getmode */ - { AS(pdfork_args), (sy_call_t *)sys_pdfork, AUE_PDFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 518 = pdfork */ - { AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 519 = pdkill */ - { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 520 = pdgetpid */ + { AS(__cap_rights_get_args), (sy_call_t *)sys___cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 515 = __cap_rights_get */ + { 0, (sy_call_t *)sys_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 516 = cap_enter */ + { AS(cap_getmode_args), (sy_call_t *)sys_cap_getmode, AUE_CAP_GETMODE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 517 = cap_getmode */ + { AS(pdfork_args), (sy_call_t *)sys_pdfork, AUE_PDFORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 518 = pdfork */ + { AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 519 = pdkill */ + { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 520 = pdgetpid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 521 = pdwait4 */ - { AS(freebsd32_pselect_args), (sy_call_t *)freebsd32_pselect, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 522 = freebsd32_pselect */ + { AS(freebsd32_pselect_args), (sy_call_t *)freebsd32_pselect, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 522 = freebsd32_pselect */ { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 523 = getloginclass */ { AS(setloginclass_args), (sy_call_t *)sys_setloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 524 = setloginclass */ { AS(rctl_get_racct_args), (sy_call_t *)sys_rctl_get_racct, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 525 = rctl_get_racct */ @@ -605,16 +605,16 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ #endif - { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = cap_rights_limit */ - { AS(freebsd32_cap_ioctls_limit_args), (sy_call_t *)freebsd32_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 534 = freebsd32_cap_ioctls_limit */ - { AS(freebsd32_cap_ioctls_get_args), (sy_call_t *)freebsd32_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = freebsd32_cap_ioctls_get */ - { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */ - { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 537 = cap_fcntls_get */ - { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 538 = bindat */ - { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 539 = connectat */ - { AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 540 = chflagsat */ - { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = accept4 */ - { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 542 = pipe2 */ + { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 533 = cap_rights_limit */ + { AS(freebsd32_cap_ioctls_limit_args), (sy_call_t *)freebsd32_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 534 = freebsd32_cap_ioctls_limit */ + { AS(freebsd32_cap_ioctls_get_args), (sy_call_t *)freebsd32_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 535 = freebsd32_cap_ioctls_get */ + { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */ + { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 537 = cap_fcntls_get */ + { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 538 = bindat */ + { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 539 = connectat */ + { AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 540 = chflagsat */ + { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 541 = accept4 */ + { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 542 = pipe2 */ { AS(freebsd32_aio_mlock_args), (sy_call_t *)freebsd32_aio_mlock, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 543 = freebsd32_aio_mlock */ #ifdef PAD64_REQUIRED { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ @@ -622,8 +622,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ #endif { AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = freebsd32_ppoll */ - { AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 546 = freebsd32_futimens */ - { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ + { AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 546 = freebsd32_futimens */ + { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ { AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 548 = numa_getaffinity */ { AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 549 = numa_setaffinity */ { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 550 = fdatasync */ Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Sep 18 22:03:07 2016 (r305954) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Sep 18 22:03:26 2016 (r305955) @@ -2947,7 +2947,7 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* freebsd32_cap_enter */ + /* cap_enter */ case 516: { *n_args = 0; break; @@ -8224,7 +8224,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* freebsd32_cap_enter */ + /* cap_enter */ case 516: break; /* cap_getmode */ @@ -10582,7 +10582,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_cap_enter */ + /* cap_enter */ case 516: /* cap_getmode */ case 517: From owner-svn-src-all@freebsd.org Mon Sep 19 00:24:10 2016 Return-Path: Delivered-To: svn-src-all@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 94D94BDD3D0; Mon, 19 Sep 2016 00:24:10 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 3190D226; Mon, 19 Sep 2016 00:24:10 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id CB26219C3; Mon, 19 Sep 2016 00:24:08 +0000 (UTC) Subject: Re: svn commit: r305949 - head/usr.bin/soelim To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609181916.u8IJGnG2062423@repo.freebsd.org> From: Allan Jude Message-ID: Date: Sun, 18 Sep 2016 20:24:08 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609181916.u8IJGnG2062423@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 00:24:10 -0000 On 2016-09-18 15:16, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Sep 18 19:16:48 2016 > New Revision: 305949 > URL: https://svnweb.freebsd.org/changeset/base/305949 > > Log: > Simplify the fix for bootstrap tools > > building head is not supported from prior to stable/10 where sys/capsicum.h was > named sys/capabilities.h > > Reported by: kib > > Modified: > head/usr.bin/soelim/soelim.c > > Modified: head/usr.bin/soelim/soelim.c > ============================================================================== > --- head/usr.bin/soelim/soelim.c Sun Sep 18 18:49:18 2016 (r305948) > +++ head/usr.bin/soelim/soelim.c Sun Sep 18 19:16:48 2016 (r305949) > @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); > #include > #if __FreeBSD_version > 1001510 > #include > +#else > +#include I am pretty sure this is spelled: sys/capability.h > #endif > #include > > @@ -163,10 +165,8 @@ main(int argc, char **argv) > int ret = 0; > int flags = 0; > char cwd[MAXPATHLEN]; > -#if __FreeBSD_version > 1001510 > unsigned long cmd; > cap_rights_t rights; > -#endif > > includes = sl_init(); > if (getcwd(cwd, sizeof(cwd)) != NULL) > @@ -200,7 +200,6 @@ main(int argc, char **argv) > rootfd = open("/", O_DIRECTORY | O_RDONLY); > if (rootfd == -1) > err(EXIT_FAILURE, "unable to open '/'"); > -#if __FreeBSD_version > 1001510 > cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_IOCTL); > /* > * EBADF in case stdin is closed by the caller > @@ -227,7 +226,6 @@ main(int argc, char **argv) > > if (cap_enter() < 0 && errno != ENOSYS) > err(EXIT_FAILURE, "unable to enter capability mode"); > -#endif > > if (argc == 0) > ret = soelim_file(rootfd, stdin, flags); > -- Allan Jude From owner-svn-src-all@freebsd.org Mon Sep 19 02:25:31 2016 Return-Path: Delivered-To: svn-src-all@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 94DEBBDFDE8; Mon, 19 Sep 2016 02:25:31 +0000 (UTC) (envelope-from badger@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 4C2B31D0; Mon, 19 Sep 2016 02:25:31 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J2PUCX022950; Mon, 19 Sep 2016 02:25:30 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J2PUvH022948; Mon, 19 Sep 2016 02:25:30 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201609190225.u8J2PUvH022948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Mon, 19 Sep 2016 02:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305956 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 02:25:31 -0000 Author: badger Date: Mon Sep 19 02:25:30 2016 New Revision: 305956 URL: https://svnweb.freebsd.org/changeset/base/305956 Log: Add manpage for rctl_* system calls Reviewed by: trasz, wblock Approved by: kib (mentor) MFC after: 3 days Sponsored by: Dell Technologies Differential Revision: https://reviews.freebsd.org/D7877 Added: head/lib/libc/sys/rctl_add_rule.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Sun Sep 18 22:03:26 2016 (r305955) +++ head/lib/libc/sys/Makefile.inc Mon Sep 19 02:25:30 2016 (r305956) @@ -260,6 +260,7 @@ MAN+= abort2.2 \ pselect.2 \ ptrace.2 \ quotactl.2 \ + rctl_add_rule.2 \ read.2 \ readlink.2 \ reboot.2 \ @@ -423,6 +424,10 @@ MLINKS+=pdfork.2 pdgetpid.2\ pdfork.2 pdwait4.2 MLINKS+=pipe.2 pipe2.2 MLINKS+=poll.2 ppoll.2 +MLINKS+=rctl_add_rule.2 rctl_get_limits.2 \ + rctl_add_rule.2 rctl_get_racct.2 \ + rctl_add_rule.2 rctl_get_rules.2 \ + rctl_add_rule.2 rctl_remove_rule.2 MLINKS+=read.2 pread.2 \ read.2 preadv.2 \ read.2 readv.2 Added: head/lib/libc/sys/rctl_add_rule.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/rctl_add_rule.2 Mon Sep 19 02:25:30 2016 (r305956) @@ -0,0 +1,220 @@ +.\" Copyright (c) 2016 Eric Badger +.\" 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 September 14, 2016 +.Dt RCTL_ADD_RULE 2 +.Os +.Sh NAME +.Nm rctl_add_rule, +.Nm rctl_get_limits +.Nm rctl_get_racct, +.Nm rctl_get_rules, +.Nm rctl_remove_rule +.Nd manipulate and query the resource limits database +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/rctl.h +.Ft int +.Fo rctl_add_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_limits +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_racct +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_rules +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_remove_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Sh DESCRIPTION +These system calls are used to manipulate and query the resource limits +database. +For all functions, +.Fa inbuflen +refers to the length of the buffer pointed to by +.Fa inbufp +and +.Fa outbuflen +refers to the length of the buffer pointed to by +.Fa outbufp . +.Pp +The +.Fn rctl_add_rule +function adds the rule pointed to by +.Fa inbufp +to the resource limits database. +The +.Fa outbufp +and +.Fa outbuflen +arguments are unused. +Rule format is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +.Pp +The +.Fn rctl_get_limits +function returns in +.Fa outbufp +a comma-separated list of rules that apply to the process that +matches the filter specified in +.Fa inbufp . +This includes rules with a subject of the process itself as well as rules +with a different subject (such as user or loginclass) that apply to the +process. +.Pp +The +.Fn rctl_get_racct +function returns resource usage information for a given subject. +The subject is specified by passing a filter in +.Fa inbufp . +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +A comma-separated list of resources and the amount used of each by the +specified subject is returned in +.Fa outbufp . +The resource and amount is formatted as +.Qq resource=amount . +.Pp +The +.Fn rctl_get_rules +function returns in +.Fa outbufp +a comma-separated list of rules from the resource limits database that +match the filter passed in +.Fa inbufp . +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +A filter of +.Va :: +may be passed to return all rules. +.Pp +The +.Fn rctl_remove_rule +function removes all rules matching the filter passed in +.Fa inbufp +from the resource limits database. +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +.Fa outbufp +and +.Fa outbuflen +are unused. +.Sh RULES AND FILTERS +This section explains how the rule and filter format described in +.Xr rctl 8 +differs from the format passed to the system calls themselves. +The rctl tool provides several conveniences that the system calls do not. +When using the system call: +.Bl -dash -offset indent +.It +The subject must be fully specified. +For example, abbreviating +.Ql user +to +.Ql u +is not acceptable. +.It +User and group IDs must be numeric. +For example, +.Ql root +must be expressed as +.Ql 0 . +.It +Units are not permitted on resource amounts. +For example, a quantity of 1024 bytes must be expressed as +.Ql 1024 +and not +.Ql 1k . +.El +.Sh RETURN VALUES +.Rv -std +.Sh ERRORS +The rctl system calls may fail if: +.Bl -tag -width Er +.It Bq Er ENOSYS +RACCT/RCTL support is not present in the kernel or the +.Va kern.racct.enable +sysctl is 0. +.It Bq Er EINVAL +The rule or filter passed in +.Fa inbufp +is invalid. +.It Bq Er EPERM +User has insufficient privileges to carry out the requested operation. +.It Bq Er E2BIG +.Fa inbufp +or +.Fa outbufp +are too large. +.It Bq Er ESRCH +No process matched the provided rule or filter. +.It Bq Er ENAMETOOLONG +The loginclass or jail name specified is too long. +.It Bq Er ERANGE +The rule amount is outside of the allowable range or +.Fa outbufp +is too small. +.It Bq Er EOPNOTSUPP +The requested operation is not supported for the given rule or filter. +.It Bq Er EFAULT +.Fa inbufp +or +.Fa outbufp +refer to invalid addresses. +.El +.Sh SEE ALSO +.Xr rctl 8 +.Sh HISTORY +The rctl family of system calls appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The rctl system calls were developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. +This manual page was written by +.An Eric Badger Aq Mt badger@FreeBSD.org . From owner-svn-src-all@freebsd.org Mon Sep 19 03:02:44 2016 Return-Path: Delivered-To: svn-src-all@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 C3CC6BDF356; Mon, 19 Sep 2016 03:02:44 +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 90D7C144F; Mon, 19 Sep 2016 03:02:44 +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 u8J32hrg038184; Mon, 19 Sep 2016 03:02:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J32hSv038183; Mon, 19 Sep 2016 03:02:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609190302.u8J32hSv038183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 19 Sep 2016 03:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305957 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 03:02:44 -0000 Author: ngie Date: Mon Sep 19 03:02:43 2016 New Revision: 305957 URL: https://svnweb.freebsd.org/changeset/base/305957 Log: Fix typo introduced in r305949 with the stable/10 bootstrapping logic The header is sys/capability.h, not sys/capabilities.h X-MFC with: r305949 Pointyhat to: bapt Reported by: allanjude, Jenkins Sponsored by: Dell EMC Isilon Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Mon Sep 19 02:25:30 2016 (r305956) +++ head/usr.bin/soelim/soelim.c Mon Sep 19 03:02:43 2016 (r305957) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #if __FreeBSD_version > 1001510 #include #else -#include +#include #endif #include From owner-svn-src-all@freebsd.org Mon Sep 19 06:39:09 2016 Return-Path: Delivered-To: svn-src-all@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 2D597BE07F5; Mon, 19 Sep 2016 06:39:09 +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 0018ED17; Mon, 19 Sep 2016 06:39:08 +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 u8J6d8BN016509; Mon, 19 Sep 2016 06:39:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J6d89v016508; Mon, 19 Sep 2016 06:39:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609190639.u8J6d89v016508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 19 Sep 2016 06:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305958 - head/contrib/netbsd-tests/usr.bin/dirname X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:39:09 -0000 Author: ngie Date: Mon Sep 19 06:39:08 2016 New Revision: 305958 URL: https://svnweb.freebsd.org/changeset/base/305958 Log: Remove expected failure for :basic (effectively reverting r305007, r305031) This no longer fails as of r305952 PR: 212193 Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh Modified: head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh Mon Sep 19 03:02:43 2016 (r305957) +++ head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh Mon Sep 19 06:39:08 2016 (r305958) @@ -32,9 +32,6 @@ basic_head() } basic_body() { - # Begin FreeBSD - atf_expect_fail "dirname //usr//bin doesn't return //usr like it used to; bug # 212193" - # End FreeBSD atf_check -o inline:"/\n" dirname / atf_check -o inline:"/\n" dirname // atf_check -o inline:"/usr\n" dirname /usr/bin/ From owner-svn-src-all@freebsd.org Mon Sep 19 06:39:13 2016 Return-Path: Delivered-To: svn-src-all@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 1FAB4BE081C; Mon, 19 Sep 2016 06:39:13 +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 D6492D45; Mon, 19 Sep 2016 06:39:12 +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 u8J6dBrl016570; Mon, 19 Sep 2016 06:39:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J6dBkh016569; Mon, 19 Sep 2016 06:39:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609190639.u8J6dBkh016569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 19 Sep 2016 06:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305959 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:39:13 -0000 Author: bapt Date: Mon Sep 19 06:39:11 2016 New Revision: 305959 URL: https://svnweb.freebsd.org/changeset/base/305959 Log: Revert capsicum support In some corner case VFS lookup is not working and I do not have time to debug it for now. Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Mon Sep 19 06:39:08 2016 (r305958) +++ head/usr.bin/soelim/soelim.c Mon Sep 19 06:39:11 2016 (r305959) @@ -27,24 +27,15 @@ #include __FBSDID("$FreeBSD$"); -#include -#if __FreeBSD_version > 1001510 -#include -#else -#include -#endif #include #include #include -#include -#include #include #include #include #include #include -#include #include #define C_OPTION 0x1 @@ -60,31 +51,18 @@ usage(void) exit(EXIT_FAILURE); } -static const char * -relpath(const char *path) -{ - - while (*path == '/' && *path != '\0') - path++; - - return (path); -} - static FILE * -soelim_fopen(int rootfd, const char *name) +soelim_fopen(const char *name) { - FILE *f = NULL; + FILE *f; char path[PATH_MAX]; size_t i; - int fd; if (strcmp(name, "-") == 0) return (stdin); - if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) { - f = fdopen(fd, "r"); - goto out; - } + if ((f = fopen(name, "r")) != NULL) + return (f); if (*name == '/') { warn("can't open '%s'", name); @@ -94,21 +72,17 @@ soelim_fopen(int rootfd, const char *nam for (i = 0; i < includes->sl_cur; i++) { snprintf(path, sizeof(path), "%s/%s", includes->sl_str[i], name); - if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) { - f = fdopen(fd, "r"); - break; - } + if ((f = fopen(path, "r")) != NULL) + return (f); } -out: - if (f == NULL) - warn("can't open '%s'", name); + warn("can't open '%s'", name); return (f); } static int -soelim_file(int rootfd, FILE *f, int flag) +soelim_file(FILE *f, int flag) { char *line = NULL; char *walk, *cp; @@ -144,7 +118,7 @@ soelim_file(int rootfd, FILE *f, int fla printf("%s", line); continue; } - if (soelim_file(rootfd, soelim_fopen(rootfd, walk), flag) == 1) { + if (soelim_file(soelim_fopen(walk), flag) == 1) { free(line); return (1); } @@ -161,17 +135,11 @@ soelim_file(int rootfd, FILE *f, int fla int main(int argc, char **argv) { - int ch, i, rootfd; + int ch, i; int ret = 0; int flags = 0; - char cwd[MAXPATHLEN]; - unsigned long cmd; - cap_rights_t rights; includes = sl_init(); - if (getcwd(cwd, sizeof(cwd)) != NULL) - sl_add(includes, cwd); - if (includes == NULL) err(EXIT_FAILURE, "sl_init()"); @@ -197,44 +165,13 @@ main(int argc, char **argv) argc -= optind; argv += optind; - rootfd = open("/", O_DIRECTORY | O_RDONLY); - if (rootfd == -1) - err(EXIT_FAILURE, "unable to open '/'"); - cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_IOCTL); - /* - * EBADF in case stdin is closed by the caller - */ - if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS - && errno != EBADF) - err(EXIT_FAILURE, "unable to limit rights for stdin"); - cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); - if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights for stdout"); - if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights for stderr"); - cap_rights_init(&rights, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); - if (cap_rights_limit(rootfd, &rights) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights"); - - cmd = TIOCGETA; - if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stdout"); - if (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stderr"); - if (cap_ioctls_limit(STDIN_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stdin"); - - if (cap_enter() < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to enter capability mode"); - if (argc == 0) - ret = soelim_file(rootfd, stdin, flags); + ret = soelim_file(stdin, flags); for (i = 0; i < argc; i++) - ret = soelim_file(rootfd, soelim_fopen(rootfd, argv[i]), flags); + ret = soelim_file(soelim_fopen(argv[i]), flags); sl_free(includes, 0); - close(rootfd); return (ret); } From owner-svn-src-all@freebsd.org Mon Sep 19 06:42:00 2016 Return-Path: Delivered-To: svn-src-all@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 7D2F8BE0A04; Mon, 19 Sep 2016 06:42:00 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (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 1CDBC27D; Mon, 19 Sep 2016 06:42:00 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x229.google.com with SMTP id 1so139535861wmz.1; Sun, 18 Sep 2016 23:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VAlcW310Qi9piyj8tf1KsfHDSTIFV5jUdiTgyK6vIKY=; b=z0c7TAfCIqLLJzh9pqJ0/x1rGcJQ2E19TTMT8TPFw9nJAtPP2MGaVEPr1N0aMAvpox f+Mp8CZy8gXnM3NJa3pAVJSSwevgAwObuuhmBDHGqlLNAPlzdr9E1cp1VojUR7reZXck q4uD2IliWS6jG4gZFm9N9TNVeMK5GApLF6UIKUMf++sNGGuMIJmPqSnhTtY5sB3eSY5N pGKJPMzRaWQHaV9EJ6UKCV5H5MTAtP6HXR1CLy5qwRvzVREvbdV5uZBgIgrbriDYliWI YZi1Uavl0xO/dMV78mbjkSRFnnhicy8FdB0IrIPXRbBqUpHxtASazY4MepDPtrR5QcGZ B6dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=VAlcW310Qi9piyj8tf1KsfHDSTIFV5jUdiTgyK6vIKY=; b=WUTxXVvr3Mb0JS8+yeng/3uWKxVgAFuTfupdzK/8t80dSS1UpaluLiAk4ESpJGCbX9 kPEMSQ/VyQumJjVP6Rox1pKK2/gviCLYoS2ELdraAvxYeXPSieXqGPMiG0jhUN4aYAfP p81FuJbEqzRfP/2SK3bf0OrUHDjmh42Iro8gfOuK+SrFJLAVNXrJHC9B0OZOmQu2IpBW gFMbyG78RoZu7ifiYes/5OARa9cM4jrhwMW3x56i/eKfvD3OrMn4A3guNxijkO16NSAw 57EghJY8tpiLV5xjZ9ybfzrF1f4yumDtRT4ov1MaNd4Oy/1sDKBcqjnn4K20pz2k3MXC 4a6w== X-Gm-Message-State: AE9vXwOEqo7X/yvzPKtEY5Lz6Rk+ZlmaqTZhYwvuHkF5b/HdE+Gfzqe3NnMS+R40gRarOw== X-Received: by 10.28.167.65 with SMTP id q62mr8198011wme.62.1474267318219; Sun, 18 Sep 2016 23:41:58 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id uw3sm21410605wjb.21.2016.09.18.23.41.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Sep 2016 23:41:57 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 19 Sep 2016 08:41:56 +0200 From: Baptiste Daroussin To: Warner Losh Cc: Allan Jude , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r305949 - head/usr.bin/soelim Message-ID: <20160919064156.qrewh22igpuh7ytr@ivaldir.etoilebsd.net> References: <201609181916.u8IJGnG2062423@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nnsi7yywj2y3prx7" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-08-08) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:42:00 -0000 --nnsi7yywj2y3prx7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 19, 2016 at 12:04:16AM -0600, Warner Losh wrote: > On Sun, Sep 18, 2016 at 11:52 PM, Warner Losh wrote: > > On Sun, Sep 18, 2016 at 11:44 PM, Warner Losh wrote: > >> On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wr= ote: > >>> On 2016-09-18 15:16, Baptiste Daroussin wrote: > >>>> Author: bapt > >>>> Date: Sun Sep 18 19:16:48 2016 > >>>> New Revision: 305949 > >>>> URL: https://svnweb.freebsd.org/changeset/base/305949 > >>>> > >>>> Log: > >>>> Simplify the fix for bootstrap tools > >>>> > >>>> building head is not supported from prior to stable/10 where sys/c= apsicum.h was > >>>> named sys/capabilities.h > >> > >> There's still a lot of people building head on 9.x systems. You sure > >> this is a good idea? > > > > MINIMUM_SUPPORTED_OSREL?=3D 900044 > > > > is the currently listed minimum version. Last time I tried it, it worke= d. >=20 > So in case it wasn't clear, I'd like to request a backout of the > elimination of the #ifdef, or at least permission to add them back > when I can show that 9.x systems still can build HEAD. Unlike clang > requiring c++11 to build, this is a trivial thing to maintain > compatibility. >=20 Agree, I had also other reasons to back out the entire capsicum support. I = will bring it back later (and make sure it can build on FreeBSD 9 Best regards, Bapt --nnsi7yywj2y3prx7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX34iyAAoJEGOJi9zxtz5a1dgP/0gAJejXS3+g97eHHYLVug4k AlR7U8WKdAZ5SIoRL05RW0t+EfVsFH8XB4XO3a1KbsxL48/Mj/+6s9V5p4/wdBFw ELPezznoMTDCN+QFhetCTqJWE336ImkWpj/M+tcdyJqcdGAYhv7unF0k+vQIcimr S5aTfV7K588hCZRWoIG6c7jX+OqXisdQLT3b9qMn4AKG9uBVa8vIKS/YMGsEifGM glam/UMQZ+zhzSGb6cu42Znbd+gXVDqgAelOSvHszowp1dD4vEXpYv0Ao16ENU45 /mXwmeVCla3du2V41SVY7MXHaAaeQG7iwrqPK7xPkKmlhXbGk4o3uF4Dfh9oL81L CG1+Oa/Ypyh3sWuTQdSqL9Hqw7lRuzNa3M65zjaRyM6VbSeqvoyfSOGdKidtb6cA QfVe3gvRBDzTCgS6RINAtSJ7ai3Vt1Q+4QCrqOBzV06zRwvqAPAp5VJCcvSIIF3i a59uJeRe9/Q0agJPKFTTmMBHYoNqcTm/gaYfW7zXezl6nB5hJ0oPqFdx0D8RffUu kcVOawKxSIqUPWrka+2Otd0PwJcRQB0d5Atsx/7jVt39x+xAFz6TtZ1KIzsBETEW F9+ydl95bhiCfRvSENDb3zbDiCeBNg3THhAl89iCp0J5aDkSQnAshUJE7DdW7RbE qx0kEgxVKW9HvhKblD5+ =EF3I -----END PGP SIGNATURE----- --nnsi7yywj2y3prx7-- From owner-svn-src-all@freebsd.org Mon Sep 19 06:42:57 2016 Return-Path: Delivered-To: svn-src-all@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 49A0EBE0ADA for ; Mon, 19 Sep 2016 06:42:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (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 0FC7283C for ; Mon, 19 Sep 2016 06:42:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id 186so62560595itf.0 for ; Sun, 18 Sep 2016 23:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=7x3P3wcHWtH8lrBDG/L54MkpnOsxUV/Te1pIf6pMUx0=; b=wmNRM6nPX78Th07stwASlPkGgoCXYxln0QOxGsMfjK67j8hmD6JHDCh54emsCnWuPC HgE0t6Uq54eHIPHPvFVIT4gHhFLiVx7HD1uEsc9bx9Lo/T0XOlqWblE6UcAJluvFsybh bFPe8ch+za9EZiFie/WqKo2+ntYPPqXEX4x3nBD0rfUPUlhyjyRzSlxkQ8+g2dftg0u4 5+2CRddsdnn5qdTHX9MDkxoDquX0idcvBqHeAHDPXMXyC4T3sSRe9355OGkTmYcZywFd JLK6Q/B9Olow0NDHbTxNso4eKm/75+f3A95uN0bUj+gYP+3FNfn/tFcsxvGGqlIKAmjH k4/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=7x3P3wcHWtH8lrBDG/L54MkpnOsxUV/Te1pIf6pMUx0=; b=Z2qsBNJHmtzXeRyKmsph1medyhy3cUZjIjInG4lnwnSXUfO5X9J6e+y/iDsjGC7wyo kKk/P5Y3bAclyTlwn7uuCEh1Nf/2ZuhzL7D55p84GMSLT04DCLPpmHJqKriu6g+quSjM iF/CjUgKpYUfa393FKJ+9rFIdJx1wozLlUkwPXzWWoeRDpb/s8LPXPF4z0bI0bdcot5S n+Xumoz6bnkR39Vi4yNLu4cIv8gXyLUSeH7yfEPRbVyT5QVrjj0d9oa9eohV8hHFohNG kzK7ABi8SSmubR3jj5DveeDzugJOU3CC2r8tnPTgnX5vTgZdY2AfHDLTlA7/HEeHNI/A xUoQ== X-Gm-Message-State: AE9vXwPoRyzSPbIP/wRwX1+dPeF37/UY8kuNGYC74cT1OX5FnCzaYMlrTartiwfzNWqRkuOeV8ZEXSqtDptlOA== X-Received: by 10.36.158.213 with SMTP id p204mr8264925itd.99.1474267376594; Sun, 18 Sep 2016 23:42:56 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Sun, 18 Sep 2016 23:42:56 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <20160919064156.qrewh22igpuh7ytr@ivaldir.etoilebsd.net> References: <201609181916.u8IJGnG2062423@repo.freebsd.org> <20160919064156.qrewh22igpuh7ytr@ivaldir.etoilebsd.net> From: Warner Losh Date: Mon, 19 Sep 2016 00:42:56 -0600 X-Google-Sender-Auth: KBHU8m4iwi3XRPnp5YjRa8X8RjY Message-ID: Subject: Re: svn commit: r305949 - head/usr.bin/soelim To: Baptiste Daroussin Cc: Allan Jude , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:42:57 -0000 On Mon, Sep 19, 2016 at 12:41 AM, Baptiste Daroussin wrote: > On Mon, Sep 19, 2016 at 12:04:16AM -0600, Warner Losh wrote: >> On Sun, Sep 18, 2016 at 11:52 PM, Warner Losh wrote: >> > On Sun, Sep 18, 2016 at 11:44 PM, Warner Losh wrote: >> >> On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: >> >>> On 2016-09-18 15:16, Baptiste Daroussin wrote: >> >>>> Author: bapt >> >>>> Date: Sun Sep 18 19:16:48 2016 >> >>>> New Revision: 305949 >> >>>> URL: https://svnweb.freebsd.org/changeset/base/305949 >> >>>> >> >>>> Log: >> >>>> Simplify the fix for bootstrap tools >> >>>> >> >>>> building head is not supported from prior to stable/10 where sys/capsicum.h was >> >>>> named sys/capabilities.h >> >> >> >> There's still a lot of people building head on 9.x systems. You sure >> >> this is a good idea? >> > >> > MINIMUM_SUPPORTED_OSREL?= 900044 >> > >> > is the currently listed minimum version. Last time I tried it, it worked. >> >> So in case it wasn't clear, I'd like to request a backout of the >> elimination of the #ifdef, or at least permission to add them back >> when I can show that 9.x systems still can build HEAD. Unlike clang >> requiring c++11 to build, this is a trivial thing to maintain >> compatibility. >> > > Agree, I had also other reasons to back out the entire capsicum support. I will > bring it back later (and make sure it can build on FreeBSD 9 Thanks! I'll be happy to help test or code review if you'd like. Warner From owner-svn-src-all@freebsd.org Mon Sep 19 06:45:07 2016 Return-Path: Delivered-To: svn-src-all@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 BC5FFBE0B93 for ; Mon, 19 Sep 2016 06:45:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (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 84A4EA75 for ; Mon, 19 Sep 2016 06:45:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id 186so62591178itf.0 for ; Sun, 18 Sep 2016 23:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=mgR3+0/pJD3qFGoe9XDVTBiUv5qazjMktqe3JhQXAiI=; b=MQ+D9CLDPEMPO5MpKPtG4tg79VaqXJnWf3ZbmkZKT8tVEJs9LgVXVz4BfhZwASyyYX KhgBZE75xBKml8GKXGW0Z6uVJ5b89AYzoDQ5cKIfeC8j0hByjkclcZV7zrOPY3aOQogB C7VCILVCChaSIGU50Amu7Mw4BprfDyVsnbIytfUx0q2a6CfXd5wy0O1fG19fMh2TeO7y rQDRd/H/SXJw+BZQ9mx+eqUG0pz7cVAhK0Py8GNOouqqgx+1UGUyCF+D37eVKg5iel/5 9vJ8889TcesVMJzpwMaiYzsaOgGeN6Qs8BLVgoA/B78nmlCj6U5FSeukQ1n+JB4L2aD+ Wp/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=mgR3+0/pJD3qFGoe9XDVTBiUv5qazjMktqe3JhQXAiI=; b=IEK0tq6LniiJCnUNG0NJdA8CNBlZ7zbeLhK8+ipvPLW8Zp7w/U/Rzf9TWhHrZ7SZ5u tzVbmtnrwYIwv84dWPETXW0RwwYMcgugWcPGePOL/T7y8CzErWiUCaG30rTGKWZ+yoxB LtJiZync1+7gcWlRem6L2Lafe8N1XgS3qtfRmBUc1lczsBOGLcEsL+4jLH6EXTLseoLy RX3Kw4o7HKENtT0xxpmA2s+zwwm8017Xf8wyoBcVPfgrSbTJfT7B0IAlY7OABJ7h6Z2e gEnYPBCYgWLKqAJPg4dNhEmoAqJNCebWakl4PZDBBQQArCasx0ArEiX+uAL4Jl9tcRWE Nfgg== X-Gm-Message-State: AE9vXwNA3MyATT7o11WUrvQRXgY0Oee8XbW9V2BaVrydjCeeXdRAHeVW0M0DCinxuDlgHVtfzqqvfDLDbVG5QQ== X-Received: by 10.36.212.6 with SMTP id x6mr8380209itg.71.1474263852161; Sun, 18 Sep 2016 22:44:12 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Sun, 18 Sep 2016 22:44:11 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201609181916.u8IJGnG2062423@repo.freebsd.org> From: Warner Losh Date: Sun, 18 Sep 2016 23:44:11 -0600 X-Google-Sender-Auth: llbipHQCNLv8sLQFQBMRiuI2mLk Message-ID: Subject: Re: svn commit: r305949 - head/usr.bin/soelim To: Allan Jude Cc: Baptiste Daroussin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:45:07 -0000 On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: > On 2016-09-18 15:16, Baptiste Daroussin wrote: >> Author: bapt >> Date: Sun Sep 18 19:16:48 2016 >> New Revision: 305949 >> URL: https://svnweb.freebsd.org/changeset/base/305949 >> >> Log: >> Simplify the fix for bootstrap tools >> >> building head is not supported from prior to stable/10 where sys/capsicum.h was >> named sys/capabilities.h There's still a lot of people building head on 9.x systems. You sure this is a good idea? And why does soelim need capsicum anyway in its role as a bootstrap tool? Warner From owner-svn-src-all@freebsd.org Mon Sep 19 06:46:23 2016 Return-Path: Delivered-To: svn-src-all@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 D8A60BE0C25; Mon, 19 Sep 2016 06:46:23 +0000 (UTC) (envelope-from sephe@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 8E425B3A; Mon, 19 Sep 2016 06:46:23 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J6kMj9020128; Mon, 19 Sep 2016 06:46:22 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J6kMN1020127; Mon, 19 Sep 2016 06:46:22 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609190646.u8J6kMN1020127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 19 Sep 2016 06:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305960 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:46:23 -0000 Author: sephe Date: Mon Sep 19 06:46:22 2016 New Revision: 305960 URL: https://svnweb.freebsd.org/changeset/base/305960 Log: hyperv/hn: Apply RSS indirect table fixup before configure RNDIS RSS. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7916 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 06:39:11 2016 (r305959) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 06:46:22 2016 (r305960) @@ -428,6 +428,26 @@ hn_rss_reconfig(struct hn_softc *sc) return (0); } +static void +hn_rss_ind_fixup(struct hn_softc *sc, int nchan) +{ + struct ndis_rssprm_toeplitz *rss = &sc->hn_rss; + int i; + + /* + * Check indirect table to make sure that all channels in it + * can be used. + */ + for (i = 0; i < NDIS_HASH_INDCNT; ++i) { + if (rss->rss_ind[i] >= nchan) { + if_printf(sc->hn_ifp, + "RSS indirect table %d fixup: %u -> %d\n", + i, rss->rss_ind[i], nchan - 1); + rss->rss_ind[i] = nchan - 1; + } + } +} + static int hn_ifmedia_upd(struct ifnet *ifp __unused) { @@ -2112,6 +2132,7 @@ hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) if (error) goto back; + hn_rss_ind_fixup(sc, sc->hn_rx_ring_inuse); error = hn_rss_reconfig(sc); back: HN_UNLOCK(sc); @@ -3265,6 +3286,13 @@ hn_synth_attach(struct hn_softc *sc, int /* TODO: Take ndis_rss_caps.ndis_nind into account. */ for (i = 0; i < NDIS_HASH_INDCNT; ++i) rss->rss_ind[i] = i % nchan; + } else { + /* + * # of usable channels may be changed, so we have to + * make sure that all entries in RSS indirect table + * are valid. + */ + hn_rss_ind_fixup(sc, nchan); } error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE); From owner-svn-src-all@freebsd.org Mon Sep 19 06:54:32 2016 Return-Path: Delivered-To: svn-src-all@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 40731BE0EE6 for ; Mon, 19 Sep 2016 06:54:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (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 08021684 for ; Mon, 19 Sep 2016 06:54:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id m79so82853384ioo.3 for ; Sun, 18 Sep 2016 23:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Vf71ekNyqsOa+Y/wEtHj0nT4murJgkWr/d6gRQjUV68=; b=1s1JsJaIRPva/P+Rl7s3BzdpfYoqNY35Pbkhv+Yln1jMq9G4Yb3bWImyBNjdDi8FPP O3nfXBL8B3jejLckXloXfoKJWJMFD+wd6r4MyLO365PadyyXkcyf/83m015s8u89mrPI Ea5zJCQVQJRX6tVTeZoc63y8jJehuoZA6WGTbLYMWqUDrrQtINqNIcDEiOOgAsxi6TyO Y3wJnkf06Dw6Da4b5c0+8E47kO7DfDTpNqfpG/gi+STn2CrRdJRSEyoU1cKgrG2eVBSg TaWo9WQirpFS9Ixx1Dr+yLLPuEe8jGX66p6Ua5v/N2Y0Xz7zqaRyn3wvv9bj9wEcLRgs 3ifA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Vf71ekNyqsOa+Y/wEtHj0nT4murJgkWr/d6gRQjUV68=; b=Pt+OlK3WSPY9d//rC3T6Jyi1ywW1gQV5FNbA6gtbUD4BqBG+uZOnXsqkwQHKlZWVEM S2391AqmEa9hd/IVHJMJYpINTXNi+z1biFJqXMmHtD+2l+p5tDzkjvFN1brKJrAYLQvp sztDhLK8CI35jCvMd9HOu2KIvJgC/EhsAzjuppUnxoQcTSaNiDAUIsgnJ3opGux4J/fL zI/X46//MPbZjIzzgT0LbCSYjN6ZT1tTK4NwcnS5Zg4odk9t9RRgUM5qWSblEUQqbkI2 /1nip5ESxsL3aqXUHIxYohDvFAZ38begFo9tVTqhlzSgrmX8sP0U3P7I67S1WScOq8ZC /NwA== X-Gm-Message-State: AE9vXwM18hTcQcupIYxmf8YhMGWinnUpW3fvrWjD9KzvD6lB5YGiZxEHq4H0mA8e3Ry5INQW1Y67t9Oilj9xaA== X-Received: by 10.107.184.131 with SMTP id i125mr39638570iof.167.1474264349522; Sun, 18 Sep 2016 22:52:29 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Sun, 18 Sep 2016 22:52:29 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201609181916.u8IJGnG2062423@repo.freebsd.org> From: Warner Losh Date: Sun, 18 Sep 2016 23:52:29 -0600 X-Google-Sender-Auth: -F-utvzMh97-f2wC8ygOIT60nhY Message-ID: Subject: Re: svn commit: r305949 - head/usr.bin/soelim To: Allan Jude Cc: Baptiste Daroussin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:54:32 -0000 On Sun, Sep 18, 2016 at 11:44 PM, Warner Losh wrote: > On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: >> On 2016-09-18 15:16, Baptiste Daroussin wrote: >>> Author: bapt >>> Date: Sun Sep 18 19:16:48 2016 >>> New Revision: 305949 >>> URL: https://svnweb.freebsd.org/changeset/base/305949 >>> >>> Log: >>> Simplify the fix for bootstrap tools >>> >>> building head is not supported from prior to stable/10 where sys/capsicum.h was >>> named sys/capabilities.h > > There's still a lot of people building head on 9.x systems. You sure > this is a good idea? MINIMUM_SUPPORTED_OSREL?= 900044 is the currently listed minimum version. Last time I tried it, it worked. Warner From owner-svn-src-all@freebsd.org Mon Sep 19 06:59:19 2016 Return-Path: Delivered-To: svn-src-all@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 106DCBE001E; Mon, 19 Sep 2016 06:59:19 +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 D461A966; Mon, 19 Sep 2016 06:59:18 +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 u8J6xIDq023864; Mon, 19 Sep 2016 06:59:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J6xHTM023861; Mon, 19 Sep 2016 06:59:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609190659.u8J6xHTM023861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 19 Sep 2016 06:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305961 - in head/lib/libc/tests: net/getaddrinfo sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 06:59:19 -0000 Author: ngie Date: Mon Sep 19 06:59:17 2016 New Revision: 305961 URL: https://svnweb.freebsd.org/changeset/base/305961 Log: Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add it to lib/libc/tests/sys/Makefile [*] Even though make -VPACKAGE and make -n install seem to do the right thing, the effects are a bit different, depending on the build host. MFC after: 1 week Obtained from: HardenedBSD (af602f0db) [*] Reported by: Oliver Pinter [*] Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/net/getaddrinfo/Makefile head/lib/libc/tests/sys/Makefile Modified: head/lib/libc/tests/net/getaddrinfo/Makefile ============================================================================== --- head/lib/libc/tests/net/getaddrinfo/Makefile Mon Sep 19 06:46:22 2016 (r305960) +++ head/lib/libc/tests/net/getaddrinfo/Makefile Mon Sep 19 06:59:17 2016 (r305961) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= tests + TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} .include Modified: head/lib/libc/tests/sys/Makefile ============================================================================== --- head/lib/libc/tests/sys/Makefile Mon Sep 19 06:46:22 2016 (r305960) +++ head/lib/libc/tests/sys/Makefile Mon Sep 19 06:59:17 2016 (r305961) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= tests + .include ATF_TESTS_C+= queue_test From owner-svn-src-all@freebsd.org Mon Sep 19 07:03:33 2016 Return-Path: Delivered-To: svn-src-all@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 6E625BE02BD for ; Mon, 19 Sep 2016 07:03:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (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 35233DAA for ; Mon, 19 Sep 2016 07:03:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id q92so82941324ioi.1 for ; Mon, 19 Sep 2016 00:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9ma3QyS86EwHdjgIHRFXGvVI4XtIq53zZC4cz7L4BjU=; b=dnjbyZ5UkFvwIIwPV8EatWsx0MLqN7HmIVHAsI3AAikX2uf6DNP5c3yH40C3Kgd1dC e7Sf29NIEAUeg2MaMtc8v51tH6qmwvVNXC1Mf7w13cFECkpCr03DGwdemz1C3g0T+gzH 85ObryS7yCdPGBqv9wmS9KdUFU6OCYgHHqpXs3qJy89y0Y1v1COsYW8unuT2rcKg95sE YF2H0wu9AWDWgseTK7zBVxO6Np2g8R2lXyr1LjF4ER01PEtohA3qf4sf27RGNzLbN89D UIq5pd1OOu3ASifCpnj/SYWAfZo13ryHywwk/c+VPeiQL0Tv84EifGZU7GuaJuamLe2B depQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9ma3QyS86EwHdjgIHRFXGvVI4XtIq53zZC4cz7L4BjU=; b=RJGJZUuVWF83vzR0q/VIEG54FlDQmAZxrq+6tpQXC3v8RRlaeZeGr7J15c1Ge0y11i nXafzPRuNHbe0p5WQgZRG0ItqSnrbwFPo+J7cfu5lTSQ6VECuaD31AEjGKZavRRZ6q/X kcqqLOLLOEU6LRzxSx3KqYamoz+xoSt3WltByo9A8rzIbsz7QTJkivrsQAOHcRSoSbu9 kVkm7MQt3ewUxSPx1bjeQKtRxNQGxORYYdQYIdC8BrPPGpnqyeeMunRf6eswuhN5CCWo uJvSJg47k+VkD5fBnBcf/E9eIEfvPmEjIA89aTFGl/XTwZn/NuAhdU18myEX/371bTP/ H4mA== X-Gm-Message-State: AE9vXwPhBBZOrWPJo4Es7F6KeSJkXVuKJ4TnbmFVWcTI61qro/4SagCfls5GLfELDbLMLCzW5BKF2M/UFYXGOA== X-Received: by 10.107.184.131 with SMTP id i125mr39682448iof.167.1474265056574; Sun, 18 Sep 2016 23:04:16 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Sun, 18 Sep 2016 23:04:16 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201609181916.u8IJGnG2062423@repo.freebsd.org> From: Warner Losh Date: Mon, 19 Sep 2016 00:04:16 -0600 X-Google-Sender-Auth: eW6kLhA6fG9xfYtcL2UqTofHMHA Message-ID: Subject: Re: svn commit: r305949 - head/usr.bin/soelim To: Allan Jude Cc: Baptiste Daroussin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 07:03:33 -0000 On Sun, Sep 18, 2016 at 11:52 PM, Warner Losh wrote: > On Sun, Sep 18, 2016 at 11:44 PM, Warner Losh wrote: >> On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: >>> On 2016-09-18 15:16, Baptiste Daroussin wrote: >>>> Author: bapt >>>> Date: Sun Sep 18 19:16:48 2016 >>>> New Revision: 305949 >>>> URL: https://svnweb.freebsd.org/changeset/base/305949 >>>> >>>> Log: >>>> Simplify the fix for bootstrap tools >>>> >>>> building head is not supported from prior to stable/10 where sys/capsicum.h was >>>> named sys/capabilities.h >> >> There's still a lot of people building head on 9.x systems. You sure >> this is a good idea? > > MINIMUM_SUPPORTED_OSREL?= 900044 > > is the currently listed minimum version. Last time I tried it, it worked. So in case it wasn't clear, I'd like to request a backout of the elimination of the #ifdef, or at least permission to add them back when I can show that 9.x systems still can build HEAD. Unlike clang requiring c++11 to build, this is a trivial thing to maintain compatibility. Warner From owner-svn-src-all@freebsd.org Mon Sep 19 07:07:24 2016 Return-Path: Delivered-To: svn-src-all@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 CE085BE03D9; Mon, 19 Sep 2016 07:07:24 +0000 (UTC) (envelope-from sephe@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 9E2BAF19; Mon, 19 Sep 2016 07:07:24 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J77NqO027644; Mon, 19 Sep 2016 07:07:23 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J77NWh027643; Mon, 19 Sep 2016 07:07:23 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609190707.u8J77NWh027643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 19 Sep 2016 07:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305962 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 07:07:24 -0000 Author: sephe Date: Mon Sep 19 07:07:23 2016 New Revision: 305962 URL: https://svnweb.freebsd.org/changeset/base/305962 Log: hyperv/hn: Don't allow NVS and NDIS version change upon reinitailization NVS and NDIS version change would break too much assumption and static configuration. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7919 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 06:59:17 2016 (r305961) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 07:07:23 2016 (r305962) @@ -495,6 +495,22 @@ hn_nvs_init(struct hn_softc *sc) { int i; + if (device_is_attached(sc->hn_dev)) { + /* + * NVS version and NDIS version MUST NOT be changed. + */ + if (bootverbose) { + if_printf(sc->hn_ifp, "reinit NVS version 0x%x, " + "NDIS version %u.%u\n", sc->hn_nvs_ver, + HN_NDIS_VERSION_MAJOR(sc->hn_ndis_ver), + HN_NDIS_VERSION_MINOR(sc->hn_ndis_ver)); + } + return (hn_nvs_doinit(sc, sc->hn_nvs_ver)); + } + + /* + * Find the supported NVS version and set NDIS version accordingly. + */ for (i = 0; i < nitems(hn_nvs_version); ++i) { int error; From owner-svn-src-all@freebsd.org Mon Sep 19 07:07:56 2016 Return-Path: Delivered-To: svn-src-all@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 71DADBE0435; Mon, 19 Sep 2016 07:07:56 +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 44D80117; Mon, 19 Sep 2016 07:07:56 +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 u8J77thA027703; Mon, 19 Sep 2016 07:07:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J77t10027702; Mon, 19 Sep 2016 07:07:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609190707.u8J77t10027702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 19 Sep 2016 07:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305963 - head/tests/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 07:07:56 -0000 Author: ngie Date: Mon Sep 19 07:07:55 2016 New Revision: 305963 URL: https://svnweb.freebsd.org/changeset/base/305963 Log: Reindent TESTSDIR definition for consistency/readability MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/Makefile Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Mon Sep 19 07:07:23 2016 (r305962) +++ head/tests/sys/Makefile Mon Sep 19 07:07:55 2016 (r305963) @@ -1,11 +1,12 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sys +TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file +TESTS_SUBDIRS+= fs TESTS_SUBDIRS+= geom TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue From owner-svn-src-all@freebsd.org Mon Sep 19 07:17:44 2016 Return-Path: Delivered-To: svn-src-all@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 F2849BE07BE; Mon, 19 Sep 2016 07:17:44 +0000 (UTC) (envelope-from sephe@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 D06199BE; Mon, 19 Sep 2016 07:17:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J7HiXg031421; Mon, 19 Sep 2016 07:17:44 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J7HhqC031417; Mon, 19 Sep 2016 07:17:43 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609190717.u8J7HhqC031417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 19 Sep 2016 07:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305964 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 07:17:45 -0000 Author: sephe Date: Mon Sep 19 07:17:43 2016 New Revision: 305964 URL: https://svnweb.freebsd.org/changeset/base/305964 Log: hyperv/hn: Save capabilities for later use. And don't allow capability changes during reinitialization, which breaks too much static configuration. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7922 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 07:07:55 2016 (r305963) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 07:17:43 2016 (r305964) @@ -467,9 +467,15 @@ hn_nvs_conf_ndis(struct hn_softc *sc, in /* NOTE: No response. */ error = hn_nvs_req_send(sc, &conf, sizeof(conf)); - if (error) + if (error) { if_printf(sc->hn_ifp, "send nvs ndis conf failed: %d\n", error); - return (error); + return (error); + } + + if (bootverbose) + if_printf(sc->hn_ifp, "nvs ndis conf done\n"); + sc->hn_caps |= HN_CAP_MTU | HN_CAP_VLAN; + return (0); } static int Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:07:55 2016 (r305963) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:17:43 2016 (r305964) @@ -228,7 +228,8 @@ struct hn_softc { struct vmbus_xact_ctx *hn_xact; uint32_t hn_nvs_ver; - uint32_t hn_flags; + uint32_t hn_caps; /* HN_CAP_ */ + uint32_t hn_flags; /* HN_FLAG_ */ void *hn_rxbuf; uint32_t hn_rxbuf_gpadl; struct hyperv_dma hn_rxbuf_dma; @@ -245,6 +246,16 @@ struct hn_softc { #define HN_FLAG_RXBUF_CONNECTED 0x0001 #define HN_FLAG_CHIM_CONNECTED 0x0002 +#define HN_CAP_VLAN 0x0001 +#define HN_CAP_MTU 0x0002 +#define HN_CAP_IPCS 0x0004 +#define HN_CAP_TCP4CS 0x0008 +#define HN_CAP_TCP6CS 0x0010 +#define HN_CAP_UDP4CS 0x0020 +#define HN_CAP_UDP6CS 0x0040 +#define HN_CAP_TSO4 0x0080 +#define HN_CAP_TSO6 0x0100 + /* * Externs */ Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:07:55 2016 (r305963) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:17:43 2016 (r305964) @@ -325,6 +325,7 @@ static int hn_rx_stat_ulong_sysctl(SYSCT static int hn_tx_stat_ulong_sysctl(SYSCTL_HANDLER_ARGS); static int hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARGS); static int hn_ndis_version_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_caps_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); static int hn_check_iplen(const struct mbuf *, int); @@ -641,6 +642,9 @@ netvsc_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "ndis_version", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_ndis_version_sysctl, "A", "NDIS version"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "caps", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_caps_sysctl, "A", "capabilities"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_key", CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, hn_rss_key_sysctl, "IU", "RSS key"); @@ -2095,6 +2099,30 @@ hn_ndis_version_sysctl(SYSCTL_HANDLER_AR } static int +hn_caps_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + char caps_str[128]; + uint32_t caps; + + HN_LOCK(sc); + caps = sc->hn_caps; + HN_UNLOCK(sc); + snprintf(caps_str, sizeof(caps_str), "%b", caps, + "\020" + "\001VLAN" + "\002MTU" + "\003IPCS" + "\004TCP4CS" + "\005TCP6CS" + "\006UDP4CS" + "\007UDP6CS" + "\010TSO4" + "\011TSO6"); + return sysctl_handle_string(oidp, caps_str, sizeof(caps_str), req); +} + +static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; @@ -3223,6 +3251,11 @@ hn_synth_attach(struct hn_softc *sc, int { struct ndis_rssprm_toeplitz *rss = &sc->hn_rss; int error, nsubch, nchan, i; + uint32_t old_caps; + + /* Save capabilities for later verification. */ + old_caps = sc->hn_caps; + sc->hn_caps = 0; /* * Attach the primary channel _before_ attaching NVS and RNDIS. @@ -3246,6 +3279,17 @@ hn_synth_attach(struct hn_softc *sc, int return (error); /* + * Make sure capabilities are not changed. + */ + if (device_is_attached(sc->hn_dev) && old_caps != sc->hn_caps) { + if_printf(sc->hn_ifp, "caps mismatch old 0x%08x, new 0x%08x\n", + old_caps, sc->hn_caps); + /* Restore old capabilities and abort. */ + sc->hn_caps = old_caps; + return ENXIO; + } + + /* * Allocate sub-channels for multi-TX/RX rings. * * NOTE: Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Mon Sep 19 07:07:55 2016 (r305963) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Mon Sep 19 07:17:43 2016 (r305964) @@ -800,6 +800,7 @@ static int hn_rndis_conf_offload(struct hn_softc *sc) { struct ndis_offload_params params; + uint32_t caps; size_t paramsz; int error; @@ -816,24 +817,29 @@ hn_rndis_conf_offload(struct hn_softc *s } params.ndis_hdr.ndis_size = paramsz; + caps = HN_CAP_IPCS | HN_CAP_TCP4CS | HN_CAP_TCP6CS; params.ndis_ip4csum = NDIS_OFFLOAD_PARAM_TXRX; params.ndis_tcp4csum = NDIS_OFFLOAD_PARAM_TXRX; params.ndis_tcp6csum = NDIS_OFFLOAD_PARAM_TXRX; if (sc->hn_ndis_ver >= HN_NDIS_VERSION_6_30) { + caps |= HN_CAP_UDP4CS | HN_CAP_UDP6CS; params.ndis_udp4csum = NDIS_OFFLOAD_PARAM_TXRX; params.ndis_udp6csum = NDIS_OFFLOAD_PARAM_TXRX; } + caps |= HN_CAP_TSO4; params.ndis_lsov2_ip4 = NDIS_OFFLOAD_LSOV2_ON; /* XXX ndis_lsov2_ip6 = NDIS_OFFLOAD_LSOV2_ON */ error = hn_rndis_set(sc, OID_TCP_OFFLOAD_PARAMETERS, ¶ms, paramsz); if (error) { if_printf(sc->hn_ifp, "offload config failed: %d\n", error); - } else { - if (bootverbose) - if_printf(sc->hn_ifp, "offload config done\n"); + return (error); } - return (error); + + if (bootverbose) + if_printf(sc->hn_ifp, "offload config done\n"); + sc->hn_caps |= caps; + return (0); } int From owner-svn-src-all@freebsd.org Mon Sep 19 07:32:09 2016 Return-Path: Delivered-To: svn-src-all@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 D5DB9BE0F30; Mon, 19 Sep 2016 07:32:09 +0000 (UTC) (envelope-from sephe@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 A64AE6A9; Mon, 19 Sep 2016 07:32:09 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J7W8JW037902; Mon, 19 Sep 2016 07:32:08 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J7W8wa037901; Mon, 19 Sep 2016 07:32:08 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609190732.u8J7W8wa037901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 19 Sep 2016 07:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305965 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 07:32:09 -0000 Author: sephe Date: Mon Sep 19 07:32:08 2016 New Revision: 305965 URL: https://svnweb.freebsd.org/changeset/base/305965 Log: hyperv/hn: Don't allow MTU change, if it is not supported by the NVS. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7923 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:17:43 2016 (r305964) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:32:08 2016 (r305965) @@ -1572,6 +1572,13 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, HN_LOCK(sc); + if ((sc->hn_caps & HN_CAP_MTU) == 0) { + /* Can't change MTU */ + HN_UNLOCK(sc); + error = EOPNOTSUPP; + break; + } + if (ifp->if_mtu == ifr->ifr_mtu) { HN_UNLOCK(sc); break; From owner-svn-src-all@freebsd.org Mon Sep 19 07:39:43 2016 Return-Path: Delivered-To: svn-src-all@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 73E52BE0302; Mon, 19 Sep 2016 07:39:43 +0000 (UTC) (envelope-from sephe@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 415ED985; Mon, 19 Sep 2016 07:39:43 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J7dg6I038792; Mon, 19 Sep 2016 07:39:42 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J7dge6038791; Mon, 19 Sep 2016 07:39:42 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609190739.u8J7dge6038791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 19 Sep 2016 07:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305966 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 07:39:43 -0000 Author: sephe Date: Mon Sep 19 07:39:42 2016 New Revision: 305966 URL: https://svnweb.freebsd.org/changeset/base/305966 Log: hyperv/hn: Stringent RSS sysctl checks - Don't change RNDIS RSS configuration for RSS key sysctl, if the interface is not capable of RSS yet. - Don't change RSS indirect table (both cached one and RNDIS RSS configuration), if the interface is not capable of RSS yet. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7924 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:32:08 2016 (r305965) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:39:42 2016 (r305966) @@ -435,6 +435,8 @@ hn_rss_ind_fixup(struct hn_softc *sc, in struct ndis_rssprm_toeplitz *rss = &sc->hn_rss; int i; + KASSERT(nchan > 1, ("invalid # of channels %d", nchan)); + /* * Check indirect table to make sure that all channels in it * can be used. @@ -2145,7 +2147,12 @@ hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) if (error) goto back; - error = hn_rss_reconfig(sc); + if (sc->hn_rx_ring_inuse > 1) { + error = hn_rss_reconfig(sc); + } else { + /* Not RSS capable, at least for now; just save the RSS key. */ + error = 0; + } back: HN_UNLOCK(sc); return (error); @@ -2163,6 +2170,15 @@ hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) if (error || req->newptr == NULL) goto back; + /* + * Don't allow RSS indirect table change, if this interface is not + * RSS capable currently. + */ + if (sc->hn_rx_ring_inuse == 1) { + error = EOPNOTSUPP; + goto back; + } + error = SYSCTL_IN(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); if (error) goto back; From owner-svn-src-all@freebsd.org Mon Sep 19 07:47:58 2016 Return-Path: Delivered-To: svn-src-all@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 403A8BE0782; Mon, 19 Sep 2016 07:47:58 +0000 (UTC) (envelope-from sephe@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 05AB3E35; Mon, 19 Sep 2016 07:47:57 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J7lvMI042591; Mon, 19 Sep 2016 07:47:57 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J7lvEF042589; Mon, 19 Sep 2016 07:47:57 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609190747.u8J7lvEF042589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 19 Sep 2016 07:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305967 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 07:47:58 -0000 Author: sephe Date: Mon Sep 19 07:47:56 2016 New Revision: 305967 URL: https://svnweb.freebsd.org/changeset/base/305967 Log: hyperv/hn: Allow RSS capability flipping upon attach/reinit. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7927 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:39:42 2016 (r305966) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:47:56 2016 (r305967) @@ -245,6 +245,8 @@ struct hn_softc { #define HN_FLAG_RXBUF_CONNECTED 0x0001 #define HN_FLAG_CHIM_CONNECTED 0x0002 +#define HN_FLAG_HAS_RSSKEY 0x0004 +#define HN_FLAG_HAS_RSSIND 0x0008 #define HN_CAP_VLAN 0x0001 #define HN_CAP_MTU 0x0002 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:39:42 2016 (r305966) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:47:56 2016 (r305967) @@ -2146,6 +2146,7 @@ hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) error = SYSCTL_IN(req, sc->hn_rss.rss_key, sizeof(sc->hn_rss.rss_key)); if (error) goto back; + sc->hn_flags |= HN_FLAG_HAS_RSSKEY; if (sc->hn_rx_ring_inuse > 1) { error = hn_rss_reconfig(sc); @@ -2182,6 +2183,7 @@ hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) error = SYSCTL_IN(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); if (error) goto back; + sc->hn_flags |= HN_FLAG_HAS_RSSIND; hn_rss_ind_fixup(sc, sc->hn_rx_ring_inuse); error = hn_rss_reconfig(sc); @@ -3335,24 +3337,29 @@ hn_synth_attach(struct hn_softc *sc, int * are allocated. */ - if (!device_is_attached(sc->hn_dev)) { + if ((sc->hn_flags & HN_FLAG_HAS_RSSKEY) == 0) { /* - * Setup default RSS key and indirect table for the - * attach DEVMETHOD. They can be altered later on, - * so don't mess them up once this interface is attached. + * RSS key is not set yet; set it to the default RSS key. */ - if (bootverbose) { - if_printf(sc->hn_ifp, "setup default RSS key and " - "indirect table\n"); - } - - /* Setup default RSS key. */ + if (bootverbose) + if_printf(sc->hn_ifp, "setup default RSS key\n"); memcpy(rss->rss_key, hn_rss_key_default, sizeof(rss->rss_key)); + sc->hn_flags |= HN_FLAG_HAS_RSSKEY; + } - /* Setup default RSS indirect table. */ + if ((sc->hn_flags & HN_FLAG_HAS_RSSIND) == 0) { + /* + * RSS indirect table is not set yet; set it up in round- + * robin fashion. + */ + if (bootverbose) { + if_printf(sc->hn_ifp, "setup default RSS indirect " + "table\n"); + } /* TODO: Take ndis_rss_caps.ndis_nind into account. */ for (i = 0; i < NDIS_HASH_INDCNT; ++i) rss->rss_ind[i] = i % nchan; + sc->hn_flags |= HN_FLAG_HAS_RSSIND; } else { /* * # of usable channels may be changed, so we have to From owner-svn-src-all@freebsd.org Mon Sep 19 08:51:28 2016 Return-Path: Delivered-To: svn-src-all@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 807FEBE0B04; Mon, 19 Sep 2016 08:51:28 +0000 (UTC) (envelope-from trasz@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 51AE185; Mon, 19 Sep 2016 08:51:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J8pR1B068199; Mon, 19 Sep 2016 08:51:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J8pRDD068198; Mon, 19 Sep 2016 08:51:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609190851.u8J8pRDD068198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 19 Sep 2016 08:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305968 - head/etc/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 08:51:28 -0000 Author: trasz Date: Mon Sep 19 08:51:27 2016 New Revision: 305968 URL: https://svnweb.freebsd.org/changeset/base/305968 Log: Make autofs use the "async" flag for msdosfs and ufs filesystems mounted on /media. MFC after: 1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media ============================================================================== --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 (r305967) +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) @@ -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-all@freebsd.org Mon Sep 19 08:55:37 2016 Return-Path: Delivered-To: svn-src-all@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 6EA28BE0B8F; Mon, 19 Sep 2016 08:55:37 +0000 (UTC) (envelope-from trasz@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 312BD3E7; Mon, 19 Sep 2016 08:55:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8J8taGI069072; Mon, 19 Sep 2016 08:55:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J8taOh069071; Mon, 19 Sep 2016 08:55:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609190855.u8J8taOh069071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 19 Sep 2016 08:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305969 - head/etc/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 08:55:37 -0000 Author: trasz Date: Mon Sep 19 08:55:36 2016 New Revision: 305969 URL: https://svnweb.freebsd.org/changeset/base/305969 Log: Make autofs use the "noatime" flag for msdosfs, ntfs, and ufs filesystems mounted on /media. MFC after: 1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media ============================================================================== --- head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) +++ head/etc/autofs/special_media Mon Sep 19 08:55:36 2016 (r305969) @@ -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-all@freebsd.org Mon Sep 19 09:15:14 2016 Return-Path: Delivered-To: svn-src-all@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 099D9BDF176; Mon, 19 Sep 2016 09:15:14 +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 D0D60EFD; Mon, 19 Sep 2016 09:15:13 +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 u8J9FDOC076514; Mon, 19 Sep 2016 09:15:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8J9FDWA076513; Mon, 19 Sep 2016 09:15:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609190915.u8J9FDWA076513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 19 Sep 2016 09:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305970 - head/tests/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 09:15:14 -0000 Author: ngie Date: Mon Sep 19 09:15:12 2016 New Revision: 305970 URL: https://svnweb.freebsd.org/changeset/base/305970 Log: Remove change accidentally committed via r305963 for upcoming tests/sys/fs/... work MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/Makefile Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Mon Sep 19 08:55:36 2016 (r305969) +++ head/tests/sys/Makefile Mon Sep 19 09:15:12 2016 (r305970) @@ -6,7 +6,6 @@ TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file -TESTS_SUBDIRS+= fs TESTS_SUBDIRS+= geom TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue From owner-svn-src-all@freebsd.org Mon Sep 19 12:34:30 2016 Return-Path: Delivered-To: svn-src-all@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 23C6FBE1CB3; Mon, 19 Sep 2016 12:34:30 +0000 (UTC) (envelope-from bde@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 EA888E5F; Mon, 19 Sep 2016 12:34:29 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JCYTO4052935; Mon, 19 Sep 2016 12:34:29 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JCYTUo052934; Mon, 19 Sep 2016 12:34:29 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609191234.u8JCYTUo052934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Mon, 19 Sep 2016 12:34: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: r305971 - stable/11/lib/msun/src X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 12:34:30 -0000 Author: bde Date: Mon Sep 19 12:34:28 2016 New Revision: 305971 URL: https://svnweb.freebsd.org/changeset/base/305971 Log: MFC r305380: Fix missing fmodl() on arches with 53-bit long doubles. PR: 199422, 211965 Modified: stable/11/lib/msun/src/e_fmod.c Modified: stable/11/lib/msun/src/e_fmod.c ============================================================================== --- stable/11/lib/msun/src/e_fmod.c Mon Sep 19 09:15:12 2016 (r305970) +++ stable/11/lib/msun/src/e_fmod.c Mon Sep 19 12:34:28 2016 (r305971) @@ -20,6 +20,8 @@ __FBSDID("$FreeBSD$"); * Method: shift and subtract */ +#include + #include "math.h" #include "math_private.h" @@ -130,3 +132,7 @@ __ieee754_fmod(double x, double y) } return x; /* exact output */ } + +#if (LDBL_MANT_DIG == 53) +__weak_reference(fmod, fmodl); +#endif From owner-svn-src-all@freebsd.org Mon Sep 19 13:12:10 2016 Return-Path: Delivered-To: svn-src-all@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 CC17BBE00A2; Mon, 19 Sep 2016 13:12:10 +0000 (UTC) (envelope-from andrew@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 8394C1B00; Mon, 19 Sep 2016 13:12:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JDC9lQ067466; Mon, 19 Sep 2016 13:12:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JDC9Eh067465; Mon, 19 Sep 2016 13:12:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609191312.u8JDC9Eh067465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 19 Sep 2016 13:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305972 - in head/contrib/cortex-strings: . reference tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 13:12:10 -0000 Author: andrew Date: Mon Sep 19 13:12:09 2016 New Revision: 305972 URL: https://svnweb.freebsd.org/changeset/base/305972 Log: Import the Linaro Cortex Strings library into contrib. Sponsored by: The FreeBSD Foundation Added: head/contrib/cortex-strings/ - copied from r305970, vendor/cortex-strings/dist/ Deleted: head/contrib/cortex-strings/reference/ head/contrib/cortex-strings/tests/ From owner-svn-src-all@freebsd.org Mon Sep 19 14:36:17 2016 Return-Path: Delivered-To: svn-src-all@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 66F84BE1581; Mon, 19 Sep 2016 14:36:17 +0000 (UTC) (envelope-from andrew@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 34666A8C; Mon, 19 Sep 2016 14:36:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JEaGWa098927; Mon, 19 Sep 2016 14:36:16 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JEaGEK098923; Mon, 19 Sep 2016 14:36:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609191436.u8JEaGEK098923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 19 Sep 2016 14:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305973 - head/contrib/cortex-strings/src/aarch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 14:36:17 -0000 Author: andrew Date: Mon Sep 19 14:36:16 2016 New Revision: 305973 URL: https://svnweb.freebsd.org/changeset/base/305973 Log: Fix the asm on the memchr and strchr functions. Add an alias from index to strchr as is done in the libc C implementation. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/contrib/cortex-strings/src/aarch64/memchr.S head/contrib/cortex-strings/src/aarch64/strchr.S head/contrib/cortex-strings/src/aarch64/strchrnul.S Modified: head/contrib/cortex-strings/src/aarch64/memchr.S ============================================================================== --- head/contrib/cortex-strings/src/aarch64/memchr.S Mon Sep 19 13:12:09 2016 (r305972) +++ head/contrib/cortex-strings/src/aarch64/memchr.S Mon Sep 19 14:36:16 2016 (r305973) @@ -107,7 +107,7 @@ def_fn memchr and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ addp vend.16b, vend.16b, vend.16b /* 128->64 */ - mov synd, vend.2d[0] + mov synd, vend.d[0] /* Clear the soff*2 lower bits */ lsl tmp, soff, #1 lsr synd, synd, tmp @@ -127,7 +127,7 @@ def_fn memchr /* Use a fast check for the termination condition */ orr vend.16b, vhas_chr1.16b, vhas_chr2.16b addp vend.2d, vend.2d, vend.2d - mov synd, vend.2d[0] + mov synd, vend.d[0] /* We're not out of data, loop if we haven't found the character */ cbz synd, .Lloop @@ -137,7 +137,7 @@ def_fn memchr and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ addp vend.16b, vend.16b, vend.16b /* 128->64 */ - mov synd, vend.2d[0] + mov synd, vend.d[0] /* Only do the clear for the last possible block */ b.hi .Ltail Modified: head/contrib/cortex-strings/src/aarch64/strchr.S ============================================================================== --- head/contrib/cortex-strings/src/aarch64/strchr.S Mon Sep 19 13:12:09 2016 (r305972) +++ head/contrib/cortex-strings/src/aarch64/strchr.S Mon Sep 19 14:36:16 2016 (r305973) @@ -78,7 +78,13 @@ \f: .endm + .macro def_alias f a + .weak \a + .set \a,\f + .endm + def_fn strchr +def_alias strchr index /* Magic constant 0x40100401 to allow us to identify which lane matches the requested byte. Magic constant 0x80200802 used similarly for NUL termination. */ @@ -113,7 +119,7 @@ def_fn strchr addp vend1.16b, vend1.16b, vend2.16b // 128->64 lsr tmp1, tmp3, tmp1 - mov tmp3, vend1.2d[0] + mov tmp3, vend1.d[0] bic tmp1, tmp3, tmp1 // Mask padding bits. cbnz tmp1, .Ltail @@ -128,7 +134,7 @@ def_fn strchr orr vend2.16b, vhas_nul2.16b, vhas_chr2.16b orr vend1.16b, vend1.16b, vend2.16b addp vend1.2d, vend1.2d, vend1.2d - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] cbz tmp1, .Lloop /* Termination condition found. Now need to establish exactly why @@ -142,7 +148,7 @@ def_fn strchr addp vend1.16b, vend1.16b, vend2.16b // 256->128 addp vend1.16b, vend1.16b, vend2.16b // 128->64 - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] .Ltail: /* Count the trailing zeros, by bit reversing... */ rbit tmp1, tmp1 Modified: head/contrib/cortex-strings/src/aarch64/strchrnul.S ============================================================================== --- head/contrib/cortex-strings/src/aarch64/strchrnul.S Mon Sep 19 13:12:09 2016 (r305972) +++ head/contrib/cortex-strings/src/aarch64/strchrnul.S Mon Sep 19 14:36:16 2016 (r305973) @@ -105,7 +105,7 @@ def_fn strchrnul addp vend1.16b, vend1.16b, vend1.16b // 128->64 lsr tmp1, tmp3, tmp1 - mov tmp3, vend1.2d[0] + mov tmp3, vend1.d[0] bic tmp1, tmp3, tmp1 // Mask padding bits. cbnz tmp1, .Ltail @@ -120,7 +120,7 @@ def_fn strchrnul orr vhas_chr2.16b, vhas_nul2.16b, vhas_chr2.16b orr vend1.16b, vhas_chr1.16b, vhas_chr2.16b addp vend1.2d, vend1.2d, vend1.2d - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] cbz tmp1, .Lloop /* Termination condition found. Now need to establish exactly why @@ -130,7 +130,7 @@ def_fn strchrnul addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 addp vend1.16b, vend1.16b, vend1.16b // 128->64 - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] .Ltail: /* Count the trailing zeros, by bit reversing... */ rbit tmp1, tmp1 From owner-svn-src-all@freebsd.org Mon Sep 19 15:08:05 2016 Return-Path: Delivered-To: svn-src-all@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 0881BBE1D59; Mon, 19 Sep 2016 15:08:05 +0000 (UTC) (envelope-from andrew@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 CA522C83; Mon, 19 Sep 2016 15:08:04 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JF83Pu010045; Mon, 19 Sep 2016 15:08:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JF833v010044; Mon, 19 Sep 2016 15:08:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609191508.u8JF833v010044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 19 Sep 2016 15:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305974 - head/lib/libc/aarch64/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 15:08:05 -0000 Author: andrew Date: Mon Sep 19 15:08:03 2016 New Revision: 305974 URL: https://svnweb.freebsd.org/changeset/base/305974 Log: Attach the cortex strings library to the build. Only a subset of functions have been added as some don't seem to be improvements over the libc C implementation. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Added: head/lib/libc/aarch64/string/ head/lib/libc/aarch64/string/Makefile.inc (contents, props changed) Added: head/lib/libc/aarch64/string/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/string/Makefile.inc Mon Sep 19 15:08:03 2016 (r305974) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# String handling from the Cortex Strings library +# https://git.linaro.org/toolchain/cortex-strings.git +# + +.PATH: ${LIBC_SRCTOP}/../../contrib/cortex-strings/src/aarch64 + +MDSRCS+=memchr.S \ + memcmp.S \ + memcpy.S \ + memmove.S \ + memset.S \ + strchr.S \ + strcmp.S \ + strcpy.S \ + strlen.S \ + strncmp.S \ + strnlen.S From owner-svn-src-all@freebsd.org Mon Sep 19 15:17:40 2016 Return-Path: Delivered-To: svn-src-all@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 2EA88BE0060; Mon, 19 Sep 2016 15:17:40 +0000 (UTC) (envelope-from gjb@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 D9F611F7; Mon, 19 Sep 2016 15:17:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JFHdiW013974; Mon, 19 Sep 2016 15:17:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JFHdNb013973; Mon, 19 Sep 2016 15:17:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609191517.u8JFHdNb013973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Sep 2016 15:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r305975 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 15:17:40 -0000 Author: gjb Date: Mon Sep 19 15:17:38 2016 New Revision: 305975 URL: https://svnweb.freebsd.org/changeset/base/305975 Log: Remove entry for r304246. Update entry for r299142. Update entry for r260910. Add entry for r296277. Submitted by: jhb, vangyzen Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 15:08:03 2016 (r305974) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 15:17:38 2016 (r305975) @@ -215,9 +215,8 @@ Allow &man.pciconf.8; to identify PCI devices that are attached to a driver to be identified by their device name instead of just the selector. Additionally, - an optional device argument to the -l flag - to restrict the output to only listing details about a single - device. + the -l flag now accepts an optional device + argument to list details about a single device. A new flag, onifconsole has been added to /etc/ttys. This allows @@ -1070,6 +1069,16 @@ KERN_DEBUGDIR="" to &man.src.conf.5;. + Support for POSIX asynchronous I/O is + now included in the kernel by default. The + VFS_AIOkernel option and + aio.ko kernel module have been removed. + Asynchronous I/O operations on sockets, local files, and + disk devices are permitted by default. However, operations + on other file types are disabled. See the &man.aio.4; + manual page for more details. + &arch.arm64; has been switched over to using INTRNG by default. @@ -1356,12 +1365,14 @@ Hardware Support - Native PCI-express HotPlug - support is enabled by default on &arch.amd64;, &arch.arm64; and - &arch.powerpc; - - PCI-express HotPlug support has been - enabled for slots with power controllers + Native PCI-express HotPlug support is + enabled by default on &arch.amd64;, &arch.arm64;, and + &arch.powerpc;. This feature has exposed compatibility issues + on some hardware that result in missing devices or a hang + during boot. To work around such issues, run set + hw.pci.enable_pcie_hp=0 in the boot loader, and + add hw.pci.enable_pcie_hp=0 to + /boot/loader.conf. The &man.asmc.4; driver has been updated to support the &apple; MacMini 3,1. From owner-svn-src-all@freebsd.org Mon Sep 19 15:39:26 2016 Return-Path: Delivered-To: svn-src-all@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 11675BE06CC; Mon, 19 Sep 2016 15:39:26 +0000 (UTC) (envelope-from gjb@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 CEF811AB; Mon, 19 Sep 2016 15:39:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JFdPU8021883; Mon, 19 Sep 2016 15:39:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JFdPtG021882; Mon, 19 Sep 2016 15:39:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609191539.u8JFdPtG021882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Sep 2016 15:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r305976 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 15:39:26 -0000 Author: gjb Date: Mon Sep 19 15:39:24 2016 New Revision: 305976 URL: https://svnweb.freebsd.org/changeset/base/305976 Log: Whitespace fixes to the 11.0 release notes. No content changes. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 15:17:38 2016 (r305975) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 15:39:24 2016 (r305976) @@ -193,15 +193,16 @@ The MK_ARM_EABI &man.src.conf.5; option has been removed. - The WITH_SYSTEM_COMPILER - &man.src.conf.5; option is enabled by default. + The + WITH_SYSTEM_COMPILER &man.src.conf.5; + option is enabled by default. The ntp suite has been updated to version 4.2.8p8. The - /etc/ntp/leap-seconds - has been updated to version 3676752000. + /etc/ntp/leap-seconds has been updated to + version 3676752000. @@ -468,10 +469,11 @@ system. By default the &man.ifconfig.8; utility - will set the default regulatory domain to FCC - on wireless interfaces. As a result, newly created wireless - interfaces with default settings will have less chances to - violate country-specific regulations. + will set the default regulatory domain to + FCC on wireless interfaces. As a result, + newly created wireless interfaces with default settings will + have less chances to violate country-specific + regulations. @@ -486,8 +488,8 @@ SSHv1 support has been removed from OpenSSH. - Support for DSA is disabled by default in - OpenSSH. + Support for DSA is disabled by default + in OpenSSH. mdocml has been updated to version 1.12.3. @@ -627,39 +629,39 @@ compiler_rt utility has been updated to version 3.8.0. - ACPICA has been - updated to version 20160527. + ACPICA has + been updated to version 20160527. - OpenBSM has been - updated to version 1.2 alpha 4. + OpenBSM has + been updated to version 1.2 alpha 4. libucl has been updated to version 0.8.0. - The NetBSD - Project's &man.libblacklist.3; library and applications + The + NetBSD Project's &man.libblacklist.3; library and applications have been ported and integrated into the system. Packet filtering support for the &man.pf.4; packet filtering systems - has been implemented. The blacklist - system provides the blacklistd - daemon, the helper script - blacklistd-helper to make changes - to the running packet filter system and the + has been implemented. The + blacklist system provides the + blacklistd daemon, the helper + script blacklistd-helper to make + changes to the running packet filter system and the blacklistctl control program. A selection of system daemons, including: fingerd, ftpd, rlogind, and rshd have been modified to support - sending notifications to the blacklistd - daemon. + sending notifications to the + blacklistd daemon. - Support for - the &man.ipfw.4; packet filter has been added to the + Support + for the &man.ipfw.4; packet filter has been added to the blacklistd-helper script. - Support for - the &man.ipfilter.4; packet filter has been added to the + Support + for the &man.ipfilter.4; packet filter has been added to the blacklistd-helper script. @@ -1034,7 +1036,7 @@ configuration by default. A new kernel configuration option, + sponsor="&limelight;">A new kernel configuration option, EM_MULTIQUEUE, has been added which enables multi-queue support in the &man.em.4; driver. @@ -1071,16 +1073,16 @@ Support for POSIX asynchronous I/O is - now included in the kernel by default. The - VFS_AIOkernel option and - aio.ko kernel module have been removed. - Asynchronous I/O operations on sockets, local files, and - disk devices are permitted by default. However, operations - on other file types are disabled. See the &man.aio.4; - manual page for more details. + now included in the kernel by default. The + VFS_AIOkernel option and + aio.ko kernel module have been removed. + Asynchronous I/O operations on sockets, local files, and + disk devices are permitted by default. However, operations + on other file types are disabled. See the &man.aio.4; + manual page for more details. &arch.arm64; has been switched over to using + arch="arm64">&arch.arm64; has been switched over to using INTRNG by default. @@ -1251,9 +1253,9 @@ The &man.ctl.4; driver has been updated to support CD-ROM and removable devices. - The &man.isp.4; driver has - been updated and improved: added support for 16Gbps FC cards, - improved target mode support, completed Multi-ID (NPIV) + The &man.isp.4; driver + has been updated and improved: added support for 16Gbps FC + cards, improved target mode support, completed Multi-ID (NPIV) functionality. @@ -1471,8 +1473,8 @@ updated to support DSM TRIM commands for virtual AHCI disks. - Native graphics support has been added to - the &man.bhyve.8; hypervisor. + Native graphics support has been added + to the &man.bhyve.8; hypervisor. Support for the QEMU virt system @@ -1510,8 +1512,9 @@ to include support for blkif indirect segment I/O. - Indirect segment I/O is enabled by default - in the Xen blkfront driver when running on AWS EC2. + Indirect segment I/O is enabled by + default in the Xen blkfront driver when running on AWS + EC2. @@ -1571,27 +1574,28 @@ &man.ow.temp.4; for more information. Support for the HiSilicon HI6220 SoC has been - added. + sponsor="&abt;">Support for the HiSilicon HI6220 SoC has + been added. The second CPU core on Allwinner A20 SoC have been enabled. - Support for the Allwinner H3 SoC - has been added. + Support for the Allwinner H3 + SoC has been added. - Support for X-Powers AXP813 and - AXP818 power management integrated circuits have been added. + Support for X-Powers AXP813 + and AXP818 power management integrated circuits have been + added. Support for GPIO, Sensors and - interrupts on AXP209 power management integrated circuits have been - added. + interrupts on AXP209 power management integrated circuits have + been added. Support for the Allwinner Reduced Serial Bus (RSB) has been added. - Support for Allwinner A20 HDMI - has been added. + Support for Allwinner A20 + HDMI has been added. @@ -1637,19 +1641,22 @@ GELI-backed SSD storage providers. - - Leading spaces are now stripped off SCSI disk serial - numbers when populating the CAM serial number. This affects the output of - &man.diskinfo.8; and the names of /dev/diskid/DISK-* - device nodes, among other things. - - - Support for managing Shingled Magnetic Recording (SMR) drives - has been added. + Leading spaces are now stripped off + SCSI disk serial numbers when populating + the CAM serial number. This affects the output of + &man.diskinfo.8; and the names of + /dev/diskid/DISK-* device nodes, among + other things. + + Support for managing Shingled + Magnetic Recording (SMR) drives has been added. The - &man.camcontrol.8; command can manually force updating capacity - data after a disk gets resized using the reprobe subcommand. + &man.camcontrol.8; command can manually force updating + capacity data after a disk gets resized using the reprobe + subcommand. @@ -1670,11 +1677,11 @@ noac, and proto options have been added to &man.mount.nfs.8;. - The Mellanox implementation of iSER (iSCSI - Extensions for RDMA) has been imported. + The Mellanox implementation of iSER + (iSCSI Extensions for RDMA) has been imported. - The ability to discover iSCSI targets without - having to attach to a target has been added to the + The ability to discover iSCSI targets + without having to attach to a target has been added to the &man.iscsictl.8; command. @@ -1695,17 +1702,18 @@ account when gathering buffers to be written to the l2arc device. - The zfsd daemon has been added, - which manages hotspares and replements in drive slots that publish - physical paths. - - The - minimum and maximum values for the ZFS adaptive replacement - cache can be modified at runtime. + The zfsd daemon has been added, which manages + hotspares and replements in drive slots that publish physical + paths. + + The minimum and maximum values for the + ZFS adaptive replacement cache can be modified at + runtime. - Four new - resources have been added to &man.rctl.8; to allow + Four + new resources have been added to &man.rctl.8; to allow throttles to be set on filesystem IO. @@ -1771,8 +1779,9 @@ ttyu2, and ttyu3 by default, if the callin port is an active console port. - The default installation directory for modules - has been changed to /boot/modules. + The default installation directory for + modules has been changed to + /boot/modules. @@ -1788,11 +1797,12 @@ This section describes changes that affect networking in &os;. - The unused SIOCSIFALIFETIME_IN6 - ioctl has been removed. + The unused + SIOCSIFALIFETIME_IN6 ioctl has been + removed. - Support to - be able to reroot into a NFSv4 volume has been added. + Support + to be able to reroot into a NFSv4 volume has been added. Network Protocols @@ -1892,8 +1902,9 @@ network stack has been updated to fix handling of IPv6 On-Link redirects. - The net.inet.tcp.ecn.enable sysctl mib has been - changed from a binary off/on control to a three way setting. + The net.inet.tcp.ecn.enable sysctl mib + has been changed from a binary off/on control to a three way + setting. @@ -1905,7 +1916,6 @@ Description - 0 @@ -1914,23 +1924,22 @@ 1 - Enable ECN if incoming connections request it. Outgoing - connections will request ECN. + Enable ECN if incoming connections request it. + Outgoing connections will request ECN. 2 - Enable ECN if incoming connections request it. Outgoing - conections will not request ECN. + Enable ECN if incoming connections request it. + Outgoing conections will not request ECN. - - Dummynet AQM, an independent implementation of - CoDel and FQ-CoDel for ipfw/dummynet has been imported to the base - system. + Dummynet AQM, an independent + implementation of CoDel and FQ-CoDel for ipfw/dummynet has + been imported to the base system. From owner-svn-src-all@freebsd.org Mon Sep 19 15:58:34 2016 Return-Path: Delivered-To: svn-src-all@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 6AAE0BE0B71; Mon, 19 Sep 2016 15:58:34 +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 48A8ECF9; Mon, 19 Sep 2016 15:58:34 +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 u8JFwXtd029336; Mon, 19 Sep 2016 15:58:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JFwXW7029334; Mon, 19 Sep 2016 15:58:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609191558.u8JFwXW7029334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Sep 2016 15:58:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305977 - in head/sys/ufs: ffs ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 15:58:34 -0000 Author: kib Date: Mon Sep 19 15:58:33 2016 New Revision: 305977 URL: https://svnweb.freebsd.org/changeset/base/305977 Log: Be more strict when selecting between snapshot/regular mount. Reclaimed vnode type is VBAD, so succesful comparision like devvp->v_type != VREG does not imply that the devvp references snapshot, it might be due to a reclaimed vnode. Explicitely check the vnode type. In the the most important case of ffs_blkfree(), the devfs vnode is locked and its type is stable. In other cases, if the vnode is reclaimed right after the check, hopefully the buffer methods return right error codes. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ufs/ufs_gjournal.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Mon Sep 19 15:39:24 2016 (r305976) +++ head/sys/ufs/ffs/ffs_alloc.c Mon Sep 19 15:58:33 2016 (r305977) @@ -2171,12 +2171,13 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size MPASS(devvp->v_mount->mnt_data == ump); dev = ump->um_devvp->v_rdev; cgblkno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgblkno = fsbtodb(fs, cgtod(fs, cg)); ASSERT_VOP_LOCKED(devvp, "ffs_blkfree_cg"); - } + } else + return; #ifdef INVARIANTS if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { @@ -2270,7 +2271,7 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); mp = UFSTOVFS(ump); - if (MOUNTEDSOFTDEP(mp) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(mp) && devvp->v_type == VCHR) softdep_setup_blkfree(UFSTOVFS(ump), bp, bno, numfrags(fs, size), dephd); bdwrite(bp); @@ -2335,7 +2336,7 @@ ffs_blkfree(ump, fs, devvp, bno, size, i * it has a snapshot(s) associated with it, and one of the * snapshots wants to claim the block. */ - if (devvp->v_type != VREG && + if (devvp->v_type == VCHR && (devvp->v_vflag & VV_COPYONWRITE) && ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, dephd)) { return; @@ -2480,10 +2481,13 @@ ffs_freefile(ump, fs, devvp, ino, mode, MPASS(devvp->v_mount->mnt_data == ump); dev = ump->um_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; + return (0); } if (ino >= fs->fs_ipg * fs->fs_ncg) panic("ffs_freefile: range: dev = %s, ino = %ju, fs = %s", @@ -2522,7 +2526,7 @@ ffs_freefile(ump, fs, devvp, ino, mode, fs->fs_fmod = 1; ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); - if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type == VCHR) softdep_setup_inofree(UFSTOVFS(ump), bp, ino + cg * fs->fs_ipg, wkhd); bdwrite(bp); @@ -2549,9 +2553,11 @@ ffs_checkfreefile(fs, devvp, ino) if (devvp->v_type == VREG) { /* devvp is a snapshot */ cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + return (1); } if (ino >= fs->fs_ipg * fs->fs_ncg) return (1); Modified: head/sys/ufs/ufs/ufs_gjournal.c ============================================================================== --- head/sys/ufs/ufs/ufs_gjournal.c Mon Sep 19 15:39:24 2016 (r305976) +++ head/sys/ufs/ufs/ufs_gjournal.c Mon Sep 19 15:58:33 2016 (r305977) @@ -71,14 +71,17 @@ ufs_gjournal_modref(struct vnode *vp, in ino = ip->i_number; cg = ino_to_cg(fs, ino); - if (devvp->v_type != VCHR) { + if (devvp->v_type == VREG) { /* devvp is a snapshot */ dev = VFSTOUFS(devvp->v_mount)->um_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; + return (EIO); } if ((u_int)ino >= fs->fs_ipg * fs->fs_ncg) panic("ufs_gjournal_modref: range: dev = %s, ino = %lu, fs = %s", From owner-svn-src-all@freebsd.org Mon Sep 19 15:58:46 2016 Return-Path: Delivered-To: svn-src-all@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 D337ABE0B9D; Mon, 19 Sep 2016 15:58: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 98B2BE50; Mon, 19 Sep 2016 15:58: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 u8JFwjv2029389; Mon, 19 Sep 2016 15:58:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JFwjJJ029385; Mon, 19 Sep 2016 15:58:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609191558.u8JFwjJJ029385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Sep 2016 15:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305978 - in head/sys/x86: acpica include x86 xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 15:58:46 -0000 Author: kib Date: Mon Sep 19 15:58:45 2016 New Revision: 305978 URL: https://svnweb.freebsd.org/changeset/base/305978 Log: Detect x2APIC mode on boot and obey it. If BIOS performed hand-off to OS with BSP LAPIC in the x2APIC mode, system usually consumes such configuration without a notice, since x2APIC is turned on by OS if possible (nop). But if BIOS simultaneously requested OS to not use x2APIC, code assumption that that xAPIC is active breaks. In my opinion, we cannot safely turn off x2APIC if control is passed in this mode. Make madt.c ignore user or BIOS requests to turn x2APIC off, and do not check the x2APIC black list. Just trust the config and try to continue, giving a warning in dmesg. Reported and tested by: Slawa Olhovchenkov (previous version) Diagnosed by and discussed with: avg Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/x86/acpica/madt.c head/sys/x86/include/apicvar.h head/sys/x86/x86/local_apic.c head/sys/x86/xen/xen_apic.c Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Mon Sep 19 15:58:33 2016 (r305977) +++ head/sys/x86/acpica/madt.c Mon Sep 19 15:58:45 2016 (r305978) @@ -135,10 +135,11 @@ madt_setup_local(void) const char *reason; char *hw_vendor; u_int p[4]; + int user_x2apic; + bool bios_x2apic; madt = pmap_mapbios(madt_physaddr, madt_length); if ((cpu_feature2 & CPUID2_X2APIC) != 0) { - x2apic_mode = 1; reason = NULL; /* @@ -150,21 +151,17 @@ madt_setup_local(void) if (dmartbl_physaddr != 0) { dmartbl = acpi_map_table(dmartbl_physaddr, ACPI_SIG_DMAR); - if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) { - x2apic_mode = 0; + if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) reason = "by DMAR table"; - } acpi_unmap_table(dmartbl); } if (vm_guest == VM_GUEST_VMWARE) { vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p); if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 || - (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) { - x2apic_mode = 0; - reason = "inside VMWare without intr redirection"; - } + (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) + reason = + "inside VMWare without intr redirection"; } else if (vm_guest == VM_GUEST_XEN) { - x2apic_mode = 0; reason = "due to running under XEN"; } else if (vm_guest == VM_GUEST_NO && CPUID_TO_FAMILY(cpu_id) == 0x6 && @@ -184,16 +181,33 @@ madt_setup_local(void) if (!strcmp(hw_vendor, "LENOVO") || !strcmp(hw_vendor, "ASUSTeK Computer Inc.")) { - x2apic_mode = 0; reason = "for a suspected SandyBridge BIOS bug"; } freeenv(hw_vendor); } } - TUNABLE_INT_FETCH("hw.x2apic_enable", &x2apic_mode); - if (!x2apic_mode && reason != NULL && bootverbose) + bios_x2apic = lapic_is_x2apic(); + if (reason != NULL && bios_x2apic) { + if (bootverbose) + printf("x2APIC should be disabled %s but " + "already enabled by BIOS; enabling.\n", + reason); + reason = NULL; + } + if (reason == NULL) + x2apic_mode = 1; + else if (bootverbose) printf("x2APIC available but disabled %s\n", reason); + user_x2apic = x2apic_mode; + TUNABLE_INT_FETCH("hw.x2apic_enable", &user_x2apic); + if (user_x2apic != x2apic_mode) { + if (bios_x2apic && !user_x2apic) + printf("x2APIC disabled by tunable and " + "enabled by BIOS; ignoring tunable."); + else + x2apic_mode = user_x2apic; + } } lapic_init(madt->Address); Modified: head/sys/x86/include/apicvar.h ============================================================================== --- head/sys/x86/include/apicvar.h Mon Sep 19 15:58:33 2016 (r305977) +++ head/sys/x86/include/apicvar.h Mon Sep 19 15:58:45 2016 (r305978) @@ -206,6 +206,7 @@ struct apic_ops { void (*create)(u_int, int); void (*init)(vm_paddr_t); void (*xapic_mode)(void); + bool (*is_x2apic)(void); void (*setup)(int); void (*dump)(const char *); void (*disable)(void); @@ -268,6 +269,13 @@ lapic_xapic_mode(void) apic_ops.xapic_mode(); } +static inline bool +lapic_is_x2apic(void) +{ + + return (apic_ops.is_x2apic()); +} + static inline void lapic_setup(int boot) { Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Mon Sep 19 15:58:33 2016 (r305977) +++ head/sys/x86/x86/local_apic.c Mon Sep 19 15:58:45 2016 (r305978) @@ -269,6 +269,16 @@ native_lapic_enable_x2apic(void) wrmsr(MSR_APICBASE, apic_base); } +static bool +native_lapic_is_x2apic(void) +{ + uint64_t apic_base; + + apic_base = rdmsr(MSR_APICBASE); + return ((apic_base & (APICBASE_X2APIC | APICBASE_ENABLED)) == + (APICBASE_X2APIC | APICBASE_ENABLED)); +} + static void lapic_enable(void); static void lapic_resume(struct pic *pic, bool suspend_cancelled); static void lapic_timer_oneshot(struct lapic *); @@ -329,6 +339,7 @@ struct apic_ops apic_ops = { .create = native_lapic_create, .init = native_lapic_init, .xapic_mode = native_lapic_xapic_mode, + .is_x2apic = native_lapic_is_x2apic, .setup = native_lapic_setup, .dump = native_lapic_dump, .disable = native_lapic_disable, Modified: head/sys/x86/xen/xen_apic.c ============================================================================== --- head/sys/x86/xen/xen_apic.c Mon Sep 19 15:58:33 2016 (r305977) +++ head/sys/x86/xen/xen_apic.c Mon Sep 19 15:58:45 2016 (r305978) @@ -139,6 +139,13 @@ xen_pv_lapic_disable(void) } +static bool +xen_pv_lapic_is_x2apic(void) +{ + + return (false); +} + static void xen_pv_lapic_eoi(void) { @@ -351,6 +358,7 @@ struct apic_ops xen_apic_ops = { .create = xen_pv_lapic_create, .init = xen_pv_lapic_init, .xapic_mode = xen_pv_lapic_disable, + .is_x2apic = xen_pv_lapic_is_x2apic, .setup = xen_pv_lapic_setup, .dump = xen_pv_lapic_dump, .disable = xen_pv_lapic_disable, From owner-svn-src-all@freebsd.org Mon Sep 19 16:05:12 2016 Return-Path: Delivered-To: svn-src-all@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 0D144BE0F07; Mon, 19 Sep 2016 16:05:12 +0000 (UTC) (envelope-from gjb@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 DD749662; Mon, 19 Sep 2016 16:05:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JG5BX3032980; Mon, 19 Sep 2016 16:05:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JG5Bmm032979; Mon, 19 Sep 2016 16:05:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609191605.u8JG5Bmm032979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Sep 2016 16:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r305979 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 16:05:12 -0000 Author: gjb Date: Mon Sep 19 16:05:10 2016 New Revision: 305979 URL: https://svnweb.freebsd.org/changeset/base/305979 Log: Sort by SVN revision. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 15:58:45 2016 (r305978) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 16:05:10 2016 (r305979) @@ -193,16 +193,16 @@ The MK_ARM_EABI &man.src.conf.5; option has been removed. - The - WITH_SYSTEM_COMPILER &man.src.conf.5; - option is enabled by default. - The ntp suite has been updated to version 4.2.8p8. The /etc/ntp/leap-seconds has been updated to version 3676752000. + + The + WITH_SYSTEM_COMPILER &man.src.conf.5; + option is enabled by default. @@ -482,15 +482,6 @@ &man.byacc.1; has been updated to version 20140101. - OpenSSH has - been updated to 7.2p2. - - SSHv1 support has been removed from - OpenSSH. - - Support for DSA is disabled by default - in OpenSSH. - mdocml has been updated to version 1.12.3. @@ -532,9 +523,6 @@ elftoolchain utilities have been updated to version 3179. - The &man.xz.1; utility has been updated - to version 5.2.2. - The &man.nvi.1; utility has been updated to version 2.1.3. @@ -542,10 +530,6 @@ &man.hostapd.8; utilities have been updated to version 2.4. - The - &man.resolvconf.8; utility has been updated to version - 3.7.3. - bmake has been updated to version 20150606. @@ -568,9 +552,6 @@ The &man.tcpdump.1; utility has been updated to version 4.7.4. - OpenSSL has - been updated to version 1.0.2h. - The &man.ssh.1; utility has been updated to re-implement hostname canonicalization before locating the host in @@ -591,10 +572,6 @@ The &man.svnlite.1; utility has been updated to version 1.8.14. - The sqlite3 - library used by &man.svnlite.1; and &man.kerberos.8; has been - updated to version 3.12.1. - Timezone data files have been updated to version 2015f. @@ -607,12 +584,15 @@ &man.jemalloc.3; has been updated to version 4.0.2. - The &man.file.1; utility has been - updated to version 5.28. - The &man.nc.1; utility has been updated to the OpenBSD 5.8 version. + The &man.xz.1; utility has been updated + to version 5.2.2. + + OpenBSM has + been updated to version 1.2 alpha 4. + Clang has been updated to version 3.8.0. @@ -629,15 +609,26 @@ compiler_rt utility has been updated to version 3.8.0. - ACPICA has - been updated to version 20160527. + The + &man.resolvconf.8; utility has been updated to version + 3.7.3. - OpenBSM has - been updated to version 1.2 alpha 4. + OpenSSH has + been updated to 7.2p2. + + The sqlite3 + library used by &man.svnlite.1; and &man.kerberos.8; has been + updated to version 3.12.1. libucl has been updated to version 0.8.0. + OpenSSL has + been updated to version 1.0.2h. + + ACPICA has + been updated to version 20160527. + The NetBSD Project's &man.libblacklist.3; library and applications have been ported and integrated into the system. Packet @@ -663,6 +654,15 @@ Support for the &man.ipfilter.4; packet filter has been added to the blacklistd-helper script. + + The &man.file.1; utility has been + updated to version 5.28. + + SSHv1 support has been removed from + OpenSSH. + + Support for DSA is disabled by default + in OpenSSH. @@ -1367,15 +1367,6 @@ Hardware Support - Native PCI-express HotPlug support is - enabled by default on &arch.amd64;, &arch.arm64;, and - &arch.powerpc;. This feature has exposed compatibility issues - on some hardware that result in missing devices or a hang - during boot. To work around such issues, run set - hw.pci.enable_pcie_hp=0 in the boot loader, and - add hw.pci.enable_pcie_hp=0 to - /boot/loader.conf. - The &man.asmc.4; driver has been updated to support the &apple; MacMini 3,1. @@ -1418,6 +1409,15 @@ Initial SMP support has been added to the &os;/&arch.arm64; port. + + Native PCI-express HotPlug support is + enabled by default on &arch.amd64;, &arch.arm64;, and + &arch.powerpc;. This feature has exposed compatibility issues + on some hardware that result in missing devices or a hang + during boot. To work around such issues, run set + hw.pci.enable_pcie_hp=0 in the boot loader, and + add hw.pci.enable_pcie_hp=0 to + /boot/loader.conf. @@ -1473,9 +1473,6 @@ updated to support DSM TRIM commands for virtual AHCI disks. - Native graphics support has been added - to the &man.bhyve.8; hypervisor. - Support for the QEMU virt system has been added. @@ -1515,6 +1512,9 @@ Indirect segment I/O is enabled by default in the Xen blkfront driver when running on AWS EC2. + + Native graphics support has been added + to the &man.bhyve.8; hypervisor. @@ -1587,15 +1587,15 @@ and AXP818 power management integrated circuits have been added. - Support for GPIO, Sensors and - interrupts on AXP209 power management integrated circuits have - been added. - Support for the Allwinner Reduced Serial Bus (RSB) has been added. Support for Allwinner A20 HDMI has been added. + + Support for GPIO, Sensors and + interrupts on AXP209 power management integrated circuits have + been added. @@ -1617,10 +1617,6 @@ &man.ctld.8; utility has been updated to allow controlling non-iSCSI &man.ctl.4; ports. - Support - for parsing libucl-based configuration files has been added to - &man.ctld.8;. - The &man.autofs.5; subsystem has been updated to include a new &man.auto.master.5; map, -media, which @@ -1641,6 +1637,15 @@ GELI-backed SSD storage providers. + Support + for parsing libucl-based configuration files has been added to + &man.ctld.8;. + + The + &man.camcontrol.8; command can manually force updating + capacity data after a disk gets resized using the reprobe + subcommand. + Leading spaces are now stripped off SCSI disk serial numbers when populating @@ -1652,11 +1657,6 @@ Support for managing Shingled Magnetic Recording (SMR) drives has been added. - - The - &man.camcontrol.8; command can manually force updating - capacity data after a disk gets resized using the reprobe - subcommand. @@ -1702,6 +1702,10 @@ account when gathering buffers to be written to the l2arc device. + Four + new resources have been added to &man.rctl.8; to allow + throttles to be set on filesystem IO. + The zfsd daemon has been added, which manages hotspares and replements in drive slots that publish physical @@ -1711,10 +1715,6 @@ sponsor="&multiplay;">The minimum and maximum values for the ZFS adaptive replacement cache can be modified at runtime. - - Four - new resources have been added to &man.rctl.8; to allow - throttles to be set on filesystem IO. @@ -1797,13 +1797,6 @@ This section describes changes that affect networking in &os;. - The unused - SIOCSIFALIFETIME_IN6 ioctl has been - removed. - - Support - to be able to reroot into a NFSv4 volume has been added. - Network Protocols @@ -1902,6 +1895,10 @@ network stack has been updated to fix handling of IPv6 On-Link redirects. + Support + to be able to reroot into a NFSv4 volume has been + added. + The net.inet.tcp.ecn.enable sysctl mib has been changed from a binary off/on control to a three way setting. @@ -1941,6 +1938,9 @@ implementation of CoDel and FQ-CoDel for ipfw/dummynet has been imported to the base system. + The unused + SIOCSIFALIFETIME_IN6 ioctl has been + removed. From owner-svn-src-all@freebsd.org Mon Sep 19 16:07:34 2016 Return-Path: Delivered-To: svn-src-all@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 3A0EDBE106A; Mon, 19 Sep 2016 16:07:34 +0000 (UTC) (envelope-from emaste@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 0982590E; Mon, 19 Sep 2016 16:07:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JG7Xd6033144; Mon, 19 Sep 2016 16:07:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JG7X6N033143; Mon, 19 Sep 2016 16:07:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609191607.u8JG7X6N033143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 19 Sep 2016 16:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305980 - head/usr.sbin/uefisign X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 16:07:34 -0000 Author: emaste Date: Mon Sep 19 16:07:32 2016 New Revision: 305980 URL: https://svnweb.freebsd.org/changeset/base/305980 Log: uefisign: Remove backwards-compatibility sys/capability.h support uefisign previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version in order to facilitate development on the stable branch. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so there's no need for the backwards compatibility support. Reviewed by: trasz Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/uefisign/child.c Modified: head/usr.sbin/uefisign/child.c ============================================================================== --- head/usr.sbin/uefisign/child.c Mon Sep 19 16:05:10 2016 (r305979) +++ head/usr.sbin/uefisign/child.c Mon Sep 19 16:07:32 2016 (r305980) @@ -32,11 +32,7 @@ __FBSDID("$FreeBSD$"); #include -#if __FreeBSD_version >= 1100000 #include -#else -#include -#endif #include #include #include From owner-svn-src-all@freebsd.org Mon Sep 19 16:13:01 2016 Return-Path: Delivered-To: svn-src-all@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 4EB08BE1235; Mon, 19 Sep 2016 16:13:01 +0000 (UTC) (envelope-from cem@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 081A4D45; Mon, 19 Sep 2016 16:13:00 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JGD0sd036855; Mon, 19 Sep 2016 16:13:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JGD0GA036854; Mon, 19 Sep 2016 16:13:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609191613.u8JGD0GA036854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Sep 2016 16:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305981 - head/usr.bin/cmp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 16:13:01 -0000 Author: cem Date: Mon Sep 19 16:13:00 2016 New Revision: 305981 URL: https://svnweb.freebsd.org/changeset/base/305981 Log: cmp(1): Capsicumify Reviewed by: allanjude, bapt, oshogbo Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7912 Modified: head/usr.bin/cmp/cmp.c Modified: head/usr.bin/cmp/cmp.c ============================================================================== --- head/usr.bin/cmp/cmp.c Mon Sep 19 16:07:32 2016 (r305980) +++ head/usr.bin/cmp/cmp.c Mon Sep 19 16:13:00 2016 (r305981) @@ -42,15 +42,18 @@ static char sccsid[] = "@(#)cmp.c 8.3 (B #include __FBSDID("$FreeBSD$"); +#include #include #include #include #include #include +#include #include #include #include +#include #include #include "extern.h" @@ -66,6 +69,9 @@ main(int argc, char *argv[]) off_t skip1, skip2; int ch, fd1, fd2, oflag, special; const char *file1, *file2; + cap_rights_t rights; + unsigned long cmd; + uint32_t fcntls; oflag = O_RDONLY; while ((ch = getopt(argc, argv, "hlsxz")) != -1) @@ -146,6 +152,37 @@ main(int argc, char *argv[]) exit(ERR_EXIT); } + cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_MMAP_R); + if (cap_rights_limit(fd1, &rights) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit rights for %s", file1); + if (cap_rights_limit(fd2, &rights) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit rights for %s", file2); + + /* Required for fdopen(3). */ + fcntls = CAP_FCNTL_GETFL; + if (cap_fcntls_limit(fd1, fcntls) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit fcntls for %s", file1); + if (cap_fcntls_limit(fd2, fcntls) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit fcntls for %s", file2); + + cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE, CAP_IOCTL); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit rights for stdout"); + + /* Required for printf(3) via isatty(3). */ + cmd = TIOCGETA; + if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit ioctls for stdout"); + + /* + * Cache NLS data, for strerror, for err(3), before entering capability + * mode. + */ + (void)catopen("libc", NL_CAT_LOCALE); + + if (cap_enter() < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to enter capability mode"); + if (!special) { if (fstat(fd1, &sb1)) { if (!sflag) From owner-svn-src-all@freebsd.org Mon Sep 19 16:14:40 2016 Return-Path: Delivered-To: svn-src-all@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 4FE1EBE1365; Mon, 19 Sep 2016 16:14:40 +0000 (UTC) (envelope-from cem@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 053FEF17; Mon, 19 Sep 2016 16:14:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JGEd8I036948; Mon, 19 Sep 2016 16:14:39 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JGEdBI036947; Mon, 19 Sep 2016 16:14:39 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609191614.u8JGEdBI036947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Sep 2016 16:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305982 - head/usr.bin/tr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 16:14:40 -0000 Author: cem Date: Mon Sep 19 16:14:38 2016 New Revision: 305982 URL: https://svnweb.freebsd.org/changeset/base/305982 Log: tr(1): Capsicumify This is a straightforward single input, single output program for capsicum. Reviewed by: bapt Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7928 Modified: head/usr.bin/tr/tr.c Modified: head/usr.bin/tr/tr.c ============================================================================== --- head/usr.bin/tr/tr.c Mon Sep 19 16:13:00 2016 (r305981) +++ head/usr.bin/tr/tr.c Mon Sep 19 16:14:38 2016 (r305982) @@ -41,16 +41,19 @@ static const char copyright[] = static const char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95"; #endif +#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -69,6 +72,8 @@ int main(int argc, char **argv) { static int carray[NCHARS_SB]; + cap_rights_t rights; + unsigned long cmd; struct cmap *map; struct cset *delete, *squeeze; int n, *p; @@ -77,6 +82,27 @@ main(int argc, char **argv) (void)setlocale(LC_ALL, ""); + cap_rights_init(&rights, CAP_FSTAT, CAP_IOCTL, CAP_READ); + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdin"); + cap_rights_init(&rights, CAP_FSTAT, CAP_IOCTL, CAP_WRITE); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdout"); + if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stderr"); + + /* Required for isatty(3). */ + cmd = TIOCGETA; + if (cap_ioctls_limit(STDIN_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stdin"); + if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stdout"); + if (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stderr"); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "unable to enter capability mode"); + Cflag = cflag = dflag = sflag = 0; while ((ch = getopt(argc, argv, "Ccdsu")) != -1) switch((char)ch) { From owner-svn-src-all@freebsd.org Mon Sep 19 16:16:15 2016 Return-Path: Delivered-To: svn-src-all@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 34B11BE147F; Mon, 19 Sep 2016 16:16:15 +0000 (UTC) (envelope-from cem@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 078601180; Mon, 19 Sep 2016 16:16:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JGGEnI037047; Mon, 19 Sep 2016 16:16:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JGGEuH037046; Mon, 19 Sep 2016 16:16:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609191616.u8JGGEuH037046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Sep 2016 16:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305983 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 16:16:15 -0000 Author: cem Date: Mon Sep 19 16:16:14 2016 New Revision: 305983 URL: https://svnweb.freebsd.org/changeset/base/305983 Log: indent(1): Capsicumify This is a nice and trivial program for sandboxing. One input file, one output file. Reviewed by: pfg Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7920 Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Mon Sep 19 16:14:38 2016 (r305982) +++ head/usr.bin/indent/indent.c Mon Sep 19 16:16:14 2016 (r305983) @@ -50,8 +50,10 @@ static char sccsid[] = "@(#)indent.c 5.1 #include __FBSDID("$FreeBSD$"); +#include #include #include +#include #include #include #include @@ -74,6 +76,7 @@ char bakfile[MAXPATHLEN] = ""; int main(int argc, char **argv) { + cap_rights_t rights; int dec_ind; /* current indentation for declarations */ int di_stack[20]; /* a stack of structure indentation levels */ @@ -234,6 +237,17 @@ main(int argc, char **argv) bakcopy(); } } + + /* Restrict input/output descriptors and enter Capsicum sandbox. */ + cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE); + if (cap_rights_limit(fileno(output), &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for %s", out_name); + cap_rights_init(&rights, CAP_FSTAT, CAP_READ); + if (cap_rights_limit(fileno(input), &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for %s", in_name); + if (cap_enter() < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to enter capability mode"); + if (ps.com_ind <= 1) ps.com_ind = 2; /* dont put normal comments before column 2 */ if (troff) { From owner-svn-src-all@freebsd.org Mon Sep 19 16:25:15 2016 Return-Path: Delivered-To: svn-src-all@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 7BDCEBE19A7 for ; Mon, 19 Sep 2016 16:25:15 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) (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 0D73518F0 for ; Mon, 19 Sep 2016 16:25:14 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f50.google.com with SMTP id g62so113579000lfe.3 for ; Mon, 19 Sep 2016 09:25:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=uqEw2vCpzpQSSJ29EysrDdMWwxhcUZLCZaDFIQWL8I4=; b=i7/PSZJV0vYpxJY0YenoLXM68CQJxQLtSrKE2dprusiVxYa6+xrcsDtkw6y9dLKLUy r9eckTE550CgE+UDooIy/HQWQdwl1SsTD9V2+9sqFL7V7GjHQdHppACgME+09BmXsk5x 645fMU7P6THI0ZiyAASNv2T8J+pk3pCYZUNzyHKo0DmAlKNpK5A6ycqX4dKBTVgjRIwD u6RnPKP8VvdL+IQ4q1OWRPhGbWQ/Tfq80JxJ0ZC2dgeAbKPImjP7UyvqduHdVp4zV9M3 srCtev7o2ptHSqroB73ZwIDLyBf31z7/IPm8nwInDcF2mYkMq4fMargWPkvAbDm7SIAR 4UHw== X-Gm-Message-State: AE9vXwMRnlWs6k6ybq2H4NtjM+P1FN9TbqLhjrNXcyeN6Txaid/ydg5968Xf4+Sv5+JFnA== X-Received: by 10.46.1.42 with SMTP id 42mr11382039ljb.68.1474302305313; Mon, 19 Sep 2016 09:25:05 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id o80sm4794883lfg.29.2016.09.19.09.25.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 09:25:04 -0700 (PDT) Subject: Re: svn commit: r305981 - head/usr.bin/cmp To: "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609191613.u8JGD0GA036854@repo.freebsd.org> From: Andrey Chernov Message-ID: Date: Mon, 19 Sep 2016 19:25:02 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609191613.u8JGD0GA036854@repo.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 16:25:15 -0000 On 19.09.2016 19:13, Conrad E. Meyer wrote: > + /* > + * Cache NLS data, for strerror, for err(3), before entering capability > + * mode. > + */ > + (void)catopen("libc", NL_CAT_LOCALE); This code should be common for all programs which use err(), perror() etc. since they all should call setlocale() with LC_ALL. If they not do it, they should be fixed in the same time. From owner-svn-src-all@freebsd.org Mon Sep 19 16:59:55 2016 Return-Path: Delivered-To: svn-src-all@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 3F8C3BE1EF5; Mon, 19 Sep 2016 16:59:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C6FAA38; Mon, 19 Sep 2016 16:59:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 4F1D510AF90; Mon, 19 Sep 2016 12:59:47 -0400 (EDT) From: John Baldwin To: Ed Schouten Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305952 - head/lib/libc/gen Date: Mon, 19 Sep 2016 09:06:46 -0700 Message-ID: <2159167.HKd1T6hK90@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201609182047.u8IKlt4J096682@repo.freebsd.org> References: <201609182047.u8IKlt4J096682@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 19 Sep 2016 12:59:47 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 16:59:55 -0000 On Sunday, September 18, 2016 08:47:55 PM Ed Schouten wrote: > Author: ed > Date: Sun Sep 18 20:47:55 2016 > New Revision: 305952 > URL: https://svnweb.freebsd.org/changeset/base/305952 > > Log: > Replace dirname(3) by a copy that complies to POSIX. > > It turns out that the path normalization that our brand new copy of > dirname(3) does is actually not allowed by the draft version of the > upcoming version of POSIX. It has to behave identically to the > dirname(1) utility. > > This change replaces our new dirname(3) implementation by yet another > version that doesn't implement the path normalization logic; it merely > looks for the end of the directory name and overwrites that with a null > byte. > > More details: See note #3370 at http://austingroupbugs.net/view.php?id=1073 Don't you need the _Generic hack we have for basename now? -- John Baldwin From owner-svn-src-all@freebsd.org Mon Sep 19 17:16:52 2016 Return-Path: Delivered-To: svn-src-all@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 F35B3BE1228; Mon, 19 Sep 2016 17:16:52 +0000 (UTC) (envelope-from np@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 C3E3568E; Mon, 19 Sep 2016 17:16:52 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JHGpVW059832; Mon, 19 Sep 2016 17:16:51 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JHGpRR059831; Mon, 19 Sep 2016 17:16:51 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609191716.u8JHGpRR059831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 19 Sep 2016 17:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305985 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 17:16:53 -0000 Author: np Date: Mon Sep 19 17:16:51 2016 New Revision: 305985 URL: https://svnweb.freebsd.org/changeset/base/305985 Log: cxgbe(4): Fixes to wrq stats. - Increment tx_wrs_copied in the correct place. - Add tx_wrs_sspace to the sysctl MIB. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Sep 19 17:15:01 2016 (r305984) +++ head/sys/dev/cxgbe/t4_sge.c Mon Sep 19 17:16:51 2016 (r305985) @@ -1902,6 +1902,7 @@ drain_wrq_wr_list(struct adapter *sc, st } eq->pidx = n - (eq->sidx - eq->pidx); } + wrq->tx_wrs_copied++; if (available < eq->sidx / 4 && atomic_cmpset_int(&eq->equiq, 0, 1)) { @@ -3561,6 +3562,8 @@ alloc_wrq(struct adapter *sc, struct vi_ &wrq->tx_wrs_direct, "# of work requests (direct)"); SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tx_wrs_copied", CTLFLAG_RD, &wrq->tx_wrs_copied, "# of work requests (copied)"); + SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tx_wrs_sspace", CTLFLAG_RD, + &wrq->tx_wrs_ss, "# of work requests (copied from scratch space)"); return (rc); } From owner-svn-src-all@freebsd.org Mon Sep 19 17:17:30 2016 Return-Path: Delivered-To: svn-src-all@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 D4B7FBE1280; Mon, 19 Sep 2016 17:17:30 +0000 (UTC) (envelope-from gjb@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 95684863; Mon, 19 Sep 2016 17:17:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JHHTZ1059898; Mon, 19 Sep 2016 17:17:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JHHTOi059897; Mon, 19 Sep 2016 17:17:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609191717.u8JHHTOi059897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Sep 2016 17:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r305986 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 17:17:30 -0000 Author: gjb Date: Mon Sep 19 17:17:29 2016 New Revision: 305986 URL: https://svnweb.freebsd.org/changeset/base/305986 Log: - Remove the Security Advisories and Errata Notices section, which are not relevant for a dot-zero release. - Reword the entry for r261498. - Remove a duplicate entry. - Document byacc(1) update to 20160324. - Document mdocml(1) update to 20160116. - Capitalize 'Sendmail'. - Document svnlite(1) update to 1.9.4. - Document tzdata update to 2015g. - Reword the entry for r288090, and update upstream version. - Reword the entry for r301169. - Fix spacing for r296277 entry. - Remove the empty 'Boot Menu', 'Ports', and 'Documentaton' sections. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 17:16:51 2016 (r305985) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 19 17:17:29 2016 (r305986) @@ -150,25 +150,6 @@ - - Security and Errata - - This section lists the various Security Advisories and - Errata Notices since &release.prev;. - - - Security Advisories - - &security; - - - - Errata Notices - - &errata; - - - Userland @@ -228,9 +209,9 @@ Support for displaying VPD for PCI devices via &man.pciconf.8; has been added. - &man.ping.8; protects against malicious - network packets using the Capsicum framework to drop - privileges. + The &man.ping.8; utility has been + updated to use the Capsicum framework to drop priviliges, + protecting against malicious network packets. The &man.ps.1; utility has been updated to include the -J flag, used to @@ -479,12 +460,6 @@ Contributed Software - &man.byacc.1; has been updated to - version 20140101. - - mdocml has - been updated to version 1.12.3. - The binutils suite of utilities has been updated to include upstream patches that add new relocations for &arch.powerpc; @@ -511,11 +486,6 @@ strings were switched to the versions from the ELF Tool Chain project. - The libedit library - has been updated to include UTF-8 support, - adding UTF-8 support to the &man.sh.1; - shell. - The &man.xz.1; utility has been updated to support multi-threaded compression. @@ -533,7 +503,7 @@ bmake has been updated to version 20150606. - sendmail has + Sendmail has been updated to 8.15.2. Starting with &os; 11.0 and sendmail 8.15, sendmail uses uncompressed IPv6 addresses by default, i.e., they will not contain ::. For @@ -569,27 +539,24 @@ library used by &man.svnlite.1; has been updated to version 1.3.8. - The &man.svnlite.1; utility has been - updated to version 1.8.14. - - Timezone data files have been updated to - version 2015f. - The &man.acpi.4; subsystem has been updated to version 20150818. The &man.unbound.8; utility has been updated to version 1.5.4. - &man.jemalloc.3; has been updated to - version 4.0.2. - The &man.nc.1; utility has been updated to the OpenBSD 5.8 version. + Timezone data files have been updated to + version 2015g. + The &man.xz.1; utility has been updated to version 5.2.2. + The &man.mandoc.1; utility has been + updated to version 20160116. + OpenBSM has been updated to version 1.2 alpha 4. @@ -616,6 +583,9 @@ OpenSSH has been updated to 7.2p2. + The &man.byacc.1; utility has been + updated to version 20160324. + The sqlite3 library used by &man.svnlite.1; and &man.kerberos.8; has been updated to version 3.12.1. @@ -623,6 +593,9 @@ libucl has been updated to version 0.8.0. + The &man.svnlite.1; utility has been + updated to version 1.9.4. + OpenSSL has been updated to version 1.0.2h. @@ -630,10 +603,9 @@ been updated to version 20160527. The - NetBSD Project's &man.libblacklist.3; library and applications - have been ported and integrated into the system. Packet - filtering support for the &man.pf.4; packet filtering systems - has been implemented. The + &man.libblacklist.3; library and applications have been ported + from the NetBSD Project. Packet filtering support for the + &man.pf.4; packet filtering systems has been implemented. The blacklist system provides the blacklistd daemon, the helper script blacklistd-helper to make @@ -647,6 +619,9 @@ sending notifications to the blacklistd daemon. + The &man.jemalloc.3; library has been + updated to version 4.2.1. + Support for the &man.ipfw.4; packet filter has been added to the blacklistd-helper script. @@ -1074,7 +1049,7 @@ Support for POSIX asynchronous I/O is now included in the kernel by default. The - VFS_AIOkernel option and + VFS_AIO kernel option and aio.ko kernel module have been removed. Asynchronous I/O operations on sockets, local files, and disk devices are permitted by default. However, operations @@ -1783,12 +1758,6 @@ modules has been changed to /boot/modules. - - - Boot Menu Changes - -   - @@ -1944,45 +1913,6 @@ - - Ports Collection and Package Infrastructure - - This section covers changes to the &os; Ports - Collection, package infrastructure, and package maintenance and - installation tools. - - - Infrastructure Changes - -   - - - - Packaging Changes - -   - - - - - Documentation - - This section covers changes to the &os; Documentation - Project sources and toolchain. - - - Documentation Source Changes - -   - - - - Documentation Toolchain Changes - -   - - - Release Engineering and Integration From owner-svn-src-all@freebsd.org Mon Sep 19 17:31:07 2016 Return-Path: Delivered-To: svn-src-all@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 3A0CDBE163A; Mon, 19 Sep 2016 17:31:07 +0000 (UTC) (envelope-from ed@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 EDED7209; Mon, 19 Sep 2016 17:31:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JHV6dl064724; Mon, 19 Sep 2016 17:31:06 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JHV6Xl064722; Mon, 19 Sep 2016 17:31:06 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609191731.u8JHV6Xl064722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 19 Sep 2016 17:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305987 - head/sys/contrib/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 17:31:07 -0000 Author: ed Date: Mon Sep 19 17:31:05 2016 New Revision: 305987 URL: https://svnweb.freebsd.org/changeset/base/305987 Log: Sync in latest vDSOs from upstream. - Use conditional instruction to simplify the ARMv6 vDSO. This means that we no longer perform any branching. In the failure case, we simply slide over the assignments of the return values. The vDSO could be improved even further by using stmia to do assignments in parallel. Unfortunately, the script used to generate these is not smart enough for that (yet). Spotted by: andrew@. - Make the style of the i686 vDSO more similar to the others by using decimal literals. Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S head/sys/contrib/cloudabi/cloudabi_vdso_i686.S Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Mon Sep 19 17:17:29 2016 (r305986) +++ head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Mon Sep 19 17:31:05 2016 (r305987) @@ -38,24 +38,20 @@ ENTRY(cloudabi_sys_clock_res_get) str r1, [sp, #-4] mov ip, #0 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2, 0] - str r1, [r2, 4] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2, 0] + strcc r1, [r2, 4] + movcc r0, $0 bx lr END(cloudabi_sys_clock_res_get) ENTRY(cloudabi_sys_clock_time_get) mov ip, #1 swi 0 - bcs 1f - ldr r2, [sp, #0] - str r0, [r2, 0] - str r1, [r2, 4] - mov r0, $0 -1: + ldrcc r2, [sp, #0] + strcc r0, [r2, 0] + strcc r1, [r2, 4] + movcc r0, $0 bx lr END(cloudabi_sys_clock_time_get) @@ -75,11 +71,9 @@ ENTRY(cloudabi_sys_fd_create1) str r1, [sp, #-4] mov ip, #4 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_create1) @@ -88,13 +82,11 @@ ENTRY(cloudabi_sys_fd_create2) str r2, [sp, #-8] mov ip, #5 swi 0 - ldr r2, [sp, #-4] - ldr r3, [sp, #-8] - bcs 1f - str r0, [r2] - str r1, [r3] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + ldrcc r3, [sp, #-8] + strcc r0, [r2] + strcc r1, [r3] + movcc r0, $0 bx lr END(cloudabi_sys_fd_create2) @@ -108,33 +100,27 @@ ENTRY(cloudabi_sys_fd_dup) str r1, [sp, #-4] mov ip, #7 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_dup) ENTRY(cloudabi_sys_fd_pread) mov ip, #8 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_pread) ENTRY(cloudabi_sys_fd_pwrite) mov ip, #9 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_pwrite) @@ -142,11 +128,9 @@ ENTRY(cloudabi_sys_fd_read) str r3, [sp, #-4] mov ip, #10 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_read) @@ -159,12 +143,10 @@ END(cloudabi_sys_fd_replace) ENTRY(cloudabi_sys_fd_seek) mov ip, #12 swi 0 - bcs 1f - ldr r2, [sp, #4] - str r0, [r2, 0] - str r1, [r2, 4] - mov r0, $0 -1: + ldrcc r2, [sp, #4] + strcc r0, [r2, 0] + strcc r1, [r2, 4] + movcc r0, $0 bx lr END(cloudabi_sys_fd_seek) @@ -190,11 +172,9 @@ ENTRY(cloudabi_sys_fd_write) str r3, [sp, #-4] mov ip, #16 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_write) @@ -225,33 +205,27 @@ END(cloudabi_sys_file_link) ENTRY(cloudabi_sys_file_open) mov ip, #21 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_file_open) ENTRY(cloudabi_sys_file_readdir) mov ip, #22 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_file_readdir) ENTRY(cloudabi_sys_file_readlink) mov ip, #23 swi 0 - bcs 1f - ldr r2, [sp, #4] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_file_readlink) @@ -318,11 +292,9 @@ END(cloudabi_sys_mem_lock) ENTRY(cloudabi_sys_mem_map) mov ip, #34 swi 0 - bcs 1f - ldr r2, [sp, #16] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #16] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_mem_map) @@ -354,22 +326,18 @@ ENTRY(cloudabi_sys_poll) str r3, [sp, #-4] mov ip, #39 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_poll) ENTRY(cloudabi_sys_poll_fd) mov ip, #40 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_poll_fd) @@ -389,13 +357,11 @@ ENTRY(cloudabi_sys_proc_fork) str r1, [sp, #-8] mov ip, #43 swi 0 - ldr r2, [sp, #-4] - ldr r3, [sp, #-8] - bcs 1f - str r0, [r2] - str r1, [r3] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + ldrcc r3, [sp, #-8] + strcc r0, [r2] + strcc r1, [r3] + movcc r0, $0 bx lr END(cloudabi_sys_proc_fork) @@ -415,11 +381,9 @@ ENTRY(cloudabi_sys_sock_accept) str r2, [sp, #-4] mov ip, #46 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_sock_accept) @@ -469,11 +433,9 @@ ENTRY(cloudabi_sys_thread_create) str r1, [sp, #-4] mov ip, #54 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_thread_create) Modified: head/sys/contrib/cloudabi/cloudabi_vdso_i686.S ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_i686.S Mon Sep 19 17:17:29 2016 (r305986) +++ head/sys/contrib/cloudabi/cloudabi_vdso_i686.S Mon Sep 19 17:31:05 2016 (r305987) @@ -30,7 +30,7 @@ .p2align 2, 0x90; \ .global name; \ .type name, @function; \ - name: +name: #define END(name) .size name, . - name @@ -38,7 +38,7 @@ ENTRY(cloudabi_sys_clock_res_get) mov $0, %eax int $0x80 jc 1f - mov 0x8(%esp), %ecx + mov 8(%esp), %ecx mov %eax, 0(%ecx) mov %edx, 4(%ecx) xor %eax, %eax @@ -50,7 +50,7 @@ ENTRY(cloudabi_sys_clock_time_get) mov $1, %eax int $0x80 jc 1f - mov 0x10(%esp), %ecx + mov 16(%esp), %ecx mov %eax, 0(%ecx) mov %edx, 4(%ecx) xor %eax, %eax @@ -74,7 +74,7 @@ ENTRY(cloudabi_sys_fd_create1) mov $4, %eax int $0x80 jc 1f - mov 0x8(%esp), %ecx + mov 8(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -85,9 +85,9 @@ ENTRY(cloudabi_sys_fd_create2) mov $5, %eax int $0x80 jc 1f - mov 0x8(%esp), %ecx + mov 8(%esp), %ecx mov %eax, (%ecx) - mov 0xc(%esp), %ecx + mov 12(%esp), %ecx mov %edx, (%ecx) xor %eax, %eax 1: @@ -104,7 +104,7 @@ ENTRY(cloudabi_sys_fd_dup) mov $7, %eax int $0x80 jc 1f - mov 0x8(%esp), %ecx + mov 8(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -115,7 +115,7 @@ ENTRY(cloudabi_sys_fd_pread) mov $8, %eax int $0x80 jc 1f - mov 0x18(%esp), %ecx + mov 24(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -126,7 +126,7 @@ ENTRY(cloudabi_sys_fd_pwrite) mov $9, %eax int $0x80 jc 1f - mov 0x18(%esp), %ecx + mov 24(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -137,7 +137,7 @@ ENTRY(cloudabi_sys_fd_read) mov $10, %eax int $0x80 jc 1f - mov 0x10(%esp), %ecx + mov 16(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -154,7 +154,7 @@ ENTRY(cloudabi_sys_fd_seek) mov $12, %eax int $0x80 jc 1f - mov 0x14(%esp), %ecx + mov 20(%esp), %ecx mov %eax, 0(%ecx) mov %edx, 4(%ecx) xor %eax, %eax @@ -184,7 +184,7 @@ ENTRY(cloudabi_sys_fd_write) mov $16, %eax int $0x80 jc 1f - mov 0x10(%esp), %ecx + mov 16(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -219,7 +219,7 @@ ENTRY(cloudabi_sys_file_open) mov $21, %eax int $0x80 jc 1f - mov 0x1c(%esp), %ecx + mov 28(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -230,7 +230,7 @@ ENTRY(cloudabi_sys_file_readdir) mov $22, %eax int $0x80 jc 1f - mov 0x18(%esp), %ecx + mov 24(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -241,7 +241,7 @@ ENTRY(cloudabi_sys_file_readlink) mov $23, %eax int $0x80 jc 1f - mov 0x18(%esp), %ecx + mov 24(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -312,7 +312,7 @@ ENTRY(cloudabi_sys_mem_map) mov $34, %eax int $0x80 jc 1f - mov 0x20(%esp), %ecx + mov 32(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -347,7 +347,7 @@ ENTRY(cloudabi_sys_poll) mov $39, %eax int $0x80 jc 1f - mov 0x10(%esp), %ecx + mov 16(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -358,7 +358,7 @@ ENTRY(cloudabi_sys_poll_fd) mov $40, %eax int $0x80 jc 1f - mov 0x1c(%esp), %ecx + mov 28(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -380,9 +380,9 @@ ENTRY(cloudabi_sys_proc_fork) mov $43, %eax int $0x80 jc 1f - mov 0x4(%esp), %ecx + mov 4(%esp), %ecx mov %eax, (%ecx) - mov 0x8(%esp), %ecx + mov 8(%esp), %ecx mov %edx, (%ecx) xor %eax, %eax 1: @@ -405,7 +405,7 @@ ENTRY(cloudabi_sys_sock_accept) mov $46, %eax int $0x80 jc 1f - mov 0xc(%esp), %ecx + mov 12(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: @@ -458,7 +458,7 @@ ENTRY(cloudabi_sys_thread_create) mov $54, %eax int $0x80 jc 1f - mov 0x8(%esp), %ecx + mov 8(%esp), %ecx mov %eax, (%ecx) xor %eax, %eax 1: From owner-svn-src-all@freebsd.org Mon Sep 19 17:34:56 2016 Return-Path: Delivered-To: svn-src-all@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 3B14BBE189C for ; Mon, 19 Sep 2016 17:34:56 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x232.google.com (mail-yw0-x232.google.com [IPv6:2607:f8b0:4002:c05::232]) (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 F3ED089E for ; Mon, 19 Sep 2016 17:34:55 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x232.google.com with SMTP id i129so160005694ywb.0 for ; Mon, 19 Sep 2016 10:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5F3IRW/G7pi7lsOpx2w1EPjGkSn5dirJsPs1AHTwThE=; b=STTORNJS6LiNuM/BRoylTUI5i2/KEZTxcbyWnEPEa2fgFKp8ZORIfA/466mt06lqR3 D6UJkDFyNNKkjwDnV1ey9XNV/dMPMr6oX3ty77TR7W+mhKFExGwnk6hOSJrsTx5H4qB6 TTx5UKpnTLeZVATCeP6BiZY7smi/DjKCDlrh2zrvZmTgBHDVFfq8ecwZFicKhjx8T65I xXxC01Y5z6LH2Ldz6x36c8VKOd7c7FlhTFF6Y74g4FC9y/Y+OrERozf5Y7Ln7X57cUns VNhlU5xDf0n4HulS+i7XtARCb1QCLjNkVExrxqM9moyRtDJRcbduTZzzejcBtPebLyen 4KkA== 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=5F3IRW/G7pi7lsOpx2w1EPjGkSn5dirJsPs1AHTwThE=; b=VYDkdvemHii5AJM96gFPCaw6ZQEpXdH8YmA8dPrWmrdZQbfj1ZCJSU6jR6pSDavnWs Nou/quUCDY147oF6GldzA/pf3dbXdGvBE1P1dQEwj9Bx0anX9NthbvD4tQFT/La/AozY TQpZdjjvjZXLwCqqdzbVgnYy/YQGub9x4Oq5L5hyAjaAuWJDaSxdq0W/nt+KioYRdt1J XTVq2+5xp6CUgdYmj1qWXxaB/smQDCt2k48cyhAFOnYyosXZCYSBo8dbOpxKcyAQHvA8 JJFl1Lp9qEKBXFQt5yFtGtW2L7kOfgqD4w/e1hE8+cSVdJvdOQNfBuKYEKsLBABgxCIA s5Pw== X-Gm-Message-State: AE9vXwMjJY4DjD8z6+tGiEcwALaUG7lF9uM6zVQfaqX0bk2AzVMFMPLgsHRIkwCG8XQhbutQfjKHdC6fYsywtA== X-Received: by 10.129.39.83 with SMTP id n80mr25062602ywn.294.1474306494595; Mon, 19 Sep 2016 10:34:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Mon, 19 Sep 2016 10:34:54 -0700 (PDT) In-Reply-To: <2159167.HKd1T6hK90@ralph.baldwin.cx> References: <201609182047.u8IKlt4J096682@repo.freebsd.org> <2159167.HKd1T6hK90@ralph.baldwin.cx> From: Ed Schouten Date: Mon, 19 Sep 2016 19:34:54 +0200 Message-ID: Subject: Re: svn commit: r305952 - head/lib/libc/gen To: John Baldwin Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 17:34:56 -0000 2016-09-19 18:06 GMT+02:00 John Baldwin : > Don't you need the _Generic hack we have for basename now? The _Generic() hack that we have in place is for dirname() right now. I'll extend it to also cover basename() when replacing that function as well. While we're on the subject, anyone willing to review this change? :-) https://reviews.freebsd.org/D7844 -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Sep 19 17:46:17 2016 Return-Path: Delivered-To: svn-src-all@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 0601FBE1B84; Mon, 19 Sep 2016 17:46:17 +0000 (UTC) (envelope-from trasz@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 CCA01F8C; Mon, 19 Sep 2016 17:46:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JHkGZR071356; Mon, 19 Sep 2016 17:46:16 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JHkFKI071354; Mon, 19 Sep 2016 17:46:15 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609191746.u8JHkFKI071354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 19 Sep 2016 17:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305988 - in head/sys: geom sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 17:46:17 -0000 Author: trasz Date: Mon Sep 19 17:46:15 2016 New Revision: 305988 URL: https://svnweb.freebsd.org/changeset/base/305988 Log: Remove unused bio_taskqueue(). MFC after: 1 month Modified: head/sys/geom/geom_io.c head/sys/sys/bio.h Modified: head/sys/geom/geom_io.c ============================================================================== --- head/sys/geom/geom_io.c Mon Sep 19 17:31:05 2016 (r305987) +++ head/sys/geom/geom_io.c Mon Sep 19 17:46:15 2016 (r305988) @@ -884,26 +884,6 @@ g_io_schedule_down(struct thread *tp __u } void -bio_taskqueue(struct bio *bp, bio_task_t *func, void *arg) -{ - bp->bio_task = func; - bp->bio_task_arg = arg; - /* - * The taskqueue is actually just a second queue off the "up" - * queue, so we use the same lock. - */ - g_bioq_lock(&g_bio_run_up); - KASSERT(!(bp->bio_flags & BIO_ONQUEUE), - ("Bio already on queue bp=%p target taskq", bp)); - bp->bio_flags |= BIO_ONQUEUE; - TAILQ_INSERT_TAIL(&g_bio_run_task.bio_queue, bp, bio_queue); - g_bio_run_task.bio_queue_length++; - wakeup(&g_wait_up); - g_bioq_unlock(&g_bio_run_up); -} - - -void g_io_schedule_up(struct thread *tp __unused) { struct bio *bp; Modified: head/sys/sys/bio.h ============================================================================== --- head/sys/sys/bio.h Mon Sep 19 17:31:05 2016 (r305987) +++ head/sys/sys/bio.h Mon Sep 19 17:46:15 2016 (r305988) @@ -151,8 +151,6 @@ void bioq_insert_head(struct bio_queue_h void bioq_insert_tail(struct bio_queue_head *head, struct bio *bp); void bioq_remove(struct bio_queue_head *head, struct bio *bp); -void bio_taskqueue(struct bio *bp, bio_task_t *fund, void *arg); - int physio(struct cdev *dev, struct uio *uio, int ioflag); #define physread physio #define physwrite physio From owner-svn-src-all@freebsd.org Mon Sep 19 17:51:57 2016 Return-Path: Delivered-To: svn-src-all@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 93DBEBE1D26; Mon, 19 Sep 2016 17:51:57 +0000 (UTC) (envelope-from emaste@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 66DCD66D; Mon, 19 Sep 2016 17:51:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JHpuG3074271; Mon, 19 Sep 2016 17:51:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JHpuwv074270; Mon, 19 Sep 2016 17:51:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609191751.u8JHpuwv074270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 19 Sep 2016 17:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305989 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 17:51:57 -0000 Author: emaste Date: Mon Sep 19 17:51:56 2016 New Revision: 305989 URL: https://svnweb.freebsd.org/changeset/base/305989 Log: tcpdump: remove sys/capability.h #include sys/capability.h is just a backwards compatibility wrapper around sys/capsicum.h, which is already #included. Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Mon Sep 19 17:46:15 2016 (r305988) +++ head/contrib/tcpdump/tcpdump.c Mon Sep 19 17:51:56 2016 (r305989) @@ -92,7 +92,6 @@ extern int SIZE_BUF; #include #include #include -#include #include #include #include From owner-svn-src-all@freebsd.org Mon Sep 19 18:35:23 2016 Return-Path: Delivered-To: svn-src-all@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 BE8CBBE1698; Mon, 19 Sep 2016 18:35:23 +0000 (UTC) (envelope-from pfg@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 8EDB0EB7; Mon, 19 Sep 2016 18:35:23 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JIZMjN090286; Mon, 19 Sep 2016 18:35:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JIZMFB090285; Mon, 19 Sep 2016 18:35:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609191835.u8JIZMFB090285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 19 Sep 2016 18:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305990 - head/usr.bin/hexdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:35:23 -0000 Author: pfg Date: Mon Sep 19 18:35:22 2016 New Revision: 305990 URL: https://svnweb.freebsd.org/changeset/base/305990 Log: hexdump(1): Simplify by using asprintf(3) Instead of strlen() + calloc() + snprintf, just use asprintf(). No functional change. Obtained from: OpenBSD (CVS Rev. 1.22) Modified: head/usr.bin/hexdump/parse.c Modified: head/usr.bin/hexdump/parse.c ============================================================================== --- head/usr.bin/hexdump/parse.c Mon Sep 19 17:51:56 2016 (r305989) +++ head/usr.bin/hexdump/parse.c Mon Sep 19 18:35:22 2016 (r305990) @@ -208,7 +208,6 @@ rewrite(FS *fs) unsigned char *p1, *p2, *fmtp; char savech, cs[3]; int nconv, prec; - size_t len; prec = 0; @@ -389,10 +388,8 @@ isint2: switch(fu->bcnt) { */ savech = *p2; p1[0] = '\0'; - len = strlen(fmtp) + strlen(cs) + 1; - if ((pr->fmt = calloc(1, len)) == NULL) + if (asprintf(&pr->fmt, "%s%s", fmtp, cs) == -1) err(1, NULL); - snprintf(pr->fmt, len, "%s%s", fmtp, cs); *p2 = savech; pr->cchar = pr->fmt + (p1 - fmtp); fmtp = p2; From owner-svn-src-all@freebsd.org Mon Sep 19 18:36:27 2016 Return-Path: Delivered-To: svn-src-all@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 BD3DBBE1703; Mon, 19 Sep 2016 18:36:27 +0000 (UTC) (envelope-from avos@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 75151102A; Mon, 19 Sep 2016 18:36:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JIaQhn090361; Mon, 19 Sep 2016 18:36:26 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JIaQ6o090360; Mon, 19 Sep 2016 18:36:26 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609191836.u8JIaQ6o090360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 19 Sep 2016 18:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305991 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:36:27 -0000 Author: avos Date: Mon Sep 19 18:36:26 2016 New Revision: 305991 URL: https://svnweb.freebsd.org/changeset/base/305991 Log: dev/usb: add USB IDs for Realtek 802.11ac wireless adapters. They are will be used by the updated rtwn(4) / urtwn(4) driver. Suggested by: adrian Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Sep 19 18:35:22 2016 (r305990) +++ head/sys/dev/usb/usbdevs Mon Sep 19 18:36:26 2016 (r305991) @@ -1206,6 +1206,7 @@ product ASUS RTL8192CU 0x17ab RTL8192CU product ASUS USBN66 0x17ad USB-N66 product ASUS USBN10NANO 0x17ba USB-N10 Nano product ASUS USBAC51 0x17d1 USB-AC51 +product ASUS USBAC56 0x17d2 USB-AC56 product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA product ASUS GMSC 0x422f ASUS Generic Mass Storage @@ -1426,6 +1427,7 @@ product CISCOLINKSYS WUSB54GC 0x0020 WUS product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G product CISCOLINKSYS AE1000 0x002f AE1000 +product CISCOLINKSYS WUSB6300 0x003f WUSB6300 product CISCOLINKSYS USB3GIGV1 0x0041 USB3GIGV1 USB Ethernet Adapter product CISCOLINKSYS2 RT3070 0x4001 RT3070 product CISCOLINKSYS3 RT3070 0x0101 RT3070 @@ -1620,6 +1622,10 @@ product DLINK DSB650TX4 0x200c 10/100 E product DLINK DWL120E 0x3200 DWL-120 rev E product DLINK DWA125D1 0x330f DWA-125 rev D1 product DLINK DWA123D1 0x3310 DWA-123 rev D1 +product DLINK DWA171A1 0x3314 DWA-171 rev A1 +product DLINK DWA182C1 0x3315 DWA-182 rev C1 +product DLINK DWA180A1 0x3316 DWA-180 rev A1 +product DLINK DWA172A1 0x3318 DWA-172 rev A1 product DLINK DWL122 0x3700 DWL-122 product DLINK DWLG120 0x3701 DWL-G120 product DLINK DWL120F 0x3702 DWL-120 rev F @@ -1738,6 +1744,9 @@ product EDIMAX EW7718 0x7718 EW-7718 product EDIMAX EW7733UND 0x7733 EW-7733UnD product EDIMAX EW7811UN 0x7811 EW-7811Un product EDIMAX RTL8192CU 0x7822 RTL8192CU +product EDIMAX EW7811UTC_1 0xa811 EW-7811UTC +product EDIMAX EW7811UTC_2 0xa812 EW-7811UTC +product EDIMAX EW7822UAC 0xa822 EW-7822UAC /* eGalax Products */ product EGALAX TPANEL 0x0001 Touch Panel @@ -2261,6 +2270,7 @@ product HAWKING RTL8192CU 0x0019 RTL819 product HAWKING UF100 0x400c 10/100 USB Ethernet product HAWKING RTL8192SU_1 0x0015 RTL8192SU product HAWKING RTL8192SU_2 0x0016 RTL8192SU +product HAWKING HD65U 0x0023 HD65U /* HID Global GmbH products */ product HIDGLOBAL CM2020 0x0596 Omnikey Cardman 2020 @@ -2501,6 +2511,7 @@ product IODATA RT3072_1 0x0944 RT3072 product IODATA RT3072_2 0x0945 RT3072 product IODATA RT3072_3 0x0947 RT3072 product IODATA RT3072_4 0x0948 RT3072 +product IODATA WNAC867U 0x0952 WN-AC867U product IODATA USBRSAQ 0x0a03 Serial USB-RSAQ1 product IODATA USBRSAQ5 0x0a0e Serial USB-RSAQ5 product IODATA2 USB2SC 0x0a09 USB2.0-SCSI Bridge USB2-SC @@ -3060,6 +3071,8 @@ product MELCO WLIUCG301N 0x016f WLI-UC-G product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM product MELCO WLIUCG300HPV1 0x01a8 WLI-UC-G300HP-V1 product MELCO WLIUCGNM2 0x01ee WLI-UC-GNM2 +product MELCO WIU2433DM 0x0242 WI-U2-433DM +product MELCO WIU3866D 0x025d WI-U3-866D /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 @@ -3239,6 +3252,7 @@ product NATIONAL BEARPAW2400 0x1001 Bear product NEC HUB_0050 0x0050 USB 2.0 7-Port Hub product NEC HUB_005A 0x005a USB 2.0 4-Port Hub product NEC WL300NUG 0x0249 WL300NU-G +product NEC WL900U 0x0408 Aterm WL900U product NEC HUB 0x55aa hub product NEC HUB_B 0x55ab hub @@ -3278,6 +3292,7 @@ product NETGEAR WNDA3200 0x9018 WNDA3200 product NETGEAR RTL8192CU 0x9021 RTL8192CU product NETGEAR WNA1000 0x9040 WNA1000 product NETGEAR WNA1000M 0x9041 WNA1000M +product NETGEAR A6100 0x9052 A6100 product NETGEAR2 MA101 0x4100 MA101 product NETGEAR2 MA101B 0x4102 MA101 Rev B product NETGEAR3 WG111T 0x4250 WG111T @@ -3550,6 +3565,7 @@ product PLANEX2 GWUS54HP 0xab01 GW-US54H product PLANEX2 GWUS300MINIS 0xab24 GW-US300MiniS product PLANEX2 RT3070 0xab25 RT3070 product PLANEX2 MZKUE150N 0xab2f MZK-UE150N +product PLANEX2 GW900D 0xab30 GW-900D product PLANEX2 GWUS54MINI2 0xab50 GW-US54Mini2 product PLANEX2 GWUS54SG 0xc002 GW-US54SG product PLANEX2 GWUS54GZL 0xc007 GW-US54GZL @@ -3963,6 +3979,7 @@ product SEALEVEL 2803_7 0x2873 FTDI com product SEALEVEL 2803_8 0x2883 FTDI compatible adapter /* Senao products */ +product SENAO EUB1200AC 0x0100 EnGenius EUB1200AC product SENAO RT2870_3 0x0605 RT2870 product SENAO RT2870_4 0x0615 RT2870 product SENAO NUB8301 0x2000 NUB-8301 @@ -4211,6 +4228,7 @@ product SITECOMEU RTL8188CU_1 0x0052 RTL product SITECOMEU RTL8188CU_2 0x005c RTL8188CU product SITECOMEU RTL8192CU 0x0061 RTL8192CU product SITECOMEU LN032 0x0072 LN-032 +product SITECOMEU WLA7100 0x0074 WLA-7100 product SITECOMEU LN031 0x0056 LN-031 product SITECOMEU LN028 0x061c LN-028 product SITECOMEU WL113 0x9071 WL-113 @@ -4463,6 +4481,7 @@ product TREK THUMBDRIVE_8MB 0x9988 Thumb product TRENDNET RTL8192CU 0x624d RTL8192CU product TRENDNET TEW646UBH 0x646b TEW-646UBH product TRENDNET RTL8188CU 0x648b RTL8188CU +product TRENDNET TEW805UB 0x805b TEW-805UB /* Tripp-Lite products */ product TRIPPLITE U209 0x2008 Serial @@ -4706,3 +4725,4 @@ product ZYXEL RT2870_2 0x341a RT2870 product ZYXEL RT3070 0x341e NWD2105 product ZYXEL RTL8192CU 0x341f RTL8192CU product ZYXEL NWD2705 0x3421 NWD2705 +product ZYXEL NWD6605 0x3426 NWD6605 From owner-svn-src-all@freebsd.org Mon Sep 19 18:40:55 2016 Return-Path: Delivered-To: svn-src-all@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 50572BE18D6; Mon, 19 Sep 2016 18:40:55 +0000 (UTC) (envelope-from gjb@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 2E5F1138F; Mon, 19 Sep 2016 18:40:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JIes08091250; Mon, 19 Sep 2016 18:40:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JIesYv091248; Mon, 19 Sep 2016 18:40:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609191840.u8JIesYv091248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Sep 2016 18:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r305992 - in releng/11.0/release/doc: en_US.ISO8859-1/readme share/xml X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:40:55 -0000 Author: gjb Date: Mon Sep 19 18:40:54 2016 New Revision: 305992 URL: https://svnweb.freebsd.org/changeset/base/305992 Log: - Fix various entities in the release.ent file. - Update the readme.html copyright year. - Fix a malformed URL. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/readme/article.xml releng/11.0/release/doc/share/xml/release.ent Modified: releng/11.0/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/readme/article.xml Mon Sep 19 18:36:26 2016 (r305991) +++ releng/11.0/release/doc/en_US.ISO8859-1/readme/article.xml Mon Sep 19 18:40:54 2016 (r305992) @@ -21,22 +21,7 @@ $FreeBSD$ - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009 - 2010 - 2011 - 2012 - 2013 - 2014 - 2015 + 2016 The &os; Documentation Project @@ -338,8 +323,10 @@ other copies are kept updated on the Internet and should be consulted as the current errata for this release. These other copies of the errata are located at - &url.base;/releases/ (as - well as any sites which keep up-to-date mirrors of this + the &os; &release.current; + page (as well as any sites which keep up-to-date + mirrors of this location). Modified: releng/11.0/release/doc/share/xml/release.ent ============================================================================== --- releng/11.0/release/doc/share/xml/release.ent Mon Sep 19 18:36:26 2016 (r305991) +++ releng/11.0/release/doc/share/xml/release.ent Mon Sep 19 18:40:54 2016 (r305992) @@ -6,7 +6,7 @@ - + - + - + @@ -37,7 +37,7 @@ or "release" --> - + From owner-svn-src-all@freebsd.org Mon Sep 19 18:42:59 2016 Return-Path: Delivered-To: svn-src-all@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 615BFBE1B0C; Mon, 19 Sep 2016 18:42:59 +0000 (UTC) (envelope-from pfg@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 31E8618C4; Mon, 19 Sep 2016 18:42:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JIgwLQ094039; Mon, 19 Sep 2016 18:42:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JIgwEf094038; Mon, 19 Sep 2016 18:42:58 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609191842.u8JIgwEf094038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 19 Sep 2016 18:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305993 - head/sbin/mount X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:42:59 -0000 Author: pfg Date: Mon Sep 19 18:42:58 2016 New Revision: 305993 URL: https://svnweb.freebsd.org/changeset/base/305993 Log: mount(1): Simplify by using asprintf(3) Instead of strlen() + malloc() + snprintf, just use asprintf(). No functional change. Obtained from: OpenBSD (CVS Rev. 1.67) Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Mon Sep 19 18:40:54 2016 (r305992) +++ head/sbin/mount/mount.c Mon Sep 19 18:42:58 2016 (r305993) @@ -705,17 +705,14 @@ getmntpt(const char *name) char * catopt(char *s0, const char *s1) { - size_t i; char *cp; if (s1 == NULL || *s1 == '\0') return (s0); if (s0 && *s0) { - i = strlen(s0) + strlen(s1) + 1 + 1; - if ((cp = malloc(i)) == NULL) - errx(1, "malloc failed"); - (void)snprintf(cp, i, "%s,%s", s0, s1); + if (asprintf(&cp, "%s,%s", s0, s1) == -1) + errx(1, "asprintf failed"); } else cp = strdup(s1); From owner-svn-src-all@freebsd.org Mon Sep 19 18:44:45 2016 Return-Path: Delivered-To: svn-src-all@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 0D8BABE1C98; Mon, 19 Sep 2016 18:44:45 +0000 (UTC) (envelope-from emaste@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 B9AFC1BFA; Mon, 19 Sep 2016 18:44:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JIihvj094204; Mon, 19 Sep 2016 18:44:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JIiht0094200; Mon, 19 Sep 2016 18:44:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609191844.u8JIiht0094200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 19 Sep 2016 18:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305994 - in head/sys: amd64/linux boot/efi/loader/arch/amd64 boot/efi/loader/arch/i386 compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:44:45 -0000 Author: emaste Date: Mon Sep 19 18:44:43 2016 New Revision: 305994 URL: https://svnweb.freebsd.org/changeset/base/305994 Log: Catch up to sys/capability.h rename to sys/capsicum.h in r263232 MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/linux/linux_machdep.c head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 head/sys/boot/efi/loader/arch/i386/ldscript.i386 head/sys/compat/linux/linux_event.c Modified: head/sys/amd64/linux/linux_machdep.c ============================================================================== --- head/sys/amd64/linux/linux_machdep.c Mon Sep 19 18:42:58 2016 (r305993) +++ head/sys/amd64/linux/linux_machdep.c Mon Sep 19 18:44:43 2016 (r305994) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:42:58 2016 (r305993) +++ head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:44:43 2016 (r305994) @@ -19,7 +19,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCC + } =0xCCCCCCCC . = ALIGN(4096); .data : { *(.rodata .rodata.* .gnu.linkonce.r.*) Modified: head/sys/boot/efi/loader/arch/i386/ldscript.i386 ============================================================================== --- head/sys/boot/efi/loader/arch/i386/ldscript.i386 Mon Sep 19 18:42:58 2016 (r305993) +++ head/sys/boot/efi/loader/arch/i386/ldscript.i386 Mon Sep 19 18:44:43 2016 (r305994) @@ -14,7 +14,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCC + } =0xCCCCCCCC . = ALIGN(4096); .data : { *(.rodata .rodata.* .gnu.linkonce.r.*) Modified: head/sys/compat/linux/linux_event.c ============================================================================== --- head/sys/compat/linux/linux_event.c Mon Sep 19 18:42:58 2016 (r305993) +++ head/sys/compat/linux/linux_event.c Mon Sep 19 18:44:43 2016 (r305994) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include From owner-svn-src-all@freebsd.org Mon Sep 19 18:45:58 2016 Return-Path: Delivered-To: svn-src-all@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 A71B7BE1D12; Mon, 19 Sep 2016 18:45:58 +0000 (UTC) (envelope-from emaste@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 7704F1D7F; Mon, 19 Sep 2016 18:45:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JIjvjw094290; Mon, 19 Sep 2016 18:45:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JIjv0C094288; Mon, 19 Sep 2016 18:45:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609191845.u8JIjv0C094288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 19 Sep 2016 18:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305995 - in head/sys/boot/efi/loader/arch: amd64 i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:45:58 -0000 Author: emaste Date: Mon Sep 19 18:45:57 2016 New Revision: 305995 URL: https://svnweb.freebsd.org/changeset/base/305995 Log: revert unintended change from r305994 Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 head/sys/boot/efi/loader/arch/i386/ldscript.i386 Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:44:43 2016 (r305994) +++ head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:45:57 2016 (r305995) @@ -19,7 +19,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCCCCCCCC + } =0xCC . = ALIGN(4096); .data : { *(.rodata .rodata.* .gnu.linkonce.r.*) Modified: head/sys/boot/efi/loader/arch/i386/ldscript.i386 ============================================================================== --- head/sys/boot/efi/loader/arch/i386/ldscript.i386 Mon Sep 19 18:44:43 2016 (r305994) +++ head/sys/boot/efi/loader/arch/i386/ldscript.i386 Mon Sep 19 18:45:57 2016 (r305995) @@ -14,7 +14,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCCCCCCCC + } =0xCC . = ALIGN(4096); .data : { *(.rodata .rodata.* .gnu.linkonce.r.*) From owner-svn-src-all@freebsd.org Mon Sep 19 18:51:14 2016 Return-Path: Delivered-To: svn-src-all@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 1CC79BE1DD3; Mon, 19 Sep 2016 18:51:14 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBA841FC1; Mon, 19 Sep 2016 18:51:13 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bm3Mr-0007lD-2L; Mon, 19 Sep 2016 20:33:07 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Edward Tomasz Napierala" Subject: Re: svn commit: r305968 - head/etc/autofs References: <201609190851.u8J8pRDD068198@repo.freebsd.org> Date: Mon, 19 Sep 2016 20:32:36 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201609190851.u8J8pRDD068198@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: - X-Spam-Score: -1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.4.0 X-Scan-Signature: f0eed3f1d89bc5fb772880ef8d54351a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:51:14 -0000 Hi, Your commit message says in words exactly what the diff says in code. Would you like to elaborate on why the change is made? I'm curious because this could cause severe damage to the filesystem on unclean eject of the media. Regards, Ronald. On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Sep 19 08:51:27 2016 > New Revision: 305968 > URL: https://svnweb.freebsd.org/changeset/base/305968 > > Log: > Make autofs use the "async" flag for msdosfs and ufs filesystems > mounted > on /media. > MFC after: 1 month > > Modified: > head/etc/autofs/special_media > > Modified: head/etc/autofs/special_media > ============================================================================== > --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 (r305967) > +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) > @@ -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 > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Mon Sep 19 18:58:00 2016 Return-Path: Delivered-To: svn-src-all@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 521B8BE00AC for ; Mon, 19 Sep 2016 18:58:00 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (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 122968E9 for ; Mon, 19 Sep 2016 18:58:00 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x229.google.com with SMTP id t67so157597914ywg.3 for ; Mon, 19 Sep 2016 11:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=cEPK4PYnnaCY3Z6GN82XRMS9f5gM627duQc+WWrtCuU=; b=Ma2Ve4PWArde7KqFzP+guYQ7G0gs+Zc2hmHg2HVwqxSL6wSZsbX5LUpcM89kJRmhY7 VYHb3FP7QhwWzPCCPAPn67mLo8sAlFWX74DxAS7uuh5vhCda1wy/h7fKs08Jw/4c8z3C bJ2QD6pJERXQroPrlOC1kzu8dGTzVsoSI/IwO7dBHLtPR2FXU1l0a8gCiaLwI2tmEEVl rbdgbrfdbNH1Oc5H6MR5UxELsnhVOBMOf+gf36kAwNJt5mfYmpDBfRUfB/VfGnmdBHzS nIsTTj51N/GJHBHKgLfv3AW/Mg8CMWwC8PQOKPmenHfaEUU7TpIY7j3RSTnaPtJUFtcn neqQ== 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=cEPK4PYnnaCY3Z6GN82XRMS9f5gM627duQc+WWrtCuU=; b=a6eY+kCDjrfkijZVGyH4plvyLcxDEt502x8dl50FfmmG8xbwrrLk5Mxc19puQphLFl JgAPR0hv257l0/qdVyiaL8798qKwdPBcDvnr3dnovnISMV8a93DmFsz7BbqY2EJiFyOk UX447JK0KYyUZzLGKErlaYb6ZjyQzkWj95lndfgO761apwjCcytscBfSydJXjY93V9uc sPI7EBHgCA6kg/H+BZQFQphaHYBIF9bVug8ipt9xDbh74AbmAZvrF1fdxgg1OMfDYtnt 8+Lc4cBE20k3bEaFW3pZgb1wQK+hfRyGuvTj/uxj0513Tuu/qm87BdM/H0ZHNofUbIVt 73OQ== X-Gm-Message-State: AE9vXwPJwuGEsw8Igav9R4NoZpsFwCPWqgaEVs0pYTHamhWRGBCKs5PhQf5put+9bQChH29KXb/MCH3Rfwp7hQ== X-Received: by 10.13.255.69 with SMTP id p66mr28378734ywf.173.1474311479217; Mon, 19 Sep 2016 11:57:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Mon, 19 Sep 2016 11:57:58 -0700 (PDT) In-Reply-To: <201609191234.u8JCYTUo052934@repo.freebsd.org> References: <201609191234.u8JCYTUo052934@repo.freebsd.org> From: Ed Schouten Date: Mon, 19 Sep 2016 20:57:58 +0200 Message-ID: Subject: Re: svn commit: r305971 - stable/11/lib/msun/src To: Bruce Evans Cc: src-committers , 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:58:00 -0000 Hi Bruce, 2016-09-19 14:34 GMT+02:00 Bruce Evans : > +#if (LDBL_MANT_DIG == 53) > +__weak_reference(fmod, fmodl); > +#endif I've noticed that libm uses __weak_reference() all over the place, but I guess that in this specific case there is no reason to use them, right? Wouldn't it make more sense to use strong references here, so that they are consistent with other architectures? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Sep 19 19:18:02 2016 Return-Path: Delivered-To: svn-src-all@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 7508DBE0627; Mon, 19 Sep 2016 19:18:02 +0000 (UTC) (envelope-from gjb@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 50867398; Mon, 19 Sep 2016 19:18:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JJI1X3005998; Mon, 19 Sep 2016 19:18:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JJI1AV005996; Mon, 19 Sep 2016 19:18:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609191918.u8JJI1AV005996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Sep 2016 19:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r305996 - releng/11.0/release/doc/en_US.ISO8859-1/installation X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 19:18:02 -0000 Author: gjb Date: Mon Sep 19 19:18:01 2016 New Revision: 305996 URL: https://svnweb.freebsd.org/changeset/base/305996 Log: Add the installation documentation files. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: releng/11.0/release/doc/en_US.ISO8859-1/installation/ releng/11.0/release/doc/en_US.ISO8859-1/installation/Makefile (contents, props changed) releng/11.0/release/doc/en_US.ISO8859-1/installation/article.xml (contents, props changed) Added: releng/11.0/release/doc/en_US.ISO8859-1/installation/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/11.0/release/doc/en_US.ISO8859-1/installation/Makefile Mon Sep 19 19:18:01 2016 (r305996) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +RELN_ROOT?= ${.CURDIR}/../.. +.ifdef NO_LANGCODE_IN_DESTDIR +DESTDIR?= ${DOCDIR}/installation +.else +DESTDIR?= ${DOCDIR}/en_US.ISO8859-1/installation +.endif + +DOC?= article +FORMATS?= html +INSTALL_COMPRESSED?= gz +INSTALL_ONLY_COMPRESSED?= + +# SGML content +SRCS+= article.xml + +.include "${RELN_ROOT}/share/mk/doc.relnotes.mk" +.include "${DOC_PREFIX}/share/mk/doc.project.mk" Added: releng/11.0/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/11.0/release/doc/en_US.ISO8859-1/installation/article.xml Mon Sep 19 19:18:01 2016 (r305996) @@ -0,0 +1,125 @@ + + +%release; + +]> + +
+ &os; &release.current; Installation Instructions + + The &os; Project + + $FreeBSD$ + + + 2016 + The &os; Documentation Project + + + + &tm-attrib.freebsd; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + This article gives some brief instructions on installing + &os; &release.current; and upgrading the systems running earlier + releases. + + + + + Installing &os; + + The Installing + &os; + chapter of the &os; + Handbook provides more in-depth information about the + installation program itself, including a guided walk-through with + screenshots. + + + + Upgrading &os; + + If you are upgrading from a previous release of &os;, please + read upgrading + section in the Release Notes for notable + incompatibilities carefully. + + + Upgrading from Source + + The procedure for doing a source code based update is + described in + and + . + + For SVN use the releng/&local.rel; branch + which will be where any upcoming Security Advisories or Errata + Notices will be applied. + + + + Upgrading Using <quote>&os; Update</quote> + + The &man.freebsd-update.8; utility supports binary + upgrades of &arch.i386; and &arch.amd64; systems running + earlier FreeBSD releases. Systems running + 9.3-RELEASE, + 10.1-RELEASE, + 10.2-RELEASE, + 10.3-RELEASE, + 11.0-RC[123] can upgrade as follows: + + &prompt.root; freebsd-update fetch +&prompt.root; freebsd-update install + + Now the &man.freebsd-update.8; utility can fetch bits + belonging to &release.current;. During this process + &man.freebsd-update.8; will ask for help in merging + configuration files. + + &prompt.root; freebsd-update upgrade -r &local.rel;-RELEASE + + &prompt.root; freebsd-update install + + The system must now be rebooted with the newly installed + kernel before the non-kernel components are updated. + + &prompt.root; shutdown -r now + + After rebooting, &man.freebsd-update.8; needs to be run + again to install the new userland components: + + &prompt.root; freebsd-update install + + At this point, users of systems being upgraded from + earlier &os; releases will be prompted by + &man.freebsd-update.8; to rebuild all third-party applications + (e.g., ports installed from the ports tree) due to updates in + system libraries. + + After updating installed third-party applications (and + again, only if &man.freebsd-update.8; printed a message + indicating that this was necessary), run + &man.freebsd-update.8; again so that it can delete the old (no + longer used) system libraries: + + &prompt.root; freebsd-update install + + Finally, reboot into &release.current; + + &prompt.root; shutdown -r now + + +
From owner-svn-src-all@freebsd.org Mon Sep 19 19:18:41 2016 Return-Path: Delivered-To: svn-src-all@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 F0579BE06C7; Mon, 19 Sep 2016 19:18:41 +0000 (UTC) (envelope-from gjb@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 C1A72795; Mon, 19 Sep 2016 19:18:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JJIfdx006060; Mon, 19 Sep 2016 19:18:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JJIevD006059; Mon, 19 Sep 2016 19:18:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609191918.u8JJIevD006059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Sep 2016 19:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r305997 - releng/11.0/release/doc/en_US.ISO8859-1 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 19:18:42 -0000 Author: gjb Date: Mon Sep 19 19:18:40 2016 New Revision: 305997 URL: https://svnweb.freebsd.org/changeset/base/305997 Log: Connect the installation/article.xml to the build. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/Makefile Modified: releng/11.0/release/doc/en_US.ISO8859-1/Makefile ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/Makefile Mon Sep 19 19:18:01 2016 (r305996) +++ releng/11.0/release/doc/en_US.ISO8859-1/Makefile Mon Sep 19 19:18:40 2016 (r305997) @@ -6,6 +6,7 @@ SUBDIR = relnotes SUBDIR+= hardware SUBDIR+= readme SUBDIR+= errata +SUBDIR+= installation COMPAT_SYMLINK = en From owner-svn-src-all@freebsd.org Mon Sep 19 20:14:38 2016 Return-Path: Delivered-To: svn-src-all@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 CBBCFBE1826; Mon, 19 Sep 2016 20:14:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB308A61; Mon, 19 Sep 2016 20:14:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id B4C0410AF8C; Mon, 19 Sep 2016 16:14:36 -0400 (EDT) From: John Baldwin To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305981 - head/usr.bin/cmp Date: Mon, 19 Sep 2016 13:14:29 -0700 Message-ID: <3626154.BMQsYkeuc4@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201609191613.u8JGD0GA036854@repo.freebsd.org> References: <201609191613.u8JGD0GA036854@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 19 Sep 2016 16:14:36 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 20:14:38 -0000 On Monday, September 19, 2016 04:13:00 PM Conrad E. Meyer wrote: > Author: cem > Date: Mon Sep 19 16:13:00 2016 > New Revision: 305981 > URL: https://svnweb.freebsd.org/changeset/base/305981 > > Log: > cmp(1): Capsicumify > > Reviewed by: allanjude, bapt, oshogbo > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D7912 > > Modified: > head/usr.bin/cmp/cmp.c > > Modified: head/usr.bin/cmp/cmp.c > ============================================================================== > --- head/usr.bin/cmp/cmp.c Mon Sep 19 16:07:32 2016 (r305980) > +++ head/usr.bin/cmp/cmp.c Mon Sep 19 16:13:00 2016 (r305981) > @@ -42,15 +42,18 @@ static char sccsid[] = "@(#)cmp.c 8.3 (B > #include > __FBSDID("$FreeBSD$"); > > +#include > #include > #include Style nit: why is first? or should be first (from style(9)) then remaining sys/foo.h headers are alphabetically sorted after that. Does have to be before for some reason? -- John Baldwin From owner-svn-src-all@freebsd.org Mon Sep 19 20:17:20 2016 Return-Path: Delivered-To: svn-src-all@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 6A013BE1954; Mon, 19 Sep 2016 20:17:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 4CE3CC27; Mon, 19 Sep 2016 20:17:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 42F9A1148; Mon, 19 Sep 2016 20:17:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id B74581AD8B; Mon, 19 Sep 2016 20:17:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id Lzc6W5qbCqNe; Mon, 19 Sep 2016 20:17:16 +0000 (UTC) Subject: Re: svn commit: r305933 - head/share/man/man5 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6361D1AD85 To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609181540.u8IFeaGO078712@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <321bd52d-151c-12a6-cbcd-249fd708677a@FreeBSD.org> Date: Mon, 19 Sep 2016 13:17:12 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609181540.u8IFeaGO078712@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a7PwlEHtLwfbkEsi3Ijprd24rkVfaLopx" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 20:17:20 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --a7PwlEHtLwfbkEsi3Ijprd24rkVfaLopx Content-Type: multipart/mixed; boundary="TFLmOiJCBuap85mivmTdkJewhhRL7Hj7B"; protected-headers="v1" From: Bryan Drewery To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <321bd52d-151c-12a6-cbcd-249fd708677a@FreeBSD.org> Subject: Re: svn commit: r305933 - head/share/man/man5 References: <201609181540.u8IFeaGO078712@repo.freebsd.org> In-Reply-To: <201609181540.u8IFeaGO078712@repo.freebsd.org> --TFLmOiJCBuap85mivmTdkJewhhRL7Hj7B Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 9/18/2016 8:40 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Sep 18 15:40:36 2016 > New Revision: 305933 > URL: https://svnweb.freebsd.org/changeset/base/305933 >=20 > Log: > Modify manually given makeman is broken due to errors in share/mk/* I don't get the errors you reported. Did you modify makeman, and is it up-to-date? >=20 > Modified: > head/share/man/man5/src.conf.5 >=20 > Modified: head/share/man/man5/src.conf.5 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/man/man5/src.conf.5 Sun Sep 18 15:06:28 2016 (r305932) > +++ head/share/man/man5/src.conf.5 Sun Sep 18 15:40:36 2016 (r305933) > @@ -1,7 +1,7 @@ > .\" DO NOT EDIT-- this file is automatically generated. > .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 1= 8:42:30Z bdrewery > .\" $FreeBSD$ > -.Dd August 23, 2016 > +.Dd September 18, 2016 > .Dt SRC.CONF 5 > .Os > .Sh NAME > @@ -1319,11 +1319,10 @@ This includes > .Xr rlogin 1 , > .Xr rsh 1 , > etc. > -.It Va WITHOUT_RCS > -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 275138 2014-11-= 26 20:43:09Z gjb > -Set to not build > -.Xr rcs 1 , > -.Xr etcupdate 8 , > +.It Va WITH_RCS > +.\" from FreeBSD: head/tools/build/options/WITH_RCS 305931 2016-09-18 = 15:01:11Z bapt > +Set to build > +.Xr rcs 1 > and related utilities. > .It Va WITHOUT_RESCUE > .\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-= 03-21 07:50:50Z ru >=20 --=20 Regards, Bryan Drewery --TFLmOiJCBuap85mivmTdkJewhhRL7Hj7B-- --a7PwlEHtLwfbkEsi3Ijprd24rkVfaLopx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJX4EfMAAoJEDXXcbtuRpfPETsH/iKkJOxIFtF5Q4RZUK/M5AqE hKGCOCzIjDFTjvJZyD22/5x1d3FFtsNWSI22LVjwFIbMX8QRHiGWNunDnpHE2LFA sx/Pr+qWf0ZGZ7u2W9tgXQsXQ5JuMh6+/J78QyV66/eQ0IC3Wk2EgRGo/tLKQMEL DMOaNzed434gZWPd6pVdVQa3ktY7M4+OCo4GjBGywY9i5IKt02iT1ognGhQQnZoc 7UXc7Ikh2CitMgCEjYDX8JhpmC3Z6DkpAlHmy8y7zPjId8whD2kf3jSGa+WA9zF6 zOorCclGNHTjyLCPdUVvbDo/3hcpN0A5l1oW1JJtfw4piAjMEbcxNLfbFC7VaZc= =we21 -----END PGP SIGNATURE----- --a7PwlEHtLwfbkEsi3Ijprd24rkVfaLopx-- From owner-svn-src-all@freebsd.org Mon Sep 19 20:37:06 2016 Return-Path: Delivered-To: svn-src-all@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 3DF23BE1F22; Mon, 19 Sep 2016 20:37:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C42CD33; Mon, 19 Sep 2016 20:37:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 322FD10AF8F; Mon, 19 Sep 2016 16:37:05 -0400 (EDT) From: John Baldwin To: Ed Schouten Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305952 - head/lib/libc/gen Date: Mon, 19 Sep 2016 13:18:02 -0700 Message-ID: <2420667.bBsfb0vsSt@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201609182047.u8IKlt4J096682@repo.freebsd.org> <2159167.HKd1T6hK90@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 19 Sep 2016 16:37:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 20:37:06 -0000 On Monday, September 19, 2016 07:34:54 PM Ed Schouten wrote: > 2016-09-19 18:06 GMT+02:00 John Baldwin : > > Don't you need the _Generic hack we have for basename now? > > The _Generic() hack that we have in place is for dirname() right now. > I'll extend it to also cover basename() when replacing that function > as well. Oh, somehow I had misread this commit to be the commit to fix the other one rather than a followup to the previous change. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Sep 19 20:43:04 2016 Return-Path: Delivered-To: svn-src-all@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 9230BBE1108; Mon, 19 Sep 2016 20:43:04 +0000 (UTC) (envelope-from cem@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 454BE1BB; Mon, 19 Sep 2016 20:43:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JKh3Px040009; Mon, 19 Sep 2016 20:43:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JKh3jv040006; Mon, 19 Sep 2016 20:43:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609192043.u8JKh3jv040006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Sep 2016 20:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305998 - in head/usr.bin: cmp indent tr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 20:43:04 -0000 Author: cem Date: Mon Sep 19 20:43:03 2016 New Revision: 305998 URL: https://svnweb.freebsd.org/changeset/base/305998 Log: Move sys/capsicum.h includes after types.h or param.h This is not actually documented or even implied in style(9). Make the change to match convention. Someone should document this convention in style(9). Reported by: jhb Sponsored by: EMC Dell Isilon Modified: head/usr.bin/cmp/cmp.c head/usr.bin/indent/indent.c head/usr.bin/tr/tr.c Modified: head/usr.bin/cmp/cmp.c ============================================================================== --- head/usr.bin/cmp/cmp.c Mon Sep 19 19:18:40 2016 (r305997) +++ head/usr.bin/cmp/cmp.c Mon Sep 19 20:43:03 2016 (r305998) @@ -42,8 +42,8 @@ static char sccsid[] = "@(#)cmp.c 8.3 (B #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Mon Sep 19 19:18:40 2016 (r305997) +++ head/usr.bin/indent/indent.c Mon Sep 19 20:43:03 2016 (r305998) @@ -50,8 +50,8 @@ static char sccsid[] = "@(#)indent.c 5.1 #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/usr.bin/tr/tr.c ============================================================================== --- head/usr.bin/tr/tr.c Mon Sep 19 19:18:40 2016 (r305997) +++ head/usr.bin/tr/tr.c Mon Sep 19 20:43:03 2016 (r305998) @@ -41,8 +41,8 @@ static const char copyright[] = static const char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95"; #endif -#include #include +#include #include #include From owner-svn-src-all@freebsd.org Mon Sep 19 20:44:55 2016 Return-Path: Delivered-To: svn-src-all@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 E215FBE131E; Mon, 19 Sep 2016 20:44:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x244.google.com (mail-pa0-x244.google.com [IPv6:2607:f8b0:400e:c03::244]) (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 ADA856BF; Mon, 19 Sep 2016 20:44:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x244.google.com with SMTP id vz6so7424402pab.1; Mon, 19 Sep 2016 13:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=mm/HAHMMTWGKonmeffzRh6rqHIAA7m/idDE5m8zYl9w=; b=Q84ha4mV2hRs+DEEafcaJkxiIe26m2GGOs3kTrRIiPhOb4/449xTbR4qgljoVKPZNc 7D4ZzGzoH4N32g2FewZu1bHnUdcq4+dAYJfLO2g9DgUKwidxfuiiQI9KjMajWNjmixx6 crqMOyqN66Hez7VWj0KYbT7kaYhJoIOEmTk/lEQ4Js5vhfVmOIM0XqjWaxltNpMNSMW4 0Dcg3pVHKT0ApojP50k4M9m4BXV1OZEiBw6nHfU5ULVFgVTo+fkm9qw1s6kwUQ9c+vom MSrsCUJ+5LODkuFYhEekIz/y+dccGGJZZHhtexDyMVGl9lGbsXixnvWlLkcNDbYd/6qT S2uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=mm/HAHMMTWGKonmeffzRh6rqHIAA7m/idDE5m8zYl9w=; b=F9IQyQld9fU1JJ06hUn0EYXTAK5xgC+CfEovzrqk4dXkM5URDKlQk30DXVGZ5+MGSa dAjA3vRBwhy5TMekghjHsr/jVGApDc+5jiK9NxguBCI17Y1AC1tGXGoyYfEwKTjL5OnC u+0sqL0x1qauenBcSnmZptSDXpWxv6QatdBJjYy8x/jlcDivmbq9s7ETZCxR2KvNGyMU J5qfa+uz6xGrm2Rwi3vQ5psQqFhVlVQo2aEqo/1qA0ko/CVuDYrV/LHXBuDP4TM1eZaJ MLSzXjNembZgebFlpMaCUW0EbsVTbq+RUWw1BU6J1avPyf0nAazW91TOeJFwJhhmydP6 ZgLg== X-Gm-Message-State: AE9vXwMWLaGzYxU1Uzj1OrbGA5F2mPyDu6S0IdW07RN0J81U8YguBpnvdvEfRDorfmXNIg== X-Received: by 10.67.7.34 with SMTP id cz2mr35479910pad.173.1474317895187; Mon, 19 Sep 2016 13:44:55 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s7sm73595673pfk.11.2016.09.19.13.44.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Sep 2016 13:44:54 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201609192043.u8JKh3jv040006@repo.freebsd.org> Date: Mon, 19 Sep 2016 13:45:01 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201609192043.u8JKh3jv040006@repo.freebsd.org> To: "Conrad E. Meyer" X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 20:44:56 -0000 > On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: >=20 > Author: cem > Date: Mon Sep 19 20:43:03 2016 > New Revision: 305998 > URL: https://svnweb.freebsd.org/changeset/base/305998 >=20 > Log: > Move sys/capsicum.h includes after types.h or param.h >=20 > This is not actually documented or even implied in style(9). Make = the change > to match convention. Someone should document this convention in = style(9). >=20 > Reported by: jhb > Sponsored by: EMC Dell Isilon Uh=E2=80=A6 yes it clearly states it in style(9). =46rom = https://www.freebsd.org/cgi/man.cgi?query=3Dstyle&sektion=3D9 : Kernel include files (i.e. sys/*.h) come first; normally, include OR , but not both. = includes , and it is okay to depend on that. Thanks, -Ngie= From owner-svn-src-all@freebsd.org Mon Sep 19 21:22:44 2016 Return-Path: Delivered-To: svn-src-all@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 B1031BE1D59; Mon, 19 Sep 2016 21:22:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CEA2D2A; Mon, 19 Sep 2016 21:22:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 9262810AF8D; Mon, 19 Sep 2016 17:22:42 -0400 (EDT) From: John Baldwin To: "Ngie Cooper (yaneurabeya)" Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr Date: Mon, 19 Sep 2016 14:22:37 -0700 Message-ID: <8333248.dV1m5xp1ki@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201609192043.u8JKh3jv040006@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 19 Sep 2016 17:22:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 21:22:44 -0000 On Monday, September 19, 2016 01:45:01 PM Ngie Cooper wrote: >=20 > > On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrot= e: > >=20 > > Author: cem > > Date: Mon Sep 19 20:43:03 2016 > > New Revision: 305998 > > URL: https://svnweb.freebsd.org/changeset/base/305998 > >=20 > > Log: > > Move sys/capsicum.h includes after types.h or param.h > >=20 > > This is not actually documented or even implied in style(9). Make= the change > > to match convention. Someone should document this convention in s= tyle(9). > >=20 > > Reported by:=09jhb > > Sponsored by:=09EMC Dell Isilon >=20 > Uh=E2=80=A6 yes it clearly states it in style(9). From https://www.fr= eebsd.org/cgi/man.cgi?query=3Dstyle&sektion=3D9 : > Kernel include files (i.e. sys/*.h) come first; normally, includ= e > OR , but not both. inc= ludes > , and it is okay to depend on that. It doesn't actually say that types.h/param.h has to come before other s= ys/*.h headers though. Normally sys/foo.h requires sys/types.h to compile hen= ce the rule, but sys/capsicum.h gets around this by a nested include of sys/pa= ram.h (which is itself probably dubious). I do think we should explicitly add a note to style.9 though to say tha= t types.h|param.h comes first. --=20 John Baldwin From owner-svn-src-all@freebsd.org Mon Sep 19 21:23:55 2016 Return-Path: Delivered-To: svn-src-all@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 398C1BE1DBA; Mon, 19 Sep 2016 21:23:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 11D61EA8; Mon, 19 Sep 2016 21:23:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id q2so5085264pfj.0; Mon, 19 Sep 2016 14:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=CV8klox9EdnwM0kga9maFsMoKyYOgTQEBTe4TWqe9Qw=; b=gnpFAlYBNPTwaC7TBovmPB+UeBuJk/fXlw0Jb9Zarcc2yTJLt3T0qlnCLe2cwwtTrB aqYUvm/Q4RvqzWRk6DypLARQZgQfMxvptDmpJAVebQ7/eQzJAwg4jYPrIpecXQDqZmVu 1DwroVRjtACoWTPck2t7n24V0/pXJx5sZlq2Hr1+C9Q8Ffrzcr4siF7BRHLml+Ae8gWs 2ZKdaKm9/sqgSN3t1PRG4Bcj/hm3eifzVtJVzvfVNAmKwOOGlkHgu9rFdoUeIwZdTEhj hJJ04i9c2YYqQQqIP9R16pl/lTxG12BeIUy3mv5r64NIi+O0FRK/aDl8gvUoVmDyOcrO WkCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=CV8klox9EdnwM0kga9maFsMoKyYOgTQEBTe4TWqe9Qw=; b=nDZcNsSkA5hJB5Oy6Z51cKf+exEcMEzI0KpyeepZFe3OZNZCBYHWirApRzrm3EvUD/ 0sdhsbNu97S+A2/bwnYbRZAT1I1y6rDmFhDvSVwknYFYW0paI5lEXLPqFMDMXjOhmMZr IgmJWt382V7kZX7BPD70OACsEF1vBj0LonUsyPEa/FOdhPN44wxNczwHp/+0eBDYLutM s4QkxREd0H0sungUKiLs3TcLbMuUR0yIYJg8bg7PO5pw0w6r3pkIDMTsi0XtP+ZVeUgk 8rb+SUXL8uxPUYcsf6aK+zhLM8KKh16fVubXfV62gyvWxU+WZF0GXCH9DT1lVwFhSxXR c9+w== X-Gm-Message-State: AE9vXwOwzzp1kGkIqfsz378Ph5YqbBNXv8bhfVEnEQGAxt29Fe4RKTDZ+0DnvW9o5B9r4A== X-Received: by 10.98.2.215 with SMTP id 206mr1116773pfc.89.1474320234463; Mon, 19 Sep 2016 14:23:54 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id w69sm26824214pfd.28.2016.09.19.14.23.53 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Sep 2016 14:23:53 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <8333248.dV1m5xp1ki@ralph.baldwin.cx> Date: Mon, 19 Sep 2016 14:23:53 -0700 Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7087F928-F8AB-499F-8D73-92B29FB20494@gmail.com> References: <201609192043.u8JKh3jv040006@repo.freebsd.org> <8333248.dV1m5xp1ki@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 21:23:55 -0000 > On Sep 19, 2016, at 2:22 PM, John Baldwin wrote: >=20 > On Monday, September 19, 2016 01:45:01 PM Ngie Cooper wrote: >>=20 >>> On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer = wrote: >>>=20 >>> Author: cem >>> Date: Mon Sep 19 20:43:03 2016 >>> New Revision: 305998 >>> URL: https://svnweb.freebsd.org/changeset/base/305998 >>>=20 >>> Log: >>> Move sys/capsicum.h includes after types.h or param.h >>>=20 >>> This is not actually documented or even implied in style(9). Make = the change >>> to match convention. Someone should document this convention in = style(9). >>>=20 >>> Reported by: jhb >>> Sponsored by: EMC Dell Isilon >>=20 >> Uh=E2=80=A6 yes it clearly states it in style(9). =46rom = https://www.freebsd.org/cgi/man.cgi?query=3Dstyle&sektion=3D9 : >> Kernel include files (i.e. sys/*.h) come first; normally, include >> OR , but not both. = includes >> , and it is okay to depend on that. >=20 > It doesn't actually say that types.h/param.h has to come before other = sys/*.h > headers though. Normally sys/foo.h requires sys/types.h to compile = hence the > rule, but sys/capsicum.h gets around this by a nested include of = sys/param.h > (which is itself probably dubious). >=20 > I do think we should explicitly add a note to style.9 though to say = that > types.h|param.h comes first. Yeah=E2=80=A6 I just reread it and I noticed that it=E2=80=99s not 100% = explicit. Thanks, -Ngie= From owner-svn-src-all@freebsd.org Mon Sep 19 22:06:02 2016 Return-Path: Delivered-To: svn-src-all@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 01FF8BE07B8; Mon, 19 Sep 2016 22:06:01 +0000 (UTC) (envelope-from ivadasz@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 BC2AC6C7; Mon, 19 Sep 2016 22:06:01 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JM60c3070220; Mon, 19 Sep 2016 22:06:00 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JM60V2070219; Mon, 19 Sep 2016 22:06:00 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192206.u8JM60V2070219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305999 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:06:02 -0000 Author: ivadasz Date: Mon Sep 19 22:06:00 2016 New Revision: 305999 URL: https://svnweb.freebsd.org/changeset/base/305999 Log: [iwm] Use htole16 for policy field in struct iwm_time_event_cmd_v2. The htole32 was working fine for little-endian machines, but would have been broken on big-endian. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7929 Modified: head/sys/dev/iwm/if_iwm_time_event.c Modified: head/sys/dev/iwm/if_iwm_time_event.c ============================================================================== --- head/sys/dev/iwm/if_iwm_time_event.c Mon Sep 19 20:43:03 2016 (r305998) +++ head/sys/dev/iwm/if_iwm_time_event.c Mon Sep 19 22:06:00 2016 (r305999) @@ -266,7 +266,7 @@ iwm_mvm_protect_session(struct iwm_softc time_cmd.duration = htole32(duration); time_cmd.repeat = 1; time_cmd.policy - = htole32(IWM_TE_V2_NOTIF_HOST_EVENT_START | + = htole16(IWM_TE_V2_NOTIF_HOST_EVENT_START | IWM_TE_V2_NOTIF_HOST_EVENT_END | IWM_T2_V2_START_IMMEDIATELY); From owner-svn-src-all@freebsd.org Mon Sep 19 22:08:48 2016 Return-Path: Delivered-To: svn-src-all@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 CA7FFBE09FF; Mon, 19 Sep 2016 22:08:48 +0000 (UTC) (envelope-from ivadasz@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 9AAE4A42; Mon, 19 Sep 2016 22:08:48 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JM8lvg070345; Mon, 19 Sep 2016 22:08:47 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JM8lXH070342; Mon, 19 Sep 2016 22:08:47 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192208.u8JM8lXH070342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306000 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:08:48 -0000 Author: ivadasz Date: Mon Sep 19 22:08:47 2016 New Revision: 306000 URL: https://svnweb.freebsd.org/changeset/base/306000 Log: [iwm] Remove unused field from iwm_rx_data. Use uint32_t instead of enum type. The wantresp field in struct iwm_rx_data has never been used for anything, so we can just delete it. Apparently struct iwm_sf_cfg_cmd was compiled correctly (using a 32bit value to represent the enum), but it still seems like a very bad idea to use an enum type in a __packed struct. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7930 Modified: head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Sep 19 22:06:00 2016 (r305999) +++ head/sys/dev/iwm/if_iwmreg.h Mon Sep 19 22:08:47 2016 (r306000) @@ -3251,7 +3251,7 @@ enum iwm_sf_scenario { * @full_on_timeouts: timer values for each scenario in full on state. */ struct iwm_sf_cfg_cmd { - enum iwm_sf_state state; + uint32_t state; uint32_t watermark[IWM_SF_TRANSIENT_STATES_NUMBER]; uint32_t long_delay_timeouts[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES]; uint32_t full_on_timeouts[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES]; Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Sep 19 22:06:00 2016 (r305999) +++ head/sys/dev/iwm/if_iwmvar.h Mon Sep 19 22:08:47 2016 (r306000) @@ -275,7 +275,6 @@ struct iwm_tx_ring { struct iwm_rx_data { struct mbuf *m; bus_dmamap_t map; - int wantresp; }; struct iwm_rx_ring { From owner-svn-src-all@freebsd.org Mon Sep 19 22:11:36 2016 Return-Path: Delivered-To: svn-src-all@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 00CD7BE0AD6; Mon, 19 Sep 2016 22:11:36 +0000 (UTC) (envelope-from ivadasz@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 C4203D71; Mon, 19 Sep 2016 22:11:35 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JMBYLY071120; Mon, 19 Sep 2016 22:11:34 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JMBY4K071119; Mon, 19 Sep 2016 22:11:34 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192211.u8JMBY4K071119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306001 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:11:36 -0000 Author: ivadasz Date: Mon Sep 19 22:11:34 2016 New Revision: 306001 URL: https://svnweb.freebsd.org/changeset/base/306001 Log: [iwm] Fix off-by-one check in iwm_read_firmware(). This fixes a potential buffer overrun in the firmware parsing code. Reported by: Coverity Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7931 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:08:47 2016 (r306000) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:11:34 2016 (r306001) @@ -739,7 +739,7 @@ iwm_read_firmware(struct iwm_softc *sc, } capa = (const struct iwm_ucode_capa *)tlv_data; idx = le32toh(capa->api_index); - if (idx > howmany(IWM_NUM_UCODE_TLV_CAPA, 32)) { + if (idx >= howmany(IWM_NUM_UCODE_TLV_CAPA, 32)) { device_printf(sc->sc_dev, "unsupported API index %d\n", idx); goto parse_out; From owner-svn-src-all@freebsd.org Mon Sep 19 22:13:09 2016 Return-Path: Delivered-To: svn-src-all@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 7F454BE0E23; Mon, 19 Sep 2016 22:13:09 +0000 (UTC) (envelope-from ivadasz@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 500D5FFC; Mon, 19 Sep 2016 22:13:09 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JMD8qQ074182; Mon, 19 Sep 2016 22:13:08 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JMD8mh074181; Mon, 19 Sep 2016 22:13:08 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192213.u8JMD8mh074181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306002 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:13:09 -0000 Author: ivadasz Date: Mon Sep 19 22:13:08 2016 New Revision: 306002 URL: https://svnweb.freebsd.org/changeset/base/306002 Log: [iwm] Fix iwm_poll_bit() error value check in iwm_attach(). The iwm(4) iwm_poll_bit() function returns 1 on success, and 0 on failure, whereas the iwl_poll_bit() in Linux iwlwifi returns < 0 on failure. So the (ret < 0) check ended up ignoring any error returned by iwm_poll_bit(). Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7932 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:11:34 2016 (r306001) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:13:08 2016 (r306002) @@ -5762,7 +5762,7 @@ iwm_attach(device_t dev) IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); - if (ret < 0) { + if (!ret) { device_printf(sc->sc_dev, "Failed to wake up the nic\n"); goto fail; From owner-svn-src-all@freebsd.org Mon Sep 19 22:13:53 2016 Return-Path: Delivered-To: svn-src-all@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 D4164BE0EC2; Mon, 19 Sep 2016 22:13:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) (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 A3B7220E; Mon, 19 Sep 2016 22:13:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f182.google.com with SMTP id m79so2010676ioo.3; Mon, 19 Sep 2016 15:13:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=PDQyOijl4S+L5+YhUiFTrjD3Rqty/5anCFaKVQb6kus=; b=Ke5ALbYARFIHrSs7BGZM8+rjnXdV2U1IYEetPao/TIuhtr/ZVirIjGjdqh4Xaj/1uj qinQ3Hcq8+1PYJqzvGyDdkdGwQqcF7LRc+UDi6EpLQ03a7h72sUX2ZqDUwSJ9ESc/2XS iJ55U0niKgFbGfLWH06AHh7jWHnUMVfFZD0NNodHLmFYFDBNw7/gbTF0iiZtGWukfFt9 V1Q2pKQRiOeMDnFNm1tIDHXC0tTQ2sEDwa8iwP/B1ngUdKy4nscOfoesRx7FmTo9hdmB B+Y+achOLAm7Gq/yhEZrB6XcoZMmIbJScD25JWyezaHFKb1T8LzkEbfpnxHLI5CAcTnV o67g== X-Gm-Message-State: AE9vXwMjyl46TJlbcPuUKeCoQl+M15SuZaDn62r9Hg93A1ygqg9uNTXdFtHBtR+Qb/HTVA== X-Received: by 10.107.169.202 with SMTP id f71mr3343601ioj.161.1474318986703; Mon, 19 Sep 2016 14:03:06 -0700 (PDT) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com. [209.85.223.181]) by smtp.gmail.com with ESMTPSA id y133sm9611935ioy.8.2016.09.19.14.03.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 14:03:06 -0700 (PDT) Received: by mail-io0-f181.google.com with SMTP id r145so614661ior.0; Mon, 19 Sep 2016 14:03:06 -0700 (PDT) X-Received: by 10.107.21.129 with SMTP id 123mr37340624iov.72.1474318986180; Mon, 19 Sep 2016 14:03:06 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Mon, 19 Sep 2016 14:03:05 -0700 (PDT) In-Reply-To: References: <201609192043.u8JKh3jv040006@repo.freebsd.org> From: Conrad Meyer Date: Mon, 19 Sep 2016 14:03:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:13:53 -0000 If you re-read the sentences you've pasted carefully, I think you'll find it doesn't actually say that the types or param headers come before other sys/ headers. Just that sys/ headers come before non-sys/ headers. Best, Conrad On Mon, Sep 19, 2016 at 1:45 PM, Ngie Cooper (yaneurabeya) wrote: > > On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: > > Author: cem > Date: Mon Sep 19 20:43:03 2016 > New Revision: 305998 > URL: https://svnweb.freebsd.org/changeset/base/305998 > > Log: > Move sys/capsicum.h includes after types.h or param.h > > This is not actually documented or even implied in style(9). Make the > change > to match convention. Someone should document this convention in style(9= ). > > Reported by: jhb > Sponsored by: EMC Dell Isilon > > > Uh=E2=80=A6 yes it clearly states it in style(9). From > https://www.freebsd.org/cgi/man.cgi?query=3Dstyle&sektion=3D9 : > > Kernel include files (i.e. sys/*.h) come first; normally, include > OR , but not both. include= s > , and it is okay to depend on that. > > Thanks, > -Ngie From owner-svn-src-all@freebsd.org Mon Sep 19 22:16:04 2016 Return-Path: Delivered-To: svn-src-all@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 60E5FBE0F58; Mon, 19 Sep 2016 22:16:04 +0000 (UTC) (envelope-from ivadasz@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 2515D3E5; Mon, 19 Sep 2016 22:16:04 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JMG3eW074322; Mon, 19 Sep 2016 22:16:03 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JMG3is074321; Mon, 19 Sep 2016 22:16:03 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192216.u8JMG3is074321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306003 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:16:04 -0000 Author: ivadasz Date: Mon Sep 19 22:16:03 2016 New Revision: 306003 URL: https://svnweb.freebsd.org/changeset/base/306003 Log: [iwm] Remove wrappers around iwm_dma_contig_free() calls. No functional changes. Inspired by: OpenBSD Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7933 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:13:08 2016 (r306002) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:16:03 2016 (r306003) @@ -234,13 +234,9 @@ static int iwm_dma_contig_alloc(bus_dma_ bus_size_t, bus_size_t); static void iwm_dma_contig_free(struct iwm_dma_info *); static int iwm_alloc_fwmem(struct iwm_softc *); -static void iwm_free_fwmem(struct iwm_softc *); static int iwm_alloc_sched(struct iwm_softc *); -static void iwm_free_sched(struct iwm_softc *); static int iwm_alloc_kw(struct iwm_softc *); -static void iwm_free_kw(struct iwm_softc *); static int iwm_alloc_ict(struct iwm_softc *); -static void iwm_free_ict(struct iwm_softc *); static int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static void iwm_disable_rx_dma(struct iwm_softc *); static void iwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); @@ -902,12 +898,6 @@ iwm_alloc_fwmem(struct iwm_softc *sc) sc->sc_fwdmasegsz, 16); } -static void -iwm_free_fwmem(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->fw_dma); -} - /* tx scheduler rings. not used? */ static int iwm_alloc_sched(struct iwm_softc *sc) @@ -917,12 +907,6 @@ iwm_alloc_sched(struct iwm_softc *sc) nitems(sc->txq) * sizeof(struct iwm_agn_scd_bc_tbl), 1024); } -static void -iwm_free_sched(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->sched_dma); -} - /* keep-warm page is used internally by the card. see iwl-fh.h for more info */ static int iwm_alloc_kw(struct iwm_softc *sc) @@ -930,12 +914,6 @@ iwm_alloc_kw(struct iwm_softc *sc) return iwm_dma_contig_alloc(sc->sc_dmat, &sc->kw_dma, 4096, 4096); } -static void -iwm_free_kw(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->kw_dma); -} - /* interrupt cause table */ static int iwm_alloc_ict(struct iwm_softc *sc) @@ -944,12 +922,6 @@ iwm_alloc_ict(struct iwm_softc *sc) IWM_ICT_SIZE, 1<ict_dma); -} - static int iwm_alloc_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) { @@ -6174,13 +6146,10 @@ iwm_detach_local(struct iwm_softc *sc, i iwm_fw_info_free(fw); /* Free scheduler */ - iwm_free_sched(sc); - if (sc->ict_dma.vaddr != NULL) - iwm_free_ict(sc); - if (sc->kw_dma.vaddr != NULL) - iwm_free_kw(sc); - if (sc->fw_dma.vaddr != NULL) - iwm_free_fwmem(sc); + iwm_dma_contig_free(&sc->sched_dma); + iwm_dma_contig_free(&sc->ict_dma); + iwm_dma_contig_free(&sc->kw_dma); + iwm_dma_contig_free(&sc->fw_dma); /* Finished with the hardware - detach things */ iwm_pci_detach(dev); From owner-svn-src-all@freebsd.org Mon Sep 19 22:20:48 2016 Return-Path: Delivered-To: svn-src-all@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 3403EBE0FE6; Mon, 19 Sep 2016 22:20:48 +0000 (UTC) (envelope-from ivadasz@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 F38D183A; Mon, 19 Sep 2016 22:20:47 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JMKlwc074523; Mon, 19 Sep 2016 22:20:47 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JMKlbo074521; Mon, 19 Sep 2016 22:20:47 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192220.u8JMKlbo074521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306004 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:20:48 -0000 Author: ivadasz Date: Mon Sep 19 22:20:46 2016 New Revision: 306004 URL: https://svnweb.freebsd.org/changeset/base/306004 Log: [iwm] Remove deprecated scan API definitions. * This removes deprecated scan API definitions, which have been unused since the upgrade to version 16 firmware in change r303327. * Part of this change matches the header-file changes in Linux git commit 1f9403863c080478ad78247c89b018e95bdfb027. * No functional change. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7937 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:16:03 2016 (r306003) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:20:46 2016 (r306004) @@ -5207,7 +5207,6 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_PHY_CONTEXT_CMD: case IWM_BINDING_CONTEXT_CMD: case IWM_TIME_EVENT_CMD: - case IWM_SCAN_REQUEST_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): case IWM_SCAN_OFFLOAD_REQUEST_CMD: Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Sep 19 22:16:03 2016 (r306003) +++ head/sys/dev/iwm/if_iwmreg.h Mon Sep 19 22:20:46 2016 (r306004) @@ -1839,11 +1839,9 @@ enum { IWM_REPLY_THERMAL_MNG_BACKOFF = 0x7e, /* Scanning */ - IWM_SCAN_REQUEST_CMD = 0x80, IWM_SCAN_ABORT_CMD = 0x81, IWM_SCAN_START_NOTIFICATION = 0x82, IWM_SCAN_RESULTS_NOTIFICATION = 0x83, - IWM_SCAN_COMPLETE_NOTIFICATION = 0x84, /* NVM */ IWM_NVM_ACCESS_CMD = 0x88, @@ -4767,53 +4765,11 @@ struct iwm_scd_txq_cfg_rsp { /* Masks for iwm_scan_channel.type flags */ #define IWM_SCAN_CHANNEL_TYPE_ACTIVE (1 << 0) #define IWM_SCAN_CHANNEL_NSSIDS(x) (((1 << (x)) - 1) << 1) -#define IWM_SCAN_CHANNEL_NARROW_BAND (1 << 22) /* Max number of IEs for direct SSID scans in a command */ #define IWM_PROBE_OPTION_MAX 20 /** - * struct iwm_scan_channel - entry in IWM_REPLY_SCAN_CMD channel table - * @channel: band is selected by iwm_scan_cmd "flags" field - * @tx_gain: gain for analog radio - * @dsp_atten: gain for DSP - * @active_dwell: dwell time for active scan in TU, typically 5-50 - * @passive_dwell: dwell time for passive scan in TU, typically 20-500 - * @type: type is broken down to these bits: - * bit 0: 0 = passive, 1 = active - * bits 1-20: SSID direct bit map. If any of these bits is set then - * the corresponding SSID IE is transmitted in probe request - * (bit i adds IE in position i to the probe request) - * bit 22: channel width, 0 = regular, 1 = TGj narrow channel - * - * @iteration_count: - * @iteration_interval: - * This struct is used once for each channel in the scan list. - * Each channel can independently select: - * 1) SSID for directed active scans - * 2) Txpower setting (for rate specified within Tx command) - * 3) How long to stay on-channel (behavior may be modified by quiet_time, - * quiet_plcp_th, good_CRC_th) - * - * To avoid uCode errors, make sure the following are true (see comments - * under struct iwm_scan_cmd about max_out_time and quiet_time): - * 1) If using passive_dwell (i.e. passive_dwell != 0): - * active_dwell <= passive_dwell (< max_out_time if max_out_time != 0) - * 2) quiet_time <= active_dwell - * 3) If restricting off-channel time (i.e. max_out_time !=0): - * passive_dwell < max_out_time - * active_dwell < max_out_time - */ -struct iwm_scan_channel { - uint32_t type; - uint16_t channel; - uint16_t iteration_count; - uint32_t iteration_interval; - uint16_t active_dwell; - uint16_t passive_dwell; -} __packed; /* IWM_SCAN_CHANNEL_CONTROL_API_S_VER_1 */ - -/** * struct iwm_ssid_ie - directed scan network information element * * Up to 20 of these may appear in IWM_REPLY_SCAN_CMD, @@ -4828,7 +4784,6 @@ struct iwm_ssid_ie { } __packed; /* IWM_SCAN_DIRECT_SSID_IE_API_S_VER_1 */ /* scan offload */ -#define IWM_MAX_SCAN_CHANNELS 40 #define IWM_SCAN_MAX_BLACKLIST_LEN 64 #define IWM_SCAN_SHORT_BLACKLIST_LEN 16 #define IWM_SCAN_MAX_PROFILES 11 @@ -4844,45 +4799,6 @@ struct iwm_ssid_ie { #define IWM_FAST_SCHED_SCAN_ITERATIONS 3 #define IWM_MAX_SCHED_SCAN_PLANS 2 -/** - * iwm_scan_flags - masks for scan command flags - *@IWM_SCAN_FLAGS_PERIODIC_SCAN: - *@IWM_SCAN_FLAGS_P2P_PUBLIC_ACTION_FRAME_TX: - *@IWM_SCAN_FLAGS_DELAYED_SCAN_LOWBAND: - *@IWM_SCAN_FLAGS_DELAYED_SCAN_HIGHBAND: - *@IWM_SCAN_FLAGS_FRAGMENTED_SCAN: - *@IWM_SCAN_FLAGS_PASSIVE2ACTIVE: use active scan on channels that was active - * in the past hour, even if they are marked as passive. - */ -enum iwm_scan_flags { - IWM_SCAN_FLAGS_PERIODIC_SCAN = (1 << 0), - IWM_SCAN_FLAGS_P2P_PUBLIC_ACTION_FRAME_TX = (1 << 1), - IWM_SCAN_FLAGS_DELAYED_SCAN_LOWBAND = (1 << 2), - IWM_SCAN_FLAGS_DELAYED_SCAN_HIGHBAND = (1 << 3), - IWM_SCAN_FLAGS_FRAGMENTED_SCAN = (1 << 4), - IWM_SCAN_FLAGS_PASSIVE2ACTIVE = (1 << 5), -}; - -/** - * enum iwm_scan_type - Scan types for scan command - * @IWM_SCAN_TYPE_FORCED: - * @IWM_SCAN_TYPE_BACKGROUND: - * @IWM_SCAN_TYPE_OS: - * @IWM_SCAN_TYPE_ROAMING: - * @IWM_SCAN_TYPE_ACTION: - * @IWM_SCAN_TYPE_DISCOVERY: - * @IWM_SCAN_TYPE_DISCOVERY_FORCED: - */ -enum iwm_scan_type { - IWM_SCAN_TYPE_FORCED = 0, - IWM_SCAN_TYPE_BACKGROUND = 1, - IWM_SCAN_TYPE_OS = 2, - IWM_SCAN_TYPE_ROAMING = 3, - IWM_SCAN_TYPE_ACTION = 4, - IWM_SCAN_TYPE_DISCOVERY = 5, - IWM_SCAN_TYPE_DISCOVERY_FORCED = 6, -}; /* IWM_SCAN_ACTIVITY_TYPE_E_VER_1 */ - /* Maximal number of channels to scan */ #define IWM_MAX_NUM_SCAN_CHANNELS 0x24 @@ -5076,52 +4992,6 @@ struct iwm_periodic_scan_complete { uint32_t reserved; } __packed; -/* Response to scan request contains only status with one of these values */ -#define IWM_SCAN_RESPONSE_OK 0x1 -#define IWM_SCAN_RESPONSE_ERROR 0x2 - -/* - * IWM_SCAN_ABORT_CMD = 0x81 - * When scan abort is requested, the command has no fields except the common - * header. The response contains only a status with one of these values. - */ -#define IWM_SCAN_ABORT_POSSIBLE 0x1 -#define IWM_SCAN_ABORT_IGNORED 0x2 /* no pending scans */ - -/* TODO: complete documentation */ -#define IWM_SCAN_OWNER_STATUS 0x1 -#define IWM_MEASURE_OWNER_STATUS 0x2 - -/** - * struct iwm_scan_start_notif - notifies start of scan in the device - * ( IWM_SCAN_START_NOTIFICATION = 0x82 ) - * @tsf_low: TSF timer (lower half) in usecs - * @tsf_high: TSF timer (higher half) in usecs - * @beacon_timer: structured as follows: - * bits 0:19 - beacon interval in usecs - * bits 20:23 - reserved (0) - * bits 24:31 - number of beacons - * @channel: which channel is scanned - * @band: 0 for 5.2 GHz, 1 for 2.4 GHz - * @status: one of *_OWNER_STATUS - */ -struct iwm_scan_start_notif { - uint32_t tsf_low; - uint32_t tsf_high; - uint32_t beacon_timer; - uint8_t channel; - uint8_t band; - uint8_t reserved[2]; - uint32_t status; -} __packed; /* IWM_SCAN_START_NTF_API_S_VER_1 */ - -/* scan results probe_status first bit indicates success */ -#define IWM_SCAN_PROBE_STATUS_OK 0 -#define IWM_SCAN_PROBE_STATUS_TX_FAILED (1 << 0) -/* error statuses combined with TX_FAILED */ -#define IWM_SCAN_PROBE_STATUS_FAIL_TTL (1 << 1) -#define IWM_SCAN_PROBE_STATUS_FAIL_BT (1 << 2) - /* How many statistics are gathered for each channel */ #define IWM_SCAN_RESULTS_STATISTICS 1 @@ -5176,27 +5046,6 @@ struct iwm_scan_results_notif { uint32_t statistics[IWM_SCAN_RESULTS_STATISTICS]; } __packed; /* IWM_SCAN_RESULT_NTF_API_S_VER_2 */ -/** - * struct iwm_scan_complete_notif - notifies end of scanning (all channels) - * ( IWM_SCAN_COMPLETE_NOTIFICATION = 0x84 ) - * @scanned_channels: number of channels scanned (and number of valid results) - * @status: one of IWM_SCAN_COMP_STATUS_* - * @bt_status: BT on/off status - * @last_channel: last channel that was scanned - * @tsf_low: TSF timer (lower half) in usecs - * @tsf_high: TSF timer (higher half) in usecs - * @results: all scan results, only "scanned_channels" of them are valid - */ -struct iwm_scan_complete_notif { - uint8_t scanned_channels; - uint8_t status; - uint8_t bt_status; - uint8_t last_channel; - uint32_t tsf_low; - uint32_t tsf_high; - struct iwm_scan_results_notif results[IWM_MAX_NUM_SCAN_CHANNELS]; -} __packed; /* IWM_SCAN_COMPLETE_NTF_API_S_VER_2 */ - enum iwm_scan_framework_client { IWM_SCAN_CLIENT_SCHED_SCAN = (1 << 0), IWM_SCAN_CLIENT_NETDETECT = (1 << 1), @@ -5204,83 +5053,6 @@ enum iwm_scan_framework_client { }; /** - * struct iwm_scan_offload_cmd - IWM_SCAN_REQUEST_FIXED_PART_API_S_VER_6 - * @scan_flags: see enum iwm_scan_flags - * @channel_count: channels in channel list - * @quiet_time: dwell time, in milisiconds, on quiet channel - * @quiet_plcp_th: quiet channel num of packets threshold - * @good_CRC_th: passive to active promotion threshold - * @rx_chain: RXON rx chain. - * @max_out_time: max uSec to be out of assoceated channel - * @suspend_time: pause scan this long when returning to service channel - * @flags: RXON flags - * @filter_flags: RXONfilter - * @tx_cmd: tx command for active scan; for 2GHz and for 5GHz. - * @direct_scan: list of SSIDs for directed active scan - * @scan_type: see enum iwm_scan_type. - * @rep_count: repetition count for each scheduled scan iteration. - */ -struct iwm_scan_offload_cmd { - uint16_t len; - uint8_t scan_flags; - uint8_t channel_count; - uint16_t quiet_time; - uint16_t quiet_plcp_th; - uint16_t good_CRC_th; - uint16_t rx_chain; - uint32_t max_out_time; - uint32_t suspend_time; - /* IWM_RX_ON_FLAGS_API_S_VER_1 */ - uint32_t flags; - uint32_t filter_flags; - struct iwm_tx_cmd tx_cmd[2]; - /* IWM_SCAN_DIRECT_SSID_IE_API_S_VER_1 */ - struct iwm_ssid_ie direct_scan[IWM_PROBE_OPTION_MAX]; - uint32_t scan_type; - uint32_t rep_count; -} __packed; - -enum iwm_scan_offload_channel_flags { - IWM_SCAN_OFFLOAD_CHANNEL_ACTIVE = (1 << 0), - IWM_SCAN_OFFLOAD_CHANNEL_NARROW = (1 << 22), - IWM_SCAN_OFFLOAD_CHANNEL_FULL = (1 << 24), - IWM_SCAN_OFFLOAD_CHANNEL_PARTIAL = (1 << 25), -}; - -/** - * iwm_scan_channel_cfg - IWM_SCAN_CHANNEL_CFG_S - * @type: bitmap - see enum iwm_scan_offload_channel_flags. - * 0: passive (0) or active (1) scan. - * 1-20: directed scan to i'th ssid. - * 22: channel width configuation - 1 for narrow. - * 24: full scan. - * 25: partial scan. - * @channel_number: channel number 1-13 etc. - * @iter_count: repetition count for the channel. - * @iter_interval: interval between two innteration on one channel. - * @dwell_time: entry 0 - active scan, entry 1 - passive scan. - */ -struct iwm_scan_channel_cfg { - uint32_t type[IWM_MAX_SCAN_CHANNELS]; - uint16_t channel_number[IWM_MAX_SCAN_CHANNELS]; - uint16_t iter_count[IWM_MAX_SCAN_CHANNELS]; - uint32_t iter_interval[IWM_MAX_SCAN_CHANNELS]; - uint8_t dwell_time[IWM_MAX_SCAN_CHANNELS][2]; -} __packed; - -/** - * iwm_scan_offload_cfg - IWM_SCAN_OFFLOAD_CONFIG_API_S - * @scan_cmd: scan command fixed part - * @channel_cfg: scan channel configuration - * @data: probe request frames (one per band) - */ -struct iwm_scan_offload_cfg { - struct iwm_scan_offload_cmd scan_cmd; - struct iwm_scan_channel_cfg channel_cfg; - uint8_t data[0]; -} __packed; - -/** * iwm_scan_offload_blacklist - IWM_SCAN_OFFLOAD_BLACKLIST_S * @ssid: MAC address to filter out * @reported_rssi: AP rssi reported to the host @@ -5345,48 +5117,7 @@ struct iwm_scan_offload_profile_cfg { uint8_t reserved[2]; } __packed; -/** - * iwm_scan_offload_schedule - schedule of scan offload - * @delay: delay between iterations, in seconds. - * @iterations: num of scan iterations - * @full_scan_mul: number of partial scans before each full scan - */ -struct iwm_scan_offload_schedule { - uint16_t delay; - uint8_t iterations; - uint8_t full_scan_mul; -} __packed; - -/* - * iwm_scan_offload_flags - * - * IWM_SCAN_OFFLOAD_FLAG_PASS_ALL: pass all results - no filtering. - * IWM_SCAN_OFFLOAD_FLAG_CACHED_CHANNEL: add cached channels to partial scan. - * IWM_SCAN_OFFLOAD_FLAG_ENERGY_SCAN: use energy based scan before partial scan - * on A band. - */ -enum iwm_scan_offload_flags { - IWM_SCAN_OFFLOAD_FLAG_PASS_ALL = (1 << 0), - IWM_SCAN_OFFLOAD_FLAG_CACHED_CHANNEL = (1 << 2), - IWM_SCAN_OFFLOAD_FLAG_ENERGY_SCAN = (1 << 3), -}; - -/** - * iwm_scan_offload_req - scan offload request command - * @flags: bitmap - enum iwm_scan_offload_flags. - * @watchdog: maximum scan duration in TU. - * @delay: delay in seconds before first iteration. - * @schedule_line: scan offload schedule, for fast and regular scan. - */ -struct iwm_scan_offload_req { - uint16_t flags; - uint16_t watchdog; - uint16_t delay; - uint16_t reserved; - struct iwm_scan_offload_schedule schedule_line[2]; -} __packed; - -enum iwm_scan_offload_compleate_status { +enum iwm_scan_offload_complete_status { IWM_SCAN_OFFLOAD_COMPLETED = 1, IWM_SCAN_OFFLOAD_ABORTED = 2, }; @@ -5413,30 +5144,6 @@ struct iwm_lmac_scan_complete_notif { } __packed; -/** - * iwm_scan_offload_complete - IWM_SCAN_OFFLOAD_COMPLETE_NTF_API_S_VER_1 - * @last_schedule_line: last schedule line executed (fast or regular) - * @last_schedule_iteration: last scan iteration executed before scan abort - * @status: enum iwm_scan_offload_compleate_status - */ -struct iwm_scan_offload_complete { - uint8_t last_schedule_line; - uint8_t last_schedule_iteration; - uint8_t status; - uint8_t reserved; -} __packed; - -/** - * iwm_sched_scan_results - IWM_SCAN_OFFLOAD_MATCH_FOUND_NTF_API_S_VER_1 - * @ssid_bitmap: SSIDs indexes found in this iteration - * @client_bitmap: clients that are active and wait for this notification - */ -struct iwm_sched_scan_results { - uint16_t ssid_bitmap; - uint8_t client_bitmap; - uint8_t reserved; -}; - /* * END mvm/fw-api-scan.h */ From owner-svn-src-all@freebsd.org Mon Sep 19 22:23:47 2016 Return-Path: Delivered-To: svn-src-all@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 B2D11BE117C; Mon, 19 Sep 2016 22:23:47 +0000 (UTC) (envelope-from ivadasz@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 81331C05; Mon, 19 Sep 2016 22:23:47 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JMNkdi077948; Mon, 19 Sep 2016 22:23:46 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JMNkdV077946; Mon, 19 Sep 2016 22:23:46 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192223.u8JMNkdV077946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306005 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:23:47 -0000 Author: ivadasz Date: Mon Sep 19 22:23:46 2016 New Revision: 306005 URL: https://svnweb.freebsd.org/changeset/base/306005 Log: [iwm] Use IWM_DEFAULT_SCAN_CHANNELS define as default for sc_capa_n_scan_channels. Approved by: adrian (mentor) Obtained from: Linux iwlwifi Differential Revision: https://reviews.freebsd.org/D7938 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:20:46 2016 (r306004) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:23:46 2016 (r306005) @@ -442,6 +442,8 @@ iwm_firmware_store_section(struct iwm_so return 0; } +#define IWM_DEFAULT_SCAN_CHANNELS 40 + /* iwlwifi: iwl-drv.c */ struct iwm_tlv_calib_data { uint32_t ucode_type; @@ -518,7 +520,7 @@ iwm_read_firmware(struct iwm_softc *sc, /* (Re-)Initialize default values. */ sc->sc_capaflags = 0; - sc->sc_capa_n_scan_channels = IWM_MAX_NUM_SCAN_CHANNELS; + sc->sc_capa_n_scan_channels = IWM_DEFAULT_SCAN_CHANNELS; memset(sc->sc_enabled_capa, 0, sizeof(sc->sc_enabled_capa)); memset(sc->sc_fw_mcc, 0, sizeof(sc->sc_fw_mcc)); Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Sep 19 22:20:46 2016 (r306004) +++ head/sys/dev/iwm/if_iwmreg.h Mon Sep 19 22:23:46 2016 (r306005) @@ -4799,9 +4799,6 @@ struct iwm_ssid_ie { #define IWM_FAST_SCHED_SCAN_ITERATIONS 3 #define IWM_MAX_SCHED_SCAN_PLANS 2 -/* Maximal number of channels to scan */ -#define IWM_MAX_NUM_SCAN_CHANNELS 0x24 - /** * iwm_scan_schedule_lmac - schedule of scan offload * @delay: delay between iterations, in seconds. From owner-svn-src-all@freebsd.org Mon Sep 19 22:26:38 2016 Return-Path: Delivered-To: svn-src-all@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 BE129BE1213; Mon, 19 Sep 2016 22:26:38 +0000 (UTC) (envelope-from ivadasz@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 745CADC3; Mon, 19 Sep 2016 22:26:38 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JMQbux078095; Mon, 19 Sep 2016 22:26:37 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JMQbsh078092; Mon, 19 Sep 2016 22:26:37 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192226.u8JMQbsh078092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306006 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:26:38 -0000 Author: ivadasz Date: Mon Sep 19 22:26:37 2016 New Revision: 306006 URL: https://svnweb.freebsd.org/changeset/base/306006 Log: [iwm] Remove dead fw_totlen from struct iwm_fw_sects; clean up struct iwm_nvm_data. * No functional change, none of these values were ever read. * The values removed from struct iwm_nvm_data are only used for old dvm devices in Linux iwlwifi, and irrelevant to iwm hence. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7945 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:23:46 2016 (r306005) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:26:37 2016 (r306006) @@ -437,7 +437,6 @@ iwm_firmware_store_section(struct iwm_so fwone->fws_len = dlen - sizeof(uint32_t); fws->fw_count++; - fws->fw_totlen += fwone->fws_len; return 0; } @@ -2151,11 +2150,6 @@ iwm_parse_nvm_data(struct iwm_softc *sc, memcpy(data->nvm_ch_flags, ®ulatory[IWM_NVM_CHANNELS_8000], IWM_NUM_CHANNELS_8000 * sizeof(uint16_t)); } - data->calib_version = 255; /* TODO: - this value will prevent some checks from - failing, we need to check if this - field is still needed, and if it does, - where is it in the NVM */ return 0; } Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Sep 19 22:23:46 2016 (r306005) +++ head/sys/dev/iwm/if_iwmvar.h Mon Sep 19 22:26:37 2016 (r306006) @@ -170,7 +170,6 @@ struct iwm_fw_info { uint32_t fws_len; uint32_t fws_devoff; } fw_sect[IWM_UCODE_SECT_MAX]; - size_t fw_totlen; int fw_count; } fw_sects[IWM_UCODE_TYPE_MAX]; }; @@ -179,14 +178,6 @@ struct iwm_nvm_data { int n_hw_addrs; uint8_t hw_addr[IEEE80211_ADDR_LEN]; - uint8_t calib_version; - uint16_t calib_voltage; - - uint16_t raw_temperature; - uint16_t kelvin_temperature; - uint16_t kelvin_voltage; - uint16_t xtal_calib[2]; - int sku_cap_band_24GHz_enable; int sku_cap_band_52GHz_enable; int sku_cap_11n_enable; From owner-svn-src-all@freebsd.org Mon Sep 19 22:36:31 2016 Return-Path: Delivered-To: svn-src-all@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 7A9B1BE13A2; Mon, 19 Sep 2016 22:36:31 +0000 (UTC) (envelope-from ivadasz@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 54BEC26F; Mon, 19 Sep 2016 22:36:31 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8JMaUxf081856; Mon, 19 Sep 2016 22:36:30 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8JMaUI8081855; Mon, 19 Sep 2016 22:36:30 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201609192236.u8JMaUI8081855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Mon, 19 Sep 2016 22:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306007 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 22:36:31 -0000 Author: ivadasz Date: Mon Sep 19 22:36:30 2016 New Revision: 306007 URL: https://svnweb.freebsd.org/changeset/base/306007 Log: [iwm] Improve reliability of iwm_release on disassociation a bit. * We need to first call ivp->iv_newstate(), to enqueue the deauth/deassoc mgmt frame, then flush the tx queue, before actually calling iwm_release(). * cycling a wlan connection via wpa_cli frontend to wpa_supplicant, by issuing disconnect and reconnect commandos works quite well. (There is still an issue when disconnecting/reconnecting too quickly) * Reassociating or roaming via wpa_supplicant is still broken. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7943 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:26:37 2016 (r306006) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:36:30 2016 (r306007) @@ -329,6 +329,8 @@ static int iwm_tx(struct iwm_softc *, st struct ieee80211_node *, int); static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); +static int iwm_mvm_flush_tx_path(struct iwm_softc *sc, + uint32_t tfd_msk, uint32_t flags); static int iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *, struct iwm_mvm_add_sta_cmd_v7 *, int *); @@ -3517,7 +3519,6 @@ iwm_raw_xmit(struct ieee80211_node *ni, * mvm/tx.c */ -#if 0 /* * Note that there are transports that buffer frames before they reach * the firmware. This means that after flush_tx_path is called, the @@ -3527,23 +3528,21 @@ iwm_raw_xmit(struct ieee80211_node *ni, * 3) wait for the transport queues to be empty */ int -iwm_mvm_flush_tx_path(struct iwm_softc *sc, int tfd_msk, int sync) +iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, uint32_t flags) { + int ret; struct iwm_tx_path_flush_cmd flush_cmd = { .queues_ctl = htole32(tfd_msk), .flush_ctl = htole16(IWM_DUMP_TX_FIFO_FLUSH), }; - int ret; - ret = iwm_mvm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH, - sync ? IWM_CMD_SYNC : IWM_CMD_ASYNC, + ret = iwm_mvm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH, flags, sizeof(flush_cmd), &flush_cmd); if (ret) device_printf(sc->sc_dev, "Flushing tx queue failed: %d\n", ret); return ret; } -#endif /* * BEGIN mvm/sta.c @@ -3899,6 +3898,8 @@ iwm_assoc(struct ieee80211vap *vap, stru static int iwm_release(struct iwm_softc *sc, struct iwm_node *in) { + uint32_t tfd_msk; + /* * Ok, so *technically* the proper set of calls for going * from RUN back to SCAN is: @@ -3918,7 +3919,18 @@ iwm_release(struct iwm_softc *sc, struct * back to nothing anyway, we'll just do a complete device reset. * Up your's, device! */ - /* iwm_mvm_flush_tx_path(sc, 0xf, 1); */ + /* + * Just using 0xf for the queues mask is fine as long as we only + * get here from RUN state. + */ + tfd_msk = 0xf; + mbufq_drain(&sc->sc_snd); + iwm_mvm_flush_tx_path(sc, tfd_msk, IWM_CMD_SYNC); + /* + * We seem to get away with just synchronously sending the + * IWM_TXPATH_FLUSH command. + */ +// iwm_trans_wait_tx_queue_empty(sc, tfd_msk); iwm_stop_device(sc); iwm_init_hw(sc); if (in) @@ -4125,7 +4137,17 @@ iwm_newstate(struct ieee80211vap *vap, e if (((in = IWM_NODE(vap->iv_bss)) != NULL)) in->in_assoc = 0; - iwm_release(sc, NULL); + if (nstate == IEEE80211_S_INIT) { + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + error = ivp->iv_newstate(vap, nstate, arg); + IEEE80211_UNLOCK(ic); + IWM_LOCK(sc); + iwm_release(sc, NULL); + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + return error; + } /* * It's impossible to directly go RUN->SCAN. If we iwm_release() From owner-svn-src-all@freebsd.org Tue Sep 20 00:22:36 2016 Return-Path: Delivered-To: svn-src-all@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 8C370BE1F61; Tue, 20 Sep 2016 00:22:36 +0000 (UTC) (envelope-from markj@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 4E97C1904; Tue, 20 Sep 2016 00:22:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K0MZur023260; Tue, 20 Sep 2016 00:22:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K0MZfV023258; Tue, 20 Sep 2016 00:22:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609200022.u8K0MZfV023258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 20 Sep 2016 00:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306008 - head/contrib/elftoolchain/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 00:22:36 -0000 Author: markj Date: Tue Sep 20 00:22:35 2016 New Revision: 306008 URL: https://svnweb.freebsd.org/changeset/base/306008 Log: libdwarf: Add definitions for Apple's DWARF extension attributes. Reviewed by: emaste MFC after: 1 week Modified: head/contrib/elftoolchain/libdwarf/dwarf.h head/contrib/elftoolchain/libdwarf/dwarf_dump.c Modified: head/contrib/elftoolchain/libdwarf/dwarf.h ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf.h Mon Sep 19 22:36:30 2016 (r306007) +++ head/contrib/elftoolchain/libdwarf/dwarf.h Tue Sep 20 00:22:35 2016 (r306008) @@ -234,6 +234,21 @@ #define DW_AT_GNU_all_call_sites 0x2117 #define DW_AT_GNU_all_source_call_sites 0x2118 +/* Apple extensions. */ +#define DW_AT_APPLE_optimized 0x3fe1 +#define DW_AT_APPLE_flags 0x3fe2 +#define DW_AT_APPLE_isa 0x3fe3 +#define DW_AT_APPLE_block 0x3fe4 +#define DW_AT_APPLE_major_runtime_vers 0x3fe5 +#define DW_AT_APPLE_runtime_class 0x3fe6 +#define DW_AT_APPLE_omit_frame_ptr 0x3fe7 +#define DW_AT_APPLE_property_name 0x3fe8 +#define DW_AT_APPLE_property_getter 0x3fe9 +#define DW_AT_APPLE_property_setter 0x3fea +#define DW_AT_APPLE_property_attribute 0x3feb +#define DW_AT_APPLE_objc_complete_type 0x3fec +#define DW_AT_APPLE_property 0x3fed + #define DW_FORM_addr 0x01 #define DW_FORM_block2 0x03 #define DW_FORM_block4 0x04 Modified: head/contrib/elftoolchain/libdwarf/dwarf_dump.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_dump.c Mon Sep 19 22:36:30 2016 (r306007) +++ head/contrib/elftoolchain/libdwarf/dwarf_dump.c Tue Sep 20 00:22:35 2016 (r306008) @@ -298,6 +298,32 @@ dwarf_get_AT_name(unsigned attr, const c *s = "DW_AT_GNU_all_call_sites"; break; case DW_AT_GNU_all_source_call_sites: *s = "DW_AT_GNU_all_source_call_sites"; break; + case DW_AT_APPLE_optimized: + *s = "DW_AT_APPLE_optimized"; break; + case DW_AT_APPLE_flags: + *s = "DW_AT_APPLE_flags"; break; + case DW_AT_APPLE_isa: + *s = "DW_AT_APPLE_isa"; break; + case DW_AT_APPLE_block: + *s = "DW_AT_APPLE_block"; break; + case DW_AT_APPLE_major_runtime_vers: + *s = "DW_AT_APPLE_major_runtime_vers"; break; + case DW_AT_APPLE_runtime_class: + *s = "DW_AT_APPLE_runtime_class"; break; + case DW_AT_APPLE_omit_frame_ptr: + *s = "DW_AT_APPLE_omit_frame_ptr"; break; + case DW_AT_APPLE_property_name: + *s = "DW_AT_APPLE_property_name"; break; + case DW_AT_APPLE_property_getter: + *s = "DW_AT_APPLE_property_getter"; break; + case DW_AT_APPLE_property_setter: + *s = "DW_AT_APPLE_property_setter"; break; + case DW_AT_APPLE_property_attribute: + *s = "DW_AT_APPLE_property_attribute"; break; + case DW_AT_APPLE_objc_complete_type: + *s = "DW_AT_APPLE_objc_complete_type"; break; + case DW_AT_APPLE_property: + *s = "DW_AT_APPLE_property"; break; default: return (DW_DLV_NO_ENTRY); } From owner-svn-src-all@freebsd.org Tue Sep 20 03:43:43 2016 Return-Path: Delivered-To: svn-src-all@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 E290CBDF1B9; Tue, 20 Sep 2016 03:43:43 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (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 74BEE3A4; Tue, 20 Sep 2016 03:43:43 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id w84so1104878wmg.0; Mon, 19 Sep 2016 20:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=EikpAMcy8pMIfNlWFC6b5FnaI3dUMQDRnEnHMKEtz2k=; b=VfX1h5KgDzdnVBQQmSWh2KDwg1a8CKOxtZyfQrTshVQl1R5vd4E70xrDlX7V0HhTuf nKYysoqd0ps65VVu1bbpPEHzp6CiYV7F1D6+OeVuCSC6Y8A4up5R8yVOPufyz5w/EgiE PGvXBPYCHtF4sWY3taWYJG+NUjjW6fR7Ta+o1UJ5Z56HMX1wbovTIahVIHLnZTs9ra1H bq9CqeZCZj7ZVKI6NpIVZPxUDquD24bQBJIrA+3WMz/5Rlr13hstpAI9GRMPEaiQVtCq IFVdd8AiwTSH8z7j/C6Lu5aPiX/EO/fZh0e7IVjxXasDawiX+1jJZDhg8mz2E8jPuaQw +9Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=EikpAMcy8pMIfNlWFC6b5FnaI3dUMQDRnEnHMKEtz2k=; b=U0K2mMM5ZxCGFqeaLuGSI8TsEYyQhd8P8inJQNXQVWTcBjmy7+B07jhBl0apbPAYIt ogtsrStIGDGFuCpabIbMjO82PDBrbSHO37q0eLUJJsxJArY3/gl1nNPXI30Nj57Bhksb ZIJr1579vpNVpS1YcaZr1OErZGqbko9T1Bt/jf7ckZp0+0fVhnXEIbjnYN+31MThFPL1 aqAD+8+kQYoB0AXMxlEqxBbIGFNIYSNe4QQazMcjLPxbxMUv0eq6RVk/jNoDFAgzx83H r3++EU7Blp+0oj//KSKkS8mLpWGWZPQW+fNLE+jymZ/fTl61MQy8QPKma+IBjQ5GSFjo Jxuw== X-Gm-Message-State: AE9vXwOVBm14y1qAJbBg6OW9Sh4CiZupeJ4nsCSCFf29j5zSgrcyPLEzWo79dHwncDCSbw== X-Received: by 10.194.26.69 with SMTP id j5mr18678626wjg.209.1474343021436; Mon, 19 Sep 2016 20:43:41 -0700 (PDT) Received: from brick (etn137.neoplus.adsl.tpnet.pl. [83.20.159.137]) by smtp.gmail.com with ESMTPSA id c134sm25045857wme.5.2016.09.19.20.43.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 20:43:40 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 20 Sep 2016 05:43:37 +0200 From: Edward Tomasz Napierala To: Ronald Klop Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305968 - head/etc/autofs Message-ID: <20160920034337.GA6180@brick> Mail-Followup-To: Ronald Klop , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609190851.u8J8pRDD068198@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 03:43:44 -0000 Mounting removable media async improves performance and reduces wear. And AFAIK that's what most Linux distros used to do. On 0919T2032, Ronald Klop wrote: > Hi, > > Your commit message says in words exactly what the diff says in code. > Would you like to elaborate on why the change is made? I'm curious > because this could cause severe damage to the filesystem on unclean eject > of the media. > > Regards, > Ronald. > > > On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napierala > wrote: > > > Author: trasz > > Date: Mon Sep 19 08:51:27 2016 > > New Revision: 305968 > > URL: https://svnweb.freebsd.org/changeset/base/305968 > > > > Log: > > Make autofs use the "async" flag for msdosfs and ufs filesystems > > mounted > > on /media. > > MFC after: 1 month > > > > Modified: > > head/etc/autofs/special_media > > > > Modified: head/etc/autofs/special_media > > ============================================================================== > > --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 (r305967) > > +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) > > @@ -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 > > _______________________________________________ > > svn-src-all@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Tue Sep 20 04:03:44 2016 Return-Path: Delivered-To: svn-src-all@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 EA7E9BDF619 for ; Tue, 20 Sep 2016 04:03:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (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 BCDDCED7 for ; Tue, 20 Sep 2016 04:03:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22b.google.com with SMTP id r192so87486545ita.0 for ; Mon, 19 Sep 2016 21:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=RcKIj9/yjdtNTZk08Yt26jaU9oVCeuEBh05f7kP/j/A=; b=iL7PtNbnOjN5C4ZWUYVEmsi/WGY3/ymo5x+ykymxA9nU4zjJ/sOpDmYLs7rh/vXZm0 Ojqi47wHAA5wIWIfWHK03QLxE2K2PgsP0TmaiBputYEwdrKeKhlbg/ZbUhkyZzsRTnUE gLZYYMrsg6Xrw+7hXxZJVCCPLWlh+a6wfhjq9Bz1cr97qROqMpAdxL1Cm5Bmi+3s3pdp UuWHAlE2xPEpRJ4hMgrdcwmH5L/cWxD/m9wkdbXoV9ydRms6sR1sOEO/wq1CiGwzGKqO yrmWJ4HhrK1b0Zc7y9FVKAMP8d60WY121UD0fj78Q5cU8bdRaYncGgasNuwnL6I9fJzr hgUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=RcKIj9/yjdtNTZk08Yt26jaU9oVCeuEBh05f7kP/j/A=; b=LRKBb0MQ14QBZd/kz7b1qq7RJVInU8h+Z4TVwvfTaei4YG6+WSDSnRdFZvMeWj6w8D y2MWvev+r7UWoXM96uD7mfJfQ+htP+FSefqk0uymH7ub6H0datwypr1ik/4Pz/Dihp7f JZ3FxyIblpmyJgqVJKiZI5xhuRPJDOHwPuLpr2dcUA+o9o2qhci3ubn3ABzKNmgE8NTv nMAwfcjZskinHKKLr3G31h5I+s/qDNiZc9yJqCrn629MwC9673UJz+WHhTTAPwUbtm3S wArb0lucfGBESt+21XGnqPEz/gghxugHhSq7EO3FeaSyYAAxWaioYUV0C34NZGaSYrcS Y/8w== X-Gm-Message-State: AE9vXwMOmfQBrpiLsKsu6YHNY7Ixz/5fApHcT2l7QhWUAcYsxI5N5E7/AYktkN7greHTxEx24oEaGm0N9uL12Q== X-Received: by 10.36.14.68 with SMTP id 65mr1547575ite.99.1474344224001; Mon, 19 Sep 2016 21:03:44 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 19 Sep 2016 21:03:43 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <201609192043.u8JKh3jv040006@repo.freebsd.org> References: <201609192043.u8JKh3jv040006@repo.freebsd.org> From: Warner Losh Date: Mon, 19 Sep 2016 22:03:43 -0600 X-Google-Sender-Auth: vRz_k3qA_36jhj5gZni4ERV7fcg Message-ID: Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr To: "Conrad E. Meyer" Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:03:45 -0000 On Mon, Sep 19, 2016 at 2:43 PM, Conrad E. Meyer wrote: > Author: cem > Date: Mon Sep 19 20:43:03 2016 > New Revision: 305998 > URL: https://svnweb.freebsd.org/changeset/base/305998 > > Log: > Move sys/capsicum.h includes after types.h or param.h > > This is not actually documented or even implied in style(9). Make the change > to match convention. Someone should document this convention in style(9). style(9) should be read as an annotated example. It comes first in the example, therefore, it's convention. It is documented, just poorly. There's many examples in style(9) that are treated this way and it takes much careful study to understand it. It's tribal knowledge, and sometimes the only way to learn is to transgress. Attempts to modify style(9) are fraught with politics, intrigue and generally a lot of flames even when all that's being done is codifying existing practice. When I tried to do this last it was a shit storm, and generally things devolve into a shit storm with no real gain. Warner From owner-svn-src-all@freebsd.org Tue Sep 20 04:08:45 2016 Return-Path: Delivered-To: svn-src-all@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 C0027BDF6CA for ; Tue, 20 Sep 2016 04:08:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (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 86487F5 for ; Tue, 20 Sep 2016 04:08:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22f.google.com with SMTP id m186so8159710ioa.2 for ; Mon, 19 Sep 2016 21:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=9iAbiz28cbGfO4EXxfBJtcZkeSyKJ0FH3HYMSkqSY2o=; b=yYrg9vGWzXPYh5hPAZy4fRjn3AzIPGosMGHfL5uaj4RA7EjirK1jl88oczmKqv1CTp lJocfP0zoK7HmNi+uyWaD0GU7O8JCVf5QAiin37ZtA5SXdp6VE9SY+9Nv2B4JtExz43A wmvbckKEVystngb0YQ0LwbL5PBKoCWFExZILZt/3ICAyEib92Q0rDRVUAFm4FlWmBIQK YTf+RnLLx8/S474Vdpa1zshXWcefN5PoTN3uTjqpxRgtRVBHzqG6JLYx8Xwv44ayezti MpsLCkCslvccASF3UGLT+lR4h2bdDB9k5nM/AmCFnC6TcxlF4BDQR7jEYst+n5gDL0Rm 8BXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=9iAbiz28cbGfO4EXxfBJtcZkeSyKJ0FH3HYMSkqSY2o=; b=ClW3MmBxmVtcCrJ26upQgSR2umTOaN/E+EYUpkoBx//PuMe3mbK9lOgu4sgaJoNx/T HaVD/18PG5tPzSL378iGCwJwqVnWpx2Hx9YTczPvsJ0mLKRyOw9AzYMIJIiyA5UTFq5o DCgwFSZuWivGEEHwXs5V9ZnlJ7FPMaC1fmO2WkNEvrZ7308uv12FaIyohC6PEd88dBEr u8BFWGIPlB2QKUkDRMI3ysmYVkDIeQfX1/MXu8Ei2MeyGwlsFkH/YWYOLC0XTwtmeRDD k6fLF9jfnN/UYxSKZwnFRJLTTj/uk7kX4zhPNgxhlHck1r/PGVR6X7lebx97l0GKXEWr iqjw== X-Gm-Message-State: AE9vXwPRCOiVUzyT3cLf6yvSEeY2LFKWw8+/SzgKUG/46MV1iQK6mMs9+Y3/CRuuySrzZd3ejJEwJEPuWtzzIQ== X-Received: by 10.107.168.195 with SMTP id e64mr22564592ioj.205.1474344524950; Mon, 19 Sep 2016 21:08:44 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 19 Sep 2016 21:08:44 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <201609192043.u8JKh3jv040006@repo.freebsd.org> From: Warner Losh Date: Mon, 19 Sep 2016 22:08:44 -0600 X-Google-Sender-Auth: xR7qvaLn8caB-9d8gIyLBy4HHkk Message-ID: Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr To: "Conrad E. Meyer" Cc: "Ngie Cooper (yaneurabeya)" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:08:45 -0000 If you read style(9) as an annotated example of best practices, you'll see that it is actually documented there, but poorly. It's the first one after cdefs for the FreeBSD ID. It says to include one or the other, with the implication it's first. It's the common interpretation of the project (this issue has come up before) and it's just one tiny sliver of tribal knowledge that was attempted to be enshrined there. Yes, it isn't explicit, but it matches convention in the rest of the tree. Maybe it should be explicit, but it's always a shit-show when people tinker with style(9) to make it "clearer" because other people think you did it wrong, or need to list a big set of exceptions to the rule or who knows what. Hell, I couldn't even add that {} were allowed in contexts where people had been using them for a decade without it being a stupid bikeshed and despite extremely careful vetting and consensus building I have been told that one committer left the project over it. So I'd think twice about modifying style.9 and go have a beer or your favorite relaxing beverage instead. Warner On Mon, Sep 19, 2016 at 3:03 PM, Conrad Meyer wrote: > If you re-read the sentences you've pasted carefully, I think you'll > find it doesn't actually say that the types or param headers come > before other sys/ headers. Just that sys/ headers come before > non-sys/ headers. > > Best, > Conrad > > On Mon, Sep 19, 2016 at 1:45 PM, Ngie Cooper (yaneurabeya) > wrote: >> >> On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: >> >> Author: cem >> Date: Mon Sep 19 20:43:03 2016 >> New Revision: 305998 >> URL: https://svnweb.freebsd.org/changeset/base/305998 >> >> Log: >> Move sys/capsicum.h includes after types.h or param.h >> >> This is not actually documented or even implied in style(9). Make the >> change >> to match convention. Someone should document this convention in style(= 9). >> >> Reported by: jhb >> Sponsored by: EMC Dell Isilon >> >> >> Uh=E2=80=A6 yes it clearly states it in style(9). From >> https://www.freebsd.org/cgi/man.cgi?query=3Dstyle&sektion=3D9 : >> >> Kernel include files (i.e. sys/*.h) come first; normally, include >> OR , but not both. includ= es >> , and it is okay to depend on that. >> >> Thanks, >> -Ngie > From owner-svn-src-all@freebsd.org Tue Sep 20 04:19:05 2016 Return-Path: Delivered-To: svn-src-all@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 7340FBDF990 for ; Tue, 20 Sep 2016 04:19:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (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 3BD0D84E for ; Tue, 20 Sep 2016 04:19:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id m79so8277454ioo.3 for ; Mon, 19 Sep 2016 21:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=17c8XpxOUV6PMKBGkT6hgRc9wmj0RfqUb4n9M0h3sFA=; b=WBfwtyTkSHv6Q8sqmJeMQKYHCXNR++0IcjNquJrpXX+7+pzO1lP6OtIDIT3TXB+JJu vHaYJB0y8+te4+VgEeoldJsrFKVF+B/yOhCfX6x5vL3kO1Tr1Ohrwh9p6H/dUbHp3cr3 jndQm9Hh0fyjLMp+25M6JnhISmpJ8MWRUwm3bM6X6AQh3IpM4DC/c6ARuLRDfjuVkiKj Jlz1/M8gms6QlmFG6TORa3G+EWBIO4W2Zhj5oB7QX7l7GixJBtC5GXM0m71alchrF+cu TaAIkO4rfkpFKt9uXG+aq4wwBCVkbfgoP0RPsL7R0Jdi0kDdYd/EChTXWheBxCVmTotU k4Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=17c8XpxOUV6PMKBGkT6hgRc9wmj0RfqUb4n9M0h3sFA=; b=aa/zgNJd3/CoLlkES4ZVjyNyoFPRdClUsD01GELsMDBAhSUFHYcKVggDtq1qn2bPNG 6igpR/U6AdAaOTFFgLe8Hqs7i/a23SJp60ZPBQlWRGXlxI2u5JjFjJDs4oFFnlX48nYq tyJIH/Is5GRx1+9gU+aZ70VmHXl5IGeQqmhZxYcc1HpdfKyBqMKIChQ86lnewQaTQTm7 NkAIp+rX61VqJqJWwPZpM5U9PUWf5G5yuWR1pHJXH++huZ48c6iWvvbBorT9xw7i+Omk b5fqlfTuXcjungZ6xq2q1eiBVja37vWDwIYOY6+Tlu7HvU2RoXZ3Dw/ie4ApoVMYJVgJ jKPQ== X-Gm-Message-State: AE9vXwPm71UddIH78zYikIazHTM0OrFfnFvYhFgzx6yEH/34AcqgotR13nPBctjDd165mgD5REGTJUo5hqV5cg== X-Received: by 10.107.168.195 with SMTP id e64mr22606918ioj.205.1474345144641; Mon, 19 Sep 2016 21:19:04 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 19 Sep 2016 21:19:04 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <20160920034337.GA6180@brick> References: <201609190851.u8J8pRDD068198@repo.freebsd.org> <20160920034337.GA6180@brick> From: Warner Losh Date: Mon, 19 Sep 2016 22:19:04 -0600 X-Google-Sender-Auth: MeHrw3uTv0qDNWXv44P5qJHF_Yo Message-ID: Subject: Re: svn commit: r305968 - head/etc/autofs To: Ronald Klop , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:19:05 -0000 For MSDOS it's one thing and likely helps. But for ufs it doesn't help. Soft updates already does an excellent job at reducing wear and all async does is give added danger of dataloss. Linux distros don't matter for UFS because different design decisions have been made for ext[234] and UFS. Warner On Mon, Sep 19, 2016 at 9:43 PM, Edward Tomasz Napierala wrote: > Mounting removable media async improves performance and reduces wear. > And AFAIK that's what most Linux distros used to do. > > On 0919T2032, Ronald Klop wrote: >> Hi, >> >> Your commit message says in words exactly what the diff says in code. >> Would you like to elaborate on why the change is made? I'm curious >> because this could cause severe damage to the filesystem on unclean eject >> of the media. >> >> Regards, >> Ronald. >> >> >> On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napierala >> wrote: >> >> > Author: trasz >> > Date: Mon Sep 19 08:51:27 2016 >> > New Revision: 305968 >> > URL: https://svnweb.freebsd.org/changeset/base/305968 >> > >> > Log: >> > Make autofs use the "async" flag for msdosfs and ufs filesystems >> > mounted >> > on /media. >> > MFC after: 1 month >> > >> > Modified: >> > head/etc/autofs/special_media >> > >> > Modified: head/etc/autofs/special_media >> > ============================================================================== >> > --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 (r305967) >> > +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) >> > @@ -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 >> > _______________________________________________ >> > svn-src-all@freebsd.org mailing list >> > https://lists.freebsd.org/mailman/listinfo/svn-src-all >> > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Tue Sep 20 04:33:59 2016 Return-Path: Delivered-To: svn-src-all@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 EA3DABDFD46; Tue, 20 Sep 2016 04:33:59 +0000 (UTC) (envelope-from trasz@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 BA803F14; Tue, 20 Sep 2016 04:33:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K4XwxH017595; Tue, 20 Sep 2016 04:33:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K4XwEr017594; Tue, 20 Sep 2016 04:33:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609200433.u8K4XwEr017594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Sep 2016 04:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306009 - head/etc/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:34:00 -0000 Author: trasz Date: Tue Sep 20 04:33:58 2016 New Revision: 306009 URL: https://svnweb.freebsd.org/changeset/base/306009 Log: Make autofs(5) -media map also use "async" and "noatime" for ext2fs(5). Suggested by: pfg@ MFC after: 1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media ============================================================================== --- head/etc/autofs/special_media Tue Sep 20 00:22:35 2016 (r306008) +++ head/etc/autofs/special_media Tue Sep 20 04:33:58 2016 (r306009) @@ -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-all@freebsd.org Tue Sep 20 04:50:55 2016 Return-Path: Delivered-To: svn-src-all@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 18397BE017B; Tue, 20 Sep 2016 04:50:55 +0000 (UTC) (envelope-from imp@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 DF8591464; Tue, 20 Sep 2016 04:50:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K4osuG021494; Tue, 20 Sep 2016 04:50:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K4osHX021493; Tue, 20 Sep 2016 04:50:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609200450.u8K4osHX021493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 20 Sep 2016 04:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306010 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:50:55 -0000 Author: imp Date: Tue Sep 20 04:50:53 2016 New Revision: 306010 URL: https://svnweb.freebsd.org/changeset/base/306010 Log: Document existing practice and be more clear about sys/foo.h files being alphabetical with sys/param.h or sys/types.h being first. Expand the example to hopefully make this (slightly) clearer. Noticed by: cem@ Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Tue Sep 20 04:33:58 2016 (r306009) +++ head/share/man/man9/style.9 Tue Sep 20 04:50:53 2016 (r306010) @@ -118,17 +118,21 @@ Leave another blank line before the head .Pp Kernel include files (i.e.\& .Pa sys/*.h ) -come first; normally, include +come first sorted alphebetially where possible. +Include .In sys/types.h OR .In sys/param.h , -but not both. +but not both and include it first. .In sys/types.h includes .In sys/cdefs.h , and it is okay to depend on that. .Bd -literal #include /* Non-local includes in angle brackets. */ +#include +#include +#include .Ed .Pp For a network program, put the network include files next. From owner-svn-src-all@freebsd.org Tue Sep 20 04:52:02 2016 Return-Path: Delivered-To: svn-src-all@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 83EB7BE01F8; Tue, 20 Sep 2016 04:52:02 +0000 (UTC) (envelope-from trasz@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 541D41781; Tue, 20 Sep 2016 04:52:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K4q1ao024261; Tue, 20 Sep 2016 04:52:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K4q1uc024259; Tue, 20 Sep 2016 04:52:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609200452.u8K4q1uc024259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Sep 2016 04:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306011 - in head/etc: . autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:52:02 -0000 Author: trasz Date: Tue Sep 20 04:52:01 2016 New Revision: 306011 URL: https://svnweb.freebsd.org/changeset/base/306011 Log: 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. MFC after: 1 month Modified: head/etc/auto_master head/etc/autofs/special_media Modified: head/etc/auto_master ============================================================================== --- head/etc/auto_master Tue Sep 20 04:50:53 2016 (r306010) +++ head/etc/auto_master Tue Sep 20 04:52:01 2016 (r306011) @@ -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: head/etc/autofs/special_media ============================================================================== --- head/etc/autofs/special_media Tue Sep 20 04:50:53 2016 (r306010) +++ head/etc/autofs/special_media Tue Sep 20 04:52:01 2016 (r306011) @@ -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-all@freebsd.org Tue Sep 20 04:53:43 2016 Return-Path: Delivered-To: svn-src-all@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 2A4BFBE029A; Tue, 20 Sep 2016 04:53:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) (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 F29311979; Tue, 20 Sep 2016 04:53:42 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f54.google.com with SMTP id n143so8482000ita.1; Mon, 19 Sep 2016 21:53:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=hmJ8euYbIdYbcg0tlSX/Nfbg/lHQVi42UzdudtQwuAU=; b=WpJDtlhgAiX59bIjjETJwIfqwzI8k1dgo0N9wzWT8Vg7ORhYKOatG8rMI9wJ9Jpt+l szIXCVoqNPOnb/+90SlBDtA9PBkE4Fjdh4MlnFTU+ubNmI9UH/v4YJuYJj2sL1R1h9XU hxqgiqwWabmWpaIyMZcZ7YfbXD5NlJqkMAxVjeVLjTwcn3KgSKoctbIo2THdBUHFelsQ Judwp3iYxSSi1sMmi23ANYXRoAXMFIlCTr2yvnvutWnizVYx6809p8wEuRd0Sdt5+Hk2 raJ6qkRdad7XHaulzn41xA9fXkM0dyPvqBFoa3ZqZI+3cEkxxr6PnEagqfW+1vEOGvYQ c4pQ== X-Gm-Message-State: AE9vXwNtyeRqSSnVK01upgvneJ3UY5XH9JmLOcSVHmxnfQv3Iv2iQvNsSwBD96tveqVizw== X-Received: by 10.36.99.2 with SMTP id j2mr1959546itc.72.1474347216385; Mon, 19 Sep 2016 21:53:36 -0700 (PDT) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com. [209.85.214.52]) by smtp.gmail.com with ESMTPSA id n133sm9565279ith.1.2016.09.19.21.53.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 21:53:36 -0700 (PDT) Received: by mail-it0-f52.google.com with SMTP id r192so88143266ita.0; Mon, 19 Sep 2016 21:53:36 -0700 (PDT) X-Received: by 10.36.249.194 with SMTP id l185mr1788941ith.102.1474347215986; Mon, 19 Sep 2016 21:53:35 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Mon, 19 Sep 2016 21:53:35 -0700 (PDT) In-Reply-To: <201609200450.u8K4osHX021493@repo.freebsd.org> References: <201609200450.u8K4osHX021493@repo.freebsd.org> From: Conrad Meyer Date: Mon, 19 Sep 2016 21:53:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306010 - head/share/man/man9 To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:53:43 -0000 Thanks! On Mon, Sep 19, 2016 at 9:50 PM, Warner Losh wrote: > Author: imp > Date: Tue Sep 20 04:50:53 2016 > New Revision: 306010 > URL: https://svnweb.freebsd.org/changeset/base/306010 > > Log: > Document existing practice and be more clear about sys/foo.h files > being alphabetical with sys/param.h or sys/types.h being first. Expand > the example to hopefully make this (slightly) clearer. > > Noticed by: cem@ > > Modified: > head/share/man/man9/style.9 > > Modified: head/share/man/man9/style.9 > ============================================================================== > --- head/share/man/man9/style.9 Tue Sep 20 04:33:58 2016 (r306009) > +++ head/share/man/man9/style.9 Tue Sep 20 04:50:53 2016 (r306010) > @@ -118,17 +118,21 @@ Leave another blank line before the head > .Pp > Kernel include files (i.e.\& > .Pa sys/*.h ) > -come first; normally, include > +come first sorted alphebetially where possible. > +Include > .In sys/types.h > OR > .In sys/param.h , > -but not both. > +but not both and include it first. > .In sys/types.h > includes > .In sys/cdefs.h , > and it is okay to depend on that. > .Bd -literal > #include /* Non-local includes in angle brackets. */ > +#include > +#include > +#include > .Ed > .Pp > For a network program, put the network include files next. > From owner-svn-src-all@freebsd.org Tue Sep 20 04:54:01 2016 Return-Path: Delivered-To: svn-src-all@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 8AD9ABE02DB; Tue, 20 Sep 2016 04:54:01 +0000 (UTC) (envelope-from trasz@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 5A7051AD8; Tue, 20 Sep 2016 04:54:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K4s0c3025159; Tue, 20 Sep 2016 04:54:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K4s0RZ025158; Tue, 20 Sep 2016 04:54:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609200454.u8K4s0RZ025158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Sep 2016 04:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306012 - head/etc/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:54:01 -0000 Author: trasz Date: Tue Sep 20 04:54:00 2016 New Revision: 306012 URL: https://svnweb.freebsd.org/changeset/base/306012 Log: Fix -media to not mount ufs with "async"; it doesn't make sense when there is softupdates. Suggested by: imp@ MFC after: 1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media ============================================================================== --- head/etc/autofs/special_media Tue Sep 20 04:52:01 2016 (r306011) +++ head/etc/autofs/special_media Tue Sep 20 04:54:00 2016 (r306012) @@ -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-all@freebsd.org Tue Sep 20 04:54:15 2016 Return-Path: Delivered-To: svn-src-all@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 2FC5FBE0332; Tue, 20 Sep 2016 04:54:15 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 C579B1C5D; Tue, 20 Sep 2016 04:54:14 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id l132so1266221wmf.1; Mon, 19 Sep 2016 21:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=iU5c6IyHFUZijWDdcLmvUC5XHXgFeC2ozu8/cMHiKiM=; b=bryHtz0RjtRu5baQb91yMz5cf002lH7pZCk/4c5DBT30JNR3IexMud2AwsQTeWg6GW lM0dn2pd+OWBhwFozvFOhNJEBhpK/qjP/7D7G3XJ3glA48ACqrFuYqxk12hCeWkjwzpN AwAWD6B9UPtabVCRShKRt5/UPj02poVjGpm7SHwAIHbcTz2GkW30yF14fgI6Wj/sB7/4 j+edG4MV3i1YWwiRddpgzKKbSNnHoxDJ2MsE7MCDgOzSWWQzksIWj/TKZRABS9p615tu nR/8jTtKgkxlMY7K2qmlmvUxHjugQBDLHr1TKmZF0JRN/UbuYxQAd7XovVf/2oUI31VF l6VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=iU5c6IyHFUZijWDdcLmvUC5XHXgFeC2ozu8/cMHiKiM=; b=TipftsqsNAWeFYfeg5jsUaX3Tuc/A7Obt8gTVm4BCcz/iK8LWolnUcesKUntzrHmJ6 InCBtVhEB1snG2Zm1BCwB4fIDXWinRGUcXZmSRfXgmJI7I9v6/v+Bq0+sm/RjaJpc3uh i4zof5jWB0LY2uSB6BbqDKsRHhRCy96wbmEM8Xzs6dbMix/0iKwpI/AA/UmfZx8qhJui yTEESFXYh3EaUT4JSCFFJxTK8j50eC7ZD6lEfFaO5JFL0QlKdyqb6LObQrC6gl4nllNA 51J65kYFrefGXBHCOktSsZP1CIPO3pHSd/Jbf+RJ1GNuyZoWzg/uSLgwa2HJPfcjsLvO g44g== X-Gm-Message-State: AE9vXwNjVpnACC7wNrsYC20lPRrasj8/8G5UC9zod1QUqZ5w4I2QFmfOafs6NFjJ4e+06Q== X-Received: by 10.28.4.72 with SMTP id 69mr1244178wme.91.1474347253370; Mon, 19 Sep 2016 21:54:13 -0700 (PDT) Received: from brick (etn137.neoplus.adsl.tpnet.pl. [83.20.159.137]) by smtp.gmail.com with ESMTPSA id md9sm26272740wjb.20.2016.09.19.21.54.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 21:54:12 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 20 Sep 2016 06:54:10 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Warner Losh Cc: Ronald Klop , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r305968 - head/etc/autofs Message-ID: <20160920045410.GA10272@brick> Mail-Followup-To: Warner Losh , Ronald Klop , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201609190851.u8J8pRDD068198@repo.freebsd.org> <20160920034337.GA6180@brick> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 04:54:15 -0000 Good point; fixed. On 0919T2219, Warner Losh wrote: > For MSDOS it's one thing and likely helps. But for ufs it doesn't > help. Soft updates already does an excellent job at reducing wear and > all async does is give added danger of dataloss. Linux distros don't > matter for UFS because different design decisions have been made for > ext[234] and UFS. > > Warner > > On Mon, Sep 19, 2016 at 9:43 PM, Edward Tomasz Napierala > wrote: > > Mounting removable media async improves performance and reduces wear. > > And AFAIK that's what most Linux distros used to do. > > > > On 0919T2032, Ronald Klop wrote: > >> Hi, > >> > >> Your commit message says in words exactly what the diff says in code. > >> Would you like to elaborate on why the change is made? I'm curious > >> because this could cause severe damage to the filesystem on unclean eject > >> of the media. > >> > >> Regards, > >> Ronald. > >> > >> > >> On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napierala > >> wrote: > >> > >> > Author: trasz > >> > Date: Mon Sep 19 08:51:27 2016 > >> > New Revision: 305968 > >> > URL: https://svnweb.freebsd.org/changeset/base/305968 > >> > > >> > Log: > >> > Make autofs use the "async" flag for msdosfs and ufs filesystems > >> > mounted > >> > on /media. > >> > MFC after: 1 month > >> > > >> > Modified: > >> > head/etc/autofs/special_media > >> > > >> > Modified: head/etc/autofs/special_media > >> > ============================================================================== > >> > --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 (r305967) > >> > +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) > >> > @@ -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 > >> > _______________________________________________ > >> > svn-src-all@freebsd.org mailing list > >> > https://lists.freebsd.org/mailman/listinfo/svn-src-all > >> > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > > From owner-svn-src-all@freebsd.org Tue Sep 20 05:26:41 2016 Return-Path: Delivered-To: svn-src-all@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 B633DBE0A74; Tue, 20 Sep 2016 05:26:41 +0000 (UTC) (envelope-from sephe@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 94092A50; Tue, 20 Sep 2016 05:26:41 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K5Qes8036403; Tue, 20 Sep 2016 05:26:40 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K5QedB036402; Tue, 20 Sep 2016 05:26:40 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609200526.u8K5QedB036402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 20 Sep 2016 05:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306013 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 05:26:41 -0000 Author: sephe Date: Tue Sep 20 05:26:40 2016 New Revision: 306013 URL: https://svnweb.freebsd.org/changeset/base/306013 Log: hyperv/hn: Fix ifnet hwassist setup. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7948 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Sep 20 04:54:00 2016 (r306012) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Sep 20 05:26:40 2016 (r306013) @@ -180,14 +180,6 @@ struct hn_txdesc { #define HN_TXD_FLAG_ONLIST 0x1 #define HN_TXD_FLAG_DMAMAP 0x2 -/* - * Only enable UDP checksum offloading when it is on 2012R2 or - * later. UDP checksum offloading doesn't work on earlier - * Windows releases. - */ -#define HN_CSUM_ASSIST_WIN8 (CSUM_IP | CSUM_TCP) -#define HN_CSUM_ASSIST (CSUM_IP | CSUM_UDP | CSUM_TCP) - #define HN_LRO_LENLIM_MULTIRX_DEF (12 * ETHERMTU) #define HN_LRO_LENLIM_DEF (25 * ETHERMTU) /* YYY 2*MTU is a bit rough, but should be good enough. */ @@ -202,6 +194,13 @@ struct hn_txdesc { #define HN_LOCK(sc) sx_xlock(&(sc)->hn_lock) #define HN_UNLOCK(sc) sx_xunlock(&(sc)->hn_lock) +#define HN_CSUM_IP_MASK (CSUM_IP | CSUM_IP_TCP | CSUM_IP_UDP) +#define HN_CSUM_IP6_MASK (CSUM_IP6_TCP | CSUM_IP6_UDP) +#define HN_CSUM_IP_HWASSIST(sc) \ + ((sc)->hn_tx_ring[0].hn_csum_assist & HN_CSUM_IP_MASK) +#define HN_CSUM_IP6_HWASSIST(sc) \ + ((sc)->hn_tx_ring[0].hn_csum_assist & HN_CSUM_IP6_MASK) + /* * Globals */ @@ -326,12 +325,14 @@ static int hn_tx_stat_ulong_sysctl(SYSCT static int hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARGS); static int hn_ndis_version_sysctl(SYSCTL_HANDLER_ARGS); static int hn_caps_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_hwassist_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); static int hn_check_iplen(const struct mbuf *, int); static int hn_create_tx_ring(struct hn_softc *, int); static void hn_destroy_tx_ring(struct hn_tx_ring *); static int hn_create_tx_data(struct hn_softc *, int); +static void hn_fixup_tx_data(struct hn_softc *); static void hn_destroy_tx_data(struct hn_softc *); static void hn_start_taskfunc(void *, int); static void hn_start_txeof_taskfunc(void *, int); @@ -632,10 +633,10 @@ netvsc_attach(device_t dev) } #endif - hn_set_chim_size(sc, sc->hn_chim_szmax); - if (hn_tx_chimney_size > 0 && - hn_tx_chimney_size < sc->hn_chim_szmax) - hn_set_chim_size(sc, hn_tx_chimney_size); + /* + * Fixup TX stuffs after synthetic parts are attached. + */ + hn_fixup_tx_data(sc); ctx = device_get_sysctl_ctx(dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); @@ -647,6 +648,9 @@ netvsc_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "caps", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_caps_sysctl, "A", "capabilities"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "hwassist", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_hwassist_sysctl, "A", "hwassist"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_key", CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, hn_rss_key_sysctl, "IU", "RSS key"); @@ -681,13 +685,32 @@ netvsc_attach(device_t dev) ifp->if_qflush = hn_xmit_qflush; } - ifp->if_capabilities |= - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_TSO | - IFCAP_LRO; - ifp->if_capenable |= - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_TSO | - IFCAP_LRO; - ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist | CSUM_TSO; + ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_LRO; +#ifdef foo + /* We can't diff IPv6 packets from IPv4 packets on RX path. */ + ifp->if_capabilities |= IFCAP_RXCSUM_IPV6; +#endif + if (sc->hn_caps & HN_CAP_VLAN) { + /* XXX not sure about VLAN_MTU. */ + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + } + + ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist; + if (ifp->if_hwassist & HN_CSUM_IP_MASK) + ifp->if_capabilities |= IFCAP_TXCSUM; + if (ifp->if_hwassist & HN_CSUM_IP6_MASK) + ifp->if_capabilities |= IFCAP_TXCSUM_IPV6; + if (sc->hn_caps & HN_CAP_TSO4) { + ifp->if_capabilities |= IFCAP_TSO4; + ifp->if_hwassist |= CSUM_IP_TSO; + } + if (sc->hn_caps & HN_CAP_TSO6) { + ifp->if_capabilities |= IFCAP_TSO6; + ifp->if_hwassist |= CSUM_IP6_TSO; + } + + /* Enable all available capabilities by default. */ + ifp->if_capenable = ifp->if_capabilities; tso_maxlen = hn_tso_maxlen; if (tso_maxlen <= 0 || tso_maxlen > IP_MAXPACKET) @@ -1041,14 +1064,19 @@ hn_encap(struct hn_tx_ring *txr, struct } else if (m_head->m_pkthdr.csum_flags & txr->hn_csum_assist) { pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, NDIS_TXCSUM_INFO_SIZE, NDIS_PKTINFO_TYPE_CSUM); - *pi_data = NDIS_TXCSUM_INFO_IPV4; - - if (m_head->m_pkthdr.csum_flags & CSUM_IP) - *pi_data |= NDIS_TXCSUM_INFO_IPCS; + if (m_head->m_pkthdr.csum_flags & + (CSUM_IP6_TCP | CSUM_IP6_UDP)) { + *pi_data = NDIS_TXCSUM_INFO_IPV6; + } else { + *pi_data = NDIS_TXCSUM_INFO_IPV4; + if (m_head->m_pkthdr.csum_flags & CSUM_IP) + *pi_data |= NDIS_TXCSUM_INFO_IPCS; + } - if (m_head->m_pkthdr.csum_flags & CSUM_TCP) + if (m_head->m_pkthdr.csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP)) *pi_data |= NDIS_TXCSUM_INFO_TCPCS; - else if (m_head->m_pkthdr.csum_flags & CSUM_UDP) + else if (m_head->m_pkthdr.csum_flags & + (CSUM_IP_UDP | CSUM_IP6_UDP)) *pi_data |= NDIS_TXCSUM_INFO_UDPCS; } @@ -1665,21 +1693,31 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, case SIOCSIFCAP: HN_LOCK(sc); - mask = ifr->ifr_reqcap ^ ifp->if_capenable; + if (mask & IFCAP_TXCSUM) { ifp->if_capenable ^= IFCAP_TXCSUM; - if (ifp->if_capenable & IFCAP_TXCSUM) { - ifp->if_hwassist |= - sc->hn_tx_ring[0].hn_csum_assist; - } else { - ifp->if_hwassist &= - ~sc->hn_tx_ring[0].hn_csum_assist; - } + if (ifp->if_capenable & IFCAP_TXCSUM) + ifp->if_hwassist |= HN_CSUM_IP_HWASSIST(sc); + else + ifp->if_hwassist &= ~HN_CSUM_IP_HWASSIST(sc); + } + if (mask & IFCAP_TXCSUM_IPV6) { + ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; + if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) + ifp->if_hwassist |= HN_CSUM_IP6_HWASSIST(sc); + else + ifp->if_hwassist &= ~HN_CSUM_IP6_HWASSIST(sc); } + /* TODO: flip RNDIS offload parameters for RXCSUM. */ if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; +#ifdef foo + /* We can't diff IPv6 packets from IPv4 packets on RX path. */ + if (mask & IFCAP_RXCSUM_IPV6) + ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; +#endif if (mask & IFCAP_LRO) ifp->if_capenable ^= IFCAP_LRO; @@ -1691,7 +1729,6 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, else ifp->if_hwassist &= ~CSUM_IP_TSO; } - if (mask & IFCAP_TSO6) { ifp->if_capenable ^= IFCAP_TSO6; if (ifp->if_capenable & IFCAP_TSO6) @@ -2132,6 +2169,20 @@ hn_caps_sysctl(SYSCTL_HANDLER_ARGS) } static int +hn_hwassist_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + char assist_str[128]; + uint32_t hwassist; + + HN_LOCK(sc); + hwassist = sc->hn_ifp->if_hwassist; + HN_UNLOCK(sc); + snprintf(assist_str, sizeof(assist_str), "%b", hwassist, CSUM_BITS); + return sysctl_handle_string(oidp, assist_str, sizeof(assist_str), req); +} + +static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; @@ -2488,7 +2539,6 @@ hn_create_tx_ring(struct hn_softc *sc, i device_t dev = sc->hn_dev; bus_dma_tag_t parent_dtag; int error, i; - uint32_t version; txr->hn_sc = sc; txr->hn_tx_idx = id; @@ -2527,18 +2577,6 @@ hn_create_tx_ring(struct hn_softc *sc, i } txr->hn_direct_tx_size = hn_direct_tx_size; - version = VMBUS_GET_VERSION(device_get_parent(dev), dev); - if (version >= VMBUS_VERSION_WIN8_1) { - txr->hn_csum_assist = HN_CSUM_ASSIST; - } else { - txr->hn_csum_assist = HN_CSUM_ASSIST_WIN8; - if (id == 0) { - device_printf(dev, "bus version %u.%u, " - "no UDP checksum offloading\n", - VMBUS_VERSION_MAJOR(version), - VMBUS_VERSION_MINOR(version)); - } - } /* * Always schedule transmission instead of trying to do direct @@ -2834,6 +2872,35 @@ hn_set_chim_size(struct hn_softc *sc, in } static void +hn_fixup_tx_data(struct hn_softc *sc) +{ + uint64_t csum_assist; + int i; + + hn_set_chim_size(sc, sc->hn_chim_szmax); + if (hn_tx_chimney_size > 0 && + hn_tx_chimney_size < sc->hn_chim_szmax) + hn_set_chim_size(sc, hn_tx_chimney_size); + + csum_assist = 0; + if (sc->hn_caps & HN_CAP_IPCS) + csum_assist |= CSUM_IP; + if (sc->hn_caps & HN_CAP_TCP4CS) + csum_assist |= CSUM_IP_TCP; + if (sc->hn_caps & HN_CAP_UDP4CS) + csum_assist |= CSUM_IP_UDP; +#ifdef notyet + if (sc->hn_caps & HN_CAP_TCP6CS) + csum_assist |= CSUM_IP6_TCP; + if (sc->hn_caps & HN_CAP_UDP6CS) + csum_assist |= CSUM_IP6_UDP; +#endif + + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) + sc->hn_tx_ring[i].hn_csum_assist = csum_assist; +} + +static void hn_destroy_tx_data(struct hn_softc *sc) { int i; From owner-svn-src-all@freebsd.org Tue Sep 20 05:45:19 2016 Return-Path: Delivered-To: svn-src-all@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 86906BE0EB0; Tue, 20 Sep 2016 05:45:19 +0000 (UTC) (envelope-from sephe@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 3C06423D; Tue, 20 Sep 2016 05:45:19 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K5jI6O044160; Tue, 20 Sep 2016 05:45:18 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K5jIAp044159; Tue, 20 Sep 2016 05:45:18 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609200545.u8K5jIAp044159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 20 Sep 2016 05:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306014 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 05:45:19 -0000 Author: sephe Date: Tue Sep 20 05:45:18 2016 New Revision: 306014 URL: https://svnweb.freebsd.org/changeset/base/306014 Log: hyperv/hn: Let the caller of hn_nvs_doinit() do the error logging. So that NVS version probing failure does not look too scary. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7950 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Sep 20 05:26:40 2016 (r306013) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Sep 20 05:45:18 2016 (r306014) @@ -444,8 +444,15 @@ hn_nvs_doinit(struct hn_softc *sc, uint3 vmbus_xact_put(xact); if (status != HN_NVS_STATUS_OK) { - if_printf(sc->hn_ifp, "nvs init failed for ver 0x%x\n", - nvs_ver); + if (bootverbose) { + /* + * Caller may try another NVS version, and will log + * error if there are no more NVS versions to try, + * so don't bark out loud here. + */ + if_printf(sc->hn_ifp, "nvs init failed for ver 0x%x\n", + nvs_ver); + } return (EINVAL); } return (0); @@ -499,7 +506,7 @@ hn_nvs_init_ndis(struct hn_softc *sc) static int hn_nvs_init(struct hn_softc *sc) { - int i; + int i, error; if (device_is_attached(sc->hn_dev)) { /* @@ -511,15 +518,19 @@ hn_nvs_init(struct hn_softc *sc) HN_NDIS_VERSION_MAJOR(sc->hn_ndis_ver), HN_NDIS_VERSION_MINOR(sc->hn_ndis_ver)); } - return (hn_nvs_doinit(sc, sc->hn_nvs_ver)); + + error = hn_nvs_doinit(sc, sc->hn_nvs_ver); + if (error) { + if_printf(sc->hn_ifp, "reinit NVS version 0x%x " + "failed: %d\n", sc->hn_nvs_ver, error); + } + return (error); } /* * Find the supported NVS version and set NDIS version accordingly. */ for (i = 0; i < nitems(hn_nvs_version); ++i) { - int error; - error = hn_nvs_doinit(sc, hn_nvs_version[i]); if (!error) { sc->hn_nvs_ver = hn_nvs_version[i]; From owner-svn-src-all@freebsd.org Tue Sep 20 05:59:38 2016 Return-Path: Delivered-To: svn-src-all@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 9AEE2BE1114; Tue, 20 Sep 2016 05:59:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 3626395F; Tue, 20 Sep 2016 05:59:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id BD5331A37E0; Tue, 20 Sep 2016 15:59:34 +1000 (AEST) Date: Tue, 20 Sep 2016 15:59:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: "Ngie Cooper (yaneurabeya)" , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr In-Reply-To: <8333248.dV1m5xp1ki@ralph.baldwin.cx> Message-ID: <20160920154629.K1129@besplex.bde.org> References: <201609192043.u8JKh3jv040006@repo.freebsd.org> <8333248.dV1m5xp1ki@ralph.baldwin.cx> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=nlC_4_pT8q9DhB4Ho9EA:9 a=6I5d2MoRAAAA:8 a=Hr4q2quiW_qvfm4nSNkA:9 a=45ClL6m2LaAA:10 a=IjZwj45LgO3ly-622nXo:22 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 05:59:38 -0000 On Mon, 19 Sep 2016, John Baldwin wrote: > On Monday, September 19, 2016 01:45:01 PM Ngie Cooper wrote: >> >>> On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: >>> Log: >>> Move sys/capsicum.h includes after types.h or param.h >>> >>> This is not actually documented or even implied in style(9). Make the= change >>> to match convention. Someone should document this convention in style= (9). >>> >>> Reported by:=09jhb >>> Sponsored by:=09EMC Dell Isilon >> >> Uh=E2=80=A6 yes it clearly states it in style(9). From https://www.freeb= sd.org/cgi/man.cgi?query=3Dstyle&sektion=3D9 : >> Kernel include files (i.e. sys/*.h) come first; normally, include >> OR , but not both. includ= es >> , and it is okay to depend on that. > > It doesn't actually say that types.h/param.h has to come before other sys= /*.h > headers though. Normally sys/foo.h requires sys/types.h to compile hence= the > rule, but sys/capsicum.h gets around this by a nested include of sys/para= m.h > (which is itself probably dubious). This and other nested includes make sys/capsicum.h of rmrf quality. It is now not so normal to require sys/types or sys/param.h first, since too many headers have been broken using nested includes. Only a few have correct fixes for pollution. Almost none have documentation for either their non-pollution or pollution, except possibly with directives like -D_POSIX_SOURCE (restrict to ~1988 POSIX.1) where the standard has such documentation and the standard is supported. E.g., cap_enter(2) only mentions a couple of symbols and no namespaces. Its SYNOPSIS uses the undocumented symbol u_int, and doesn't mention sys/types.h or _BSD_VISIBLE, so by knowing undocumented things we can tell that its #include of is either incomplete or that it has namespace pollution including at least u_int and probably all the undocumented symbols in sys/types.h, but that is just the start of the pollution. > I do think we should explicitly add a note to style.9 though to say that > types.h|param.h comes first. I use the following: X Index: style.9 X =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D X RCS file: /home/ncvs/src/share/man/man9/style.9,v X retrieving revision 1.110 X diff -u -2 -r1.110 style.9 X --- style.9=093 Jul 2004 18:29:24 -0000=091.110 X +++ style.9=097 Jul 2004 11:47:22 -0000 X @@ -90,17 +130,22 @@ X .Ed X .Pp X -Leave another blank line before the header files. X +Leave one blank line before the header files. X .Pp X -Kernel include files (i.e.\& X +Kernel include files (i.e.,\& X .Pa sys/*.h ) X -come first; normally, include X -.In sys/types.h X -OR X -.In sys/param.h , X -but not both. X +come first; normally, X .In sys/types.h X +or X +.In sys/param.h X +will be needed before any others. X +.In sys/param.h X includes X +.In sys/types.h . X +Do not include both. X +Many headers, including X +.In sys/types.h , X +include X .In sys/cdefs.h , X -and it is okay to depend on that. X +and it is OK to depend on that. X .Bd -literal X #include =09/* Non-local includes in angle brackets. */ X @@ -116,12 +161,11 @@ X .Ed X .Pp X -Do not use files in X +Do not include files in X .Pa /usr/include X for files in the kernel. X .Pp X -Leave a blank line before the next group, the X -.Pa /usr/include X -files, X -which should be sorted alphabetically by name. X +Leave a blank line before the next group (XXX nah, all groups), X +the <*.h> include files. X +Sort the <*.h> include files (XXX nah, all groups) alphabetically. X .Bd -literal X #include X @@ -138,5 +182,6 @@ X .Ed X .Pp X -Leave another blank line before the user include files. X +Leave another blank line before the local include files. X +XXX nah, leave it before all groups. X .Bd -literal X #include "pathnames.h"=09=09/* Local includes in double quotes. */ Bruce From owner-svn-src-all@freebsd.org Tue Sep 20 06:15:03 2016 Return-Path: Delivered-To: svn-src-all@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 19A29BE1436; Tue, 20 Sep 2016 06:15:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id A1663FF5; Tue, 20 Sep 2016 06:15:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id EECC6D60C24; Tue, 20 Sep 2016 15:46:20 +1000 (AEST) Date: Tue, 20 Sep 2016 15:46:19 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Schouten cc: Bruce Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r305971 - stable/11/lib/msun/src In-Reply-To: Message-ID: <20160920144731.P1129@besplex.bde.org> References: <201609191234.u8JCYTUo052934@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=CoZCCSMD c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=6kdLHU8h-LnCs2dJQkkA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 06:15:03 -0000 On Mon, 19 Sep 2016, Ed Schouten wrote: > 2016-09-19 14:34 GMT+02:00 Bruce Evans : >> +#if (LDBL_MANT_DIG == 53) >> +__weak_reference(fmod, fmodl); >> +#endif > > I've noticed that libm uses __weak_reference() all over the place, but > I guess that in this specific case there is no reason to use them, > right? Wouldn't it make more sense to use strong references here, so > that they are consistent with other architectures? I just copied what das did here. Weak symbols are less portable in theory but more portable in practice: - the ifdefs depend on compiler support for __strong_reference() but not for __weak_reference - there was apparently no compiler support for __strong_reference() in icc, and it is still not defined if __INTEL_COMPILER (so the hundreds of other __INTEL_COMPILER ifdefs are nonsense, since __strong_reference() is now used all over the place) - __weak_reference() was implemented in FreeBSD in 1994 but __strong_reference() was not implemented until 2000 -- it is barely in FreeBSD-4 - however, it is __strong_reference() that requires less toolchain support. I think just asm() with ".globl" and ".equ" or ".set" would work for it. __weak_reference() needs the less portable ".weak" instead of ".globl". The compiler __alias__ attribute used to define __strong_reference() just generates these directives on x86, except clang spells ".equ" worse as "=" (it even rewrites ".equ" in the asm to "=") and also generates ".type", and gcc-4.2.1 generates ".set" instead of ".equ" (it doesn't rewrite the asm). - at least, with ELF. Old versions of FreeBSD including FreeBSD-3 have even uglier ifdefs for this involving AOUT. Apparently, a magic ".stab" was needed instead of ".weak". A magic ".stab" was also used for aliasing. Perhaps ".equ" was not powerful enough, and IIRC it indeed isn't in my aout implementation (IIRC it is not exported). In direct asm, it is not needed for mere aliases for functions since you can just duplicate labels as needed. The strong reference is also technically more correct in theory but less useful in practice. With non-broken (static) linkers, it gives an error if the user tries to replace the library function by his own function. An error is technically correct. But the user should be allowed to do this. Libraries should have only one API per object file, to allow the user to replace one function at a time (and to not bloat the linked executable with unused functions). libm mostly does this. However, for these aliases, it puts the alias in the same file as the main function for convenience. With strong aliases, this would prevent the user from replacing the alias without also replacing the main function. Compiler support for aliases gives mere aliases. It doesn't generate extra code like the kernel ALTENTRY() macros to disambiguate the aliases for -pg. Compilers should optionally also generate such code (or duplicate the function for small functions) for -g and -finstrument- functions (so that you can put a breakpoint in fmodl() without hitting in when you only call fmod() ...). ALTENTRY() and END() are perhaps not careful enough with ".type" and ".size" directives for the not-quite- alias. Compilers don't generate ".size" for the alias. Bruce From owner-svn-src-all@freebsd.org Tue Sep 20 06:53:30 2016 Return-Path: Delivered-To: svn-src-all@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 2CC94BE22FB; Tue, 20 Sep 2016 06:53:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id E7D0A6C9; Tue, 20 Sep 2016 06:53:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 18576D47165; Tue, 20 Sep 2016 16:53:19 +1000 (AEST) Date: Tue, 20 Sep 2016 16:53:19 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Edward Tomasz Napierala cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306012 - head/etc/autofs In-Reply-To: <201609200454.u8K4s0RZ025158@repo.freebsd.org> Message-ID: <20160920164312.W1333@besplex.bde.org> References: <201609200454.u8K4s0RZ025158@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=CoZCCSMD c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=IN0Lh4eCIHCjGjmA9EwA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 06:53:30 -0000 On Tue, 20 Sep 2016, Edward Tomasz Napierala wrote: > Log: > Fix -media to not mount ufs with "async"; it doesn't make sense when > there is softupdates. It does make sense when there isn't soft updates. With soft updates, it is silently ignored. However, I don't like changing the default. async gives less robustness and noatime breaks POSIX conformance. I use async a lot, but rarely for removable backup media except for the first use, and noatime almost always, and type a lot of mount commands, mostly using shell history to retrieve nearly-correct options and then edit just to toggle ro/rw and async/noasync flags. Bruce From owner-svn-src-all@freebsd.org Tue Sep 20 07:23:35 2016 Return-Path: Delivered-To: svn-src-all@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 DC425BE2966; Tue, 20 Sep 2016 07:23:35 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 650E9365; Tue, 20 Sep 2016 07:23:35 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x236.google.com with SMTP id l132so191620497wmf.0; Tue, 20 Sep 2016 00:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=pC9j2JRCRPnHhxd9ypR2rXJI2SmN6LSMJwFBUagAlRo=; b=AJ30ejYC/t0TKefXhTfHuW7Ot1kf0wABvWU8GSMwCEpDYAM/yfVYpFNdxXiMGupW65 klW2nBFvKhwFQEEdTtnV4f741+O/JDaNNBFSo5vOI4VJ+0bu1RhzvQ/NoD6dYmSMlo56 /X/mkxGYiNX1bv45yYVWTE2AZYjiO3/YgseC0sD11bKSgZNoWpJq8m5xtEQOEKlAK0Eq xvSzhPIEX05W8352DIkDoSz/nsCUwgeEy1Nv3yBPPLiVPjsZGMvszFUlBheU+Pguel3q mR0Nd7ezZWtLXWQ4eXrhYbilRz05Sbnj7srVFAgd16jAIbVHx5nBoHOgwa0sEe7XEl3O RHMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=pC9j2JRCRPnHhxd9ypR2rXJI2SmN6LSMJwFBUagAlRo=; b=iDHQYbkg74mBuxDuE40tZN86wk434l9sKW7JYc8uPp5+W8gVM3Xx6/06B0xPODQC// 1U7nkDq7KkYSQWLg8athYnACPnbf541BgmUumYIxFzlBPSPCs+t4whh0XCaFMCUc/ZOU nghE9jYHmsAqDqDRRru3FPkCzNPd64LPX5M7FYLkEPbQMvHYzPQ4FOykwEVb900Vc2d8 4yyRTGP4csN3O6S9Xd3QCdruhEXRsdXecjCfVdh21xmcw4THXg8ntD0VCvINk502cdNF 2Lpm9fvuOgRUtwKcK127fpje8Nsnb4lcpc5PAnjJAus+iR9QWlh34PhE7oOm07RJe4Zx lkUQ== X-Gm-Message-State: AE9vXwM8svr5A129IzxzF6eKp8QkUUwBwCRAsAnoVYgANxfl+Su8Bv+QD2ra1pKNS2jafw== X-Received: by 10.28.216.211 with SMTP id p202mr1731072wmg.85.1474356213881; Tue, 20 Sep 2016 00:23:33 -0700 (PDT) Received: from brick (etn137.neoplus.adsl.tpnet.pl. [83.20.159.137]) by smtp.gmail.com with ESMTPSA id y2sm26834435wji.42.2016.09.20.00.23.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Sep 2016 00:23:33 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 20 Sep 2016 09:23:30 +0200 From: Edward Tomasz Napierala To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306012 - head/etc/autofs Message-ID: <20160920072330.GA13933@brick> Mail-Followup-To: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609200454.u8K4s0RZ025158@repo.freebsd.org> <20160920164312.W1333@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160920164312.W1333@besplex.bde.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 07:23:36 -0000 On 0920T1653, Bruce Evans wrote: > On Tue, 20 Sep 2016, Edward Tomasz Napierala wrote: > > > Log: > > Fix -media to not mount ufs with "async"; it doesn't make sense when > > there is softupdates. > > It does make sense when there isn't soft updates. With soft updates, it > is silently ignored. True. It might be possible to make special_media to check whether softdep is enabled using tunefs(8). > However, I don't like changing the default. async gives less robustness > and noatime breaks POSIX conformance. I liked the previous defaults too, until I've started to use this more often. For things like SD cards, "sync" is just annoyingly slow. > I use async a lot, but rarely for removable backup media except for the > first use, and noatime almost always, and type a lot of mount commands, > mostly using shell history to retrieve nearly-correct options and then > edit just to toggle ro/rw and async/noasync flags. Btw, /etc/autofs is in /etc for a reason - so that the system administrators can tweak it. From owner-svn-src-all@freebsd.org Tue Sep 20 08:38:54 2016 Return-Path: Delivered-To: svn-src-all@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 BA8FDBE0390; Tue, 20 Sep 2016 08:38:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 83106C34; Tue, 20 Sep 2016 08:38:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 0D94F784305; Tue, 20 Sep 2016 18:38:44 +1000 (AEST) Date: Tue, 20 Sep 2016 18:38:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Edward Tomasz Napierala cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306012 - head/etc/autofs In-Reply-To: <20160920072330.GA13933@brick> Message-ID: <20160920173937.Q1624@besplex.bde.org> References: <201609200454.u8K4s0RZ025158@repo.freebsd.org> <20160920164312.W1333@besplex.bde.org> <20160920072330.GA13933@brick> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=CoZCCSMD c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=8eIsXRhzzfekZk-3ZRwA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 08:38:54 -0000 On Tue, 20 Sep 2016, Edward Tomasz Napierala wrote: > On 0920T1653, Bruce Evans wrote: >> On Tue, 20 Sep 2016, Edward Tomasz Napierala wrote: >> >>> Log: >>> Fix -media to not mount ufs with "async"; it doesn't make sense when >>> there is softupdates. >> >> It does make sense when there isn't soft updates. With soft updates, it >> is silently ignored. > > True. It might be possible to make special_media to check whether softdep > is enabled using tunefs(8). But nothing is needed for soft updates, since it silently ignores being misconfigured with async. Not that I like this... >> However, I don't like changing the default. async gives less robustness >> and noatime breaks POSIX conformance. ... I also don't like noatime being silently ignored by file systems that don't support it, e.g., nfs. nfs just gives the noatime policy of the server without telling you what that policy is. > I liked the previous defaults too, until I've started to use this more > often. For things like SD cards, "sync" is just annoyingly slow. "sync" is too slow for everything, but the default is neither async or sync for any of ffs, msdosfs or extfs. The default (without soft updates) works OK only for large files since there are not many metadata updates then. >> I use async a lot, but rarely for removable backup media except for the >> first use, and noatime almost always, and type a lot of mount commands, >> mostly using shell history to retrieve nearly-correct options and then >> edit just to toggle ro/rw and async/noasync flags. > > Btw, /etc/autofs is in /etc for a reason - so that the system administrators > can tweak it. The best tweaks are device-dependent and probably not well known. I don't have much hardware, but find that a USB3 disk drive works almost as well as a SATA drive and doesn't need async hacks, but a USB3 memory drive is almost as slow as USB2 memory drives and DVDs for writing. All of the latter have large write latency and probably large wear in the slow cases, and no file system in FreeBSD (except maybe nandfs) understands this. Clustering stops at 128K, but that is not large enough and only helps for individual files and never helps for metadata. Removable media tends to have dumber controllers that don't compensate for this. Bruce From owner-svn-src-all@freebsd.org Tue Sep 20 08:52:46 2016 Return-Path: Delivered-To: svn-src-all@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 4D416BE0A4B; Tue, 20 Sep 2016 08:52:46 +0000 (UTC) (envelope-from sephe@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 1C6EE790; Tue, 20 Sep 2016 08:52:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K8qjru014966; Tue, 20 Sep 2016 08:52:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K8qjAU014965; Tue, 20 Sep 2016 08:52:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609200852.u8K8qjAU014965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 20 Sep 2016 08:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306015 - head/sys/dev/hyperv/storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 08:52:46 -0000 Author: sephe Date: Tue Sep 20 08:52:45 2016 New Revision: 306015 URL: https://svnweb.freebsd.org/changeset/base/306015 Log: hyperv/storvsc: Fix SRB length setting. This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued us since 10.2-release. Reported by: many MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Tue Sep 20 05:45:18 2016 (r306014) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Tue Sep 20 08:52:45 2016 (r306015) @@ -705,7 +705,8 @@ hv_storvsc_io_request(struct storvsc_sof vstor_packet->flags |= REQUEST_COMPLETION_FLAG; - vstor_packet->u.vm_srb.length = VSTOR_PKT_SIZE; + vstor_packet->u.vm_srb.length = + sizeof(struct vmscsi_req) - vmscsi_size_delta; vstor_packet->u.vm_srb.sense_info_len = sense_buffer_size; From owner-svn-src-all@freebsd.org Tue Sep 20 08:56:25 2016 Return-Path: Delivered-To: svn-src-all@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 E8C33BE0C42; Tue, 20 Sep 2016 08:56:25 +0000 (UTC) (envelope-from wma@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 8821E9CC; Tue, 20 Sep 2016 08:56:25 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K8uOu9015152; Tue, 20 Sep 2016 08:56:24 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K8uOlu015151; Tue, 20 Sep 2016 08:56:24 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201609200856.u8K8uOlu015151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Tue, 20 Sep 2016 08:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306016 - vendor-sys/alpine-hal/dist X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 08:56:26 -0000 Author: wma Date: Tue Sep 20 08:56:24 2016 New Revision: 306016 URL: https://svnweb.freebsd.org/changeset/base/306016 Log: Update Annapurna Alpine HAL alpine-hal SerDes file was omitted in the previous commit. Files added here. Added: vendor-sys/alpine-hal/dist/al_hal_serdes_hssp.c - copied unchanged from r306015, vendor-sys/alpine-hal/dist/al_hal_serdes.c Deleted: vendor-sys/alpine-hal/dist/al_hal_serdes.c Copied: vendor-sys/alpine-hal/dist/al_hal_serdes_hssp.c (from r306015, vendor-sys/alpine-hal/dist/al_hal_serdes.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/alpine-hal/dist/al_hal_serdes_hssp.c Tue Sep 20 08:56:24 2016 (r306016, copy of r306015, vendor-sys/alpine-hal/dist/al_hal_serdes.c) @@ -0,0 +1,3164 @@ +/******************************************************************************* +Copyright (C) 2015 Annapurna Labs Ltd. + +This file may be licensed under the terms of the Annapurna Labs Commercial +License Agreement. + +Alternatively, this file can be distributed under the terms of the GNU General +Public License V2 as published by the Free Software Foundation and can be +found at http://www.gnu.org/licenses/gpl-2.0.html + +Alternatively, redistribution and use in source and binary forms, with or +without modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*******************************************************************************/ + +#include "al_hal_serdes_hssp.h" +#include "al_hal_serdes_hssp_regs.h" +#include "al_hal_serdes_hssp_internal_regs.h" + +#define SRDS_CORE_REG_ADDR(page, type, offset)\ + (((page) << 13) | ((type) << 12) | (offset)) + +/* Link Training configuration */ +#define AL_SERDES_TX_DEEMPH_SUM_MAX 0x1b + +/* c configurations */ +#define AL_SERDES_TX_DEEMPH_C_ZERO_MAX_VAL 0x1b +#define AL_SERDES_TX_DEEMPH_C_ZERO_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_ZERO_PRESET AL_SERDES_TX_DEEMPH_C_ZERO_MAX_VAL + +/* c(+1) configurations */ +#define AL_SERDES_TX_DEEMPH_C_PLUS_MAX_VAL 0x9 +#define AL_SERDES_TX_DEEMPH_C_PLUS_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_PLUS_PRESET AL_SERDES_TX_DEEMPH_C_PLUS_MIN_VAL + +/* c(-1) configurations */ +#define AL_SERDES_TX_DEEMPH_C_MINUS_MAX_VAL 0x6 +#define AL_SERDES_TX_DEEMPH_C_MINUS_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_MINUS_PRESET AL_SERDES_TX_DEEMPH_C_MINUS_MIN_VAL + +/* Rx equal total delay = MDELAY * TRIES */ +#define AL_SERDES_RX_EQUAL_MDELAY 10 +#define AL_SERDES_RX_EQUAL_TRIES 50 + +/* Rx eye calculation delay = MDELAY * TRIES */ +#define AL_SERDES_RX_EYE_CAL_MDELAY 50 +#define AL_SERDES_RX_EYE_CAL_TRIES 70 + +#if (!defined(AL_SERDES_BASIC_SERVICES_ONLY)) || (AL_SERDES_BASIC_SERVICES_ONLY == 0) +#define AL_SRDS_ADV_SRVC(func) func +#else +static void al_serdes_hssp_stub_func(void) +{ + al_err("%s: not implemented service called!\n", __func__); +} + +#define AL_SRDS_ADV_SRVC(func) ((typeof(func) *)al_serdes_hssp_stub_func) +#endif + +/** + * SERDES core reg read + */ +static inline uint8_t al_serdes_grp_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset); + +/** + * SERDES core reg write + */ +static inline void al_serdes_grp_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data); + +/** + * SERDES core masked reg write + */ +static inline void al_serdes_grp_reg_masked_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t mask, + uint8_t data); + +/** + * Lane Rx rate change software flow disable + */ +static void _al_serdes_lane_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane); + +/** + * Group Rx rate change software flow enable if all conditions met + */ +static void al_serdes_group_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj); + +/** + * Lane Rx rate change software flow enable if all conditions met + */ +static void _al_serdes_lane_rx_rate_change_sw_flow_en_cond( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane); + +/** + * Group Rx rate change software flow enable if all conditions met + */ +static void al_serdes_group_rx_rate_change_sw_flow_en_cond( + struct al_serdes_grp_obj *obj); + +/******************************************************************************/ +/******************************************************************************/ +static enum al_serdes_type al_serdes_hssp_type_get(void) +{ + return AL_SRDS_TYPE_HSSP; +} + +/******************************************************************************/ +/******************************************************************************/ +static int al_serdes_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t *data) +{ + int status = 0; + + al_dbg( + "%s(%p, %d, %d, %u)\n", + __func__, + obj, + page, + type, + offset); + + al_assert(obj); + al_assert(data); + al_assert(((int)page) >= AL_SRDS_REG_PAGE_0_LANE_0); + al_assert(((int)page) <= AL_SRDS_REG_PAGE_4_COMMON); + al_assert(((int)type) >= AL_SRDS_REG_TYPE_PMA); + al_assert(((int)type) <= AL_SRDS_REG_TYPE_PCS); + + *data = al_serdes_grp_reg_read( + obj, + page, + type, + offset); + + al_dbg( + "%s: return(%u)\n", + __func__, + *data); + + return status; +} + +/******************************************************************************/ +/******************************************************************************/ +static int al_serdes_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data) +{ + int status = 0; + + al_dbg( + "%s(%p, %d, %d, %u, %u)\n", + __func__, + obj, + page, + type, + offset, + data); + + al_assert(obj); + al_assert(((int)page) >= AL_SRDS_REG_PAGE_0_LANE_0); + al_assert(((int)page) <= AL_SRDS_REG_PAGE_0123_LANES_0123); + al_assert(((int)type) >= AL_SRDS_REG_TYPE_PMA); + al_assert(((int)type) <= AL_SRDS_REG_TYPE_PCS); + + al_serdes_grp_reg_write( + obj, + page, + type, + offset, + data); + + return status; +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_PCSRX_DATAWIDTH_REG_NUM != SERDES_IREG_FLD_PCSTX_DATAWIDTH_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM != SERDES_IREG_FLD_PCSTX_DIVRATE_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCS_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCSBIST_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_LB_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRX_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRXBIST_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRXEQ_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSTX_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +static void al_serdes_bist_overrides_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_rate rate) +{ + int i; + + uint8_t rx_rate_val; + uint8_t tx_rate_val; + + switch (rate) { + case AL_SRDS_RATE_1_8: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_8; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_8; + break; + case AL_SRDS_RATE_1_4: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_4; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_4; + break; + case AL_SRDS_RATE_1_2: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_2; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_2; + break; + case AL_SRDS_RATE_FULL: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_1; + break; + default: + al_err("%s: invalid rate (%d)\n", __func__, rate); + al_assert(0); + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_1; + } + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_REG_NUM, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_MASK | + SERDES_IREG_FLD_PCSTX_DATAWIDTH_MASK, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_VAL_20 | + SERDES_IREG_FLD_PCSTX_DATAWIDTH_VAL_20); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM, + SERDES_IREG_FLD_PCSRX_DIVRATE_MASK | + SERDES_IREG_FLD_PCSTX_DIVRATE_MASK, + rx_rate_val | tx_rate_val); + } + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN | + SERDES_IREG_FLD_CMNPCS_LOCWREN | + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN | + SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN | + SERDES_IREG_FLD_CMNPCS_LOCWREN | + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN | + SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCS_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCS_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCS_TXENABLE_REG_NUM, + SERDES_IREG_FLD_CMNPCS_TXENABLE, + SERDES_IREG_FLD_CMNPCS_TXENABLE); + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN | + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRX_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN | + SERDES_IREG_FLD_PCSRXEQ_LOCWREN | + SERDES_IREG_FLD_PCSTX_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TX_DRV_OVERRIDE_EN_REG_NUM, + SERDES_IREG_FLD_TX_DRV_OVERRIDE_EN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXLOCK2REF_OVREN_REG_NUM, + SERDES_IREG_FLD_RXLOCK2REF_OVREN, + SERDES_IREG_FLD_RXLOCK2REF_OVREN); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_overrides_disable( + struct al_serdes_grp_obj *obj) +{ + int i; + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN, + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN); + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM, + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN, + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_rx_rate_change( + struct al_serdes_grp_obj *obj, + enum al_serdes_rate rate) +{ + int i; + + uint8_t rx_rate_val; + + switch (rate) { + case AL_SRDS_RATE_1_8: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_8; + break; + case AL_SRDS_RATE_1_4: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_4; + break; + case AL_SRDS_RATE_1_2: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_2; + break; + case AL_SRDS_RATE_FULL: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + break; + default: + al_err("%s: invalid rate (%d)\n", __func__, rate); + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + break; + } + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM, + SERDES_IREG_FLD_PCSRX_DIVRATE_MASK, + rx_rate_val); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_group_pm_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_pm pm) +{ + uint8_t pm_val; + + switch (pm) { + case AL_SRDS_PM_PD: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_PD; + break; + case AL_SRDS_PM_P2: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P2; + break; + case AL_SRDS_PM_P1: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P1; + break; + case AL_SRDS_PM_P0S: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0S; + break; + case AL_SRDS_PM_P0: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0; + break; + default: + al_err("%s: invalid power mode (%d)\n", __func__, pm); + al_assert(0); + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0; + } + + if (pm == AL_SRDS_PM_PD) + al_serdes_group_rx_rate_change_sw_flow_dis(obj); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_MASK, + pm_val); + + if (pm != AL_SRDS_PM_PD) + al_serdes_group_rx_rate_change_sw_flow_en_cond(obj); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_rx_rate_change_sw_flow_en( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 201, 0xfc); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 202, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 203, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 204, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0x7f); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0xff); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0x7f); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pcie_rate_override_enable_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool en) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA_REG_NUM, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA, + en ? SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static al_bool al_serdes_lane_pcie_rate_override_is_enabled( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + return (al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA_REG_NUM) & + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA) ? AL_TRUE : AL_FALSE; +} + +/******************************************************************************/ +/******************************************************************************/ +static enum al_serdes_pcie_rate al_serdes_lane_pcie_rate_get( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + return (al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_REG_NUM) & + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_MASK) >> + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_SHIFT; +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pcie_rate_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_pcie_rate rate) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_REG_NUM, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_MASK, + rate << SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_SHIFT); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pm_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_pm rx_pm, + enum al_serdes_pm tx_pm) +{ + uint8_t rx_pm_val; + uint8_t tx_pm_val; + + switch (rx_pm) { + case AL_SRDS_PM_PD: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_PD; + break; + case AL_SRDS_PM_P2: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P2; + break; + case AL_SRDS_PM_P1: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P1; + break; + case AL_SRDS_PM_P0S: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0S; + break; + case AL_SRDS_PM_P0: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0; + break; + default: + al_err("%s: invalid rx power mode (%d)\n", __func__, rx_pm); + al_assert(0); + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0; + } + + switch (tx_pm) { + case AL_SRDS_PM_PD: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_PD; + break; + case AL_SRDS_PM_P2: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P2; + break; + case AL_SRDS_PM_P1: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P1; + break; + case AL_SRDS_PM_P0S: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0S; + break; + case AL_SRDS_PM_P0: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0; + break; + default: + al_err("%s: invalid tx power mode (%d)\n", __func__, tx_pm); + al_assert(0); + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0; + } + + if (rx_pm == AL_SRDS_PM_PD) + _al_serdes_lane_rx_rate_change_sw_flow_dis(obj, lane); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_RX_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_RX_MASK, + rx_pm_val); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_TX_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_TX_MASK, + tx_pm_val); + + if (rx_pm != AL_SRDS_PM_PD) + _al_serdes_lane_rx_rate_change_sw_flow_en_cond(obj, lane); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_pma_hard_reset_group( + struct al_serdes_grp_obj *obj, + al_bool enable) +{ + if (enable) + al_serdes_group_rx_rate_change_sw_flow_dis(obj); + + /* Enable Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_MASK, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_VAL_REGS); + + /* Assert/Deassert Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_MASK, + enable ? + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_VAL_ASSERT : + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_VAL_DEASSERT); + + if (!enable) + al_serdes_group_rx_rate_change_sw_flow_en_cond(obj); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_pma_hard_reset_lane( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + if (enable) + _al_serdes_lane_rx_rate_change_sw_flow_dis(obj, lane); + + /* Enable Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_MASK, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_VAL_REGS); + + /* Assert/Deassert Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_MASK, + enable ? + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_VAL_ASSERT : + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_VAL_DEASSERT); + + if (!enable) + _al_serdes_lane_rx_rate_change_sw_flow_en_cond(obj, lane); +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_CDRCLK2TXEN_REG_NUM) +#error Wrong assumption +#endif + +static void al_serdes_loopback_control( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_lb_mode mode) +{ + uint8_t val = 0; + + switch (mode) { + case AL_SRDS_LB_MODE_OFF: + break; + case AL_SRDS_LB_MODE_PMA_IO_UN_TIMED_RX_TO_TX: + val = SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_INTERNALLY_BUFFERED_SERIAL_TX_TO_RX: + val = SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_SERIAL_TX_IO_TO_RX_IO: + val = SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_PARALLEL_RX_TO_TX: + val = SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN | + SERDES_IREG_FLD_LB_CDRCLK2TXEN; + break; + default: + al_err("%s: invalid mode (%d)\n", __func__, mode); + al_assert(0); + } + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN_REG_NUM, + SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN | + SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN | + SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN | + SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN | + SERDES_IREG_FLD_LB_CDRCLK2TXEN, + val); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_pattern_select( + struct al_serdes_grp_obj *obj, + enum al_serdes_bist_pattern pattern, + uint8_t *user_data) +{ + uint8_t val = 0; + + switch (pattern) { + case AL_SRDS_BIST_PATTERN_USER: + al_assert(user_data); + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_USER; + break; + case AL_SRDS_BIST_PATTERN_PRBS7: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS7; + break; + case AL_SRDS_BIST_PATTERN_PRBS23: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS23; + break; + case AL_SRDS_BIST_PATTERN_PRBS31: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS31; + break; + case AL_SRDS_BIST_PATTERN_CLK1010: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_CLK1010; + break; + default: + al_err("%s: invalid pattern (%d)\n", __func__, pattern); + al_assert(0); + } + + if (pattern == AL_SRDS_BIST_PATTERN_USER) { + int i; + + for (i = 0; i < SERDES_IREG_FLD_TX_BIST_PAT_NUM_BYTES; i++) + al_serdes_grp_reg_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TX_BIST_PAT_REG_NUM(i), + user_data[i]); + } + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCSBIST_MODESEL_REG_NUM, + SERDES_IREG_FLD_CMNPCSBIST_MODESEL_MASK, + val); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_tx_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_EN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_EN, + enable ? SERDES_IREG_FLD_PCSTXBIST_EN : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_tx_err_inject( + struct al_serdes_grp_obj *obj) +{ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TXBIST_BITERROR_EN_REG_NUM, + SERDES_IREG_FLD_TXBIST_BITERROR_EN, + SERDES_IREG_FLD_TXBIST_BITERROR_EN); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TXBIST_BITERROR_EN_REG_NUM, + SERDES_IREG_FLD_TXBIST_BITERROR_EN, + 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_rx_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRXBIST_EN_REG_NUM, + SERDES_IREG_FLD_PCSRXBIST_EN, + enable ? SERDES_IREG_FLD_PCSRXBIST_EN : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_RXBIST_ERRCOUNT_OVERFLOW_REG_NUM !=\ + SERDES_IREG_FLD_RXBIST_RXLOCKED_REG_NUM) +#error Wrong assumption +#endif + +static void al_serdes_bist_rx_status( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool *is_locked, + al_bool *err_cnt_overflow, + uint32_t *err_cnt) +{ + uint8_t status_reg_val; + uint16_t err_cnt_msb_reg_val; + uint16_t err_cnt_lsb_reg_val; + + status_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_RXLOCKED_REG_NUM); + + err_cnt_msb_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_ERRCOUNT_MSB_REG_NUM); + + err_cnt_lsb_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_ERRCOUNT_LSB_REG_NUM); + + *is_locked = + (status_reg_val & SERDES_IREG_FLD_RXBIST_RXLOCKED) ? + AL_TRUE : AL_FALSE; + + *err_cnt_overflow = + (status_reg_val & SERDES_IREG_FLD_RXBIST_ERRCOUNT_OVERFLOW) ? + AL_TRUE : AL_FALSE; + + *err_cnt = (err_cnt_msb_reg_val << 8) + err_cnt_lsb_reg_val; +} + +/******************************************************************************/ +/******************************************************************************/ +static inline uint8_t al_serdes_grp_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset) +{ + struct al_serdes_regs __iomem *regs_base = obj->regs_base; + + al_reg_write32( + ®s_base->gen.reg_addr, + SRDS_CORE_REG_ADDR(page, type, offset)); + + return al_reg_read32(®s_base->gen.reg_data); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_grp_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data) +{ + struct al_serdes_regs __iomem *regs_base = obj->regs_base; + + al_reg_write32( + ®s_base->gen.reg_addr, + SRDS_CORE_REG_ADDR(page, type, offset)); + + al_reg_write32(®s_base->gen.reg_data, data); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_ns_delay(int cnt) +{ + al_udelay((cnt + 999) / 1000); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_grp_reg_masked_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t mask, + uint8_t data) +{ + uint8_t val; + enum al_serdes_reg_page start_page = page; + enum al_serdes_reg_page end_page = page; + enum al_serdes_reg_page iter_page; + + if (page == AL_SRDS_REG_PAGE_0123_LANES_0123) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Sep 20 08:56:51 2016 Return-Path: Delivered-To: svn-src-all@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 C25A7BE0CBB; Tue, 20 Sep 2016 08:56:51 +0000 (UTC) (envelope-from wma@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 6147FB36; Tue, 20 Sep 2016 08:56:51 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K8uoU2015216; Tue, 20 Sep 2016 08:56:50 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K8uosX015215; Tue, 20 Sep 2016 08:56:50 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201609200856.u8K8uosX015215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Tue, 20 Sep 2016 08:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306017 - vendor-sys/alpine-hal/2.7a X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 08:56:51 -0000 Author: wma Date: Tue Sep 20 08:56:50 2016 New Revision: 306017 URL: https://svnweb.freebsd.org/changeset/base/306017 Log: Update Annapurna Alpine HAL alpine-hal SerDes file was omitted in the previous commit. Files added here. Added: vendor-sys/alpine-hal/2.7a/al_hal_serdes_hssp.c - copied unchanged from r306016, vendor-sys/alpine-hal/2.7a/al_hal_serdes.c Deleted: vendor-sys/alpine-hal/2.7a/al_hal_serdes.c Copied: vendor-sys/alpine-hal/2.7a/al_hal_serdes_hssp.c (from r306016, vendor-sys/alpine-hal/2.7a/al_hal_serdes.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/alpine-hal/2.7a/al_hal_serdes_hssp.c Tue Sep 20 08:56:50 2016 (r306017, copy of r306016, vendor-sys/alpine-hal/2.7a/al_hal_serdes.c) @@ -0,0 +1,3164 @@ +/******************************************************************************* +Copyright (C) 2015 Annapurna Labs Ltd. + +This file may be licensed under the terms of the Annapurna Labs Commercial +License Agreement. + +Alternatively, this file can be distributed under the terms of the GNU General +Public License V2 as published by the Free Software Foundation and can be +found at http://www.gnu.org/licenses/gpl-2.0.html + +Alternatively, redistribution and use in source and binary forms, with or +without modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*******************************************************************************/ + +#include "al_hal_serdes_hssp.h" +#include "al_hal_serdes_hssp_regs.h" +#include "al_hal_serdes_hssp_internal_regs.h" + +#define SRDS_CORE_REG_ADDR(page, type, offset)\ + (((page) << 13) | ((type) << 12) | (offset)) + +/* Link Training configuration */ +#define AL_SERDES_TX_DEEMPH_SUM_MAX 0x1b + +/* c configurations */ +#define AL_SERDES_TX_DEEMPH_C_ZERO_MAX_VAL 0x1b +#define AL_SERDES_TX_DEEMPH_C_ZERO_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_ZERO_PRESET AL_SERDES_TX_DEEMPH_C_ZERO_MAX_VAL + +/* c(+1) configurations */ +#define AL_SERDES_TX_DEEMPH_C_PLUS_MAX_VAL 0x9 +#define AL_SERDES_TX_DEEMPH_C_PLUS_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_PLUS_PRESET AL_SERDES_TX_DEEMPH_C_PLUS_MIN_VAL + +/* c(-1) configurations */ +#define AL_SERDES_TX_DEEMPH_C_MINUS_MAX_VAL 0x6 +#define AL_SERDES_TX_DEEMPH_C_MINUS_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_MINUS_PRESET AL_SERDES_TX_DEEMPH_C_MINUS_MIN_VAL + +/* Rx equal total delay = MDELAY * TRIES */ +#define AL_SERDES_RX_EQUAL_MDELAY 10 +#define AL_SERDES_RX_EQUAL_TRIES 50 + +/* Rx eye calculation delay = MDELAY * TRIES */ +#define AL_SERDES_RX_EYE_CAL_MDELAY 50 +#define AL_SERDES_RX_EYE_CAL_TRIES 70 + +#if (!defined(AL_SERDES_BASIC_SERVICES_ONLY)) || (AL_SERDES_BASIC_SERVICES_ONLY == 0) +#define AL_SRDS_ADV_SRVC(func) func +#else +static void al_serdes_hssp_stub_func(void) +{ + al_err("%s: not implemented service called!\n", __func__); +} + +#define AL_SRDS_ADV_SRVC(func) ((typeof(func) *)al_serdes_hssp_stub_func) +#endif + +/** + * SERDES core reg read + */ +static inline uint8_t al_serdes_grp_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset); + +/** + * SERDES core reg write + */ +static inline void al_serdes_grp_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data); + +/** + * SERDES core masked reg write + */ +static inline void al_serdes_grp_reg_masked_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t mask, + uint8_t data); + +/** + * Lane Rx rate change software flow disable + */ +static void _al_serdes_lane_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane); + +/** + * Group Rx rate change software flow enable if all conditions met + */ +static void al_serdes_group_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj); + +/** + * Lane Rx rate change software flow enable if all conditions met + */ +static void _al_serdes_lane_rx_rate_change_sw_flow_en_cond( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane); + +/** + * Group Rx rate change software flow enable if all conditions met + */ +static void al_serdes_group_rx_rate_change_sw_flow_en_cond( + struct al_serdes_grp_obj *obj); + +/******************************************************************************/ +/******************************************************************************/ +static enum al_serdes_type al_serdes_hssp_type_get(void) +{ + return AL_SRDS_TYPE_HSSP; +} + +/******************************************************************************/ +/******************************************************************************/ +static int al_serdes_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t *data) +{ + int status = 0; + + al_dbg( + "%s(%p, %d, %d, %u)\n", + __func__, + obj, + page, + type, + offset); + + al_assert(obj); + al_assert(data); + al_assert(((int)page) >= AL_SRDS_REG_PAGE_0_LANE_0); + al_assert(((int)page) <= AL_SRDS_REG_PAGE_4_COMMON); + al_assert(((int)type) >= AL_SRDS_REG_TYPE_PMA); + al_assert(((int)type) <= AL_SRDS_REG_TYPE_PCS); + + *data = al_serdes_grp_reg_read( + obj, + page, + type, + offset); + + al_dbg( + "%s: return(%u)\n", + __func__, + *data); + + return status; +} + +/******************************************************************************/ +/******************************************************************************/ +static int al_serdes_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data) +{ + int status = 0; + + al_dbg( + "%s(%p, %d, %d, %u, %u)\n", + __func__, + obj, + page, + type, + offset, + data); + + al_assert(obj); + al_assert(((int)page) >= AL_SRDS_REG_PAGE_0_LANE_0); + al_assert(((int)page) <= AL_SRDS_REG_PAGE_0123_LANES_0123); + al_assert(((int)type) >= AL_SRDS_REG_TYPE_PMA); + al_assert(((int)type) <= AL_SRDS_REG_TYPE_PCS); + + al_serdes_grp_reg_write( + obj, + page, + type, + offset, + data); + + return status; +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_PCSRX_DATAWIDTH_REG_NUM != SERDES_IREG_FLD_PCSTX_DATAWIDTH_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM != SERDES_IREG_FLD_PCSTX_DIVRATE_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCS_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCSBIST_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_LB_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRX_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRXBIST_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRXEQ_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSTX_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +static void al_serdes_bist_overrides_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_rate rate) +{ + int i; + + uint8_t rx_rate_val; + uint8_t tx_rate_val; + + switch (rate) { + case AL_SRDS_RATE_1_8: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_8; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_8; + break; + case AL_SRDS_RATE_1_4: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_4; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_4; + break; + case AL_SRDS_RATE_1_2: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_2; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_2; + break; + case AL_SRDS_RATE_FULL: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_1; + break; + default: + al_err("%s: invalid rate (%d)\n", __func__, rate); + al_assert(0); + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_1; + } + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_REG_NUM, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_MASK | + SERDES_IREG_FLD_PCSTX_DATAWIDTH_MASK, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_VAL_20 | + SERDES_IREG_FLD_PCSTX_DATAWIDTH_VAL_20); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM, + SERDES_IREG_FLD_PCSRX_DIVRATE_MASK | + SERDES_IREG_FLD_PCSTX_DIVRATE_MASK, + rx_rate_val | tx_rate_val); + } + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN | + SERDES_IREG_FLD_CMNPCS_LOCWREN | + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN | + SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN | + SERDES_IREG_FLD_CMNPCS_LOCWREN | + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN | + SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCS_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCS_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCS_TXENABLE_REG_NUM, + SERDES_IREG_FLD_CMNPCS_TXENABLE, + SERDES_IREG_FLD_CMNPCS_TXENABLE); + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN | + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRX_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN | + SERDES_IREG_FLD_PCSRXEQ_LOCWREN | + SERDES_IREG_FLD_PCSTX_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TX_DRV_OVERRIDE_EN_REG_NUM, + SERDES_IREG_FLD_TX_DRV_OVERRIDE_EN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXLOCK2REF_OVREN_REG_NUM, + SERDES_IREG_FLD_RXLOCK2REF_OVREN, + SERDES_IREG_FLD_RXLOCK2REF_OVREN); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_overrides_disable( + struct al_serdes_grp_obj *obj) +{ + int i; + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN, + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN); + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM, + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN, + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_rx_rate_change( + struct al_serdes_grp_obj *obj, + enum al_serdes_rate rate) +{ + int i; + + uint8_t rx_rate_val; + + switch (rate) { + case AL_SRDS_RATE_1_8: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_8; + break; + case AL_SRDS_RATE_1_4: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_4; + break; + case AL_SRDS_RATE_1_2: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_2; + break; + case AL_SRDS_RATE_FULL: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + break; + default: + al_err("%s: invalid rate (%d)\n", __func__, rate); + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + break; + } + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM, + SERDES_IREG_FLD_PCSRX_DIVRATE_MASK, + rx_rate_val); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_group_pm_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_pm pm) +{ + uint8_t pm_val; + + switch (pm) { + case AL_SRDS_PM_PD: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_PD; + break; + case AL_SRDS_PM_P2: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P2; + break; + case AL_SRDS_PM_P1: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P1; + break; + case AL_SRDS_PM_P0S: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0S; + break; + case AL_SRDS_PM_P0: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0; + break; + default: + al_err("%s: invalid power mode (%d)\n", __func__, pm); + al_assert(0); + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0; + } + + if (pm == AL_SRDS_PM_PD) + al_serdes_group_rx_rate_change_sw_flow_dis(obj); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_MASK, + pm_val); + + if (pm != AL_SRDS_PM_PD) + al_serdes_group_rx_rate_change_sw_flow_en_cond(obj); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_rx_rate_change_sw_flow_en( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 201, 0xfc); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 202, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 203, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 204, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0x7f); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0xff); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0x7f); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pcie_rate_override_enable_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool en) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA_REG_NUM, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA, + en ? SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static al_bool al_serdes_lane_pcie_rate_override_is_enabled( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + return (al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA_REG_NUM) & + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA) ? AL_TRUE : AL_FALSE; +} + +/******************************************************************************/ +/******************************************************************************/ +static enum al_serdes_pcie_rate al_serdes_lane_pcie_rate_get( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + return (al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_REG_NUM) & + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_MASK) >> + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_SHIFT; +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pcie_rate_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_pcie_rate rate) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_REG_NUM, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_MASK, + rate << SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_SHIFT); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pm_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_pm rx_pm, + enum al_serdes_pm tx_pm) +{ + uint8_t rx_pm_val; + uint8_t tx_pm_val; + + switch (rx_pm) { + case AL_SRDS_PM_PD: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_PD; + break; + case AL_SRDS_PM_P2: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P2; + break; + case AL_SRDS_PM_P1: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P1; + break; + case AL_SRDS_PM_P0S: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0S; + break; + case AL_SRDS_PM_P0: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0; + break; + default: + al_err("%s: invalid rx power mode (%d)\n", __func__, rx_pm); + al_assert(0); + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0; + } + + switch (tx_pm) { + case AL_SRDS_PM_PD: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_PD; + break; + case AL_SRDS_PM_P2: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P2; + break; + case AL_SRDS_PM_P1: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P1; + break; + case AL_SRDS_PM_P0S: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0S; + break; + case AL_SRDS_PM_P0: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0; + break; + default: + al_err("%s: invalid tx power mode (%d)\n", __func__, tx_pm); + al_assert(0); + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0; + } + + if (rx_pm == AL_SRDS_PM_PD) + _al_serdes_lane_rx_rate_change_sw_flow_dis(obj, lane); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_RX_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_RX_MASK, + rx_pm_val); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_TX_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_TX_MASK, + tx_pm_val); + + if (rx_pm != AL_SRDS_PM_PD) + _al_serdes_lane_rx_rate_change_sw_flow_en_cond(obj, lane); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_pma_hard_reset_group( + struct al_serdes_grp_obj *obj, + al_bool enable) +{ + if (enable) + al_serdes_group_rx_rate_change_sw_flow_dis(obj); + + /* Enable Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_MASK, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_VAL_REGS); + + /* Assert/Deassert Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_MASK, + enable ? + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_VAL_ASSERT : + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_VAL_DEASSERT); + + if (!enable) + al_serdes_group_rx_rate_change_sw_flow_en_cond(obj); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_pma_hard_reset_lane( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + if (enable) + _al_serdes_lane_rx_rate_change_sw_flow_dis(obj, lane); + + /* Enable Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_MASK, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_VAL_REGS); + + /* Assert/Deassert Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_MASK, + enable ? + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_VAL_ASSERT : + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_VAL_DEASSERT); + + if (!enable) + _al_serdes_lane_rx_rate_change_sw_flow_en_cond(obj, lane); +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_CDRCLK2TXEN_REG_NUM) +#error Wrong assumption +#endif + +static void al_serdes_loopback_control( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_lb_mode mode) +{ + uint8_t val = 0; + + switch (mode) { + case AL_SRDS_LB_MODE_OFF: + break; + case AL_SRDS_LB_MODE_PMA_IO_UN_TIMED_RX_TO_TX: + val = SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_INTERNALLY_BUFFERED_SERIAL_TX_TO_RX: + val = SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_SERIAL_TX_IO_TO_RX_IO: + val = SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_PARALLEL_RX_TO_TX: + val = SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN | + SERDES_IREG_FLD_LB_CDRCLK2TXEN; + break; + default: + al_err("%s: invalid mode (%d)\n", __func__, mode); + al_assert(0); + } + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN_REG_NUM, + SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN | + SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN | + SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN | + SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN | + SERDES_IREG_FLD_LB_CDRCLK2TXEN, + val); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_pattern_select( + struct al_serdes_grp_obj *obj, + enum al_serdes_bist_pattern pattern, + uint8_t *user_data) +{ + uint8_t val = 0; + + switch (pattern) { + case AL_SRDS_BIST_PATTERN_USER: + al_assert(user_data); + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_USER; + break; + case AL_SRDS_BIST_PATTERN_PRBS7: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS7; + break; + case AL_SRDS_BIST_PATTERN_PRBS23: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS23; + break; + case AL_SRDS_BIST_PATTERN_PRBS31: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS31; + break; + case AL_SRDS_BIST_PATTERN_CLK1010: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_CLK1010; + break; + default: + al_err("%s: invalid pattern (%d)\n", __func__, pattern); + al_assert(0); + } + + if (pattern == AL_SRDS_BIST_PATTERN_USER) { + int i; + + for (i = 0; i < SERDES_IREG_FLD_TX_BIST_PAT_NUM_BYTES; i++) + al_serdes_grp_reg_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TX_BIST_PAT_REG_NUM(i), + user_data[i]); + } + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCSBIST_MODESEL_REG_NUM, + SERDES_IREG_FLD_CMNPCSBIST_MODESEL_MASK, + val); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_tx_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_EN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_EN, + enable ? SERDES_IREG_FLD_PCSTXBIST_EN : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_tx_err_inject( + struct al_serdes_grp_obj *obj) +{ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TXBIST_BITERROR_EN_REG_NUM, + SERDES_IREG_FLD_TXBIST_BITERROR_EN, + SERDES_IREG_FLD_TXBIST_BITERROR_EN); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TXBIST_BITERROR_EN_REG_NUM, + SERDES_IREG_FLD_TXBIST_BITERROR_EN, + 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_rx_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRXBIST_EN_REG_NUM, + SERDES_IREG_FLD_PCSRXBIST_EN, + enable ? SERDES_IREG_FLD_PCSRXBIST_EN : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_RXBIST_ERRCOUNT_OVERFLOW_REG_NUM !=\ + SERDES_IREG_FLD_RXBIST_RXLOCKED_REG_NUM) +#error Wrong assumption +#endif + +static void al_serdes_bist_rx_status( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool *is_locked, + al_bool *err_cnt_overflow, + uint32_t *err_cnt) +{ + uint8_t status_reg_val; + uint16_t err_cnt_msb_reg_val; + uint16_t err_cnt_lsb_reg_val; + + status_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_RXLOCKED_REG_NUM); + + err_cnt_msb_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_ERRCOUNT_MSB_REG_NUM); + + err_cnt_lsb_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_ERRCOUNT_LSB_REG_NUM); + + *is_locked = + (status_reg_val & SERDES_IREG_FLD_RXBIST_RXLOCKED) ? + AL_TRUE : AL_FALSE; + + *err_cnt_overflow = + (status_reg_val & SERDES_IREG_FLD_RXBIST_ERRCOUNT_OVERFLOW) ? + AL_TRUE : AL_FALSE; + + *err_cnt = (err_cnt_msb_reg_val << 8) + err_cnt_lsb_reg_val; +} + +/******************************************************************************/ +/******************************************************************************/ +static inline uint8_t al_serdes_grp_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset) +{ + struct al_serdes_regs __iomem *regs_base = obj->regs_base; + + al_reg_write32( + ®s_base->gen.reg_addr, + SRDS_CORE_REG_ADDR(page, type, offset)); + + return al_reg_read32(®s_base->gen.reg_data); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_grp_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data) +{ + struct al_serdes_regs __iomem *regs_base = obj->regs_base; + + al_reg_write32( + ®s_base->gen.reg_addr, + SRDS_CORE_REG_ADDR(page, type, offset)); + + al_reg_write32(®s_base->gen.reg_data, data); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_ns_delay(int cnt) +{ + al_udelay((cnt + 999) / 1000); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_grp_reg_masked_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t mask, + uint8_t data) +{ + uint8_t val; + enum al_serdes_reg_page start_page = page; + enum al_serdes_reg_page end_page = page; + enum al_serdes_reg_page iter_page; + + if (page == AL_SRDS_REG_PAGE_0123_LANES_0123) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Sep 20 09:18:34 2016 Return-Path: Delivered-To: svn-src-all@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 9BB05BE28B5; Tue, 20 Sep 2016 09:18:34 +0000 (UTC) (envelope-from trasz@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 511D8E6B; Tue, 20 Sep 2016 09:18:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K9IXu6023247; Tue, 20 Sep 2016 09:18:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K9IXOZ023246; Tue, 20 Sep 2016 09:18:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609200918.u8K9IXOZ023246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Sep 2016 09:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306018 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 09:18:34 -0000 Author: trasz Date: Tue Sep 20 09:18:33 2016 New Revision: 306018 URL: https://svnweb.freebsd.org/changeset/base/306018 Log: Follow up r305988 by removing g_bio_run_task and related code. The g_io_schedule_up() gets its "if" condition swapped to make it more similar to g_io_schedule_down(). Suggested by: mav@ Reviewed by: mav@ MFC after: 1 month Modified: head/sys/geom/geom_io.c Modified: head/sys/geom/geom_io.c ============================================================================== --- head/sys/geom/geom_io.c Tue Sep 20 08:56:50 2016 (r306017) +++ head/sys/geom/geom_io.c Tue Sep 20 09:18:33 2016 (r306018) @@ -69,7 +69,6 @@ static int g_io_transient_map_bio(struct static struct g_bioq g_bio_run_down; static struct g_bioq g_bio_run_up; -static struct g_bioq g_bio_run_task; /* * Pace is a hint that we've had some trouble recently allocating @@ -280,7 +279,6 @@ g_io_init() g_bioq_init(&g_bio_run_down); g_bioq_init(&g_bio_run_up); - g_bioq_init(&g_bio_run_task); biozone = uma_zcreate("g_bio", sizeof (struct bio), NULL, NULL, NULL, NULL, @@ -887,31 +885,23 @@ void g_io_schedule_up(struct thread *tp __unused) { struct bio *bp; + for(;;) { g_bioq_lock(&g_bio_run_up); - bp = g_bioq_first(&g_bio_run_task); - if (bp != NULL) { - g_bioq_unlock(&g_bio_run_up); - THREAD_NO_SLEEPING(); - CTR1(KTR_GEOM, "g_up processing task bp %p", bp); - bp->bio_task(bp->bio_task_arg); - THREAD_SLEEPING_OK(); - continue; - } bp = g_bioq_first(&g_bio_run_up); - if (bp != NULL) { - g_bioq_unlock(&g_bio_run_up); - THREAD_NO_SLEEPING(); - CTR4(KTR_GEOM, "g_up biodone bp %p provider %s off " - "%jd len %ld", bp, bp->bio_to->name, - bp->bio_offset, bp->bio_length); - biodone(bp); - THREAD_SLEEPING_OK(); + if (bp == NULL) { + CTR0(KTR_GEOM, "g_up going to sleep"); + msleep(&g_wait_up, &g_bio_run_up.bio_queue_lock, + PRIBIO | PDROP, "-", 0); continue; } - CTR0(KTR_GEOM, "g_up going to sleep"); - msleep(&g_wait_up, &g_bio_run_up.bio_queue_lock, - PRIBIO | PDROP, "-", 0); + g_bioq_unlock(&g_bio_run_up); + THREAD_NO_SLEEPING(); + CTR4(KTR_GEOM, "g_up biodone bp %p provider %s off " + "%jd len %ld", bp, bp->bio_to->name, + bp->bio_offset, bp->bio_length); + biodone(bp); + THREAD_SLEEPING_OK(); } } From owner-svn-src-all@freebsd.org Tue Sep 20 09:19:23 2016 Return-Path: Delivered-To: svn-src-all@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 9743ABE297F; Tue, 20 Sep 2016 09:19:23 +0000 (UTC) (envelope-from wma@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 31A29FF7; Tue, 20 Sep 2016 09:19:23 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K9JMNV023318; Tue, 20 Sep 2016 09:19:22 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K9JMjZ023317; Tue, 20 Sep 2016 09:19:22 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201609200919.u8K9JMjZ023317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Tue, 20 Sep 2016 09:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306019 - in head/sys/contrib/alpine-hal: . eth eth/eth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 09:19:23 -0000 Author: wma Date: Tue Sep 20 09:19:22 2016 New Revision: 306019 URL: https://svnweb.freebsd.org/changeset/base/306019 Log: Update Annapurna Alpine HAL alpine-hal SerDes file was omitted in the previous commit. Files added here. All unnecessary (old) files were also removed. Merge from vendor-sys, r306017 Added: head/sys/contrib/alpine-hal/al_hal_serdes_hssp.c - copied unchanged from r306018, head/sys/contrib/alpine-hal/al_hal_serdes.c Deleted: head/sys/contrib/alpine-hal/al_hal_serdes.c head/sys/contrib/alpine-hal/eth/al_hal_common.h head/sys/contrib/alpine-hal/eth/al_hal_iofic.c head/sys/contrib/alpine-hal/eth/al_hal_iofic.h head/sys/contrib/alpine-hal/eth/al_hal_iofic_regs.h head/sys/contrib/alpine-hal/eth/al_hal_nb_regs.h head/sys/contrib/alpine-hal/eth/al_hal_pbs_regs.h head/sys/contrib/alpine-hal/eth/al_hal_pcie.c head/sys/contrib/alpine-hal/eth/al_hal_pcie.h head/sys/contrib/alpine-hal/eth/al_hal_pcie_axi_reg.h head/sys/contrib/alpine-hal/eth/al_hal_pcie_interrupts.h head/sys/contrib/alpine-hal/eth/al_hal_pcie_regs.h head/sys/contrib/alpine-hal/eth/al_hal_pcie_w_reg.h head/sys/contrib/alpine-hal/eth/al_hal_plat_services.h head/sys/contrib/alpine-hal/eth/al_hal_plat_types.h head/sys/contrib/alpine-hal/eth/al_hal_reg_utils.h head/sys/contrib/alpine-hal/eth/al_hal_serdes.c head/sys/contrib/alpine-hal/eth/al_hal_serdes.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_25g.c head/sys/contrib/alpine-hal/eth/al_hal_serdes_25g.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_25g_internal_regs.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_25g_regs.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_hssp.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_hssp_internal_regs.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_hssp_regs.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_interface.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_internal_regs.h head/sys/contrib/alpine-hal/eth/al_hal_serdes_regs.h head/sys/contrib/alpine-hal/eth/al_hal_types.h head/sys/contrib/alpine-hal/eth/al_hal_udma.h head/sys/contrib/alpine-hal/eth/al_hal_udma_config.c head/sys/contrib/alpine-hal/eth/al_hal_udma_config.h head/sys/contrib/alpine-hal/eth/al_hal_udma_debug.c head/sys/contrib/alpine-hal/eth/al_hal_udma_debug.h head/sys/contrib/alpine-hal/eth/al_hal_udma_iofic.c head/sys/contrib/alpine-hal/eth/al_hal_udma_iofic.h head/sys/contrib/alpine-hal/eth/al_hal_udma_iofic_regs.h head/sys/contrib/alpine-hal/eth/al_hal_udma_main.c head/sys/contrib/alpine-hal/eth/al_hal_udma_regs.h head/sys/contrib/alpine-hal/eth/al_hal_udma_regs_gen.h head/sys/contrib/alpine-hal/eth/al_hal_udma_regs_m2s.h head/sys/contrib/alpine-hal/eth/al_hal_udma_regs_s2m.h head/sys/contrib/alpine-hal/eth/al_hal_unit_adapter_regs.h head/sys/contrib/alpine-hal/eth/al_serdes.c head/sys/contrib/alpine-hal/eth/al_serdes.h head/sys/contrib/alpine-hal/eth/eth/ Copied: head/sys/contrib/alpine-hal/al_hal_serdes_hssp.c (from r306018, head/sys/contrib/alpine-hal/al_hal_serdes.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/alpine-hal/al_hal_serdes_hssp.c Tue Sep 20 09:19:22 2016 (r306019, copy of r306018, head/sys/contrib/alpine-hal/al_hal_serdes.c) @@ -0,0 +1,3164 @@ +/******************************************************************************* +Copyright (C) 2015 Annapurna Labs Ltd. + +This file may be licensed under the terms of the Annapurna Labs Commercial +License Agreement. + +Alternatively, this file can be distributed under the terms of the GNU General +Public License V2 as published by the Free Software Foundation and can be +found at http://www.gnu.org/licenses/gpl-2.0.html + +Alternatively, redistribution and use in source and binary forms, with or +without modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*******************************************************************************/ + +#include "al_hal_serdes_hssp.h" +#include "al_hal_serdes_hssp_regs.h" +#include "al_hal_serdes_hssp_internal_regs.h" + +#define SRDS_CORE_REG_ADDR(page, type, offset)\ + (((page) << 13) | ((type) << 12) | (offset)) + +/* Link Training configuration */ +#define AL_SERDES_TX_DEEMPH_SUM_MAX 0x1b + +/* c configurations */ +#define AL_SERDES_TX_DEEMPH_C_ZERO_MAX_VAL 0x1b +#define AL_SERDES_TX_DEEMPH_C_ZERO_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_ZERO_PRESET AL_SERDES_TX_DEEMPH_C_ZERO_MAX_VAL + +/* c(+1) configurations */ +#define AL_SERDES_TX_DEEMPH_C_PLUS_MAX_VAL 0x9 +#define AL_SERDES_TX_DEEMPH_C_PLUS_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_PLUS_PRESET AL_SERDES_TX_DEEMPH_C_PLUS_MIN_VAL + +/* c(-1) configurations */ +#define AL_SERDES_TX_DEEMPH_C_MINUS_MAX_VAL 0x6 +#define AL_SERDES_TX_DEEMPH_C_MINUS_MIN_VAL 0 +#define AL_SERDES_TX_DEEMPH_C_MINUS_PRESET AL_SERDES_TX_DEEMPH_C_MINUS_MIN_VAL + +/* Rx equal total delay = MDELAY * TRIES */ +#define AL_SERDES_RX_EQUAL_MDELAY 10 +#define AL_SERDES_RX_EQUAL_TRIES 50 + +/* Rx eye calculation delay = MDELAY * TRIES */ +#define AL_SERDES_RX_EYE_CAL_MDELAY 50 +#define AL_SERDES_RX_EYE_CAL_TRIES 70 + +#if (!defined(AL_SERDES_BASIC_SERVICES_ONLY)) || (AL_SERDES_BASIC_SERVICES_ONLY == 0) +#define AL_SRDS_ADV_SRVC(func) func +#else +static void al_serdes_hssp_stub_func(void) +{ + al_err("%s: not implemented service called!\n", __func__); +} + +#define AL_SRDS_ADV_SRVC(func) ((typeof(func) *)al_serdes_hssp_stub_func) +#endif + +/** + * SERDES core reg read + */ +static inline uint8_t al_serdes_grp_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset); + +/** + * SERDES core reg write + */ +static inline void al_serdes_grp_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data); + +/** + * SERDES core masked reg write + */ +static inline void al_serdes_grp_reg_masked_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t mask, + uint8_t data); + +/** + * Lane Rx rate change software flow disable + */ +static void _al_serdes_lane_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane); + +/** + * Group Rx rate change software flow enable if all conditions met + */ +static void al_serdes_group_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj); + +/** + * Lane Rx rate change software flow enable if all conditions met + */ +static void _al_serdes_lane_rx_rate_change_sw_flow_en_cond( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane); + +/** + * Group Rx rate change software flow enable if all conditions met + */ +static void al_serdes_group_rx_rate_change_sw_flow_en_cond( + struct al_serdes_grp_obj *obj); + +/******************************************************************************/ +/******************************************************************************/ +static enum al_serdes_type al_serdes_hssp_type_get(void) +{ + return AL_SRDS_TYPE_HSSP; +} + +/******************************************************************************/ +/******************************************************************************/ +static int al_serdes_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t *data) +{ + int status = 0; + + al_dbg( + "%s(%p, %d, %d, %u)\n", + __func__, + obj, + page, + type, + offset); + + al_assert(obj); + al_assert(data); + al_assert(((int)page) >= AL_SRDS_REG_PAGE_0_LANE_0); + al_assert(((int)page) <= AL_SRDS_REG_PAGE_4_COMMON); + al_assert(((int)type) >= AL_SRDS_REG_TYPE_PMA); + al_assert(((int)type) <= AL_SRDS_REG_TYPE_PCS); + + *data = al_serdes_grp_reg_read( + obj, + page, + type, + offset); + + al_dbg( + "%s: return(%u)\n", + __func__, + *data); + + return status; +} + +/******************************************************************************/ +/******************************************************************************/ +static int al_serdes_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data) +{ + int status = 0; + + al_dbg( + "%s(%p, %d, %d, %u, %u)\n", + __func__, + obj, + page, + type, + offset, + data); + + al_assert(obj); + al_assert(((int)page) >= AL_SRDS_REG_PAGE_0_LANE_0); + al_assert(((int)page) <= AL_SRDS_REG_PAGE_0123_LANES_0123); + al_assert(((int)type) >= AL_SRDS_REG_TYPE_PMA); + al_assert(((int)type) <= AL_SRDS_REG_TYPE_PCS); + + al_serdes_grp_reg_write( + obj, + page, + type, + offset, + data); + + return status; +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_PCSRX_DATAWIDTH_REG_NUM != SERDES_IREG_FLD_PCSTX_DATAWIDTH_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM != SERDES_IREG_FLD_PCSTX_DIVRATE_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCS_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCSBIST_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM != SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_LB_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRX_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRXBIST_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSRXEQ_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +#if (SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM != SERDES_IREG_FLD_PCSTX_LOCWREN_REG_NUM) +#error "Wrong assumption!" +#endif +static void al_serdes_bist_overrides_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_rate rate) +{ + int i; + + uint8_t rx_rate_val; + uint8_t tx_rate_val; + + switch (rate) { + case AL_SRDS_RATE_1_8: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_8; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_8; + break; + case AL_SRDS_RATE_1_4: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_4; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_4; + break; + case AL_SRDS_RATE_1_2: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_2; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_2; + break; + case AL_SRDS_RATE_FULL: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_1; + break; + default: + al_err("%s: invalid rate (%d)\n", __func__, rate); + al_assert(0); + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + tx_rate_val = SERDES_IREG_FLD_PCSTX_DIVRATE_VAL_1_1; + } + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_REG_NUM, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_MASK | + SERDES_IREG_FLD_PCSTX_DATAWIDTH_MASK, + SERDES_IREG_FLD_PCSRX_DATAWIDTH_VAL_20 | + SERDES_IREG_FLD_PCSTX_DATAWIDTH_VAL_20); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM, + SERDES_IREG_FLD_PCSRX_DIVRATE_MASK | + SERDES_IREG_FLD_PCSTX_DIVRATE_MASK, + rx_rate_val | tx_rate_val); + } + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN | + SERDES_IREG_FLD_CMNPCS_LOCWREN | + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN | + SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN | + SERDES_IREG_FLD_CMNPCS_LOCWREN | + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN | + SERDES_IREG_FLD_CMNPCSPSTATE_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCS_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCS_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCS_TXENABLE_REG_NUM, + SERDES_IREG_FLD_CMNPCS_TXENABLE, + SERDES_IREG_FLD_CMNPCS_TXENABLE); + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN | + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRX_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN | + SERDES_IREG_FLD_PCSRXEQ_LOCWREN | + SERDES_IREG_FLD_PCSTX_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TX_DRV_OVERRIDE_EN_REG_NUM, + SERDES_IREG_FLD_TX_DRV_OVERRIDE_EN, + 0); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXLOCK2REF_OVREN_REG_NUM, + SERDES_IREG_FLD_RXLOCK2REF_OVREN, + SERDES_IREG_FLD_RXLOCK2REF_OVREN); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_overrides_disable( + struct al_serdes_grp_obj *obj) +{ + int i; + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCIEGEN3_LOCWREN_REG_NUM, + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN, + SERDES_IREG_FLD_CMNPCSBIST_LOCWREN); + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_LOCWREN_REG_NUM, + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN, + SERDES_IREG_FLD_LB_LOCWREN | + SERDES_IREG_FLD_PCSRXBIST_LOCWREN); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN, + SERDES_IREG_FLD_PCSTXBIST_LOCWREN); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_rx_rate_change( + struct al_serdes_grp_obj *obj, + enum al_serdes_rate rate) +{ + int i; + + uint8_t rx_rate_val; + + switch (rate) { + case AL_SRDS_RATE_1_8: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_8; + break; + case AL_SRDS_RATE_1_4: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_4; + break; + case AL_SRDS_RATE_1_2: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_2; + break; + case AL_SRDS_RATE_FULL: + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + break; + default: + al_err("%s: invalid rate (%d)\n", __func__, rate); + rx_rate_val = SERDES_IREG_FLD_PCSRX_DIVRATE_VAL_1_1; + break; + } + + for (i = 0; i < AL_SRDS_NUM_LANES; i++) { + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)i, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRX_DIVRATE_REG_NUM, + SERDES_IREG_FLD_PCSRX_DIVRATE_MASK, + rx_rate_val); + } +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_group_pm_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_pm pm) +{ + uint8_t pm_val; + + switch (pm) { + case AL_SRDS_PM_PD: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_PD; + break; + case AL_SRDS_PM_P2: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P2; + break; + case AL_SRDS_PM_P1: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P1; + break; + case AL_SRDS_PM_P0S: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0S; + break; + case AL_SRDS_PM_P0: + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0; + break; + default: + al_err("%s: invalid power mode (%d)\n", __func__, pm); + al_assert(0); + pm_val = SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_VAL_P0; + } + + if (pm == AL_SRDS_PM_PD) + al_serdes_group_rx_rate_change_sw_flow_dis(obj); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNPCSPSTATE_SYNTH_MASK, + pm_val); + + if (pm != AL_SRDS_PM_PD) + al_serdes_group_rx_rate_change_sw_flow_en_cond(obj); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_rx_rate_change_sw_flow_en( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 201, 0xfc); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 202, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 203, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 204, 0xff); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0x7f); + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0xff); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_rx_rate_change_sw_flow_dis( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + al_serdes_reg_write(obj, (enum al_serdes_reg_page)lane, AL_SRDS_REG_TYPE_PMA, 205, 0x7f); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pcie_rate_override_enable_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool en) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA_REG_NUM, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA, + en ? SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static al_bool al_serdes_lane_pcie_rate_override_is_enabled( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + return (al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA_REG_NUM) & + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_ENA) ? AL_TRUE : AL_FALSE; +} + +/******************************************************************************/ +/******************************************************************************/ +static enum al_serdes_pcie_rate al_serdes_lane_pcie_rate_get( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane) +{ + return (al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_REG_NUM) & + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_MASK) >> + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_SHIFT; +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pcie_rate_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_pcie_rate rate) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PCS, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_REG_NUM, + SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_MASK, + rate << SERDES_IREG_FLD_PCS_VPCSIF_OVR_RATE_SHIFT); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_lane_pm_set( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_pm rx_pm, + enum al_serdes_pm tx_pm) +{ + uint8_t rx_pm_val; + uint8_t tx_pm_val; + + switch (rx_pm) { + case AL_SRDS_PM_PD: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_PD; + break; + case AL_SRDS_PM_P2: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P2; + break; + case AL_SRDS_PM_P1: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P1; + break; + case AL_SRDS_PM_P0S: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0S; + break; + case AL_SRDS_PM_P0: + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0; + break; + default: + al_err("%s: invalid rx power mode (%d)\n", __func__, rx_pm); + al_assert(0); + rx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_RX_VAL_P0; + } + + switch (tx_pm) { + case AL_SRDS_PM_PD: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_PD; + break; + case AL_SRDS_PM_P2: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P2; + break; + case AL_SRDS_PM_P1: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P1; + break; + case AL_SRDS_PM_P0S: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0S; + break; + case AL_SRDS_PM_P0: + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0; + break; + default: + al_err("%s: invalid tx power mode (%d)\n", __func__, tx_pm); + al_assert(0); + tx_pm_val = SERDES_IREG_FLD_LANEPCSPSTATE_TX_VAL_P0; + } + + if (rx_pm == AL_SRDS_PM_PD) + _al_serdes_lane_rx_rate_change_sw_flow_dis(obj, lane); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_RX_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_RX_MASK, + rx_pm_val); + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LANEPCSPSTATE_TX_REG_NUM, + SERDES_IREG_FLD_LANEPCSPSTATE_TX_MASK, + tx_pm_val); + + if (rx_pm != AL_SRDS_PM_PD) + _al_serdes_lane_rx_rate_change_sw_flow_en_cond(obj, lane); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_pma_hard_reset_group( + struct al_serdes_grp_obj *obj, + al_bool enable) +{ + if (enable) + al_serdes_group_rx_rate_change_sw_flow_dis(obj); + + /* Enable Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_MASK, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_SYNTH_VAL_REGS); + + /* Assert/Deassert Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_MASK, + enable ? + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_VAL_ASSERT : + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_SYNTH_VAL_DEASSERT); + + if (!enable) + al_serdes_group_rx_rate_change_sw_flow_en_cond(obj); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_pma_hard_reset_lane( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + if (enable) + _al_serdes_lane_rx_rate_change_sw_flow_dis(obj, lane); + + /* Enable Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_MASK, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASSEN_VAL_REGS); + + /* Assert/Deassert Hard Reset Override */ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_REG_NUM, + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_MASK, + enable ? + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_VAL_ASSERT : + SERDES_IREG_FLD_CMNCTLPOR_HARDRSTBYPASS_VAL_DEASSERT); + + if (!enable) + _al_serdes_lane_rx_rate_change_sw_flow_en_cond(obj, lane); +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN_REG_NUM) ||\ + (SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN_REG_NUM !=\ + SERDES_IREG_FLD_LB_CDRCLK2TXEN_REG_NUM) +#error Wrong assumption +#endif + +static void al_serdes_loopback_control( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + enum al_serdes_lb_mode mode) +{ + uint8_t val = 0; + + switch (mode) { + case AL_SRDS_LB_MODE_OFF: + break; + case AL_SRDS_LB_MODE_PMA_IO_UN_TIMED_RX_TO_TX: + val = SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_INTERNALLY_BUFFERED_SERIAL_TX_TO_RX: + val = SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_SERIAL_TX_IO_TO_RX_IO: + val = SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN; + break; + case AL_SRDS_LB_MODE_PMA_PARALLEL_RX_TO_TX: + val = SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN | + SERDES_IREG_FLD_LB_CDRCLK2TXEN; + break; + default: + al_err("%s: invalid mode (%d)\n", __func__, mode); + al_assert(0); + } + + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN_REG_NUM, + SERDES_IREG_FLD_LB_RX2TXUNTIMEDEN | + SERDES_IREG_FLD_LB_TX2RXBUFTIMEDEN | + SERDES_IREG_FLD_LB_TX2RXIOTIMEDEN | + SERDES_IREG_FLD_LB_PARRX2TXTIMEDEN | + SERDES_IREG_FLD_LB_CDRCLK2TXEN, + val); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_pattern_select( + struct al_serdes_grp_obj *obj, + enum al_serdes_bist_pattern pattern, + uint8_t *user_data) +{ + uint8_t val = 0; + + switch (pattern) { + case AL_SRDS_BIST_PATTERN_USER: + al_assert(user_data); + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_USER; + break; + case AL_SRDS_BIST_PATTERN_PRBS7: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS7; + break; + case AL_SRDS_BIST_PATTERN_PRBS23: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS23; + break; + case AL_SRDS_BIST_PATTERN_PRBS31: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_PRBS31; + break; + case AL_SRDS_BIST_PATTERN_CLK1010: + val = SERDES_IREG_FLD_CMNPCSBIST_MODESEL_VAL_CLK1010; + break; + default: + al_err("%s: invalid pattern (%d)\n", __func__, pattern); + al_assert(0); + } + + if (pattern == AL_SRDS_BIST_PATTERN_USER) { + int i; + + for (i = 0; i < SERDES_IREG_FLD_TX_BIST_PAT_NUM_BYTES; i++) + al_serdes_grp_reg_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TX_BIST_PAT_REG_NUM(i), + user_data[i]); + } + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_CMNPCSBIST_MODESEL_REG_NUM, + SERDES_IREG_FLD_CMNPCSBIST_MODESEL_MASK, + val); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_tx_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSTXBIST_EN_REG_NUM, + SERDES_IREG_FLD_PCSTXBIST_EN, + enable ? SERDES_IREG_FLD_PCSTXBIST_EN : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_tx_err_inject( + struct al_serdes_grp_obj *obj) +{ + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TXBIST_BITERROR_EN_REG_NUM, + SERDES_IREG_FLD_TXBIST_BITERROR_EN, + SERDES_IREG_FLD_TXBIST_BITERROR_EN); + + al_serdes_grp_reg_masked_write( + obj, + AL_SRDS_REG_PAGE_4_COMMON, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_TXBIST_BITERROR_EN_REG_NUM, + SERDES_IREG_FLD_TXBIST_BITERROR_EN, + 0); +} + +/******************************************************************************/ +/******************************************************************************/ +static void al_serdes_bist_rx_enable( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool enable) +{ + al_serdes_grp_reg_masked_write( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_PCSRXBIST_EN_REG_NUM, + SERDES_IREG_FLD_PCSRXBIST_EN, + enable ? SERDES_IREG_FLD_PCSRXBIST_EN : 0); +} + +/******************************************************************************/ +/******************************************************************************/ +#if (SERDES_IREG_FLD_RXBIST_ERRCOUNT_OVERFLOW_REG_NUM !=\ + SERDES_IREG_FLD_RXBIST_RXLOCKED_REG_NUM) +#error Wrong assumption +#endif + +static void al_serdes_bist_rx_status( + struct al_serdes_grp_obj *obj, + enum al_serdes_lane lane, + al_bool *is_locked, + al_bool *err_cnt_overflow, + uint32_t *err_cnt) +{ + uint8_t status_reg_val; + uint16_t err_cnt_msb_reg_val; + uint16_t err_cnt_lsb_reg_val; + + status_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_RXLOCKED_REG_NUM); + + err_cnt_msb_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_ERRCOUNT_MSB_REG_NUM); + + err_cnt_lsb_reg_val = al_serdes_grp_reg_read( + obj, + (enum al_serdes_reg_page)lane, + AL_SRDS_REG_TYPE_PMA, + SERDES_IREG_FLD_RXBIST_ERRCOUNT_LSB_REG_NUM); + + *is_locked = + (status_reg_val & SERDES_IREG_FLD_RXBIST_RXLOCKED) ? + AL_TRUE : AL_FALSE; + + *err_cnt_overflow = + (status_reg_val & SERDES_IREG_FLD_RXBIST_ERRCOUNT_OVERFLOW) ? + AL_TRUE : AL_FALSE; + + *err_cnt = (err_cnt_msb_reg_val << 8) + err_cnt_lsb_reg_val; +} + +/******************************************************************************/ +/******************************************************************************/ +static inline uint8_t al_serdes_grp_reg_read( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset) +{ + struct al_serdes_regs __iomem *regs_base = obj->regs_base; + + al_reg_write32( + ®s_base->gen.reg_addr, + SRDS_CORE_REG_ADDR(page, type, offset)); + + return al_reg_read32(®s_base->gen.reg_data); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_grp_reg_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t data) +{ + struct al_serdes_regs __iomem *regs_base = obj->regs_base; + + al_reg_write32( + ®s_base->gen.reg_addr, + SRDS_CORE_REG_ADDR(page, type, offset)); + + al_reg_write32(®s_base->gen.reg_data, data); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_ns_delay(int cnt) +{ + al_udelay((cnt + 999) / 1000); +} + +/******************************************************************************/ +/******************************************************************************/ +static inline void al_serdes_grp_reg_masked_write( + struct al_serdes_grp_obj *obj, + enum al_serdes_reg_page page, + enum al_serdes_reg_type type, + uint16_t offset, + uint8_t mask, + uint8_t data) +{ + uint8_t val; + enum al_serdes_reg_page start_page = page; + enum al_serdes_reg_page end_page = page; + enum al_serdes_reg_page iter_page; + + if (page == AL_SRDS_REG_PAGE_0123_LANES_0123) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Sep 20 09:38:09 2016 Return-Path: Delivered-To: svn-src-all@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 42A06BE2DD0; Tue, 20 Sep 2016 09:38:09 +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 194D1A45; Tue, 20 Sep 2016 09:38:09 +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 u8K9c8fY030766; Tue, 20 Sep 2016 09:38:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K9c81i030762; Tue, 20 Sep 2016 09:38:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609200938.u8K9c81i030762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Sep 2016 09:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306020 - in head/sys/amd64: amd64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 09:38:09 -0000 Author: kib Date: Tue Sep 20 09:38:07 2016 New Revision: 306020 URL: https://svnweb.freebsd.org/changeset/base/306020 Log: Move pmap_p*e_index() inline functions from pmap.c to pmap.h. They are already used in minidump code. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Tue Sep 20 09:19:22 2016 (r306019) +++ head/sys/amd64/amd64/minidump_machdep.c Tue Sep 20 09:38:07 2016 (r306020) @@ -239,10 +239,10 @@ minidumpsys(struct dumperinfo *di) * page written corresponds to 1GB of space */ pmapsize += PAGE_SIZE; - ii = (va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1); + ii = pmap_pml4e_index(va); pml4 = (uint64_t *)PHYS_TO_DMAP(KPML4phys) + ii; pdp = (uint64_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); - i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); + i = pmap_pdpe_index(va); if ((pdp[i] & PG_V) == 0) { va += NBPDP; continue; @@ -264,7 +264,7 @@ minidumpsys(struct dumperinfo *di) pd = (uint64_t *)PHYS_TO_DMAP(pdp[i] & PG_FRAME); for (n = 0; n < NPDEPG; n++, va += NBPDR) { - j = (va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1); + j = pmap_pde_index(va); if ((pd[j] & PG_V) == 0) continue; @@ -368,10 +368,10 @@ minidumpsys(struct dumperinfo *di) bzero(fakepd, sizeof(fakepd)); for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + nkpt * NBPDR, kernel_vm_end); va += NBPDP) { - ii = (va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1); + ii = pmap_pml4e_index(va); pml4 = (uint64_t *)PHYS_TO_DMAP(KPML4phys) + ii; pdp = (uint64_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); - i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); + i = pmap_pdpe_index(va); /* We always write a page, even if it is zero */ if ((pdp[i] & PG_V) == 0) { Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Sep 20 09:19:22 2016 (r306019) +++ head/sys/amd64/amd64/pmap.c Tue Sep 20 09:38:07 2016 (r306020) @@ -673,35 +673,6 @@ pmap_pde_pindex(vm_offset_t va) } -/* Return various clipped indexes for a given VA */ -static __inline vm_pindex_t -pmap_pte_index(vm_offset_t va) -{ - - return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1)); -} - -static __inline vm_pindex_t -pmap_pde_index(vm_offset_t va) -{ - - return ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1)); -} - -static __inline vm_pindex_t -pmap_pdpe_index(vm_offset_t va) -{ - - return ((va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1)); -} - -static __inline vm_pindex_t -pmap_pml4e_index(vm_offset_t va) -{ - - return ((va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1)); -} - /* Return a pointer to the PML4 slot that corresponds to a VA */ static __inline pml4_entry_t * pmap_pml4e(pmap_t pmap, vm_offset_t va) Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Tue Sep 20 09:19:22 2016 (r306019) +++ head/sys/amd64/include/pmap.h Tue Sep 20 09:38:07 2016 (r306020) @@ -416,6 +416,35 @@ boolean_t pmap_map_io_transient(vm_page_ void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); #endif /* _KERNEL */ +/* Return various clipped indexes for a given VA */ +static __inline vm_pindex_t +pmap_pte_index(vm_offset_t va) +{ + + return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1)); +} + +static __inline vm_pindex_t +pmap_pde_index(vm_offset_t va) +{ + + return ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1)); +} + +static __inline vm_pindex_t +pmap_pdpe_index(vm_offset_t va) +{ + + return ((va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1)); +} + +static __inline vm_pindex_t +pmap_pml4e_index(vm_offset_t va) +{ + + return ((va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1)); +} + #endif /* !LOCORE */ #endif /* !_MACHINE_PMAP_H_ */ From owner-svn-src-all@freebsd.org Tue Sep 20 10:04:22 2016 Return-Path: Delivered-To: svn-src-all@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 28BC4BE185A; Tue, 20 Sep 2016 10:04:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 DF0DFBA0; Tue, 20 Sep 2016 10:04:21 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bmHuU-000MCe-6p; Tue, 20 Sep 2016 13:04:18 +0300 Date: Tue, 20 Sep 2016 13:04:18 +0300 From: Slawa Olhovchenkov To: Warner Losh Cc: Ronald Klop , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r305968 - head/etc/autofs Message-ID: <20160920100418.GI2960@zxy.spb.ru> References: <201609190851.u8J8pRDD068198@repo.freebsd.org> <20160920034337.GA6180@brick> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 10:04:22 -0000 On Mon, Sep 19, 2016 at 10:19:04PM -0600, Warner Losh wrote: > For MSDOS it's one thing and likely helps. But for ufs it doesn't > help. Soft updates already does an excellent job at reducing wear and > all async does is give added danger of dataloss. Linux distros don't > matter for UFS because different design decisions have been made for > ext[234] and UFS. SU mount of UFS and unexpected media loast can caused kernel panic at next mount this media. async mount don't have such issuse. From owner-svn-src-all@freebsd.org Tue Sep 20 11:11:07 2016 Return-Path: Delivered-To: svn-src-all@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 D4923BE2905; Tue, 20 Sep 2016 11:11:07 +0000 (UTC) (envelope-from wma@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 97C9CE81; Tue, 20 Sep 2016 11:11:07 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KBB6vG065884; Tue, 20 Sep 2016 11:11:06 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KBB6S8065878; Tue, 20 Sep 2016 11:11:06 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201609201111.u8KBB6S8065878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Tue, 20 Sep 2016 11:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306021 - in head/sys: arm/annapurna/alpine arm/conf arm64/conf boot/fdt/dts/arm conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 11:11:07 -0000 Author: wma Date: Tue Sep 20 11:11:06 2016 New Revision: 306021 URL: https://svnweb.freebsd.org/changeset/base/306021 Log: Add driver for PCIe root complex on Annapurna Alpine platform. The driver subclasses pci-host-generic and additionally performs configuration of vendor-specific PCIe registers. Obtained from: Semihalf Submitted by: Michal Stanek Sponsored by: Annapurna Labs Reviewed by: wma Differential Revision: https://reviews.freebsd.org/D7571 Added: head/sys/arm/annapurna/alpine/alpine_pci.c (contents, props changed) Modified: head/sys/arm/conf/ALPINE head/sys/arm64/conf/GENERIC head/sys/boot/fdt/dts/arm/annapurna-alpine.dts head/sys/conf/files.arm head/sys/conf/files.arm64 Added: head/sys/arm/annapurna/alpine/alpine_pci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/alpine_pci.c Tue Sep 20 11:11:06 2016 (r306021) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2015,2016 Annapurna Labs Ltd. and affiliates + * All rights reserved. + * + * Developed by Semihalf. + * + * 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. + */ + +/* + * Alpine PCI/PCI-Express controller driver. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "pcib_if.h" + +#include "contrib/alpine-hal/al_hal_unit_adapter_regs.h" +#include "contrib/alpine-hal/al_hal_pcie.h" +#include "contrib/alpine-hal/al_hal_pcie_axi_reg.h" + +#define ANNAPURNA_VENDOR_ID 0x1c36 + +/* Forward prototypes */ +static int al_pcib_probe(device_t); +static int al_pcib_attach(device_t); +static void al_pcib_fixup(device_t); + +static struct ofw_compat_data compat_data[] = { + {"annapurna-labs,al-internal-pcie", true}, + {"annapurna-labs,alpine-internal-pcie", true}, + {NULL, false} +}; + +/* + * Bus interface definitions. + */ +static device_method_t al_pcib_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, al_pcib_probe), + DEVMETHOD(device_attach, al_pcib_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(pcib, al_pcib_driver, al_pcib_methods, + sizeof(struct generic_pcie_softc), generic_pcie_driver); + +static devclass_t anpa_pcib_devclass; + +DRIVER_MODULE(alpine_pcib, simplebus, al_pcib_driver, anpa_pcib_devclass, 0, 0); +DRIVER_MODULE(alpine_pcib, ofwbus, al_pcib_driver, anpa_pcib_devclass, 0, 0); + +static int +al_pcib_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, + "Annapurna-Labs Integrated Internal PCI-E Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +al_pcib_attach(device_t dev) +{ + int rv; + + rv = pci_host_generic_attach(dev); + + /* Annapurna quirk: configure vendor-specific registers */ + if (rv == 0) + al_pcib_fixup(dev); + + return (rv); +} + +static void +al_pcib_fixup(device_t dev) +{ + uint32_t val; + uint16_t vid; + uint8_t hdrtype; + int bus, slot, func, maxfunc; + + /* Fixup is only needed on bus 0 */ + bus = 0; + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { + maxfunc = 0; + for (func = 0; func <= maxfunc; func++) { + hdrtype = PCIB_READ_CONFIG(dev, bus, slot, func, + PCIR_HDRTYPE, 1); + + if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) + continue; + + if (func == 0 && (hdrtype & PCIM_MFDEV) != 0) + maxfunc = PCI_FUNCMAX; + + vid = PCIB_READ_CONFIG(dev, bus, slot, func, + PCIR_VENDOR, 2); + if (vid == ANNAPURNA_VENDOR_ID) { + val = PCIB_READ_CONFIG(dev, bus, slot, func, + AL_PCI_AXI_CFG_AND_CTR_0, 4); + val |= PCIE_AXI_PF_AXI_ATTR_OVRD_FUNC_CTRL_2_PF_VEC_PH_VEC_OVRD_FROM_AXUSER_MASK; + PCIB_WRITE_CONFIG(dev, bus, slot, func, + AL_PCI_AXI_CFG_AND_CTR_0, val, 4); + + val = PCIB_READ_CONFIG(dev, bus, slot, func, + AL_PCI_APP_CONTROL, 4); + val &= ~0xffff; + val |= PCIE_AXI_PF_AXI_ATTR_OVRD_FUNC_CTRL_4_PF_VEC_MEM_ADDR54_63_SEL_TGTID_MASK; + PCIB_WRITE_CONFIG(dev, bus, slot, func, + AL_PCI_APP_CONTROL, val, 4); + } + } + } +} Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Tue Sep 20 09:38:07 2016 (r306020) +++ head/sys/arm/conf/ALPINE Tue Sep 20 11:11:06 2016 (r306021) @@ -60,6 +60,11 @@ device ses # Enclosure Services (SES a # Serial ports device uart +# PCI/PCIE +device pci +device pci_host_generic +device al_pci # Annapurna Alpine PCI-E + # Ethernet device ether device mii Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Tue Sep 20 09:38:07 2016 (r306020) +++ head/sys/arm64/conf/GENERIC Tue Sep 20 11:11:06 2016 (r306021) @@ -105,6 +105,7 @@ device cpufreq # Bus drivers device pci +device al_pci # Annapurna Alpine PCI-E options PCI_HP # PCI-Express native HotPlug options PCI_IOV # PCI SR-IOV support Modified: head/sys/boot/fdt/dts/arm/annapurna-alpine.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/annapurna-alpine.dts Tue Sep 20 09:38:07 2016 (r306020) +++ head/sys/boot/fdt/dts/arm/annapurna-alpine.dts Tue Sep 20 11:11:06 2016 (r306021) @@ -175,6 +175,7 @@ device_type = "pci"; #size-cells = <2>; #address-cells = <3>; + reg = <0xfbc00000 0x100000>; interrupt-parent = <&MPIC>; interrupt-map-mask = <0xf800 0 0 7>; interrupt-map = <0x3000 0 0 1 &MPIC 0 32 4>, // USB adapter Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Tue Sep 20 09:38:07 2016 (r306020) +++ head/sys/conf/files.arm Tue Sep 20 11:11:06 2016 (r306021) @@ -13,6 +13,7 @@ cloudabi32_vdso_blob.o optional compat_ # arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt +arm/annapurna/alpine/alpine_pci.c optional al_pci fdt arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue Sep 20 09:38:07 2016 (r306020) +++ head/sys/conf/files.arm64 Tue Sep 20 11:11:06 2016 (r306021) @@ -40,6 +40,7 @@ arm/allwinner/clk/aw_usbclk.c optional a arm/allwinner/if_awg.c optional awg arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt +arm/annapurna/alpine/alpine_pci.c optional al_pci fdt arm/arm/generic_timer.c standard arm/arm/gic.c standard arm/arm/gic_fdt.c optional fdt From owner-svn-src-all@freebsd.org Tue Sep 20 12:56:04 2016 Return-Path: Delivered-To: svn-src-all@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 33F27BDF8DA; Tue, 20 Sep 2016 12:56:04 +0000 (UTC) (envelope-from emaste@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 0521D7A2; Tue, 20 Sep 2016 12:56:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KCu3aR006466; Tue, 20 Sep 2016 12:56:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KCu3p4006465; Tue, 20 Sep 2016 12:56:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609201256.u8KCu3p4006465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Sep 2016 12:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306022 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 12:56:04 -0000 Author: emaste Date: Tue Sep 20 12:56:03 2016 New Revision: 306022 URL: https://svnweb.freebsd.org/changeset/base/306022 Log: hwpmc: remove sys/capability.h backwards compatibility The Capsicum header is installed as sys/capsicum.h in stable/10 as well. Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Tue Sep 20 11:11:06 2016 (r306021) +++ head/sys/dev/hwpmc/hwpmc_logging.c Tue Sep 20 12:56:03 2016 (r306022) @@ -37,11 +37,7 @@ __FBSDID("$FreeBSD$"); #include -#if (__FreeBSD_version >= 1100000) #include -#else -#include -#endif #include #include #include From owner-svn-src-all@freebsd.org Tue Sep 20 12:58:29 2016 Return-Path: Delivered-To: svn-src-all@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 D70FDBDF961; Tue, 20 Sep 2016 12:58:29 +0000 (UTC) (envelope-from emaste@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 A7ADF949; Tue, 20 Sep 2016 12:58:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KCwSfE006590; Tue, 20 Sep 2016 12:58:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KCwSYG006589; Tue, 20 Sep 2016 12:58:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609201258.u8KCwSYG006589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Sep 2016 12:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306023 - head/contrib/openbsm/bin/auditdistd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 12:58:29 -0000 Author: emaste Date: Tue Sep 20 12:58:28 2016 New Revision: 306023 URL: https://svnweb.freebsd.org/changeset/base/306023 Log: auditdistd: update for sys/capability.h rename in r263232 Modified: head/contrib/openbsm/bin/auditdistd/sandbox.c Modified: head/contrib/openbsm/bin/auditdistd/sandbox.c ============================================================================== --- head/contrib/openbsm/bin/auditdistd/sandbox.c Tue Sep 20 12:56:03 2016 (r306022) +++ head/contrib/openbsm/bin/auditdistd/sandbox.c Tue Sep 20 12:58:28 2016 (r306023) @@ -34,7 +34,7 @@ #include #endif #ifdef HAVE_CAP_ENTER -#include +#include #endif #include From owner-svn-src-all@freebsd.org Tue Sep 20 12:59:32 2016 Return-Path: Delivered-To: svn-src-all@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 1BED8BDF9CE; Tue, 20 Sep 2016 12:59:32 +0000 (UTC) (envelope-from emaste@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 E305CAB4; Tue, 20 Sep 2016 12:59:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KCxVJQ006665; Tue, 20 Sep 2016 12:59:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KCxVd6006664; Tue, 20 Sep 2016 12:59:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609201259.u8KCxVd6006664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Sep 2016 12:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306024 - head/sys/dev/mrsas X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 12:59:32 -0000 Author: emaste Date: Tue Sep 20 12:59:30 2016 New Revision: 306024 URL: https://svnweb.freebsd.org/changeset/base/306024 Log: mrsas: update for sys/capability.h rename in r263232 Modified: head/sys/dev/mrsas/mrsas_linux.c Modified: head/sys/dev/mrsas/mrsas_linux.c ============================================================================== --- head/sys/dev/mrsas/mrsas_linux.c Tue Sep 20 12:58:28 2016 (r306023) +++ head/sys/dev/mrsas/mrsas_linux.c Tue Sep 20 12:59:30 2016 (r306024) @@ -43,8 +43,10 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version > 900000) -#include +#if (__FreeBSD_version >= 1001511) +#include +#elif (__FreeBSD_version > 900000) +#include #endif #include From owner-svn-src-all@freebsd.org Tue Sep 20 13:23:10 2016 Return-Path: Delivered-To: svn-src-all@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 2B0E9BE10B6; Tue, 20 Sep 2016 13:23:10 +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 E070DA02; Tue, 20 Sep 2016 13:23:09 +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 u8KDN9Sf017569; Tue, 20 Sep 2016 13:23:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KDN9Ps017568; Tue, 20 Sep 2016 13:23:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201609201323.u8KDN9Ps017568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 20 Sep 2016 13:23: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: r306025 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 13:23:10 -0000 Author: ae Date: Tue Sep 20 13:23:08 2016 New Revision: 306025 URL: https://svnweb.freebsd.org/changeset/base/306025 Log: MFC r305778: Fix swap tables between sets when this functional is enabled. We have 6 opcode rewriters for table opcodes. When `set swap' command invoked, it is called for each rewriter, so at the end we get the same result, because opcode rewriter uses ETLV type to match opcode. And all tables opcodes have the same ETLV type. To solve this problem, use separate sets handler for one opcode rewriter. Use it to handle TEST_ALL, SWAP_ALL and MOVE_ALL commands. PR: 212630 Modified: stable/11/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_table.c Tue Sep 20 12:59:30 2016 (r306024) +++ stable/11/sys/netpfil/ipfw/ip_fw_table.c Tue Sep 20 13:23:08 2016 (r306025) @@ -2825,13 +2825,12 @@ table_manage_sets(struct ip_fw_chain *ch switch (cmd) { case SWAP_ALL: case TEST_ALL: + case MOVE_ALL: /* - * Return success for TEST_ALL, since nothing prevents - * move rules from one set to another. All tables are - * accessible from all sets when per-set tables sysctl - * is disabled. + * Always return success, the real action and decision + * should make table_manage_sets_all(). */ - case MOVE_ALL: + return (0); case TEST_ONE: case MOVE_ONE: /* @@ -2856,6 +2855,39 @@ table_manage_sets(struct ip_fw_chain *ch set, new_set, cmd)); } +/* + * We register several opcode rewriters for lookup tables. + * All tables opcodes have the same ETLV type, but different subtype. + * To avoid invoking sets handler several times for XXX_ALL commands, + * we use separate manage_sets handler. O_RECV has the lowest value, + * so it should be called first. + */ +static int +table_manage_sets_all(struct ip_fw_chain *ch, uint16_t set, uint8_t new_set, + enum ipfw_sets_cmd cmd) +{ + + switch (cmd) { + case SWAP_ALL: + case TEST_ALL: + /* + * Return success for TEST_ALL, since nothing prevents + * move rules from one set to another. All tables are + * accessible from all sets when per-set tables sysctl + * is disabled. + */ + case MOVE_ALL: + if (V_fw_tables_sets == 0) + return (0); + break; + default: + return (table_manage_sets(ch, set, new_set, cmd)); + } + /* Use generic sets handler when per-set sysctl is enabled. */ + return (ipfw_obj_manage_sets(CHAIN_TO_NI(ch), IPFW_TLV_TBL_NAME, + set, new_set, cmd)); +} + static struct opcode_obj_rewrite opcodes[] = { { .opcode = O_IP_SRC_LOOKUP, @@ -2905,7 +2937,7 @@ static struct opcode_obj_rewrite opcodes .find_byname = table_findbyname, .find_bykidx = table_findbykidx, .create_object = create_table_compat, - .manage_sets = table_manage_sets, + .manage_sets = table_manage_sets_all, }, { .opcode = O_VIA, From owner-svn-src-all@freebsd.org Tue Sep 20 15:13:16 2016 Return-Path: Delivered-To: svn-src-all@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 7840ABE24C8; Tue, 20 Sep 2016 15:13:16 +0000 (UTC) (envelope-from emaste@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 476A2313; Tue, 20 Sep 2016 15:13:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KFDFwq059208; Tue, 20 Sep 2016 15:13:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KFDFpW059207; Tue, 20 Sep 2016 15:13:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609201513.u8KFDFpW059207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Sep 2016 15:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306026 - head/usr.bin/bsdiff/bspatch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 15:13:16 -0000 Author: emaste Date: Tue Sep 20 15:13:15 2016 New Revision: 306026 URL: https://svnweb.freebsd.org/changeset/base/306026 Log: bspatch: Remove backwards-compatibility sys/capability.h support bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D7954 Modified: head/usr.bin/bsdiff/bspatch/bspatch.c Modified: head/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- head/usr.bin/bsdiff/bspatch/bspatch.c Tue Sep 20 13:23:08 2016 (r306025) +++ head/usr.bin/bsdiff/bspatch/bspatch.c Tue Sep 20 15:13:15 2016 (r306026) @@ -29,12 +29,9 @@ __FBSDID("$FreeBSD$"); #if defined(__FreeBSD__) #include -#if __FreeBSD_version >= 1100014 +#if __FreeBSD_version >= 1001511 #include #define HAVE_CAPSICUM -#elif __FreeBSD_version >= 1000000 -#include -#define HAVE_CAPSICUM #endif #endif From owner-svn-src-all@freebsd.org Tue Sep 20 15:14:35 2016 Return-Path: Delivered-To: svn-src-all@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 11F9ABE256C; Tue, 20 Sep 2016 15:14:35 +0000 (UTC) (envelope-from imp@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 D75C680C; Tue, 20 Sep 2016 15:14:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KFEYdV059291; Tue, 20 Sep 2016 15:14:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KFEYr3059290; Tue, 20 Sep 2016 15:14:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609201514.u8KFEYr3059290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 20 Sep 2016 15:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306027 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 15:14:35 -0000 Author: imp Date: Tue Sep 20 15:14:33 2016 New Revision: 306027 URL: https://svnweb.freebsd.org/changeset/base/306027 Log: Spell alphabetically correctly both in the commit message AND in the actual man page. Sigh. Submitted by: David A Bright and Pedro Giffuni Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Tue Sep 20 15:13:15 2016 (r306026) +++ head/share/man/man9/style.9 Tue Sep 20 15:14:33 2016 (r306027) @@ -118,7 +118,7 @@ Leave another blank line before the head .Pp Kernel include files (i.e.\& .Pa sys/*.h ) -come first sorted alphebetially where possible. +come first sorted alphabetically where possible. Include .In sys/types.h OR From owner-svn-src-all@freebsd.org Tue Sep 20 16:14:43 2016 Return-Path: Delivered-To: svn-src-all@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 351B7BE19C7; Tue, 20 Sep 2016 16:14:43 +0000 (UTC) (envelope-from gjb@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 07D1E18D; Tue, 20 Sep 2016 16:14:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KGEgak082602; Tue, 20 Sep 2016 16:14:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGEgPw082601; Tue, 20 Sep 2016 16:14:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201614.u8KGEgPw082601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 16:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306028 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:14:43 -0000 Author: gjb Date: Tue Sep 20 16:14:42 2016 New Revision: 306028 URL: https://svnweb.freebsd.org/changeset/base/306028 Log: Document bsdinstall(8) hardening menu. Submitted by: robak Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 15:14:33 2016 (r306027) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:14:42 2016 (r306028) @@ -685,6 +685,10 @@ sponsor="&scaleengine;">Support for selecting the partitioning scheme when installing on the UFS filesystem has been added to &man.bsdinstall.8;. + + The &man.bsdinstall.8; utility has been + updated to include various system hardening options during + installation. From owner-svn-src-all@freebsd.org Tue Sep 20 16:20:15 2016 Return-Path: Delivered-To: svn-src-all@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 AFA4CBE1C00; Tue, 20 Sep 2016 16:20:15 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::231]) (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 7492F6E8; Tue, 20 Sep 2016 16:20:15 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi0-x231.google.com with SMTP id w11so27858431oia.2; Tue, 20 Sep 2016 09:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yWzTeWuqgvlhr0Z3yLRSiTR2ZszDoFBPi8SLltCcKNM=; b=tYn7A3DCj1P3BNWDe8P9zBJKh2mwm09MSFMtH+nE+nKFC1pl1qTmjwU+CICs0ZyyBT r1+F2cgiP6XAtmInCJqRII7IDypuikOnE/Yo+ny2Jz1sGnm7zIQfJ86d6siaOalPIuQ5 p1jTIIiQEfywLSD5K8ZS5zpB6oXWZOqvugPBZIzvr7ds4kfY/ZGOJdegdHJavnV6SFfU rXz3tPpaVk9NLwvXR4rJ1TfKQfTKtiP4aX+3B4TIa1sBQE6mp5p2gIIj1wxtf9zSgBPW yK/F3hvCgijhuhAVnA+0B3J0ACXhPdq3eqtsBfH07y9onnWtfwI7M1V0F+YNgvAFSb2b q7SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yWzTeWuqgvlhr0Z3yLRSiTR2ZszDoFBPi8SLltCcKNM=; b=bWuIbRypuH+i9YkchXGJ+GK4+I3eYvdSOFvCKY7tGtU7vhpwwDaSFP1z9Wt+vTapHo Q+6NMeF80QrIJotF0U85txI5TvTWQt/SoB3lecASkaE2nxyo35S96QUUCLUyeAcQiZzv 5ZBN4PMMXopOFuLfQc3N3+9bhfMYglavzv0IjR6JEaBqx8YqvpJp7Rh8QXlwyMckhZi6 r+ZlA1CwdjEgQzivK+DfBJiXPkwJvoqIECZw+Wpd+dDUN2a10/2YH8UL63krG8iAANFT 0vH3ekVpcuhGsjiKqukD5+cHSx7eT3Bo6bNiLGb27uFHFe9iX7TD97wmQfcm0l5CPzOa D/sA== X-Gm-Message-State: AE9vXwMlordwkvo3TQ3pqGLutdoSLCemtdsDu9att0afNy7zzIWwJRJkRN9vBh4pr3hqIMwtPYuVh/pcGYc/Ig== X-Received: by 10.202.81.19 with SMTP id f19mr38815520oib.89.1474388414738; Tue, 20 Sep 2016 09:20:14 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.202.71.11 with HTTP; Tue, 20 Sep 2016 09:20:14 -0700 (PDT) In-Reply-To: <201609191746.u8JHkFKI071354@repo.freebsd.org> References: <201609191746.u8JHkFKI071354@repo.freebsd.org> From: Alan Somers Date: Tue, 20 Sep 2016 10:20:14 -0600 X-Google-Sender-Auth: w8NahXCJkxCsSoSWxdiyqi-Ia4M Message-ID: Subject: Re: svn commit: r305988 - in head/sys: geom sys To: Edward Tomasz Napierala Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:20:15 -0000 On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Sep 19 17:46:15 2016 > New Revision: 305988 > URL: https://svnweb.freebsd.org/changeset/base/305988 > > Log: > Remove unused bio_taskqueue(). > > MFC after: 1 month > > Modified: > head/sys/geom/geom_io.c > head/sys/sys/bio.h > This is a KBI change, so you should bump __FreeBSD_version. You probably shouldn't MFC it, either. From owner-svn-src-all@freebsd.org Tue Sep 20 16:23:43 2016 Return-Path: Delivered-To: svn-src-all@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 0EC1EBE1DC0; Tue, 20 Sep 2016 16:23:43 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (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 D0C52BE7; Tue, 20 Sep 2016 16:23:42 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-pf0-x229.google.com with SMTP id 21so8982276pfy.0; Tue, 20 Sep 2016 09:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=l/vxD6L3gjE3ZuLekTzu7VYAopYvWtSQ2Y+CyQV6Ksk=; b=AuLCGcoPNmWEEfhPzWuZxwyVuag4Dlb5rm52alEbVi4fesC00O1ZClN/F5PI/s/CyO 1n5USxPTO+KRxiKoP2rfsMRnfU9QKU/ElPnC65P9nJLg772qCMBQOqBLbA0HP0YFjfrP mGar7fR14AUWoQSmtsZ6FdkxTasXDDjWZPN1iXZ8ihDnXO80yfs/dA3HhGf9c83xDmsk yr7wz0F5YbkhYn7O+LUMgc5iRC07yUn7RcHnjbfqYMUnh3bfM7WfqIIUkMOtDc42fF0Q bdWcwpBRbDhi1qLjF/v2K74WiVfdj9QhkTCi9ePJktvW23S9pspJux67jDgIQLe8kGdk hohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=l/vxD6L3gjE3ZuLekTzu7VYAopYvWtSQ2Y+CyQV6Ksk=; b=BDqiLTMl/+1RuH1YXZ01VdbHgEOzmZk19RaAneGE5Yr5UdHaTFMeVbuQ45crxp64st 8Pq2XsL9w0dVnNydjF71Rf3Z+ZtV/qX/KGNA8O6gNZpw8yrXQoNRP4Xkd6QZeejMsq5S /mmI6ew+Adr8LqReMCQBG/L1A8/yNISR0sKdak1hmBmlDSzqYrQK6XaVHmjHo92jNdC4 LMRTZp5L7Nt+Bt+IejAqpDptK9j6Lx6rEy4TmqGlzR6RzfQItdy0Of50cLE45aLyiXmw ouvxQgefG2Op73GHsPUWj2X18erhh1cGbZ4rXLLJdFTcsPLZ3aMsLhU7YeL6VJiqtlek FCqA== X-Gm-Message-State: AE9vXwNd+R6Ytqy9/uk3SD1sGJ5OLHPt+Kau5zfdBCoWcgX5wNfdZ1/333sKlHDzUFDGeQ== X-Received: by 10.98.38.4 with SMTP id m4mr57275571pfm.47.1474388622258; Tue, 20 Sep 2016 09:23:42 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([4.28.11.153]) by smtp.gmail.com with ESMTPSA id uj8sm40456268pab.5.2016.09.20.09.23.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Sep 2016 09:23:41 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r305988 - in head/sys: geom sys To: Alan Somers , Edward Tomasz Napierala References: <201609191746.u8JHkFKI071354@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Alexander Motin Message-ID: Date: Tue, 20 Sep 2016 09:23:37 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:23:43 -0000 On 20.09.2016 09:20, Alan Somers wrote: > On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala > wrote: >> Author: trasz >> Date: Mon Sep 19 17:46:15 2016 >> New Revision: 305988 >> URL: https://svnweb.freebsd.org/changeset/base/305988 >> >> Log: >> Remove unused bio_taskqueue(). >> >> MFC after: 1 month >> >> Modified: >> head/sys/geom/geom_io.c >> head/sys/sys/bio.h >> > > This is a KBI change, so you should bump __FreeBSD_version. You > probably shouldn't MFC it, either. The last/only consumer of this KPI I know gone with FreeBSD 9 and old ATA stack. Do you know any other? -- Alexander Motin From owner-svn-src-all@freebsd.org Tue Sep 20 16:24:23 2016 Return-Path: Delivered-To: svn-src-all@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 5C051BE1E79; Tue, 20 Sep 2016 16:24:23 +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 29673DB0; Tue, 20 Sep 2016 16:24:23 +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 u8KGOMLA086451; Tue, 20 Sep 2016 16:24:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGOMXQ086449; Tue, 20 Sep 2016 16:24:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609201624.u8KGOMXQ086449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Sep 2016 16:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306029 - in head/libexec/atf: atf-check atf-sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:24:23 -0000 Author: ngie Date: Tue Sep 20 16:24:22 2016 New Revision: 306029 URL: https://svnweb.freebsd.org/changeset/base/306029 Log: Use SRCTOP instead of the longhand version for defining the path to contrib/atf MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/libexec/atf/atf-check/Makefile head/libexec/atf/atf-sh/Makefile Modified: head/libexec/atf/atf-check/Makefile ============================================================================== --- head/libexec/atf/atf-check/Makefile Tue Sep 20 16:14:42 2016 (r306028) +++ head/libexec/atf/atf-check/Makefile Tue Sep 20 16:24:22 2016 (r306029) @@ -28,7 +28,7 @@ .include .include -ATF= ${.CURDIR:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh PROG_CXX= atf-check Modified: head/libexec/atf/atf-sh/Makefile ============================================================================== --- head/libexec/atf/atf-sh/Makefile Tue Sep 20 16:14:42 2016 (r306028) +++ head/libexec/atf/atf-sh/Makefile Tue Sep 20 16:24:22 2016 (r306029) @@ -28,7 +28,7 @@ .include .include -ATF= ${.CURDIR:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh PROG_CXX= atf-sh From owner-svn-src-all@freebsd.org Tue Sep 20 16:27:35 2016 Return-Path: Delivered-To: svn-src-all@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 B9217BE1F15; Tue, 20 Sep 2016 16:27:35 +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 83E68F70; Tue, 20 Sep 2016 16:27:35 +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 u8KGRYSh086592; Tue, 20 Sep 2016 16:27:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGRYZY086591; Tue, 20 Sep 2016 16:27:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609201627.u8KGRYZY086591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Sep 2016 16:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306030 - head/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:27:35 -0000 Author: ngie Date: Tue Sep 20 16:27:34 2016 New Revision: 306030 URL: https://svnweb.freebsd.org/changeset/base/306030 Log: Port vnode_leak_test:main to FreeBSD Use a simpler way of dumping kern.maxvnodes, i.e. `sysctl -n kern.maxvnodes` The awk filtering method employed in NetBSD doesn't work on FreeBSD MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh Modified: head/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh Tue Sep 20 16:24:22 2016 (r306029) +++ head/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh Tue Sep 20 16:27:34 2016 (r306030) @@ -36,7 +36,15 @@ main_head() { } main_body() { echo "Lowering kern.maxvnodes to 2000" + # Begin FreeBSD + if true; then + sysctl -n kern.maxvnodes > oldvnodes + else + # End FreeBSD sysctl kern.maxvnodes | awk '{ print $3; }' >oldvnodes + # Begin FreeBSD + fi + # End FreeBSD atf_check -s eq:0 -o ignore -e empty sysctl -w kern.maxvnodes=2000 test_mount -o -s$(((4000 + 2) * 4096)) From owner-svn-src-all@freebsd.org Tue Sep 20 16:28:18 2016 Return-Path: Delivered-To: svn-src-all@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 B5772BE1F94; Tue, 20 Sep 2016 16:28:18 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com [IPv6:2607:f8b0:4003:c06::229]) (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 7967B173; Tue, 20 Sep 2016 16:28:18 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi0-x229.google.com with SMTP id a62so28170993oib.1; Tue, 20 Sep 2016 09:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Kgq3aTGZAiF8CmLiy1NeBoEp0YAbqp4bpgjUpfCut+s=; b=ffa7F93gP/5LyyCtSWqbClnEFIwFfmGdNpWKXd+FoHguK5FA+hl7gtHmFzUpI0Nby2 5xGUv+c9uUDawTdJJw0F13Eluffo+migNH+H9Cy/Sebh2S8Ul7NUV9k5SxuB5BgQ6sjE 9hS6zYjISs7yD1rPXMfGVOq839wHO9bGkFNIDrWKe7fRGML29nOQZ7MYqHWr6v5BQsKz CKAt3q6qtxzFYCu7nlxgtrlGTxrxeNzHy55JwrnHZzutYj5E8QoMOPDaE/BJeCDlb0hV SFiCDTcD2/pfzyb3oGiqOodc+BGetPp3JxrJgKB97qw4d3vGKT09R+mBAJjS7atShkXa R5EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Kgq3aTGZAiF8CmLiy1NeBoEp0YAbqp4bpgjUpfCut+s=; b=Jlt6rTPqMGQoJPFyaaSjONtoBnuuZ/bNom8ORi9DaEGeRQaiOGtZYu3TyYlv9m+xWt C+FpvMOVvX+SRh19rAZHe+JWV4eF7uhr3j9Go5IRwRF+H1Ru7GHObWcY69eAS4/ejWBY my00eCGVSL+sPlS5UwY51SZLebd0kg0rzz6GPV1zhFLFBwxDFSU7eXibmcuL9AfP3xtU jIZuv77EMk9y15tgb3q+auqRPbE6MNnNESLoVhF0fqcEctGmmkiZjfTP7gM8YnZRtwjX iN1S9MGuBR5f+92HygdhZOEBto77hcsW6WGbL+oAffPuH3vdSBqPfVqglG+HHkDnVzmw wWcw== X-Gm-Message-State: AE9vXwOVpIHlIFaY3hLpmkzJQm2jba6hH+MzxujzYJk7sx9ZR3y02l6qaJxsya6llw7t2Itfolq+KLHxtmMDXw== X-Received: by 10.202.104.224 with SMTP id o93mr18505814oik.82.1474388897808; Tue, 20 Sep 2016 09:28:17 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.202.71.11 with HTTP; Tue, 20 Sep 2016 09:28:17 -0700 (PDT) In-Reply-To: References: <201609191746.u8JHkFKI071354@repo.freebsd.org> From: Alan Somers Date: Tue, 20 Sep 2016 10:28:17 -0600 X-Google-Sender-Auth: KHI41ExQqRUjc9o3Hu9I__2G-jk Message-ID: Subject: Re: svn commit: r305988 - in head/sys: geom sys To: Alexander Motin Cc: Edward Tomasz Napierala , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:28:18 -0000 On Tue, Sep 20, 2016 at 10:23 AM, Alexander Motin wrote: > On 20.09.2016 09:20, Alan Somers wrote: >> On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala >> wrote: >>> Author: trasz >>> Date: Mon Sep 19 17:46:15 2016 >>> New Revision: 305988 >>> URL: https://svnweb.freebsd.org/changeset/base/305988 >>> >>> Log: >>> Remove unused bio_taskqueue(). >>> >>> MFC after: 1 month >>> >>> Modified: >>> head/sys/geom/geom_io.c >>> head/sys/sys/bio.h >>> >> >> This is a KBI change, so you should bump __FreeBSD_version. You >> probably shouldn't MFC it, either. > > The last/only consumer of this KPI I know gone with FreeBSD 9 and old > ATA stack. Do you know any other? > > -- > Alexander Motin Nothing in-tree. But it's publicly visible, so we have no way of knowing who might be using it out-of-tree. From owner-svn-src-all@freebsd.org Tue Sep 20 16:28:58 2016 Return-Path: Delivered-To: svn-src-all@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 56AFBBE1FF8; Tue, 20 Sep 2016 16:28:58 +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 299E331A; Tue, 20 Sep 2016 16:28:58 +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 u8KGSvc3086676; Tue, 20 Sep 2016 16:28:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGSvsp086675; Tue, 20 Sep 2016 16:28:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609201628.u8KGSvsp086675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Sep 2016 16:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306031 - head/contrib/netbsd-tests/fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:28:58 -0000 Author: ngie Date: Tue Sep 20 16:28:57 2016 New Revision: 306031 URL: https://svnweb.freebsd.org/changeset/base/306031 Log: Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD Use kldstat -m to determine whether or not a filesystem is loaded. This works well with tmpfs, ufs, and zfs MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/fs/h_funcs.subr Modified: head/contrib/netbsd-tests/fs/h_funcs.subr ============================================================================== --- head/contrib/netbsd-tests/fs/h_funcs.subr Tue Sep 20 16:27:34 2016 (r306030) +++ head/contrib/netbsd-tests/fs/h_funcs.subr Tue Sep 20 16:28:57 2016 (r306031) @@ -45,6 +45,15 @@ require_fs() { # if we have autoloadable modules, just assume the file system atf_require_prog sysctl + # Begin FreeBSD + if true; then + if kldstat -m ${name}; then + found=yes + else + found=no + fi + else + # End FreeBSD autoload=$(sysctl -n kern.module.autoload) [ "${autoload}" = "1" ] && return 0 @@ -57,6 +66,9 @@ require_fs() { fi shift done + # Begin FreeBSD + fi + # End FreeBSD [ ${found} = yes ] || \ atf_skip "The kernel does not include support the " \ "\`${name}' file system" From owner-svn-src-all@freebsd.org Tue Sep 20 16:31:01 2016 Return-Path: Delivered-To: svn-src-all@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 12225BE216B; Tue, 20 Sep 2016 16:31:01 +0000 (UTC) (envelope-from gjb@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 BE273871; Tue, 20 Sep 2016 16:31:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KGUx7b086923; Tue, 20 Sep 2016 16:30:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGUxHk086922; Tue, 20 Sep 2016 16:30:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201630.u8KGUxHk086922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 16:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306032 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:31:01 -0000 Author: gjb Date: Tue Sep 20 16:30:59 2016 New Revision: 306032 URL: https://svnweb.freebsd.org/changeset/base/306032 Log: Document r298002, NCQ TRIM support, CAM_IOSCHED_ADATPIVE. Submitted by: imp Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:28:57 2016 (r306031) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:30:59 2016 (r306032) @@ -1620,6 +1620,30 @@ for parsing libucl-based configuration files has been added to &man.ctld.8;. + The &man.ahci.4; driver has been updated + to add NCQ TRIM support + for drives that support it. + + + Drives that advertise this feature but do not properly + support it have been blacklisted. Systems experiencing + traffic problems with NCQ + TRIM enabled can set the + kern.cam.ada.%d.quirks tunable to + 2 for 512k sectors or + 3 for 4096k sectors, replacing + %d with the drive number. + + + The &man.cam.4; driver has been updated to + allow I/O scheduling tuning to fit workload and drive + characteristics. This option is off by default, and can be + enabled by adding option + CAM_IOSCHED_ADATPIVE option to the kernel + configuration and recompiling the kernel. + The &man.camcontrol.8; command can manually force updating capacity data after a disk gets resized using the reprobe From owner-svn-src-all@freebsd.org Tue Sep 20 16:31:58 2016 Return-Path: Delivered-To: svn-src-all@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 CCCB4BE21C0; Tue, 20 Sep 2016 16:31:58 +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 99E66B6E; Tue, 20 Sep 2016 16:31:58 +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 u8KGVvXQ090455; Tue, 20 Sep 2016 16:31:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGVvuT090453; Tue, 20 Sep 2016 16:31:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609201631.u8KGVvuT090453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Sep 2016 16:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306033 - head/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:31:58 -0000 Author: ngie Date: Tue Sep 20 16:31:57 2016 New Revision: 306033 URL: https://svnweb.freebsd.org/changeset/base/306033 Log: Port sizes_test and statvfs_test to FreeBSD Similar to r306030, use a simpler method for getting the value of `hw.pagesize`, i.e. `sysctl -n hw.pagesize`. The awk filtering method doesn't work on FreeBSD MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh Modified: head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh Tue Sep 20 16:30:59 2016 (r306032) +++ head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh Tue Sep 20 16:31:57 2016 (r306033) @@ -54,7 +54,15 @@ big_head() { big_body() { test_mount -o -s10M + # Begin FreeBSD + if true; then + pagesize=$(sysctl -n hw.pagesize) + else + # End FreeBSD pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3) + # Begin FreeBSD + fi + # End FreeBSD eval $($(atf_get_srcdir)/h_tools statvfs . | sed -e 's|^f_|cf_|') cf_bused=$((${cf_blocks} - ${cf_bfree})) Modified: head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh Tue Sep 20 16:30:59 2016 (r306032) +++ head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh Tue Sep 20 16:31:57 2016 (r306033) @@ -38,7 +38,15 @@ values_head() { values_body() { test_mount -o -s10M + # Begin FreeBSD + if true; then + pagesize=$(sysctl -n hw.pagesize) + else + # End FreeBSD pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3) + # Begin FreeBSD + fi + # End FreeBSD eval $($(atf_get_srcdir)/h_tools statvfs .) [ ${pagesize} -eq ${f_bsize} ] || \ atf_fail "Invalid bsize" From owner-svn-src-all@freebsd.org Tue Sep 20 16:33:10 2016 Return-Path: Delivered-To: svn-src-all@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 C4470BE2281; Tue, 20 Sep 2016 16:33:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x243.google.com (mail-pa0-x243.google.com [IPv6:2607:f8b0:400e:c03::243]) (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 91B15E45; Tue, 20 Sep 2016 16:33:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x243.google.com with SMTP id oz2so1127886pac.0; Tue, 20 Sep 2016 09:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=1M2/l7zupafTuCUUfiNTc054gmyE7BcxgBlfegEPK6E=; b=eGgVu4nNuNzoHwDNxJrMKR6slt+HfLmDx+swp7xtNtmvHwvvZUT1TC3FE/daYIybtN Fpt+NrSnIi5aMxGc258ne0U3gclHNFektE6khuvUU29mr01kAlXPUmuxuAD/O3ky1gU9 q+bXwL21uuUnF/hh+EOPx0kOrG+W+UtMgsa2SghO+Y2ZUdWkNTm/EkNwcVWDoWydsedh gJRAoPXV7kOWkeDjH69LcLmVZCaZ8s95FEQI1R9b3auyQQTOHBo2T1PWP4lp8pD0nHtK 3ZlHGj0/fLXLq5u2Y3YwxNoeCslXjjySBDQi0nu85/FTpa0pvayytYVAzgdbG+Iu/tYl jOSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=1M2/l7zupafTuCUUfiNTc054gmyE7BcxgBlfegEPK6E=; b=gNKnZakGiYp/J74YsMX+rLF+Kqv7vfuY5LY4MILESX4ThNshaWEAEJrpDlvK2LD4aq eKoTLM/6BxS6HyNTkZe5E+fB66hjRJx1ztdVm+pAEyBUcSEXo2QS8EtCoPlFLaJ3WGCs AyLHja/vJQuMWbtjtdchs1ALZ6tnyDeuauHJvQr3h46kW95OLuAquC56nCz0X8jzcUUT +TNPEfNA2axpqvfMV3mi+QeQECnWw6D19zXHd/sHVnEHvGgUV8HTAXdcbHVvZYzh6iYx fTMQEvWmTM0Bqdd3LksuNChJCaJuzOOLqOA2wqdW7JGITxqNdP8rKVwCTtu5wYweE79j /TsQ== X-Gm-Message-State: AE9vXwN4BaT9IWwcM5j64CSVKyOXCJBqpYJTfdrQFPWso+AxvKE9tbYfmqDZsQ8ngjDCwQ== X-Received: by 10.66.25.143 with SMTP id c15mr56959668pag.90.1474389189878; Tue, 20 Sep 2016 09:33:09 -0700 (PDT) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id tw2sm40450269pac.41.2016.09.20.09.33.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Sep 2016 09:33:08 -0700 (PDT) Subject: Re: svn commit: r306031 - head/contrib/netbsd-tests/fs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5806376A-9AF9-4DDC-AC05-DAD9AE722096"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201609201628.u8KGSvsp086675@repo.freebsd.org> Date: Tue, 20 Sep 2016 09:33:07 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <9D1CC51D-C79A-4342-9E1B-F5A029E23F41@gmail.com> References: <201609201628.u8KGSvsp086675@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:33:10 -0000 --Apple-Mail=_5806376A-9AF9-4DDC-AC05-DAD9AE722096 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 20, 2016, at 09:28, Ngie Cooper wrote: >=20 > Author: ngie > Date: Tue Sep 20 16:28:57 2016 > New Revision: 306031 > URL: https://svnweb.freebsd.org/changeset/base/306031 >=20 > Log: > Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD >=20 > Use kldstat -m to determine whether or not a filesystem is loaded. = This works > well with tmpfs, ufs, and zfs This also works with msdosfs=E2=80=A6 (I forgot to check that sooner). Cheers... --Apple-Mail=_5806376A-9AF9-4DDC-AC05-DAD9AE722096 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX4WTDAAoJEPWDqSZpMIYVDz8P/iCjzJYqBlDtx2FXdTT4Yx7d kSxVMDTgsipgYMoMRAU3ko1kG+5kbhb/DfMrFeklY+T7rdhZbefkIxJwQBqkvDiO 0fbgsG5jcmpIduUGxwYf1s4ZUy9LX1p9gqxJL9soy3tfe8NwOwwSpnfvDTaBw881 e4UesvwOVcSyxGrG46ix/hS9XB3ikFbIP0z5+xLpKL5CBHyPj4X/ChghZvsOjI1s gO9B/EFziTryBrebSHJ1j/v+ebZ7Z/5gMFbvZSe/9RRRZ+9zNvWE1hScwWKj6aEj gMXkuSfTuSoKRzOoeD5i387f1zeEgtxUp0dNvqI/q966YlAYKRUku5MYRmbGDyhK jLhasTn85nq2WcUep8XaVCL9ylk4SFViFbKQwrJuVZ4P25XGbPpd6olnMHCcoySt xjT4CYjo1Zv0jk4D13y+8FyIJVTqoQ/TPIisMRoLmDIFxAdU0uQTUKKmYCt1UIxb TirYeFCTu2CR+ctuKoiXaVYojxGXWC9AeLTryNWWXjPs5PXYUIEC5Mv/5h2PSIkF PPjQFccr1cYDakKkn0r07RJDn+nM/QQ+xtn24Jm7LGVu/8EjOC1zZeYaDAa4QKIA NkBvAIAWpnEJfC3GtdnTKYkQltZ4LJvY7m15z9ux7Cz8G1QWO/KBxTycON/fWloF tOht7xRYQcvagsWzYiZI =IDi1 -----END PGP SIGNATURE----- --Apple-Mail=_5806376A-9AF9-4DDC-AC05-DAD9AE722096-- From owner-svn-src-all@freebsd.org Tue Sep 20 16:34:37 2016 Return-Path: Delivered-To: svn-src-all@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 0CA2DBE231A; Tue, 20 Sep 2016 16:34:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com [IPv6:2607:f8b0:400e:c03::241]) (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 CA74510D7; Tue, 20 Sep 2016 16:34:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x241.google.com with SMTP id oz2so1129407pac.0; Tue, 20 Sep 2016 09:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=GzWiKQOa/F6dTnaNWkpjtBV3qdk65e4vsM9ji/TInvI=; b=w/Sh8Im+Yz4fJgcSHvwav/KfaVQGqicefrFaGhhiKZsGTGK4UXXMV3bGHuFGYC5Lhi +hu8ds2z9CljKJn5InfGClxxmaHSZj/ox6x119Y4ch4iYlxGDHFOsVNH6U5K2MbUDt0Q 5wbmAgarhfmMt4drnrzIY5xQrzvwz1WHj31vrC+K2x7vLKXgTE/itAXG5BCG32Yyfv9h wpyWvkt0zgTuyY/W0ucLf9qj20QD1bWaMP9Of4Zxnw6ejJz7jBWxmK/csLhFj4gMx4w5 Z+4qwwd6CN73nkYa3zrOKmD0l+FnbZJZ9n7tB2m61ulM3EjZur8wyT+j4b8avU36slDH f5Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=GzWiKQOa/F6dTnaNWkpjtBV3qdk65e4vsM9ji/TInvI=; b=RelHQcuSm8JY9Y1lGV1nrKYbItYqyAm3eSCTero3s3Ug9kwYk/litXdnalZv+/NNPg Pb/1KlOcazmlLYQpYbAw2DCFEmIe2B/K+l3qScYbgOlwCpJwPpd2PCJdb3Eu+eyWhVK9 jqnOeAJFmrGDn1VuuibZTqtrh7OteH35gtmTaw3p0aQtCAEI5jkm5Ns7ytKiMS23qYYl BdkxLCDAWM+zZOtm18tvrmkcC3D6+WMkuddPYTXwJ40itej0WmtX/O6CLfiGrR5jT5BU NCmkvzxTN1Omzbd7gp8jT06qmljimoQuWHhvFEINz+GPyqWfLu5yR/Kz6CXR3kdsCgMU UNaw== X-Gm-Message-State: AE9vXwN8b7ocNAlBJr/YAGTa3R1Qkk+7B6Fxk8unFSmH6V3tcxhsZIHcJhoQYVzcKSDOHw== X-Received: by 10.66.160.99 with SMTP id xj3mr57198499pab.73.1474389276203; Tue, 20 Sep 2016 09:34:36 -0700 (PDT) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d5sm80445291pfc.4.2016.09.20.09.34.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Sep 2016 09:34:35 -0700 (PDT) Subject: Re: svn commit: r305988 - in head/sys: geom sys Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_71FB91B2-CF59-488C-BAA4-5DC1DF807AAC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 20 Sep 2016 09:34:34 -0700 Cc: Alexander Motin , Edward Tomasz Napierala , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <03DFBBFF-FA98-48CB-8180-B03B37538301@gmail.com> References: <201609191746.u8JHkFKI071354@repo.freebsd.org> To: Alan Somers X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:34:37 -0000 --Apple-Mail=_71FB91B2-CF59-488C-BAA4-5DC1DF807AAC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 20, 2016, at 09:28, Alan Somers wrote: >=20 > On Tue, Sep 20, 2016 at 10:23 AM, Alexander Motin = wrote: >> On 20.09.2016 09:20, Alan Somers wrote: >>> On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala >>> wrote: >>>> Author: trasz >>>> Date: Mon Sep 19 17:46:15 2016 >>>> New Revision: 305988 >>>> URL: https://svnweb.freebsd.org/changeset/base/305988 >>>>=20 >>>> Log: >>>> Remove unused bio_taskqueue(). >>>>=20 >>>> MFC after: 1 month >>>>=20 >>>> Modified: >>>> head/sys/geom/geom_io.c >>>> head/sys/sys/bio.h >>>>=20 >>>=20 >>> This is a KBI change, so you should bump __FreeBSD_version. You >>> probably shouldn't MFC it, either. >>=20 >> The last/only consumer of this KPI I know gone with FreeBSD 9 and old >> ATA stack. Do you know any other? >=20 > Nothing in-tree. But it's publicly visible, so we have no way of > knowing who might be using it out-of-tree. I=E2=80=99d have to check, but this might impact us (Isilon). We don=E2=80= =99t use the __FreeBSD_version #ifdefs though in our code, so it=E2=80=99s= fine from my perspective to leave things alone. That being said, are you sure that port klds (e.g. open-vm-tools*) = aren=E2=80=99t impacted by this change? Did it go through a ports -exp = run? Thanks, -Ngie --Apple-Mail=_71FB91B2-CF59-488C-BAA4-5DC1DF807AAC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX4WUaAAoJEPWDqSZpMIYVuCUQAJCMvYniKW9Db2qu8Ee/Q66j 92zHotDesDrI1NiXKCVCdzOoCb28DhoH0Ov5J6C5uOJg6S3ny2cohTVDI4p4qpSg oYQ9iFHpfXCgH/1hcBI4yW0b6X7OihQTMdzkesQSUiVBYIC/47m93z/CPliKHM8R ye9WyhP9swSVnu7tpw6rpVVRJxOszD6SNAPORV6tfb0ltfUj0GeUowvkUWMtEOmr x1bbXXO1ZOVWBqFvlHiUwfGlBZ944Flo3IqCjxkc9PHh2q93ktNg51MWxAJeEMIj KO4E0lgLS6BoDaPwQW9rN6uunBBz8z6o7CwdWwF2Hx9jDft6DyEzVCrxfFssO2ov qydEFCRLhhR9hhNVobjEvReea5AQP1LYAOBiUJDIx1Vk4k9P1t03inujInkP6noI q7Xx7rQY/mEEUFfPU6CPRcPcAnXRhigdT3r9B3cIdd/WkW/wkibiMSU/G88V4mhg ztsj2Gvm6lD8d+PQAjEJs2kBIBaiSd/5F4pi1lUyAiOhvoVO4XVucXb+18g0Ny0R iVIkm8WA4GDnjtaR8Wrbg0hNlFe9VRZ1M0q9jzhtRsBH+AGqCEO1VDFpPoYAU1Ge FxmLBS38kMiC4XjC31sSrsBa/bs6uuWCDzd/HW7Ma2+/TMr67+ocxXeSd+3LAt5v Qmnm33V8F6DUiU4+gWvZ =WyjU -----END PGP SIGNATURE----- --Apple-Mail=_71FB91B2-CF59-488C-BAA4-5DC1DF807AAC-- From owner-svn-src-all@freebsd.org Tue Sep 20 16:35:58 2016 Return-Path: Delivered-To: svn-src-all@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 EA38CBE23B6; Tue, 20 Sep 2016 16:35:58 +0000 (UTC) (envelope-from gjb@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 B94A6128A; Tue, 20 Sep 2016 16:35:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KGZvmP090896; Tue, 20 Sep 2016 16:35:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGZv68090895; Tue, 20 Sep 2016 16:35:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201635.u8KGZv68090895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 16:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306034 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:35:59 -0000 Author: gjb Date: Tue Sep 20 16:35:57 2016 New Revision: 306034 URL: https://svnweb.freebsd.org/changeset/base/306034 Log: Document 285307, cloudabi Submitted by: ed Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:31:57 2016 (r306033) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:35:57 2016 (r306034) @@ -1035,6 +1035,13 @@ &man.numactl.1;, and &man.numa.getaffinity.2;, for usage details. + Support for running CloudABI executables + on amd64 and arm64 has been added. CloudABI is a runtime + environment that uses capability-based security exclusively, + similar to &man.capsicum.4; always being enabled. It allows + designing, implementing and testing strongly sandboxed + applications more easily. + The &man.pms.4; driver has been added to the GENERIC kernel configuration for supported architectures. From owner-svn-src-all@freebsd.org Tue Sep 20 16:36:56 2016 Return-Path: Delivered-To: svn-src-all@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 B6F03BE241A; Tue, 20 Sep 2016 16:36:56 +0000 (UTC) (envelope-from gjb@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 899311481; Tue, 20 Sep 2016 16:36:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KGatRB090978; Tue, 20 Sep 2016 16:36:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGat87090977; Tue, 20 Sep 2016 16:36:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201636.u8KGat87090977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 16:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306035 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:36:56 -0000 Author: gjb Date: Tue Sep 20 16:36:55 2016 New Revision: 306035 URL: https://svnweb.freebsd.org/changeset/base/306035 Log: Fix an incorrect revision. Submitted by: avos Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:35:57 2016 (r306034) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:36:55 2016 (r306035) @@ -449,7 +449,7 @@ falling back to the PCI ID database in the &os; base system. - By default the &man.ifconfig.8; utility + By default the &man.ifconfig.8; utility will set the default regulatory domain to FCC on wireless interfaces. As a result, newly created wireless interfaces with default settings will From owner-svn-src-all@freebsd.org Tue Sep 20 16:37:04 2016 Return-Path: Delivered-To: svn-src-all@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 5061FBE2445; Tue, 20 Sep 2016 16:37:04 +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 DD43315D4; Tue, 20 Sep 2016 16:37:03 +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 u8KGb30b091033; Tue, 20 Sep 2016 16:37:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGb2wT091031; Tue, 20 Sep 2016 16:37:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609201637.u8KGb2wT091031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Sep 2016 16:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306036 - head/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:37:04 -0000 Author: ngie Date: Tue Sep 20 16:37:02 2016 New Revision: 306036 URL: https://svnweb.freebsd.org/changeset/base/306036 Log: Port to mknod_test and readdir_test to FreeBSD The `mknod p` command doesn't exist on FreeBSD, like on NetBSD. Use mkfifo instead to create named pipes (FIFOs). MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh Modified: head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh Tue Sep 20 16:36:55 2016 (r306035) +++ head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh Tue Sep 20 16:37:02 2016 (r306036) @@ -106,7 +106,15 @@ pipe_body() { test_mount umask 022 + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mkfifo pipe + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty mknod pipe p + # Begin FreeBSD + fi + # End FreeBSD eval $(stat -s pipe) [ ${st_mode} = 010644 ] || atf_fail "Invalid mode" @@ -124,7 +132,15 @@ pipe_kqueue_body() { umask 022 atf_check -s eq:0 -o empty -e empty mkdir dir + # Begin FreeBSD + if true; then + echo 'mkfifo dir/pipe' | kqueue_monitor 1 dir + else + # End FreeBSD echo 'mknod dir/pipe p' | kqueue_monitor 1 dir + # Begin FreeBSD + fi + # End FreeBSD kqueue_check dir NOTE_WRITE test_unmount Modified: head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh Tue Sep 20 16:36:55 2016 (r306035) +++ head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh Tue Sep 20 16:37:02 2016 (r306036) @@ -59,7 +59,15 @@ types_body() { atf_check -s eq:0 -o empty -e empty ln -s reg lnk atf_check -s eq:0 -o empty -e empty mknod blk b 0 0 atf_check -s eq:0 -o empty -e empty mknod chr c 0 0 + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mkfifo fifo + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty mknod fifo p + # Begin FreeBSD + fi + # End FreeBSD atf_check -s eq:0 -o empty -e empty \ $(atf_get_srcdir)/h_tools sockets sock From owner-svn-src-all@freebsd.org Tue Sep 20 16:39:42 2016 Return-Path: Delivered-To: svn-src-all@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 B33E1BE2519; Tue, 20 Sep 2016 16:39:42 +0000 (UTC) (envelope-from gjb@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 85E6117BD; Tue, 20 Sep 2016 16:39:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KGdfGs091158; Tue, 20 Sep 2016 16:39:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGdfQN091157; Tue, 20 Sep 2016 16:39:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201639.u8KGdfQN091157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 16:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306037 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:39:42 -0000 Author: gjb Date: Tue Sep 20 16:39:41 2016 New Revision: 306037 URL: https://svnweb.freebsd.org/changeset/base/306037 Log: Fix a typo. Submitted by: vangyzen Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:37:02 2016 (r306036) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:39:41 2016 (r306037) @@ -1648,7 +1648,7 @@ allow I/O scheduling tuning to fit workload and drive characteristics. This option is off by default, and can be enabled by adding option - CAM_IOSCHED_ADATPIVE option to the kernel + CAM_IOSCHED_ADAPTIVE option to the kernel configuration and recompiling the kernel. The From owner-svn-src-all@freebsd.org Tue Sep 20 16:40:16 2016 Return-Path: Delivered-To: svn-src-all@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 971E4BE2571; Tue, 20 Sep 2016 16:40:16 +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 4CC6B1939; Tue, 20 Sep 2016 16:40:16 +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 u8KGeFBt091243; Tue, 20 Sep 2016 16:40:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGeFZl091242; Tue, 20 Sep 2016 16:40:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609201640.u8KGeFZl091242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Sep 2016 16:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306038 - head/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:40:16 -0000 Author: ngie Date: Tue Sep 20 16:40:15 2016 New Revision: 306038 URL: https://svnweb.freebsd.org/changeset/base/306038 Log: Port vnd_test to FreeBSD Use mdmfs/mdconfig instead of vndconfig/newfs. vndconfig doesn't exist on FreeBSD. TODO: need to parameterize out the md(4) device as it's currently hardcoded to "3" (in both the FreeBSD and NetBSD cases). MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Modified: head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Tue Sep 20 16:39:41 2016 (r306037) +++ head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Tue Sep 20 16:40:15 2016 (r306038) @@ -38,12 +38,21 @@ basic_body() { atf_check -s eq:0 -o ignore -e ignore \ dd if=/dev/zero of=disk.img bs=1m count=10 + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mkdir mnt + atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md3 mnt + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig /dev/vnd3 disk.img atf_check -s eq:0 -o ignore -e ignore newfs /dev/rvnd3a atf_check -s eq:0 -o empty -e empty mkdir mnt atf_check -s eq:0 -o empty -e empty mount /dev/vnd3a mnt + # Begin FreeBSD + fi + # End FreeBSD echo "Creating test files" for f in $(jot -w %u 100 | uniq); do @@ -58,7 +67,15 @@ basic_body() { done atf_check -s eq:0 -o empty -e empty umount mnt + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig -u /dev/vnd3 + # Begin FreeBSD + fi + # End FreeBSD test_unmount touch done @@ -66,7 +83,15 @@ basic_body() { basic_cleanup() { if [ ! -f done ]; then 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 + else + # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 + # Begin FreeBSD + fi + # End FreeBSD fi } From owner-svn-src-all@freebsd.org Tue Sep 20 16:48:26 2016 Return-Path: Delivered-To: svn-src-all@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 D7AFBBE2A29; Tue, 20 Sep 2016 16:48:26 +0000 (UTC) (envelope-from gjb@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 A7E3F393; Tue, 20 Sep 2016 16:48:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KGmPTT095477; Tue, 20 Sep 2016 16:48:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGmPII095476; Tue, 20 Sep 2016 16:48:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201648.u8KGmPII095476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 16:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306039 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:48:26 -0000 Author: gjb Date: Tue Sep 20 16:48:25 2016 New Revision: 306039 URL: https://svnweb.freebsd.org/changeset/base/306039 Log: Update the entry for r279463, and move it to the correct section. Submitted by: rstone Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:40:15 2016 (r306038) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:48:25 2016 (r306039) @@ -711,12 +711,6 @@ equivalent script is available from the net/mrouted port. - A new &man.rc.8; script, - iovctl, has been added, which allows - automatically starting the &man.iovctl.8; utility at - boot. - The &man.service.8; utility has been updated to honor entries within + Support for PCI Single Root I/O + Virtualization (SR-IOV) has been introduced, allowing the + creation of PCI Virtual Functions (VFs) for device drivers + that support SR-IOV. See &man.iovctl.8; for details on + creating and configuring VFs. + The &man.bhyve.8; hypervisor has been updated to support DSM TRIM commands for virtual AHCI disks. From owner-svn-src-all@freebsd.org Tue Sep 20 16:56:00 2016 Return-Path: Delivered-To: svn-src-all@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 EB02FBE2D15; Tue, 20 Sep 2016 16:56:00 +0000 (UTC) (envelope-from gjb@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 BD3A4BD5; Tue, 20 Sep 2016 16:56:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KGu06Q099216; Tue, 20 Sep 2016 16:56:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KGu0NH099215; Tue, 20 Sep 2016 16:56:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201656.u8KGu0NH099215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 16:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306040 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 16:56:01 -0000 Author: gjb Date: Tue Sep 20 16:55:59 2016 New Revision: 306040 URL: https://svnweb.freebsd.org/changeset/base/306040 Log: Expand the r285387 entry to include information for cases where NUMA may be disabled due to system BIOS. Submitted by: vangyzen Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:48:25 2016 (r306039) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 16:55:59 2016 (r306040) @@ -1029,6 +1029,14 @@ &man.numactl.1;, and &man.numa.getaffinity.2;, for usage details. + + If the system BIOS generates an invalid ACPI SRAT table, + the kernel will ignore it, effectively disabling + NUMA. If dmesg shows "SRAT: + Duplicate local APIC ID", try updating the BIOS to fix + NUMA support. + + Support for running CloudABI executables on amd64 and arm64 has been added. CloudABI is a runtime environment that uses capability-based security exclusively, From owner-svn-src-all@freebsd.org Tue Sep 20 17:07:15 2016 Return-Path: Delivered-To: svn-src-all@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 CB4DDBE23B7; Tue, 20 Sep 2016 17:07:15 +0000 (UTC) (envelope-from emaste@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 95DC819A5; Tue, 20 Sep 2016 17:07:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KH7Ecr003573; Tue, 20 Sep 2016 17:07:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KH7E8Z003569; Tue, 20 Sep 2016 17:07:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609201707.u8KH7E8Z003569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Sep 2016 17:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306041 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 17:07:15 -0000 Author: emaste Date: Tue Sep 20 17:07:14 2016 New Revision: 306041 URL: https://svnweb.freebsd.org/changeset/base/306041 Log: Always pass -m to ld for converting binary files to kernel ELF objects This is in preparation for linking with LLVM's lld, which does not have a compiled-in default output emulation. lld requires that it is specified via the -m option, or obtained from the object file(s) being linked. This will also allow all build targets to share a common linker binary. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7837 Modified: head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Sep 20 16:55:59 2016 (r306040) +++ head/sys/conf/kern.mk Tue Sep 20 17:07:14 2016 (r306041) @@ -244,3 +244,23 @@ CFLAGS+= -std=iso9899:1999 .else # CSTD CFLAGS+= -std=${CSTD} .endif # CSTD + +# Set target-specific linker emulation name. Used by ld -b binary to convert +# binary files into ELF objects. +LD_EMULATION_aarch64=aarch64elf +LD_EMULATION_amd64=elf_x86_64_fbsd +LD_EMULATION_arm=armelf_fbsd +LD_EMULATION_armeb=armelf_fbsd +LD_EMULATION_armv6=armelf_fbsd +LD_EMULATION_i386=elf_i386_fbsd +LD_EMULATION_mips= elf32btsmip_fbsd +LD_EMULATION_mips64= elf64btsmip_fbsd +LD_EMULATION_mipsel= elf32ltsmip_fbsd +LD_EMULATION_mips64el= elf64ltsmip_fbsd +LD_EMULATION_mipsn32= elf32btsmipn32_fbsd +LD_EMULATION_mipsn32el= elf32btsmipn32_fbsd # I don't think this is a thing that works +LD_EMULATION_powerpc= elf32ppc_fbsd +LD_EMULATION_powerpc64= elf64ppc_fbsd +LD_EMULATION_riscv= elf64riscv +LD_EMULATION_sparc64= elf64_sparc_fbsd +LD_EMULATION=${LD_EMULATION_${MACHINE_ARCH}} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Sep 20 16:55:59 2016 (r306040) +++ head/sys/conf/kern.pre.mk Tue Sep 20 17:07:14 2016 (r306041) @@ -119,7 +119,7 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops. NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC} NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ - -o ${.TARGET} ${.ALLSRC:M*.fw} + -m ${LD_EMULATION} -o ${.TARGET} ${.ALLSRC:M*.fw} # Common for dtrace / zfs CDDL_CFLAGS= -DFREEBSD_NAMECACHE -nostdinc -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common -I$S -I$S/cddl/contrib/opensolaris/common ${CFLAGS} -Wno-unknown-pragmas -Wno-missing-prototypes -Wno-undef -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses -Wno-redundant-decls -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wno-inline -Wno-switch -Wno-pointer-arith -Wno-unknown-pragmas Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Sep 20 16:55:59 2016 (r306040) +++ head/sys/conf/kmod.mk Tue Sep 20 17:07:14 2016 (r306041) @@ -171,11 +171,13 @@ ${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\: @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} @if [ -e ${_firmw:C/\:.*$//} ]; then \ ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ - -r -d -o ${.TARGET} ${_firmw:C/\:.*$//}; \ + -m ${LD_EMULATION} -r -d \ + -o ${.TARGET} ${_firmw:C/\:.*$//}; \ else \ ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \ ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ - -r -d -o ${.TARGET} ${_firmw:C/\:.*$//}; \ + -m ${LD_EMULATION} -r -d \ + -o ${.TARGET} ${_firmw:C/\:.*$//}; \ rm ${_firmw:C/\:.*$//}; \ fi From owner-svn-src-all@freebsd.org Tue Sep 20 17:26:03 2016 Return-Path: Delivered-To: svn-src-all@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 66024BE2C1E; Tue, 20 Sep 2016 17:26:03 +0000 (UTC) (envelope-from gjb@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 3611190B; Tue, 20 Sep 2016 17:26:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KHQ2cX011252; Tue, 20 Sep 2016 17:26:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KHQ2PX011251; Tue, 20 Sep 2016 17:26:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201726.u8KHQ2PX011251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 17:26:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306042 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 17:26:03 -0000 Author: gjb Date: Tue Sep 20 17:26:02 2016 New Revision: 306042 URL: https://svnweb.freebsd.org/changeset/base/306042 Log: - Remove redundant wording. - Update MK_ARM_EABI entry to note it is the default. - Reword the entry for r290910. - Fix various wording nits. - Remove redundant '[arch]' tags where they are already specified. - Various rewordings. Submitted by: theraven (first pass from his feedback) Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 17:07:14 2016 (r306041) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 17:26:02 2016 (r306042) @@ -163,7 +163,7 @@ includes files in the /etc/newsyslog.conf.d/ and /usr/local/etc/newsyslog.conf.d/ - directories by default for &man.newsyslog.8;. + directories for &man.newsyslog.8;. The &man.mailwrapper.8; utility has been updated to use &man.mailer.conf.5; from the @@ -172,12 +172,13 @@ if unset. The MK_ARM_EABI - &man.src.conf.5; option has been removed. + &man.src.conf.5; option has been removed and is now the only + supported ABI for &os;/&arch.arm;. The ntp suite has been updated to version 4.2.8p8. - The + /etc/ntp/leap-seconds has been updated to version 3676752000. @@ -194,11 +195,12 @@ &man.dmesg.8; is now printed, opposed to the previous output Exec format error.. - Allow &man.pciconf.8; to identify PCI - devices that are attached to a driver to be identified by - their device name instead of just the selector. Additionally, - the -l flag now accepts an optional device - argument to list details about a single device. + The &man.pciconf.8; utility can now + identify PCI devices that are attached to a driver to be + identified by their device name instead of just the selector. + Additionally, the -l flag now accepts an + optional device argument to list details about a single + device. A new flag, onifconsole has been added to /etc/ttys. This allows @@ -304,8 +306,8 @@ MBR EFI partition type. - The &man.ptrace.2; system - call has been updated include support for Altivec registers on + The &man.ptrace.2; system call has been + updated include support for Altivec registers on &os;/&arch.powerpc;. A new device control utility, @@ -317,14 +319,15 @@ The &man.netstat.1; utility has been - updated to link against the &man.libxo.3; shared - library. + updated to use &man.libxo.3; to optionally generate + machine-readable output. A new flag, -c, has been added to the &man.mkimg.1; utility, which allows specifying the capacity of the target disk image. The + UEFI Secure Boot signing utility, &man.uefisign.8; utility has been added. A new utility, &man.sesutil.8;, has been added, which is used - to manage &man.ses.4; devices. + to manage &man.ses.4; (SCSI Environmental + Services) devices. The &man.pciconf.8; utility has been updated to use the PCI ID database from the The &man.xz.1; utility has been updated to support multi-threaded compression. - The - elftoolchain utilities have been - updated to version 3179. - The &man.nvi.1; utility has been updated to version 2.1.3. @@ -869,11 +869,11 @@ &man.sysctl.8; on &intel; processors with Turbo Boost ™ enabled has been fixed. - Support for - &man.dtrace.1; stack tracing has been fixed for - &os;/&arch.powerpc;, using the trapexit() - and asttrapexit() functions instead of - checking within addressed kernel space. + Support for &man.dtrace.1; stack tracing + has been fixed for &os;/&arch.powerpc;, using the + trapexit() and + asttrapexit() functions instead of checking + within addressed kernel space. A kernel panic triggered when destroying a &man.vnet.9; &man.jail.8; configured with &man.gif.4; has @@ -907,9 +907,8 @@ - Support for - &man.dtrace.1; has been added for the - Book-E ™. + Support for &man.dtrace.1; has been + added for the PowerPC Book-E ™. The &man.kqueue.2; system call has been @@ -923,7 +922,7 @@ The IMAGACT_BINMISC kernel configuration option has been enabled by default, which enables application execution through emulators, such - as Qemu. + as QEMU. The VT kernel configuration file has been removed, and the &man.vt.4; @@ -938,10 +937,9 @@ class="directory">src/ tree, specified as an argument to the -s flag. - The - &os;/&arch.powerpc64; kernel now builds as - a position-independent executable, allowing the kernel to be - loaded into and run from any physical or virtual + The &os;/&arch.powerpc64; kernel now + builds as a position-independent executable, allowing the + kernel to be loaded into and run from any physical or virtual address. @@ -950,7 +948,7 @@ system. - A new module for creating + A new module for creating rpi.dtb has been added for the Raspberry Pi. @@ -959,15 +957,13 @@ /boot/dtb/ by default for the Raspberry Pi system. - Kernel support for Vector-Scalar eXtension - (VSX) found on POWER7 and POWER8 hardware - has been added. - - The &man.pmap.9; implementation for 64-bit - &powerpc; processors has been overhaulded to improve - concurrency. + Kernel + support for Vector-Scalar eXtension (VSX) + found on POWER7 and POWER8 hardware has been added. + + The + &man.pmap.9; implementation for 64-bit &powerpc; processors + has been overhaulded to improve concurrency. A new module for creating the dtb module for AM335x systems has @@ -994,7 +990,7 @@ configuration has been added, allowing building &man.siftr.4; statically into the kernel. - The &arch.arm; boot loader, + The &arm; boot loader, ubldr, is now relocatable. In addition, ubldr.bin is now created during build time, which is a stripped binary with an entry point of @@ -1518,32 +1514,31 @@ The &man.nand.4; device is enabled for ARM devices by default. - Support for the Exynos 5420 - Octa system has been added. + Support for the Exynos 5420 Octa system + has been added. - The SMP - option has been enabled for all Exynos 5 systems supported by + The SMP option has + been enabled for all Exynos 5 systems supported by &os;. - Support for the Toradex - Apalis i.MX6 development board has been added. + Support for the Toradex Apalis i.MX6 + development board has been added. - An issue that could cause - instability when detecting SD cards on the - Raspberry Pi SOC has been fixed. + An issue that could cause instability + when detecting SD cards on the Raspberry Pi + SOC has been fixed. The bcm2835_cpufreq driver has been added, which supports CPU frequency and voltage control on the Raspberry Pi SOC. - Support to turn off the - BeagleBone Black system with the &man.shutdown.8; - -p flag or by invoking &man.poweroff.8; has - been added. + Support to turn off the BeagleBone Black + system with the &man.shutdown.8; -p flag or + by invoking &man.poweroff.8; has been added. - Audio transmission drivers - have been added for Digital Audio Multiplexer + Audio transmission drivers have been + added for Digital Audio Multiplexer (AUDMUXM), Smart Direct Memory Access Controller (SDMA), and Syncronous Serial Interface (SSI). @@ -1552,14 +1547,13 @@ support for the ARM AArch64 architecture has been added. - Kernel support for Thumb-2 - userland has been added. + Kernel support for Thumb-2 userland has + been added. - Support for the hardware power button - on the BeagleBone Black system has been added. + Support for the hardware power button on + the BeagleBone Black system has been added. - Initial + Initial ACPI support has been added for &os;/&arch.arm64;. @@ -1568,29 +1562,28 @@ &man.gpio.4;. See &man.ow.4;, &man.owc.4;, and &man.ow.temp.4; for more information. - Support for the HiSilicon HI6220 SoC has - been added. + been added. - The second CPU core on - Allwinner A20 SoC have been enabled. + The second CPU core on Allwinner A20 SoC + have been enabled. - Support for the Allwinner H3 - SoC has been added. + Support for the Allwinner H3 SoC has + been added. - Support for X-Powers AXP813 - and AXP818 power management integrated circuits have been - added. + Support for X-Powers AXP813 and AXP818 + power management integrated circuits have been added. - Support for the Allwinner - Reduced Serial Bus (RSB) has been added. + Support for the Allwinner Reduced Serial + Bus (RSB) has been added. - Support for Allwinner A20 - HDMI has been added. + Support for Allwinner A20 HDMI has been + added. - Support for GPIO, Sensors and - interrupts on AXP209 power management integrated circuits have - been added. + Support for GPIO, Sensors and interrupts + on AXP209 power management integrated circuits have been + added.
From owner-svn-src-all@freebsd.org Tue Sep 20 17:30:35 2016 Return-Path: Delivered-To: svn-src-all@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 3C860BE2D81; Tue, 20 Sep 2016 17:30:35 +0000 (UTC) (envelope-from gjb@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 0F4EDC82; Tue, 20 Sep 2016 17:30:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KHUYM5011556; Tue, 20 Sep 2016 17:30:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KHUYM4011555; Tue, 20 Sep 2016 17:30:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201730.u8KHUYM4011555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 17:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306043 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 17:30:35 -0000 Author: gjb Date: Tue Sep 20 17:30:34 2016 New Revision: 306043 URL: https://svnweb.freebsd.org/changeset/base/306043 Log: Document r289315, resolver reloads resolv.conf if mtime changes. Fix a spacing nit while here. Submitted by: vangyzen Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 17:26:02 2016 (r306042) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 17:30:34 2016 (r306043) @@ -453,6 +453,11 @@ falling back to the PCI ID database in the &os; base system. + The + resolver library has been updated to reload + /etc/resolv.conf if the modification time + has changed. + By default the &man.ifconfig.8; utility will set the default regulatory domain to FCC on wireless interfaces. As a result, @@ -1564,7 +1569,7 @@ Support for the HiSilicon HI6220 SoC has - been added. + been added. The second CPU core on Allwinner A20 SoC have been enabled. From owner-svn-src-all@freebsd.org Tue Sep 20 17:53:35 2016 Return-Path: Delivered-To: svn-src-all@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 089F6BE279A; Tue, 20 Sep 2016 17:53:35 +0000 (UTC) (envelope-from gjb@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 CCC80F7C; Tue, 20 Sep 2016 17:53:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KHrYXO022597; Tue, 20 Sep 2016 17:53:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KHrYPS022596; Tue, 20 Sep 2016 17:53:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201753.u8KHrYPS022596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 17:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306044 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 17:53:35 -0000 Author: gjb Date: Tue Sep 20 17:53:33 2016 New Revision: 306044 URL: https://svnweb.freebsd.org/changeset/base/306044 Log: Document r300779, dummynet(4) AQM addition. Submitted by: truckman Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 17:30:34 2016 (r306043) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 17:53:33 2016 (r306044) @@ -1342,6 +1342,13 @@ The &man.lagg.4; driver has been updated to remove support for the fec protocol. + + The &man.dummynet.4; driver has been + updated to include support for AQM (Active + Queue Management), adding support for PIE + (Proportional Integral controller Enhanced) and + FQ-PIE (Fair Queueing Proportional Integral + controller Enhanced). From owner-svn-src-all@freebsd.org Tue Sep 20 18:02:18 2016 Return-Path: Delivered-To: svn-src-all@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 1DEF3BE2A58; Tue, 20 Sep 2016 18:02:18 +0000 (UTC) (envelope-from gjb@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 C7190766; Tue, 20 Sep 2016 18:02:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KI2Gj3026496; Tue, 20 Sep 2016 18:02:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KI2G6h026495; Tue, 20 Sep 2016 18:02:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201802.u8KI2G6h026495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 18:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306045 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 18:02:18 -0000 Author: gjb Date: Tue Sep 20 18:02:16 2016 New Revision: 306045 URL: https://svnweb.freebsd.org/changeset/base/306045 Log: Wording fixes and further clarifications. Submitted by: cperciva Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 17:53:33 2016 (r306044) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 18:02:16 2016 (r306045) @@ -242,9 +242,9 @@ The &man.primes.6; utility has been updated to correctly enumerate prime numbers between 4295098369 and - 3825123056546413050, which prior to this - change, it would be possible for returned values to be - incorrectly identified as prime numbers. + 3825123056546413050. Prior to this change, + it was possible for returned values to be incorrectly + identified as prime numbers. The &man.mkimg.1; utility has been updated to include three options used to print information @@ -709,7 +709,8 @@ A new &man.rc.8; script, growfs, has been added, which will resize the root filesystem on boot if /firstboot - exists. + exists and growfs_enable is enabled in + &man.rc.conf.5;. The mrouted &man.rc.8; script has been removed from the base system. An @@ -1508,9 +1509,9 @@ &man.hv.netvsc.4; driver has been updated to support checksum offloading and TSO. - The &man.xen.4; driver has been updated - to include support for blkif indirect - segment I/O. + The &man.xen.4; blkfront driver has been + updated to include support for blkif + indirect segment I/O. Indirect segment I/O is enabled by default in the Xen blkfront driver when running on AWS From owner-svn-src-all@freebsd.org Tue Sep 20 18:08:18 2016 Return-Path: Delivered-To: svn-src-all@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 4C686BE2B4E; Tue, 20 Sep 2016 18:08:18 +0000 (UTC) (envelope-from markj@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 2A343BC1; Tue, 20 Sep 2016 18:08:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KI8HvQ026867; Tue, 20 Sep 2016 18:08:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KI8HJu026866; Tue, 20 Sep 2016 18:08:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609201808.u8KI8HJu026866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 20 Sep 2016 18:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306046 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 18:08:18 -0000 Author: markj Date: Tue Sep 20 18:08:17 2016 New Revision: 306046 URL: https://svnweb.freebsd.org/changeset/base/306046 Log: Reduce code duplication around NDP message handlers in icmp6_input(). No functional change intended. MFC after: 2 weeks Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Tue Sep 20 18:02:16 2016 (r306045) +++ head/sys/netinet6/icmp6.c Tue Sep 20 18:08:17 2016 (r306046) @@ -734,36 +734,19 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_router_solicit)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - /* give up local */ - - /* Send incoming SeND packet to user space. */ - if (send_sendso_input_hook != NULL) { - IP6_EXTHDR_CHECK(m, off, - icmp6len, IPPROTO_DONE); - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - /* -1 == no app on SEND socket */ - if (error == 0) - return (IPPROTO_DONE); - nd6_rs_input(m, off, icmp6len); - } else - nd6_rs_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - IP6_EXTHDR_CHECK(n, off, - icmp6len, IPPROTO_DONE); - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + IP6_EXTHDR_CHECK(m, off, icmp6len, IPPROTO_DONE); + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - /* -1 == no app on SEND socket */ - nd6_rs_input(n, off, icmp6len); - } else - nd6_rs_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_rs_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_ROUTER_ADVERT: @@ -772,29 +755,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_router_advert)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - - /* Send incoming SeND-protected/ND packet to user space. */ - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - nd6_ra_input(m, off, icmp6len); - } else - nd6_ra_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - nd6_ra_input(n, off, icmp6len); - } else - nd6_ra_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_ra_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_NEIGHBOR_SOLICIT: @@ -803,27 +775,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_neighbor_solicit)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - nd6_ns_input(m, off, icmp6len); - } else - nd6_ns_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - nd6_ns_input(n, off, icmp6len); - } else - nd6_ns_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_ns_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_NEIGHBOR_ADVERT: @@ -832,29 +795,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_neighbor_advert)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - - /* Send incoming SeND-protected/ND packet to user space. */ - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - nd6_na_input(m, off, icmp6len); - } else - nd6_na_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - nd6_na_input(n, off, icmp6len); - } else - nd6_na_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_na_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_REDIRECT: @@ -863,27 +815,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_redirect)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - icmp6_redirect_input(m, off); - } else - icmp6_redirect_input(m, off); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - icmp6_redirect_input(n, off); - } else - icmp6_redirect_input(n, off); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + icmp6_redirect_input(m, off); + m = n; + if (m == NULL) + goto freeit; break; case ICMP6_ROUTER_RENUMBERING: From owner-svn-src-all@freebsd.org Tue Sep 20 18:38:17 2016 Return-Path: Delivered-To: svn-src-all@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 EEDFEBE2821; Tue, 20 Sep 2016 18:38:17 +0000 (UTC) (envelope-from gjb@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 BEE8625F; Tue, 20 Sep 2016 18:38:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KIcGP4039134; Tue, 20 Sep 2016 18:38:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KIcG0W039133; Tue, 20 Sep 2016 18:38:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201838.u8KIcG0W039133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 18:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306047 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 18:38:18 -0000 Author: gjb Date: Tue Sep 20 18:38:16 2016 New Revision: 306047 URL: https://svnweb.freebsd.org/changeset/base/306047 Log: Document r297678, uuencode(1) '-r' option. Document r302558, ul(1) truncation bug fix. Submitted by: gahr Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 18:08:17 2016 (r306046) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 18:38:16 2016 (r306047) @@ -458,12 +458,21 @@ /etc/resolv.conf if the modification time has changed. + The &man.uuencode.1; utility has been + updated to include a new flag, -r, which + when used will generate raw output similar the + &man.uudecode.1; -r flag. + By default the &man.ifconfig.8; utility will set the default regulatory domain to FCC on wireless interfaces. As a result, newly created wireless interfaces with default settings will have less chances to violate country-specific regulations. + + A bug in the &man.ul.1; utility that + caused lines to be truncated at 512 characters has been + fixed. From owner-svn-src-all@freebsd.org Tue Sep 20 18:47:35 2016 Return-Path: Delivered-To: svn-src-all@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 02E13BE2B2C; Tue, 20 Sep 2016 18:47:35 +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 AE12EAF1; Tue, 20 Sep 2016 18:47:34 +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 u8KIlX1N043024; Tue, 20 Sep 2016 18:47:33 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KIlXAB043021; Tue, 20 Sep 2016 18:47:33 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201609201847.u8KIlXAB043021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 20 Sep 2016 18:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306048 - head/etc/periodic/security X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 18:47:35 -0000 Author: asomers Date: Tue Sep 20 18:47:33 2016 New Revision: 306048 URL: https://svnweb.freebsd.org/changeset/base/306048 Log: Fix periodic scripts when an NFS mount covers a local mount 100.chksetuid and 110.neggrpperm try to search through all UFS and ZFS filesystems. But their logic contains an error. They also search through remote filesystems that are mounted on top of the root of a local filesystem. For example, if a user installs a FreeBSD system with the default ZFS layout, he'll get a zroot/usr/home filesystem. If he then mounts /usr/home over NFS, these scripts would search through /usr/home. MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D7482 Modified: head/etc/periodic/security/100.chksetuid head/etc/periodic/security/110.neggrpperm Modified: head/etc/periodic/security/100.chksetuid ============================================================================== --- head/etc/periodic/security/100.chksetuid Tue Sep 20 18:38:16 2016 (r306047) +++ head/etc/periodic/security/100.chksetuid Tue Sep 20 18:47:33 2016 (r306048) @@ -46,7 +46,7 @@ then echo "" echo 'Checking setuid files and devices:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` - find -sx $MP /dev/null -type f \ + find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \ \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ \( -perm -u+s -or -perm -g+s \) -exec ls -liTd \{\} \+ | check_diff setuid - "${host} setuid diffs:" Modified: head/etc/periodic/security/110.neggrpperm ============================================================================== --- head/etc/periodic/security/110.neggrpperm Tue Sep 20 18:38:16 2016 (r306047) +++ head/etc/periodic/security/110.neggrpperm Tue Sep 20 18:47:33 2016 (r306048) @@ -44,7 +44,7 @@ then echo "" echo 'Checking negative group permissions:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` - n=$(find -sx $MP /dev/null -type f \ + n=$(find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \ \( \( ! -perm +010 -and -perm +001 \) -or \ \( ! -perm +020 -and -perm +002 \) -or \ \( ! -perm +040 -and -perm +004 \) \) \ From owner-svn-src-all@freebsd.org Tue Sep 20 18:53:44 2016 Return-Path: Delivered-To: svn-src-all@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 A7AFFBE2D05; Tue, 20 Sep 2016 18:53:44 +0000 (UTC) (envelope-from avos@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 839BBF5D; Tue, 20 Sep 2016 18:53:44 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KIrh5N046585; Tue, 20 Sep 2016 18:53:43 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KIrhxl046577; Tue, 20 Sep 2016 18:53:43 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609201853.u8KIrhxl046577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 20 Sep 2016 18:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306049 - in head: share/man/man9 sys/dev/ath sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 18:53:44 -0000 Author: avos Date: Tue Sep 20 18:53:42 2016 New Revision: 306049 URL: https://svnweb.freebsd.org/changeset/base/306049 Log: net80211: remove IEEE80211_RADIOTAP_TSFT field from transmit definitions. This field may be used for received frames only. Differential Revision: https://reviews.freebsd.org/D3826 Differential Revision: https://reviews.freebsd.org/D3827 Modified: head/share/man/man9/ieee80211_radiotap.9 head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athioctl.h head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h Modified: head/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- head/share/man/man9/ieee80211_radiotap.9 Tue Sep 20 18:47:33 2016 (r306048) +++ head/share/man/man9/ieee80211_radiotap.9 Tue Sep 20 18:53:42 2016 (r306049) @@ -263,7 +263,6 @@ struct wi_rx_radiotap_header { and transmit definitions for the Atheros driver: .Bd -literal -offset indent #define ATH_TX_RADIOTAP_PRESENT ( \\ - (1 << IEEE80211_RADIOTAP_TSFT) | \\ (1 << IEEE80211_RADIOTAP_FLAGS) | \\ (1 << IEEE80211_RADIOTAP_RATE) | \\ (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \\ @@ -273,7 +272,6 @@ and transmit definitions for the Atheros struct ath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint8_t wt_txpower; Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Sep 20 18:47:33 2016 (r306048) +++ head/sys/dev/ath/if_ath_tx.c Tue Sep 20 18:53:42 2016 (r306049) @@ -1538,7 +1538,6 @@ ath_tx_normal_setup(struct ath_softc *sc struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq) { struct ieee80211vap *vap = ni->ni_vap; - struct ath_hal *ah = sc->sc_ah; struct ieee80211com *ic = &sc->sc_ic; const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; int error, iswep, ismcast, isfrag, ismrr; @@ -1822,9 +1821,6 @@ ath_tx_normal_setup(struct ath_softc *sc sc->sc_hwmap[rix].ieeerate, -1); if (ieee80211_radiotap_active_vap(vap)) { - u_int64_t tsf = ath_hal_gettsf64(ah); - - sc->sc_tx_th.wt_tsf = htole64(tsf); sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (iswep) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; @@ -2105,7 +2101,6 @@ ath_tx_raw_start(struct ath_softc *sc, s const struct ieee80211_bpf_params *params) { struct ieee80211com *ic = &sc->sc_ic; - struct ath_hal *ah = sc->sc_ah; struct ieee80211vap *vap = ni->ni_vap; int error, ismcast, ismrr; int keyix, hdrlen, pktlen, try0, txantenna; @@ -2252,9 +2247,6 @@ ath_tx_raw_start(struct ath_softc *sc, s sc->sc_hwmap[rix].ieeerate, -1); if (ieee80211_radiotap_active_vap(vap)) { - u_int64_t tsf = ath_hal_gettsf64(ah); - - sc->sc_tx_th.wt_tsf = htole64(tsf); sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Tue Sep 20 18:47:33 2016 (r306048) +++ head/sys/dev/ath/if_athioctl.h Tue Sep 20 18:53:42 2016 (r306049) @@ -374,7 +374,6 @@ struct ath_rx_radiotap_header { } __packed; #define ATH_TX_RADIOTAP_PRESENT ( \ - (1 << IEEE80211_RADIOTAP_TSFT) | \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ @@ -384,7 +383,6 @@ struct ath_rx_radiotap_header { struct ath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - u_int64_t wt_tsf; u_int8_t wt_flags; u_int8_t wt_rate; u_int8_t wt_txpower; Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Tue Sep 20 18:47:33 2016 (r306048) +++ head/sys/dev/usb/wlan/if_rum.c Tue Sep 20 18:53:42 2016 (r306049) @@ -1118,7 +1118,6 @@ tr_setup: tap->wt_flags = 0; tap->wt_rate = data->rate; - rum_get_tsf(sc, &tap->wt_tsf); tap->wt_antenna = sc->tx_ant; ieee80211_radiotap_tx(vap, m); Modified: head/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_rumvar.h Tue Sep 20 18:47:33 2016 (r306048) +++ head/sys/dev/usb/wlan/if_rumvar.h Tue Sep 20 18:53:42 2016 (r306049) @@ -44,7 +44,6 @@ struct rum_rx_radiotap_header { struct rum_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint16_t wt_chan_freq; @@ -53,8 +52,7 @@ struct rum_tx_radiotap_header { } __packed __aligned(8); #define RT2573_TX_RADIOTAP_PRESENT \ - ((1 << IEEE80211_RADIOTAP_TSFT) | \ - (1 << IEEE80211_RADIOTAP_FLAGS) | \ + ((1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) | \ (1 << IEEE80211_RADIOTAP_ANTENNA)) Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Tue Sep 20 18:47:33 2016 (r306048) +++ head/sys/dev/usb/wlan/if_run.c Tue Sep 20 18:53:42 2016 (r306049) @@ -3077,7 +3077,6 @@ tr_setup: (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - run_get_tsf(sc, &tap->wt_tsf); tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Tue Sep 20 18:47:33 2016 (r306048) +++ head/sys/dev/usb/wlan/if_runvar.h Tue Sep 20 18:53:42 2016 (r306049) @@ -66,7 +66,6 @@ struct run_rx_radiotap_header { struct run_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint16_t wt_chan_freq; @@ -77,8 +76,7 @@ struct run_tx_radiotap_header { #define IEEE80211_RADIOTAP_HWQUEUE 15 #define RUN_TX_RADIOTAP_PRESENT \ - (1 << IEEE80211_RADIOTAP_TSFT | \ - 1 << IEEE80211_RADIOTAP_FLAGS | \ + (1 << IEEE80211_RADIOTAP_FLAGS | \ 1 << IEEE80211_RADIOTAP_RATE | \ 1 << IEEE80211_RADIOTAP_CHANNEL | \ 1 << IEEE80211_RADIOTAP_HWQUEUE) From owner-svn-src-all@freebsd.org Tue Sep 20 19:07:00 2016 Return-Path: Delivered-To: svn-src-all@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 25EF2BE22DD; Tue, 20 Sep 2016 19:07:00 +0000 (UTC) (envelope-from loos@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 DDAC6AF9; Tue, 20 Sep 2016 19:06:59 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KJ6xUh050393; Tue, 20 Sep 2016 19:06:59 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KJ6xSY050392; Tue, 20 Sep 2016 19:06:59 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609201906.u8KJ6xSY050392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 20 Sep 2016 19:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306050 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 19:07:00 -0000 Author: loos Date: Tue Sep 20 19:06:58 2016 New Revision: 306050 URL: https://svnweb.freebsd.org/changeset/base/306050 Log: If present, honor the USB port mode (host or peripheral) set on DTS, if not, keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host. This is only a workaround as in fact fact this hardware is capable of detect the USB port mode based on type of cable and act according with the detected mode. Unfortunately the driver does not handle that at moment. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/am335x/am335x_musb.c Modified: head/sys/arm/ti/am335x/am335x_musb.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_musb.c Tue Sep 20 18:53:42 2016 (r306049) +++ head/sys/arm/ti/am335x/am335x_musb.c Tue Sep 20 19:06:58 2016 (r306050) @@ -237,6 +237,7 @@ static int musbotg_attach(device_t dev) { struct musbotg_super_softc *sc = device_get_softc(dev); + char mode[16]; int err; uint32_t reg; @@ -308,10 +309,19 @@ musbotg_attach(device_t dev) } sc->sc_otg.sc_platform_data = sc; - if (sc->sc_otg.sc_id == 0) - sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE; - else - sc->sc_otg.sc_mode = MUSB2_HOST_MODE; + if (OF_getprop(ofw_bus_get_node(dev), "dr_mode", mode, + sizeof(mode)) > 0) { + if (strcasecmp(mode, "host") == 0) + sc->sc_otg.sc_mode = MUSB2_HOST_MODE; + else + sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE; + } else { + /* Beaglebone defaults: USB0 device, USB1 HOST. */ + if (sc->sc_otg.sc_id == 0) + sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE; + else + sc->sc_otg.sc_mode = MUSB2_HOST_MODE; + } /* * software-controlled function From owner-svn-src-all@freebsd.org Tue Sep 20 19:11:41 2016 Return-Path: Delivered-To: svn-src-all@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 EC1F1BE23FA; Tue, 20 Sep 2016 19:11:41 +0000 (UTC) (envelope-from gjb@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 AF1E1DE1; Tue, 20 Sep 2016 19:11:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KJBe5r053442; Tue, 20 Sep 2016 19:11:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KJBeSp053441; Tue, 20 Sep 2016 19:11:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201911.u8KJBeSp053441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 19:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306051 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 19:11:42 -0000 Author: gjb Date: Tue Sep 20 19:11:40 2016 New Revision: 306051 URL: https://svnweb.freebsd.org/changeset/base/306051 Log: Document r291716, camdd(8). Submitted by: ken Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 19:06:58 2016 (r306050) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 19:11:40 2016 (r306051) @@ -1647,6 +1647,24 @@ GELI-backed SSD storage providers. + The &man.camdd.8; utility has been + added, which allows copying data sequentially to and from + SCSI devices, files, block devices and tape + drives. If the source and/or destination is + a SCSI disk, &man.camdd.8; can use the + asynchronous &man.pass.4; interface to queue multiple I/Os for + improved speed. (ATA passthrough support for &man.camdd.8; is + in development.) + + The &man.pass.4; + SCSI/ATA passthrough + driver now has an asynchronous interface. User applications + may queue many requests, get notification of completion via + &man.kqueue.2; and retrieve status later. &man.camdd.8; is an + example application using the interface. + Support for parsing libucl-based configuration files has been added to &man.ctld.8;. From owner-svn-src-all@freebsd.org Tue Sep 20 19:15:40 2016 Return-Path: Delivered-To: svn-src-all@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 85174BE268D; Tue, 20 Sep 2016 19:15:40 +0000 (UTC) (envelope-from gjb@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 564E42E9; Tue, 20 Sep 2016 19:15:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KJFdIJ054280; Tue, 20 Sep 2016 19:15:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KJFdnW054279; Tue, 20 Sep 2016 19:15:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609201915.u8KJFdnW054279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 19:15:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306052 - releng/11.0/release/doc/share/xml X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 19:15:40 -0000 Author: gjb Date: Tue Sep 20 19:15:39 2016 New Revision: 306052 URL: https://svnweb.freebsd.org/changeset/base/306052 Log: Update the manual page path for 11.0-RELEASE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/share/xml/release.ent Modified: releng/11.0/release/doc/share/xml/release.ent ============================================================================== --- releng/11.0/release/doc/share/xml/release.ent Tue Sep 20 19:11:40 2016 (r306051) +++ releng/11.0/release/doc/share/xml/release.ent Tue Sep 20 19:15:39 2016 (r306052) @@ -58,7 +58,7 @@ - + From owner-svn-src-all@freebsd.org Tue Sep 20 19:21:42 2016 Return-Path: Delivered-To: svn-src-all@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 BE027BE2AC2; Tue, 20 Sep 2016 19:21:42 +0000 (UTC) (envelope-from cem@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 8ED64AEE; Tue, 20 Sep 2016 19:21:42 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KJLfRY056705; Tue, 20 Sep 2016 19:21:41 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KJLfHJ056693; Tue, 20 Sep 2016 19:21:41 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609201921.u8KJLfHJ056693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Sep 2016 19:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306053 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 19:21:42 -0000 Author: cem Date: Tue Sep 20 19:21:41 2016 New Revision: 306053 URL: https://svnweb.freebsd.org/changeset/base/306053 Log: dhclient(8): Enable numbered user class ID option By adding it to the option priorities table. PR: 184117 Submitted by: Lowell Gilbert Reported by: Tomek CEDRO Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D7911 Modified: head/sbin/dhclient/tables.c Modified: head/sbin/dhclient/tables.c ============================================================================== --- head/sbin/dhclient/tables.c Tue Sep 20 19:15:39 2016 (r306052) +++ head/sbin/dhclient/tables.c Tue Sep 20 19:21:41 2016 (r306053) @@ -400,6 +400,7 @@ unsigned char dhcp_option_default_priori DHO_IRC_SERVER, DHO_STREETTALK_SERVER, DHO_STREETTALK_DA_SERVER, + DHO_DHCP_USER_CLASS_ID, DHO_DOMAIN_SEARCH, /* Presently-undefined options... */ From owner-svn-src-all@freebsd.org Tue Sep 20 20:32:36 2016 Return-Path: Delivered-To: svn-src-all@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 EB2CDBE3F9E; Tue, 20 Sep 2016 20:32:36 +0000 (UTC) (envelope-from gjb@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 C3B1DAE5; Tue, 20 Sep 2016 20:32:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KKWZQb084580; Tue, 20 Sep 2016 20:32:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KKWZJb084579; Tue, 20 Sep 2016 20:32:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609202032.u8KKWZJb084579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 20:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306054 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 20:32:37 -0000 Author: gjb Date: Tue Sep 20 20:32:35 2016 New Revision: 306054 URL: https://svnweb.freebsd.org/changeset/base/306054 Log: Tweak wording and add clarifications for several sections. Submitted by: dhw Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 19:21:41 2016 (r306053) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 20:32:35 2016 (r306054) @@ -141,7 +141,7 @@ Source-based upgrades (those based on recompiling the &os; base system from source code) from previous versions are - supported, according to the instructions in + supported, using the instructions in /usr/src/UPDATING. @@ -467,7 +467,7 @@ will set the default regulatory domain to FCC on wireless interfaces. As a result, newly created wireless interfaces with default settings will - have less chances to violate country-specific + have less chance to violate country-specific regulations. A bug in the &man.ul.1; utility that @@ -507,8 +507,8 @@ The &man.xz.1; utility has been updated to support multi-threaded compression. - The &man.nvi.1; utility has been updated - to version 2.1.3. + The &man.nvi.1; utility and related + utilities have been updated to version 2.1.3. The &man.wpa.supplicant.8; and &man.hostapd.8; utilities have been updated to version @@ -527,11 +527,12 @@ IPv6:0:0 versus IPv6:0. This change requires that configuration data (including maps, files, classes, custom ruleset, etc.) must use the same format, so make certain such - configuration data is upgrading. As a very simple check - search for patterns like 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. - To return to the old behavior, set the m4 option - confUSE_COMPRESSED_IPV6_ADDRESSES or the cf - option UseCompressedIPv6Addresses. + configuration data is in place before upgrading. As a very + simple check search for patterns like 'IPv6:[0-9a-fA-F:]*::' + and 'IPv6::'. To return to the old behavior, set the m4 + option confUSE_COMPRESSED_IPV6_ADDRESSES or + the cf option + UseCompressedIPv6Addresses. The &man.tcpdump.1; utility has been updated to version 4.7.4. @@ -717,8 +718,9 @@ A new &man.rc.8; script, growfs, has been added, which will resize - the root filesystem on boot if /firstboot - exists and growfs_enable is enabled in + the root filesystem to fill the device on boot if + /firstboot exists and + growfs_enable is enabled in &man.rc.conf.5;. The mrouted @@ -814,13 +816,13 @@ updated to consistently set errno on failure. - The &man.qsort.3; functions have been - updated to be able to handle 32-bit aligned data on 64-bit - platforms, also providing a significant improvement in 32-bit - workloads. + The &man.qsort.3;-related functions have + been updated to be able to handle 32-bit aligned data on + 64-bit platforms, also providing a significant improvement in + 32-bit workloads. Several standard include headers have - been updated to use of gcc + been updated to make use of gcc attributes, such as __result_use_check(), __alloc_size(), and __nonnull(). From owner-svn-src-all@freebsd.org Tue Sep 20 21:23:00 2016 Return-Path: Delivered-To: svn-src-all@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 CA833BE3298 for ; Tue, 20 Sep 2016 21:23:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm41.bullet.mail.bf1.yahoo.com (nm41.bullet.mail.bf1.yahoo.com [216.109.114.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83DDBCE9 for ; Tue, 20 Sep 2016 21:23:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1474406197; bh=8FW3Bt5sADbgRWWqPX7jpgJbWt3nJauqZ27ASqUWkzE=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=Aifqll1MI86kVHSpVyRkeigCiSCNaPgDbJ+ot1HQXd2h/CtICFf61uun4fgzAiTzCP9J0cLsd6C9XxZBZRXnfUL/J4GaDEcLJikAx2t8toQeEhOPIwKAslhmqsFe3iFGe3sOzz4m/9/MyaOUaoL1y39eN1IDVwYv8VOKyBi6/Z6+ZEmRuInk6k5lVuyh1odrBK4Y+I/KP2o8u2wMb/AZSs5IceuGDdCaSwPTfG7D5HgWc8Nvl0B3mvewZxDXUMNYvv7Cxwb6pl615QWPeFdX28NUIEthKgWY99S/Rstfv6fG+2kDvhDum+wVyLvIvxbD8zlVoND90ioKdeT2/uFuWQ== Received: from [98.139.170.182] by nm41.bullet.mail.bf1.yahoo.com with NNFMP; 20 Sep 2016 21:16:37 -0000 Received: from [98.139.213.15] by tm25.bullet.mail.bf1.yahoo.com with NNFMP; 20 Sep 2016 21:16:37 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 20 Sep 2016 21:16:37 -0000 X-Yahoo-Newman-Id: 530073.23897.bm@smtp115.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: u4ZuE10VM1lSirn8jq2b4_F0WMuoFMPmf_hQ3xxlS2gLVDr Zd0KByTg3FVI4lnEo5MMjrS5GpnqcQXfM9GBhCmvlZ7KML3L.WmCjrhraJYr u9nA83Nq7Sv_f5AD1DS.SXWjLSvQ34mVqqMB_ow01_sF2dmaIHmJ18Q236oU FmizQz7bV.FmsjBNjoO_Vk_l8uApAwBHN4gj1KCYq.4m4MY9wQhyogZkgvcz zLejh9GCpj.jhuxkozzmm8mxtkhFq94J.thUcs00ZVHbZ9XF2t8SwMjwnMjy 8PeVnk_xiIumB2Nfz5nhvH6VWV9sGTG53nMjjc3XCl5EALLRp9gGe.SDrC2V 7SN.2TSM7IIxM0wsTKqXffZjTFMfF5Z3mRXdasZoMjpR0hViy2SuRKSAsUmn n6BxSu8KMPEmeRaeUkBQv52z7kovstebpE9MDgWFbeJ2CotRBgLnOnQ6Srby VwFSkex4WYFardZCZXyOINzb0el3LuvZl8zgc1xtwMvk_mLJTJwSVI0Kl.T3 of0Jcte9PemjPTawc93kJ0tO6w6DsEHEom7c0MF2ZcTuu.A-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r306010 - head/share/man/man9 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609200450.u8K4osHX021493@repo.freebsd.org> From: Pedro Giffuni Message-ID: Date: Tue, 20 Sep 2016 16:16:39 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609200450.u8K4osHX021493@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 21:23:00 -0000 On 19/09/2016 23:50, Warner Losh wrote: > Author: imp > Date: Tue Sep 20 04:50:53 2016 > New Revision: 306010 > URL: https://svnweb.freebsd.org/changeset/base/306010 > > Log: > Document existing practice and be more clear about sys/foo.h files > being alphabetical with sys/param.h or sys/types.h being first. Expand > the example to hopefully make this (slightly) clearer. > > Noticed by: cem@ > > Modified: > head/share/man/man9/style.9 > > Modified: head/share/man/man9/style.9 > ============================================================================== > --- head/share/man/man9/style.9 Tue Sep 20 04:33:58 2016 (r306009) > +++ head/share/man/man9/style.9 Tue Sep 20 04:50:53 2016 (r306010) > @@ -118,17 +118,21 @@ Leave another blank line before the head > .Pp > Kernel include files (i.e.\& > .Pa sys/*.h ) > -come first; normally, include > +come first sorted alphebetially where possible. s/alphebetially/alphabetically/ ? ... From owner-svn-src-all@freebsd.org Tue Sep 20 21:29:28 2016 Return-Path: Delivered-To: svn-src-all@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 9E6B5BE339B; Tue, 20 Sep 2016 21:29:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) (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 717E1F70; Tue, 20 Sep 2016 21:29:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f47.google.com with SMTP id 186so32393092itf.0; Tue, 20 Sep 2016 14:29:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=D9cRSqDqmd0r0X1vMGyUqFwllNsNHGZsIwP4twnSrHI=; b=hVNroGcgKs7YRUV9gZZfpRixX6rBNC4+xp97S450wHLziQk7kIIURIAjPo2evCao0L Evd4SixLwU/CNKnAL4Fk1SGI0QTTIf7ddd33Dybre3i+insu1BKsIRMfgIbPX6pBFIid az+3uLdxtGwQvdyIHDLLoR0t1wWZ2d+FtgFW3jmZ29fUfF7YcTio7eIqpnBv2KCcuumM Y6L2uP465SLquH7QDyioHmlH6Ro4PtECEOAX7RZq8RZTeLY8Ckn4Kvqix4pHDiLyx+OA clZY9Sz0pggVx7rWw30PKcHICKywBGgMh7TwksxEVSnc/hiyFRLkre71JS5/dz89hGLQ ENUw== X-Gm-Message-State: AE9vXwMKR2kANpf7HDGcTujmhcYGdS+HoekpRbLltjOJqdazJ6fyfAfRfHfvisRHz9e7Aw== X-Received: by 10.36.111.209 with SMTP id x200mr46969itb.59.1474406961281; Tue, 20 Sep 2016 14:29:21 -0700 (PDT) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com. [209.85.223.176]) by smtp.gmail.com with ESMTPSA id y195sm11656825iod.26.2016.09.20.14.29.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Sep 2016 14:29:21 -0700 (PDT) Received: by mail-io0-f176.google.com with SMTP id q92so33863903ioi.1; Tue, 20 Sep 2016 14:29:20 -0700 (PDT) X-Received: by 10.107.58.87 with SMTP id h84mr18042418ioa.122.1474406960803; Tue, 20 Sep 2016 14:29:20 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Tue, 20 Sep 2016 14:29:20 -0700 (PDT) In-Reply-To: References: <201609200450.u8K4osHX021493@repo.freebsd.org> From: Conrad Meyer Date: Tue, 20 Sep 2016 14:29:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306010 - head/share/man/man9 To: Pedro Giffuni Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 21:29:28 -0000 On Tue, Sep 20, 2016 at 2:16 PM, Pedro Giffuni wrote: > s/alphebetially/alphabetically/ ? This was fixed in r306027. Best, Conrad From owner-svn-src-all@freebsd.org Tue Sep 20 21:33:59 2016 Return-Path: Delivered-To: svn-src-all@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 388FEBE3593; Tue, 20 Sep 2016 21:33:59 +0000 (UTC) (envelope-from gjb@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 0220913CB; Tue, 20 Sep 2016 21:33:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KLXwAZ007396; Tue, 20 Sep 2016 21:33:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KLXwSu007395; Tue, 20 Sep 2016 21:33:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609202133.u8KLXwSu007395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 21:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306055 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 21:33:59 -0000 Author: gjb Date: Tue Sep 20 21:33:57 2016 New Revision: 306055 URL: https://svnweb.freebsd.org/changeset/base/306055 Log: Tweak the nvi(1) entry to be less clumsy-sounding. Submitted by: lidl Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 20:32:35 2016 (r306054) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 21:33:57 2016 (r306055) @@ -507,7 +507,7 @@ The &man.xz.1; utility has been updated to support multi-threaded compression. - The &man.nvi.1; utility and related + The &man.nvi.1; editor and related utilities have been updated to version 2.1.3. The &man.wpa.supplicant.8; and From owner-svn-src-all@freebsd.org Tue Sep 20 21:38:13 2016 Return-Path: Delivered-To: svn-src-all@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 5EAB2BE36C5; Tue, 20 Sep 2016 21:38:13 +0000 (UTC) (envelope-from emaste@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 2EEEC165C; Tue, 20 Sep 2016 21:38:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KLcCAG007579; Tue, 20 Sep 2016 21:38:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KLcCqf007578; Tue, 20 Sep 2016 21:38:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609202138.u8KLcCqf007578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Sep 2016 21:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306056 - head/usr.bin/elfdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 21:38:13 -0000 Author: emaste Date: Tue Sep 20 21:38:12 2016 New Revision: 306056 URL: https://svnweb.freebsd.org/changeset/base/306056 Log: elfdump: limit STDIN to no rights rather than closing it Closing stdin/stdout/stderr is often a bad idea as a future open() can end up with its fd. Leave it open and limit it to no rights instead. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D7984 Modified: head/usr.bin/elfdump/elfdump.c Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Tue Sep 20 21:33:57 2016 (r306055) +++ head/usr.bin/elfdump/elfdump.c Tue Sep 20 21:38:12 2016 (r306056) @@ -573,7 +573,7 @@ main(int ac, char **av) cap_rights_init(&rights, CAP_MMAP_R); if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) err(1, "unable to limit rights for %s", *av); - close(STDIN_FILENO); + cap_rights_limit(STDIN_FILENO, cap_rights_init(&rights)); cap_rights_init(&rights, CAP_FSTAT, CAP_IOCTL, CAP_WRITE); cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ if ((cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) || From owner-svn-src-all@freebsd.org Tue Sep 20 22:05:53 2016 Return-Path: Delivered-To: svn-src-all@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 406DBBE3FA3; Tue, 20 Sep 2016 22:05:53 +0000 (UTC) (envelope-from gjb@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 13309BD9; Tue, 20 Sep 2016 22:05:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KM5qiA018577; Tue, 20 Sep 2016 22:05:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KM5qlt018576; Tue, 20 Sep 2016 22:05:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609202205.u8KM5qlt018576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 22:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306057 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 22:05:53 -0000 Author: gjb Date: Tue Sep 20 22:05:52 2016 New Revision: 306057 URL: https://svnweb.freebsd.org/changeset/base/306057 Log: Fix an incorrect svn revision. Link to the binmiscctl(8) manual in the r266531 entry. Submitted by: sbruno Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 21:38:12 2016 (r306056) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 22:05:52 2016 (r306057) @@ -939,7 +939,8 @@ The IMAGACT_BINMISC kernel configuration option has been enabled by default, which enables application execution through emulators, such - as QEMU. + as QEMU via + &man.binmiscctl.8;. The VT kernel configuration file has been removed, and the &man.vt.4; @@ -1329,7 +1330,7 @@ updated to support Solarflare Flareon Ultra 7000-series chipsets. - The &man.em.4; driver has been updated with improved transmission queue hang detection. From owner-svn-src-all@freebsd.org Tue Sep 20 23:04:40 2016 Return-Path: Delivered-To: svn-src-all@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 549B6BE30A1; Tue, 20 Sep 2016 23:04:40 +0000 (UTC) (envelope-from gjb@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 2757C1754; Tue, 20 Sep 2016 23:04:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KN4dkQ040947; Tue, 20 Sep 2016 23:04:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KN4ddP040946; Tue, 20 Sep 2016 23:04:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609202304.u8KN4ddP040946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 23:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306058 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 23:04:40 -0000 Author: gjb Date: Tue Sep 20 23:04:39 2016 New Revision: 306058 URL: https://svnweb.freebsd.org/changeset/base/306058 Log: Document physical wireless devices are no longer listed by default in ifconfig(8) output. Submitted by: woodsb02 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 22:05:52 2016 (r306057) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 23:04:39 2016 (r306058) @@ -442,6 +442,12 @@ The &man.patch.1; utility has been updated to remove the automatic checkout feature. + The &man.ifconfig.8; utility has + been modified to no longer show physical wireless devices by + default. In order to view available wireless devices on the + system, run sysctl net.wlan.devices. + A new utility, &man.sesutil.8;, has been added, which is used to manage &man.ses.4; (SCSI Environmental From owner-svn-src-all@freebsd.org Tue Sep 20 23:16:37 2016 Return-Path: Delivered-To: svn-src-all@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 41F64BE32EE; Tue, 20 Sep 2016 23:16:37 +0000 (UTC) (envelope-from gjb@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 12D171C1C; Tue, 20 Sep 2016 23:16:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8KNGad9044712; Tue, 20 Sep 2016 23:16:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8KNGaKp044711; Tue, 20 Sep 2016 23:16:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609202316.u8KNGaKp044711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Sep 2016 23:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306059 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 23:16:37 -0000 Author: gjb Date: Tue Sep 20 23:16:36 2016 New Revision: 306059 URL: https://svnweb.freebsd.org/changeset/base/306059 Log: Revise the entry for r287197, ifconfig(8) did not change, the wireless networking stack changed. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 23:04:39 2016 (r306058) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 20 23:16:36 2016 (r306059) @@ -443,7 +443,7 @@ updated to remove the automatic checkout feature. The &man.ifconfig.8; utility has + sponsor="&netflix;, &nginx;">The wireless network stack has been modified to no longer show physical wireless devices by default. In order to view available wireless devices on the system, run sysctl net.wlan.devices. From owner-svn-src-all@freebsd.org Wed Sep 21 00:06:51 2016 Return-Path: Delivered-To: svn-src-all@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 04062BE3EA5; Wed, 21 Sep 2016 00:06:51 +0000 (UTC) (envelope-from karels@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 B084F10B; Wed, 21 Sep 2016 00:06:50 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L06n6K063230; Wed, 21 Sep 2016 00:06:49 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L06n7t063228; Wed, 21 Sep 2016 00:06:49 GMT (envelope-from karels@FreeBSD.org) Message-Id: <201609210006.u8L06n7t063228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Wed, 21 Sep 2016 00:06: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: r306060 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 00:06:51 -0000 Author: karels Date: Wed Sep 21 00:06:49 2016 New Revision: 306060 URL: https://svnweb.freebsd.org/changeset/base/306060 Log: MFC r304713: Fix L2 caching for UDP over IPv6 ip6_output() was missing cache invalidation code analougous to ip_output.c. r304545 disabled L2 caching for UDP/IPv6 as a workaround. This change adds the missing cache invalidation code and reverts r304545. Reviewed by: gnn Approved by: gnn (mentor) Tested by: peter@, Mike Andrews Differential Revision: https://reviews.freebsd.org/D7591 Modified: stable/11/sys/netinet6/ip6_output.c stable/11/sys/netinet6/udp6_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Tue Sep 20 23:16:36 2016 (r306059) +++ stable/11/sys/netinet6/ip6_output.c Wed Sep 21 00:06:49 2016 (r306060) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -552,6 +553,9 @@ again: rt = ro->ro_rt; ifp = ro->ro_rt->rt_ifp; } else { + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; if (fwd_tag == NULL) { bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; @@ -821,6 +825,9 @@ again: } else { RO_RTFREE(ro); needfiblookup = 1; /* Redo the routing table lookup. */ + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; } } /* See if fib was changed by packet filter. */ @@ -829,6 +836,9 @@ again: fibnum = M_GETFIB(m); RO_RTFREE(ro); needfiblookup = 1; + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; } if (needfiblookup) goto again; Modified: stable/11/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/11/sys/netinet6/udp6_usrreq.c Tue Sep 20 23:16:36 2016 (r306059) +++ stable/11/sys/netinet6/udp6_usrreq.c Wed Sep 21 00:06:49 2016 (r306060) @@ -898,7 +898,7 @@ udp6_output(struct inpcb *inp, struct mb UDP_PROBE(send, NULL, inp, ip6, inp, udp6); UDPSTAT_INC(udps_opackets); - error = ip6_output(m, optp, NULL, flags, + error = ip6_output(m, optp, &inp->inp_route6, flags, inp->in6p_moptions, NULL, inp); break; case AF_INET: From owner-svn-src-all@freebsd.org Wed Sep 21 00:08:43 2016 Return-Path: Delivered-To: svn-src-all@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 752A0BE3F4D; Wed, 21 Sep 2016 00:08:43 +0000 (UTC) (envelope-from markj@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 4584B2FA; Wed, 21 Sep 2016 00:08:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L08gmQ063332; Wed, 21 Sep 2016 00:08:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L08gde063331; Wed, 21 Sep 2016 00:08:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609210008.u8L08gde063331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 21 Sep 2016 00:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306061 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 00:08:43 -0000 Author: markj Date: Wed Sep 21 00:08:42 2016 New Revision: 306061 URL: https://svnweb.freebsd.org/changeset/base/306061 Log: Protect ccbq access with devq->send_mtx in the XPT_ABORT handler. Submitted by: Ryan Libby Reviewed by: mav MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7985 Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Sep 21 00:06:49 2016 (r306060) +++ head/sys/cam/cam_xpt.c Wed Sep 21 00:08:42 2016 (r306061) @@ -2578,21 +2578,25 @@ xpt_action_default(union ccb *start_ccb) abort_ccb = start_ccb->cab.abort_ccb; if (XPT_FC_IS_DEV_QUEUED(abort_ccb)) { + struct cam_ed *device; + struct cam_devq *devq; + + device = abort_ccb->ccb_h.path->device; + devq = device->sim->devq; - if (abort_ccb->ccb_h.pinfo.index >= 0) { - struct cam_ccbq *ccbq; - struct cam_ed *device; - - device = abort_ccb->ccb_h.path->device; - ccbq = &device->ccbq; - cam_ccbq_remove_ccb(ccbq, abort_ccb); + mtx_lock(&devq->send_mtx); + if (abort_ccb->ccb_h.pinfo.index > 0) { + cam_ccbq_remove_ccb(&device->ccbq, abort_ccb); abort_ccb->ccb_h.status = CAM_REQ_ABORTED|CAM_DEV_QFRZN; - xpt_freeze_devq(abort_ccb->ccb_h.path, 1); + xpt_freeze_devq_device(device, 1); + mtx_unlock(&devq->send_mtx); xpt_done(abort_ccb); start_ccb->ccb_h.status = CAM_REQ_CMP; break; } + mtx_unlock(&devq->send_mtx); + if (abort_ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX && (abort_ccb->ccb_h.status & CAM_SIM_QUEUED) == 0) { /* From owner-svn-src-all@freebsd.org Wed Sep 21 00:46:09 2016 Return-Path: Delivered-To: svn-src-all@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 A10F9BE0A98; Wed, 21 Sep 2016 00:46:09 +0000 (UTC) (envelope-from np@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 7228D8F5; Wed, 21 Sep 2016 00:46:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L0k8v7078294; Wed, 21 Sep 2016 00:46:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L0k8R4078293; Wed, 21 Sep 2016 00:46:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609210046.u8L0k8R4078293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 21 Sep 2016 00:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306062 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 00:46:09 -0000 Author: np Date: Wed Sep 21 00:46:08 2016 New Revision: 306062 URL: https://svnweb.freebsd.org/changeset/base/306062 Log: cxgbe(4): Show wcwr_stats for T6 cards. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Sep 21 00:08:42 2016 (r306061) +++ head/sys/dev/cxgbe/t4_main.c Wed Sep 21 00:46:08 2016 (r306062) @@ -5093,7 +5093,7 @@ t4_sysctls(struct adapter *sc) CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_ulprx_la, "A", "ULPRX logic analyzer"); - if (is_t5(sc)) { + if (chip_id(sc) >= CHELSIO_T5) { SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "wcwr_stats", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_wcwr_stats, "A", "write combined work requests"); From owner-svn-src-all@freebsd.org Wed Sep 21 00:50:23 2016 Return-Path: Delivered-To: svn-src-all@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 E2078BE0CC7; Wed, 21 Sep 2016 00:50:23 +0000 (UTC) (envelope-from np@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 B2683B73; Wed, 21 Sep 2016 00:50:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L0oM9I078491; Wed, 21 Sep 2016 00:50:22 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L0oM95078489; Wed, 21 Sep 2016 00:50:22 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609210050.u8L0oM95078489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 21 Sep 2016 00:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306063 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 00:50:24 -0000 Author: np Date: Wed Sep 21 00:50:22 2016 New Revision: 306063 URL: https://svnweb.freebsd.org/changeset/base/306063 Log: cxgbe(4): Setup congestion response for T6 rx queues. Modified: head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Wed Sep 21 00:46:08 2016 (r306062) +++ head/sys/dev/cxgbe/t4_netmap.c Wed Sep 21 00:50:22 2016 (r306063) @@ -178,7 +178,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, str nm_rxq->fl_db_val = V_QID(nm_rxq->fl_cntxt_id) | sc->chip_params->sge_fl_db; - if (is_t5(sc) && cong >= 0) { + if (chip_id(sc) >= CHELSIO_T5 && cong >= 0) { uint32_t param, val; param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Sep 21 00:46:08 2016 (r306062) +++ head/sys/dev/cxgbe/t4_sge.c Wed Sep 21 00:50:22 2016 (r306063) @@ -2800,7 +2800,7 @@ alloc_iq_fl(struct vi_info *vi, struct s FL_UNLOCK(fl); } - if (is_t5(sc) && !(sc->flags & IS_VF) && cong >= 0) { + if (chip_id(sc) >= CHELSIO_T5 && !(sc->flags & IS_VF) && cong >= 0) { uint32_t param, val; param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | From owner-svn-src-all@freebsd.org Wed Sep 21 02:27:24 2016 Return-Path: Delivered-To: svn-src-all@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 AC66BBE08F3; Wed, 21 Sep 2016 02:27:24 +0000 (UTC) (envelope-from jhibbits@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 7CB4B81A; Wed, 21 Sep 2016 02:27:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L2RNls015457; Wed, 21 Sep 2016 02:27:23 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L2RNke015456; Wed, 21 Sep 2016 02:27:23 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609210227.u8L2RNke015456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 21 Sep 2016 02:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306064 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 02:27:24 -0000 Author: jhibbits Date: Wed Sep 21 02:27:23 2016 New Revision: 306064 URL: https://svnweb.freebsd.org/changeset/base/306064 Log: Add yet another QorIQ GPIO compat string. P1022 boards use the string "fsl,pq3-gpio", which seems to be common in Linux dts files. Modified: head/sys/powerpc/mpc85xx/qoriq_gpio.c Modified: head/sys/powerpc/mpc85xx/qoriq_gpio.c ============================================================================== --- head/sys/powerpc/mpc85xx/qoriq_gpio.c Wed Sep 21 00:50:22 2016 (r306063) +++ head/sys/powerpc/mpc85xx/qoriq_gpio.c Wed Sep 21 02:27:23 2016 (r306064) @@ -220,6 +220,7 @@ qoriq_gpio_probe(device_t dev) { if (!ofw_bus_is_compatible(dev, "fsl,qoriq-gpio") && + !ofw_bus_is_compatible(dev, "fsl,pq3-gpio") && !ofw_bus_is_compatible(dev, "fsl,mpc8572-gpio")) return (ENXIO); From owner-svn-src-all@freebsd.org Wed Sep 21 02:28:40 2016 Return-Path: Delivered-To: svn-src-all@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 E3FE4BE0990; Wed, 21 Sep 2016 02:28:40 +0000 (UTC) (envelope-from jhibbits@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 A57989AA; Wed, 21 Sep 2016 02:28:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L2SdFV015541; Wed, 21 Sep 2016 02:28:39 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L2Sdfn015537; Wed, 21 Sep 2016 02:28:39 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609210228.u8L2Sdfn015537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 21 Sep 2016 02:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306065 - in head/sys: dev/ofw powerpc/ofw powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 02:28:41 -0000 Author: jhibbits Date: Wed Sep 21 02:28:39 2016 New Revision: 306065 URL: https://svnweb.freebsd.org/changeset/base/306065 Log: Add a ofw_parse_bootargs function, and use it for powerpc Summary: If the environment variable is set, U-boot adds a 'bootargs' property to /chosen. This is already handled by ARM and MIPS, but should be handled in a central location. For now, ofw_subr.c is a good place until we determine if it should be moved to init_main.c, or somewhere more central to all architectures. Eventually arm and mips should be modified to use ofw_parse_bootargs() as well, rather than using the duplicate code already. Reviewed By: adrian Differential Revision: https://reviews.freebsd.org/D7846 Modified: head/sys/dev/ofw/ofw_subr.c head/sys/dev/ofw/ofw_subr.h head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/powerpc/machdep.c Modified: head/sys/dev/ofw/ofw_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_subr.c Wed Sep 21 02:27:23 2016 (r306064) +++ head/sys/dev/ofw/ofw_subr.c Wed Sep 21 02:28:39 2016 (r306065) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -180,3 +181,64 @@ ofw_reg_to_paddr(phandle_t dev, int regn return (0); } + +/* Parse cmd line args as env - copied from xlp_machdep. */ +/* XXX-BZ this should really be centrally provided for all (boot) code. */ +static void +_parse_bootargs(char *cmdline) +{ + char *n, *v; + + while ((v = strsep(&cmdline, " \n")) != NULL) { + if (*v == '\0') + continue; + if (*v == '-') { + while (*v != '\0') { + v++; + switch (*v) { + case 'a': boothowto |= RB_ASKNAME; break; + /* Someone should simulate that ;-) */ + case 'C': boothowto |= RB_CDROM; break; + case 'd': boothowto |= RB_KDB; break; + case 'D': boothowto |= RB_MULTIPLE; break; + case 'm': boothowto |= RB_MUTE; break; + case 'g': boothowto |= RB_GDB; break; + case 'h': boothowto |= RB_SERIAL; break; + case 'p': boothowto |= RB_PAUSE; break; + case 'r': boothowto |= RB_DFLTROOT; break; + case 's': boothowto |= RB_SINGLE; break; + case 'v': boothowto |= RB_VERBOSE; break; + } + } + } else { + n = strsep(&v, "="); + if (v == NULL) + kern_setenv(n, "1"); + else + kern_setenv(n, v); + } + } +} + +/* + * This is intended to be called early on, right after the OF system is + * initialized, so pmap may not be up yet. + */ +int +ofw_parse_bootargs(void) +{ + phandle_t chosen; + char buf[2048]; /* early stack supposedly big enough */ + int err; + + chosen = OF_finddevice("/chosen"); + if (chosen <= 0) + return (chosen); + + if ((err = OF_getprop(chosen, "bootargs", buf, sizeof(buf))) != -1) { + _parse_bootargs(buf); + return (0); + } + + return (err); +} Modified: head/sys/dev/ofw/ofw_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_subr.h Wed Sep 21 02:27:23 2016 (r306064) +++ head/sys/dev/ofw/ofw_subr.h Wed Sep 21 02:28:39 2016 (r306065) @@ -46,4 +46,6 @@ int ofw_reg_to_paddr(phandle_t _dev, int _regno, bus_addr_t *_paddr, bus_size_t *_size, pcell_t *_pci_hi); +int ofw_parse_bootargs(void); + #endif Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 02:27:23 2016 (r306064) +++ head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 02:28:39 2016 (r306065) @@ -99,6 +99,7 @@ ofw_restore_trap_vec(char *restore_trap_ /* * Saved SPRG0-3 from OpenFirmware. Will be restored prior to the callback. */ +#ifndef __powerpc64__ register_t ofw_sprg0_save; static __inline void @@ -140,6 +141,8 @@ ofw_sprg_restore(void) } #endif +#endif + static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) { @@ -344,11 +347,12 @@ OF_initial_setup(void *fdt_ptr, void *ju ofmsr[0] = mfmsr(); #ifdef __powerpc64__ ofmsr[0] &= ~PSL_SF; - #endif + #else __asm __volatile("mfsprg0 %0" : "=&r"(ofmsr[1])); __asm __volatile("mfsprg1 %0" : "=&r"(ofmsr[2])); __asm __volatile("mfsprg2 %0" : "=&r"(ofmsr[3])); __asm __volatile("mfsprg3 %0" : "=&r"(ofmsr[4])); + #endif openfirmware_entry = openfirm; if (ofmsr[0] & PSL_DR) @@ -440,7 +444,9 @@ openfirmware_core(void *args) */ oldmsr = intr_disable(); +#ifndef __powerpc64__ ofw_sprg_prepare(); +#endif /* Save trap vectors */ ofw_save_trap_vec(save_trap_of); @@ -463,7 +469,9 @@ openfirmware_core(void *args) /* Restore trap vecotrs */ ofw_restore_trap_vec(save_trap_of); +#ifndef __powerpc64__ ofw_sprg_restore(); +#endif intr_restore(oldmsr); Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Wed Sep 21 02:27:23 2016 (r306064) +++ head/sys/powerpc/powerpc/machdep.c Wed Sep 21 02:28:39 2016 (r306065) @@ -128,6 +128,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include int cold = 1; #ifdef __powerpc64__ @@ -297,6 +298,8 @@ powerpc_init(vm_offset_t fdt, vm_offset_ /* Store boot environment state */ OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); + ofw_parse_bootargs(); + /* * Init params/tunables that can be overridden by the loader */ From owner-svn-src-all@freebsd.org Wed Sep 21 02:56:58 2016 Return-Path: Delivered-To: svn-src-all@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 A1DECBE208D; Wed, 21 Sep 2016 02:56:58 +0000 (UTC) (envelope-from jhibbits@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 71914783; Wed, 21 Sep 2016 02:56:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L2uv1b026674; Wed, 21 Sep 2016 02:56:57 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L2uvBs026672; Wed, 21 Sep 2016 02:56:57 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609210256.u8L2uvBs026672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 21 Sep 2016 02:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306066 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 02:56:58 -0000 Author: jhibbits Date: Wed Sep 21 02:56:57 2016 New Revision: 306066 URL: https://svnweb.freebsd.org/changeset/base/306066 Log: Move ofw_cpu file to the main files conf file. There is nothing CPU specific here, and it's usable by both fdt and Open Firmware based systems. Rather than keeping the same file in every one, just add it to the ofw/fdt block in the main file. Modified: head/sys/conf/files head/sys/conf/files.arm Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Sep 21 02:28:39 2016 (r306065) +++ head/sys/conf/files Wed Sep 21 02:56:57 2016 (r306066) @@ -2226,6 +2226,7 @@ dev/oce/oce_sysctl.c optional oce pci dev/oce/oce_util.c optional oce pci dev/ofw/ofw_bus_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt +dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt dev/ofw/ofw_subr.c optional fdt Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Sep 21 02:28:39 2016 (r306065) +++ head/sys/conf/files.arm Wed Sep 21 02:56:57 2016 (r306066) @@ -118,7 +118,6 @@ dev/fdt/fdt_arm_platform.c optional plat dev/hwpmc/hwpmc_arm.c optional hwpmc dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6 dev/iicbus/twsi/twsi.c optional twsi -dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofwpci.c optional fdt pci dev/pci/pci_host_generic.c optional pci_host_generic pci fdt dev/psci/psci.c optional psci From owner-svn-src-all@freebsd.org Wed Sep 21 03:10:42 2016 Return-Path: Delivered-To: svn-src-all@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 88CCFBE2443; Wed, 21 Sep 2016 03:10:42 +0000 (UTC) (envelope-from jhibbits@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 587DF169; Wed, 21 Sep 2016 03:10:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L3AfW6031400; Wed, 21 Sep 2016 03:10:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L3Afxh031399; Wed, 21 Sep 2016 03:10:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609210310.u8L3Afxh031399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 21 Sep 2016 03:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306067 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 03:10:42 -0000 Author: jhibbits Date: Wed Sep 21 03:10:41 2016 New Revision: 306067 URL: https://svnweb.freebsd.org/changeset/base/306067 Log: Move ofw_parse_bootargs to the correct place. Also, create a static initial environment, so bootargs can be set from uboot. Modified: head/sys/powerpc/powerpc/machdep.c Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Wed Sep 21 02:56:57 2016 (r306066) +++ head/sys/powerpc/powerpc/machdep.c Wed Sep 21 03:10:41 2016 (r306067) @@ -141,6 +141,7 @@ int hw_direct_map = 1; extern void *ap_pcpu; struct pcpu __pcpu[MAXCPU]; +static char init_kenv[2048]; static struct trapframe frame0; @@ -293,13 +294,11 @@ powerpc_init(vm_offset_t fdt, vm_offset_ bzero(__sbss_start, __sbss_end - __sbss_start); bzero(__bss_start, _end - __bss_start); #endif - init_static_kenv(NULL, 0); + init_static_kenv(init_kenv, sizeof(init_kenv)); } /* Store boot environment state */ OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); - ofw_parse_bootargs(); - /* * Init params/tunables that can be overridden by the loader */ @@ -338,6 +337,8 @@ powerpc_init(vm_offset_t fdt, vm_offset_ OF_bootstrap(); + ofw_parse_bootargs(); + /* * Initialize the console before printing anything. */ From owner-svn-src-all@freebsd.org Wed Sep 21 05:15:51 2016 Return-Path: Delivered-To: svn-src-all@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 CDF40BE3126; Wed, 21 Sep 2016 05:15:51 +0000 (UTC) (envelope-from wma@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 9BA008B9; Wed, 21 Sep 2016 05:15:51 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L5Fodx079427; Wed, 21 Sep 2016 05:15:50 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L5Fott079426; Wed, 21 Sep 2016 05:15:50 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201609210515.u8L5Fott079426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Wed, 21 Sep 2016 05:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306068 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 05:15:51 -0000 Author: wma Date: Wed Sep 21 05:15:50 2016 New Revision: 306068 URL: https://svnweb.freebsd.org/changeset/base/306068 Log: Register GICv3 xref. This allows other drivers to retrieve interrupt parent node. Obtained from: Semihalf Submitted by: Michal Stanek Sponsored by: Annapurna Labs Reviewed by: wma, zbb Differential Revision: https://reviews.freebsd.org/D7568 Modified: head/sys/arm64/arm64/gic_v3_fdt.c Modified: head/sys/arm64/arm64/gic_v3_fdt.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_fdt.c Wed Sep 21 03:10:41 2016 (r306067) +++ head/sys/arm64/arm64/gic_v3_fdt.c Wed Sep 21 05:15:50 2016 (r306068) @@ -145,6 +145,9 @@ gic_v3_fdt_attach(device_t dev) goto error; } + /* Register xref */ + OF_device_register_xref(xref, dev); + if (intr_pic_claim_root(dev, xref, arm_gic_v3_intr, sc, GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { err = ENXIO; From owner-svn-src-all@freebsd.org Wed Sep 21 05:22:50 2016 Return-Path: Delivered-To: svn-src-all@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 BA1B6BE35B5; Wed, 21 Sep 2016 05:22:50 +0000 (UTC) (envelope-from wma@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 72786DD6; Wed, 21 Sep 2016 05:22:50 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L5Mnod082999; Wed, 21 Sep 2016 05:22:49 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L5Mn31082998; Wed, 21 Sep 2016 05:22:49 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201609210522.u8L5Mn31082998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Wed, 21 Sep 2016 05:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306069 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 05:22:50 -0000 Author: wma Date: Wed Sep 21 05:22:49 2016 New Revision: 306069 URL: https://svnweb.freebsd.org/changeset/base/306069 Log: Add support for SPI-mapped MSI interrupts in GICv3. PIC_SETUP_INTR implementation in GICv3 did not allow for setting up interrupts without included FDT description. GICv2m-like MSI interrupts, which map MSI messages to SPI interrupt lines, may not have a description in FDT. Add support for such interrupts by setting the trigger and polarity to the appropriate values for MSI (edge, high) and get the hardware IRQ number from the corresponding ISRC. Obtained from: Semihalf Submitted by: Michal Stanek Sponsored by: Annapurna Labs Reviewed by: wma Differential Revision: https://reviews.freebsd.org/D7662 Modified: head/sys/arm64/arm64/gic_v3.c Modified: head/sys/arm64/arm64/gic_v3.c ============================================================================== --- head/sys/arm64/arm64/gic_v3.c Wed Sep 21 05:15:50 2016 (r306068) +++ head/sys/arm64/arm64/gic_v3.c Wed Sep 21 05:22:49 2016 (r306069) @@ -503,12 +503,33 @@ gic_map_fdt(device_t dev, u_int ncells, #endif static int +gic_map_msi(device_t dev, struct intr_map_data_msi *msi_data, u_int *irqp, + enum intr_polarity *polp, enum intr_trigger *trigp) +{ + struct gic_v3_irqsrc *gi; + + /* SPI-mapped MSI */ + gi = (struct gic_v3_irqsrc *)msi_data->isrc; + if (gi == NULL) + return (ENXIO); + + *irqp = gi->gi_irq; + + /* MSI/MSI-X interrupts are always edge triggered with high polarity */ + *polp = INTR_POLARITY_HIGH; + *trigp = INTR_TRIGGER_EDGE; + + return (0); +} + +static int do_gic_v3_map_intr(device_t dev, struct intr_map_data *data, u_int *irqp, enum intr_polarity *polp, enum intr_trigger *trigp) { struct gic_v3_softc *sc; enum intr_polarity pol; enum intr_trigger trig; + struct intr_map_data_msi *dam; #ifdef FDT struct intr_map_data_fdt *daf; #endif @@ -525,6 +546,12 @@ do_gic_v3_map_intr(device_t dev, struct return (EINVAL); break; #endif + case INTR_MAP_DATA_MSI: + /* SPI-mapped MSI */ + dam = (struct intr_map_data_msi *)data; + if (gic_map_msi(dev, dam, &irq, &pol, &trig) != 0) + return (EINVAL); + break; default: return (EINVAL); } From owner-svn-src-all@freebsd.org Wed Sep 21 05:33:20 2016 Return-Path: Delivered-To: svn-src-all@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 40A8FBE38C2; Wed, 21 Sep 2016 05:33:20 +0000 (UTC) (envelope-from wma@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 E379B3A7; Wed, 21 Sep 2016 05:33:19 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L5XJ7f086851; Wed, 21 Sep 2016 05:33:19 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L5XJgr086850; Wed, 21 Sep 2016 05:33:19 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201609210533.u8L5XJgr086850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Wed, 21 Sep 2016 05:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306070 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 05:33:20 -0000 Author: wma Date: Wed Sep 21 05:33:18 2016 New Revision: 306070 URL: https://svnweb.freebsd.org/changeset/base/306070 Log: Add support for SPI-mapped MSI interrupts outside of GICv2m. SPI-mapped MSI interrupts coming from a controller other than GICv2m need to have their trigger and polarity properly configured. This patch fixes MSI/MSI-X on Annapurna Alpine platform with GICv2. Obtained from: Semihalf Submitted by: Michal Stanek Sponsored by: Annapurna Labs Reviewed by: skra, wma Differential Revision: https://reviews.freebsd.org/D7698 Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Wed Sep 21 05:22:49 2016 (r306069) +++ head/sys/arm/arm/gic.c Wed Sep 21 05:33:18 2016 (r306070) @@ -835,6 +835,26 @@ gic_map_fdt(device_t dev, u_int ncells, #endif static int +gic_map_msi(device_t dev, struct intr_map_data_msi *msi_data, u_int *irqp, + enum intr_polarity *polp, enum intr_trigger *trigp) +{ + struct gic_irqsrc *gi; + + /* Map a non-GICv2m MSI */ + gi = (struct gic_irqsrc *)msi_data->isrc; + if (gi == NULL) + return (ENXIO); + + *irqp = gi->gi_irq; + + /* MSI/MSI-X interrupts are always edge triggered with high polarity */ + *polp = INTR_POLARITY_HIGH; + *trigp = INTR_TRIGGER_EDGE; + + return (0); +} + +static int gic_map_intr(device_t dev, struct intr_map_data *data, u_int *irqp, enum intr_polarity *polp, enum intr_trigger *trigp) { @@ -842,6 +862,7 @@ gic_map_intr(device_t dev, struct intr_m enum intr_polarity pol; enum intr_trigger trig; struct arm_gic_softc *sc; + struct intr_map_data_msi *dam; #ifdef FDT struct intr_map_data_fdt *daf; #endif @@ -860,6 +881,12 @@ gic_map_intr(device_t dev, struct intr_m __func__)); break; #endif + case INTR_MAP_DATA_MSI: + /* Non-GICv2m MSI */ + dam = (struct intr_map_data_msi *)data; + if (gic_map_msi(dev, dam, &irq, &pol, &trig) != 0) + return (EINVAL); + break; default: return (ENOTSUP); } @@ -907,6 +934,7 @@ arm_gic_setup_intr(device_t dev, struct enum intr_polarity pol; if ((gi->gi_flags & GI_FLAG_MSI) == GI_FLAG_MSI) { + /* GICv2m MSI */ pol = gi->gi_pol; trig = gi->gi_trig; KASSERT(pol == INTR_POLARITY_HIGH, From owner-svn-src-all@freebsd.org Wed Sep 21 05:44:14 2016 Return-Path: Delivered-To: svn-src-all@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 E1BB5BE3A8A; Wed, 21 Sep 2016 05:44:14 +0000 (UTC) (envelope-from trasz@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 B4350A67; Wed, 21 Sep 2016 05:44:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L5iDnZ090526; Wed, 21 Sep 2016 05:44:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L5iDMl090525; Wed, 21 Sep 2016 05:44:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609210544.u8L5iDMl090525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 21 Sep 2016 05:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306071 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 05:44:15 -0000 Author: trasz Date: Wed Sep 21 05:44:13 2016 New Revision: 306071 URL: https://svnweb.freebsd.org/changeset/base/306071 Log: Fix bug introduced with r302388, which could cause processes accessing automounted shares to hang with "vfs_busy" wchan. (As a workaround one can run 'automount -u' from cron.) Reviewed by: kib@ MFC after: 1 month Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Wed Sep 21 05:33:18 2016 (r306070) +++ head/sys/kern/vfs_mount.c Wed Sep 21 05:44:13 2016 (r306071) @@ -1207,6 +1207,9 @@ sys_unmount(struct thread *td, struct un /* * Return error if any of the vnodes, ignoring the root vnode * and the syncer vnode, have non-zero usecount. + * + * This function is purely advisory - it can return false positives + * and negatives. */ static int vfs_check_usecounts(struct mount *mp) @@ -1288,6 +1291,10 @@ dounmount(struct mount *mp, int flags, s MNT_ILOCK(mp); if (error != 0) { mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ); + if (mp->mnt_kern_flag & MNTK_MWAIT) { + mp->mnt_kern_flag &= ~MNTK_MWAIT; + wakeup(mp); + } MNT_IUNLOCK(mp); if (coveredvp != NULL) { VOP_UNLOCK(coveredvp, 0); From owner-svn-src-all@freebsd.org Wed Sep 21 05:56:48 2016 Return-Path: Delivered-To: svn-src-all@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 986A4BE3DEA; Wed, 21 Sep 2016 05:56:48 +0000 (UTC) (envelope-from sephe@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 5C9FE9B; Wed, 21 Sep 2016 05:56:48 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L5ulu5094636; Wed, 21 Sep 2016 05:56:47 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L5ulQc094633; Wed, 21 Sep 2016 05:56:47 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609210556.u8L5ulQc094633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 21 Sep 2016 05:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306072 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 05:56:48 -0000 Author: sephe Date: Wed Sep 21 05:56:47 2016 New Revision: 306072 URL: https://svnweb.freebsd.org/changeset/base/306072 Log: hyperv/vmbus: Allow bufrings preallocation. The assumption that the channel is only opened upon synthetic device attach time no longer holds, e.g. Hyper-V network device MTU changes. We have to allow device drivers to preallocate bufrings, e.g. in attach DEVMETHOD, to prevent bufring allocation failure once the system memory is fragmented after running for a while. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7960 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Wed Sep 21 05:44:13 2016 (r306071) +++ head/sys/dev/hyperv/include/vmbus.h Wed Sep 21 05:56:47 2016 (r306072) @@ -108,6 +108,13 @@ struct vmbus_chanpkt_rxbuf { struct vmbus_rxbuf_desc cp_rxbuf[]; } __packed; +struct vmbus_chan_br { + void *cbr; + bus_addr_t cbr_paddr; + int cbr_txsz; + int cbr_rxsz; +}; + struct vmbus_channel; struct hyperv_guid; @@ -122,6 +129,9 @@ vmbus_get_channel(device_t dev) int vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg); +int vmbus_chan_open_br(struct vmbus_channel *chan, + const struct vmbus_chan_br *cbr, const void *udata, + int udlen, vmbus_chan_callback_t cb, void *cbarg); void vmbus_chan_close(struct vmbus_channel *chan); int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 21 05:44:13 2016 (r306071) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 21 05:56:47 2016 (r306072) @@ -196,13 +196,45 @@ int vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg) { + struct vmbus_chan_br cbr; + int error; + + /* + * Allocate the TX+RX bufrings. + */ + KASSERT(chan->ch_bufring == NULL, ("bufrings are allocated")); + chan->ch_bufring = hyperv_dmamem_alloc(bus_get_dma_tag(chan->ch_dev), + PAGE_SIZE, 0, txbr_size + rxbr_size, &chan->ch_bufring_dma, + BUS_DMA_WAITOK); + if (chan->ch_bufring == NULL) { + device_printf(chan->ch_dev, "bufring allocation failed\n"); + return (ENOMEM); + } + + cbr.cbr = chan->ch_bufring; + cbr.cbr_paddr = chan->ch_bufring_dma.hv_paddr; + cbr.cbr_txsz = txbr_size; + cbr.cbr_rxsz = rxbr_size; + + error = vmbus_chan_open_br(chan, &cbr, udata, udlen, cb, cbarg); + if (error) { + hyperv_dmamem_free(&chan->ch_bufring_dma, chan->ch_bufring); + chan->ch_bufring = NULL; + } + return (error); +} + +int +vmbus_chan_open_br(struct vmbus_channel *chan, const struct vmbus_chan_br *cbr, + const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg) +{ struct vmbus_softc *sc = chan->ch_vmbus; const struct vmbus_chanmsg_chopen_resp *resp; const struct vmbus_message *msg; struct vmbus_chanmsg_chopen *req; struct vmbus_msghc *mh; uint32_t status; - int error; + int error, txbr_size, rxbr_size; uint8_t *br; if (udlen > VMBUS_CHANMSG_CHOPEN_UDATA_SIZE) { @@ -210,11 +242,20 @@ vmbus_chan_open(struct vmbus_channel *ch "invalid udata len %d for chan%u\n", udlen, chan->ch_id); return EINVAL; } + + br = cbr->cbr; + txbr_size = cbr->cbr_txsz; + rxbr_size = cbr->cbr_rxsz; KASSERT((txbr_size & PAGE_MASK) == 0, ("send bufring size is not multiple page")); KASSERT((rxbr_size & PAGE_MASK) == 0, ("recv bufring size is not multiple page")); + /* + * Zero out the TX/RX bufrings, in case that they were used before. + */ + memset(br, 0, txbr_size + rxbr_size); + if (atomic_testandset_int(&chan->ch_stflags, VMBUS_CHAN_ST_OPENED_SHIFT)) panic("double-open chan%u", chan->ch_id); @@ -230,20 +271,6 @@ vmbus_chan_open(struct vmbus_channel *ch else TASK_INIT(&chan->ch_task, 0, vmbus_chan_task_nobatch, chan); - /* - * Allocate the TX+RX bufrings. - * XXX should use ch_dev dtag - */ - br = hyperv_dmamem_alloc(bus_get_dma_tag(sc->vmbus_dev), - PAGE_SIZE, 0, txbr_size + rxbr_size, &chan->ch_bufring_dma, - BUS_DMA_WAITOK | BUS_DMA_ZERO); - if (br == NULL) { - device_printf(sc->vmbus_dev, "bufring allocation failed\n"); - error = ENOMEM; - goto failed; - } - chan->ch_bufring = br; - /* TX bufring comes first */ vmbus_txbr_setup(&chan->ch_txbr, br, txbr_size); /* RX bufring immediately follows TX bufring */ @@ -255,7 +282,7 @@ vmbus_chan_open(struct vmbus_channel *ch /* * Connect the bufrings, both RX and TX, to this channel. */ - error = vmbus_chan_gpadl_connect(chan, chan->ch_bufring_dma.hv_paddr, + error = vmbus_chan_gpadl_connect(chan, cbr->cbr_paddr, txbr_size + rxbr_size, &chan->ch_bufring_gpadl); if (error) { device_printf(sc->vmbus_dev, @@ -316,10 +343,6 @@ failed: vmbus_chan_gpadl_disconnect(chan, chan->ch_bufring_gpadl); chan->ch_bufring_gpadl = 0; } - if (chan->ch_bufring != NULL) { - hyperv_dmamem_free(&chan->ch_bufring_dma, chan->ch_bufring); - chan->ch_bufring = NULL; - } atomic_clear_int(&chan->ch_stflags, VMBUS_CHAN_ST_OPENED); return error; } From owner-svn-src-all@freebsd.org Wed Sep 21 06:27:43 2016 Return-Path: Delivered-To: svn-src-all@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 50104BE337F; Wed, 21 Sep 2016 06:27:43 +0000 (UTC) (envelope-from sephe@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 1456EE25; Wed, 21 Sep 2016 06:27:43 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L6RgZ8006088; Wed, 21 Sep 2016 06:27:42 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L6Rgg7006086; Wed, 21 Sep 2016 06:27:42 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609210627.u8L6Rgg7006086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 21 Sep 2016 06:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306073 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 06:27:43 -0000 Author: sephe Date: Wed Sep 21 06:27:42 2016 New Revision: 306073 URL: https://svnweb.freebsd.org/changeset/base/306073 Log: hyperv/hn: Allocate bufrings in attach DEVMETHOD. So that reinitialization, e.g. MTU change, will not fail when the system memory is excessively fragmented. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7961 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 21 05:56:47 2016 (r306072) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 21 06:27:42 2016 (r306073) @@ -136,6 +136,9 @@ struct hn_rx_ring { /* Rarely used stuffs */ struct sysctl_oid *hn_rx_sysctl_tree; int hn_rx_flags; + + void *hn_br; /* TX/RX bufring */ + struct hyperv_dma hn_br_dma; } __aligned(CACHE_LINE_SIZE); #define HN_TRUST_HCSUM_IP 0x0001 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 21 05:56:47 2016 (r306072) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 21 06:27:42 2016 (r306073) @@ -2372,6 +2372,16 @@ hn_create_rx_data(struct hn_softc *sc, i for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { struct hn_rx_ring *rxr = &sc->hn_rx_ring[i]; + rxr->hn_br = hyperv_dmamem_alloc(bus_get_dma_tag(dev), + PAGE_SIZE, 0, + NETVSC_DEVICE_RING_BUFFER_SIZE + + NETVSC_DEVICE_RING_BUFFER_SIZE, + &rxr->hn_br_dma, BUS_DMA_WAITOK); + if (rxr->hn_br == NULL) { + device_printf(dev, "allocate bufring failed\n"); + return (ENOMEM); + } + if (hn_trust_hosttcp) rxr->hn_trust_hcsum |= HN_TRUST_HCSUM_TCP; if (hn_trust_hostudp) @@ -2520,6 +2530,11 @@ hn_destroy_rx_data(struct hn_softc *sc) for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { struct hn_rx_ring *rxr = &sc->hn_rx_ring[i]; + if (rxr->hn_br == NULL) + continue; + hyperv_dmamem_free(&rxr->hn_br_dma, rxr->hn_br); + rxr->hn_br = NULL; + #if defined(INET) || defined(INET6) tcp_lro_free(&rxr->hn_lro); #endif @@ -3125,6 +3140,7 @@ hn_xmit_txeof_taskfunc(void *xtxr, int p static int hn_chan_attach(struct hn_softc *sc, struct vmbus_channel *chan) { + struct vmbus_chan_br cbr; struct hn_rx_ring *rxr; struct hn_tx_ring *txr = NULL; int idx, error; @@ -3163,9 +3179,14 @@ hn_chan_attach(struct hn_softc *sc, stru /* Bind this channel to a proper CPU. */ vmbus_chan_cpu_set(chan, (sc->hn_cpu + idx) % mp_ncpus); - /* Open this channel */ - error = vmbus_chan_open(chan, NETVSC_DEVICE_RING_BUFFER_SIZE, - NETVSC_DEVICE_RING_BUFFER_SIZE, NULL, 0, hn_chan_callback, rxr); + /* + * Open this channel + */ + cbr.cbr = rxr->hn_br; + cbr.cbr_paddr = rxr->hn_br_dma.hv_paddr; + cbr.cbr_txsz = NETVSC_DEVICE_RING_BUFFER_SIZE; + cbr.cbr_rxsz = NETVSC_DEVICE_RING_BUFFER_SIZE; + error = vmbus_chan_open_br(chan, &cbr, NULL, 0, hn_chan_callback, rxr); if (error) { if_printf(sc->hn_ifp, "open chan%u failed: %d\n", vmbus_chan_id(chan), error); From owner-svn-src-all@freebsd.org Wed Sep 21 06:43:53 2016 Return-Path: Delivered-To: svn-src-all@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 8746FBE3A87; Wed, 21 Sep 2016 06:43:53 +0000 (UTC) (envelope-from sephe@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 5758B8C0; Wed, 21 Sep 2016 06:43:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L6hqr6013511; Wed, 21 Sep 2016 06:43:52 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L6hqdp013510; Wed, 21 Sep 2016 06:43:52 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609210643.u8L6hqdp013510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 21 Sep 2016 06:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306074 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 06:43:53 -0000 Author: sephe Date: Wed Sep 21 06:43:52 2016 New Revision: 306074 URL: https://svnweb.freebsd.org/changeset/base/306074 Log: hyperv/vmbus: Assert that the bufring address is page aligned. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7962 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 21 06:27:42 2016 (r306073) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 21 06:43:52 2016 (r306074) @@ -250,6 +250,8 @@ vmbus_chan_open_br(struct vmbus_channel ("send bufring size is not multiple page")); KASSERT((rxbr_size & PAGE_MASK) == 0, ("recv bufring size is not multiple page")); + KASSERT((cbr->cbr_paddr & PAGE_MASK) == 0, + ("bufring is not page aligned")); /* * Zero out the TX/RX bufrings, in case that they were used before. From owner-svn-src-all@freebsd.org Wed Sep 21 06:44:33 2016 Return-Path: Delivered-To: svn-src-all@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 65F33BE3B39; Wed, 21 Sep 2016 06:44:33 +0000 (UTC) (envelope-from ache@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 286B7A77; Wed, 21 Sep 2016 06:44:33 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L6iWjv013597; Wed, 21 Sep 2016 06:44:32 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L6iWm6013596; Wed, 21 Sep 2016 06:44:32 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609210644.u8L6iWm6013596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Wed, 21 Sep 2016 06:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306075 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 06:44:33 -0000 Author: ache Date: Wed Sep 21 06:44:32 2016 New Revision: 306075 URL: https://svnweb.freebsd.org/changeset/base/306075 Log: 1) Microoptimize %p case. 2) Implememt %u for GNU compatibility. 3) Don't forget to advance buf for %w/%u. 4) Fail with incomplete week (week 0) request and no such week in the year. 5) Fix yday formula when Sunday requested and the week started from Monday. 6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u request. 7) Shift yday/wday to the first day of the year, if incomplete week (week 0) requested and no %w/%u used. MFC after: 7 days Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Wed Sep 21 06:43:52 2016 (r306074) +++ head/lib/libc/stdtime/strptime.c Wed Sep 21 06:44:32 2016 (r306075) @@ -301,10 +301,11 @@ label: * XXX This is bogus if parsed before hour-related * specifiers. */ + if (tm->tm_hour > 12) + return (NULL); + len = strlen(tptr->am); if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour == 12) tm->tm_hour = 0; buf += len; @@ -313,8 +314,6 @@ label: len = strlen(tptr->pm); if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour != 12) tm->tm_hour += 12; buf += len; @@ -374,15 +373,17 @@ label: break; + case 'u': case 'w': if (!isdigit_l((unsigned char)*buf, locale)) return (NULL); - i = *buf - '0'; - if (i > 6) + i = *buf++ - '0'; + if (i < 0 || i > 7 || (c == 'u' && i < 1) || + (c == 'w' && i > 6)) return (NULL); - tm->tm_wday = i; + tm->tm_wday = i % 7; flags |= FLAG_WDAY; break; @@ -609,17 +610,28 @@ label: TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); flags |= FLAG_YDAY; } else if (day_offset != -1) { + int tmpwday, tmpyday, fwo; + + fwo = first_wday_of(tm->tm_year + TM_YEAR_BASE); + /* No incomplete week (week 0). */ + if (week_offset == 0 && fwo == day_offset) + return (NULL); + /* Set the date to the first Sunday (or Monday) * of the specified week of the year. */ - if (!(flags & FLAG_WDAY)) { - tm->tm_wday = day_offset; - flags |= FLAG_WDAY; - } - tm->tm_yday = (7 - - first_wday_of(tm->tm_year + TM_YEAR_BASE) + - day_offset) % 7 + (week_offset - 1) * 7 + - tm->tm_wday - day_offset; + tmpwday = (flags & FLAG_WDAY) ? tm->tm_wday : + day_offset; + tmpyday = (7 - fwo + day_offset) % 7 + + (week_offset - 1) * 7 + + (tmpwday - day_offset + 7) % 7; + /* Impossible yday for incomplete week (week 0). */ + if (tmpyday < 0) { + if (flags & FLAG_WDAY) + return (NULL); + tmpyday = 0; + } + tm->tm_yday = tmpyday; flags |= FLAG_YDAY; } } From owner-svn-src-all@freebsd.org Wed Sep 21 06:54:27 2016 Return-Path: Delivered-To: svn-src-all@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 5D948BE3DB7; Wed, 21 Sep 2016 06:54:27 +0000 (UTC) (envelope-from sephe@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 2A7ADED2; Wed, 21 Sep 2016 06:54:27 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L6sQHO017233; Wed, 21 Sep 2016 06:54:26 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L6sQLr017232; Wed, 21 Sep 2016 06:54:26 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609210654.u8L6sQLr017232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 21 Sep 2016 06:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306076 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 06:54:27 -0000 Author: sephe Date: Wed Sep 21 06:54:26 2016 New Revision: 306076 URL: https://svnweb.freebsd.org/changeset/base/306076 Log: hyperv/hn: Put debug messages under bootverbose While I'm here, strip blank line. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7963 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 21 06:44:32 2016 (r306075) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 21 06:54:26 2016 (r306076) @@ -2358,7 +2358,8 @@ hn_create_rx_data(struct hn_softc *sc, i lroent_cnt = hn_lro_entry_count; if (lroent_cnt < TCP_LRO_ENTRIES) lroent_cnt = TCP_LRO_ENTRIES; - device_printf(dev, "LRO: entry count %d\n", lroent_cnt); + if (bootverbose) + device_printf(dev, "LRO: entry count %d\n", lroent_cnt); #endif #endif /* INET || INET6 */ @@ -3329,8 +3330,10 @@ hn_synth_alloc_subchans(struct hn_softc *nsubch = 0; return (0); } - if_printf(sc->hn_ifp, "RX rings offered %u, requested %d\n", - rxr_cnt, nchan); + if (bootverbose) { + if_printf(sc->hn_ifp, "RX rings offered %u, requested %d\n", + rxr_cnt, nchan); + } if (nchan > rxr_cnt) nchan = rxr_cnt; @@ -3339,7 +3342,7 @@ hn_synth_alloc_subchans(struct hn_softc *nsubch = 0; return (0); } - + /* * Allocate sub-channels from NVS. */ From owner-svn-src-all@freebsd.org Wed Sep 21 07:25:06 2016 Return-Path: Delivered-To: svn-src-all@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 E4B92BE37FD; Wed, 21 Sep 2016 07:25:06 +0000 (UTC) (envelope-from trasz@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 B601DB1; Wed, 21 Sep 2016 07:25:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L7P5cG028529; Wed, 21 Sep 2016 07:25:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L7P57P028528; Wed, 21 Sep 2016 07:25:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609210725.u8L7P57P028528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 21 Sep 2016 07:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306077 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 07:25:07 -0000 Author: trasz Date: Wed Sep 21 07:25:05 2016 New Revision: 306077 URL: https://svnweb.freebsd.org/changeset/base/306077 Log: Bump __FreeBSD_version after r305988, removal of bio_taskqueue(). Suggested by: asomers@ Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Sep 21 06:54:26 2016 (r306076) +++ head/sys/sys/param.h Wed Sep 21 07:25:05 2016 (r306077) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200008 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200009 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Wed Sep 21 07:25:36 2016 Return-Path: Delivered-To: svn-src-all@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 CBC22BE3851; Wed, 21 Sep 2016 07:25:36 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 67429225; Wed, 21 Sep 2016 07:25:36 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22c.google.com with SMTP id b130so75001838wmc.0; Wed, 21 Sep 2016 00:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=1Zhb0H5UoG4ah9vgmi4RgpRJjiLmItW0TJE9B+IEo20=; b=NcJ4xfrJmljGXf7FXp60+XHZ0NuPx0QSSIQ1YZpfagxusWFHwPZKw3afABVvx4GeD5 SRBGv+6qOSnO6VU9g+4RPn9pIgsY3pHRuUdY8Hr2yX95Eqvxx2TdhdgQqWjaATSEMwoh Pa+gBepM6+1aIY52vbo5VVn1mwmuovJvoRVXX3VsBukTOdERCuJ7QUFuUXyyLT9SHDO9 H4ZmEi4jH27Dkk1wTypM0D4MRJKkVrs9ARtuhrodTR0AfnK0+6sHJzfnZAJpmDi3XPPM 75PaaWaBHf2FYVjGH+cTz8wmuK4IbwZu1yyXSd47+yBTIrhdbFOBgw22MwdGDj4beNzs VTlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=1Zhb0H5UoG4ah9vgmi4RgpRJjiLmItW0TJE9B+IEo20=; b=RFrxYFTrcbXD5/ihF6Vw/LM2xtaiqDDqK8U5HK/Jl/peTUsbVqLdLX5xDmv/dXziEp 15lF8DTxAQ9x44VPajahMWdtIKt+GaniTGIdVP0FyRVr3tB6n1iOTqoZPBIZoMTA5pXr 2W0nvfkZ8kpAVorf9P6fEJBwEmpzqvSRmXuvioDqHm10J77MsYSL6kqSUH/4ylYOVPNg MPH15a4qam93Y4BxbqKUwm2oqz+jSOMm+udeh0lIGvEFT1smw+5x/Z4SMRLKudw1IDyi PiqI2PcBPpwVcCxAisuZQYj5He2X5aRgI1YZEo9IeOd7cBVplC8EBFMHE7Y8K3yWypzt tZlw== X-Gm-Message-State: AE9vXwPEX3lY7/W1eh9AJZVpay5qEI+f8ZuxiXF3O88UiX72tj+OxtlSH6tVItFEmlrpYA== X-Received: by 10.28.19.194 with SMTP id 185mr1663188wmt.51.1474442733689; Wed, 21 Sep 2016 00:25:33 -0700 (PDT) Received: from brick (acys180.neoplus.adsl.tpnet.pl. [83.11.202.180]) by smtp.gmail.com with ESMTPSA id au10sm32070625wjc.12.2016.09.21.00.25.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 00:25:32 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Wed, 21 Sep 2016 09:25:30 +0200 From: Edward Tomasz Napierala To: Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r305988 - in head/sys: geom sys Message-ID: <20160921072530.GA25303@brick> Mail-Followup-To: Alan Somers , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201609191746.u8JHkFKI071354@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 07:25:36 -0000 On 0920T1020, Alan Somers wrote: > On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala > wrote: > > Author: trasz > > Date: Mon Sep 19 17:46:15 2016 > > New Revision: 305988 > > URL: https://svnweb.freebsd.org/changeset/base/305988 > > > > Log: > > Remove unused bio_taskqueue(). > > > > MFC after: 1 month > > > > Modified: > > head/sys/geom/geom_io.c > > head/sys/sys/bio.h > > > > This is a KBI change, so you should bump __FreeBSD_version. You > probably shouldn't MFC it, either. Done, thanks. I won't MFC it either. From owner-svn-src-all@freebsd.org Wed Sep 21 07:26:14 2016 Return-Path: Delivered-To: svn-src-all@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 926C7BE38CE; Wed, 21 Sep 2016 07:26:14 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (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 1EE953F4; Wed, 21 Sep 2016 07:26:14 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id w84so175725526wmg.1; Wed, 21 Sep 2016 00:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=OE3+iguipHQ/A0RMFQL4orth61CnG+DRB+w2z2nj240=; b=kwoSM8PGUYayk/zYzgSIkmO+/0eBGl++hu42vN12kF7pEqoWavNugZfpMemqWV7CQ2 mNfk0A7oV4UGgj2Y0ky46rZsGg5SNNttGtEnGhwaallGF+IzhbeccBiCbaLuua8dlrIC 9strB4gSMqK/nWuvFPExvrvbDrISFIdp7M5QEBH4SbfMlXQTUKEJAqT0tUcj06Jar99h LFu7BXkzgZjSZmBacLAm4g4kRR78juxmuNNflxeYsPztvfKO3ZA9nCpIDyTs6qsEum8M ZYoTGGO41jHycTsL11d6D/tzcraQgpb2l1+VxMgTvdNLGhrIMeAyBWMHaQ4T7f6y4Qu6 5uSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=OE3+iguipHQ/A0RMFQL4orth61CnG+DRB+w2z2nj240=; b=KdBAbDEqGxDlISQQYupHMfLGZvADrQ8fjHUxhxupjnZ+/+YHZakeS29kIDKxh54Y+C a/U6kfv8/DUCAeMx2GN3sjVr4EJ8RjoFqe238vfnwD7W1PFzYHwWEagibsmk6Rzy10Qs /RGDmTd00H/uldeTb7Xdn9HhWAdTVEcHCRlbyZN9j52vbUvu60VhGLUlsFOAyGS93EIT nkNwOjRYZPA2OCYS4w0//X4GamcbdjB+YlPXoEHmvT1/tHJDOx32HcOpXE0aqXmQ9JXx N5cfgDw1rmCRRdtvOIjlWNnMUf8rqGkwVSo/gwlVB3Y1HJAQOPPYGG0F4zzf7Rkb49+Z 1Ivw== X-Gm-Message-State: AE9vXwNeQTfDFOaaueUkfzxZz5kgAyLiQAEx2ciuy9uRvmYvLPUnVZ3xp9OAuG4Jx3xkhQ== X-Received: by 10.28.5.133 with SMTP id 127mr1653790wmf.128.1474442772562; Wed, 21 Sep 2016 00:26:12 -0700 (PDT) Received: from brick (acys180.neoplus.adsl.tpnet.pl. [83.11.202.180]) by smtp.gmail.com with ESMTPSA id ya1sm32154983wjb.23.2016.09.21.00.26.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 00:26:11 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Wed, 21 Sep 2016 09:26:09 +0200 From: Edward Tomasz Napierala To: "Ngie Cooper (yaneurabeya)" Cc: Alan Somers , Alexander Motin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r305988 - in head/sys: geom sys Message-ID: <20160921072609.GB25303@brick> Mail-Followup-To: "Ngie Cooper (yaneurabeya)" , Alan Somers , Alexander Motin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201609191746.u8JHkFKI071354@repo.freebsd.org> <03DFBBFF-FA98-48CB-8180-B03B37538301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <03DFBBFF-FA98-48CB-8180-B03B37538301@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 07:26:14 -0000 On 0920T0934, Ngie Cooper (yaneurabeya) wrote: > > > On Sep 20, 2016, at 09:28, Alan Somers wrote: > > > > On Tue, Sep 20, 2016 at 10:23 AM, Alexander Motin wrote: > >> On 20.09.2016 09:20, Alan Somers wrote: > >>> On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala > >>> wrote: > >>>> Author: trasz > >>>> Date: Mon Sep 19 17:46:15 2016 > >>>> New Revision: 305988 > >>>> URL: https://svnweb.freebsd.org/changeset/base/305988 > >>>> > >>>> Log: > >>>> Remove unused bio_taskqueue(). > >>>> > >>>> MFC after: 1 month > >>>> > >>>> Modified: > >>>> head/sys/geom/geom_io.c > >>>> head/sys/sys/bio.h > >>>> > >>> > >>> This is a KBI change, so you should bump __FreeBSD_version. You > >>> probably shouldn't MFC it, either. > >> > >> The last/only consumer of this KPI I know gone with FreeBSD 9 and old > >> ATA stack. Do you know any other? > > > > Nothing in-tree. But it's publicly visible, so we have no way of > > knowing who might be using it out-of-tree. > > I’d have to check, but this might impact us (Isilon). We don’t use the __FreeBSD_version #ifdefs though in our code, so it’s fine from my perspective to leave things alone. > > That being said, are you sure that port klds (e.g. open-vm-tools*) aren’t impacted by this change? Did it go through a ports -exp run? I'm not sure if it's worth it. If something comes up, I'll fix it. From owner-svn-src-all@freebsd.org Wed Sep 21 08:09:34 2016 Return-Path: Delivered-To: svn-src-all@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 64A2ABE3B94; Wed, 21 Sep 2016 08:09:34 +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 308611B91; Wed, 21 Sep 2016 08:09:34 +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 u8L89XRW043972; Wed, 21 Sep 2016 08:09:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L89XDW043971; Wed, 21 Sep 2016 08:09:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609210809.u8L89XDW043971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 08:09: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: r306078 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 08:09:34 -0000 Author: kib Date: Wed Sep 21 08:09:33 2016 New Revision: 306078 URL: https://svnweb.freebsd.org/changeset/base/306078 Log: MFC r305939: Remove trailing space. Modified: stable/11/sys/amd64/amd64/machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/machdep.c Wed Sep 21 07:25:05 2016 (r306077) +++ stable/11/sys/amd64/amd64/machdep.c Wed Sep 21 08:09:33 2016 (r306078) @@ -1098,7 +1098,7 @@ add_efi_map_entries(struct efi_map_heade * Boot Services API. */ efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; - map = (struct efi_md *)((uint8_t *)efihdr + efisz); + map = (struct efi_md *)((uint8_t *)efihdr + efisz); if (efihdr->descriptor_size == 0) return; From owner-svn-src-all@freebsd.org Wed Sep 21 08:12:40 2016 Return-Path: Delivered-To: svn-src-all@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 B3B94BE3D94; Wed, 21 Sep 2016 08:12:40 +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 678691F2C; Wed, 21 Sep 2016 08:12:40 +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 u8L8Cd21047447; Wed, 21 Sep 2016 08:12:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L8Cd26047446; Wed, 21 Sep 2016 08:12:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609210812.u8L8Cd26047446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 08:12:39 +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: r306079 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 08:12:40 -0000 Author: kib Date: Wed Sep 21 08:12:39 2016 New Revision: 306079 URL: https://svnweb.freebsd.org/changeset/base/306079 Log: Record mergeinfo for the r305971 commit, merge of r305380 Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Wed Sep 21 08:14:56 2016 Return-Path: Delivered-To: svn-src-all@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 948B8BE3E27; Wed, 21 Sep 2016 08:14:56 +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 66D6A127; Wed, 21 Sep 2016 08:14:56 +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 u8L8EtBp047582; Wed, 21 Sep 2016 08:14:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L8EtH0047581; Wed, 21 Sep 2016 08:14:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609210814.u8L8EtH0047581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 08:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306080 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 08:14:56 -0000 Author: kib Date: Wed Sep 21 08:14:55 2016 New Revision: 306080 URL: https://svnweb.freebsd.org/changeset/base/306080 Log: MFC r305939: Remove trailing space. Modified: stable/10/sys/amd64/amd64/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Wed Sep 21 08:12:39 2016 (r306079) +++ stable/10/sys/amd64/amd64/machdep.c Wed Sep 21 08:14:55 2016 (r306080) @@ -1457,7 +1457,7 @@ add_efi_map_entries(struct efi_map_heade * Boot Services API. */ efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; - map = (struct efi_md *)((uint8_t *)efihdr + efisz); + map = (struct efi_md *)((uint8_t *)efihdr + efisz); if (efihdr->descriptor_size == 0) return; From owner-svn-src-all@freebsd.org Wed Sep 21 08:23:35 2016 Return-Path: Delivered-To: svn-src-all@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 25F10BE015B; Wed, 21 Sep 2016 08:23:35 +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 F0F4D95B; Wed, 21 Sep 2016 08:23:34 +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 u8L8NYui051350; Wed, 21 Sep 2016 08:23:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L8NX7Y051340; Wed, 21 Sep 2016 08:23:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609210823.u8L8NX7Y051340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 08:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306081 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 08:23:35 -0000 Author: kib Date: Wed Sep 21 08:23:33 2016 New Revision: 306081 URL: https://svnweb.freebsd.org/changeset/base/306081 Log: Add PROC_TRAPCAP procctl(2) controls and global sysctl kern.trap_enocap. Both can be used to cause processes in capability mode to receive SIGTRAP when ENOTCAPABLE or ECAPMODE errors are returned from syscalls. Idea by: emaste Reviewed by: oshogbo (previous version), emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D7965 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_fork.c head/sys/kern/kern_procctl.c head/sys/kern/subr_syscall.c head/sys/kern/sys_capability.c head/sys/sys/capsicum.h head/sys/sys/proc.h head/sys/sys/procctl.h head/sys/sys/signal.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 21 08:23:33 2016 (r306081) @@ -3048,6 +3048,7 @@ freebsd32_procctl(struct thread *td, str switch (uap->com) { case PROC_SPROTECT: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -3077,6 +3078,7 @@ freebsd32_procctl(struct thread *td, str data = &x.rk; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: data = &flags; break; default: @@ -3095,6 +3097,7 @@ freebsd32_procctl(struct thread *td, str error = error1; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/kern/kern_fork.c Wed Sep 21 08:23:33 2016 (r306081) @@ -497,7 +497,7 @@ do_fork(struct thread *td, struct fork_r * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; - p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC); + p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC | P2_TRAPCAP); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/kern/kern_procctl.c Wed Sep 21 08:23:33 2016 (r306081) @@ -336,6 +336,34 @@ trace_status(struct thread *td, struct p return (0); } +static int +trapcap_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + switch (state) { + case PROC_TRAPCAP_CTL_ENABLE: + p->p_flag2 |= P2_TRAPCAP; + break; + case PROC_TRAPCAP_CTL_DISABLE: + p->p_flag2 &= ~P2_TRAPCAP; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +trapcap_status(struct thread *td, struct proc *p, int *data) +{ + + *data = (p->p_flag2 & P2_TRAPCAP) != 0 ? PROC_TRAPCAP_CTL_ENABLE : + PROC_TRAPCAP_CTL_DISABLE; + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct procctl_args { idtype_t idtype; @@ -359,6 +387,7 @@ sys_procctl(struct thread *td, struct pr switch (uap->com) { case PROC_SPROTECT: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: error = copyin(uap->data, &flags, sizeof(flags)); if (error != 0) return (error); @@ -386,6 +415,7 @@ sys_procctl(struct thread *td, struct pr data = &x.rk; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: data = &flags; break; default: @@ -403,6 +433,7 @@ sys_procctl(struct thread *td, struct pr error = error1; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; @@ -432,6 +463,10 @@ kern_procctl_single(struct thread *td, s return (trace_ctl(td, p, *(int *)data)); case PROC_TRACE_STATUS: return (trace_status(td, p, data)); + case PROC_TRAPCAP_CTL: + return (trapcap_ctl(td, p, *(int *)data)); + case PROC_TRAPCAP_STATUS: + return (trapcap_status(td, p, data)); default: return (EINVAL); } @@ -452,6 +487,7 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_GETPIDS: case PROC_REAP_KILL: case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (idtype != P_PID) return (EINVAL); } @@ -462,6 +498,7 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_GETPIDS: case PROC_REAP_KILL: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: sx_slock(&proctree_lock); tree_locked = true; break; @@ -471,6 +508,7 @@ kern_procctl(struct thread *td, idtype_t tree_locked = true; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: tree_locked = false; break; default: Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/kern/subr_syscall.c Wed Sep 21 08:23:33 2016 (r306081) @@ -165,12 +165,25 @@ static inline void syscallret(struct thread *td, int error, struct syscall_args *sa) { struct proc *p, *p2; - int traced; + ksiginfo_t ksi; + int traced, error1; KASSERT((td->td_pflags & TDP_FORKING) == 0, ("fork() did not clear TDP_FORKING upon completion")); p = td->td_proc; + if ((trap_enotcap || (p->p_flag2 & P2_TRAPCAP) != 0) && + IN_CAPABILITY_MODE(td)) { + error1 = (td->td_pflags & TDP_NERRNO) == 0 ? error : + td->td_errno; + if (error1 == ENOTCAPABLE || error1 == ECAPMODE) { + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGTRAP; + ksi.ksi_errno = error1; + ksi.ksi_code = TRAP_CAP; + trapsignal(td, &ksi); + } + } /* * Handle reschedule and other end-of-syscall issues Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/kern/sys_capability.c Wed Sep 21 08:23:33 2016 (r306081) @@ -83,6 +83,10 @@ __FBSDID("$FreeBSD$"); #include #include +int trap_enotcap; +SYSCTL_INT(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RW, &trap_enotcap, 0, + "Deliver SIGTRAP on ENOTCAPABLE"); + #ifdef CAPABILITY_MODE FEATURE(security_capability_mode, "Capsicum Capability Mode"); Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/sys/capsicum.h Wed Sep 21 08:23:33 2016 (r306081) @@ -368,6 +368,8 @@ int cap_ioctl_check(struct filedesc *fdp int cap_fcntl_check_fde(struct filedescent *fde, int cmd); int cap_fcntl_check(struct filedesc *fdp, int fd, int cmd); +extern int trap_enotcap; + #else /* !_KERNEL */ __BEGIN_DECLS Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/sys/proc.h Wed Sep 21 08:23:33 2016 (r306081) @@ -716,6 +716,7 @@ struct proc { #define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on exec(2). */ #define P2_AST_SU 0x00000008 /* Handles SU ast for kthreads. */ #define P2_PTRACE_FSTP 0x00000010 /* SIGSTOP from PT_ATTACH not yet handled. */ +#define P2_TRAPCAP 0x00000020 /* SIGTRAP on ENOTCAPABLE */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/sys/procctl.h Wed Sep 21 08:23:33 2016 (r306081) @@ -43,6 +43,8 @@ #define PROC_REAP_KILL 6 /* kill descendants */ #define PROC_TRACE_CTL 7 /* en/dis ptrace and coredumps */ #define PROC_TRACE_STATUS 8 /* query tracing status */ +#define PROC_TRAPCAP_CTL 9 /* trap capability errors */ +#define PROC_TRAPCAP_STATUS 10 /* query trap capability status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -102,6 +104,9 @@ struct procctl_reaper_kill { #define PROC_TRACE_CTL_DISABLE 2 #define PROC_TRACE_CTL_DISABLE_EXEC 3 +#define PROC_TRAPCAP_CTL_ENABLE 1 +#define PROC_TRAPCAP_CTL_DISABLE 2 + #ifndef _KERNEL __BEGIN_DECLS int procctl(idtype_t, id_t, int, void *); Modified: head/sys/sys/signal.h ============================================================================== --- head/sys/sys/signal.h Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/sys/signal.h Wed Sep 21 08:23:33 2016 (r306081) @@ -291,6 +291,7 @@ typedef struct __siginfo { #define TRAP_BRKPT 1 /* Process breakpoint. */ #define TRAP_TRACE 2 /* Process trace trap. */ #define TRAP_DTRACE 3 /* DTrace induced trap. */ +#define TRAP_CAP 4 /* Capabilities protective trap. */ /* codes for SIGCHLD */ #define CLD_EXITED 1 /* Child has exited */ From owner-svn-src-all@freebsd.org Wed Sep 21 08:28:19 2016 Return-Path: Delivered-To: svn-src-all@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 8D5CFBE02A3; Wed, 21 Sep 2016 08:28:19 +0000 (UTC) (envelope-from tuexen@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 60429B60; Wed, 21 Sep 2016 08:28:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L8SI1Q051558; Wed, 21 Sep 2016 08:28:18 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L8SISl051557; Wed, 21 Sep 2016 08:28:18 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201609210828.u8L8SISl051557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 21 Sep 2016 08:28:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306082 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 08:28:19 -0000 Author: tuexen Date: Wed Sep 21 08:28:18 2016 New Revision: 306082 URL: https://svnweb.freebsd.org/changeset/base/306082 Log: Fix the handling of unordered fragmented user messages using DATA chunks. There were two bugs: * There was an accounting bug resulting in reporting a too small a_rwnd. * There are a bug when abandoning messages in the reassembly queue. MFC after: 4 weeks Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Wed Sep 21 08:23:33 2016 (r306081) +++ head/sys/netinet/sctp_indata.c Wed Sep 21 08:28:18 2016 (r306082) @@ -809,6 +809,8 @@ restart: tchk = TAILQ_FIRST(&control->reasm); if (tchk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { TAILQ_REMOVE(&control->reasm, tchk, sctp_next); + asoc->size_on_reasm_queue -= tchk->send_size; + sctp_ucount_decr(asoc->cnt_on_reasm_queue); nc->first_frag_seen = 1; nc->fsn_included = tchk->rec.data.fsn_num; nc->data = tchk->data; @@ -5322,6 +5324,9 @@ sctp_flush_reassm_for_str_seq(struct sct /* Not found */ return; } + if (old && !ordered && SCTP_TSN_GT(control->fsn_included, cumtsn)) { + return; + } TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) { /* Purge hanging chunks */ if (old && (ordered == 0)) { From owner-svn-src-all@freebsd.org Wed Sep 21 08:54:10 2016 Return-Path: Delivered-To: svn-src-all@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 3CECABE0C73; Wed, 21 Sep 2016 08:54:10 +0000 (UTC) (envelope-from andrew@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 EA6B0C1C; Wed, 21 Sep 2016 08:54:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L8s9TR062938; Wed, 21 Sep 2016 08:54:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L8s8HE062932; Wed, 21 Sep 2016 08:54:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609210854.u8L8s8HE062932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 21 Sep 2016 08:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306083 - in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/gpio include/dt-bindings/mfd include/dt-bindings/pinctrl include/dt-bindings/reset X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 08:54:10 -0000 Author: andrew Date: Wed Sep 21 08:54:08 2016 New Revision: 306083 URL: https://svnweb.freebsd.org/changeset/base/306083 Log: Update the device tree source files to a Linux 4.7-RC. MFC after: 2 weeks Sponsored by: ABT Systems Ltd Added: head/sys/gnu/dts/arm/am335x-baltos-ir2110.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts head/sys/gnu/dts/arm/am335x-baltos-ir3220.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts head/sys/gnu/dts/arm/am335x-baltos.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-baltos.dtsi head/sys/gnu/dts/arm/am335x-icev2.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-icev2.dts head/sys/gnu/dts/arm/am572x-idk.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am572x-idk.dts head/sys/gnu/dts/arm/am57xx-commercial-grade.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am57xx-commercial-grade.dtsi head/sys/gnu/dts/arm/am57xx-idk-common.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am57xx-idk-common.dtsi head/sys/gnu/dts/arm/am57xx-industrial-grade.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am57xx-industrial-grade.dtsi head/sys/gnu/dts/arm/arm-realview-eb-11mp-revb.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-11mp-revb.dts head/sys/gnu/dts/arm/arm-realview-eb-11mp.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-11mp.dts head/sys/gnu/dts/arm/arm-realview-eb-a9mp.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-a9mp.dts head/sys/gnu/dts/arm/arm-realview-eb-mp.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-mp.dtsi head/sys/gnu/dts/arm/arm-realview-eb.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb.dts head/sys/gnu/dts/arm/arm-realview-eb.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb.dtsi head/sys/gnu/dts/arm/arm-realview-pba8.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-pba8.dts head/sys/gnu/dts/arm/arm-realview-pbx-a9.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-pbx-a9.dts head/sys/gnu/dts/arm/arm-realview-pbx.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-pbx.dtsi head/sys/gnu/dts/arm/artpec6-devboard.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/artpec6-devboard.dts head/sys/gnu/dts/arm/artpec6.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/artpec6.dtsi head/sys/gnu/dts/arm/aspeed-ast2500-evb.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-ast2500-evb.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-bmc-opp-palmetto.dts head/sys/gnu/dts/arm/aspeed-g4.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-g4.dtsi head/sys/gnu/dts/arm/aspeed-g5.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-g5.dtsi head/sys/gnu/dts/arm/bcm2835-rpi-a.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/bcm2835-rpi-a.dts head/sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/bcm47094-dlink-dir-885l.dts head/sys/gnu/dts/arm/dra7-dspeve-thermal.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra7-dspeve-thermal.dtsi head/sys/gnu/dts/arm/dra7-iva-thermal.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra7-iva-thermal.dtsi head/sys/gnu/dts/arm/dra72-evm-common.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra72-evm-common.dtsi head/sys/gnu/dts/arm/dra72-evm-revc.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra72-evm-revc.dts head/sys/gnu/dts/arm/exynos-syscon-restart.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos-syscon-restart.dtsi head/sys/gnu/dts/arm/exynos3250-artik5-eval.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos3250-artik5-eval.dts head/sys/gnu/dts/arm/exynos3250-artik5.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos3250-artik5.dtsi head/sys/gnu/dts/arm/exynos4412-ppmu-common.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos4412-ppmu-common.dtsi head/sys/gnu/dts/arm/exynos5410-pinctrl.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos5410-pinctrl.dtsi head/sys/gnu/dts/arm/exynos5420-cpus.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos5420-cpus.dtsi head/sys/gnu/dts/arm/imx6dl-tx6s-8034.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6dl-tx6s-8034.dts head/sys/gnu/dts/arm/imx6dl-tx6s-8035.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6dl-tx6s-8035.dts head/sys/gnu/dts/arm/imx6dl-tx6u-8033.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6dl-tx6u-8033.dts head/sys/gnu/dts/arm/imx6dl-tx6u-81xx-mb7.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6dl-tx6u-81xx-mb7.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-apalis-ixora.dts head/sys/gnu/dts/arm/imx6q-b450v3.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-b450v3.dts head/sys/gnu/dts/arm/imx6q-b650v3.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-b650v3.dts head/sys/gnu/dts/arm/imx6q-b850v3.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-b850v3.dts head/sys/gnu/dts/arm/imx6q-ba16.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-ba16.dtsi head/sys/gnu/dts/arm/imx6q-bx50v3.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-bx50v3.dtsi head/sys/gnu/dts/arm/imx6q-evi.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-evi.dts head/sys/gnu/dts/arm/imx6q-icore-rqs.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-icore-rqs.dts head/sys/gnu/dts/arm/imx6q-marsboard.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-marsboard.dts head/sys/gnu/dts/arm/imx6q-tx6q-1036.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-tx6q-1036.dts head/sys/gnu/dts/arm/imx6q-tx6q-11x0-mb7.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6q-tx6q-11x0-mb7.dts head/sys/gnu/dts/arm/imx6qdl-apalis.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6qdl-apalis.dtsi head/sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6qdl-icore-rqs.dtsi head/sys/gnu/dts/arm/imx6qp-nitrogen6_max.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6qp-nitrogen6_max.dts head/sys/gnu/dts/arm/imx6qp-sabreauto.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6qp-sabreauto.dts head/sys/gnu/dts/arm/imx6qp-sabresd.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6qp-sabresd.dts head/sys/gnu/dts/arm/imx6qp.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6qp.dtsi head/sys/gnu/dts/arm/imx6sx-nitrogen6sx.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6sx-nitrogen6sx.dts head/sys/gnu/dts/arm/imx6sx-sdb-sai.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6sx-sdb-sai.dts head/sys/gnu/dts/arm/imx6ul-pico-hobbit.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6ul-pico-hobbit.dts head/sys/gnu/dts/arm/imx6ul-tx6ul-0010.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6ul-tx6ul-0010.dts head/sys/gnu/dts/arm/imx6ul-tx6ul-0011.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6ul-tx6ul-0011.dts head/sys/gnu/dts/arm/imx6ul-tx6ul-mainboard.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6ul-tx6ul-mainboard.dts head/sys/gnu/dts/arm/imx6ul-tx6ul.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx6ul-tx6ul.dtsi head/sys/gnu/dts/arm/imx7d-nitrogen7.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/imx7d-nitrogen7.dts head/sys/gnu/dts/arm/keystone-k2e-clocks.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2e-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2e-evm.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2e-evm.dts head/sys/gnu/dts/arm/keystone-k2e-netcp.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2e-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2e.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2e.dtsi head/sys/gnu/dts/arm/keystone-k2g-evm.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2g-evm.dts head/sys/gnu/dts/arm/keystone-k2g.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2g.dtsi head/sys/gnu/dts/arm/keystone-k2hk-clocks.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2hk-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2hk-evm.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2hk-evm.dts head/sys/gnu/dts/arm/keystone-k2hk-netcp.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2hk-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2hk.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2hk.dtsi head/sys/gnu/dts/arm/keystone-k2l-clocks.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2l-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2l-evm.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2l-evm.dts head/sys/gnu/dts/arm/keystone-k2l-netcp.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2l-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2l.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/keystone-k2l.dtsi head/sys/gnu/dts/arm/kirkwood-linkstation-6282.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation-6282.dtsi head/sys/gnu/dts/arm/kirkwood-linkstation-duo-6281.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation-duo-6281.dtsi head/sys/gnu/dts/arm/kirkwood-linkstation-lsqvl.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsqvl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lsvl.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsvl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lswsxl.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswsxl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lswvl.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswvl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lswxl.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswxl.dts head/sys/gnu/dts/arm/kirkwood-linkstation.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linkstation.dtsi head/sys/gnu/dts/arm/kirkwood-linksys-viper.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/kirkwood-linksys-viper.dts head/sys/gnu/dts/arm/logicpd-som-lv-37xx-devkit.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/logicpd-som-lv-37xx-devkit.dts head/sys/gnu/dts/arm/logicpd-som-lv.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/logicpd-som-lv.dtsi head/sys/gnu/dts/arm/lpc3250-ea3250.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/lpc3250-ea3250.dts head/sys/gnu/dts/arm/lpc3250-phy3250.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/lpc3250-phy3250.dts head/sys/gnu/dts/arm/mps2-an385.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mps2-an385.dts head/sys/gnu/dts/arm/mps2-an399.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mps2-an399.dts head/sys/gnu/dts/arm/mps2.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mps2.dtsi head/sys/gnu/dts/arm/mt2701-pinfunc.h - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mt2701-pinfunc.h head/sys/gnu/dts/arm/mt7623-evb.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mt7623-evb.dts head/sys/gnu/dts/arm/mt7623.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mt7623.dtsi head/sys/gnu/dts/arm/mvebu-linkstation-fan.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mvebu-linkstation-fan.dtsi head/sys/gnu/dts/arm/mvebu-linkstation-gpio-simple.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/mvebu-linkstation-gpio-simple.dtsi head/sys/gnu/dts/arm/omap3-sniper.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/omap3-sniper.dts head/sys/gnu/dts/arm/omap4-kc1.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/omap4-kc1.dts head/sys/gnu/dts/arm/orion5x-kuroboxpro.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/orion5x-kuroboxpro.dts head/sys/gnu/dts/arm/orion5x-linkstation-lsgl.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/orion5x-linkstation-lsgl.dts head/sys/gnu/dts/arm/orion5x-linkstation.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/orion5x-linkstation.dtsi head/sys/gnu/dts/arm/ox810se.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/ox810se.dtsi head/sys/gnu/dts/arm/qcom-apq8064-arrow-db600c-pins.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c-pins.dtsi head/sys/gnu/dts/arm/qcom-apq8064-arrow-db600c.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c.dts head/sys/gnu/dts/arm/qcom-apq8064-asus-nexus7-flo.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/qcom-apq8064-asus-nexus7-flo.dts head/sys/gnu/dts/arm/qcom-apq8064-pins.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/qcom-apq8064-pins.dtsi head/sys/gnu/dts/arm/qcom-ipq4019-ap.dk01.1-c1.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk01.1-c1.dts head/sys/gnu/dts/arm/qcom-ipq4019-ap.dk01.1.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk01.1.dtsi head/sys/gnu/dts/arm/qcom-ipq4019.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/qcom-ipq4019.dtsi head/sys/gnu/dts/arm/rk3288-miqi.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/rk3288-miqi.dts head/sys/gnu/dts/arm/socfpga_cyclone5_vining_fpga.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/socfpga_cyclone5_vining_fpga.dts head/sys/gnu/dts/arm/stm32f469-disco.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/stm32f469-disco.dts head/sys/gnu/dts/arm/sun4i-a10-dserve-dsrv9703c.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun4i-a10-dserve-dsrv9703c.dts head/sys/gnu/dts/arm/sun5i-a13-difrnce-dit4350.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun5i-a13-difrnce-dit4350.dts head/sys/gnu/dts/arm/sun6i-a31s-colorfly-e708-q1.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun6i-a31s-colorfly-e708-q1.dts head/sys/gnu/dts/arm/sun7i-a20-itead-ibox.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun7i-a20-itead-ibox.dts head/sys/gnu/dts/arm/sun7i-a20-lamobo-r1.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun7i-a20-lamobo-r1.dts head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2-emmc.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-lime2-emmc.dts head/sys/gnu/dts/arm/sun8i-a23-polaroid-mid2809pxe04.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun8i-a23-polaroid-mid2809pxe04.dts head/sys/gnu/dts/arm/sun8i-a83t-allwinner-h8homlet-v2.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun8i-a83t-allwinner-h8homlet-v2.dts head/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun8i-a83t-cubietruck-plus.dts head/sys/gnu/dts/arm/sun8i-a83t.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun8i-a83t.dtsi head/sys/gnu/dts/arm/sun8i-h3-orangepi-2.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-2.dts head/sys/gnu/dts/arm/sun8i-h3-orangepi-one.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-one.dts head/sys/gnu/dts/arm/sun8i-h3-orangepi-pc.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-pc.dts head/sys/gnu/dts/arm/sunxi-itead-core-common.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/sunxi-itead-core-common.dtsi head/sys/gnu/dts/arm/tps65217.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/tps65217.dtsi head/sys/gnu/dts/arm/uniphier-ph1-pro4-ace.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-ace.dts head/sys/gnu/dts/arm/uniphier-ph1-pro4-sanji.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-sanji.dts head/sys/gnu/dts/arm/vf610-zii-dev-rev-b.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-b.dts head/sys/gnu/dts/arm/wd-mbwe.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/wd-mbwe.dts head/sys/gnu/dts/include/dt-bindings/clock/ath79-clk.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/clock/ath79-clk.h head/sys/gnu/dts/include/dt-bindings/clock/axis,artpec6-clkctrl.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/clock/axis,artpec6-clkctrl.h head/sys/gnu/dts/include/dt-bindings/clock/hi3519-clock.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/clock/hi3519-clock.h head/sys/gnu/dts/include/dt-bindings/clock/microchip,pic32-clock.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/clock/microchip,pic32-clock.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq4019.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq4019.h head/sys/gnu/dts/include/dt-bindings/clock/rk3399-cru.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/clock/rk3399-cru.h head/sys/gnu/dts/include/dt-bindings/gpio/meson-gxbb-gpio.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/gpio/meson-gxbb-gpio.h head/sys/gnu/dts/include/dt-bindings/gpio/tegra186-gpio.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/gpio/tegra186-gpio.h head/sys/gnu/dts/include/dt-bindings/mfd/max77620.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/mfd/max77620.h head/sys/gnu/dts/include/dt-bindings/pinctrl/hisi.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/pinctrl/hisi.h head/sys/gnu/dts/include/dt-bindings/pinctrl/mt7623-pinfunc.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/pinctrl/mt7623-pinfunc.h head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32f429-pinfunc.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/pinctrl/stm32f429-pinfunc.h head/sys/gnu/dts/include/dt-bindings/reset/pistachio-resets.h - copied unchanged from r305983, vendor/device-tree/dist/include/dt-bindings/reset/pistachio-resets.h Modified: head/sys/gnu/dts/arm/at91-sama5d3_xplained.dts head/sys/gnu/dts/arm/at91sam9g45.dtsi head/sys/gnu/dts/arm/at91sam9n12ek.dts head/sys/gnu/dts/arm/at91sam9x5.dtsi head/sys/gnu/dts/arm/imx51-babbage.dts head/sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi head/sys/gnu/dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts head/sys/gnu/dts/arm/imx53-ard.dts head/sys/gnu/dts/arm/imx53-m53evk.dts head/sys/gnu/dts/arm/imx53-qsb-common.dtsi head/sys/gnu/dts/arm/imx53-tx53-x03x.dts head/sys/gnu/dts/arm/imx53-tx53-x13x.dts head/sys/gnu/dts/arm/imx53-tx53.dtsi head/sys/gnu/dts/arm/imx6dl-riotboard.dts head/sys/gnu/dts/arm/imx6dl-tx6dl-comtft.dts head/sys/gnu/dts/arm/imx6dl-tx6u-801x.dts head/sys/gnu/dts/arm/imx6dl-tx6u-811x.dts head/sys/gnu/dts/arm/imx6dl-wandboard-revb1.dts head/sys/gnu/dts/arm/imx6dl.dtsi head/sys/gnu/dts/arm/imx6q-gk802.dts head/sys/gnu/dts/arm/imx6q-gw5400-a.dts head/sys/gnu/dts/arm/imx6q-tx6q-1010-comtft.dts head/sys/gnu/dts/arm/imx6q-tx6q-1010.dts head/sys/gnu/dts/arm/imx6q-tx6q-1020-comtft.dts head/sys/gnu/dts/arm/imx6q-tx6q-1020.dts head/sys/gnu/dts/arm/imx6q-tx6q-1110.dts head/sys/gnu/dts/arm/imx6q-wandboard-revb1.dts head/sys/gnu/dts/arm/imx6q.dtsi head/sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi head/sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi head/sys/gnu/dts/arm/imx6qdl-rex.dtsi head/sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi head/sys/gnu/dts/arm/imx6qdl-sabresd.dtsi head/sys/gnu/dts/arm/imx6qdl-tx6.dtsi head/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi head/sys/gnu/dts/arm/imx6qdl.dtsi head/sys/gnu/dts/arm/imx6sx-sdb.dts head/sys/gnu/dts/arm/imx6sx.dtsi head/sys/gnu/dts/arm/sama5d3.dtsi head/sys/gnu/dts/arm/vf610.dtsi head/sys/gnu/dts/include/dt-bindings/clock/exynos5420.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7790-clock.h head/sys/gnu/dts/include/dt-bindings/clock/vf610-clock.h head/sys/gnu/dts/include/dt-bindings/gpio/tegra-gpio.h Directory Properties: head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/include/ (props changed) Copied: head/sys/gnu/dts/arm/am335x-baltos-ir2110.dts (from r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-baltos-ir2110.dts Wed Sep 21 08:54:08 2016 (r306083, copy of r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts) @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" + +/ { + model = "OnRISC Baltos iR 2110"; +}; + +&am33xx_pinmux { + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ + AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ + AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ + AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ + AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ + AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ + AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ + >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&cpsw_emac0 { + phy_id = <&davinci_mdio>, <1>; + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <7>; + phy-mode = "rgmii-txid"; + dual_emac_res_vlan = <2>; +}; + +&phy_sel { + rmii-clock-ext = <1>; +}; Copied: head/sys/gnu/dts/arm/am335x-baltos-ir3220.dts (from r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-baltos-ir3220.dts Wed Sep 21 08:54:08 2016 (r306083, copy of r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts) @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" + +/ { + model = "OnRISC Baltos iR 3220"; +}; + +&am33xx_pinmux { + tca6416_pins: pinmux_tca6416_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */ + >; + }; + + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ + AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ + AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ + AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ + AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ + AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ + AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ + >; + }; + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd_mux3 */ + AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1) /* spi0_d0.uart2_txd_mux3 */ + AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE2) /* i2c0_sda.uart2_ctsn_mux0 */ + AM33XX_IOPAD(0x98c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* i2c0_scl.uart2_rtsn_mux0 */ + AM33XX_IOPAD(0x830, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.gpio1[12] DTR */ + AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.gpio1[13] DSR */ + AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.gpio1[14] DCD */ + AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad15.gpio1[15] RI */ + + AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */ + >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&i2c1 { + tca6416: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <20 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&tca6416_pins>; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&cpsw_emac0 { + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; + fixed-link { + speed = <100>; + full-duplex; + }; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <7>; + phy-mode = "rgmii-txid"; + dual_emac_res_vlan = <2>; +}; + +&phy_sel { + rmii-clock-ext = <1>; +}; Copied: head/sys/gnu/dts/arm/am335x-baltos.dtsi (from r305978, vendor/device-tree/dist/src/arm/am335x-baltos.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-baltos.dtsi Wed Sep 21 08:54:08 2016 (r306083, copy of r305978, vendor/device-tree/dist/src/arm/am335x-baltos.dtsi) @@ -0,0 +1,408 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +#include "am33xx.dtsi" +#include +#include + +/ { + compatible = "vscom,onrisc", "ti,am33xx"; + + cpus { + cpu@0 { + cpu0-supply = <&vdd1_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + + wl12xx_vmmc: fixedregulator@2 { + pinctrl-names = "default"; + pinctrl-0 = <&wl12xx_gpio>; + compatible = "regulator-fixed"; + regulator-name = "vwl1271"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 8 0>; + startup-delay-us = <70000>; + enable-active-high; + }; +}; + +&am33xx_pinmux { + mmc2_pins: pinmux_mmc2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0_mux0 */ + AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1_mux0 */ + AM33XX_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2_mux0 */ + AM33XX_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3_mux0 */ + AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk_mux0 */ + AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd_mux0 */ + AM33XX_IOPAD(0x9e4, PIN_INPUT_PULLUP | MUX_MODE7) /* emu0.gpio3[7] */ + >; + }; + + wl12xx_gpio: pinmux_wl12xx_gpio { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9e8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* emu1.gpio3[8] */ + >; + }; + + tps65910_pins: pinmux_tps65910_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ben1.gpio1[28] */ + >; + }; + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE2) /* spi0_d1.i2c1_sda_mux3 */ + AM33XX_IOPAD(0x95c, PIN_INPUT | MUX_MODE2) /* spi0_cs0.i2c1_scl_mux3 */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_tx_en.rmii1_txen */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii1_refclk */ + + + /* Slave 2 */ + AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ + AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ + AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ + AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ + AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ + AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ + AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ + AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ + AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ + AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ + >; + }; + + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) + + /* Slave 2 reset value*/ + AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + davinci_mdio_sleep: davinci_mdio_sleep { + pinctrl-single,pins = < + /* MDIO reset value */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + nandflash_pins_s0: nandflash_pins_s0 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ + AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ + AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ + AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ + AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ + AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ + AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ + AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ + AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ + AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ + AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ + AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ + AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ + AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ + AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ + >; + }; +}; + +&elm { + status = "okay"; +}; + +&gpmc { + pinctrl-names = "default"; + pinctrl-0 = <&nandflash_pins_s0>; + ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ + status = "okay"; + + nand@0,0 { + compatible = "ti,omap2-nand"; + reg = <0 0 4>; /* CS0, offset 0, IO size 4 */ + interrupt-parent = <&gpmc>; + interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ + <1 IRQ_TYPE_NONE>; /* termcount */ + rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ + nand-bus-width = <8>; + ti,nand-ecc-opt = "bch8"; + ti,nand-xfer-type = "polled"; + + gpmc,device-nand = "true"; + gpmc,device-width = <1>; + gpmc,sync-clk-ps = <0>; + gpmc,cs-on-ns = <0>; + gpmc,cs-rd-off-ns = <44>; + gpmc,cs-wr-off-ns = <44>; + gpmc,adv-on-ns = <6>; + gpmc,adv-rd-off-ns = <34>; + gpmc,adv-wr-off-ns = <44>; + gpmc,we-on-ns = <0>; + gpmc,we-off-ns = <40>; + gpmc,oe-on-ns = <0>; + gpmc,oe-off-ns = <54>; + gpmc,access-ns = <64>; + gpmc,rd-cycle-ns = <82>; + gpmc,wr-cycle-ns = <82>; + gpmc,bus-turnaround-ns = <0>; + gpmc,cycle2cycle-delay-ns = <0>; + gpmc,clk-activation-ns = <0>; + gpmc,wr-access-ns = <40>; + gpmc,wr-data-mux-bus-ns = <0>; + + #address-cells = <1>; + #size-cells = <1>; + elm_id = <&elm>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tps: tps@2d { + reg = <0x2d>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio1>; + interrupts = <28 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&tps65910_pins>; + }; + + at24@50 { + compatible = "at24,24c02"; + pagesize = <8>; + reg = <0x50>; + }; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&cppi41dma { + status = "okay"; +}; + +#include "tps65910.dtsi" + +&tps { + vcc1-supply = <&vbat>; + vcc2-supply = <&vbat>; + vcc3-supply = <&vbat>; + vcc4-supply = <&vbat>; + vcc5-supply = <&vbat>; + vcc6-supply = <&vbat>; + vcc7-supply = <&vbat>; + vccio-supply = <&vbat>; + + ti,en-ck32k-xtal = <1>; + + regulators { + vrtc_reg: regulator@0 { + regulator-always-on; + }; + + vio_reg: regulator@1 { + regulator-always-on; + }; + + vdd1_reg: regulator@2 { + /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ + regulator-name = "vdd_mpu"; + regulator-min-microvolt = <912500>; + regulator-max-microvolt = <1312500>; + regulator-boot-on; + regulator-always-on; + }; + + vdd2_reg: regulator@3 { + /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ + regulator-name = "vdd_core"; + regulator-min-microvolt = <912500>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; + }; + + vdd3_reg: regulator@4 { + regulator-always-on; + }; + + vdig1_reg: regulator@5 { + regulator-always-on; + }; + + vdig2_reg: regulator@6 { + regulator-always-on; + }; + + vpll_reg: regulator@7 { + regulator-always-on; + }; + + vdac_reg: regulator@8 { + regulator-always-on; + }; + + vaux1_reg: regulator@9 { + regulator-always-on; + }; + + vaux2_reg: regulator@10 { + regulator-always-on; + }; + + vaux33_reg: regulator@11 { + regulator-always-on; + }; + + vmmc_reg: regulator@12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; +}; + +&mac { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cpsw_default>; + pinctrl-1 = <&cpsw_sleep>; + dual_emac = <1>; + + status = "okay"; +}; + +&davinci_mdio { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&davinci_mdio_default>; + pinctrl-1 = <&davinci_mdio_sleep>; + + status = "okay"; +}; + +&mmc1 { + vmmc-supply = <&vmmc_reg>; + status = "okay"; +}; + +&mmc2 { + status = "okay"; + vmmc-supply = <&wl12xx_vmmc>; + ti,non-removable; + bus-width = <4>; + cap-power-off-card; + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + + #address-cells = <1>; + #size-cells = <0>; + wlcore: wlcore@2 { + compatible = "ti,wl1835"; + reg = <2>; + interrupt-parent = <&gpio3>; + interrupts = <7 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&sham { + status = "okay"; +}; + +&aes { + status = "okay"; +}; + +&gpio0 { + ti,no-reset-on-init; +}; Copied: head/sys/gnu/dts/arm/am335x-icev2.dts (from r305978, vendor/device-tree/dist/src/arm/am335x-icev2.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-icev2.dts Wed Sep 21 08:54:08 2016 (r306083, copy of r305978, vendor/device-tree/dist/src/arm/am335x-icev2.dts) @@ -0,0 +1,306 @@ +/* + * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * AM335x ICE V2 board + * http://www.ti.com/tool/tmdsice3359 + */ + +/dts-v1/; + +#include "am33xx.dtsi" + +/ { + model = "TI AM3359 ICE-V2"; + compatible = "ti,am3359-icev2", "ti,am33xx"; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + + vtt_fixed: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "vtt"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + gpio = <&gpio0 18 GPIO_ACTIVE_HIGH>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + }; + + leds@0 { + compatible = "gpio-leds"; + + led@0 { + label = "out0"; + gpios = <&tpic2810 0 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@1 { + label = "out1"; + gpios = <&tpic2810 1 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@2 { + label = "out2"; + gpios = <&tpic2810 2 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@3 { + label = "out3"; + gpios = <&tpic2810 3 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@4 { + label = "out4"; + gpios = <&tpic2810 4 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@5 { + label = "out5"; + gpios = <&tpic2810 5 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@6 { + label = "out6"; + gpios = <&tpic2810 6 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@7 { + label = "out7"; + gpios = <&tpic2810 7 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; + + /* Tricolor status LEDs */ + leds@1 { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&user_leds>; + + led@0 { + label = "status0:red:cpu0"; + gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "cpu0"; + }; + + led@1 { + label = "status0:green:usr"; + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@2 { + label = "status0:yellow:usr"; + gpios = <&gpio3 9 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@3 { + label = "status1:red:mmc0"; + gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "mmc0"; + }; + + led@4 { + label = "status1:green:usr"; + gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led@5 { + label = "status1:yellow:usr"; + gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + user_leds: user_leds { + pinctrl-single,pins = < + AM33XX_IOPAD(0x91c, PIN_OUTPUT | MUX_MODE7) /* (J18) gmii1_txd3.gpio0[16] */ + AM33XX_IOPAD(0x920, PIN_OUTPUT | MUX_MODE7) /* (K15) gmii1_txd2.gpio0[17] */ + AM33XX_IOPAD(0x9b0, PIN_OUTPUT | MUX_MODE7) /* (A15) xdma_event_intr0.gpio0[19] */ + AM33XX_IOPAD(0x9b4, PIN_OUTPUT | MUX_MODE7) /* (D14) xdma_event_intr1.gpio0[20] */ + AM33XX_IOPAD(0x880, PIN_OUTPUT | MUX_MODE7) /* (U9) gpmc_csn1.gpio1[30] */ + AM33XX_IOPAD(0x92c, PIN_OUTPUT | MUX_MODE7) /* (K18) gmii1_txclk.gpio3[9] */ + >; + }; + + mmc0_pins_default: mmc0_pins_default { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* (F17) mmc0_dat3.mmc0_dat3 */ + AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* (F18) mmc0_dat2.mmc0_dat2 */ + AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* (G15) mmc0_dat1.mmc0_dat1 */ + AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* (G16) mmc0_dat0.mmc0_dat0 */ + AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* (G17) mmc0_clk.mmc0_clk */ + AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* (G18) mmc0_cmd.mmc0_cmd */ + AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE5) /* (C15) spi0_cs1.mmc0_sdcd */ + >; + }; + + i2c0_pins_default: i2c0_pins_default { + pinctrl-single,pins = < + AM33XX_IOPAD(0x988, PIN_INPUT | MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */ + AM33XX_IOPAD(0x98c, PIN_INPUT | MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */ + >; + }; + + spi0_pins_default: spi0_pins_default { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* (A17) spi0_sclk.spi0_sclk */ + AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* (B17) spi0_d0.spi0_d0 */ + AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* (B16) spi0_d1.spi0_d1 */ + AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0) /* (A16) spi0_cs0.spi0_cs0 */ + >; + }; + + uart3_pins_default: uart3_pins_default { + pinctrl-single,pins = < + AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* (L17) gmii1_rxd3.uart3_rxd */ + AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLUP | MUX_MODE1) /* (L16) gmii1_rxd2.uart3_txd */ + >; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_default>; + + status = "okay"; + clock-frequency = <400000>; + + tps: power-controller@2d { + reg = <0x2d>; + }; + + tpic2810: gpio@60 { + compatible = "ti,tpic2810"; + reg = <0x60>; + gpio-controller; + #gpio-cells = <2>; + }; +}; + +#include "tps65910.dtsi" + +&tps { + vcc1-supply = <&vbat>; + vcc2-supply = <&vbat>; + vcc3-supply = <&vbat>; + vcc4-supply = <&vbat>; + vcc5-supply = <&vbat>; + vcc6-supply = <&vbat>; + vcc7-supply = <&vbat>; + vccio-supply = <&vbat>; + + regulators { + vrtc_reg: regulator@0 { + regulator-always-on; + }; + + vio_reg: regulator@1 { + regulator-always-on; + }; + + vdd1_reg: regulator@2 { + regulator-name = "vdd_mpu"; + regulator-min-microvolt = <912500>; + regulator-max-microvolt = <1326000>; + regulator-boot-on; + regulator-always-on; + }; + + vdd2_reg: regulator@3 { + regulator-name = "vdd_core"; + regulator-min-microvolt = <912500>; + regulator-max-microvolt = <1144000>; + regulator-boot-on; + regulator-always-on; + }; + + vdd3_reg: regulator@4 { + regulator-always-on; + }; + + vdig1_reg: regulator@5 { + regulator-always-on; + }; + + vdig2_reg: regulator@6 { + regulator-always-on; + }; + + vpll_reg: regulator@7 { + regulator-always-on; + }; + + vdac_reg: regulator@8 { + regulator-always-on; + }; + + vaux1_reg: regulator@9 { + regulator-always-on; + }; + + vaux2_reg: regulator@10 { + regulator-always-on; + }; + + vaux33_reg: regulator@11 { + regulator-always-on; + }; + + vmmc_reg: regulator@12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; +}; + +&mmc1 { + status = "okay"; + vmmc-supply = <&vmmc_reg>; + bus-width = <4>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_default>; +}; + +&gpio0 { + /* Do not idle the GPIO used for holding the VTT regulator */ + ti,no-reset-on-init; + ti,no-idle-on-init; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins_default>; + status = "okay"; +}; Copied: head/sys/gnu/dts/arm/am572x-idk.dts (from r305978, vendor/device-tree/dist/src/arm/am572x-idk.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am572x-idk.dts Wed Sep 21 08:54:08 2016 (r306083, copy of r305978, vendor/device-tree/dist/src/arm/am572x-idk.dts) @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; + +#include "dra74x.dtsi" +#include +#include +#include "am57xx-idk-common.dtsi" + +/ { + model = "TI AM5728 IDK"; + compatible = "ti,am5728-idk", "ti,am5728", "ti,dra742", "ti,dra74", + "ti,dra7"; + + memory { + device_type = "memory"; + reg = <0x0 0x80000000 0x0 0x80000000>; + }; + + extcon_usb2: extcon_usb2 { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>; + }; + + status-leds { + compatible = "gpio-leds"; + cpu0-led { + label = "status0:red:cpu0"; + gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "cpu0"; + }; + + usr0-led { + label = "status0:green:usr"; + gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + heartbeat-led { + label = "status0:blue:heartbeat"; + gpios = <&gpio3 12 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "heartbeat"; + }; + + cpu1-led { + label = "status1:red:cpu1"; + gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "cpu1"; + }; + + usr1-led { + label = "status1:green:usr"; + gpios = <&gpio7 23 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + mmc0-led { + label = "status1:blue:mmc0"; + gpios = <&gpio7 22 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "mmc0"; + }; + }; +}; + +&omap_dwc3_2 { + extcon = <&extcon_usb2>; +}; + +&mmc1 { + status = "okay"; + vmmc-supply = <&v3_3d>; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Sep 21 09:06:07 2016 Return-Path: Delivered-To: svn-src-all@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 352DFBE239E; Wed, 21 Sep 2016 09:06:07 +0000 (UTC) (envelope-from andrew@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 0745836E; Wed, 21 Sep 2016 09:06:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L966qP067034; Wed, 21 Sep 2016 09:06:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L9664R067033; Wed, 21 Sep 2016 09:06:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609210906.u8L9664R067033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 21 Sep 2016 09:06: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: r306084 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 09:06:07 -0000 Author: andrew Date: Wed Sep 21 09:06:06 2016 New Revision: 306084 URL: https://svnweb.freebsd.org/changeset/base/306084 Log: MFC r304892: Print both the kernel read and write translation in DDB when asking for a virtual to physical translation. These may be different, e.g. when a page is mapped as read-only. Sponsored by: ABT Systems Ltd Modified: stable/11/sys/arm64/arm64/machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/machdep.c Wed Sep 21 08:54:08 2016 (r306083) +++ stable/11/sys/arm64/arm64/machdep.c Wed Sep 21 09:06:06 2016 (r306084) @@ -1011,7 +1011,9 @@ DB_SHOW_COMMAND(vtop, db_show_vtop) if (have_addr) { phys = arm64_address_translate_s1e1r(addr); - db_printf("Physical address reg: 0x%016lx\n", phys); + db_printf("Physical address reg (read): 0x%016lx\n", phys); + phys = arm64_address_translate_s1e1w(addr); + db_printf("Physical address reg (write): 0x%016lx\n", phys); } else db_printf("show vtop \n"); } From owner-svn-src-all@freebsd.org Wed Sep 21 09:45:15 2016 Return-Path: Delivered-To: svn-src-all@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 D5412BE303F; Wed, 21 Sep 2016 09:45:15 +0000 (UTC) (envelope-from andrew@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 A4C6B9C4; Wed, 21 Sep 2016 09:45:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L9jEmU082125; Wed, 21 Sep 2016 09:45:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L9jEe8082123; Wed, 21 Sep 2016 09:45:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609210945.u8L9jEe8082123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 21 Sep 2016 09:45: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: r306085 - in stable/11/sys/arm64: arm64 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 09:45:15 -0000 Author: andrew Date: Wed Sep 21 09:45:14 2016 New Revision: 306085 URL: https://svnweb.freebsd.org/changeset/base/306085 Log: MFC 305285: Add a pc_clock pcpu field and use it to implement cpu_est_clockrate. This will allow drivers that manage the clock frequency to communicate this with the reset of the kernel. Sponsored by: ABT Systems Ltd Modified: stable/11/sys/arm64/arm64/machdep.c stable/11/sys/arm64/include/pcpu.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/machdep.c Wed Sep 21 09:06:06 2016 (r306084) +++ stable/11/sys/arm64/arm64/machdep.c Wed Sep 21 09:45:14 2016 (r306085) @@ -407,8 +407,17 @@ cpu_flush_dcache(void *ptr, size_t len) int cpu_est_clockrate(int cpu_id, uint64_t *rate) { + struct pcpu *pc; - panic("ARM64TODO: cpu_est_clockrate"); + pc = pcpu_find(cpu_id); + if (pc == NULL || rate == NULL) + return (EINVAL); + + if (pc->pc_clock == 0) + return (EOPNOTSUPP); + + *rate = pc->pc_clock; + return (0); } void Modified: stable/11/sys/arm64/include/pcpu.h ============================================================================== --- stable/11/sys/arm64/include/pcpu.h Wed Sep 21 09:06:06 2016 (r306084) +++ stable/11/sys/arm64/include/pcpu.h Wed Sep 21 09:45:14 2016 (r306085) @@ -38,7 +38,8 @@ #define PCPU_MD_FIELDS \ u_int pc_acpi_id; /* ACPI CPU id */ \ u_int pc_midr; /* stored MIDR value */ \ - char __pad[121] + uint64_t pc_clock; \ + char __pad[113] #ifdef _KERNEL From owner-svn-src-all@freebsd.org Wed Sep 21 09:50:52 2016 Return-Path: Delivered-To: svn-src-all@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 03128BE3252; Wed, 21 Sep 2016 09:50:52 +0000 (UTC) (envelope-from andrew@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 C7EE4CA0; Wed, 21 Sep 2016 09:50:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8L9opCx083074; Wed, 21 Sep 2016 09:50:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8L9op73083073; Wed, 21 Sep 2016 09:50:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609210950.u8L9op73083073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 21 Sep 2016 09:50: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: r306086 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 09:50:52 -0000 Author: andrew Date: Wed Sep 21 09:50:50 2016 New Revision: 306086 URL: https://svnweb.freebsd.org/changeset/base/306086 Log: MFC 304799: Map coherent memory in a non-coherent dma tag as uncached. This is similar to what the 32-bit arm code does, with the exception that it always assumes the tag is non-coherent. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/arm64/arm64/busdma_bounce.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- stable/11/sys/arm64/arm64/busdma_bounce.c Wed Sep 21 09:45:14 2016 (r306085) +++ stable/11/sys/arm64/arm64/busdma_bounce.c Wed Sep 21 09:50:50 2016 (r306086) @@ -438,6 +438,13 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm mflags |= M_ZERO; if (flags & BUS_DMA_NOCACHE) attr = VM_MEMATTR_UNCACHEABLE; + else if ((flags & BUS_DMA_COHERENT) != 0 && + (dmat->bounce_flags & BF_COHERENT) == 0) + /* + * If we have a non-coherent tag, and are trying to allocate + * a coherent block of memory it needs to be uncached. + */ + attr = VM_MEMATTR_UNCACHEABLE; else attr = VM_MEMATTR_DEFAULT; From owner-svn-src-all@freebsd.org Wed Sep 21 10:05:52 2016 Return-Path: Delivered-To: svn-src-all@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 6AD77BE3902; Wed, 21 Sep 2016 10:05:52 +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 4846382C; Wed, 21 Sep 2016 10:05:52 +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 u8LA5pTq089986; Wed, 21 Sep 2016 10:05:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LA5pA7089984; Wed, 21 Sep 2016 10:05:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211005.u8LA5pA7089984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 10:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306087 - in head/sys/amd64: amd64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:05:52 -0000 Author: kib Date: Wed Sep 21 10:05:51 2016 New Revision: 306087 URL: https://svnweb.freebsd.org/changeset/base/306087 Log: Export the pmap_cache_bits() and pmap_pinit_pml4() functions from the amd64 pmap. The new pmap_pinit_pml4() function initializes the level 4 page table with entries for the kernel mappings. Both functions are needed for upcoming EFI Runtime Services support. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 21 09:50:50 2016 (r306086) +++ head/sys/amd64/amd64/pmap.c Wed Sep 21 10:05:51 2016 (r306087) @@ -1324,7 +1324,7 @@ pmap_swap_pat(pmap_t pmap, pt_entry_t en * Determine the appropriate bits to set in a PTE or PDE for a specified * caching mode. */ -static int +int pmap_cache_bits(pmap_t pmap, int mode, boolean_t is_pde) { int cache_bits, pat_flag, pat_idx; @@ -2345,6 +2345,29 @@ pmap_pinit0(pmap_t pmap) CPU_FILL(&kernel_pmap->pm_active); } +void +pmap_pinit_pml4(vm_page_t pml4pg) +{ + pml4_entry_t *pm_pml4; + int i; + + pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); + + /* Wire in kernel global address entries. */ + for (i = 0; i < NKPML4E; i++) { + pm_pml4[KPML4BASE + i] = (KPDPphys + ptoa(i)) | X86_PG_RW | + X86_PG_V | PG_U; + } + for (i = 0; i < ndmpdpphys; i++) { + pm_pml4[DMPML4I + i] = (DMPDPphys + ptoa(i)) | X86_PG_RW | + X86_PG_V | PG_U; + } + + /* install self-referential address mapping entry(s) */ + pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | X86_PG_V | X86_PG_RW | + X86_PG_A | X86_PG_M; +} + /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. @@ -2381,20 +2404,7 @@ pmap_pinit_type(pmap_t pmap, enum pmap_t */ if ((pmap->pm_type = pm_type) == PT_X86) { pmap->pm_cr3 = pml4phys; - - /* Wire in kernel global address entries. */ - for (i = 0; i < NKPML4E; i++) { - pmap->pm_pml4[KPML4BASE + i] = (KPDPphys + ptoa(i)) | - X86_PG_RW | X86_PG_V | PG_U; - } - for (i = 0; i < ndmpdpphys; i++) { - pmap->pm_pml4[DMPML4I + i] = (DMPDPphys + ptoa(i)) | - X86_PG_RW | X86_PG_V | PG_U; - } - - /* install self-referential address mapping entry(s) */ - pmap->pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | - X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M; + pmap_pinit_pml4(pml4pg); } pmap->pm_root.rt_root = 0; Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Wed Sep 21 09:50:50 2016 (r306086) +++ head/sys/amd64/include/pmap.h Wed Sep 21 10:05:51 2016 (r306087) @@ -391,6 +391,7 @@ struct thread; void pmap_activate_sw(struct thread *); void pmap_bootstrap(vm_paddr_t *); +int pmap_cache_bits(pmap_t pmap, int mode, boolean_t is_pde); int pmap_change_attr(vm_offset_t, vm_size_t, int); void pmap_demote_DMAP(vm_paddr_t base, vm_size_t len, boolean_t invalidate); void pmap_init_pat(void); @@ -403,6 +404,7 @@ void *pmap_mapdev(vm_paddr_t, vm_size_t) void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); boolean_t pmap_page_is_mapped(vm_page_t m); void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); +void pmap_pinit_pml4(vm_page_t); void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); From owner-svn-src-all@freebsd.org Wed Sep 21 10:10:37 2016 Return-Path: Delivered-To: svn-src-all@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 C7A08BE397C; Wed, 21 Sep 2016 10:10:37 +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 84E78A0F; Wed, 21 Sep 2016 10:10:37 +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 u8LAAaof090203; Wed, 21 Sep 2016 10:10:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LAAahN090202; Wed, 21 Sep 2016 10:10:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211010.u8LAAahN090202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 10:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306088 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:10:37 -0000 Author: kib Date: Wed Sep 21 10:10:36 2016 New Revision: 306088 URL: https://svnweb.freebsd.org/changeset/base/306088 Log: Add amd64 functions to load/store GDT register, store IDT and TR registers. Note that lgdt() name is already used for function which, besides loading GDT, also reloads segment descriptors cache, thus new function is named bare_lgdt(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Wed Sep 21 10:05:51 2016 (r306087) +++ head/sys/amd64/include/cpufunc.h Wed Sep 21 10:10:36 2016 (r306088) @@ -645,12 +645,36 @@ load_gs(u_short sel) #endif static __inline void +bare_lgdt(struct region_descriptor *addr) +{ + __asm __volatile("lgdt (%0)" : : "r" (addr)); +} + +static __inline void +sgdt(struct region_descriptor *addr) +{ + char *loc; + + loc = (char *)addr; + __asm __volatile("sgdt %0" : "=m" (*loc) : : "memory"); +} + +static __inline void lidt(struct region_descriptor *addr) { __asm __volatile("lidt (%0)" : : "r" (addr)); } static __inline void +sidt(struct region_descriptor *addr) +{ + char *loc; + + loc = (char *)addr; + __asm __volatile("sidt %0" : "=m" (*loc) : : "memory"); +} + +static __inline void lldt(u_short sel) { __asm __volatile("lldt %0" : : "r" (sel)); @@ -662,6 +686,15 @@ ltr(u_short sel) __asm __volatile("ltr %0" : : "r" (sel)); } +static __inline uint32_t +read_tr(void) +{ + u_short sel; + + __asm __volatile("str %0" : "=r" (sel)); + return (sel); +} + static __inline uint64_t rdr0(void) { From owner-svn-src-all@freebsd.org Wed Sep 21 10:15:09 2016 Return-Path: Delivered-To: svn-src-all@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 A80E3BE3BFF; Wed, 21 Sep 2016 10:15:09 +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 74E54F56; Wed, 21 Sep 2016 10:15:09 +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 u8LAF8eO093689; Wed, 21 Sep 2016 10:15:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LAF8PS093687; Wed, 21 Sep 2016 10:15:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211015.u8LAF8PS093687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 10:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306089 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:15:09 -0000 Author: kib Date: Wed Sep 21 10:15:08 2016 New Revision: 306089 URL: https://svnweb.freebsd.org/changeset/base/306089 Log: Make resettodr_lock accessible outside subr_rtc.c. Protect CLOCK_GETTIME() with the lock. Now all time-related accesses to the CMOS for RTC should be under the lock. This is needed to allow upcoming EFI Runtime Services support to provide required execution environment for the firmware calls. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/subr_rtc.c head/sys/sys/clock.h Modified: head/sys/kern/subr_rtc.c ============================================================================== --- head/sys/kern/subr_rtc.c Wed Sep 21 10:10:36 2016 (r306088) +++ head/sys/kern/subr_rtc.c Wed Sep 21 10:15:08 2016 (r306089) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); static device_t clock_dev = NULL; static long clock_res; static struct timespec clock_adj; -static struct mtx resettodr_lock; +struct mtx resettodr_lock; MTX_SYSINIT(resettodr_init, &resettodr_lock, "tod2rl", MTX_DEF); /* XXX: should be kern. now, it's no longer machdep. */ @@ -132,7 +132,9 @@ inittodr(time_t base) goto wrong_time; } /* XXX: We should poll all registered RTCs in case of failure */ + mtx_lock(&resettodr_lock); error = CLOCK_GETTIME(clock_dev, &ts); + mtx_unlock(&resettodr_lock); if (error != 0 && error != EINVAL) { printf("warning: clock_gettime failed (%d), the system time " "will not be set accurately\n", error); Modified: head/sys/sys/clock.h ============================================================================== --- head/sys/sys/clock.h Wed Sep 21 10:10:36 2016 (r306088) +++ head/sys/sys/clock.h Wed Sep 21 10:15:08 2016 (r306089) @@ -54,6 +54,7 @@ */ extern int tz_minuteswest; extern int tz_dsttime; +extern struct mtx resettodr_lock; int utc_offset(void); From owner-svn-src-all@freebsd.org Wed Sep 21 10:22:47 2016 Return-Path: Delivered-To: svn-src-all@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 B7EDDBE3F89; Wed, 21 Sep 2016 10:22:47 +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 82C4885D; Wed, 21 Sep 2016 10:22:47 +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 u8LAMkEC097308; Wed, 21 Sep 2016 10:22:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LAMkMA097305; Wed, 21 Sep 2016 10:22:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211022.u8LAMkMA097305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 10:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306090 - head/sys/boot/efi/loader/arch/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:22:47 -0000 Author: kib Date: Wed Sep 21 10:22:46 2016 New Revision: 306090 URL: https://svnweb.freebsd.org/changeset/base/306090 Log: Simple post-mortem reporter for amd64 loader.efi. There is no way to see anything about the faults occuring in loader.efi. Some intel BIOSes do output a line into serial port at 115200/8/1 regardless of the current port settings with the EFI error number, but this is too little, and not always available, esp. if the user does not know where to look. The patch adds a simple facility to grab exceptions and at least dump generic registers and some exception details. Due to the relative complexity of correctly taking over the BIOS IDT setup, only install the facility on user request. Two new commands, 'grab_faults' and 'ungrab_faults' are provided, first one takes over, second undoes the first. It is supposed that user would execute 'grab' by the developer direction of collecting the debugging data. The 'fault' command generates exception to test the setup. Fault handlers use dedicated stack to improve chances of catching stack/TSS exceptions. Due to this, BIOS IDT is duplicated into a private copy, and debugger needs to find a free GDT slot for TSS. This is done in somewhat complicated efi_redirect_exceptions(). Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D7935 Added: head/sys/boot/efi/loader/arch/amd64/exc.S (contents, props changed) head/sys/boot/efi/loader/arch/amd64/trap.c (contents, props changed) Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/Makefile.inc Wed Sep 21 10:15:08 2016 (r306089) +++ head/sys/boot/efi/loader/arch/amd64/Makefile.inc Wed Sep 21 10:22:46 2016 (r306090) @@ -3,7 +3,9 @@ SRCS+= amd64_tramp.S \ start.S \ framebuffer.c \ - elf64_freebsd.c + elf64_freebsd.c \ + trap.c \ + exc.S .PATH: ${.CURDIR}/../../i386/libi386 SRCS+= nullconsole.c \ Added: head/sys/boot/efi/loader/arch/amd64/exc.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/amd64/exc.S Wed Sep 21 10:22:46 2016 (r306090) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov under sponsorship + * from the FreeBSD Foundation. + * + * 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$ + */ + + .macro EH N, err=1 + .align 8 + .globl EXC\N\()_handler +EXC\N\()_handler: + .if \err != 1 + pushq $0 + .endif + pushq %rax + pushq %rdx + pushq %rcx + movl $\N,%ecx + jmp all_handlers + .endm + + .text + EH 0,0 + EH 1,0 + EH 2,0 + EH 3,0 + EH 4,0 + EH 5,0 + EH 6,0 + EH 7,0 + EH 8 + EH 9,0 + EH 10 + EH 11 + EH 12 + EH 13 + EH 14 + EH 16,0 + EH 17 + EH 18,0 + EH 19,0 + EH 20,0 + + .globl exc_rsp +all_handlers: + cmpq %rsp,exc_rsp(%rip) + je exception + + /* + * Interrupt, not exception. + * First, copy the hardware interrupt frame to the previous stack. + * Our handler always has private IST stack. + */ + movq (6*8)(%rsp),%rax /* saved %rsp value, AKA old stack */ + subq (5*8),%rax + movq (3*8)(%rsp),%rdx /* copy %rip to old stack */ + movq %rdx,(%rax) + movq (4*8)(%rsp),%rdx /* copy %cs */ + movq %rdx,(1*8)(%rax) + movq (5*8)(%rsp),%rdx /* copy %rflags */ + movq %rdx,(2*8)(%rax) + movq (6*8)(%rsp),%rdx /* copy %rsp */ + movq %rdx,(3*8)(%rax) + movq (7*8)(%rsp),%rdx /* copy %ss */ + movq %rdx,(4*8)(%rax) + + /* + * Now simulate invocation of the original interrupt handler + * with retq. We switch stacks and execute retq from the old + * stack since there is no free registers at the last moment. + */ + subq $16,%rax + leaq fw_intr_handlers(%rip),%rdx + movq (%rdx,%rcx,8),%rdx /* push intr handler address on old stack */ + movq %rdx,8(%rax) + movq (2*8)(%rsp),%rcx /* saved %rax is put on top of old stack */ + movq %rcx,(%rax) + movq (%rsp),%rcx + movq 8(%rsp),%rdx + + movq 32(%rsp),%rsp /* switch to old stack */ + popq %rax + retq + +exception: + /* + * Form the struct trapframe on our IST stack. + * Skip three words, which are currently busy with temporal + * saves. + */ + pushq %r15 + pushq %r14 + pushq %r13 + pushq %r12 + pushq %r11 + pushq %r10 + pushq %rbp + pushq %rbx + pushq $0 /* %rax */ + pushq %r9 + pushq %r8 + pushq $0 /* %rcx */ + pushq $0 /* %rdx */ + pushq %rsi + pushq %rdi + + /* + * Move %rax, %rdx, %rcx values into the final location, + * from the three words which were skipped above. + */ + movq 0x88(%rsp),%rax + movq %rax,0x30(%rsp) /* tf_rax */ + movq 0x78(%rsp),%rax + movq %rax,0x18(%rsp) /* tf_rcx */ + movq 0x80(%rsp),%rax + movq %rax,0x10(%rsp) /* tf_rdx */ + + /* + * And fill the three words themself. + */ + movq %cr2,%rax + movq %rax,0x80(%rsp) /* tf_addr */ + movl %ecx,0x78(%rsp) /* tf_trapno */ + movw %ds,0x8e(%rsp) + movw %es,0x8c(%rsp) + movw %fs,0x7c(%rsp) + movw %gs,0x7e(%rsp) + movw $0,0x88(%rsp) /* tf_flags */ + + /* + * Call dump routine. + */ + movq %rsp,%rdi + callq report_exc + + /* + * Hang after reporting. Interrupts are already disabled. + */ +1: + hlt + jmp 1b Added: head/sys/boot/efi/loader/arch/amd64/trap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/amd64/trap.c Wed Sep 21 10:22:46 2016 (r306090) @@ -0,0 +1,398 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "bootstrap.h" +#include "loader_efi.h" + +#define NUM_IST 8 +#define NUM_EXC 32 + +/* + * This code catches exceptions but forwards hardware interrupts to + * handlers installed by firmware. It differentiates exceptions + * vs. interrupts by presence of the error code on the stack, which + * causes different stack pointer value on trap handler entry. + * + * Use kernel layout for the trapframe just to not be original. + * + * Use free IST slot in existing TSS, or create our own TSS if + * firmware did not configured any, to have stack switched to + * IST-specified one, e.g. to handle #SS. If hand-off cannot find + * unused IST slot, or create a new descriptor in GDT, we bail out. + */ + +static struct region_descriptor fw_idt; /* Descriptor for pristine fw IDT */ +static struct region_descriptor loader_idt;/* Descriptor for loader + shadow IDT */ +static EFI_PHYSICAL_ADDRESS lidt_pa; /* Address of loader shadow IDT */ +static EFI_PHYSICAL_ADDRESS tss_pa; /* Address of TSS */ +static EFI_PHYSICAL_ADDRESS exc_stack_pa;/* Address of IST stack for loader */ +EFI_PHYSICAL_ADDRESS exc_rsp; /* %rsp value on our IST stack when + exception happens */ +EFI_PHYSICAL_ADDRESS fw_intr_handlers[NUM_EXC]; /* fw handlers for < 32 IDT + vectors */ +static int intercepted[NUM_EXC]; +static int ist; /* IST for exception handlers */ +static uint32_t tss_fw_seg; /* Fw TSS segment */ +static uint32_t loader_tss; /* Loader TSS segment */ +static struct region_descriptor fw_gdt; /* Descriptor of pristine GDT */ +static EFI_PHYSICAL_ADDRESS loader_gdt_pa; /* Address of loader shadow GDT */ + +void report_exc(struct trapframe *tf); +void +report_exc(struct trapframe *tf) +{ + + /* XXX using printf */ + printf("====================================================" + "============================\n"); + printf("Exception %u\n", tf->tf_trapno); + printf("ss 0x%04hx cs 0x%04hx ds 0x%04hx es 0x%04hx fs 0x%04hx " + "gs 0x%04hx\n", + (uint16_t)tf->tf_ss, (uint16_t)tf->tf_cs, (uint16_t)tf->tf_ds, + (uint16_t)tf->tf_es, (uint16_t)tf->tf_fs, (uint16_t)tf->tf_gs); + printf("err 0x%08x rfl 0x%08x addr 0x%016lx\n" + "rsp 0x%016lx rip 0x%016lx\n", + (uint32_t)tf->tf_err, (uint32_t)tf->tf_rflags, tf->tf_addr, + tf->tf_rsp, tf->tf_rip); + printf( + "rdi 0x%016lx rsi 0x%016lx rdx 0x%016lx\n" + "rcx 0x%016lx r8 0x%016lx r9 0x%016lx\n" + "rax 0x%016lx rbx 0x%016lx rbp 0x%016lx\n" + "r10 0x%016lx r11 0x%016lx r12 0x%016lx\n" + "r13 0x%016lx r14 0x%016lx r15 0x%016lx\n", + tf->tf_rdi, tf->tf_rsi, tf->tf_rdx, tf->tf_rcx, tf->tf_r8, + tf->tf_r9, tf->tf_rax, tf->tf_rbx, tf->tf_rbp, tf->tf_r10, + tf->tf_r11, tf->tf_r12, tf->tf_r13, tf->tf_r14, tf->tf_r15); + printf("Machine stopped.\n"); +} + +static void +prepare_exception(unsigned idx, uint64_t my_handler, + int ist_use_table[static NUM_IST]) +{ + struct gate_descriptor *fw_idt_e, *loader_idt_e; + + fw_idt_e = &((struct gate_descriptor *)fw_idt.rd_base)[idx]; + loader_idt_e = &((struct gate_descriptor *)loader_idt.rd_base)[idx]; + fw_intr_handlers[idx] = fw_idt_e->gd_looffset + + (fw_idt_e->gd_hioffset << 16); + intercepted[idx] = 1; + ist_use_table[fw_idt_e->gd_ist]++; + loader_idt_e->gd_looffset = my_handler; + loader_idt_e->gd_hioffset = my_handler >> 16; + loader_idt_e->gd_selector = fw_idt_e->gd_selector; /* XXX */ + loader_idt_e->gd_ist = 0; + loader_idt_e->gd_type = SDT_SYSIGT; + loader_idt_e->gd_dpl = 0; + loader_idt_e->gd_p = 1; + loader_idt_e->gd_xx = 0; + loader_idt_e->sd_xx1 = 0; +} +#define PREPARE_EXCEPTION(N) \ + extern char EXC##N##_handler[]; \ + prepare_exception(N, (uintptr_t)EXC##N##_handler, ist_use_table); + +static void +free_tables(void) +{ + + if (lidt_pa != 0) { + BS->FreePages(lidt_pa, EFI_SIZE_TO_PAGES(fw_idt.rd_limit)); + lidt_pa = 0; + } + if (exc_stack_pa != 0) { + BS->FreePages(exc_stack_pa, 1); + exc_stack_pa = 0; + } + if (tss_pa != 0 && tss_fw_seg == 0) { + BS->FreePages(tss_pa, EFI_SIZE_TO_PAGES(sizeof(struct + amd64tss))); + tss_pa = 0; + } + if (loader_gdt_pa != 0) { + BS->FreePages(tss_pa, 2); + loader_gdt_pa = 0; + } + ist = 0; + loader_tss = 0; +} + +static int +efi_setup_tss(struct region_descriptor *gdt, uint32_t loader_tss_idx, + struct amd64tss **tss) +{ + EFI_STATUS status; + struct system_segment_descriptor *tss_desc; + + tss_desc = (struct system_segment_descriptor *)(gdt->rd_base + + (loader_tss_idx << 3)); + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(sizeof(struct amd64tss)), &tss_pa); + if (EFI_ERROR(status)) { + printf("efi_setup_tss: AllocatePages tss error %lu\n", + EFI_ERROR_CODE(status)); + return (0); + } + *tss = (struct amd64tss *)tss_pa; + bzero(*tss, sizeof(**tss)); + tss_desc->sd_lolimit = sizeof(struct amd64tss); + tss_desc->sd_lobase = tss_pa; + tss_desc->sd_type = SDT_SYSTSS; + tss_desc->sd_dpl = 0; + tss_desc->sd_p = 1; + tss_desc->sd_hilimit = sizeof(struct amd64tss) >> 16; + tss_desc->sd_gran = 0; + tss_desc->sd_hibase = tss_pa >> 24; + tss_desc->sd_xx0 = 0; + tss_desc->sd_xx1 = 0; + tss_desc->sd_mbz = 0; + tss_desc->sd_xx2 = 0; + return (1); +} + +static int +efi_redirect_exceptions(void) +{ + int ist_use_table[NUM_IST]; + struct gate_descriptor *loader_idt_e; + struct system_segment_descriptor *tss_desc, *gdt_desc; + struct amd64tss *tss; + struct region_descriptor *gdt_rd, loader_gdt; + uint32_t i; + EFI_STATUS status; + register_t rfl; + + sidt(&fw_idt); + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(fw_idt.rd_limit), &lidt_pa); + if (EFI_ERROR(status)) { + printf("efi_redirect_exceptions: AllocatePages IDT error %lu\n", + EFI_ERROR_CODE(status)); + lidt_pa = 0; + return (0); + } + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, 1, + &exc_stack_pa); + if (EFI_ERROR(status)) { + printf("efi_redirect_exceptions: AllocatePages stk error %lu\n", + EFI_ERROR_CODE(status)); + exc_stack_pa = 0; + free_tables(); + return (0); + } + loader_idt.rd_limit = fw_idt.rd_limit; + bcopy((void *)fw_idt.rd_base, (void *)loader_idt.rd_base, + loader_idt.rd_limit); + bzero(ist_use_table, sizeof(ist_use_table)); + bzero(fw_intr_handlers, sizeof(fw_intr_handlers)); + bzero(intercepted, sizeof(intercepted)); + + sgdt(&fw_gdt); + tss_fw_seg = read_tr(); + gdt_rd = NULL; + if (tss_fw_seg == 0) { + for (i = 2; (i << 3) + sizeof(*gdt_desc) <= fw_gdt.rd_limit; + i += 2) { + gdt_desc = (struct system_segment_descriptor *)( + fw_gdt.rd_base + (i << 3)); + if (gdt_desc->sd_type == 0 && gdt_desc->sd_mbz == 0) { + gdt_rd = &fw_gdt; + break; + } + } + if (gdt_rd == NULL) { + if (i >= 8190) { + printf("efi_redirect_exceptions: all slots " + "in gdt are used\n"); + free_tables(); + return (0); + } + loader_gdt.rd_limit = roundup2(fw_gdt.rd_limit + + sizeof(struct system_segment_descriptor), + sizeof(struct system_segment_descriptor)) - 1; + i = (loader_gdt.rd_limit + 1 - + sizeof(struct system_segment_descriptor)) / + sizeof(struct system_segment_descriptor) * 2; + status = BS->AllocatePages(AllocateAnyPages, + EfiLoaderData, + EFI_SIZE_TO_PAGES(loader_gdt.rd_limit), + &loader_gdt_pa); + if (EFI_ERROR(status)) { + printf("efi_setup_tss: AllocatePages gdt error " + "%lu\n", EFI_ERROR_CODE(status)); + loader_gdt_pa = 0; + free_tables(); + return (0); + } + loader_gdt.rd_base = loader_gdt_pa; + bzero((void *)loader_gdt.rd_base, loader_gdt.rd_limit); + bcopy((void *)fw_gdt.rd_base, + (void *)loader_gdt.rd_base, fw_gdt.rd_limit); + gdt_rd = &loader_gdt; + } + loader_tss = i << 3; + if (!efi_setup_tss(gdt_rd, i, &tss)) { + tss_pa = 0; + free_tables(); + return (0); + } + } else { + tss_desc = (struct system_segment_descriptor *)((char *) + fw_gdt.rd_base + tss_fw_seg); + if (tss_desc->sd_type != SDT_SYSTSS && + tss_desc->sd_type != SDT_SYSBSY) { + printf("LTR points to non-TSS descriptor\n"); + free_tables(); + return (0); + } + tss_pa = tss_desc->sd_lobase + (tss_desc->sd_hibase << 16); + tss = (struct amd64tss *)tss_pa; + tss_desc->sd_type = SDT_SYSTSS; /* unbusy */ + } + + PREPARE_EXCEPTION(0); + PREPARE_EXCEPTION(1); + PREPARE_EXCEPTION(2); + PREPARE_EXCEPTION(3); + PREPARE_EXCEPTION(4); + PREPARE_EXCEPTION(5); + PREPARE_EXCEPTION(6); + PREPARE_EXCEPTION(7); + PREPARE_EXCEPTION(8); + PREPARE_EXCEPTION(9); + PREPARE_EXCEPTION(10); + PREPARE_EXCEPTION(11); + PREPARE_EXCEPTION(12); + PREPARE_EXCEPTION(13); + PREPARE_EXCEPTION(14); + PREPARE_EXCEPTION(16); + PREPARE_EXCEPTION(17); + PREPARE_EXCEPTION(18); + PREPARE_EXCEPTION(19); + PREPARE_EXCEPTION(20); + + exc_rsp = exc_stack_pa + PAGE_SIZE - + (6 /* hw exception frame */ + 3 /* scratch regs */) * 8; + + /* Find free IST and use it */ + for (ist = 1; ist < NUM_IST; ist++) { + if (ist_use_table[ist] == 0) + break; + } + if (ist == NUM_IST) { + printf("efi_redirect_exceptions: all ISTs used\n"); + free_tables(); + lidt_pa = 0; + return (0); + } + for (i = 0; i < NUM_EXC; i++) { + loader_idt_e = &((struct gate_descriptor *)loader_idt. + rd_base)[i]; + if (intercepted[i]) + loader_idt_e->gd_ist = ist; + } + (&(tss->tss_ist1))[ist - 1] = exc_stack_pa + PAGE_SIZE; + + /* Switch to new IDT */ + rfl = intr_disable(); + if (loader_gdt_pa != 0) + bare_lgdt(&loader_gdt); + if (loader_tss != 0) + ltr(loader_tss); + lidt(&loader_idt); + intr_restore(rfl); + return (1); +} + +static void +efi_unredirect_exceptions(void) +{ + register_t rfl; + + if (lidt_pa == 0) + return; + + rfl = intr_disable(); + if (ist != 0) + (&(((struct amd64tss *)tss_pa)->tss_ist1))[ist - 1] = 0; + if (loader_gdt_pa != 0) + bare_lgdt(&fw_gdt); + if (loader_tss != 0) + ltr(tss_fw_seg); + lidt(&fw_idt); + intr_restore(rfl); + free_tables(); +} + +static int +command_grab_faults(int argc, char *argv[]) +{ + int res; + + res = efi_redirect_exceptions(); + if (!res) + printf("failed\n"); + return (CMD_OK); +} +COMMAND_SET(grap_faults, "grab_faults", "grab faults", command_grab_faults); + +static int +command_ungrab_faults(int argc, char *argv[]) +{ + + efi_unredirect_exceptions(); + return (CMD_OK); +} +COMMAND_SET(ungrab_faults, "ungrab_faults", "ungrab faults", + command_ungrab_faults); + +static int +command_fault(int argc, char *argv[]) +{ + + __asm("ud2"); + return (CMD_OK); +} +COMMAND_SET(fault, "fault", "generate fault", command_fault); From owner-svn-src-all@freebsd.org Wed Sep 21 10:35:45 2016 Return-Path: Delivered-To: svn-src-all@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 D747EBE2263; Wed, 21 Sep 2016 10:35:45 +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 87E62F8F; Wed, 21 Sep 2016 10:35:45 +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 u8LAZiol001246; Wed, 21 Sep 2016 10:35:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LAZi7R001242; Wed, 21 Sep 2016 10:35:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211035.u8LAZi7R001242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 10:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306091 - in head/sys: amd64/include arm/include arm64/include sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:35:45 -0000 Author: kib Date: Wed Sep 21 10:35:44 2016 New Revision: 306091 URL: https://svnweb.freebsd.org/changeset/base/306091 Log: Add a way for the architecture to specify the calling ABI for methods in the EFI Runtime Services Table. On amd64, the calling conventions are MS. Sponsored by: The FreeBSD Foundation MFC after: 1 week Added: head/sys/amd64/include/efi.h (contents, props changed) head/sys/arm/include/efi.h (contents, props changed) head/sys/arm64/include/efi.h (contents, props changed) Modified: head/sys/sys/efi.h Added: head/sys/amd64/include/efi.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/efi.h Wed Sep 21 10:35:44 2016 (r306091) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef __AMD64_INCLUDE_EFI_H_ +#define __AMD64_INCLUDE_EFI_H_ + +/* + * XXX: from gcc 6.2 manual: + * Note, the ms_abi attribute for Microsoft Windows 64-bit targets + * currently requires the -maccumulate-outgoing-args option. + */ +#define EFIABI_ATTR __attribute__((ms_abi)) + +#endif /* __AMD64_INCLUDE_EFI_H_ */ Added: head/sys/arm/include/efi.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/efi.h Wed Sep 21 10:35:44 2016 (r306091) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef __ARM_INCLUDE_EFI_H_ +#define __ARM_INCLUDE_EFI_H_ + +#define EFIABI_ATTR + +#endif /* __ARM_INCLUDE_EFI_H_ */ Added: head/sys/arm64/include/efi.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/efi.h Wed Sep 21 10:35:44 2016 (r306091) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef __ARM64_INCLUDE_EFI_H_ +#define __ARM64_INCLUDE_EFI_H_ + +#define EFIABI_ATTR + +#endif /* __ARM64_INCLUDE_EFI_H_ */ Modified: head/sys/sys/efi.h ============================================================================== --- head/sys/sys/efi.h Wed Sep 21 10:22:46 2016 (r306090) +++ head/sys/sys/efi.h Wed Sep 21 10:35:44 2016 (r306091) @@ -30,6 +30,7 @@ #define _SYS_EFI_H_ #include +#include #define EFI_PAGE_SHIFT 12 #define EFI_PAGE_SIZE (1 << EFI_PAGE_SHIFT) @@ -123,22 +124,25 @@ struct efi_tblhdr { struct efi_rt { struct efi_tblhdr rt_hdr; - efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *); - efi_status (*rt_settime)(struct efi_tm *); + efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *) + EFIABI_ATTR; + efi_status (*rt_settime)(struct efi_tm *) EFIABI_ATTR; efi_status (*rt_getwaketime)(uint8_t *, uint8_t *, - struct efi_tm *); - efi_status (*rt_setwaketime)(uint8_t, struct efi_tm *); + struct efi_tm *) EFIABI_ATTR; + efi_status (*rt_setwaketime)(uint8_t, struct efi_tm *) + EFIABI_ATTR; efi_status (*rt_setvirtual)(u_long, u_long, uint32_t, - struct efi_md *); - efi_status (*rt_cvtptr)(u_long, void **); + struct efi_md *) EFIABI_ATTR; + efi_status (*rt_cvtptr)(u_long, void **) EFIABI_ATTR; efi_status (*rt_getvar)(efi_char *, struct uuid *, uint32_t *, - u_long *, void *); - efi_status (*rt_scanvar)(u_long *, efi_char *, struct uuid *); + u_long *, void *) EFIABI_ATTR; + efi_status (*rt_scanvar)(u_long *, efi_char *, struct uuid *) + EFIABI_ATTR; efi_status (*rt_setvar)(efi_char *, struct uuid *, uint32_t, - u_long, void *); - efi_status (*rt_gethicnt)(uint32_t *); + u_long, void *) EFIABI_ATTR; + efi_status (*rt_gethicnt)(uint32_t *) EFIABI_ATTR; efi_status (*rt_reset)(enum efi_reset, efi_status, u_long, - efi_char *); + efi_char *) EFIABI_ATTR; }; struct efi_systbl { From owner-svn-src-all@freebsd.org Wed Sep 21 10:55:29 2016 Return-Path: Delivered-To: svn-src-all@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 E0F35BE2787; Wed, 21 Sep 2016 10:55:29 +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 AEAC3B2A; Wed, 21 Sep 2016 10:55:29 +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 u8LAtS2c009147; Wed, 21 Sep 2016 10:55:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LAtSOn009145; Wed, 21 Sep 2016 10:55:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211055.u8LAtSOn009145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 10:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306092 - in head/sys: amd64/amd64 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:55:30 -0000 Author: kib Date: Wed Sep 21 10:55:28 2016 New Revision: 306092 URL: https://svnweb.freebsd.org/changeset/base/306092 Log: Rename efi_systbl to efi_systbl_phys, the variable contains the physical address of the EFI System Table. Add _KERNEL guard around its declaration in sys/efi.h. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/sys/efi.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed Sep 21 10:35:44 2016 (r306091) +++ head/sys/amd64/amd64/machdep.c Wed Sep 21 10:55:28 2016 (r306092) @@ -188,7 +188,7 @@ struct msgbuf *msgbufp; * Physical address of the EFI System Table. Stashed from the metadata hints * passed into the kernel and used by the EFI code to call runtime services. */ -vm_paddr_t efi_systbl; +vm_paddr_t efi_systbl_phys; /* Intel ICH registers */ #define ICH_PMBASE 0x400 @@ -1501,7 +1501,7 @@ native_parse_preload_data(u_int64_t modu ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); db_fetch_ksymtab(ksym_start, ksym_end); #endif - efi_systbl = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); + efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); return (kmdp); } Modified: head/sys/sys/efi.h ============================================================================== --- head/sys/sys/efi.h Wed Sep 21 10:35:44 2016 (r306091) +++ head/sys/sys/efi.h Wed Sep 21 10:55:28 2016 (r306092) @@ -163,5 +163,8 @@ struct efi_systbl { uint64_t st_cfgtbl; }; -extern vm_paddr_t efi_systbl; +#ifdef _KERNEL +extern vm_paddr_t efi_systbl_phys; +#endif /* _KERNEL */ + #endif /* _SYS_EFI_H_ */ From owner-svn-src-all@freebsd.org Wed Sep 21 10:58:59 2016 Return-Path: Delivered-To: svn-src-all@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 E4EB7BE2926; Wed, 21 Sep 2016 10:58:59 +0000 (UTC) (envelope-from br@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 B5384E07; Wed, 21 Sep 2016 10:58:59 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LAwwI3009300; Wed, 21 Sep 2016 10:58:58 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LAwwSp009299; Wed, 21 Sep 2016 10:58:58 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609211058.u8LAwwSp009299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 21 Sep 2016 10:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306093 - head/usr.sbin/extattr/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:59:00 -0000 Author: br Date: Wed Sep 21 10:58:58 2016 New Revision: 306093 URL: https://svnweb.freebsd.org/changeset/base/306093 Log: Disable extattr test on UFS1. This test supports native extended attributes only (e.g. UFS2) Reviewed by: asomers, ngie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7981 Modified: head/usr.sbin/extattr/tests/extattr_test.sh Modified: head/usr.sbin/extattr/tests/extattr_test.sh ============================================================================== --- head/usr.sbin/extattr/tests/extattr_test.sh Wed Sep 21 10:55:28 2016 (r306092) +++ head/usr.sbin/extattr/tests/extattr_test.sh Wed Sep 21 10:58:58 2016 (r306093) @@ -355,7 +355,11 @@ atf_init_test_cases() { check_fs() { case `df -T . | tail -n 1 | cut -wf 2` in - "ufs") ;; # UFS is fine + "ufs") + case `dumpfs . | head -1 | awk -F'[()]' '{print $2}'` in + "UFS1") atf_skip "UFS1 is not supported by this test";; + "UFS2") ;; # UFS2 is fine + esac ;; "zfs") ;; # ZFS is fine "tmpfs") atf_skip "tmpfs does not support extended attributes";; esac From owner-svn-src-all@freebsd.org Wed Sep 21 11:17:59 2016 Return-Path: Delivered-To: svn-src-all@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 50BA0BE314E; Wed, 21 Sep 2016 11:17:59 +0000 (UTC) (envelope-from trasz@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 136971A65; Wed, 21 Sep 2016 11:17:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LBHwsF016738; Wed, 21 Sep 2016 11:17:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LBHwBT016737; Wed, 21 Sep 2016 11:17:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609211117.u8LBHwBT016737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 21 Sep 2016 11:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306094 - head/usr.sbin/diskinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 11:17:59 -0000 Author: trasz Date: Wed Sep 21 11:17:58 2016 New Revision: 306094 URL: https://svnweb.freebsd.org/changeset/base/306094 Log: Make it possible for diskinfo(8) to operate on files. This is useful with -t and upcoming -i. MFC after: 1 month Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 10:58:58 2016 (r306093) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 11:17:58 2016 (r306094) @@ -42,6 +42,7 @@ #include #include #include +#include #include static void @@ -61,6 +62,7 @@ static int zonecheck(int fd, uint32_t *z int main(int argc, char **argv) { + struct stat sb; int i, ch, fd, error, exitval = 0; char buf[BUFSIZ], ident[DISK_IDENT_SIZE], physpath[MAXPATHLEN]; char zone_desc[64]; @@ -92,7 +94,7 @@ main(int argc, char **argv) usage(); for (i = 0; i < argc; i++) { - fd = open(argv[i], O_RDONLY); + fd = open(argv[i], O_RDONLY | O_DIRECT); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { sprintf(buf, "%s%s", _PATH_DEV, argv[i]); fd = open(buf, O_RDONLY); @@ -102,33 +104,48 @@ main(int argc, char **argv) exitval = 1; goto out; } - error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); - if (error) { - warnx("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]); + error = fstat(fd, &sb); + if (error != 0) { + warn("cannot stat %s", argv[i]); exitval = 1; goto out; } - error = ioctl(fd, DIOCGSECTORSIZE, §orsize); - if (error) { - warnx("%s: ioctl(DIOCGSECTORSIZE) failed, probably not a disk.", argv[i]); - exitval = 1; - goto out; - } - error = ioctl(fd, DIOCGFWSECTORS, &fwsectors); - if (error) + if (S_ISREG(sb.st_mode)) { + mediasize = sb.st_size; + sectorsize = S_BLKSIZE; fwsectors = 0; - error = ioctl(fd, DIOCGFWHEADS, &fwheads); - if (error) fwheads = 0; - error = ioctl(fd, DIOCGSTRIPESIZE, &stripesize); - if (error) - stripesize = 0; - error = ioctl(fd, DIOCGSTRIPEOFFSET, &stripeoffset); - if (error) + stripesize = sb.st_blksize; stripeoffset = 0; - error = zonecheck(fd, &zone_mode, zone_desc, sizeof(zone_desc)); - if (error == 0) - zoned = 1; + } else { + error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); + if (error) { + warnx("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]); + exitval = 1; + goto out; + } + error = ioctl(fd, DIOCGSECTORSIZE, §orsize); + if (error) { + warnx("%s: ioctl(DIOCGSECTORSIZE) failed, probably not a disk.", argv[i]); + exitval = 1; + goto out; + } + error = ioctl(fd, DIOCGFWSECTORS, &fwsectors); + if (error) + fwsectors = 0; + error = ioctl(fd, DIOCGFWHEADS, &fwheads); + if (error) + fwheads = 0; + error = ioctl(fd, DIOCGSTRIPESIZE, &stripesize); + if (error) + stripesize = 0; + error = ioctl(fd, DIOCGSTRIPEOFFSET, &stripeoffset); + if (error) + stripeoffset = 0; + error = zonecheck(fd, &zone_mode, zone_desc, sizeof(zone_desc)); + if (error == 0) + zoned = 1; + } if (!opt_v) { printf("%s", argv[i]); printf("\t%u", sectorsize); From owner-svn-src-all@freebsd.org Wed Sep 21 11:22:20 2016 Return-Path: Delivered-To: svn-src-all@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 CDE29BE338F; Wed, 21 Sep 2016 11:22:20 +0000 (UTC) (envelope-from trasz@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 9AE141E63; Wed, 21 Sep 2016 11:22:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LBMJ6v020233; Wed, 21 Sep 2016 11:22:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LBMJd0020232; Wed, 21 Sep 2016 11:22:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609211122.u8LBMJd0020232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 21 Sep 2016 11:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306095 - head/usr.sbin/iostat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 11:22:20 -0000 Author: trasz Date: Wed Sep 21 11:22:19 2016 New Revision: 306095 URL: https://svnweb.freebsd.org/changeset/base/306095 Log: Make the "r/s" and "w/s" fields in "iostat -x" a little bit wider; five chars is way too narrow for todays disks. MFC after: 1 month Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Wed Sep 21 11:17:58 2016 (r306094) +++ head/usr.sbin/iostat/iostat.c Wed Sep 21 11:22:19 2016 (r306095) @@ -807,7 +807,7 @@ devstats(int perf_select, long double et printf(" cpu "); printf("\n"); if (Iflag == 0) { - printf("device r/s w/s kr/s kw/s " + printf("device r/s w/s kr/s kw/s " " ms/r ms/w ms/o ms/t qlen %%b "); } else { printf("device r/i w/i kr/i" @@ -884,7 +884,7 @@ devstats(int perf_select, long double et mb_per_second_write > ((long double).0005)/1024 || busy_pct > 0.5) { if (Iflag == 0) - printf("%-8.8s %5d %5d %8.1Lf " + printf("%-8.8s %7d %7d %8.1Lf " "%8.1Lf %5d %5d %5d %5d " "%4" PRIu64 " %3.0Lf ", devicename, From owner-svn-src-all@freebsd.org Wed Sep 21 11:27:57 2016 Return-Path: Delivered-To: svn-src-all@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 D7879BE34DD; Wed, 21 Sep 2016 11:27:57 +0000 (UTC) (envelope-from trasz@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 AA7041B3; Wed, 21 Sep 2016 11:27:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LBRu9Z020467; Wed, 21 Sep 2016 11:27:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LBRuLr020466; Wed, 21 Sep 2016 11:27:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609211127.u8LBRuLr020466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 21 Sep 2016 11:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306096 - head/usr.sbin/diskinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 11:27:57 -0000 Author: trasz Date: Wed Sep 21 11:27:56 2016 New Revision: 306096 URL: https://svnweb.freebsd.org/changeset/base/306096 Log: Cosmetics - add missing newline. MFC after: 1 month Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 11:22:19 2016 (r306095) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 11:27:56 2016 (r306096) @@ -347,7 +347,7 @@ speeddisk(int fd, off_t mediasize, u_int } TN(2048); - printf("Transfer rates:\n"); + printf("\nTransfer rates:\n"); printf("\toutside: "); rdsect(fd, 0, sectorsize); T0(); From owner-svn-src-all@freebsd.org Wed Sep 21 11:32:00 2016 Return-Path: Delivered-To: svn-src-all@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 06D79BE368B; Wed, 21 Sep 2016 11:32:00 +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 C13ED7FE; Wed, 21 Sep 2016 11:31:59 +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 u8LBVx6h022134; Wed, 21 Sep 2016 11:31:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LBVwLq022125; Wed, 21 Sep 2016 11:31:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211131.u8LBVwLq022125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 11:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306097 - in head/sys: amd64/amd64 amd64/conf amd64/include conf modules modules/efirt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 11:32:00 -0000 Author: kib Date: Wed Sep 21 11:31:58 2016 New Revision: 306097 URL: https://svnweb.freebsd.org/changeset/base/306097 Log: Add kernel interfaces to call EFI Runtime Services. Runtime services require special execution environment for the call. Besides that, OS must inform firmware about runtime virtual memory map which will be active during the calls, with the SetVirtualAddressMap() runtime call, done while the 1:1 mapping is still used. There are two complication: the SetVirtualAddressMap() effectively must be done from loader, which needs to know kernel address map in advance. More, despite not explicitely mentioned in the specification, both 1:1 and the map passed to SetVirtualAddressMap() must be active during the SetVirtualAddressMap() call. Second, there are buggy BIOSes which require both mappings active during runtime calls as well, most likely because they fail to identify all relocations to perform. On amd64, we can get rid of both problems by providing 1:1 mapping for the duration of runtime calls, by temprorary remapping user addresses. As result, we avoid the need for loader to know about future kernel address map, and avoid bugs in BIOSes. Typically BIOS only maps something in low 4G. If not runtime bugs, we would take advantage of the DMAP, as previous versions of this patch did. Similar but more complicated trick can be used even for i386 and 32bit runtime, if and when the EFI boot on i386 is supported. We would need a trampoline page, since potentially whole 4G of VA would be switched on calls, instead of only userspace portion on amd64. Context switches are disabled for the duration of the call, FPU access is granted, and interrupts are not disabled. The later is possible because kernel is mapped during calls. To test, the sysctl mib debug.efi_time is provided, setting it to 1 makes one call to EFI get_time() runtime service, on success the efitm structure is printed to the control terminal. Load efirt.ko, or add EFIRT option to the kernel config, to enable code. Discussed with: emaste, imp Tested by: emaste (mac, qemu) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Added: head/sys/amd64/amd64/efirt.c (contents, props changed) - copied, changed from r306093, stable/10/sys/ia64/ia64/efi.c head/sys/modules/efirt/ head/sys/modules/efirt/Makefile (contents, props changed) Modified: head/sys/amd64/conf/NOTES head/sys/amd64/include/efi.h head/sys/conf/files.amd64 head/sys/conf/options.amd64 head/sys/modules/Makefile Copied and modified: head/sys/amd64/amd64/efirt.c (from r306093, stable/10/sys/ia64/ia64/efi.c) ============================================================================== --- stable/10/sys/ia64/ia64/efi.c Wed Sep 21 10:58:58 2016 (r306093, copy source) +++ head/sys/amd64/amd64/efirt.c Wed Sep 21 11:31:58 2016 (r306097) @@ -1,8 +1,12 @@ /*- * Copyright (c) 2004 Marcel Moolenaar * Copyright (c) 2001 Doug Rabson + * Copyright (c) 2016 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,12 +34,28 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include #include -#include +#include +#include #include #include +#include +#include +#include static struct efi_systbl *efi_systbl; static struct efi_cfgtbl *efi_cfgtbl; @@ -73,171 +93,406 @@ static int efi_status_to_errno(efi_status status) { u_long code; - int error; code = status & 0x3ffffffffffffffful; - error = (code < 25) ? efi_status2err[code] : EDOOFUS; - return (error); + return (code < nitems(efi_status2err) ? efi_status2err[code] : EDOOFUS); } -void -efi_boot_finish(void) -{ -} +static struct mtx efi_lock; +static pml4_entry_t *efi_pml4; +static vm_object_t obj_1t1_pt; +static vm_page_t efi_pml4_page; + +static void +efi_destroy_1t1_map(void) +{ + vm_page_t m; + + if (obj_1t1_pt != NULL) { + VM_OBJECT_RLOCK(obj_1t1_pt); + TAILQ_FOREACH(m, &obj_1t1_pt->memq, listq) + m->wire_count = 0; + atomic_subtract_int(&vm_cnt.v_wire_count, + obj_1t1_pt->resident_page_count); + VM_OBJECT_RUNLOCK(obj_1t1_pt); + vm_object_deallocate(obj_1t1_pt); + } -/* - * Collect the entry points for PAL and SAL. Be extra careful about NULL - * pointer values. We're running pre-console, so it's better to return - * error values than to cause panics, machine checks and other traps and - * faults. Keep this minimal... - */ -int -efi_boot_minimal(uint64_t systbl) -{ - ia64_efi_f setvirt; - struct efi_md *md; - efi_status status; + obj_1t1_pt = NULL; + efi_pml4 = NULL; + efi_pml4_page = NULL; +} + +static vm_page_t +efi_1t1_page(vm_pindex_t idx) +{ + + return (vm_page_grab(obj_1t1_pt, idx, VM_ALLOC_NOBUSY | + VM_ALLOC_WIRED | VM_ALLOC_ZERO)); +} + +static pt_entry_t * +efi_1t1_pte(vm_offset_t va) +{ + pml4_entry_t *pml4e; + pdp_entry_t *pdpe; + pd_entry_t *pde; + pt_entry_t *pte; + vm_page_t m; + vm_pindex_t pml4_idx, pdp_idx, pd_idx; + vm_paddr_t mphys; + + pml4_idx = pmap_pml4e_index(va); + pml4e = &efi_pml4[pml4_idx]; + if (*pml4e == 0) { + m = efi_1t1_page(1 + pml4_idx); + mphys = VM_PAGE_TO_PHYS(m); + *pml4e = mphys | X86_PG_RW | X86_PG_V; + } else { + mphys = *pml4e & ~PAGE_MASK; + } - if (systbl == 0) - return (EINVAL); - efi_systbl = (struct efi_systbl *)IA64_PHYS_TO_RR7(systbl); - if (efi_systbl->st_hdr.th_sig != EFI_SYSTBL_SIG) { - efi_systbl = NULL; - return (EFAULT); + pdpe = (pdp_entry_t *)PHYS_TO_DMAP(mphys); + pdp_idx = pmap_pdpe_index(va); + pdpe += pdp_idx; + if (*pdpe == 0) { + m = efi_1t1_page(1 + NPML4EPG + (pml4_idx + 1) * (pdp_idx + 1)); + mphys = VM_PAGE_TO_PHYS(m); + *pdpe = mphys | X86_PG_RW | X86_PG_V; + } else { + mphys = *pdpe & ~PAGE_MASK; } - efi_cfgtbl = (efi_systbl->st_cfgtbl == 0) ? NULL : - (struct efi_cfgtbl *)IA64_PHYS_TO_RR7(efi_systbl->st_cfgtbl); - if (efi_cfgtbl == NULL) - return (ENOENT); - efi_runtime = (efi_systbl->st_rt == 0) ? NULL : - (struct efi_rt *)IA64_PHYS_TO_RR7(efi_systbl->st_rt); - if (efi_runtime == NULL) - return (ENOENT); - /* - * Relocate runtime memory segments for firmware. - */ - md = efi_md_first(); - while (md != NULL) { - if (md->md_attr & EFI_MD_ATTR_RT) { - md->md_virt = (md->md_attr & EFI_MD_ATTR_WB) ? - (void *)IA64_PHYS_TO_RR7(md->md_phys) : - (void *)IA64_PHYS_TO_RR6(md->md_phys); + pde = (pd_entry_t *)PHYS_TO_DMAP(mphys); + pd_idx = pmap_pde_index(va); + pde += pd_idx; + if (*pde == 0) { + m = efi_1t1_page(1 + NPML4EPG + NPML4EPG * NPDPEPG + + (pml4_idx + 1) * (pdp_idx + 1) * (pd_idx + 1)); + mphys = VM_PAGE_TO_PHYS(m); + *pde = mphys | X86_PG_RW | X86_PG_V; + } else { + mphys = *pde & ~PAGE_MASK; + } + + pte = (pt_entry_t *)PHYS_TO_DMAP(mphys); + pte += pmap_pte_index(va); + KASSERT(*pte == 0, ("va %#jx *pt %#jx", va, *pte)); + + return (pte); +} + +static bool +efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) +{ + struct efi_md *p; + pt_entry_t *pte; + vm_offset_t va; + uint64_t idx; + int bits, i, mode; + + obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, 1 + NPML4EPG + + NPML4EPG * NPDPEPG + NPML4EPG * NPDPEPG * NPDEPG, + VM_PROT_ALL, 0, NULL); + VM_OBJECT_WLOCK(obj_1t1_pt); + efi_pml4_page = efi_1t1_page(0); + VM_OBJECT_WUNLOCK(obj_1t1_pt); + efi_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(efi_pml4_page)); + pmap_pinit_pml4(efi_pml4_page); + + for (i = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, + descsz)) { + if ((p->md_attr & EFI_MD_ATTR_RT) == 0) + continue; + if (p->md_virt != NULL) { + if (bootverbose) + printf("EFI Runtime entry %d is mapped\n", i); + goto fail; + } + if ((p->md_phys & EFI_PAGE_MASK) != 0) { + if (bootverbose) + printf("EFI Runtime entry %d is not aligned\n", + i); + goto fail; + } + if (p->md_phys + p->md_pages * EFI_PAGE_SIZE < p->md_phys || + p->md_phys + p->md_pages * EFI_PAGE_SIZE >= + VM_MAXUSER_ADDRESS) { + printf("EFI Runtime entry %d is not in mappable for RT:" + "base %#016jx %#jx pages\n", + i, (uintmax_t)p->md_phys, + (uintmax_t)p->md_pages); + goto fail; } - md = efi_md_next(md); + if ((p->md_attr & EFI_MD_ATTR_WB) != 0) + mode = VM_MEMATTR_WRITE_BACK; + else if ((p->md_attr & EFI_MD_ATTR_WT) != 0) + mode = VM_MEMATTR_WRITE_THROUGH; + else if ((p->md_attr & EFI_MD_ATTR_WC) != 0) + mode = VM_MEMATTR_WRITE_COMBINING; + else if ((p->md_attr & EFI_MD_ATTR_WP) != 0) + mode = VM_MEMATTR_WRITE_PROTECTED; + else if ((p->md_attr & EFI_MD_ATTR_UC) != 0) + mode = VM_MEMATTR_UNCACHEABLE; + else { + if (bootverbose) + printf("EFI Runtime entry %d mapping " + "attributes unsupported\n", i); + mode = VM_MEMATTR_UNCACHEABLE; + } + bits = pmap_cache_bits(kernel_pmap, mode, FALSE) | X86_PG_RW | + X86_PG_V; + VM_OBJECT_WLOCK(obj_1t1_pt); + for (va = p->md_phys, idx = 0; idx < p->md_pages; idx++, + va += PAGE_SIZE) { + pte = efi_1t1_pte(va); + pte_store(pte, va | bits); + } + VM_OBJECT_WUNLOCK(obj_1t1_pt); } - setvirt = (void *)IA64_PHYS_TO_RR7((u_long)efi_runtime->rt_setvirtual); - status = ia64_efi_physical(setvirt, bootinfo->bi_memmap_size, - bootinfo->bi_memdesc_size, bootinfo->bi_memdesc_version, - ia64_tpa(bootinfo->bi_memmap)); - return ((status < 0) ? EFAULT : 0); + + return (true); + +fail: + efi_destroy_1t1_map(); + return (false); } -void * -efi_get_table(struct uuid *uuid) +/* + * Create an environment for the EFI runtime code call. The most + * important part is creating the required 1:1 physical->virtual + * mappings for the runtime segments. To do that, we manually create + * page table which unmap userspace but gives correct kernel mapping. + * The 1:1 mappings for runtime segments usually occupy low 4G of the + * physical address map. + * + * The 1:1 mappings were chosen over the SetVirtualAddressMap() EFI RT + * service, because there are some BIOSes which fail to correctly + * relocate itself on the call, requiring both 1:1 and virtual + * mapping. As result, we must provide 1:1 mapping anyway, so no + * reason to bother with the virtual map, and no need to add a + * complexity into loader. + * + * The fpu_kern_enter() call allows firmware to use FPU, as mandated + * by the specification. In particular, CR0.TS bit is cleared. Also + * it enters critical section, giving us neccessary protection against + * context switch. + * + * There is no need to disable interrupts around the change of %cr3, + * the kernel mappings are correct, while we only grabbed the + * userspace portion of VA. Interrupts handlers must not access + * userspace. Having interrupts enabled fixes the issue with + * firmware/SMM long operation, which would negatively affect IPIs, + * esp. TLB shootdown requests. + */ +static int +efi_enter(void) { - struct efi_cfgtbl *ct; - u_long count; + pmap_t curpmap; + int error; - if (efi_cfgtbl == NULL) - return (NULL); - count = efi_systbl->st_entries; - ct = efi_cfgtbl; - while (count--) { - if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) - return ((void *)IA64_PHYS_TO_RR7(ct->ct_data)); - ct++; + if (efi_runtime == NULL) + return (ENXIO); + curpmap = PCPU_GET(curpmap); + PMAP_LOCK(curpmap); + mtx_lock(&efi_lock); + error = fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); + if (error != 0) { + PMAP_UNLOCK(curpmap); + return (error); } - return (NULL); + load_cr3(VM_PAGE_TO_PHYS(efi_pml4_page) | (pmap_pcid_enabled ? + curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); + /* + * If PCID is enabled, the clear CR3_PCID_SAVE bit in the loaded %cr3 + * causes TLB invalidation. + */ + if (!pmap_pcid_enabled) + invltlb(); + return (0); } -void -efi_get_time(struct efi_tm *tm) +static void +efi_leave(void) { + pmap_t curpmap; + + curpmap = PCPU_GET(curpmap); + load_cr3(curpmap->pm_cr3 | (pmap_pcid_enabled ? + curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); + if (!pmap_pcid_enabled) + invltlb(); - efi_runtime->rt_gettime(tm, NULL); + fpu_kern_leave(curthread, NULL); + mtx_unlock(&efi_lock); + PMAP_UNLOCK(curpmap); } -struct efi_md * -efi_md_first(void) +static int +efi_init(void) { - struct efi_md *md; + struct efi_map_header *efihdr; + struct efi_md *map; + caddr_t kmdp; + size_t efisz; + + mtx_init(&efi_lock, "efi", NULL, MTX_DEF); + + if (efi_systbl_phys == 0) { + if (bootverbose) + printf("EFI systbl not available\n"); + return (ENXIO); + } + efi_systbl = (struct efi_systbl *)PHYS_TO_DMAP(efi_systbl_phys); + if (efi_systbl->st_hdr.th_sig != EFI_SYSTBL_SIG) { + efi_systbl = NULL; + if (bootverbose) + printf("EFI systbl signature invalid\n"); + return (ENXIO); + } + efi_cfgtbl = (efi_systbl->st_cfgtbl == 0) ? NULL : + (struct efi_cfgtbl *)efi_systbl->st_cfgtbl; + if (efi_cfgtbl == NULL) { + if (bootverbose) + printf("EFI config table is not present\n"); + } - if (bootinfo->bi_memmap == 0) - return (NULL); - md = (struct efi_md *)bootinfo->bi_memmap; - return (md); + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + efihdr = (struct efi_map_header *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_MAP); + if (efihdr == NULL) { + if (bootverbose) + printf("EFI map is not present\n"); + return (ENXIO); + } + efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; + map = (struct efi_md *)((uint8_t *)efihdr + efisz); + if (efihdr->descriptor_size == 0) + return (ENOMEM); + + if (!efi_create_1t1_map(map, efihdr->memory_size / + efihdr->descriptor_size, efihdr->descriptor_size)) { + if (bootverbose) + printf("EFI cannot create runtime map\n"); + return (ENOMEM); + } + + efi_runtime = (efi_systbl->st_rt == 0) ? NULL : + (struct efi_rt *)efi_systbl->st_rt; + if (efi_runtime == NULL) { + if (bootverbose) + printf("EFI runtime services table is not present\n"); + efi_destroy_1t1_map(); + return (ENXIO); + } + + return (0); } -struct efi_md * -efi_md_last(void) +static void +efi_uninit(void) { - struct efi_md *md; - if (bootinfo->bi_memmap == 0) - return (NULL); - md = (struct efi_md *)(bootinfo->bi_memmap + bootinfo->bi_memmap_size - - bootinfo->bi_memdesc_size); - return (md); + efi_destroy_1t1_map(); + + efi_systbl = NULL; + efi_cfgtbl = NULL; + efi_runtime = NULL; + + mtx_destroy(&efi_lock); } -struct efi_md * -efi_md_next(struct efi_md *md) +int +efi_get_table(struct uuid *uuid, void *ptr) { - struct efi_md *lim; + struct efi_cfgtbl *ct; + u_long count; - lim = efi_md_last(); - md = (struct efi_md *)((uintptr_t)md + bootinfo->bi_memdesc_size); - return ((md > lim) ? NULL : md); + if (efi_cfgtbl == NULL) + return (ENXIO); + count = efi_systbl->st_entries; + ct = efi_cfgtbl; + while (count--) { + if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { + ptr = (void *)PHYS_TO_DMAP(ct->ct_data); + return (0); + } + ct++; + } + return (ENOENT); } -struct efi_md * -efi_md_prev(struct efi_md *md) +int +efi_get_time_locked(struct efi_tm *tm) { - struct efi_md *lim; + efi_status status; + int error; - lim = efi_md_first(); - md = (struct efi_md *)((uintptr_t)md - bootinfo->bi_memdesc_size); - return ((md < lim) ? NULL : md); + mtx_assert(&resettodr_lock, MA_OWNED); + error = efi_enter(); + if (error != 0) + return (error); + status = efi_runtime->rt_gettime(tm, NULL); + efi_leave(); + error = efi_status_to_errno(status); + return (error); } -struct efi_md * -efi_md_find(vm_paddr_t pa) +int +efi_get_time(struct efi_tm *tm) { - static struct efi_md *last = NULL; - struct efi_md *md, *p0, *p1; + int error; - md = (last != NULL) ? last : efi_md_first(); - p1 = p0 = NULL; - while (md != NULL && md != p1) { - if (pa >= md->md_phys && - pa < md->md_phys + md->md_pages * EFI_PAGE_SIZE) { - last = md; - return (md); - } + if (efi_runtime == NULL) + return (ENXIO); + mtx_lock(&resettodr_lock); + error = efi_get_time_locked(tm); + mtx_unlock(&resettodr_lock); + return (error); +} - p1 = p0; - p0 = md; - md = (pa < md->md_phys) ? efi_md_prev(md) : efi_md_next(md); - } +int +efi_reset_system(void) +{ + int error; - return (NULL); + error = efi_enter(); + if (error != 0) + return (error); + efi_runtime->rt_reset(EFI_RESET_WARM, 0, 0, NULL); + efi_leave(); + return (EIO); } -void -efi_reset_system(void) +int +efi_set_time_locked(struct efi_tm *tm) { + efi_status status; + int error; - if (efi_runtime != NULL) - efi_runtime->rt_reset(EFI_RESET_WARM, 0, 0, NULL); - panic("%s: unable to reset the machine", __func__); + mtx_assert(&resettodr_lock, MA_OWNED); + error = efi_enter(); + if (error != 0) + return (error); + status = efi_runtime->rt_settime(tm); + efi_leave(); + error = efi_status_to_errno(status); + return (error); } int efi_set_time(struct efi_tm *tm) { + int error; - return (efi_status_to_errno(efi_runtime->rt_settime(tm))); + if (efi_runtime == NULL) + return (ENXIO); + mtx_lock(&resettodr_lock); + error = efi_set_time_locked(tm); + mtx_unlock(&resettodr_lock); + return (error); } int @@ -245,26 +500,96 @@ efi_var_get(efi_char *name, struct uuid size_t *datasize, void *data) { efi_status status; + int error; + error = efi_enter(); + if (error != 0) + return (error); status = efi_runtime->rt_getvar(name, vendor, attrib, datasize, data); - return (efi_status_to_errno(status)); + efi_leave(); + error = efi_status_to_errno(status); + return (error); } int efi_var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) { efi_status status; + int error; + error = efi_enter(); + if (error != 0) + return (error); status = efi_runtime->rt_scanvar(namesize, name, vendor); - return (efi_status_to_errno(status)); + efi_leave(); + error = efi_status_to_errno(status); + return (error); } - + int efi_var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, size_t datasize, void *data) { efi_status status; - + int error; + + error = efi_enter(); + if (error != 0) + return (error); status = efi_runtime->rt_setvar(name, vendor, attrib, datasize, data); - return (efi_status_to_errno(status)); + efi_leave(); + error = efi_status_to_errno(status); + return (error); +} + +static int +efirt_modevents(module_t m, int event, void *arg __unused) +{ + + switch (event) { + case MOD_LOAD: + return (efi_init()); + break; + + case MOD_UNLOAD: + efi_uninit(); + return (0); + + case MOD_SHUTDOWN: + return (0); + + default: + return (EOPNOTSUPP); + } } + +static moduledata_t efirt_moddata = { + .name = "efirt", + .evhand = efirt_modevents, + .priv = NULL, +}; +DECLARE_MODULE(efirt, efirt_moddata, SI_SUB_VM_CONF, SI_ORDER_ANY); +MODULE_VERSION(efirt, 1); + +/* XXX debug stuff */ +static int +efi_time_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + struct efi_tm tm; + int error, val; + + val = 0; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + error = efi_get_time(&tm); + if (error == 0) { + uprintf("EFI reports: Year %d Month %d Day %d Hour %d Min %d " + "Sec %d\n", tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, + tm.tm_min, tm.tm_sec); + } + return (error); +} + +SYSCTL_PROC(_debug, OID_AUTO, efi_time, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, + efi_time_sysctl_handler, "I", ""); Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Sep 21 11:27:56 2016 (r306096) +++ head/sys/amd64/conf/NOTES Wed Sep 21 11:31:58 2016 (r306097) @@ -592,6 +592,9 @@ options ENABLE_ALART # Control alarm o # options NKPT=31 +# EFI Runtime Services support (not functional yet). +options EFIRT + ##################################################################### # ABI Emulation Modified: head/sys/amd64/include/efi.h ============================================================================== --- head/sys/amd64/include/efi.h Wed Sep 21 11:27:56 2016 (r306096) +++ head/sys/amd64/include/efi.h Wed Sep 21 11:31:58 2016 (r306097) @@ -39,4 +39,21 @@ */ #define EFIABI_ATTR __attribute__((ms_abi)) +#ifdef _KERNEL +struct uuid; +struct efi_tm; + +int efi_get_table(struct uuid *uuid, void *ptr); +int efi_get_time(struct efi_tm *tm); +int efi_get_time_locked(struct efi_tm *tm); +int efi_reset_system(void); +int efi_set_time(struct efi_tm *tm); +int efi_set_time_locked(struct efi_tm *tm); +int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data); +int efi_var_nextname(size_t *namesize, uint16_t *name, struct uuid *vendor); +int efi_var_set(uint16_t *name, struct uuid *vendor, uint32_t attrib, + size_t datasize, void *data); +#endif + #endif /* __AMD64_INCLUDE_EFI_H_ */ Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 21 11:27:56 2016 (r306096) +++ head/sys/conf/files.amd64 Wed Sep 21 11:31:58 2016 (r306097) @@ -134,6 +134,7 @@ amd64/amd64/cpu_switch.S standard amd64/amd64/db_disasm.c optional ddb amd64/amd64/db_interface.c optional ddb amd64/amd64/db_trace.c optional ddb +amd64/amd64/efirt.c optional efirt amd64/amd64/elf_machdep.c standard amd64/amd64/exception.S standard amd64/amd64/fpu.c standard Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Wed Sep 21 11:27:56 2016 (r306096) +++ head/sys/conf/options.amd64 Wed Sep 21 11:31:58 2016 (r306097) @@ -64,3 +64,6 @@ XENHVM opt_global.h # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h + +# EFI Runtime services support +EFIRT opt_efirt.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Sep 21 11:27:56 2016 (r306096) +++ head/sys/modules/Makefile Wed Sep 21 11:31:58 2016 (r306097) @@ -103,6 +103,7 @@ SUBDIR= \ ${_drm2} \ dummynet \ ${_ed} \ + ${_efirt} \ ${_elink} \ ${_em} \ en \ @@ -669,6 +670,7 @@ _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" +_efirt= efirt _ioat= ioat _ixl= ixl _ixlv= ixlv Added: head/sys/modules/efirt/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/efirt/Makefile Wed Sep 21 11:31:58 2016 (r306097) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../${MACHINE}/${MACHINE} + +KMOD= efirt +SRCS= efirt.c + +.include From owner-svn-src-all@freebsd.org Wed Sep 21 11:59:54 2016 Return-Path: Delivered-To: svn-src-all@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 46617BE3E40; Wed, 21 Sep 2016 11:59:54 +0000 (UTC) (envelope-from br@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 F010D278; Wed, 21 Sep 2016 11:59:53 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LBxrGc031918; Wed, 21 Sep 2016 11:59:53 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LBxrTT031917; Wed, 21 Sep 2016 11:59:53 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609211159.u8LBxrTT031917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 21 Sep 2016 11:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306098 - head/lib/libutil/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 11:59:54 -0000 Author: br Date: Wed Sep 21 11:59:52 2016 New Revision: 306098 URL: https://svnweb.freebsd.org/changeset/base/306098 Log: Use kqueue(2) instead of select(2). This helps to ensure we will not lose SIGINT sent by parent to child. Reviewed by: sbruno, ngie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7892 Modified: head/lib/libutil/tests/pidfile_test.c Modified: head/lib/libutil/tests/pidfile_test.c ============================================================================== --- head/lib/libutil/tests/pidfile_test.c Wed Sep 21 11:31:58 2016 (r306097) +++ head/lib/libutil/tests/pidfile_test.c Wed Sep 21 11:59:52 2016 (r306098) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -43,8 +44,8 @@ __FBSDID("$FreeBSD$"); #include /* - * We need a signal handler so kill(2) will interrupt our child's - * select(2) instead of killing it. + * We need a signal handler so kill(2) will interrupt the child + * instead of killing it. */ static void signal_handler(int sig) @@ -129,7 +130,9 @@ common_test_pidfile_child(const char *fn struct pidfh *pf = NULL; pid_t other = 0, pid = 0; int fd[2], serrno, status; + struct kevent event, ke; char ch; + int kq; unlink(fn); if (pipe(fd) != 0) @@ -166,10 +169,20 @@ common_test_pidfile_child(const char *fn if (pf == NULL) _exit(1); if (pidfile_write(pf) != 0) - _exit(1); + _exit(2); + kq = kqueue(); + if (kq == -1) + _exit(3); + EV_SET(&ke, SIGINT, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); + /* Attach event to the kqueue. */ + if (kevent(kq, &ke, 1, NULL, 0, NULL) != 0) + _exit(4); + /* Inform the parent we are ready to receive SIGINT */ if (write(fd[1], "*", 1) != 1) - _exit(1); - select(0, 0, 0, 0, 0); + _exit(5); + /* Wait for SIGINT received */ + if (kevent(kq, NULL, 0, &event, 1, NULL) != 1) + _exit(6); _exit(0); } // parent From owner-svn-src-all@freebsd.org Wed Sep 21 13:02:44 2016 Return-Path: Delivered-To: svn-src-all@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 3BDA5BE1B62; Wed, 21 Sep 2016 13:02:44 +0000 (UTC) (envelope-from ed@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 002BFB23; Wed, 21 Sep 2016 13:02:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LD2h7w058197; Wed, 21 Sep 2016 13:02:43 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LD2hBS058196; Wed, 21 Sep 2016 13:02:43 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609211302.u8LD2hBS058196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 21 Sep 2016 13:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306099 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 13:02:44 -0000 Author: ed Date: Wed Sep 21 13:02:43 2016 New Revision: 306099 URL: https://svnweb.freebsd.org/changeset/base/306099 Log: Fix misuse of the basename() and dirname() functions. These functions are allowed to overwrite their input. Pull a copy of the input parameter and call dirname() and basename() on that instead. Do ensure that we reload the pathname value between calls. Modified: head/usr.sbin/bhyve/pci_virtio_console.c Modified: head/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_console.c Wed Sep 21 11:59:52 2016 (r306098) +++ head/usr.sbin/bhyve/pci_virtio_console.c Wed Sep 21 13:02:43 2016 (r306099) @@ -264,6 +264,7 @@ pci_vtcon_sock_add(struct pci_vtcon_soft { struct pci_vtcon_sock *sock; struct sockaddr_un sun; + char *pathcopy; int s = -1, fd = -1, error = 0; sock = calloc(1, sizeof(struct pci_vtcon_sock)); @@ -278,15 +279,24 @@ pci_vtcon_sock_add(struct pci_vtcon_soft goto out; } - fd = open(dirname(path), O_RDONLY | O_DIRECTORY); + pathcopy = strdup(path); + if (pathcopy == NULL) { + error = -1; + goto out; + } + + fd = open(dirname(pathcopy), O_RDONLY | O_DIRECTORY); if (fd < 0) { + free(pathcopy); error = -1; goto out; } sun.sun_family = AF_UNIX; sun.sun_len = sizeof(struct sockaddr_un); - strncpy(sun.sun_path, basename((char *)path), sizeof(sun.sun_path)); + strcpy(pathcopy, path); + strncpy(sun.sun_path, basename(pathcopy), sizeof(sun.sun_path)); + free(pathcopy); if (bindat(fd, s, (struct sockaddr *)&sun, sun.sun_len) < 0) { error = -1; From owner-svn-src-all@freebsd.org Wed Sep 21 13:03:56 2016 Return-Path: Delivered-To: svn-src-all@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 A888ABE1BCB; Wed, 21 Sep 2016 13:03:56 +0000 (UTC) (envelope-from ed@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 7927ECA1; Wed, 21 Sep 2016 13:03:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LD3tLB058277; Wed, 21 Sep 2016 13:03:55 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LD3tQV058276; Wed, 21 Sep 2016 13:03:55 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609211303.u8LD3tQV058276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 21 Sep 2016 13:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306100 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 13:03:56 -0000 Author: ed Date: Wed Sep 21 13:03:55 2016 New Revision: 306100 URL: https://svnweb.freebsd.org/changeset/base/306100 Log: Refine the dirname(3) compatibility workaround a bit more. Right now our workaround is so good that it doesn't throw any warnings on misuse. This means that people will keep on using the old version of dirname(3) silently without fixing their code. Go ahead and change the prototype of __old_dirname() to also use a plain char *, so that we still get a compiler warning. This won't have any negative effect on building older versions of FreeBSD on HEAD, as those are built with -Werror disabled. Differential Revision: https://reviews.freebsd.org/D7844 Modified: head/include/libgen.h Modified: head/include/libgen.h ============================================================================== --- head/include/libgen.h Wed Sep 21 13:02:43 2016 (r306099) +++ head/include/libgen.h Wed Sep 21 13:03:55 2016 (r306100) @@ -48,11 +48,11 @@ __END_DECLS * * Apply a workaround where we explicitly link against dirname@FBSD_1.0 * in case this function is called on constant strings, instead of - * making the build fail. + * making the program crash at runtime. */ #if defined(__generic) && !defined(__cplusplus) __BEGIN_DECLS -char *__old_dirname(const char *); +char *__old_dirname(char *); __END_DECLS __sym_compat(dirname, __old_dirname, FBSD_1.0); #define dirname(x) __generic(x, const char *, __old_dirname, dirname)(x) From owner-svn-src-all@freebsd.org Wed Sep 21 14:11:19 2016 Return-Path: Delivered-To: svn-src-all@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 C682CBE32AF; Wed, 21 Sep 2016 14:11:19 +0000 (UTC) (envelope-from gjb@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 9667B10C0; Wed, 21 Sep 2016 14:11:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LEBIQQ082233; Wed, 21 Sep 2016 14:11:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LEBIml082232; Wed, 21 Sep 2016 14:11:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211411.u8LEBIml082232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 14:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306101 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 14:11:19 -0000 Author: gjb Date: Wed Sep 21 14:11:18 2016 New Revision: 306101 URL: https://svnweb.freebsd.org/changeset/base/306101 Log: Document r298243, BIOS+UEFI addition to bsdinstall(8). Submitted by: martymac Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 13:03:55 2016 (r306100) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:11:18 2016 (r306101) @@ -707,6 +707,14 @@ scheme when installing on the UFS filesystem has been added to &man.bsdinstall.8;. + The &man.bsdinstall.8; utility now + supports + a "BIOS+UEFI option + during installation, supporting systems with + UEFI or + BIOS/CSM + capability. + The &man.bsdinstall.8; utility has been updated to include various system hardening options during installation. From owner-svn-src-all@freebsd.org Wed Sep 21 14:15:17 2016 Return-Path: Delivered-To: svn-src-all@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 4D833BE3648; Wed, 21 Sep 2016 14:15:17 +0000 (UTC) (envelope-from kevlo@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 064EC1866; Wed, 21 Sep 2016 14:15:16 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LEFG84085185; Wed, 21 Sep 2016 14:15:16 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LEFG2P085182; Wed, 21 Sep 2016 14:15:16 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609211415.u8LEFG2P085182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 21 Sep 2016 14:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306102 - in head: share/man/man4 sys/dev/re sys/dev/rl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 14:15:17 -0000 Author: kevlo Date: Wed Sep 21 14:15:15 2016 New Revision: 306102 URL: https://svnweb.freebsd.org/changeset/base/306102 Log: Add support for the TP-Link TG-3468 v2. This is an RTL8168 chip, which we already support so all we have to do is add the vendor ID. PR: 212876 Submitted by: Tobias Kortkamp MFC after: 3 days Modified: head/share/man/man4/re.4 head/sys/dev/re/if_re.c head/sys/dev/rl/if_rlreg.h Modified: head/share/man/man4/re.4 ============================================================================== --- head/share/man/man4/re.4 Wed Sep 21 14:11:18 2016 (r306101) +++ head/share/man/man4/re.4 Wed Sep 21 14:15:15 2016 (r306102) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2011 +.Dd September 21, 2016 .Dt RE 4 .Os .Sh NAME @@ -165,6 +165,8 @@ LinkSys EG1032 (32-bit PCI) .It PLANEX COMMUNICATIONS Inc.\& GN-1200TC (8169S) .It +TP-Link TG-3468 v2 Gigabit Ethernet (8168) +.It USRobotics USR997902 Gigabit Ethernet (8169S) .It Xterasys XN-152 10/100/1000 NIC (8169) Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Wed Sep 21 14:11:18 2016 (r306101) +++ head/sys/dev/re/if_re.c Wed Sep 21 14:15:15 2016 (r306102) @@ -183,6 +183,8 @@ static const struct rl_type re_devs[] = "RealTek 810xE PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, "RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet" }, + { NCUBE_VENDORID, RT_DEVICEID_8168, 0, + "TP-Link TG-3468 v2 (RTL8168) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, Modified: head/sys/dev/rl/if_rlreg.h ============================================================================== --- head/sys/dev/rl/if_rlreg.h Wed Sep 21 14:11:18 2016 (r306101) +++ head/sys/dev/rl/if_rlreg.h Wed Sep 21 14:15:15 2016 (r306102) @@ -1158,3 +1158,8 @@ struct rl_softc { /* US Robotics 997902 device ID */ #define USR_DEVICEID_997902 0x0116 + +/* + * NCube vendor ID + */ +#define NCUBE_VENDORID 0x10FF From owner-svn-src-all@freebsd.org Wed Sep 21 14:19:03 2016 Return-Path: Delivered-To: svn-src-all@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 125E2BE39AA; Wed, 21 Sep 2016 14:19:03 +0000 (UTC) (envelope-from gjb@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 D40DA1E75; Wed, 21 Sep 2016 14:19:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LEJ2Jt085350; Wed, 21 Sep 2016 14:19:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LEJ226085349; Wed, 21 Sep 2016 14:19:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211419.u8LEJ226085349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 14:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306103 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 14:19:03 -0000 Author: gjb Date: Wed Sep 21 14:19:01 2016 New Revision: 306103 URL: https://svnweb.freebsd.org/changeset/base/306103 Log: Document r291292, if_enc(4) addition. Submitted by: ae Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:15:15 2016 (r306102) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:19:01 2016 (r306103) @@ -1433,6 +1433,12 @@ arch="arm64">Initial SMP support has been added to the &os;/&arch.arm64; port. + The + &man.enc.4; driver has been added, providing an interface + through which IPSEC can be used via + &man.kldload.8; without requiring additional kernel and/or + userland changes. + Native PCI-express HotPlug support is enabled by default on &arch.amd64;, &arch.arm64;, and &arch.powerpc;. This feature has exposed compatibility issues From owner-svn-src-all@freebsd.org Wed Sep 21 14:42:24 2016 Return-Path: Delivered-To: svn-src-all@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 8E68FBE410E; Wed, 21 Sep 2016 14:42:24 +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 5EF96D2A; Wed, 21 Sep 2016 14:42:24 +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 u8LEgNdI096113; Wed, 21 Sep 2016 14:42:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LEgNJG096112; Wed, 21 Sep 2016 14:42:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609211442.u8LEgNJG096112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Sep 2016 14:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306104 - head/sys/modules/efirt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 14:42:24 -0000 Author: kib Date: Wed Sep 21 14:42:23 2016 New Revision: 306104 URL: https://svnweb.freebsd.org/changeset/base/306104 Log: Hopefully, fix build of the module outside the kernel tree. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/modules/efirt/Makefile Modified: head/sys/modules/efirt/Makefile ============================================================================== --- head/sys/modules/efirt/Makefile Wed Sep 21 14:19:01 2016 (r306103) +++ head/sys/modules/efirt/Makefile Wed Sep 21 14:42:23 2016 (r306104) @@ -4,5 +4,6 @@ KMOD= efirt SRCS= efirt.c +SRCS+= device_if.h bus_if.h .include From owner-svn-src-all@freebsd.org Wed Sep 21 14:56:08 2016 Return-Path: Delivered-To: svn-src-all@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 3EA59BE43E8; Wed, 21 Sep 2016 14:56:08 +0000 (UTC) (envelope-from gjb@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 114BC66C; Wed, 21 Sep 2016 14:56:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LEu7M1099905; Wed, 21 Sep 2016 14:56:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LEu72s099904; Wed, 21 Sep 2016 14:56:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211456.u8LEu72s099904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 14:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306105 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 14:56:08 -0000 Author: gjb Date: Wed Sep 21 14:56:07 2016 New Revision: 306105 URL: https://svnweb.freebsd.org/changeset/base/306105 Log: Document r296177, dtsec(4) driver addition. Document r298237, SMP booting for Book-E platforms was fixed. Document r297001, Book-E can address up to 36-bits of physical RAM. Document r297977, Book-E now supports e500mc and e5500. Submitted by: jhibbits Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:42:23 2016 (r306104) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:56:07 2016 (r306105) @@ -1439,6 +1439,22 @@ &man.kldload.8; without requiring additional kernel and/or userland changes. + The dtsec(4) driver + for Freescale QorIQ SoCs has been added, supporting P2041, + P3041, P5010, and P5020 systems. + + Freescale PowerQUICC and QorIQ systems + now support larger address spaces, equivalent to PAE mode on + &arch.i386;. + + The e500mc and e5500 PowerPC cores are + now supported, supporting most QorIQ systems. + + SMP for Multicore + Freescale QorIQ systems now works correctly for SoCs with the + AP cores in boot holdoff mode (not in + spinloop wait mode). + Native PCI-express HotPlug support is enabled by default on &arch.amd64;, &arch.arm64;, and &arch.powerpc;. This feature has exposed compatibility issues From owner-svn-src-all@freebsd.org Wed Sep 21 14:59:44 2016 Return-Path: Delivered-To: svn-src-all@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 EE038BE449A; Wed, 21 Sep 2016 14:59:44 +0000 (UTC) (envelope-from gjb@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 BE62193C; Wed, 21 Sep 2016 14:59:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LExhT0000301; Wed, 21 Sep 2016 14:59:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LExh7d000300; Wed, 21 Sep 2016 14:59:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211459.u8LExh7d000300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 14:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306106 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 14:59:45 -0000 Author: gjb Date: Wed Sep 21 14:59:43 2016 New Revision: 306106 URL: https://svnweb.freebsd.org/changeset/base/306106 Log: Document r301033 was sponsored by the FreeBSD Foundation. Submitted by: trasz Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:56:07 2016 (r306105) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:59:43 2016 (r306106) @@ -1771,9 +1771,10 @@ The Mellanox implementation of iSER (iSCSI Extensions for RDMA) has been imported. - The ability to discover iSCSI targets - without having to attach to a target has been added to the - &man.iscsictl.8; command. + The + ability to discover iSCSI targets without having to attach to + a target has been added to the &man.iscsictl.8; + command. From owner-svn-src-all@freebsd.org Wed Sep 21 15:09:52 2016 Return-Path: Delivered-To: svn-src-all@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 BF196BE4674 for ; Wed, 21 Sep 2016 15:09:52 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43DE4E93; Wed, 21 Sep 2016 15:09:51 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id u8LF9mUk094355; Wed, 21 Sep 2016 17:09:48 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (titan.inop.mo1.omnilan.net [IPv6:2001:a60:f0bb:1::3:1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 189F1BEB; Wed, 21 Sep 2016 17:09:48 +0200 (CEST) Message-ID: <57E2A2BB.9000806@omnilan.de> Date: Wed, 21 Sep 2016 17:09:47 +0200 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Glen Barber CC: svn-src-all@freebsd.org Subject: Re: svn commit: r306103 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes References: <201609211419.u8LEJ226085349@repo.freebsd.org> In-Reply-To: <201609211419.u8LEJ226085349@repo.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Wed, 21 Sep 2016 17:09:48 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 15:09:52 -0000 Bezüglich Glen Barber's Nachricht vom 21.09.2016 16:19 (localtime): > Author: gjb > Date: Wed Sep 21 14:19:01 2016 > New Revision: 306103 > URL: https://svnweb.freebsd.org/changeset/base/306103 > > Log: > Document r291292, if_enc(4) addition. > > Submitted by: ae > Approved by: re (implicit) > Sponsored by: The FreeBSD Foundation > > Modified: > releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml > > Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml > ============================================================================== > --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:15:15 2016 (r306102) > +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:19:01 2016 (r306103) > @@ -1433,6 +1433,12 @@ > arch="arm64">Initial SMP support has been > added to the &os;/&arch.arm64; port. > > + The > + &man.enc.4; driver has been added, providing an interface > + through which IPSEC can be used via > + &man.kldload.8; without requiring additional kernel and/or > + userland changes. Please correct me if I'm wrong, but if_enc(4) has been present at least since 9.x. In my opinion (non-native english speaker), the paragraph is misleading. if_enc(4) cannot be »used« for IPSec, but proviedes access to decapsulated ESP traffic processd in kernel space. I would understand this paragraph as if I could construct any kind of VPN(IPSec)-tunnel with if_enc(4). Mybe it's just me, please jump in experts! Thanks, -Harry From owner-svn-src-all@freebsd.org Wed Sep 21 15:24:21 2016 Return-Path: Delivered-To: svn-src-all@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 AF354BE49D7 for ; Wed, 21 Sep 2016 15:24:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 93FF919DE; Wed, 21 Sep 2016 15:24:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id F2F21186D; Wed, 21 Sep 2016 15:24:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Wed, 21 Sep 2016 15:24:18 +0000 From: Glen Barber To: Harry Schmalzbauer Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r306103 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20160921152418.GU35413@FreeBSD.org> References: <201609211419.u8LEJ226085349@repo.freebsd.org> <57E2A2BB.9000806@omnilan.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AAsCVVzXF7rH55eG" Content-Disposition: inline In-Reply-To: <57E2A2BB.9000806@omnilan.de> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 15:24:21 -0000 --AAsCVVzXF7rH55eG Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 21, 2016 at 05:09:47PM +0200, Harry Schmalzbauer wrote: > Bez=FCglich Glen Barber's Nachricht vom 21.09.2016 16:19 (localtime): > > Author: gjb > > Date: Wed Sep 21 14:19:01 2016 > > New Revision: 306103 > > URL: https://svnweb.freebsd.org/changeset/base/306103 > > > > Log: > > Document r291292, if_enc(4) addition. > > =20 > > Submitted by: ae > > Approved by: re (implicit) > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml > > > > Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Se= p 21 14:15:15 2016 (r306102) > > +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Se= p 21 14:19:01 2016 (r306103) > > @@ -1433,6 +1433,12 @@ > > arch=3D"arm64">Initial SMP support has been > > added to the &os;/&arch.arm64; port. > > =20 > > + The > > + &man.enc.4; driver has been added, providing an interface > > + through which IPSEC can be used via > > + &man.kldload.8; without requiring additional kernel and/or > > + userland changes. >=20 > Please correct me if I'm wrong, but if_enc(4) has been present at least > since 9.x. > In my opinion (non-native english speaker), the paragraph is misleading. > if_enc(4) cannot be =BBused=AB for IPSec, but proviedes access to > decapsulated ESP traffic processd in kernel space. > I would understand this paragraph as if I could construct any kind of > VPN(IPSec)-tunnel with if_enc(4). > Mybe it's just me, please jump in experts! >=20 I misread the change, it should say the enc(4) driver can now be loaded via kldload(8), whereas it was necessary to include in the kernel config before 11.0 (if I am now properly reading the change correctly). Glen --AAsCVVzXF7rH55eG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4qYiAAoJEAMUWKVHj+KT+O4QAKUPpReBxbOr2qDr6Fve/Nmh tDiOiQukzb7Z64DKtQgZLEgXLz8+lcCbbixmeuYtY4SQoK8V2xHh7i/IQ1g16la7 AIPMTw+s/IkJNB14vZ1KLUJkgbkzGfiTKcER9UKRIkNcotGN/97rkpTll6ihEYzZ MNDfPM2fktpwoh8gbaZ4xoDyQFnITmNDu8cFaiF70XTu4DiSZk9fstLmqWwGiqlU dzPiDYvwyZKwikpQXrys2ZuQjfYKeXsOZRUrRxgKhTHUe248TBIPI1Q24K//Dlht vXWRedttOi+mijNC+JPc0LKJj4iBdZZ9j1zzRwofBXDGSac0PWFmyJq957WRzvmz iySHAfJ0Z6LhkAqWAc7tgDIccFx/QVfVuwoRRqQwlvxbb4Fs0cKJV9+Ec/7n21nt 6syQLyVwFjsub44vUM/t62R66mFMGmbbTNGsLyTwQzh6QD3xIyPSYOk9JO7XvT/Z p3nRRSr98byYr3+Do9+kSskL3Lc4e9pB0+7qPvqMXJpaVhFNelCTFS+uOm1clfFs RswmFf9nxooDrQBaxOOgM3Hye97p+Jo+78lr5xUzvBThBlnmLQUru1lWT+g6RKAt QYvw2+hq2RNl6OD13tn8t1CC9p0h+cde0DZToultGs2RFBKy6DptAUbjhzLa8+iQ jVC57yVhDIIPB2xOgbJZ =5An3 -----END PGP SIGNATURE----- --AAsCVVzXF7rH55eG-- From owner-svn-src-all@freebsd.org Wed Sep 21 15:26:40 2016 Return-Path: Delivered-To: svn-src-all@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 24DE3BE4A14; Wed, 21 Sep 2016 15:26:40 +0000 (UTC) (envelope-from gjb@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 CD5D41A54; Wed, 21 Sep 2016 15:26:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LFQdFR012003; Wed, 21 Sep 2016 15:26:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LFQd4H012002; Wed, 21 Sep 2016 15:26:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211526.u8LFQd4H012002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 15:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306107 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 15:26:40 -0000 Author: gjb Date: Wed Sep 21 15:26:38 2016 New Revision: 306107 URL: https://svnweb.freebsd.org/changeset/base/306107 Log: - Remove various '[arch]' references where it is redundant. - Further clarifications to the CUBIEBOARD2 kernel rename, iwn(4) addition, explicitly noting ia64 is Itanium(tm), various other fixes. Submitted by: theraven Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 14:59:43 2016 (r306106) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 15:26:38 2016 (r306107) @@ -997,8 +997,8 @@ &man.pmap.9; implementation for 64-bit &powerpc; processors has been overhaulded to improve concurrency. - A new module for creating - the dtb module for AM335x systems has + A new module for creating the + dtb module for ARM AM335x systems has been added. The @@ -1022,7 +1022,7 @@ configuration has been added, allowing building &man.siftr.4; statically into the kernel. - The &arm; boot loader, + The ARM boot loader, ubldr, is now relocatable. In addition, ubldr.bin is now created during build time, which is a stripped binary with an entry point of @@ -1076,9 +1076,11 @@ to the GENERIC kernel configuration for supported architectures. - The - CUBIEBOARD2 kernel configuration has been - renamed to A20. + The CUBIEBOARD2 + kernel configuration has been renamed to + A20 to add support for other boards with + the A20 processor, such as the Banana + Pi. Kernel debugging symbols are now installed to - Support for the Freescale + Support for the Freescale PCI Root Complex device has been - added. + added to &os;/&arch.powerpc;. The &man.cyapa.4; driver has been added, supporting the Cypress APA I2C trackpad. @@ -1282,13 +1284,6 @@ BCM57767, BCM57782, BCM57786 and BCM57787 has been added to &man.bge.4;. - Support for the &intel; Centrino™ - Wireless-N 135 chipset has been added. - - Firmware for &intel; Centrino™ - Wireless-N 105 devices has been added to the base - system. - The deprecated nve(4) driver has been removed. Users of NVIDIA nForce MCP network adapters are advised to use the &man.nfe.4; driver instead, which has been @@ -1310,8 +1305,9 @@ sponsor="&netgate;">The &man.ath.hal.4; driver has been updated to support the Atheros AR1111 chipset. - Support for the &intel; Centrino™ - Wireless-N 105 chipset has been added. + The &man.iwn.4; driver was added, + providing support for the &intel; Centrino™ Wireless-N + 105 and 135 chipsets. Support for the &man.cxgbe.4; Terminator @@ -1393,8 +1389,8 @@ The &man.asmc.4; driver has been updated to support the &apple; MacMini 3,1. - Support for &os;/ia64 has been dropped - as of &os; 11. + Support for &os;/ia64 (Itanium) has been + dropped as of &os; 11. An issue that could cause a system to hang when entering ACPI @@ -1402,14 +1398,14 @@ RAM) has been corrected in the &man.acpi.4; and &man.pci.4; drivers. - The power management unit + The power management unit subsystem has been updated to support power button events on - certain &arch.powerpc; hardware, such as aluminum + certain PowerPC hardware, such as aluminum PowerBook ®. - The &man.hwpmc.4; - driver has been updated to correct performance counter - sampling on G4 (MPC74xxx) and G5 class processors. + The &man.hwpmc.4; driver has been + updated to correct performance counter sampling on PowerPC G4 + (MPC74xxx) and G5 class processors. The From owner-svn-src-all@freebsd.org Wed Sep 21 15:29:36 2016 Return-Path: Delivered-To: svn-src-all@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 7EDD4BE4AAA; Wed, 21 Sep 2016 15:29:36 +0000 (UTC) (envelope-from gjb@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 4DFF61C1E; Wed, 21 Sep 2016 15:29:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LFTZFV012185; Wed, 21 Sep 2016 15:29:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LFTZap012184; Wed, 21 Sep 2016 15:29:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211529.u8LFTZap012184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 15:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306108 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 15:29:36 -0000 Author: gjb Date: Wed Sep 21 15:29:35 2016 New Revision: 306108 URL: https://svnweb.freebsd.org/changeset/base/306108 Log: Correct the entry for r291292, if_enc(4) was updated to be loaded via kldload(8) during runtime, not newly added. Submitted by: Harry Schmalzbauer Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 15:26:38 2016 (r306107) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 15:29:35 2016 (r306108) @@ -1430,10 +1430,9 @@ added to the &os;/&arch.arm64; port. The - &man.enc.4; driver has been added, providing an interface - through which IPSEC can be used via - &man.kldload.8; without requiring additional kernel and/or - userland changes. + &man.enc.4; driver has updated to allow creating an interface + via &man.kldload.8; during runtime without requiring + additional kernel and/or userland changes. The dtsec(4) driver for Freescale QorIQ SoCs has been added, supporting P2041, From owner-svn-src-all@freebsd.org Wed Sep 21 15:47:41 2016 Return-Path: Delivered-To: svn-src-all@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 361DDBE4FC9; Wed, 21 Sep 2016 15:47:41 +0000 (UTC) (envelope-from ache@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 0683EBE1; Wed, 21 Sep 2016 15:47:40 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LFleMY021726; Wed, 21 Sep 2016 15:47:40 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LFledI021725; Wed, 21 Sep 2016 15:47:40 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609211547.u8LFledI021725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Wed, 21 Sep 2016 15:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306109 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 15:47:41 -0000 Author: ache Date: Wed Sep 21 15:47:40 2016 New Revision: 306109 URL: https://svnweb.freebsd.org/changeset/base/306109 Log: 1) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 2) Check for incorrect values for %z. MFC after: 7 days Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Wed Sep 21 15:29:35 2016 (r306108) +++ head/lib/libc/stdtime/strptime.c Wed Sep 21 15:47:40 2016 (r306109) @@ -582,10 +582,16 @@ label: i *= 10; i += *buf - '0'; buf++; + } else if (len == 2) { + i *= 100; + break; } else return (NULL); } + if (i > 1400 || (sign == -1 && i > 1200) || + (i % 100) >= 60) + return (NULL); tm->tm_hour -= sign * (i / 100); tm->tm_min -= sign * (i % 100); *GMTp = 1; From owner-svn-src-all@freebsd.org Wed Sep 21 16:05:48 2016 Return-Path: Delivered-To: svn-src-all@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 54113BE45D3; Wed, 21 Sep 2016 16:05: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 1551493D; Wed, 21 Sep 2016 16:05: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 u8LG5lah029402; Wed, 21 Sep 2016 16:05:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LG5le9029401; Wed, 21 Sep 2016 16:05:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211605.u8LG5le9029401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:05: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: r306110 - stable/11/sys/dev/amdsbwd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:05:48 -0000 Author: avg Date: Wed Sep 21 16:05:47 2016 New Revision: 306110 URL: https://svnweb.freebsd.org/changeset/base/306110 Log: MFC r305535: amdsbwd: add support for FCH in family 16h models 30h-3Fh processors Modified: stable/11/sys/dev/amdsbwd/amdsbwd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/11/sys/dev/amdsbwd/amdsbwd.c Wed Sep 21 15:47:40 2016 (r306109) +++ stable/11/sys/dev/amdsbwd/amdsbwd.c Wed Sep 21 16:05:47 2016 (r306110) @@ -108,6 +108,21 @@ __FBSDID("$FreeBSD$"); #define AMDSB8_SMBUS_REVID 0x40 #define AMDHUDSON_SMBUS_DEVID 0x780b1022 #define AMDKERNCZ_SMBUS_DEVID 0x790b1022 +/* BKDG Family 16h Models 30h - 3Fh */ +#define AMDFCH16H3XH_PM_WDT_EN 0x00 +#define AMDFCH_WDT_DEC_EN 0x80 +#define AMDFCH16H3XH_PM_WDT_CTRL 0x03 +#define AMDFCH_WDT_RES_MASK 0x03 +#define AMDFCH_WDT_RES_32US 0x00 +#define AMDFCH_WDT_RES_10MS 0x01 +#define AMDFCH_WDT_RES_100MS 0x02 +#define AMDFCH_WDT_RES_1S 0x03 +#define AMDFCH_WDT_ENABLE_MASK 0x0c +#define AMDFCH_WDT_ENABLE 0x00 +#define AMDFCH16H3XH_PM_MMIO_CTRL 0x04 +#define AMDFCH_WDT_MMIO_EN 0x02 +#define AMDFCH16H3XH_WDT_ADDR1 0xfed80b00u +#define AMDFCH16H3XH_WDT_ADDR2 0xfeb00000u #define amdsbwd_verbose_printf(dev, ...) \ do { \ @@ -295,8 +310,8 @@ amdsbwd_identify(driver_t *driver, devic static void amdsbwd_probe_sb7xx(device_t dev, struct resource *pmres, uint32_t *addr) { - uint32_t val; - int i; + uint8_t val; + int i; /* Report cause of previous reset for user's convenience. */ val = pmio_read(pmres, AMDSB_PM_RESET_STATUS0); @@ -336,8 +351,8 @@ amdsbwd_probe_sb7xx(device_t dev, struct static void amdsbwd_probe_sb8xx(device_t dev, struct resource *pmres, uint32_t *addr) { - uint32_t val; - int i; + uint8_t val; + int i; /* Report cause of previous reset for user's convenience. */ val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS0); @@ -363,7 +378,7 @@ amdsbwd_probe_sb8xx(device_t dev, struct pmio_write(pmres, AMDSB8_PM_WDT_CTRL, val); #ifdef AMDSBWD_DEBUG val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL); - amdsbwd_verbose_printf(dev, "AMDSB8_PM_WDT_CTRL value = %#02x\n", val); + amdsbwd_verbose_printf(dev, "AMDSB8_PM_WDT_CTRL value = %#04x\n", val); #endif /* @@ -376,11 +391,56 @@ amdsbwd_probe_sb8xx(device_t dev, struct pmio_write(pmres, AMDSB8_PM_WDT_EN, val); #ifdef AMDSBWD_DEBUG val = pmio_read(pmres, AMDSB8_PM_WDT_EN); - device_printf(dev, "AMDSB8_PM_WDT_EN value = %#02x\n", val); + device_printf(dev, "AMDSB8_PM_WDT_EN value = %#04x\n", val); #endif device_set_desc(dev, "AMD SB8xx/SB9xx/Axx Watchdog Timer"); } +static void +amdsbwd_probe_fch_16h_3xh(device_t dev, struct resource *pmres, uint32_t *addr) +{ + uint8_t val; + + val = pmio_read(pmres, AMDFCH16H3XH_PM_MMIO_CTRL); + if ((val & AMDFCH_WDT_MMIO_EN) != 0) { + /* Fixed offset for the watchdog within ACPI MMIO range. */ + amdsbwd_verbose_printf(dev, "ACPI MMIO range is enabled\n"); + *addr = AMDFCH16H3XH_WDT_ADDR1; + } else { + /* + * Enable decoding of watchdog MMIO address. + */ + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); + val |= AMDFCH_WDT_DEC_EN; + pmio_write(pmres, AMDFCH16H3XH_PM_WDT_EN, val); +#ifdef AMDSBWD_DEBUG + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); + device_printf(dev, "AMDFCH16H3XH_PM_WDT_EN value = %#04x\n", + val); +#endif + + /* Special fixed MMIO range for the watchdog. */ + *addr = AMDFCH16H3XH_WDT_ADDR2; + } + + /* + * Set watchdog timer tick to 1s and + * enable the watchdog device (in stopped state). + */ + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); + val &= ~AMDFCH_WDT_RES_MASK; + val |= AMDFCH_WDT_RES_1S; + val &= ~AMDFCH_WDT_ENABLE_MASK; + val |= AMDFCH_WDT_ENABLE; + pmio_write(pmres, AMDFCH16H3XH_PM_WDT_CTRL, val); +#ifdef AMDSBWD_DEBUG + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); + amdsbwd_verbose_printf(dev, "AMDFCH16H3XH_PM_WDT_CTRL value = %#04x\n", + val); +#endif + device_set_desc(dev, "AMD FCH Rev 42h+ Watchdog Timer"); +} + static int amdsbwd_probe(device_t dev) { @@ -389,6 +449,8 @@ amdsbwd_probe(device_t dev) uint32_t addr; int rid; int rc; + uint32_t devid; + uint8_t revid; /* Do not claim some ISA PnP device by accident. */ if (isa_get_logicalid(dev) != 0) @@ -410,11 +472,15 @@ amdsbwd_probe(device_t dev) smb_dev = pci_find_bsf(0, 20, 0); KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n")); - if (pci_get_devid(smb_dev) == AMDSB_SMBUS_DEVID && - pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID) + devid = pci_get_devid(smb_dev); + revid = pci_get_revid(smb_dev); + if (devid == AMDSB_SMBUS_DEVID && revid < AMDSB8_SMBUS_REVID) amdsbwd_probe_sb7xx(dev, res, &addr); - else + else if (devid == AMDSB_SMBUS_DEVID || devid == AMDKERNCZ_SMBUS_DEVID || + (devid == AMDHUDSON_SMBUS_DEVID && revid < 0x42)) amdsbwd_probe_sb8xx(dev, res, &addr); + else + amdsbwd_probe_fch_16h_3xh(dev, res, &addr); bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); @@ -439,14 +505,11 @@ amdsbwd_probe(device_t dev) static int amdsbwd_attach_sb(device_t dev, struct amdsbwd_softc *sc) { - device_t smb_dev; sc->max_ticks = UINT16_MAX; sc->rid_ctrl = 0; sc->rid_count = 1; - smb_dev = pci_find_bsf(0, 20, 0); - KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n")); sc->ms_per_tick = 1000; sc->res_ctrl = bus_alloc_resource_any(dev, SYS_RES_MEMORY, From owner-svn-src-all@freebsd.org Wed Sep 21 16:06:01 2016 Return-Path: Delivered-To: svn-src-all@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 5511ABE4609; Wed, 21 Sep 2016 16:06:01 +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 182F7A78; Wed, 21 Sep 2016 16:06:01 +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 u8LG6014029465; Wed, 21 Sep 2016 16:06:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LG60NB029464; Wed, 21 Sep 2016 16:06:00 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211606.u8LG60NB029464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306111 - stable/10/sys/dev/amdsbwd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:06:01 -0000 Author: avg Date: Wed Sep 21 16:06:00 2016 New Revision: 306111 URL: https://svnweb.freebsd.org/changeset/base/306111 Log: MFC r305535: amdsbwd: add support for FCH in family 16h models 30h-3Fh processors Modified: stable/10/sys/dev/amdsbwd/amdsbwd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/10/sys/dev/amdsbwd/amdsbwd.c Wed Sep 21 16:05:47 2016 (r306110) +++ stable/10/sys/dev/amdsbwd/amdsbwd.c Wed Sep 21 16:06:00 2016 (r306111) @@ -108,6 +108,21 @@ __FBSDID("$FreeBSD$"); #define AMDSB8_SMBUS_REVID 0x40 #define AMDHUDSON_SMBUS_DEVID 0x780b1022 #define AMDKERNCZ_SMBUS_DEVID 0x790b1022 +/* BKDG Family 16h Models 30h - 3Fh */ +#define AMDFCH16H3XH_PM_WDT_EN 0x00 +#define AMDFCH_WDT_DEC_EN 0x80 +#define AMDFCH16H3XH_PM_WDT_CTRL 0x03 +#define AMDFCH_WDT_RES_MASK 0x03 +#define AMDFCH_WDT_RES_32US 0x00 +#define AMDFCH_WDT_RES_10MS 0x01 +#define AMDFCH_WDT_RES_100MS 0x02 +#define AMDFCH_WDT_RES_1S 0x03 +#define AMDFCH_WDT_ENABLE_MASK 0x0c +#define AMDFCH_WDT_ENABLE 0x00 +#define AMDFCH16H3XH_PM_MMIO_CTRL 0x04 +#define AMDFCH_WDT_MMIO_EN 0x02 +#define AMDFCH16H3XH_WDT_ADDR1 0xfed80b00u +#define AMDFCH16H3XH_WDT_ADDR2 0xfeb00000u #define amdsbwd_verbose_printf(dev, ...) \ do { \ @@ -295,8 +310,8 @@ amdsbwd_identify(driver_t *driver, devic static void amdsbwd_probe_sb7xx(device_t dev, struct resource *pmres, uint32_t *addr) { - uint32_t val; - int i; + uint8_t val; + int i; /* Report cause of previous reset for user's convenience. */ val = pmio_read(pmres, AMDSB_PM_RESET_STATUS0); @@ -336,8 +351,8 @@ amdsbwd_probe_sb7xx(device_t dev, struct static void amdsbwd_probe_sb8xx(device_t dev, struct resource *pmres, uint32_t *addr) { - uint32_t val; - int i; + uint8_t val; + int i; /* Report cause of previous reset for user's convenience. */ val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS0); @@ -363,7 +378,7 @@ amdsbwd_probe_sb8xx(device_t dev, struct pmio_write(pmres, AMDSB8_PM_WDT_CTRL, val); #ifdef AMDSBWD_DEBUG val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL); - amdsbwd_verbose_printf(dev, "AMDSB8_PM_WDT_CTRL value = %#02x\n", val); + amdsbwd_verbose_printf(dev, "AMDSB8_PM_WDT_CTRL value = %#04x\n", val); #endif /* @@ -376,11 +391,56 @@ amdsbwd_probe_sb8xx(device_t dev, struct pmio_write(pmres, AMDSB8_PM_WDT_EN, val); #ifdef AMDSBWD_DEBUG val = pmio_read(pmres, AMDSB8_PM_WDT_EN); - device_printf(dev, "AMDSB8_PM_WDT_EN value = %#02x\n", val); + device_printf(dev, "AMDSB8_PM_WDT_EN value = %#04x\n", val); #endif device_set_desc(dev, "AMD SB8xx/SB9xx/Axx Watchdog Timer"); } +static void +amdsbwd_probe_fch_16h_3xh(device_t dev, struct resource *pmres, uint32_t *addr) +{ + uint8_t val; + + val = pmio_read(pmres, AMDFCH16H3XH_PM_MMIO_CTRL); + if ((val & AMDFCH_WDT_MMIO_EN) != 0) { + /* Fixed offset for the watchdog within ACPI MMIO range. */ + amdsbwd_verbose_printf(dev, "ACPI MMIO range is enabled\n"); + *addr = AMDFCH16H3XH_WDT_ADDR1; + } else { + /* + * Enable decoding of watchdog MMIO address. + */ + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); + val |= AMDFCH_WDT_DEC_EN; + pmio_write(pmres, AMDFCH16H3XH_PM_WDT_EN, val); +#ifdef AMDSBWD_DEBUG + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); + device_printf(dev, "AMDFCH16H3XH_PM_WDT_EN value = %#04x\n", + val); +#endif + + /* Special fixed MMIO range for the watchdog. */ + *addr = AMDFCH16H3XH_WDT_ADDR2; + } + + /* + * Set watchdog timer tick to 1s and + * enable the watchdog device (in stopped state). + */ + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); + val &= ~AMDFCH_WDT_RES_MASK; + val |= AMDFCH_WDT_RES_1S; + val &= ~AMDFCH_WDT_ENABLE_MASK; + val |= AMDFCH_WDT_ENABLE; + pmio_write(pmres, AMDFCH16H3XH_PM_WDT_CTRL, val); +#ifdef AMDSBWD_DEBUG + val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); + amdsbwd_verbose_printf(dev, "AMDFCH16H3XH_PM_WDT_CTRL value = %#04x\n", + val); +#endif + device_set_desc(dev, "AMD FCH Rev 42h+ Watchdog Timer"); +} + static int amdsbwd_probe(device_t dev) { @@ -389,6 +449,8 @@ amdsbwd_probe(device_t dev) uint32_t addr; int rid; int rc; + uint32_t devid; + uint8_t revid; /* Do not claim some ISA PnP device by accident. */ if (isa_get_logicalid(dev) != 0) @@ -410,11 +472,15 @@ amdsbwd_probe(device_t dev) smb_dev = pci_find_bsf(0, 20, 0); KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n")); - if (pci_get_devid(smb_dev) == AMDSB_SMBUS_DEVID && - pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID) + devid = pci_get_devid(smb_dev); + revid = pci_get_revid(smb_dev); + if (devid == AMDSB_SMBUS_DEVID && revid < AMDSB8_SMBUS_REVID) amdsbwd_probe_sb7xx(dev, res, &addr); - else + else if (devid == AMDSB_SMBUS_DEVID || devid == AMDKERNCZ_SMBUS_DEVID || + (devid == AMDHUDSON_SMBUS_DEVID && revid < 0x42)) amdsbwd_probe_sb8xx(dev, res, &addr); + else + amdsbwd_probe_fch_16h_3xh(dev, res, &addr); bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); @@ -439,14 +505,11 @@ amdsbwd_probe(device_t dev) static int amdsbwd_attach_sb(device_t dev, struct amdsbwd_softc *sc) { - device_t smb_dev; sc->max_ticks = UINT16_MAX; sc->rid_ctrl = 0; sc->rid_count = 1; - smb_dev = pci_find_bsf(0, 20, 0); - KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n")); sc->ms_per_tick = 1000; sc->res_ctrl = bus_alloc_resource_any(dev, SYS_RES_MEMORY, From owner-svn-src-all@freebsd.org Wed Sep 21 16:12:28 2016 Return-Path: Delivered-To: svn-src-all@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 348EBBE47FB; Wed, 21 Sep 2016 16:12:28 +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 04683FC2; Wed, 21 Sep 2016 16:12:27 +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 u8LGCRU5033229; Wed, 21 Sep 2016 16:12:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGCRpE033228; Wed, 21 Sep 2016 16:12:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211612.u8LGCRpE033228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:12:27 +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: r306112 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:12:28 -0000 Author: avg Date: Wed Sep 21 16:12:26 2016 New Revision: 306112 URL: https://svnweb.freebsd.org/changeset/base/306112 Log: MFC r303111: Document list of supported chipsets. Modified: stable/11/share/man/man4/intpm.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/intpm.4 ============================================================================== --- stable/11/share/man/man4/intpm.4 Wed Sep 21 16:06:00 2016 (r306111) +++ stable/11/share/man/man4/intpm.4 Wed Sep 21 16:12:26 2016 (r306112) @@ -24,25 +24,39 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 1999 +.Dd July 20, 2016 .Dt INTPM 4 .Os .Sh NAME .Nm intpm .Nd Intel PIIX4 Power Management controller driver .Sh SYNOPSIS +.Cd device pci .Cd device smbus .Cd device smb .Cd device intpm .Sh DESCRIPTION -This driver provides access to -.Tn Intel PIIX4 PCI Controller function 3 , -Power management controller. -Currently, only smbus controller -function is implemented. -But it also have bus idle monitoring function. -It -will display mapped I/O address for bus monitoring function when attaching. +The +.Nm +driver provides access to +.Tn Intel PIIX4 +compatible Power Management controllers. +Currently, only +.Xr smbus 4 +controller function is implemented. +.Sh HARDWARE +The +.Nm +driver supports the following chipsets: +.Pp +.Bl -bullet -compact +.It +Intel 82371AB/82443MX +.It +ATI IXP400 +.It +AMD SB600/700/710/750 +.El .Sh SEE ALSO .Xr smb 4 , .Xr smbus 4 From owner-svn-src-all@freebsd.org Wed Sep 21 16:12:35 2016 Return-Path: Delivered-To: svn-src-all@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 84D2BBE4831; Wed, 21 Sep 2016 16:12: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 54622194; Wed, 21 Sep 2016 16:12:35 +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 u8LGCYNB033278; Wed, 21 Sep 2016 16:12:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGCYrS033277; Wed, 21 Sep 2016 16:12:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211612.u8LGCYrS033277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306113 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:12:35 -0000 Author: avg Date: Wed Sep 21 16:12:34 2016 New Revision: 306113 URL: https://svnweb.freebsd.org/changeset/base/306113 Log: MFC r303111: Document list of supported chipsets. Modified: stable/10/share/man/man4/intpm.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/intpm.4 ============================================================================== --- stable/10/share/man/man4/intpm.4 Wed Sep 21 16:12:26 2016 (r306112) +++ stable/10/share/man/man4/intpm.4 Wed Sep 21 16:12:34 2016 (r306113) @@ -24,25 +24,39 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 1999 +.Dd July 20, 2016 .Dt INTPM 4 .Os .Sh NAME .Nm intpm .Nd Intel PIIX4 Power Management controller driver .Sh SYNOPSIS +.Cd device pci .Cd device smbus .Cd device smb .Cd device intpm .Sh DESCRIPTION -This driver provides access to -.Tn Intel PIIX4 PCI Controller function 3 , -Power management controller. -Currently, only smbus controller -function is implemented. -But it also have bus idle monitoring function. -It -will display mapped I/O address for bus monitoring function when attaching. +The +.Nm +driver provides access to +.Tn Intel PIIX4 +compatible Power Management controllers. +Currently, only +.Xr smbus 4 +controller function is implemented. +.Sh HARDWARE +The +.Nm +driver supports the following chipsets: +.Pp +.Bl -bullet -compact +.It +Intel 82371AB/82443MX +.It +ATI IXP400 +.It +AMD SB600/700/710/750 +.El .Sh SEE ALSO .Xr smb 4 , .Xr smbus 4 From owner-svn-src-all@freebsd.org Wed Sep 21 16:14:00 2016 Return-Path: Delivered-To: svn-src-all@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 1574CBE48DE; Wed, 21 Sep 2016 16:14:00 +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 CBCC2398; Wed, 21 Sep 2016 16:13: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 u8LGDxKK033392; Wed, 21 Sep 2016 16:13:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGDwpa033387; Wed, 21 Sep 2016 16:13:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211613.u8LGDwpa033387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:13: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: r306114 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:14:00 -0000 Author: avg Date: Wed Sep 21 16:13:58 2016 New Revision: 306114 URL: https://svnweb.freebsd.org/changeset/base/306114 Log: MFC r303113: Cross-link some SMBus controller drivers man pages. Modified: stable/11/share/man/man4/amdpm.4 stable/11/share/man/man4/amdsmb.4 stable/11/share/man/man4/ichsmb.4 stable/11/share/man/man4/intpm.4 stable/11/share/man/man4/ismt.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/amdpm.4 ============================================================================== --- stable/11/share/man/man4/amdpm.4 Wed Sep 21 16:12:34 2016 (r306113) +++ stable/11/share/man/man4/amdpm.4 Wed Sep 21 16:13:58 2016 (r306114) @@ -51,6 +51,7 @@ for writing user code to fetch voltages, monitoring chip of your mainboard. .Sh SEE ALSO .Xr amdsmb 4 , +.Xr intpm 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY Modified: stable/11/share/man/man4/amdsmb.4 ============================================================================== --- stable/11/share/man/man4/amdsmb.4 Wed Sep 21 16:12:34 2016 (r306113) +++ stable/11/share/man/man4/amdsmb.4 Wed Sep 21 16:13:58 2016 (r306114) @@ -31,6 +31,7 @@ .Nm amdsmb .Nd "AMD-8111 SMBus 2.0 controller driver" .Sh SYNOPSIS +.Cd "device pci" .Cd "device smbus" .Cd "device smb" .Cd "device amdsmb" @@ -39,6 +40,8 @@ The .Nm driver provides access to the AMD-8111 SMBus 2.0 controller. .Sh SEE ALSO +.Xr amdpm 4 , +.Xr intpm 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY Modified: stable/11/share/man/man4/ichsmb.4 ============================================================================== --- stable/11/share/man/man4/ichsmb.4 Wed Sep 21 16:12:34 2016 (r306113) +++ stable/11/share/man/man4/ichsmb.4 Wed Sep 21 16:13:58 2016 (r306114) @@ -51,6 +51,8 @@ device contained in the Intel 82801AA (I 82801BA (ICH2), 82801CA (ICH3), 82801DC (ICH4), 82801EB (ICH5), 82801FB (ICH6) and 82801GB (ICH7) PCI chips. .Sh SEE ALSO +.Xr intpm 4 , +.Xr ismt 4 , .Xr smb 4 , .Xr smbus 4 .Sh AUTHORS Modified: stable/11/share/man/man4/intpm.4 ============================================================================== --- stable/11/share/man/man4/intpm.4 Wed Sep 21 16:12:34 2016 (r306113) +++ stable/11/share/man/man4/intpm.4 Wed Sep 21 16:13:58 2016 (r306114) @@ -58,6 +58,9 @@ ATI IXP400 AMD SB600/700/710/750 .El .Sh SEE ALSO +.Xr amdpm 4 , +.Xr amdsmb 4 , +.Xr ichsmb 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY Modified: stable/11/share/man/man4/ismt.4 ============================================================================== --- stable/11/share/man/man4/ismt.4 Wed Sep 21 16:12:34 2016 (r306113) +++ stable/11/share/man/man4/ismt.4 Wed Sep 21 16:13:58 2016 (r306114) @@ -48,6 +48,7 @@ This driver provides access to the SMBus 2.0 controller device contained in the Intel Atom S1200 and C2000 CPUs. .Sh SEE ALSO +.Xr ichsmb 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY From owner-svn-src-all@freebsd.org Wed Sep 21 16:14:04 2016 Return-Path: Delivered-To: svn-src-all@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 20361BE4902; Wed, 21 Sep 2016 16:14:04 +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 D464B3C6; Wed, 21 Sep 2016 16:14:03 +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 u8LGE369033448; Wed, 21 Sep 2016 16:14:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGE2vg033443; Wed, 21 Sep 2016 16:14:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211614.u8LGE2vg033443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306115 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:14:04 -0000 Author: avg Date: Wed Sep 21 16:14:02 2016 New Revision: 306115 URL: https://svnweb.freebsd.org/changeset/base/306115 Log: MFC r303113: Cross-link some SMBus controller drivers man pages. Modified: stable/10/share/man/man4/amdpm.4 stable/10/share/man/man4/amdsmb.4 stable/10/share/man/man4/ichsmb.4 stable/10/share/man/man4/intpm.4 stable/10/share/man/man4/ismt.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/amdpm.4 ============================================================================== --- stable/10/share/man/man4/amdpm.4 Wed Sep 21 16:13:58 2016 (r306114) +++ stable/10/share/man/man4/amdpm.4 Wed Sep 21 16:14:02 2016 (r306115) @@ -51,6 +51,7 @@ for writing user code to fetch voltages, monitoring chip of your mainboard. .Sh SEE ALSO .Xr amdsmb 4 , +.Xr intpm 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY Modified: stable/10/share/man/man4/amdsmb.4 ============================================================================== --- stable/10/share/man/man4/amdsmb.4 Wed Sep 21 16:13:58 2016 (r306114) +++ stable/10/share/man/man4/amdsmb.4 Wed Sep 21 16:14:02 2016 (r306115) @@ -31,6 +31,7 @@ .Nm amdsmb .Nd "AMD-8111 SMBus 2.0 controller driver" .Sh SYNOPSIS +.Cd "device pci" .Cd "device smbus" .Cd "device smb" .Cd "device amdsmb" @@ -39,6 +40,8 @@ The .Nm driver provides access to the AMD-8111 SMBus 2.0 controller. .Sh SEE ALSO +.Xr amdpm 4 , +.Xr intpm 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY Modified: stable/10/share/man/man4/ichsmb.4 ============================================================================== --- stable/10/share/man/man4/ichsmb.4 Wed Sep 21 16:13:58 2016 (r306114) +++ stable/10/share/man/man4/ichsmb.4 Wed Sep 21 16:14:02 2016 (r306115) @@ -51,6 +51,8 @@ device contained in the Intel 82801AA (I 82801BA (ICH2), 82801CA (ICH3), 82801DC (ICH4), 82801EB (ICH5), 82801FB (ICH6) and 82801GB (ICH7) PCI chips. .Sh SEE ALSO +.Xr intpm 4 , +.Xr ismt 4 , .Xr smb 4 , .Xr smbus 4 .Sh AUTHORS Modified: stable/10/share/man/man4/intpm.4 ============================================================================== --- stable/10/share/man/man4/intpm.4 Wed Sep 21 16:13:58 2016 (r306114) +++ stable/10/share/man/man4/intpm.4 Wed Sep 21 16:14:02 2016 (r306115) @@ -58,6 +58,9 @@ ATI IXP400 AMD SB600/700/710/750 .El .Sh SEE ALSO +.Xr amdpm 4 , +.Xr amdsmb 4 , +.Xr ichsmb 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY Modified: stable/10/share/man/man4/ismt.4 ============================================================================== --- stable/10/share/man/man4/ismt.4 Wed Sep 21 16:13:58 2016 (r306114) +++ stable/10/share/man/man4/ismt.4 Wed Sep 21 16:14:02 2016 (r306115) @@ -48,6 +48,7 @@ This driver provides access to the SMBus 2.0 controller device contained in the Intel Atom S1200 and C2000 CPUs. .Sh SEE ALSO +.Xr ichsmb 4 , .Xr smb 4 , .Xr smbus 4 .Sh HISTORY From owner-svn-src-all@freebsd.org Wed Sep 21 16:15:31 2016 Return-Path: Delivered-To: svn-src-all@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 F2EB5BE4997; Wed, 21 Sep 2016 16:15: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 C268A90A; Wed, 21 Sep 2016 16:15:31 +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 u8LGFVXG033565; Wed, 21 Sep 2016 16:15:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGFV4E033564; Wed, 21 Sep 2016 16:15:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211615.u8LGFV4E033564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:15: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: r306116 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:15:32 -0000 Author: avg Date: Wed Sep 21 16:15:30 2016 New Revision: 306116 URL: https://svnweb.freebsd.org/changeset/base/306116 Log: MFC r305596: intpm.4 update supported hardware list Modified: stable/11/share/man/man4/intpm.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/intpm.4 ============================================================================== --- stable/11/share/man/man4/intpm.4 Wed Sep 21 16:14:02 2016 (r306115) +++ stable/11/share/man/man4/intpm.4 Wed Sep 21 16:15:30 2016 (r306116) @@ -55,7 +55,11 @@ Intel 82371AB/82443MX .It ATI IXP400 .It -AMD SB600/700/710/750 +AMD SB600/7x0/8x0/9x0 southbridges +.It +AMD Axx/Hudson/Bolton FCHs +.It +AMD FCH integrated into Family 16h Models 00h-0Fh Processors .El .Sh SEE ALSO .Xr amdpm 4 , From owner-svn-src-all@freebsd.org Wed Sep 21 16:15:36 2016 Return-Path: Delivered-To: svn-src-all@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 821A3BE49CD; Wed, 21 Sep 2016 16:15:36 +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 513F494D; Wed, 21 Sep 2016 16:15:36 +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 u8LGFZrf033612; Wed, 21 Sep 2016 16:15:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGFZot033611; Wed, 21 Sep 2016 16:15:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211615.u8LGFZot033611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306117 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:15:36 -0000 Author: avg Date: Wed Sep 21 16:15:35 2016 New Revision: 306117 URL: https://svnweb.freebsd.org/changeset/base/306117 Log: MFC r305596: intpm.4 update supported hardware list Modified: stable/10/share/man/man4/intpm.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/intpm.4 ============================================================================== --- stable/10/share/man/man4/intpm.4 Wed Sep 21 16:15:30 2016 (r306116) +++ stable/10/share/man/man4/intpm.4 Wed Sep 21 16:15:35 2016 (r306117) @@ -55,7 +55,11 @@ Intel 82371AB/82443MX .It ATI IXP400 .It -AMD SB600/700/710/750 +AMD SB600/7x0/8x0/9x0 southbridges +.It +AMD Axx/Hudson/Bolton FCHs +.It +AMD FCH integrated into Family 16h Models 00h-0Fh Processors .El .Sh SEE ALSO .Xr amdpm 4 , From owner-svn-src-all@freebsd.org Wed Sep 21 16:17:18 2016 Return-Path: Delivered-To: svn-src-all@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 71DE0BE4A5B; Wed, 21 Sep 2016 16:17:18 +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 44221BE4; Wed, 21 Sep 2016 16:17:18 +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 u8LGHHOU033733; Wed, 21 Sep 2016 16:17:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGHHGE033732; Wed, 21 Sep 2016 16:17:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211617.u8LGHHGE033732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:17: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: r306118 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:17:18 -0000 Author: avg Date: Wed Sep 21 16:17:17 2016 New Revision: 306118 URL: https://svnweb.freebsd.org/changeset/base/306118 Log: MFC r305600: amdsbwd.4: update supported hardware list Modified: stable/11/share/man/man4/amdsbwd.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/amdsbwd.4 ============================================================================== --- stable/11/share/man/man4/amdsbwd.4 Wed Sep 21 16:15:35 2016 (r306117) +++ stable/11/share/man/man4/amdsbwd.4 Wed Sep 21 16:17:17 2016 (r306118) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2016 +.Dd September 8, 2016 .Dt AMDSBWD 4 .Os .Sh NAME @@ -51,7 +51,22 @@ The driver provides .Xr watchdog 4 support for the watchdog timers present on -AMD SB600, SB7xx, SB8xx and SB9xx southbridges and Axx FCHs. +the supported chipsets. +.Sh HARDWARE +The +.Nm +driver supports the following chipsets: +.Pp +.Bl -bullet -compact +.It +AMD SB600/7x0/8x0/9x0 southbridges +.It +AMD Axx/Hudson/Bolton FCHs +.It +AMD FCHs integrated into Family 15h Models 60h-6Fh, 70h-7Fh Processors +.It +AMD FCHs integrated into Family 16h Models 00h-0Fh, 30h-3Fh Processors +.El .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdog 8 , From owner-svn-src-all@freebsd.org Wed Sep 21 16:17:24 2016 Return-Path: Delivered-To: svn-src-all@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 52EEFBE4A91; Wed, 21 Sep 2016 16:17:24 +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 D297FC92; Wed, 21 Sep 2016 16:17:23 +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 u8LGHNCP033781; Wed, 21 Sep 2016 16:17:23 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGHN3Z033780; Wed, 21 Sep 2016 16:17:23 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211617.u8LGHN3Z033780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306119 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:17:24 -0000 Author: avg Date: Wed Sep 21 16:17:22 2016 New Revision: 306119 URL: https://svnweb.freebsd.org/changeset/base/306119 Log: MFC r305600: amdsbwd.4: update supported hardware list Modified: stable/10/share/man/man4/amdsbwd.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/amdsbwd.4 ============================================================================== --- stable/10/share/man/man4/amdsbwd.4 Wed Sep 21 16:17:17 2016 (r306118) +++ stable/10/share/man/man4/amdsbwd.4 Wed Sep 21 16:17:22 2016 (r306119) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2016 +.Dd September 8, 2016 .Dt AMDSBWD 4 .Os .Sh NAME @@ -51,7 +51,22 @@ The driver provides .Xr watchdog 4 support for the watchdog timers present on -AMD SB600, SB7xx, SB8xx and SB9xx southbridges and Axx FCHs. +the supported chipsets. +.Sh HARDWARE +The +.Nm +driver supports the following chipsets: +.Pp +.Bl -bullet -compact +.It +AMD SB600/7x0/8x0/9x0 southbridges +.It +AMD Axx/Hudson/Bolton FCHs +.It +AMD FCHs integrated into Family 15h Models 60h-6Fh, 70h-7Fh Processors +.It +AMD FCHs integrated into Family 16h Models 00h-0Fh, 30h-3Fh Processors +.El .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdog 8 , From owner-svn-src-all@freebsd.org Wed Sep 21 16:19:28 2016 Return-Path: Delivered-To: svn-src-all@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 49567BE4B3C; Wed, 21 Sep 2016 16:19:28 +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 1BDE0EF3; Wed, 21 Sep 2016 16:19:28 +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 u8LGJR0B033912; Wed, 21 Sep 2016 16:19:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGJRf8033911; Wed, 21 Sep 2016 16:19:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211619.u8LGJRf8033911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:19:27 +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: r306120 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:19:28 -0000 Author: avg Date: Wed Sep 21 16:19:27 2016 New Revision: 306120 URL: https://svnweb.freebsd.org/changeset/base/306120 Log: MFC r305603: intpm: do not try attaching to unsupported controller revisions 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 Sep 21 16:17:22 2016 (r306119) +++ stable/11/sys/dev/intpm/intpm.c Wed Sep 21 16:19:27 2016 (r306120) @@ -104,9 +104,12 @@ intsmb_probe(device_t dev) device_set_desc(dev, "ATI IXP400 SMBus Controller"); break; case 0x43851002: - case 0x780b1022: /* AMD Hudson */ - device_set_desc(dev, "AMD SB600/7xx/8xx SMBus Controller"); - /* XXX Maybe force polling right here? */ + device_set_desc(dev, "AMD SB600/7xx/8xx/9xx SMBus Controller"); + break; + case 0x780b1022: /* AMD FCH */ + if (pci_get_revid(dev) < 0x40) + return (ENXIO); + device_set_desc(dev, "AMD FCH SMBus Controller"); break; default: return (ENXIO); From owner-svn-src-all@freebsd.org Wed Sep 21 16:23:32 2016 Return-Path: Delivered-To: svn-src-all@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 A18ABBE4CEB; Wed, 21 Sep 2016 16:23:32 +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 7444813DF; Wed, 21 Sep 2016 16:23:32 +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 u8LGNVFd037775; Wed, 21 Sep 2016 16:23:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGNV4N037774; Wed, 21 Sep 2016 16:23:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211623.u8LGNV4N037774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306121 - stable/10/sys/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:23:32 -0000 Author: avg Date: Wed Sep 21 16:23:31 2016 New Revision: 306121 URL: https://svnweb.freebsd.org/changeset/base/306121 Log: MFC r305603: intpm: do not try attaching to unsupported controller revisions Modified: stable/10/sys/pci/intpm.c Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/sys/pci/intpm.c ============================================================================== --- stable/10/sys/pci/intpm.c Wed Sep 21 16:19:27 2016 (r306120) +++ stable/10/sys/pci/intpm.c Wed Sep 21 16:23:31 2016 (r306121) @@ -104,9 +104,12 @@ intsmb_probe(device_t dev) device_set_desc(dev, "ATI IXP400 SMBus Controller"); break; case 0x43851002: - case 0x780b1022: /* AMD Hudson */ - device_set_desc(dev, "AMD SB600/7xx/8xx SMBus Controller"); - /* XXX Maybe force polling right here? */ + device_set_desc(dev, "AMD SB600/7xx/8xx/9xx SMBus Controller"); + break; + case 0x780b1022: /* AMD FCH */ + if (pci_get_revid(dev) < 0x40) + return (ENXIO); + device_set_desc(dev, "AMD FCH SMBus Controller"); break; default: return (ENXIO); From owner-svn-src-all@freebsd.org Wed Sep 21 16:27:01 2016 Return-Path: Delivered-To: svn-src-all@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 22EF5BE4E16; Wed, 21 Sep 2016 16:27:01 +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 CFDE11641; Wed, 21 Sep 2016 16:27:00 +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 u8LGR0iY038119; Wed, 21 Sep 2016 16:27:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGR0SN038118; Wed, 21 Sep 2016 16:27:00 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211627.u8LGR0SN038118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:27: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: r306122 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:27:01 -0000 Author: avg Date: Wed Sep 21 16:26:59 2016 New Revision: 306122 URL: https://svnweb.freebsd.org/changeset/base/306122 Log: MFC r305604: intpm: better clean up resources after a failed attachment 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 Sep 21 16:23:31 2016 (r306121) +++ stable/11/sys/dev/intpm/intpm.c Wed Sep 21 16:26:59 2016 (r306122) @@ -199,6 +199,23 @@ sb8xx_attach(device_t dev) return (0); } +static void +intsmb_release_resources(device_t dev) +{ + struct intsmb_softc *sc = device_get_softc(dev); + + if (sc->smbus) + device_delete_child(dev, sc->smbus); + if (sc->irq_hand) + bus_teardown_intr(dev, sc->irq_res, sc->irq_hand); + if (sc->irq_res) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + if (sc->io_res) + bus_release_resource(dev, SYS_RES_IOPORT, sc->io_rid, + sc->io_res); + mtx_destroy(&sc->lock); +} + static int intsmb_attach(device_t dev) { @@ -309,12 +326,15 @@ no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { + device_printf(dev, "failed to add smbus child\n"); error = ENXIO; goto fail; } error = device_probe_and_attach(sc->smbus); - if (error) + if (error) { + device_printf(dev, "failed to probe+attach smbus child\n"); goto fail; + } #ifdef ENABLE_ALART /* Enable Arart */ @@ -323,30 +343,22 @@ no_intr: return (0); fail: - intsmb_detach(dev); + intsmb_release_resources(dev); return (error); } static int intsmb_detach(device_t dev) { - struct intsmb_softc *sc = device_get_softc(dev); int error; error = bus_generic_detach(dev); - if (error) + if (error) { + device_printf(dev, "bus detach failed\n"); return (error); + } - if (sc->smbus) - device_delete_child(dev, sc->smbus); - if (sc->irq_hand) - bus_teardown_intr(dev, sc->irq_res, sc->irq_hand); - if (sc->irq_res) - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); - if (sc->io_res) - bus_release_resource(dev, SYS_RES_IOPORT, sc->io_rid, - sc->io_res); - mtx_destroy(&sc->lock); + intsmb_release_resources(dev); return (0); } From owner-svn-src-all@freebsd.org Wed Sep 21 16:27:11 2016 Return-Path: Delivered-To: svn-src-all@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 28E67BE4E83; Wed, 21 Sep 2016 16:27:11 +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 B23DB1734; Wed, 21 Sep 2016 16:27:10 +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 u8LGR9AY038178; Wed, 21 Sep 2016 16:27:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGR9Q2038177; Wed, 21 Sep 2016 16:27:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211627.u8LGR9Q2038177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306123 - stable/10/sys/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:27:11 -0000 Author: avg Date: Wed Sep 21 16:27:09 2016 New Revision: 306123 URL: https://svnweb.freebsd.org/changeset/base/306123 Log: MFC r305604: intpm: better clean up resources after a failed attachment Modified: stable/10/sys/pci/intpm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/pci/intpm.c ============================================================================== --- stable/10/sys/pci/intpm.c Wed Sep 21 16:26:59 2016 (r306122) +++ stable/10/sys/pci/intpm.c Wed Sep 21 16:27:09 2016 (r306123) @@ -199,6 +199,23 @@ sb8xx_attach(device_t dev) return (0); } +static void +intsmb_release_resources(device_t dev) +{ + struct intsmb_softc *sc = device_get_softc(dev); + + if (sc->smbus) + device_delete_child(dev, sc->smbus); + if (sc->irq_hand) + bus_teardown_intr(dev, sc->irq_res, sc->irq_hand); + if (sc->irq_res) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + if (sc->io_res) + bus_release_resource(dev, SYS_RES_IOPORT, sc->io_rid, + sc->io_res); + mtx_destroy(&sc->lock); +} + static int intsmb_attach(device_t dev) { @@ -309,12 +326,15 @@ no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { + device_printf(dev, "failed to add smbus child\n"); error = ENXIO; goto fail; } error = device_probe_and_attach(sc->smbus); - if (error) + if (error) { + device_printf(dev, "failed to probe+attach smbus child\n"); goto fail; + } #ifdef ENABLE_ALART /* Enable Arart */ @@ -323,30 +343,22 @@ no_intr: return (0); fail: - intsmb_detach(dev); + intsmb_release_resources(dev); return (error); } static int intsmb_detach(device_t dev) { - struct intsmb_softc *sc = device_get_softc(dev); int error; error = bus_generic_detach(dev); - if (error) + if (error) { + device_printf(dev, "bus detach failed\n"); return (error); + } - if (sc->smbus) - device_delete_child(dev, sc->smbus); - if (sc->irq_hand) - bus_teardown_intr(dev, sc->irq_res, sc->irq_hand); - if (sc->irq_res) - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); - if (sc->io_res) - bus_release_resource(dev, SYS_RES_IOPORT, sc->io_rid, - sc->io_res); - mtx_destroy(&sc->lock); + intsmb_release_resources(dev); return (0); } From owner-svn-src-all@freebsd.org Wed Sep 21 16:29:06 2016 Return-Path: Delivered-To: svn-src-all@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 145C8BE4FA0; Wed, 21 Sep 2016 16:29:06 +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 D58C41977; Wed, 21 Sep 2016 16:29: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 u8LGT5oo038401; Wed, 21 Sep 2016 16:29:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGT5bV038400; Wed, 21 Sep 2016 16:29:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211629.u8LGT5bV038400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:29: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: r306124 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:29:06 -0000 Author: avg Date: Wed Sep 21 16:29:04 2016 New Revision: 306124 URL: https://svnweb.freebsd.org/changeset/base/306124 Log: MFC r305606: intpm: make sure to register smbus driver before intpm driver 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 Sep 21 16:27:09 2016 (r306123) +++ stable/11/sys/dev/intpm/intpm.c Wed Sep 21 16:29:04 2016 (r306124) @@ -922,7 +922,8 @@ static driver_t intsmb_driver = { sizeof(struct intsmb_softc), }; -DRIVER_MODULE(intsmb, pci, intsmb_driver, intsmb_devclass, 0, 0); +DRIVER_MODULE_ORDERED(intsmb, pci, intsmb_driver, intsmb_devclass, 0, 0, + SI_ORDER_ANY); DRIVER_MODULE(smbus, intsmb, smbus_driver, smbus_devclass, 0, 0); MODULE_DEPEND(intsmb, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); MODULE_VERSION(intsmb, 1); From owner-svn-src-all@freebsd.org Wed Sep 21 16:29:16 2016 Return-Path: Delivered-To: svn-src-all@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 A2A56BE4FE3; Wed, 21 Sep 2016 16:29:16 +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 73D0D1AB7; Wed, 21 Sep 2016 16:29:16 +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 u8LGTFZa038460; Wed, 21 Sep 2016 16:29:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGTF9D038459; Wed, 21 Sep 2016 16:29:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211629.u8LGTF9D038459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 16:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306125 - stable/10/sys/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:29:16 -0000 Author: avg Date: Wed Sep 21 16:29:15 2016 New Revision: 306125 URL: https://svnweb.freebsd.org/changeset/base/306125 Log: MFC r305606: intpm: make sure to register smbus driver before intpm driver Modified: stable/10/sys/pci/intpm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/pci/intpm.c ============================================================================== --- stable/10/sys/pci/intpm.c Wed Sep 21 16:29:04 2016 (r306124) +++ stable/10/sys/pci/intpm.c Wed Sep 21 16:29:15 2016 (r306125) @@ -922,7 +922,8 @@ static driver_t intsmb_driver = { sizeof(struct intsmb_softc), }; -DRIVER_MODULE(intsmb, pci, intsmb_driver, intsmb_devclass, 0, 0); +DRIVER_MODULE_ORDERED(intsmb, pci, intsmb_driver, intsmb_devclass, 0, 0, + SI_ORDER_ANY); DRIVER_MODULE(smbus, intsmb, smbus_driver, smbus_devclass, 0, 0); MODULE_DEPEND(intsmb, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); MODULE_VERSION(intsmb, 1); From owner-svn-src-all@freebsd.org Wed Sep 21 16:51:57 2016 Return-Path: Delivered-To: svn-src-all@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 A01FFBC2049; Wed, 21 Sep 2016 16:51:57 +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 6D1DE8FC; Wed, 21 Sep 2016 16:51:57 +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 u8LGpure049761; Wed, 21 Sep 2016 16:51:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LGpud9049760; Wed, 21 Sep 2016 16:51:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609211651.u8LGpud9049760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 21 Sep 2016 16:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306126 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 16:51:57 -0000 Author: jhb Date: Wed Sep 21 16:51:56 2016 New Revision: 306126 URL: https://svnweb.freebsd.org/changeset/base/306126 Log: Fix invalid vendor ID constant (typo). During a bus rescan the check for an invalid vendor ID of a subfunction used the wrong constant. Submitted by: Dexuan Cui MFC after: 3 days Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Sep 21 16:29:15 2016 (r306125) +++ head/sys/dev/pci/pci.c Wed Sep 21 16:51:56 2016 (r306126) @@ -3971,7 +3971,7 @@ pci_rescan_method(device_t dev) if (hdrtype & PCIM_MFDEV) pcifunchigh = PCIB_MAXFUNCS(pcib); for (f = 0; f <= pcifunchigh; f++) { - if (REG(PCIR_VENDOR, 2) == 0xfff) + if (REG(PCIR_VENDOR, 2) == 0xffff) continue; /* From owner-svn-src-all@freebsd.org Wed Sep 21 17:51:28 2016 Return-Path: Delivered-To: svn-src-all@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 C7AD2BE38A9; Wed, 21 Sep 2016 17:51:28 +0000 (UTC) (envelope-from cem@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 980C9FCC; Wed, 21 Sep 2016 17:51:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LHpRqH072530; Wed, 21 Sep 2016 17:51:27 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LHpRV7072529; Wed, 21 Sep 2016 17:51:27 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609211751.u8LHpRV7072529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 21 Sep 2016 17:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306127 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 17:51:28 -0000 Author: cem Date: Wed Sep 21 17:51:27 2016 New Revision: 306127 URL: https://svnweb.freebsd.org/changeset/base/306127 Log: posix_openpt.2: Sort includes per style(9) Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/posix_openpt.2 Modified: head/lib/libc/sys/posix_openpt.2 ============================================================================== --- head/lib/libc/sys/posix_openpt.2 Wed Sep 21 16:51:56 2016 (r306126) +++ head/lib/libc/sys/posix_openpt.2 Wed Sep 21 17:51:27 2016 (r306127) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 21, 2013 +.Dd September 21, 2016 .Dt POSIX_OPENPT 2 .Os .Sh NAME @@ -46,8 +46,8 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In stdlib.h .In fcntl.h +.In stdlib.h .Ft int .Fn posix_openpt "int oflag" .Sh DESCRIPTION From owner-svn-src-all@freebsd.org Wed Sep 21 18:07:07 2016 Return-Path: Delivered-To: svn-src-all@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 E9CEABE4420; Wed, 21 Sep 2016 18:07:07 +0000 (UTC) (envelope-from gjb@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 B7C02B02; Wed, 21 Sep 2016 18:07:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LI76pg077409; Wed, 21 Sep 2016 18:07:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LI76HA077408; Wed, 21 Sep 2016 18:07:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211807.u8LI76HA077408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 18:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306128 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:07:08 -0000 Author: gjb Date: Wed Sep 21 18:07:06 2016 New Revision: 306128 URL: https://svnweb.freebsd.org/changeset/base/306128 Log: Fix ELF Tool Chain revision for releng/11.0. Replace elfcopy with objcopy/strip. Submitted by: emaste Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 17:51:27 2016 (r306127) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 18:07:06 2016 (r306128) @@ -489,9 +489,9 @@ patches that add new relocations for &arch.powerpc; support. - The + The ELF Tool Chain has been updated to - upstream revision r3272. + upstream revision r3477. The texinfo utility and info pages were removed from @@ -503,10 +503,11 @@ The ELF object manipulation tools addr2line, - elfcopy (strip), + objcopy, nm, readelf, - size, and + size, + strip, and strings were switched to the versions from the ELF Tool Chain project. From owner-svn-src-all@freebsd.org Wed Sep 21 18:07:26 2016 Return-Path: Delivered-To: svn-src-all@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 E8B3EBE4532; Wed, 21 Sep 2016 18:07:26 +0000 (UTC) (envelope-from trasz@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 9CB0ACA1; Wed, 21 Sep 2016 18:07:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LI7PNs077470; Wed, 21 Sep 2016 18:07:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LI7PbN077468; Wed, 21 Sep 2016 18:07:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609211807.u8LI7PbN077468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 21 Sep 2016 18:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306129 - head/usr.sbin/diskinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:07:27 -0000 Author: trasz Date: Wed Sep 21 18:07:25 2016 New Revision: 306129 URL: https://svnweb.freebsd.org/changeset/base/306129 Log: Reduce code duplication by factoring out the delta_t() function. No functional changes. MFC after: 1 month Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 18:07:06 2016 (r306128) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 18:07:25 2016 (r306129) @@ -237,14 +237,24 @@ T0(void) gettimeofday(&tv1, NULL); } -static void -TN(int count) +static double +delta_t(void) { double dt; gettimeofday(&tv2, NULL); dt = (tv2.tv_usec - tv1.tv_usec) / 1e6; dt += (tv2.tv_sec - tv1.tv_sec); + + return (dt); +} + +static void +TN(int count) +{ + double dt; + + dt = delta_t(); printf("%5d iter in %10.6f sec = %8.3f msec\n", count, dt, dt * 1000.0 / count); } @@ -254,9 +264,7 @@ TR(double count) { double dt; - gettimeofday(&tv2, NULL); - dt = (tv2.tv_usec - tv1.tv_usec) / 1e6; - dt += (tv2.tv_sec - tv1.tv_sec); + dt = delta_t(); printf("%8.0f kbytes in %10.6f sec = %8.0f kbytes/sec\n", count, dt, count / dt); } @@ -390,9 +398,7 @@ commandtime(int fd, off_t mediasize, u_i T0(); for (i = 0; i < 10; i++) rdmega(fd); - gettimeofday(&tv2, NULL); - dtmega = (tv2.tv_usec - tv1.tv_usec) / 1e6; - dtmega += (tv2.tv_sec - tv1.tv_sec); + dtmega = delta_t(); printf("\ttime to read 10MB block %10.6f sec\t= %8.3f msec/sector\n", dtmega, dtmega*100/2048); @@ -401,9 +407,7 @@ commandtime(int fd, off_t mediasize, u_i T0(); for (i = 0; i < 20480; i++) rdsect(fd, 0, sectorsize); - gettimeofday(&tv2, NULL); - dtsector = (tv2.tv_usec - tv1.tv_usec) / 1e6; - dtsector += (tv2.tv_sec - tv1.tv_sec); + dtsector = delta_t(); printf("\ttime to read 20480 sectors %10.6f sec\t= %8.3f msec/sector\n", dtsector, dtsector*100/2048); From owner-svn-src-all@freebsd.org Wed Sep 21 18:12:39 2016 Return-Path: Delivered-To: svn-src-all@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 6B248BE4AA5; Wed, 21 Sep 2016 18:12:39 +0000 (UTC) (envelope-from gjb@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 3B658289; Wed, 21 Sep 2016 18:12:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LICciE081035; Wed, 21 Sep 2016 18:12:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LICcWU081034; Wed, 21 Sep 2016 18:12:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609211812.u8LICcWU081034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 21 Sep 2016 18:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306130 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:12:39 -0000 Author: gjb Date: Wed Sep 21 18:12:38 2016 New Revision: 306130 URL: https://svnweb.freebsd.org/changeset/base/306130 Log: Add c++filt, missed in the previous commit. Submitted by: emaste Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 18:07:25 2016 (r306129) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 21 18:12:38 2016 (r306130) @@ -503,6 +503,7 @@ The ELF object manipulation tools addr2line, + c++filt, objcopy, nm, readelf, From owner-svn-src-all@freebsd.org Wed Sep 21 18:42:18 2016 Return-Path: Delivered-To: svn-src-all@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 A45FBBE3848; Wed, 21 Sep 2016 18:42:18 +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 73B2A86C; Wed, 21 Sep 2016 18:42:18 +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 u8LIgHkR092113; Wed, 21 Sep 2016 18:42:17 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LIgH80092112; Wed, 21 Sep 2016 18:42:17 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201609211842.u8LIgH80092112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 21 Sep 2016 18:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306131 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:42:18 -0000 Author: asomers Date: Wed Sep 21 18:42:17 2016 New Revision: 306131 URL: https://svnweb.freebsd.org/changeset/base/306131 Log: Update mkimg(1) author's contact info Reviewed by: marcel, imp MFC after: 3 days Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D7991 Modified: head/usr.bin/mkimg/mkimg.1 Modified: head/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Wed Sep 21 18:12:38 2016 (r306130) +++ head/usr.bin/mkimg/mkimg.1 Wed Sep 21 18:42:17 2016 (r306131) @@ -328,4 +328,4 @@ utility first appeared in The .Nm utility and manpage were written by -.An Marcel Moolenaar Aq Mt marcelm@juniper.net . +.An Marcel Moolenaar Aq Mt marcel@FreeBSD.org . From owner-svn-src-all@freebsd.org Wed Sep 21 18:47:22 2016 Return-Path: Delivered-To: svn-src-all@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 8B2D7BE3C1E; Wed, 21 Sep 2016 18:47:22 +0000 (UTC) (envelope-from gonzo@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 4D63EB4F; Wed, 21 Sep 2016 18:47:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LIlLNx092341; Wed, 21 Sep 2016 18:47:21 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LIlLWZ092339; Wed, 21 Sep 2016 18:47:21 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609211847.u8LIlLWZ092339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 21 Sep 2016 18:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306132 - in head/sys: dev/usb/input modules/usb/ukbd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:47:22 -0000 Author: gonzo Date: Wed Sep 21 18:47:21 2016 New Revision: 306132 URL: https://svnweb.freebsd.org/changeset/base/306132 Log: Add evdev support to ukbd driver event generation is disabled by default in favour of kbdmux. This behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 3 should be set to give priority to hw over mux Submitted by: Vladimir Kondratiev Reviewed by: hans Differential Revision: https://reviews.freebsd.org/D7957 Modified: head/sys/dev/usb/input/ukbd.c head/sys/modules/usb/ukbd/Makefile Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Wed Sep 21 18:42:17 2016 (r306131) +++ head/sys/dev/usb/input/ukbd.c Wed Sep 21 18:47:21 2016 (r306132) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_kbd.h" #include "opt_ukbd.h" +#include "opt_evdev.h" #include #include @@ -71,6 +72,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV +#include +#include +#endif + #include #include #include @@ -160,6 +166,9 @@ struct ukbd_softc { struct usb_device *sc_udev; struct usb_interface *sc_iface; struct usb_xfer *sc_xfer[UKBD_N_TRANSFER]; +#ifdef EVDEV + struct evdev_dev *sc_evdev; +#endif sbintime_t sc_co_basetime; int sc_delay; @@ -354,6 +363,12 @@ static device_attach_t ukbd_attach; static device_detach_t ukbd_detach; static device_resume_t ukbd_resume; +#ifdef EVDEV +static struct evdev_methods ukbd_evdev_methods = { + .ev_event = evdev_ev_kbd_event, +}; +#endif + static uint8_t ukbd_any_key_pressed(struct ukbd_softc *sc) { @@ -388,6 +403,14 @@ ukbd_put_key(struct ukbd_softc *sc, uint DPRINTF("0x%02x (%d) %s\n", key, key, (key & KEY_RELEASE) ? "released" : "pressed"); +#ifdef EVDEV + if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL) { + evdev_push_event(sc->sc_evdev, EV_KEY, + evdev_hid2key(KEY_INDEX(key)), !(key & KEY_RELEASE)); + evdev_sync(sc->sc_evdev); + } +#endif + if (sc->sc_inputs < UKBD_IN_BUF_SIZE) { sc->sc_input[sc->sc_inputtail] = key; ++(sc->sc_inputs); @@ -908,6 +931,11 @@ ukbd_set_leds_callback(struct usb_xfer * if (!any) break; +#ifdef EVDEV + if (sc->sc_evdev != NULL) + evdev_push_leds(sc->sc_evdev, sc->sc_leds); +#endif + /* range check output report length */ len = sc->sc_led_size; if (len > (UKBD_BUFFER_SIZE - 1)) @@ -1183,6 +1211,10 @@ ukbd_attach(device_t dev) usb_error_t err; uint16_t n; uint16_t hid_len; +#ifdef EVDEV + struct evdev_dev *evdev; + int i; +#endif #ifdef USB_DEBUG int rate; #endif @@ -1297,6 +1329,37 @@ ukbd_attach(device_t dev) goto detach; } #endif + +#ifdef EVDEV + evdev = evdev_alloc(); + evdev_set_name(evdev, device_get_desc(dev)); + evdev_set_phys(evdev, device_get_nameunit(dev)); + evdev_set_id(evdev, BUS_USB, uaa->info.idVendor, + uaa->info.idProduct, 0); + evdev_set_serial(evdev, usb_get_serial(uaa->device)); + evdev_set_methods(evdev, kbd, &ukbd_evdev_methods); + evdev_support_event(evdev, EV_SYN); + evdev_support_event(evdev, EV_KEY); + if (sc->sc_flags & (UKBD_FLAG_NUMLOCK | UKBD_FLAG_CAPSLOCK | + UKBD_FLAG_SCROLLLOCK)) + evdev_support_event(evdev, EV_LED); + evdev_support_event(evdev, EV_REP); + + for (i = 0x00; i <= 0xFF; i++) + evdev_support_key(evdev, evdev_hid2key(i)); + if (sc->sc_flags & UKBD_FLAG_NUMLOCK) + evdev_support_led(evdev, LED_NUML); + if (sc->sc_flags & UKBD_FLAG_CAPSLOCK) + evdev_support_led(evdev, LED_CAPSL); + if (sc->sc_flags & UKBD_FLAG_SCROLLLOCK) + evdev_support_led(evdev, LED_SCROLLL); + + if (evdev_register(evdev)) + evdev_free(evdev); + else + sc->sc_evdev = evdev; +#endif + sc->sc_flags |= UKBD_FLAG_ATTACHED; if (bootverbose) { @@ -1367,6 +1430,12 @@ ukbd_detach(device_t dev) } } #endif + +#ifdef EVDEV + if (sc->sc_evdev != NULL) + evdev_free(sc->sc_evdev); +#endif + if (KBD_IS_CONFIGURED(&sc->sc_kbd)) { error = kbd_unregister(&sc->sc_kbd); if (error) { @@ -1884,6 +1953,10 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_lon */ kbd->kb_delay1 = imax(((int *)arg)[0], 250); kbd->kb_delay2 = imax(((int *)arg)[1], 34); +#ifdef EVDEV + if (sc->sc_evdev != NULL) + evdev_push_repeats(sc->sc_evdev, kbd); +#endif return (0); #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ @@ -2032,6 +2105,9 @@ ukbd_set_leds(struct ukbd_softc *sc, uin static int ukbd_set_typematic(keyboard_t *kbd, int code) { +#ifdef EVDEV + struct ukbd_softc *sc = kbd->kb_data; +#endif static const int delays[] = {250, 500, 750, 1000}; static const int rates[] = {34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126, @@ -2043,6 +2119,10 @@ ukbd_set_typematic(keyboard_t *kbd, int } kbd->kb_delay1 = delays[(code >> 5) & 3]; kbd->kb_delay2 = rates[code & 0x1f]; +#ifdef EVDEV + if (sc->sc_evdev != NULL) + evdev_push_repeats(sc->sc_evdev, kbd); +#endif return (0); } Modified: head/sys/modules/usb/ukbd/Makefile ============================================================================== --- head/sys/modules/usb/ukbd/Makefile Wed Sep 21 18:42:17 2016 (r306131) +++ head/sys/modules/usb/ukbd/Makefile Wed Sep 21 18:47:21 2016 (r306132) @@ -30,7 +30,7 @@ S= ${.CURDIR}/../../.. .PATH: $S/dev/usb/input KMOD= ukbd -SRCS= opt_bus.h opt_compat.h opt_kbd.h opt_ukbd.h opt_usb.h \ +SRCS= opt_bus.h opt_compat.h opt_evdev.h opt_kbd.h opt_ukbd.h opt_usb.h \ device_if.h bus_if.h usb_if.h usbdevs.h \ ukbd.c From owner-svn-src-all@freebsd.org Wed Sep 21 18:50:12 2016 Return-Path: Delivered-To: svn-src-all@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 BA70EBE3E06; Wed, 21 Sep 2016 18:50:12 +0000 (UTC) (envelope-from jrm@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 84FD5D1A; Wed, 21 Sep 2016 18:50:12 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LIoBvr092501; Wed, 21 Sep 2016 18:50:11 GMT (envelope-from jrm@FreeBSD.org) Received: (from jrm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LIoBZv092500; Wed, 21 Sep 2016 18:50:11 GMT (envelope-from jrm@FreeBSD.org) Message-Id: <201609211850.u8LIoBZv092500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrm set sender to jrm@FreeBSD.org using -f From: Joseph Mingrone Date: Wed, 21 Sep 2016 18:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306133 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:50:12 -0000 Author: jrm (ports committer) Date: Wed Sep 21 18:50:11 2016 New Revision: 306133 URL: https://svnweb.freebsd.org/changeset/base/306133 Log: Add myself (jrm) as a ports committer and update mentor/mentee relationships Approved by: swills (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Sep 21 18:47:21 2016 (r306132) +++ head/share/misc/committers-ports.dot Wed Sep 21 18:50:11 2016 (r306133) @@ -129,6 +129,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBS johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] josef [label="Josef El-Rayes\njosef@FreeBSD.org\n2004/12/20"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2008/09/05"] +jrm [label="Joseph R. Mingrone\njrm@FreeBSD.org\n2016/09/17"] jsa [label="Joseph S. Atkinson\njsa@FreeBSD.org\n2010/07/15"] junovitch [label="Jason Unovitch\njunovitch@FreeBSD.org\n2015/07/27"] jylefort [label="Jean-Yves Lefort\njylefort@FreeBSD.org\n2005/04/12"] @@ -258,6 +259,8 @@ ade -> jpaetzel ahze -> shaun ahze -> tmclaugh +amdmi3 -> jrm + araujo -> lippe araujo -> pclin araujo -> pgollucci @@ -577,6 +580,7 @@ stas -> araujo steve -> netchild swills -> feld +swills -> jrm swills -> milki swills -> pclin swills -> robak From owner-svn-src-all@freebsd.org Wed Sep 21 18:52:04 2016 Return-Path: Delivered-To: svn-src-all@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 D0FD2BE4052; Wed, 21 Sep 2016 18:52:04 +0000 (UTC) (envelope-from gonzo@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 94F69DD; Wed, 21 Sep 2016 18:52:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LIq3PU096078; Wed, 21 Sep 2016 18:52:03 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LIq38C096076; Wed, 21 Sep 2016 18:52:03 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609211852.u8LIq38C096076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 21 Sep 2016 18:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306134 - in head/sys: dev/usb/input modules/usb/ums X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:52:04 -0000 Author: gonzo Date: Wed Sep 21 18:52:03 2016 New Revision: 306134 URL: https://svnweb.freebsd.org/changeset/base/306134 Log: Add evdev support to ums(4) event generation is disabled by default in favour of sysmouse. This behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 2 should be set to give priority to hw over sysmouse Submitted by: Vladimir Kondratiev Reviewed by: hans Differential Revision: https://reviews.freebsd.org/D7863 Modified: head/sys/dev/usb/input/ums.c head/sys/modules/usb/ums/Makefile Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Wed Sep 21 18:50:11 2016 (r306133) +++ head/sys/dev/usb/input/ums.c Wed Sep 21 18:52:03 2016 (r306134) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ +#include "opt_evdev.h" + #include #include #include @@ -68,6 +70,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV +#include +#include +#endif + #include #include #include @@ -135,10 +142,18 @@ struct ums_softc { int sc_pollrate; int sc_fflags; +#ifdef EVDEV + int sc_evflags; +#define UMS_EVDEV_OPENED 1 +#endif uint8_t sc_buttons; uint8_t sc_iid; uint8_t sc_temp[64]; + +#ifdef EVDEV + struct evdev_dev *sc_evdev; +#endif }; static void ums_put_queue_timeout(void *__sc); @@ -149,25 +164,39 @@ static device_probe_t ums_probe; static device_attach_t ums_attach; static device_detach_t ums_detach; -static usb_fifo_cmd_t ums_start_read; -static usb_fifo_cmd_t ums_stop_read; -static usb_fifo_open_t ums_open; -static usb_fifo_close_t ums_close; -static usb_fifo_ioctl_t ums_ioctl; +static usb_fifo_cmd_t ums_fifo_start_read; +static usb_fifo_cmd_t ums_fifo_stop_read; +static usb_fifo_open_t ums_fifo_open; +static usb_fifo_close_t ums_fifo_close; +static usb_fifo_ioctl_t ums_fifo_ioctl; + +#ifdef EVDEV +static evdev_open_t ums_ev_open; +static evdev_close_t ums_ev_close; +#endif +static void ums_start_rx(struct ums_softc *); +static void ums_stop_rx(struct ums_softc *); static void ums_put_queue(struct ums_softc *, int32_t, int32_t, int32_t, int32_t, int32_t); static int ums_sysctl_handler_parseinfo(SYSCTL_HANDLER_ARGS); static struct usb_fifo_methods ums_fifo_methods = { - .f_open = &ums_open, - .f_close = &ums_close, - .f_ioctl = &ums_ioctl, - .f_start_read = &ums_start_read, - .f_stop_read = &ums_stop_read, + .f_open = &ums_fifo_open, + .f_close = &ums_fifo_close, + .f_ioctl = &ums_fifo_ioctl, + .f_start_read = &ums_fifo_start_read, + .f_stop_read = &ums_fifo_stop_read, .basename[0] = "ums", }; +#ifdef EVDEV +static struct evdev_methods ums_evdev_methods = { + .ev_open = &ums_ev_open, + .ev_close = &ums_ev_close, +}; +#endif + static void ums_put_queue_timeout(void *__sc) { @@ -327,11 +356,17 @@ ums_intr_callback(struct usb_xfer *xfer, case USB_ST_SETUP: tr_setup: /* check if we can put more data into the FIFO */ - if (usb_fifo_put_bytes_max( - sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { - usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); - usbd_transfer_submit(xfer); + if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) == 0) { +#ifdef EVDEV + if (sc->sc_evflags == 0) + break; +#else + break; +#endif } + + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); + usbd_transfer_submit(xfer); break; default: /* Error */ @@ -655,6 +690,41 @@ ums_attach(device_t dev) if (err) goto detach; +#ifdef EVDEV + sc->sc_evdev = evdev_alloc(); + evdev_set_name(sc->sc_evdev, device_get_desc(dev)); + evdev_set_phys(sc->sc_evdev, device_get_nameunit(dev)); + evdev_set_id(sc->sc_evdev, BUS_USB, uaa->info.idVendor, + uaa->info.idProduct, 0); + evdev_set_serial(sc->sc_evdev, usb_get_serial(uaa->device)); + evdev_set_methods(sc->sc_evdev, sc, &ums_evdev_methods); + evdev_support_prop(sc->sc_evdev, INPUT_PROP_POINTER); + evdev_support_event(sc->sc_evdev, EV_SYN); + evdev_support_event(sc->sc_evdev, EV_REL); + evdev_support_event(sc->sc_evdev, EV_KEY); + + info = &sc->sc_info[0]; + + if (info->sc_flags & UMS_FLAG_X_AXIS) + evdev_support_rel(sc->sc_evdev, REL_X); + + if (info->sc_flags & UMS_FLAG_Y_AXIS) + evdev_support_rel(sc->sc_evdev, REL_Y); + + if (info->sc_flags & UMS_FLAG_Z_AXIS) + evdev_support_rel(sc->sc_evdev, REL_WHEEL); + + if (info->sc_flags & UMS_FLAG_T_AXIS) + evdev_support_rel(sc->sc_evdev, REL_HWHEEL); + + for (i = 0; i < info->sc_buttons; i++) + evdev_support_key(sc->sc_evdev, BTN_MOUSE + i); + + err = evdev_register(sc->sc_evdev); + if (err) + goto detach; +#endif + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, @@ -680,6 +750,10 @@ ums_detach(device_t self) usb_fifo_detach(&sc->sc_fifo); +#ifdef EVDEV + evdev_free(sc->sc_evdev); +#endif + usbd_transfer_unsetup(sc->sc_xfer, UMS_N_TRANSFER); usb_callout_drain(&sc->sc_callout); @@ -690,9 +764,44 @@ ums_detach(device_t self) } static void -ums_start_read(struct usb_fifo *fifo) +ums_reset(struct ums_softc *sc) +{ + + /* reset all USB mouse parameters */ + + if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) + sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; + else + sc->sc_hw.buttons = sc->sc_buttons; + + sc->sc_hw.iftype = MOUSE_IF_USB; + sc->sc_hw.type = MOUSE_MOUSE; + sc->sc_hw.model = MOUSE_MODEL_GENERIC; + sc->sc_hw.hwid = 0; + + sc->sc_mode.protocol = MOUSE_PROTO_MSC; + sc->sc_mode.rate = -1; + sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; + sc->sc_mode.accelfactor = 0; + sc->sc_mode.level = 0; + sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; + sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; + sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; + + /* reset status */ + + sc->sc_status.flags = 0; + sc->sc_status.button = 0; + sc->sc_status.obutton = 0; + sc->sc_status.dx = 0; + sc->sc_status.dy = 0; + sc->sc_status.dz = 0; + /* sc->sc_status.dt = 0; */ +} + +static void +ums_start_rx(struct ums_softc *sc) { - struct ums_softc *sc = usb_fifo_softc(fifo); int rate; /* Check if we should override the default polling interval */ @@ -715,14 +824,28 @@ ums_start_read(struct usb_fifo *fifo) } static void -ums_stop_read(struct usb_fifo *fifo) +ums_stop_rx(struct ums_softc *sc) { - struct ums_softc *sc = usb_fifo_softc(fifo); - usbd_transfer_stop(sc->sc_xfer[UMS_INTR_DT]); usb_callout_stop(&sc->sc_callout); } +static void +ums_fifo_start_read(struct usb_fifo *fifo) +{ + struct ums_softc *sc = usb_fifo_softc(fifo); + + ums_start_rx(sc); +} + +static void +ums_fifo_stop_read(struct usb_fifo *fifo) +{ + struct ums_softc *sc = usb_fifo_softc(fifo); + + ums_stop_rx(sc); +} + #if ((MOUSE_SYS_PACKETSIZE != 8) || \ (MOUSE_MSC_PACKETSIZE != 5)) @@ -769,6 +892,21 @@ ums_put_queue(struct ums_softc *sc, int3 usb_fifo_put_data_linear(sc->sc_fifo.fp[USB_FIFO_RX], buf, sc->sc_mode.packetsize, 1); +#ifdef EVDEV + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + /* Push evdev event */ + evdev_push_event(sc->sc_evdev, EV_REL, REL_X, dx); + evdev_push_event(sc->sc_evdev, EV_REL, REL_Y, -dy); + evdev_push_event(sc->sc_evdev, EV_REL, REL_WHEEL, -dz); + evdev_push_event(sc->sc_evdev, EV_REL, REL_HWHEEL, dt); + evdev_push_mouse_btn(sc->sc_evdev, + (buttons & ~MOUSE_STDBUTTONS) | + (buttons & (1 << 2) ? MOUSE_BUTTON1DOWN : 0) | + (buttons & (1 << 1) ? MOUSE_BUTTON2DOWN : 0) | + (buttons & (1 << 0) ? MOUSE_BUTTON3DOWN : 0)); + evdev_sync(sc->sc_evdev); + } +#endif } else { DPRINTF("Buffer full, discarded packet\n"); } @@ -781,8 +919,44 @@ ums_reset_buf(struct ums_softc *sc) usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]); } +#ifdef EVDEV +static int +ums_ev_open(struct evdev_dev *evdev, void *ev_softc) +{ + struct ums_softc *sc = (struct ums_softc *)ev_softc; + + mtx_lock(&sc->sc_mtx); + + sc->sc_evflags = UMS_EVDEV_OPENED; + + if (sc->sc_fflags == 0) { + ums_reset(sc); + ums_start_rx(sc); + } + + mtx_unlock(&sc->sc_mtx); + + return (0); +} + +static void +ums_ev_close(struct evdev_dev *evdev, void *ev_softc) +{ + struct ums_softc *sc = (struct ums_softc *)ev_softc; + + mtx_lock(&sc->sc_mtx); + + sc->sc_evflags = 0; + + if (sc->sc_fflags == 0) + ums_stop_rx(sc); + + mtx_unlock(&sc->sc_mtx); +} +#endif + static int -ums_open(struct usb_fifo *fifo, int fflags) +ums_fifo_open(struct usb_fifo *fifo, int fflags) { struct ums_softc *sc = usb_fifo_softc(fifo); @@ -793,39 +967,13 @@ ums_open(struct usb_fifo *fifo, int ffla return (EBUSY); /* check for first open */ - if (sc->sc_fflags == 0) { - - /* reset all USB mouse parameters */ - - if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) - sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; - else - sc->sc_hw.buttons = sc->sc_buttons; - - sc->sc_hw.iftype = MOUSE_IF_USB; - sc->sc_hw.type = MOUSE_MOUSE; - sc->sc_hw.model = MOUSE_MODEL_GENERIC; - sc->sc_hw.hwid = 0; - - sc->sc_mode.protocol = MOUSE_PROTO_MSC; - sc->sc_mode.rate = -1; - sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; - sc->sc_mode.accelfactor = 0; - sc->sc_mode.level = 0; - sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; - sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; - sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; - - /* reset status */ - - sc->sc_status.flags = 0; - sc->sc_status.button = 0; - sc->sc_status.obutton = 0; - sc->sc_status.dx = 0; - sc->sc_status.dy = 0; - sc->sc_status.dz = 0; - /* sc->sc_status.dt = 0; */ - } +#ifdef EVDEV + if (sc->sc_fflags == 0 && sc->sc_evflags == 0) + ums_reset(sc); +#else + if (sc->sc_fflags == 0) + ums_reset(sc); +#endif if (fflags & FREAD) { /* allocate RX buffer */ @@ -840,7 +988,7 @@ ums_open(struct usb_fifo *fifo, int ffla } static void -ums_close(struct usb_fifo *fifo, int fflags) +ums_fifo_close(struct usb_fifo *fifo, int fflags) { struct ums_softc *sc = usb_fifo_softc(fifo); @@ -853,7 +1001,7 @@ ums_close(struct usb_fifo *fifo, int ffl } static int -ums_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, int fflags) +ums_fifo_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, int fflags) { struct ums_softc *sc = usb_fifo_softc(fifo); mousemode_t mode; Modified: head/sys/modules/usb/ums/Makefile ============================================================================== --- head/sys/modules/usb/ums/Makefile Wed Sep 21 18:50:11 2016 (r306133) +++ head/sys/modules/usb/ums/Makefile Wed Sep 21 18:52:03 2016 (r306134) @@ -30,7 +30,7 @@ S= ${.CURDIR}/../../.. .PATH: $S/dev/usb/input KMOD= ums -SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usbdevs.h \ - ums.c +SRCS= opt_bus.h opt_evdev.h opt_usb.h device_if.h bus_if.h usb_if.h \ + vnode_if.h usbdevs.h ums.c .include From owner-svn-src-all@freebsd.org Wed Sep 21 18:52:50 2016 Return-Path: Delivered-To: svn-src-all@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 A78C5BE417B; Wed, 21 Sep 2016 18:52:50 +0000 (UTC) (envelope-from jrm@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 7A7D8301; Wed, 21 Sep 2016 18:52:50 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LIqngR096144; Wed, 21 Sep 2016 18:52:49 GMT (envelope-from jrm@FreeBSD.org) Received: (from jrm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LIqnV4096143; Wed, 21 Sep 2016 18:52:49 GMT (envelope-from jrm@FreeBSD.org) Message-Id: <201609211852.u8LIqnV4096143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrm set sender to jrm@FreeBSD.org using -f From: Joseph Mingrone Date: Wed, 21 Sep 2016 18:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306135 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 18:52:50 -0000 Author: jrm (ports committer) Date: Wed Sep 21 18:52:49 2016 New Revision: 306135 URL: https://svnweb.freebsd.org/changeset/base/306135 Log: Add myself (jrm) to calendar.freebsd Approved by: swills (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Wed Sep 21 18:52:03 2016 (r306134) +++ head/usr.bin/calendar/calendars/calendar.freebsd Wed Sep 21 18:52:49 2016 (r306135) @@ -342,6 +342,7 @@ 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 +11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 11/09 Coleman Kane born in Cincinnati, Ohio, United States, 1980 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 From owner-svn-src-all@freebsd.org Wed Sep 21 19:11:39 2016 Return-Path: Delivered-To: svn-src-all@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 2071ABE4F0A; Wed, 21 Sep 2016 19:11:39 +0000 (UTC) (envelope-from emaste@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 CA0E0F0C; Wed, 21 Sep 2016 19:11:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LJBc3t001019; Wed, 21 Sep 2016 19:11:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LJBcKM001018; Wed, 21 Sep 2016 19:11:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609211911.u8LJBcKM001018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Sep 2016 19:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306136 - stable/10/contrib/binutils/ld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 19:11:39 -0000 Author: emaste Date: Wed Sep 21 19:11:37 2016 New Revision: 306136 URL: https://svnweb.freebsd.org/changeset/base/306136 Log: MFC r275240 (bapt): Implement --no-fatal-warnings Implement --no-fatal-warning for compatibility with newer ld what ever order the options are passed to ld(1) the --no-fatal-warning always disable --fatal-warning Modified: stable/10/contrib/binutils/ld/lexsup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/ld/lexsup.c ============================================================================== --- stable/10/contrib/binutils/ld/lexsup.c Wed Sep 21 18:52:49 2016 (r306135) +++ stable/10/contrib/binutils/ld/lexsup.c Wed Sep 21 19:11:37 2016 (r306136) @@ -84,6 +84,7 @@ enum option_values OPTION_NO_KEEP_MEMORY, OPTION_NO_WARN_MISMATCH, OPTION_NO_WARN_SEARCH_MISMATCH, + OPTION_NO_WARN_FATAL, OPTION_NOINHIBIT_EXEC, OPTION_NON_SHARED, OPTION_NO_WHOLE_ARCHIVE, @@ -375,6 +376,9 @@ static const struct ld_option ld_options { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}, '\0', NULL, N_("Treat warnings as errors"), TWO_DASHES }, + { {"no-fatal-warnings", no_argument, NULL, OPTION_NO_WARN_FATAL}, + '\0', NULL, N_("Don't treat warnings as errors"), + TWO_DASHES }, { {"fini", required_argument, NULL, OPTION_FINI}, '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH }, { {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX}, @@ -568,6 +572,7 @@ parse_args (unsigned argc, char **argv) struct option *really_longopts; int last_optind; enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR; + int no_fatal_warnings = FALSE; shortopts = xmalloc (OPTION_COUNT * 3 + 2); longopts = xmalloc (sizeof (*longopts) * (OPTION_COUNT + 1)); @@ -1317,6 +1322,9 @@ parse_args (unsigned argc, char **argv) case OPTION_WARN_FATAL: config.fatal_warnings = TRUE; break; + case OPTION_NO_WARN_FATAL: + no_fatal_warnings = TRUE; + break; case OPTION_WARN_MULTIPLE_GP: config.warn_multiple_gp = TRUE; break; @@ -1438,6 +1446,8 @@ parse_args (unsigned argc, char **argv) break; } } + if (no_fatal_warnings) + config.fatal_warnings = FALSE; if (ingroup) lang_leave_group (); From owner-svn-src-all@freebsd.org Wed Sep 21 19:26:38 2016 Return-Path: Delivered-To: svn-src-all@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 047F6BE2EC6; Wed, 21 Sep 2016 19:26:38 +0000 (UTC) (envelope-from np@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 BCFE51882; Wed, 21 Sep 2016 19:26:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LJQbAi007465; Wed, 21 Sep 2016 19:26:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LJQbOL007464; Wed, 21 Sep 2016 19:26:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609211926.u8LJQbOL007464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 21 Sep 2016 19:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306137 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 19:26:38 -0000 Author: np Date: Wed Sep 21 19:26:36 2016 New Revision: 306137 URL: https://svnweb.freebsd.org/changeset/base/306137 Log: cxgbetool: Add T6 support to the SGE context decoder. Obtained from: Chelsio Communications Sponsored by: Chelsio Communications Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:11:37 2016 (r306136) +++ head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:26:36 2016 (r306137) @@ -1360,7 +1360,7 @@ show_struct(const uint32_t *words, int n #define FIELD1(name, start) FIELD(name, start, start) static void -show_t5_ctxt(const struct t4_sge_context *p) +show_t5t6_ctxt(const struct t4_sge_context *p, int vers) { static struct field_desc egress_t5[] = { FIELD("DCA_ST:", 181, 191), @@ -1400,6 +1400,44 @@ show_t5_ctxt(const struct t4_sge_context FIELD1("CachePriority:", 0), { NULL } }; + static struct field_desc egress_t6[] = { + FIELD("DCA_ST:", 181, 191), + FIELD1("StatusPgNS:", 180), + FIELD1("StatusPgRO:", 179), + FIELD1("FetchNS:", 178), + FIELD1("FetchRO:", 177), + FIELD1("Valid:", 176), + FIELD1("ReschedulePending_1:", 175), + FIELD1("PCIeDataChannel:", 174), + FIELD1("StatusPgTPHintEn:", 173), + FIELD("StatusPgTPHint:", 171, 172), + FIELD1("FetchTPHintEn:", 170), + FIELD("FetchTPHint:", 168, 169), + FIELD1("FCThreshOverride:", 167), + { "WRLength:", 162, 166, 9, 0, 1 }, + FIELD1("WRLengthKnown:", 161), + FIELD1("ReschedulePending:", 160), + FIELD("TimerIx:", 157, 159), + FIELD1("FetchBurstMin:", 156), + FIELD1("FLMPacking:", 155), + FIELD("FetchBurstMax:", 153, 154), + FIELD("uPToken:", 133, 152), + FIELD1("uPTokenEn:", 132), + FIELD1("UserModeIO:", 131), + FIELD("uPFLCredits:", 123, 130), + FIELD1("uPFLCreditEn:", 122), + FIELD("FID:", 111, 121), + FIELD("HostFCMode:", 109, 110), + FIELD1("HostFCOwner:", 108), + { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, + FIELD("CIDX:", 89, 104), + FIELD("PIDX:", 73, 88), + { "BaseAddress:", 18, 72, 9, 1 }, + FIELD("QueueSize:", 2, 17), + FIELD1("QueueType:", 1), + FIELD1("FetchSizeMode:", 0), + { NULL } + }; static struct field_desc fl_t5[] = { FIELD("DCA_ST:", 181, 191), FIELD1("StatusPgNS:", 180), @@ -1470,6 +1508,42 @@ show_t5_ctxt(const struct t4_sge_context FIELD1("CachePriority:", 0), { NULL } }; + static struct field_desc ingress_t6[] = { + FIELD1("SP_NS:", 158), + FIELD1("SP_RO:", 157), + FIELD1("SP_TPHintEn:", 156), + FIELD("SP_TPHint:", 154, 155), + FIELD("DCA_ST:", 143, 153), + FIELD1("ISCSICoalescing:", 142), + FIELD1("Queue_Valid:", 141), + FIELD1("TimerPending:", 140), + FIELD1("DropRSS:", 139), + FIELD("PCIeChannel:", 137, 138), + FIELD1("SEInterruptArmed:", 136), + FIELD1("CongestionMgtEnable:", 135), + FIELD1("NoSnoop:", 134), + FIELD1("RelaxedOrdering:", 133), + FIELD1("GTSmode:", 132), + FIELD1("TPHintEn:", 131), + FIELD("TPHint:", 129, 130), + FIELD1("UpdateScheduling:", 128), + FIELD("UpdateDelivery:", 126, 127), + FIELD1("InterruptSent:", 125), + FIELD("InterruptIDX:", 114, 124), + FIELD1("InterruptDestination:", 113), + FIELD1("InterruptArmed:", 112), + FIELD("RxIntCounter:", 106, 111), + FIELD("RxIntCounterThreshold:", 104, 105), + FIELD1("Generation:", 103), + { "BaseAddress:", 48, 102, 9, 1 }, + FIELD("PIDX:", 32, 47), + FIELD("CIDX:", 16, 31), + { "QueueSize:", 4, 15, 4, 0 }, + { "QueueEntrySize:", 2, 3, 4, 0, 1 }, + FIELD1("QueueEntryOverride:", 1), + FIELD1("CachePriority:", 0), + { NULL } + }; static struct field_desc flm_t5[] = { FIELD1("Valid:", 89), FIELD("SplitLenMode:", 87, 88), @@ -1489,6 +1563,28 @@ show_t5_ctxt(const struct t4_sge_context FIELD("PIDX:", 0, 7), { NULL } }; + static struct field_desc flm_t6[] = { + FIELD1("Valid:", 89), + FIELD("SplitLenMode:", 87, 88), + FIELD1("TPHintEn:", 86), + FIELD("TPHint:", 84, 85), + FIELD1("NoSnoop:", 83), + FIELD1("RelaxedOrdering:", 82), + FIELD("DCA_ST:", 71, 81), + FIELD("EQid:", 54, 70), + FIELD("SplitEn:", 52, 53), + FIELD1("PadEn:", 51), + FIELD1("PackEn:", 50), + FIELD1("Cache_Lock :", 49), + FIELD1("CongDrop:", 48), + FIELD1("Inflifght:", 47), + FIELD1("CongEn:", 46), + FIELD1("CongMode:", 45), + FIELD("PackOffset:", 20, 39), + FIELD("CIDX:", 8, 15), + FIELD("PIDX:", 0, 7), + { NULL } + }; static struct field_desc conm_t5[] = { FIELD1("CngMPSEnable:", 21), FIELD("CngTPMode:", 19, 20), @@ -1499,12 +1595,17 @@ show_t5_ctxt(const struct t4_sge_context { NULL } }; - if (p->mem_id == SGE_CONTEXT_EGRESS) - show_struct(p->data, 6, (p->data[0] & 2) ? fl_t5 : egress_t5); - else if (p->mem_id == SGE_CONTEXT_FLM) - show_struct(p->data, 3, flm_t5); + if (p->mem_id == SGE_CONTEXT_EGRESS) { + if (p->data[0] & 2) + show_struct(p->data, 6, fl_t5); + else if (vers == 5) + show_struct(p->data, 6, egress_t5); + else + show_struct(p->data, 6, egress_t6); + } else if (p->mem_id == SGE_CONTEXT_FLM) + show_struct(p->data, 3, vers == 5 ? flm_t5 : flm_t6); else if (p->mem_id == SGE_CONTEXT_INGRESS) - show_struct(p->data, 5, ingress_t5); + show_struct(p->data, 5, vers == 5 ? ingress_t5 : ingress_t6); else if (p->mem_id == SGE_CONTEXT_CNM) show_struct(p->data, 1, conm_t5); } @@ -1689,7 +1790,7 @@ get_sge_context(int argc, const char *ar if (chip_id == 4) show_t4_ctxt(&cntxt); else - show_t5_ctxt(&cntxt); + show_t5t6_ctxt(&cntxt, chip_id); return (0); } From owner-svn-src-all@freebsd.org Wed Sep 21 19:30:35 2016 Return-Path: Delivered-To: svn-src-all@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 5FEA5BE3467; Wed, 21 Sep 2016 19:30:35 +0000 (UTC) (envelope-from np@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 331631C66; Wed, 21 Sep 2016 19:30:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LJUYnb007647; Wed, 21 Sep 2016 19:30:34 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LJUY7B007646; Wed, 21 Sep 2016 19:30:34 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609211930.u8LJUY7B007646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 21 Sep 2016 19:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306138 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 19:30:35 -0000 Author: np Date: Wed Sep 21 19:30:34 2016 New Revision: 306138 URL: https://svnweb.freebsd.org/changeset/base/306138 Log: Fix typo. Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:26:36 2016 (r306137) +++ head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:30:34 2016 (r306138) @@ -1577,7 +1577,7 @@ show_t5t6_ctxt(const struct t4_sge_conte FIELD1("PackEn:", 50), FIELD1("Cache_Lock :", 49), FIELD1("CongDrop:", 48), - FIELD1("Inflifght:", 47), + FIELD1("Inflight:", 47), FIELD1("CongEn:", 46), FIELD1("CongMode:", 45), FIELD("PackOffset:", 20, 39), From owner-svn-src-all@freebsd.org Wed Sep 21 19:48:08 2016 Return-Path: Delivered-To: svn-src-all@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 DFDA4BE42E7; Wed, 21 Sep 2016 19:48:08 +0000 (UTC) (envelope-from adrian@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 9B96081D; Wed, 21 Sep 2016 19:48:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LJm75p015018; Wed, 21 Sep 2016 19:48:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LJm7P1015015; Wed, 21 Sep 2016 19:48:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609211948.u8LJm7P1015015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 21 Sep 2016 19:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306139 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 19:48:09 -0000 Author: adrian Date: Wed Sep 21 19:48:07 2016 New Revision: 306139 URL: https://svnweb.freebsd.org/changeset/base/306139 Log: [net80211] don't add IBSS node table entries for neighbors from other SSIDs. The adhoc probe/beacon input path was creating nodes for all SSIDs. This wasn't a problem when the NICs were configured to only process frames for the current BSSID, but that didn't allow IBSS merges. Once avos and I flipped on "beacons from all BSSIDs" to allow for correct IBSS merging, we found this interesting behaviour. This adds a check against the current SSID. * If there's no VAP SSID, allow anything * If there's a VAP SSID, check if the incoming frame has a suitable SSID and if so, allow it. This prevents nodes being created for other SSIDs in probe and beacon frames - ie, beacons overlapping IBSSes with different SSIDs, and probe requests from arbitrary devices. Tested: * AR9380, IBSS mode, both local and other IBSSes. Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D7959 Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Wed Sep 21 19:30:34 2016 (r306138) +++ head/sys/net80211/ieee80211_adhoc.c Wed Sep 21 19:48:07 2016 (r306139) @@ -747,8 +747,20 @@ adhoc_recv_mgmt(struct ieee80211_node *n if (!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { /* * Create a new entry in the neighbor table. + * + * XXX TODO: + * + * Here we're not scanning; so if we have an + * SSID then make sure it matches our SSID. + * Otherwise this code will match on all IBSS + * beacons/probe requests for all SSIDs, + * filling the node table with nodes that + * aren't ours. */ - ni = ieee80211_add_neighbor(vap, wh, &scan); + if (ieee80211_ibss_node_check_new(ni, &scan)) + ni = ieee80211_add_neighbor(vap, wh, &scan); + else + ni = NULL; } else if (ni->ni_capinfo == 0) { /* * Update faked node created on transmit. Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Wed Sep 21 19:30:34 2016 (r306138) +++ head/sys/net80211/ieee80211_node.c Wed Sep 21 19:48:07 2016 (r306139) @@ -579,6 +579,62 @@ ieee80211_ibss_merge_check(struct ieee80 } /* + * Check if the given node should populate the node table. + * + * We need to be in "see all beacons for all ssids" mode in order + * to do IBSS merges, however this means we will populate nodes for + * /all/ IBSS SSIDs, versus just the one we care about. + * + * So this check ensures the node can actually belong to our IBSS + * configuration. For now it simply checks the SSID. + */ +int +ieee80211_ibss_node_check_new(struct ieee80211_node *ni, + const struct ieee80211_scanparams *scan) +{ + struct ieee80211vap *vap = ni->ni_vap; + int i; + + /* + * If we have no SSID and no scan SSID, return OK. + */ + if (vap->iv_des_nssid == 0 && scan->ssid == NULL) + goto ok; + + /* + * If we have one of (SSID, scan SSID) then return error. + */ + if (!! (vap->iv_des_nssid == 0) != !! (scan->ssid == NULL)) + goto mismatch; + + /* + * Double-check - we need scan SSID. + */ + if (scan->ssid == NULL) + goto mismatch; + + /* + * Check if the scan SSID matches the SSID list for the VAP. + */ + for (i = 0; i < vap->iv_des_nssid; i++) { + + /* Sanity length check */ + if (vap->iv_des_ssid[i].len != scan->ssid[1]) + continue; + + /* Note: SSID in the scan entry is the IE format */ + if (memcmp(vap->iv_des_ssid[i].ssid, scan->ssid + 2, + vap->iv_des_ssid[i].len) == 0) + goto ok; + } + +mismatch: + return (0); +ok: + return (1); +} + +/* * Handle 802.11 ad hoc network merge. The * convention, set by the Wireless Ethernet Compatibility Alliance * (WECA), is that an 802.11 station will change its BSSID to match Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Wed Sep 21 19:30:34 2016 (r306138) +++ head/sys/net80211/ieee80211_node.h Wed Sep 21 19:48:07 2016 (r306139) @@ -65,6 +65,7 @@ struct ieee80211_node_table; struct ieee80211com; struct ieee80211vap; +struct ieee80211_scanparams; /* * Information element ``blob''. We use this structure @@ -330,6 +331,8 @@ void ieee80211_setupcurchan(struct ieee8 void ieee80211_setcurchan(struct ieee80211com *, struct ieee80211_channel *); void ieee80211_update_chw(struct ieee80211com *); int ieee80211_ibss_merge_check(struct ieee80211_node *); +int ieee80211_ibss_node_check_new(struct ieee80211_node *ni, + const struct ieee80211_scanparams *); int ieee80211_ibss_merge(struct ieee80211_node *); struct ieee80211_scan_entry; int ieee80211_sta_join(struct ieee80211vap *, struct ieee80211_channel *, From owner-svn-src-all@freebsd.org Wed Sep 21 19:52:00 2016 Return-Path: Delivered-To: svn-src-all@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 54E97BE46A0; Wed, 21 Sep 2016 19:52:00 +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 25B33DC7; Wed, 21 Sep 2016 19:52:00 +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 u8LJpxhY018484; Wed, 21 Sep 2016 19:51:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LJpxdL018483; Wed, 21 Sep 2016 19:51:59 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211951.u8LJpxdL018483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 19:51: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: r306140 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 19:52:00 -0000 Author: avg Date: Wed Sep 21 19:51:59 2016 New Revision: 306140 URL: https://svnweb.freebsd.org/changeset/base/306140 Log: MFC r305602: intpm: fix attachment to supported AMD FCHs 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 Sep 21 19:48:07 2016 (r306139) +++ stable/11/sys/dev/intpm/intpm.c Wed Sep 21 19:51:59 2016 (r306140) @@ -238,10 +238,12 @@ intsmb_attach(device_t dev) break; #endif case 0x43851002: - case 0x780b1022: if (pci_get_revid(dev) >= 0x40) sc->sb8xx = 1; break; + case 0x780b1022: + sc->sb8xx = 1; + break; } if (sc->sb8xx) { From owner-svn-src-all@freebsd.org Wed Sep 21 19:53:53 2016 Return-Path: Delivered-To: svn-src-all@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 1CD8EBE4985; Wed, 21 Sep 2016 19:53:53 +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 E0CEF287; Wed, 21 Sep 2016 19:53: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 u8LJrqTE018776; Wed, 21 Sep 2016 19:53:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LJrqeY018775; Wed, 21 Sep 2016 19:53:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609211953.u8LJrqeY018775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Sep 2016 19:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306141 - stable/10/sys/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 19:53:53 -0000 Author: avg Date: Wed Sep 21 19:53:51 2016 New Revision: 306141 URL: https://svnweb.freebsd.org/changeset/base/306141 Log: MFC r305602: intpm: fix attachment to supported AMD FCHs Modified: stable/10/sys/pci/intpm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/pci/intpm.c ============================================================================== --- stable/10/sys/pci/intpm.c Wed Sep 21 19:51:59 2016 (r306140) +++ stable/10/sys/pci/intpm.c Wed Sep 21 19:53:51 2016 (r306141) @@ -238,10 +238,12 @@ intsmb_attach(device_t dev) break; #endif case 0x43851002: - case 0x780b1022: if (pci_get_revid(dev) >= 0x40) sc->sb8xx = 1; break; + case 0x780b1022: + sc->sb8xx = 1; + break; } if (sc->sb8xx) { From owner-svn-src-all@freebsd.org Wed Sep 21 20:56:11 2016 Return-Path: Delivered-To: svn-src-all@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 4E84BBE4805; Wed, 21 Sep 2016 20:56:11 +0000 (UTC) (envelope-from adrian@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 2C8B8906; Wed, 21 Sep 2016 20:56:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LKuACc041661; Wed, 21 Sep 2016 20:56:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LKuAMk041660; Wed, 21 Sep 2016 20:56:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609212056.u8LKuAMk041660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 21 Sep 2016 20:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306142 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 20:56:11 -0000 Author: adrian Date: Wed Sep 21 20:56:10 2016 New Revision: 306142 URL: https://svnweb.freebsd.org/changeset/base/306142 Log: [iwm] use rate control info from the node txrates; use mgmtrate for EAPOL frames This changes the transmit rate control code to do a few things: * use fixed rates (mcast, ucast, mgmt) where required. * Don't use a hard-coded 11a or 11bg rate for non-data frames - use what net80211 says we should use. * use mgmtrate for EAPOL frames. Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D7994 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Sep 21 19:53:51 2016 (r306141) +++ head/sys/dev/iwm/if_iwm.c Wed Sep 21 20:56:10 2016 (r306142) @@ -324,7 +324,7 @@ static void iwm_update_sched(struct iwm_ #endif static const struct iwm_rate * iwm_tx_fill_cmd(struct iwm_softc *, struct iwm_node *, - struct ieee80211_frame *, struct iwm_tx_cmd *); + struct mbuf *, struct iwm_tx_cmd *); static int iwm_tx(struct iwm_softc *, struct mbuf *, struct ieee80211_node *, int); static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *, @@ -3197,24 +3197,36 @@ iwm_tx_rateidx_lookup(struct iwm_softc * */ static const struct iwm_rate * iwm_tx_fill_cmd(struct iwm_softc *sc, struct iwm_node *in, - struct ieee80211_frame *wh, struct iwm_tx_cmd *tx) + struct mbuf *m, struct iwm_tx_cmd *tx) { - struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni = &in->in_ni; + struct ieee80211_frame *wh; + const struct ieee80211_txparam *tp = ni->ni_txparms; const struct iwm_rate *rinfo; - int type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - int ridx, rate_flags; + int type; + int ridx, rate_flags, i; + + wh = mtod(m, struct ieee80211_frame *); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; tx->rts_retry_limit = IWM_RTS_DFAULT_RETRY_LIMIT; tx->data_retry_limit = IWM_DEFAULT_TX_RETRY; - /* - * XXX TODO: everything about the rate selection here is terrible! - */ - - if (type == IEEE80211_FC0_TYPE_DATA) { - int i; + if (type == IEEE80211_FC0_TYPE_MGT) { + i = iwm_tx_rateidx_lookup(sc, in, tp->mgmtrate); + ridx = in->in_ridx[i]; + } else if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { + i = iwm_tx_rateidx_lookup(sc, in, tp->mcastrate); + ridx = in->in_ridx[i]; + } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { + i = iwm_tx_rateidx_lookup(sc, in, tp->ucastrate); + ridx = in->in_ridx[i]; + } else if (m->m_flags & M_EAPOL) { + i = iwm_tx_rateidx_lookup(sc, in, tp->mgmtrate); + ridx = in->in_ridx[i]; + } else { /* for data frames, use RS table */ + /* XXX pass pktlen */ (void) ieee80211_ratectl_rate(ni, NULL, 0); i = iwm_tx_rateidx_lookup(sc, in, ni->ni_txrate); ridx = in->in_ridx[i]; @@ -3225,28 +3237,6 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TXRATE, "%s: start with i=%d, txrate %d\n", __func__, i, iwm_rates[ridx].rate); - } else { - /* - * For non-data, use the lowest supported rate for the given - * operational mode. - * - * Note: there may not be any rate control information available. - * This driver currently assumes if we're transmitting data - * frames, use the rate control table. Grr. - * - * XXX TODO: use the configured rate for the traffic type! - * XXX TODO: this should be per-vap, not curmode; as we later - * on we'll want to handle off-channel stuff (eg TDLS). - */ - if (ic->ic_curmode == IEEE80211_MODE_11A) { - /* - * XXX this assumes the mode is either 11a or not 11a; - * definitely won't work for 11n. - */ - ridx = IWM_RIDX_OFDM; - } else { - ridx = IWM_RIDX_CCK; - } } rinfo = &iwm_rates[ridx]; @@ -3308,7 +3298,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf tx = (void *)cmd->data; memset(tx, 0, sizeof(*tx)); - rinfo = iwm_tx_fill_cmd(sc, in, wh, tx); + rinfo = iwm_tx_fill_cmd(sc, in, m, tx); /* Encrypt the frame if need be. */ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { From owner-svn-src-all@freebsd.org Wed Sep 21 21:23:10 2016 Return-Path: Delivered-To: svn-src-all@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 E373FBE3540; Wed, 21 Sep 2016 21:23:10 +0000 (UTC) (envelope-from bdrewery@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 B3A8632F; Wed, 21 Sep 2016 21:23:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LLN9C8053589; Wed, 21 Sep 2016 21:23:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LLN9ST053588; Wed, 21 Sep 2016 21:23:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201609212123.u8LLN9ST053588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Sep 2016 21:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306143 - releng/11.0/share/mk X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 21:23:11 -0000 Author: bdrewery Date: Wed Sep 21 21:23:09 2016 New Revision: 306143 URL: https://svnweb.freebsd.org/changeset/base/306143 Log: Disable SYSTEM_COMPILER by default. This is a direct commit to releng/11.0. Having it enabled can lead to a situation where building on one system and installing on another will fail due to not finding cc in the OBJDIR. An actual fix will be made on head separately. PR: 212877 Relnotes: yes Sponsored by: Dell EMC Isilon Approved by: re (gjb) Modified: releng/11.0/share/mk/src.opts.mk Modified: releng/11.0/share/mk/src.opts.mk ============================================================================== --- releng/11.0/share/mk/src.opts.mk Wed Sep 21 20:56:10 2016 (r306142) +++ releng/11.0/share/mk/src.opts.mk Wed Sep 21 21:23:09 2016 (r306143) @@ -158,7 +158,6 @@ __DEFAULT_YES_OPTIONS = \ SOURCELESS_UCODE \ SVNLITE \ SYSCONS \ - SYSTEM_COMPILER \ TALK \ TCP_WRAPPERS \ TCSH \ @@ -190,6 +189,7 @@ __DEFAULT_NO_OPTIONS = \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ + SYSTEM_COMPILER # From owner-svn-src-all@freebsd.org Wed Sep 21 21:30:47 2016 Return-Path: Delivered-To: svn-src-all@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 83BF0BE3D65; Wed, 21 Sep 2016 21:30:47 +0000 (UTC) (envelope-from bdrewery@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 3687EAE3; Wed, 21 Sep 2016 21:30:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LLUkx9054011; Wed, 21 Sep 2016 21:30:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LLUkNO054010; Wed, 21 Sep 2016 21:30:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201609212130.u8LLUkNO054010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Sep 2016 21:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306144 - releng/11.0/share/man/man5 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 21:30:47 -0000 Author: bdrewery Date: Wed Sep 21 21:30:46 2016 New Revision: 306144 URL: https://svnweb.freebsd.org/changeset/base/306144 Log: Regenerate. Approved by: re (gjb, implicit) Modified: releng/11.0/share/man/man5/src.conf.5 Modified: releng/11.0/share/man/man5/src.conf.5 ============================================================================== --- releng/11.0/share/man/man5/src.conf.5 Wed Sep 21 21:23:09 2016 (r306143) +++ releng/11.0/share/man/man5/src.conf.5 Wed Sep 21 21:30:46 2016 (r306144) @@ -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: releng/11.0/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd June 28, 2016 +.Dd September 21, 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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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,20 @@ 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: releng/11.0/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: releng/11.0/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: releng/11.0/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. .It Va WITHOUT_CASPER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd +.\" from FreeBSD: releng/11.0/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: releng/11.0/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 +306,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: releng/11.0/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: releng/11.0/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 +322,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: releng/11.0/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 +336,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: releng/11.0/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: releng/11.0/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 +351,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +384,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: releng/11.0/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 +394,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: releng/11.0/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: releng/11.0/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 +424,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: releng/11.0/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 +448,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +484,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: releng/11.0/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: releng/11.0/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: releng/11.0/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. @@ -536,10 +536,6 @@ When set, it also enforces the following When set, the following options are also in effect: .Pp .Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) .It Va WITH_AUTO_OBJ (unless .Va WITHOUT_AUTO_OBJ @@ -571,7 +567,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: releng/11.0/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 +578,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +626,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +704,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +743,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -785,27 +781,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +809,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: releng/11.0/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 +818,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: releng/11.0/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 +828,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +847,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: releng/11.0/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 +857,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +896,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: releng/11.0/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 +904,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: releng/11.0/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: releng/11.0/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 +924,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: releng/11.0/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: releng/11.0/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 +940,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -976,63 +972,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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +1041,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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +1062,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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +1083,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: releng/11.0/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 @@ -1141,33 +1137,25 @@ to .Pp Currently this also enforces .Va WITHOUT_SYSTEM_COMPILER . -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) -.El .Pp This must be set in the environment, make command line, or .Pa /etc/src-env.conf , 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: releng/11.0/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: releng/11.0/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: releng/11.0/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: releng/11.0/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 +1169,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: releng/11.0/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: releng/11.0/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 +1182,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: releng/11.0/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: releng/11.0/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Sep 21 21:32:06 2016 Return-Path: Delivered-To: svn-src-all@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 7416CBE4005; Wed, 21 Sep 2016 21:32:06 +0000 (UTC) (envelope-from bdrewery@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 46F6DF05; Wed, 21 Sep 2016 21:32:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LLW5ID057377; Wed, 21 Sep 2016 21:32:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LLW5xR057376; Wed, 21 Sep 2016 21:32:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201609212132.u8LLW5xR057376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Sep 2016 21:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306145 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 21:32:06 -0000 Author: bdrewery Date: Wed Sep 21 21:32:05 2016 New Revision: 306145 URL: https://svnweb.freebsd.org/changeset/base/306145 Log: SYSTEM_COMPILER is not forced off with META_MODE after r304682. Sponsored by: Dell EMC Isilon Modified: head/tools/build/options/WITH_META_MODE Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Wed Sep 21 21:30:46 2016 (r306144) +++ head/tools/build/options/WITH_META_MODE Wed Sep 21 21:32:05 2016 (r306145) @@ -49,6 +49,3 @@ The build operates as it normally would This option originally invoked a different build system but that was renamed to .Va WITH_DIRDEPS_BUILD . -.Pp -Currently this also enforces -.Va WITHOUT_SYSTEM_COMPILER . From owner-svn-src-all@freebsd.org Wed Sep 21 21:42:07 2016 Return-Path: Delivered-To: svn-src-all@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 CDB30BE4A2E; Wed, 21 Sep 2016 21:42:07 +0000 (UTC) (envelope-from bdrewery@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 9FFD0A15; Wed, 21 Sep 2016 21:42:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LLg6fd061286; Wed, 21 Sep 2016 21:42:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LLg6s1061285; Wed, 21 Sep 2016 21:42:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201609212142.u8LLg6s1061285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Sep 2016 21:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306146 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 21:42:07 -0000 Author: bdrewery Date: Wed Sep 21 21:42:06 2016 New Revision: 306146 URL: https://svnweb.freebsd.org/changeset/base/306146 Log: Regenerate. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Sep 21 21:32:05 2016 (r306145) +++ head/share/man/man5/src.conf.5 Wed Sep 21 21:42:06 2016 (r306146) @@ -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 .\" $FreeBSD$ -.Dd September 18, 2016 +.Dd September 21, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1089,7 +1089,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: head/tools/build/options/WITH_META_MODE 306145 2016-09-21 21:32:05Z bdrewery Creates .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1141,9 +1141,6 @@ This option originally invoked a differe to .Va WITH_DIRDEPS_BUILD . .Pp -Currently this also enforces -.Va WITHOUT_SYSTEM_COMPILER . -.Pp This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not From owner-svn-src-all@freebsd.org Wed Sep 21 22:09:18 2016 Return-Path: Delivered-To: svn-src-all@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 656C6BE4242; Wed, 21 Sep 2016 22:09:18 +0000 (UTC) (envelope-from jhibbits@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 38331B91; Wed, 21 Sep 2016 22:09:18 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LM9HDN069282; Wed, 21 Sep 2016 22:09:17 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LM9H3Q069281; Wed, 21 Sep 2016 22:09:17 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609212209.u8LM9H3Q069281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 21 Sep 2016 22:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306147 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 22:09:18 -0000 Author: jhibbits Date: Wed Sep 21 22:09:17 2016 New Revision: 306147 URL: https://svnweb.freebsd.org/changeset/base/306147 Log: Revert part of r306065 This is a separate change I was testing. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 21:42:06 2016 (r306146) +++ head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 22:09:17 2016 (r306147) @@ -99,7 +99,6 @@ ofw_restore_trap_vec(char *restore_trap_ /* * Saved SPRG0-3 from OpenFirmware. Will be restored prior to the callback. */ -#ifndef __powerpc64__ register_t ofw_sprg0_save; static __inline void @@ -141,8 +140,6 @@ ofw_sprg_restore(void) } #endif -#endif - static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) { @@ -347,12 +344,11 @@ OF_initial_setup(void *fdt_ptr, void *ju ofmsr[0] = mfmsr(); #ifdef __powerpc64__ ofmsr[0] &= ~PSL_SF; - #else + #endif __asm __volatile("mfsprg0 %0" : "=&r"(ofmsr[1])); __asm __volatile("mfsprg1 %0" : "=&r"(ofmsr[2])); __asm __volatile("mfsprg2 %0" : "=&r"(ofmsr[3])); __asm __volatile("mfsprg3 %0" : "=&r"(ofmsr[4])); - #endif openfirmware_entry = openfirm; if (ofmsr[0] & PSL_DR) @@ -444,9 +440,7 @@ openfirmware_core(void *args) */ oldmsr = intr_disable(); -#ifndef __powerpc64__ ofw_sprg_prepare(); -#endif /* Save trap vectors */ ofw_save_trap_vec(save_trap_of); @@ -469,9 +463,7 @@ openfirmware_core(void *args) /* Restore trap vecotrs */ ofw_restore_trap_vec(save_trap_of); -#ifndef __powerpc64__ ofw_sprg_restore(); -#endif intr_restore(oldmsr); From owner-svn-src-all@freebsd.org Wed Sep 21 22:53:17 2016 Return-Path: Delivered-To: svn-src-all@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 EE067BE3EA6; Wed, 21 Sep 2016 22:53:17 +0000 (UTC) (envelope-from jpaetzel@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 C091C840; Wed, 21 Sep 2016 22:53:17 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8LMrHTx087481; Wed, 21 Sep 2016 22:53:17 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8LMrG5w087477; Wed, 21 Sep 2016 22:53:16 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201609212253.u8LMrG5w087477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Wed, 21 Sep 2016 22:53:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306148 - head/sys/dev/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 22:53:18 -0000 Author: jpaetzel Date: Wed Sep 21 22:53:16 2016 New Revision: 306148 URL: https://svnweb.freebsd.org/changeset/base/306148 Log: Update oce driver to 11.0.50.0 Submitted by: Venkat Duvvuru Modified: head/sys/dev/oce/oce_hw.c head/sys/dev/oce/oce_hw.h head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/oce/oce_mbox.c head/sys/dev/oce/oce_queue.c head/sys/dev/oce/oce_sysctl.c Modified: head/sys/dev/oce/oce_hw.c ============================================================================== --- head/sys/dev/oce/oce_hw.c Wed Sep 21 22:09:17 2016 (r306147) +++ head/sys/dev/oce/oce_hw.c Wed Sep 21 22:53:16 2016 (r306148) @@ -393,6 +393,11 @@ oce_create_nw_interface(POCE_SOFTC sc) if (IS_SH(sc) || IS_XE201(sc)) capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; + if (sc->enable_hwlro) { + capab_flags |= MBX_RX_IFACE_FLAGS_LRO; + capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO; + } + /* enable capabilities controlled via driver startup parameters */ if (is_rss_enabled(sc)) capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; Modified: head/sys/dev/oce/oce_hw.h ============================================================================== --- head/sys/dev/oce/oce_hw.h Wed Sep 21 22:09:17 2016 (r306147) +++ head/sys/dev/oce/oce_hw.h Wed Sep 21 22:53:16 2016 (r306148) @@ -111,6 +111,9 @@ #define PD_MPU_MBOX_DB 0x0160 #define PD_MQ_DB 0x0140 +#define DB_OFFSET 0xc0 +#define DB_LRO_RQ_ID_MASK 0x7FF + /* EQE completion types */ #define EQ_MINOR_CODE_COMPLETION 0x00 #define EQ_MINOR_CODE_OTHER 0x01 @@ -180,6 +183,7 @@ #define ASYNC_EVENT_GRP5 0x5 #define ASYNC_EVENT_CODE_DEBUG 0x6 #define ASYNC_EVENT_PVID_STATE 0x3 +#define ASYNC_EVENT_OS2BMC 0x5 #define ASYNC_EVENT_DEBUG_QNQ 0x1 #define ASYNC_EVENT_CODE_SLIPORT 0x11 #define VLAN_VID_MASK 0x0FFF @@ -722,6 +726,34 @@ struct oce_async_cqe_link_state { } u0; }; +/* OS2BMC async event */ +struct oce_async_evt_grp5_os2bmc { + union { + struct { + uint32_t lrn_enable:1; + uint32_t lrn_disable:1; + uint32_t mgmt_enable:1; + uint32_t mgmt_disable:1; + uint32_t rsvd0:12; + uint32_t vlan_tag:16; + uint32_t arp_filter:1; + uint32_t dhcp_client_filt:1; + uint32_t dhcp_server_filt:1; + uint32_t net_bios_filt:1; + uint32_t rsvd1:3; + uint32_t bcast_filt:1; + uint32_t ipv6_nbr_filt:1; + uint32_t ipv6_ra_filt:1; + uint32_t ipv6_ras_filt:1; + uint32_t rsvd2[4]; + uint32_t mcast_filt:1; + uint32_t rsvd3:16; + uint32_t evt_tag; + uint32_t dword3; + } s; + uint32_t dword[4]; + } u; +}; /* PVID aync event */ struct oce_async_event_grp5_pvid_state { @@ -1396,7 +1428,7 @@ typedef union oce_cq_ctx_u { uint32_t dw5rsvd3:1; uint32_t eventable:1; /* dw6 */ - uint32_t eq_id:8; + uint32_t eq_id:16; uint32_t dw6rsvd1:15; uint32_t armed:1; /* dw7 */ @@ -2403,8 +2435,8 @@ struct oce_nic_hdr_wqe { uint32_t tcpcs:1; uint32_t udpcs:1; uint32_t ipcs:1; - uint32_t rsvd3:1; - uint32_t rsvd2:1; + uint32_t mgmt:1; + uint32_t lso6:1; uint32_t forward:1; uint32_t crc:1; uint32_t event:1; @@ -2426,8 +2458,8 @@ struct oce_nic_hdr_wqe { uint32_t event:1; uint32_t crc:1; uint32_t forward:1; - uint32_t rsvd2:1; - uint32_t rsvd3:1; + uint32_t lso6:1; + uint32_t mgmt:1; uint32_t ipcs:1; uint32_t udpcs:1; uint32_t tcpcs:1; @@ -3010,6 +3042,53 @@ struct oce_rxf_stats_v0 { uint32_t rsvd1[6]; }; +struct oce_port_rxf_stats_v2 { + uint32_t rsvd0[10]; + uint32_t roce_bytes_received_lsd; + uint32_t roce_bytes_received_msd; + uint32_t rsvd1[5]; + uint32_t roce_frames_received; + uint32_t rx_crc_errors; + uint32_t rx_alignment_symbol_errors; + uint32_t rx_pause_frames; + uint32_t rx_priority_pause_frames; + uint32_t rx_control_frames; + uint32_t rx_in_range_errors; + uint32_t rx_out_range_errors; + uint32_t rx_frame_too_long; + uint32_t rx_address_match_errors; + uint32_t rx_dropped_too_small; + uint32_t rx_dropped_too_short; + uint32_t rx_dropped_header_too_small; + uint32_t rx_dropped_tcp_length; + uint32_t rx_dropped_runt; + uint32_t rsvd2[10]; + uint32_t rx_ip_checksum_errs; + uint32_t rx_tcp_checksum_errs; + uint32_t rx_udp_checksum_errs; + uint32_t rsvd3[7]; + uint32_t rx_switched_unicast_packets; + uint32_t rx_switched_multicast_packets; + uint32_t rx_switched_broadcast_packets; + uint32_t rsvd4[3]; + uint32_t tx_pauseframes; + uint32_t tx_priority_pauseframes; + uint32_t tx_controlframes; + uint32_t rsvd5[10]; + uint32_t rxpp_fifo_overflow_drop; + uint32_t rx_input_fifo_overflow_drop; + uint32_t pmem_fifo_overflow_drop; + uint32_t jabber_events; + uint32_t rsvd6[3]; + uint32_t rx_drops_payload_size; + uint32_t rx_drops_clipped_header; + uint32_t rx_drops_crc; + uint32_t roce_drops_payload_len; + uint32_t roce_drops_crc; + uint32_t rsvd7[19]; +}; + + struct oce_port_rxf_stats_v1 { uint32_t rsvd0[12]; uint32_t rx_crc_errors; @@ -3046,6 +3125,20 @@ struct oce_port_rxf_stats_v1 { uint32_t rsvd5[3]; }; +struct oce_rxf_stats_v2 { + struct oce_port_rxf_stats_v2 port[4]; + uint32_t rsvd0[2]; + uint32_t rx_drops_no_pbuf; + uint32_t rx_drops_no_txpb; + uint32_t rx_drops_no_erx_descr; + uint32_t rx_drops_no_tpre_descr; + uint32_t rsvd1[6]; + uint32_t rx_drops_too_many_frags; + uint32_t rx_drops_invalid_ring; + uint32_t forwarded_packets; + uint32_t rx_drops_mtu; + uint32_t rsvd2[35]; +}; struct oce_rxf_stats_v1 { struct oce_port_rxf_stats_v1 port[4]; @@ -3062,6 +3155,11 @@ struct oce_rxf_stats_v1 { uint32_t rsvd2[14]; }; +struct oce_erx_stats_v2 { + uint32_t rx_drops_no_fragments[136]; + uint32_t rsvd[3]; +}; + struct oce_erx_stats_v1 { uint32_t rx_drops_no_fragments[68]; uint32_t rsvd[4]; @@ -3078,6 +3176,15 @@ struct oce_pmem_stats { uint32_t rsvd[5]; }; +struct oce_hw_stats_v2 { + struct oce_rxf_stats_v2 rxf; + uint32_t rsvd0[OCE_TXP_SW_SZ]; + struct oce_erx_stats_v2 erx; + struct oce_pmem_stats pmem; + uint32_t rsvd1[18]; +}; + + struct oce_hw_stats_v1 { struct oce_rxf_stats_v1 rxf; uint32_t rsvd0[OCE_TXP_SW_SZ]; @@ -3093,32 +3200,22 @@ struct oce_hw_stats_v0 { struct oce_pmem_stats pmem; }; -struct mbx_get_nic_stats_v0 { - struct mbx_hdr hdr; - union { - struct { - uint32_t rsvd0; - } req; - - union { - struct oce_hw_stats_v0 stats; - } rsp; - } params; -}; - -struct mbx_get_nic_stats { - struct mbx_hdr hdr; - union { - struct { - uint32_t rsvd0; - } req; - - struct { - struct oce_hw_stats_v1 stats; - } rsp; - } params; -}; - +#define MBX_GET_NIC_STATS(version) \ + struct mbx_get_nic_stats_v##version { \ + struct mbx_hdr hdr; \ + union { \ + struct { \ + uint32_t rsvd0; \ + } req; \ + union { \ + struct oce_hw_stats_v##version stats; \ + } rsp; \ + } params; \ +} + +MBX_GET_NIC_STATS(0); +MBX_GET_NIC_STATS(1); +MBX_GET_NIC_STATS(2); /* [18(0x12)] NIC_GET_PPORT_STATS */ struct pport_stats { @@ -3728,3 +3825,373 @@ enum OCE_QUEUE_RX_STATS { QUEUE_RX_BUFFER_ERRORS = 8, QUEUE_RX_N_WORDS = 10 }; + +/* HW LRO structures */ +struct mbx_nic_query_lro_capabilities { + struct mbx_hdr hdr; + union { + struct { + uint32_t rsvd[6]; + } req; + struct { +#ifdef _BIG_ENDIAN + uint32_t lro_flags; + uint16_t lro_rq_cnt; + uint16_t plro_max_offload; + uint32_t rsvd[4]; +#else + uint32_t lro_flags; + uint16_t plro_max_offload; + uint16_t lro_rq_cnt; + uint32_t rsvd[4]; +#endif + } rsp; + } params; +}; + +struct mbx_nic_set_iface_lro_config { + struct mbx_hdr hdr; + union { + struct { +#ifdef _BIG_ENDIAN + uint32_t lro_flags; + uint32_t iface_id; + uint32_t max_clsc_byte_cnt; + uint32_t max_clsc_seg_cnt; + uint32_t max_clsc_usec_delay; + uint32_t min_clsc_frame_byte_cnt; + uint32_t rsvd[2]; +#else + uint32_t lro_flags; + uint32_t iface_id; + uint32_t max_clsc_byte_cnt; + uint32_t max_clsc_seg_cnt; + uint32_t max_clsc_usec_delay; + uint32_t min_clsc_frame_byte_cnt; + uint32_t rsvd[2]; +#endif + } req; + struct { +#ifdef _BIG_ENDIAN + uint32_t lro_flags; + uint32_t rsvd[7]; +#else + uint32_t lro_flags; + uint32_t rsvd[7]; +#endif + } rsp; + } params; +}; + + +struct mbx_create_nic_rq_v2 { + struct mbx_hdr hdr; + union { + struct { +#ifdef _BIG_ENDIAN + uint8_t num_pages; + uint8_t frag_size; + uint16_t cq_id; + + uint32_t if_id; + + uint16_t page_size; + uint16_t max_frame_size; + + uint16_t rsvd; + uint16_t pd_id; + + uint16_t rsvd1; + uint16_t rq_flags; + + uint16_t hds_fixed_offset; + uint8_t hds_start; + uint8_t hds_frag; + + uint16_t hds_backfill_size; + uint16_t hds_frag_size; + + uint32_t rbq_id; + + uint32_t rsvd2[8]; + + struct phys_addr pages[2]; +#else + uint16_t cq_id; + uint8_t frag_size; + uint8_t num_pages; + + uint32_t if_id; + + uint16_t max_frame_size; + uint16_t page_size; + + uint16_t pd_id; + uint16_t rsvd; + + uint16_t rq_flags; + uint16_t rsvd1; + + uint8_t hds_frag; + uint8_t hds_start; + uint16_t hds_fixed_offset; + + uint16_t hds_frag_size; + uint16_t hds_backfill_size; + + uint32_t rbq_id; + + uint32_t rsvd2[8]; + + struct phys_addr pages[2]; +#endif + } req; + struct { +#ifdef _BIG_ENDIAN + uint8_t rsvd0; + uint8_t rss_cpuid; + uint16_t rq_id; + + uint8_t db_format; + uint8_t db_reg_set; + uint16_t rsvd1; + + uint32_t db_offset; + + uint32_t rsvd2; + + uint16_t rsvd3; + uint16_t rq_flags; + +#else + uint16_t rq_id; + uint8_t rss_cpuid; + uint8_t rsvd0; + + uint16_t rsvd1; + uint8_t db_reg_set; + uint8_t db_format; + + uint32_t db_offset; + + uint32_t rsvd2; + + uint16_t rq_flags; + uint16_t rsvd3; +#endif + } rsp; + + } params; +}; + +struct mbx_delete_nic_rq_v1 { + struct mbx_hdr hdr; + union { + struct { +#ifdef _BIG_ENDIAN + uint16_t bypass_flush; + uint16_t rq_id; + uint16_t rsvd; + uint16_t rq_flags; +#else + uint16_t rq_id; + uint16_t bypass_flush; + uint16_t rq_flags; + uint16_t rsvd; +#endif + } req; + struct { + uint32_t rsvd[2]; + } rsp; + } params; +}; + +struct nic_hwlro_singleton_cqe { +#ifdef _BIG_ENDIAN + /* dw 0 */ + uint32_t ip_opt:1; + uint32_t vtp:1; + uint32_t pkt_size:14; + uint32_t vlan_tag:16; + + /* dw 1 */ + uint32_t num_frags:3; + uint32_t rsvd1:3; + uint32_t frag_index:10; + uint32_t rsvd:8; + uint32_t ipv6_frame:1; + uint32_t l4_cksum_pass:1; + uint32_t ip_cksum_pass:1; + uint32_t udpframe:1; + uint32_t tcpframe:1; + uint32_t ipframe:1; + uint32_t rss_hp:1; + uint32_t error:1; + + /* dw 2 */ + uint32_t valid:1; + uint32_t cqe_type:2; + uint32_t debug:7; + uint32_t rsvd4:6; + uint32_t data_offset:8; + uint32_t rsvd3:3; + uint32_t rss_bank:1; + uint32_t qnq:1; + uint32_t rsvd2:3; + + /* dw 3 */ + uint32_t rss_hash_value; +#else + /* dw 0 */ + uint32_t vlan_tag:16; + uint32_t pkt_size:14; + uint32_t vtp:1; + uint32_t ip_opt:1; + + /* dw 1 */ + uint32_t error:1; + uint32_t rss_hp:1; + uint32_t ipframe:1; + uint32_t tcpframe:1; + uint32_t udpframe:1; + uint32_t ip_cksum_pass:1; + uint32_t l4_cksum_pass:1; + uint32_t ipv6_frame:1; + uint32_t rsvd:8; + uint32_t frag_index:10; + uint32_t rsvd1:3; + uint32_t num_frags:3; + + /* dw 2 */ + uint32_t rsvd2:3; + uint32_t qnq:1; + uint32_t rss_bank:1; + uint32_t rsvd3:3; + uint32_t data_offset:8; + uint32_t rsvd4:6; + uint32_t debug:7; + uint32_t cqe_type:2; + uint32_t valid:1; + + /* dw 3 */ + uint32_t rss_hash_value; +#endif +}; + +struct nic_hwlro_cqe_part1 { +#ifdef _BIG_ENDIAN + /* dw 0 */ + uint32_t tcp_timestamp_val; + + /* dw 1 */ + uint32_t tcp_timestamp_ecr; + + /* dw 2 */ + uint32_t valid:1; + uint32_t cqe_type:2; + uint32_t rsvd3:7; + uint32_t rss_policy:4; + uint32_t rsvd2:2; + uint32_t data_offset:8; + uint32_t rsvd1:1; + uint32_t lro_desc:1; + uint32_t lro_timer_pop:1; + uint32_t rss_bank:1; + uint32_t qnq:1; + uint32_t rsvd:2; + uint32_t rss_flush:1; + + /* dw 3 */ + uint32_t rss_hash_value; +#else + /* dw 0 */ + uint32_t tcp_timestamp_val; + + /* dw 1 */ + uint32_t tcp_timestamp_ecr; + + /* dw 2 */ + uint32_t rss_flush:1; + uint32_t rsvd:2; + uint32_t qnq:1; + uint32_t rss_bank:1; + uint32_t lro_timer_pop:1; + uint32_t lro_desc:1; + uint32_t rsvd1:1; + uint32_t data_offset:8; + uint32_t rsvd2:2; + uint32_t rss_policy:4; + uint32_t rsvd3:7; + uint32_t cqe_type:2; + uint32_t valid:1; + + /* dw 3 */ + uint32_t rss_hash_value; +#endif +}; + +struct nic_hwlro_cqe_part2 { +#ifdef _BIG_ENDIAN + /* dw 0 */ + uint32_t ip_opt:1; + uint32_t vtp:1; + uint32_t pkt_size:14; + uint32_t vlan_tag:16; + + /* dw 1 */ + uint32_t tcp_window:16; + uint32_t coalesced_size:16; + + /* dw 2 */ + uint32_t valid:1; + uint32_t cqe_type:2; + uint32_t rsvd:2; + uint32_t push:1; + uint32_t ts_opt:1; + uint32_t threshold:1; + uint32_t seg_cnt:8; + uint32_t frame_lifespan:8; + uint32_t ipv6_frame:1; + uint32_t l4_cksum_pass:1; + uint32_t ip_cksum_pass:1; + uint32_t udpframe:1; + uint32_t tcpframe:1; + uint32_t ipframe:1; + uint32_t rss_hp:1; + uint32_t error:1; + + /* dw 3 */ + uint32_t tcp_ack_num; +#else + /* dw 0 */ + uint32_t vlan_tag:16; + uint32_t pkt_size:14; + uint32_t vtp:1; + uint32_t ip_opt:1; + + /* dw 1 */ + uint32_t coalesced_size:16; + uint32_t tcp_window:16; + + /* dw 2 */ + uint32_t error:1; + uint32_t rss_hp:1; + uint32_t ipframe:1; + uint32_t tcpframe:1; + uint32_t udpframe:1; + uint32_t ip_cksum_pass:1; + uint32_t l4_cksum_pass:1; + uint32_t ipv6_frame:1; + uint32_t frame_lifespan:8; + uint32_t seg_cnt:8; + uint32_t threshold:1; + uint32_t ts_opt:1; + uint32_t push:1; + uint32_t rsvd:2; + uint32_t cqe_type:2; + uint32_t valid:1; + + /* dw 3 */ + uint32_t tcp_ack_num; +#endif +}; Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Wed Sep 21 22:09:17 2016 (r306147) +++ head/sys/dev/oce/oce_if.c Wed Sep 21 22:53:16 2016 (r306148) @@ -42,77 +42,92 @@ #include "opt_inet.h" #include "oce_if.h" +#include "oce_user.h" + +#define is_tso_pkt(m) (m->m_pkthdr.csum_flags & CSUM_TSO) /* UE Status Low CSR */ static char *ue_status_low_desc[] = { - "CEV", - "CTX", - "DBUF", - "ERX", - "Host", - "MPU", - "NDMA", - "PTC ", - "RDMA ", - "RXF ", - "RXIPS ", - "RXULP0 ", - "RXULP1 ", - "RXULP2 ", - "TIM ", - "TPOST ", - "TPRE ", - "TXIPS ", - "TXULP0 ", - "TXULP1 ", - "UC ", - "WDMA ", - "TXULP2 ", - "HOST1 ", - "P0_OB_LINK ", - "P1_OB_LINK ", - "HOST_GPIO ", - "MBOX ", - "AXGMAC0", - "AXGMAC1", - "JTAG", - "MPU_INTPEND" + "CEV", + "CTX", + "DBUF", + "ERX", + "Host", + "MPU", + "NDMA", + "PTC ", + "RDMA ", + "RXF ", + "RXIPS ", + "RXULP0 ", + "RXULP1 ", + "RXULP2 ", + "TIM ", + "TPOST ", + "TPRE ", + "TXIPS ", + "TXULP0 ", + "TXULP1 ", + "UC ", + "WDMA ", + "TXULP2 ", + "HOST1 ", + "P0_OB_LINK ", + "P1_OB_LINK ", + "HOST_GPIO ", + "MBOX ", + "AXGMAC0", + "AXGMAC1", + "JTAG", + "MPU_INTPEND" }; /* UE Status High CSR */ static char *ue_status_hi_desc[] = { - "LPCMEMHOST", - "MGMT_MAC", - "PCS0ONLINE", - "MPU_IRAM", - "PCS1ONLINE", - "PCTL0", - "PCTL1", - "PMEM", - "RR", - "TXPB", - "RXPP", - "XAUI", - "TXP", - "ARM", - "IPC", - "HOST2", - "HOST3", - "HOST4", - "HOST5", - "HOST6", - "HOST7", - "HOST8", - "HOST9", - "NETC", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown" + "LPCMEMHOST", + "MGMT_MAC", + "PCS0ONLINE", + "MPU_IRAM", + "PCS1ONLINE", + "PCTL0", + "PCTL1", + "PMEM", + "RR", + "TXPB", + "RXPP", + "XAUI", + "TXP", + "ARM", + "IPC", + "HOST2", + "HOST3", + "HOST4", + "HOST5", + "HOST6", + "HOST7", + "HOST8", + "HOST9", + "NETC", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown" +}; + +struct oce_common_cqe_info{ + uint8_t vtp:1; + uint8_t l4_cksum_pass:1; + uint8_t ip_cksum_pass:1; + uint8_t ipv6_frame:1; + uint8_t qnq:1; + uint8_t rsvd:3; + uint8_t num_frags; + uint16_t pkt_size; + uint16_t vtag; }; @@ -140,17 +155,19 @@ static int oce_media_change(struct ifne /* Transmit routines prototypes */ static int oce_tx(POCE_SOFTC sc, struct mbuf **mpp, int wq_index); static void oce_tx_restart(POCE_SOFTC sc, struct oce_wq *wq); -static void oce_tx_complete(struct oce_wq *wq, uint32_t wqe_idx, - uint32_t status); +static void oce_process_tx_completion(struct oce_wq *wq); static int oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq); /* Receive routines prototypes */ -static void oce_discard_rx_comp(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); static int oce_cqe_vtp_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); static int oce_cqe_portid_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); -static void oce_rx(struct oce_rq *rq, uint32_t rqe_idx, - struct oce_nic_rx_cqe *cqe); +static void oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); +static void oce_check_rx_bufs(POCE_SOFTC sc, uint32_t num_cqes, struct oce_rq *rq); +static uint16_t oce_rq_handler_lro(void *arg); +static void oce_correct_header(struct mbuf *m, struct nic_hwlro_cqe_part1 *cqe1, struct nic_hwlro_cqe_part2 *cqe2); +static void oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singleton_cqe *cqe, struct nic_hwlro_cqe_part2 *cqe2); +static void oce_rx_mbuf_chain(struct oce_rq *rq, struct oce_common_cqe_info *cqe_info, struct mbuf **m); /* Helper function prototypes in this file */ static int oce_attach_ifp(POCE_SOFTC sc); @@ -169,11 +186,12 @@ static void process_link_state(POCE_SOFT static int oce_tx_asic_stall_verify(POCE_SOFTC sc, struct mbuf *m); static void oce_get_config(POCE_SOFTC sc); static struct mbuf *oce_insert_vlan_tag(POCE_SOFTC sc, struct mbuf *m, boolean_t *complete); +static void oce_read_env_variables(POCE_SOFTC sc); + /* IP specific */ #if defined(INET6) || defined(INET) static int oce_init_lro(POCE_SOFTC sc); -static void oce_rx_flush_lro(struct oce_rq *rq); static struct mbuf * oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp); #endif @@ -206,7 +224,7 @@ const char component_revision[32] = {"// /* Module capabilites and parameters */ uint32_t oce_max_rsp_handled = OCE_MAX_RSP_HANDLED; uint32_t oce_enable_rss = OCE_MODCAP_RSS; - +uint32_t oce_rq_buf_size = 2048; TUNABLE_INT("hw.oce.max_rsp_handled", &oce_max_rsp_handled); TUNABLE_INT("hw.oce.enable_rss", &oce_enable_rss); @@ -222,8 +240,10 @@ static uint32_t supportedDevices[] = { (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_SH }; +POCE_SOFTC softc_head = NULL; +POCE_SOFTC softc_tail = NULL; - +struct oce_rdma_if *oce_rdma_if = NULL; /***************************************************************************** * Driver entry points functions * @@ -292,7 +312,8 @@ oce_attach(device_t dev) sc->tx_ring_size = OCE_TX_RING_SIZE; sc->rx_ring_size = OCE_RX_RING_SIZE; - sc->rq_frag_size = OCE_RQ_BUF_SIZE; + /* receive fragment size should be multiple of 2K */ + sc->rq_frag_size = ((oce_rq_buf_size / 2048) * 2048); sc->flow_control = OCE_DEFAULT_FLOW_CONTROL; sc->promisc = OCE_DEFAULT_PROMISCUOUS; @@ -304,6 +325,8 @@ oce_attach(device_t dev) if (rc) goto pci_res_free; + oce_read_env_variables(sc); + oce_get_config(sc); setup_max_queues_want(sc); @@ -341,11 +364,19 @@ oce_attach(device_t dev) oce_add_sysctls(sc); - callout_init(&sc->timer, 1); + callout_init(&sc->timer, CALLOUT_MPSAFE); rc = callout_reset(&sc->timer, 2 * hz, oce_local_timer, sc); if (rc) goto stats_free; + sc->next =NULL; + if (softc_tail != NULL) { + softc_tail->next = sc; + } else { + softc_head = sc; + } + softc_tail = sc; + return 0; stats_free: @@ -383,6 +414,22 @@ static int oce_detach(device_t dev) { POCE_SOFTC sc = device_get_softc(dev); + POCE_SOFTC poce_sc_tmp, *ppoce_sc_tmp1, poce_sc_tmp2 = NULL; + + poce_sc_tmp = softc_head; + ppoce_sc_tmp1 = &softc_head; + while (poce_sc_tmp != NULL) { + if (poce_sc_tmp == sc) { + *ppoce_sc_tmp1 = sc->next; + if (sc->next == NULL) { + softc_tail = poce_sc_tmp2; + } + break; + } + poce_sc_tmp2 = poce_sc_tmp; + ppoce_sc_tmp1 = &poce_sc_tmp->next; + poce_sc_tmp = poce_sc_tmp->next; + } LOCK(&sc->dev_lock); oce_if_deactivate(sc); @@ -520,8 +567,16 @@ oce_ioctl(struct ifnet *ifp, u_long comm oce_vid_config(sc); } #if defined(INET6) || defined(INET) - if (u & IFCAP_LRO) + if (u & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; + if(sc->enable_hwlro) { + if(ifp->if_capenable & IFCAP_LRO) { + rc = oce_mbox_nic_set_iface_lro_config(sc, 1); + }else { + rc = oce_mbox_nic_set_iface_lro_config(sc, 0); + } + } + } #endif break; @@ -563,6 +618,9 @@ oce_multiq_start(struct ifnet *ifp, stru int queue_index = 0; int status = 0; + if (!sc->link_status) + return ENXIO; + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) queue_index = m->m_pkthdr.flowid % sc->nwqs; @@ -653,20 +711,41 @@ oce_setup_intr(POCE_SOFTC sc) { int rc = 0, use_intx = 0; int vector = 0, req_vectors = 0; + int tot_req_vectors, tot_vectors; if (is_rss_enabled(sc)) req_vectors = MAX((sc->nrqs - 1), sc->nwqs); else req_vectors = 1; - if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { + tot_req_vectors = req_vectors; + if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { + if (req_vectors > 1) { + tot_req_vectors += OCE_RDMA_VECTORS; + sc->roce_intr_count = OCE_RDMA_VECTORS; + } + } + + if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { sc->intr_count = req_vectors; - rc = pci_alloc_msix(sc->dev, &sc->intr_count); + tot_vectors = tot_req_vectors; + rc = pci_alloc_msix(sc->dev, &tot_vectors); if (rc != 0) { use_intx = 1; pci_release_msi(sc->dev); - } else - sc->flags |= OCE_FLAGS_USING_MSIX; + } else { + if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { + if (tot_vectors < tot_req_vectors) { + if (sc->intr_count < (2 * OCE_RDMA_VECTORS)) { + sc->roce_intr_count = (tot_vectors / 2); + } + sc->intr_count = tot_vectors - sc->roce_intr_count; + } + } else { + sc->intr_count = tot_vectors; + } + sc->flags |= OCE_FLAGS_USING_MSIX; + } } else use_intx = 1; @@ -854,6 +933,79 @@ oce_media_change(struct ifnet *ifp) } +static void oce_is_pkt_dest_bmc(POCE_SOFTC sc, + struct mbuf *m, boolean_t *os2bmc, + struct mbuf **m_new) +{ + struct ether_header *eh = NULL; + + eh = mtod(m, struct ether_header *); + + if (!is_os2bmc_enabled(sc) || *os2bmc) { + *os2bmc = FALSE; + goto done; + } + if (!ETHER_IS_MULTICAST(eh->ether_dhost)) + goto done; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 00:22:09 2016 Return-Path: Delivered-To: svn-src-all@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 D9214BE4367; Thu, 22 Sep 2016 00:22:09 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 8FAC5D7; Thu, 22 Sep 2016 00:22:09 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4778120494; Wed, 21 Sep 2016 20:22:08 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Wed, 21 Sep 2016 20:22:08 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=pwRsNlfJg0CE6RN FMK7sWm+i34k=; b=MIuqx4yB4HfkNThXALbqSKMDAUQbwxA3uUVjB1cjGReX9Y/ kio6oJYX8wxTH1Ez8EdrcCIEzgo9wSmUCo2esH3YgvRvmcROnXhrP3Qjntacvv7r 5Vh/HXsYggjwM0Yk4zbe+B005Qcqj+jz/k66Gacg+bYfuzV6ClKxXyQAGBvg= X-Sasl-enc: 1LnU8HbCt2tbaiYedVSchVP1UCOvdPGKgqX91n+s0/up 1474503726 Received: from [10.84.118.152] (unknown [166.170.222.172]) by mail.messagingengine.com (Postfix) with ESMTPA id 1FC3CF2985; Wed, 21 Sep 2016 20:22:06 -0400 (EDT) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306148 - head/sys/dev/oce From: Josh Paetzel X-Mailer: iPhone Mail (14A403) In-Reply-To: <201609212253.u8LMrG5w087477@repo.freebsd.org> Date: Wed, 21 Sep 2016 19:22:04 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <588B9AC7-CA4D-4680-A1D6-688C1D01F2C1@tcbug.org> References: <201609212253.u8LMrG5w087477@repo.freebsd.org> To: Josh Paetzel Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 00:22:09 -0000 I clearly did not commit what I tested. Jenkins is sending breakages that ha= ve missing headers in oce. It will be a few hours before I can look at this. Feel free to revert my com= mit. Thanks, Josh Paetzel > On Sep 21, 2016, at 5:53 PM, Josh Paetzel wrote: >=20 > Author: jpaetzel > Date: Wed Sep 21 22:53:16 2016 > New Revision: 306148 > URL: https://svnweb.freebsd.org/changeset/base/306148 >=20 > Log: > Update oce driver to 11.0.50.0 >=20 > Submitted by: Venkat Duvvuru >=20 > Modified: > head/sys/dev/oce/oce_hw.c > head/sys/dev/oce/oce_hw.h > head/sys/dev/oce/oce_if.c > head/sys/dev/oce/oce_if.h > head/sys/dev/oce/oce_mbox.c > head/sys/dev/oce/oce_queue.c > head/sys/dev/oce/oce_sysctl.c >=20 > Modified: head/sys/dev/oce/oce_hw.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/dev/oce/oce_hw.c Wed Sep 21 22:09:17 2016 (r306147) > +++ head/sys/dev/oce/oce_hw.c Wed Sep 21 22:53:16 2016 (r306148) > @@ -393,6 +393,11 @@ oce_create_nw_interface(POCE_SOFTC sc) > if (IS_SH(sc) || IS_XE201(sc)) > capab_flags |=3D MBX_RX_IFACE_FLAGS_MULTICAST; >=20 > + if (sc->enable_hwlro) { > + capab_flags |=3D MBX_RX_IFACE_FLAGS_LRO; > + capab_en_flags |=3D MBX_RX_IFACE_FLAGS_LRO; > + } > + > /* enable capabilities controlled via driver startup parameters */ > if (is_rss_enabled(sc)) > capab_en_flags |=3D MBX_RX_IFACE_FLAGS_RSS; >=20 > Modified: head/sys/dev/oce/oce_hw.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/dev/oce/oce_hw.h Wed Sep 21 22:09:17 2016 (r306147) > +++ head/sys/dev/oce/oce_hw.h Wed Sep 21 22:53:16 2016 (r306148) > @@ -111,6 +111,9 @@ > #define PD_MPU_MBOX_DB 0x0160 > #define PD_MQ_DB 0x0140 >=20 > +#define DB_OFFSET 0xc0 > +#define DB_LRO_RQ_ID_MASK 0x7FF > + > /* EQE completion types */ > #define EQ_MINOR_CODE_COMPLETION 0x00 > #define EQ_MINOR_CODE_OTHER 0x01 > @@ -180,6 +183,7 @@ > #define ASYNC_EVENT_GRP5 0x5 > #define ASYNC_EVENT_CODE_DEBUG 0x6 > #define ASYNC_EVENT_PVID_STATE 0x3 > +#define ASYNC_EVENT_OS2BMC 0x5 > #define ASYNC_EVENT_DEBUG_QNQ 0x1 > #define ASYNC_EVENT_CODE_SLIPORT 0x11 > #define VLAN_VID_MASK 0x0FFF > @@ -722,6 +726,34 @@ struct oce_async_cqe_link_state { > } u0; > }; >=20 > +/* OS2BMC async event */ > +struct oce_async_evt_grp5_os2bmc { > + union { > + struct { > + uint32_t lrn_enable:1; > + uint32_t lrn_disable:1; > + uint32_t mgmt_enable:1; > + uint32_t mgmt_disable:1; > + uint32_t rsvd0:12; > + uint32_t vlan_tag:16; > + uint32_t arp_filter:1; > + uint32_t dhcp_client_filt:1; > + uint32_t dhcp_server_filt:1; > + uint32_t net_bios_filt:1; > + uint32_t rsvd1:3; > + uint32_t bcast_filt:1; > + uint32_t ipv6_nbr_filt:1; > + uint32_t ipv6_ra_filt:1; > + uint32_t ipv6_ras_filt:1; > + uint32_t rsvd2[4]; > + uint32_t mcast_filt:1; > + uint32_t rsvd3:16; > + uint32_t evt_tag; > + uint32_t dword3; > + } s; > + uint32_t dword[4]; > + } u; > +}; >=20 > /* PVID aync event */ > struct oce_async_event_grp5_pvid_state { > @@ -1396,7 +1428,7 @@ typedef union oce_cq_ctx_u { > uint32_t dw5rsvd3:1; > uint32_t eventable:1; > /* dw6 */ > - uint32_t eq_id:8; > + uint32_t eq_id:16; > uint32_t dw6rsvd1:15; > uint32_t armed:1; > /* dw7 */ > @@ -2403,8 +2435,8 @@ struct oce_nic_hdr_wqe { > uint32_t tcpcs:1; > uint32_t udpcs:1; > uint32_t ipcs:1; > - uint32_t rsvd3:1; > - uint32_t rsvd2:1; > + uint32_t mgmt:1; > + uint32_t lso6:1; > uint32_t forward:1; > uint32_t crc:1; > uint32_t event:1; > @@ -2426,8 +2458,8 @@ struct oce_nic_hdr_wqe { > uint32_t event:1; > uint32_t crc:1; > uint32_t forward:1; > - uint32_t rsvd2:1; > - uint32_t rsvd3:1; > + uint32_t lso6:1; > + uint32_t mgmt:1; > uint32_t ipcs:1; > uint32_t udpcs:1; > uint32_t tcpcs:1; > @@ -3010,6 +3042,53 @@ struct oce_rxf_stats_v0 { > uint32_t rsvd1[6]; > }; >=20 > +struct oce_port_rxf_stats_v2 { > + uint32_t rsvd0[10]; > + uint32_t roce_bytes_received_lsd; > + uint32_t roce_bytes_received_msd; > + uint32_t rsvd1[5]; > + uint32_t roce_frames_received; > + uint32_t rx_crc_errors; > + uint32_t rx_alignment_symbol_errors; > + uint32_t rx_pause_frames; > + uint32_t rx_priority_pause_frames; > + uint32_t rx_control_frames; > + uint32_t rx_in_range_errors; > + uint32_t rx_out_range_errors; > + uint32_t rx_frame_too_long; > + uint32_t rx_address_match_errors; > + uint32_t rx_dropped_too_small; > + uint32_t rx_dropped_too_short; > + uint32_t rx_dropped_header_too_small; > + uint32_t rx_dropped_tcp_length; > + uint32_t rx_dropped_runt; > + uint32_t rsvd2[10]; > + uint32_t rx_ip_checksum_errs; > + uint32_t rx_tcp_checksum_errs; > + uint32_t rx_udp_checksum_errs; > + uint32_t rsvd3[7]; > + uint32_t rx_switched_unicast_packets; > + uint32_t rx_switched_multicast_packets; > + uint32_t rx_switched_broadcast_packets; > + uint32_t rsvd4[3]; > + uint32_t tx_pauseframes; > + uint32_t tx_priority_pauseframes; > + uint32_t tx_controlframes; > + uint32_t rsvd5[10]; > + uint32_t rxpp_fifo_overflow_drop; > + uint32_t rx_input_fifo_overflow_drop; > + uint32_t pmem_fifo_overflow_drop; > + uint32_t jabber_events; > + uint32_t rsvd6[3]; > + uint32_t rx_drops_payload_size; > + uint32_t rx_drops_clipped_header; > + uint32_t rx_drops_crc; > + uint32_t roce_drops_payload_len; > + uint32_t roce_drops_crc; > + uint32_t rsvd7[19]; > +}; > + > + > struct oce_port_rxf_stats_v1 { > uint32_t rsvd0[12]; > uint32_t rx_crc_errors; > @@ -3046,6 +3125,20 @@ struct oce_port_rxf_stats_v1 { > uint32_t rsvd5[3]; > }; >=20 > +struct oce_rxf_stats_v2 { > + struct oce_port_rxf_stats_v2 port[4]; > + uint32_t rsvd0[2]; > + uint32_t rx_drops_no_pbuf; > + uint32_t rx_drops_no_txpb; > + uint32_t rx_drops_no_erx_descr; > + uint32_t rx_drops_no_tpre_descr; > + uint32_t rsvd1[6]; > + uint32_t rx_drops_too_many_frags; > + uint32_t rx_drops_invalid_ring; > + uint32_t forwarded_packets; > + uint32_t rx_drops_mtu; > + uint32_t rsvd2[35]; > +}; >=20 > struct oce_rxf_stats_v1 { > struct oce_port_rxf_stats_v1 port[4]; > @@ -3062,6 +3155,11 @@ struct oce_rxf_stats_v1 { > uint32_t rsvd2[14]; > }; >=20 > +struct oce_erx_stats_v2 { > + uint32_t rx_drops_no_fragments[136]; > + uint32_t rsvd[3]; > +}; > + > struct oce_erx_stats_v1 { > uint32_t rx_drops_no_fragments[68]; > uint32_t rsvd[4]; > @@ -3078,6 +3176,15 @@ struct oce_pmem_stats { > uint32_t rsvd[5]; > }; >=20 > +struct oce_hw_stats_v2 { > + struct oce_rxf_stats_v2 rxf; > + uint32_t rsvd0[OCE_TXP_SW_SZ]; > + struct oce_erx_stats_v2 erx; > + struct oce_pmem_stats pmem; > + uint32_t rsvd1[18]; > +}; > + > + > struct oce_hw_stats_v1 { > struct oce_rxf_stats_v1 rxf; > uint32_t rsvd0[OCE_TXP_SW_SZ]; > @@ -3093,32 +3200,22 @@ struct oce_hw_stats_v0 { > struct oce_pmem_stats pmem; > }; >=20 > -struct mbx_get_nic_stats_v0 { > - struct mbx_hdr hdr; > - union { > - struct { > - uint32_t rsvd0; > - } req; > - > - union { > - struct oce_hw_stats_v0 stats; > - } rsp; > - } params; > -}; > - > -struct mbx_get_nic_stats { > - struct mbx_hdr hdr; > - union { > - struct { > - uint32_t rsvd0; > - } req; > - =20 > - struct { > - struct oce_hw_stats_v1 stats; > - } rsp; > - } params; > -}; > - > +#define MBX_GET_NIC_STATS(version) \ > + struct mbx_get_nic_stats_v##version { \ > + struct mbx_hdr hdr; \ > + union { \ > + struct { \ > + uint32_t rsvd0; \ > + } req; \ > + union { \ > + struct oce_hw_stats_v##version stats; \ > + } rsp; \ > + } params; \ > +} =20 > + > +MBX_GET_NIC_STATS(0); > +MBX_GET_NIC_STATS(1); > +MBX_GET_NIC_STATS(2); >=20 > /* [18(0x12)] NIC_GET_PPORT_STATS */ > struct pport_stats { > @@ -3728,3 +3825,373 @@ enum OCE_QUEUE_RX_STATS { > QUEUE_RX_BUFFER_ERRORS =3D 8, > QUEUE_RX_N_WORDS =3D 10 > }; > + > +/* HW LRO structures */ > +struct mbx_nic_query_lro_capabilities { > + struct mbx_hdr hdr; > + union { > + struct { > + uint32_t rsvd[6]; > + } req; > + struct { > +#ifdef _BIG_ENDIAN > + uint32_t lro_flags; > + uint16_t lro_rq_cnt; > + uint16_t plro_max_offload; > + uint32_t rsvd[4]; > +#else > + uint32_t lro_flags; > + uint16_t plro_max_offload; > + uint16_t lro_rq_cnt; > + uint32_t rsvd[4]; > +#endif > + } rsp; > + } params; > +}; > + > +struct mbx_nic_set_iface_lro_config { > + struct mbx_hdr hdr; > + union { > + struct { > +#ifdef _BIG_ENDIAN > + uint32_t lro_flags; > + uint32_t iface_id; > + uint32_t max_clsc_byte_cnt; > + uint32_t max_clsc_seg_cnt; > + uint32_t max_clsc_usec_delay; > + uint32_t min_clsc_frame_byte_cnt; > + uint32_t rsvd[2]; > +#else > + uint32_t lro_flags; > + uint32_t iface_id; > + uint32_t max_clsc_byte_cnt; > + uint32_t max_clsc_seg_cnt; > + uint32_t max_clsc_usec_delay; > + uint32_t min_clsc_frame_byte_cnt; > + uint32_t rsvd[2]; > +#endif > + } req; > + struct { > +#ifdef _BIG_ENDIAN > + uint32_t lro_flags; > + uint32_t rsvd[7]; > +#else > + uint32_t lro_flags; > + uint32_t rsvd[7]; > +#endif > + } rsp; > + } params; > +}; > + > + > +struct mbx_create_nic_rq_v2 { > + struct mbx_hdr hdr; > + union { > + struct { > +#ifdef _BIG_ENDIAN > + uint8_t num_pages; > + uint8_t frag_size; > + uint16_t cq_id; > + > + uint32_t if_id; > + > + uint16_t page_size; > + uint16_t max_frame_size; > + > + uint16_t rsvd; > + uint16_t pd_id; > + > + uint16_t rsvd1; > + uint16_t rq_flags; > + > + uint16_t hds_fixed_offset; > + uint8_t hds_start; > + uint8_t hds_frag; > + > + uint16_t hds_backfill_size; > + uint16_t hds_frag_size; > + > + uint32_t rbq_id; > + > + uint32_t rsvd2[8]; > + > + struct phys_addr pages[2]; > +#else > + uint16_t cq_id; > + uint8_t frag_size; > + uint8_t num_pages; > + > + uint32_t if_id; > + > + uint16_t max_frame_size; > + uint16_t page_size; > + > + uint16_t pd_id; > + uint16_t rsvd; > + > + uint16_t rq_flags; > + uint16_t rsvd1; > + > + uint8_t hds_frag; > + uint8_t hds_start; > + uint16_t hds_fixed_offset; > + > + uint16_t hds_frag_size; > + uint16_t hds_backfill_size; > + > + uint32_t rbq_id; > + > + uint32_t rsvd2[8]; > + > + struct phys_addr pages[2]; > +#endif > + } req; > + struct { > +#ifdef _BIG_ENDIAN > + uint8_t rsvd0; > + uint8_t rss_cpuid; > + uint16_t rq_id; > + > + uint8_t db_format; > + uint8_t db_reg_set; > + uint16_t rsvd1; > + > + uint32_t db_offset; > + > + uint32_t rsvd2; > + > + uint16_t rsvd3; > + uint16_t rq_flags; > + > +#else > + uint16_t rq_id; > + uint8_t rss_cpuid; > + uint8_t rsvd0; > + > + uint16_t rsvd1; > + uint8_t db_reg_set; > + uint8_t db_format; > + > + uint32_t db_offset; > + > + uint32_t rsvd2; > + > + uint16_t rq_flags; > + uint16_t rsvd3; > +#endif > + } rsp; > + > + } params; > +}; > + > +struct mbx_delete_nic_rq_v1 { > + struct mbx_hdr hdr; > + union { > + struct { > +#ifdef _BIG_ENDIAN > + uint16_t bypass_flush; > + uint16_t rq_id; > + uint16_t rsvd; > + uint16_t rq_flags; > +#else > + uint16_t rq_id; > + uint16_t bypass_flush; > + uint16_t rq_flags; > + uint16_t rsvd; > +#endif > + } req; > + struct { > + uint32_t rsvd[2]; > + } rsp; > + } params; > +}; > + > +struct nic_hwlro_singleton_cqe { > +#ifdef _BIG_ENDIAN > + /* dw 0 */ > + uint32_t ip_opt:1; > + uint32_t vtp:1; > + uint32_t pkt_size:14; > + uint32_t vlan_tag:16; > + > + /* dw 1 */ > + uint32_t num_frags:3; > + uint32_t rsvd1:3; > + uint32_t frag_index:10; > + uint32_t rsvd:8; > + uint32_t ipv6_frame:1; > + uint32_t l4_cksum_pass:1; > + uint32_t ip_cksum_pass:1; > + uint32_t udpframe:1; > + uint32_t tcpframe:1; > + uint32_t ipframe:1; > + uint32_t rss_hp:1; > + uint32_t error:1; > + > + /* dw 2 */ > + uint32_t valid:1; > + uint32_t cqe_type:2; > + uint32_t debug:7; > + uint32_t rsvd4:6; > + uint32_t data_offset:8; > + uint32_t rsvd3:3; > + uint32_t rss_bank:1; > + uint32_t qnq:1; > + uint32_t rsvd2:3; > + =20 > + /* dw 3 */ > + uint32_t rss_hash_value; > +#else > + /* dw 0 */ > + uint32_t vlan_tag:16; > + uint32_t pkt_size:14; > + uint32_t vtp:1; > + uint32_t ip_opt:1; > + > + /* dw 1 */ > + uint32_t error:1; > + uint32_t rss_hp:1; > + uint32_t ipframe:1; > + uint32_t tcpframe:1; > + uint32_t udpframe:1; > + uint32_t ip_cksum_pass:1; > + uint32_t l4_cksum_pass:1; > + uint32_t ipv6_frame:1; > + uint32_t rsvd:8; > + uint32_t frag_index:10; > + uint32_t rsvd1:3; > + uint32_t num_frags:3; > + > + /* dw 2 */ > + uint32_t rsvd2:3; > + uint32_t qnq:1; > + uint32_t rss_bank:1; > + uint32_t rsvd3:3; > + uint32_t data_offset:8; > + uint32_t rsvd4:6; > + uint32_t debug:7; > + uint32_t cqe_type:2; > + uint32_t valid:1; > +=20 > + /* dw 3 */ > + uint32_t rss_hash_value; > +#endif > +}; > + > +struct nic_hwlro_cqe_part1 { > +#ifdef _BIG_ENDIAN > + /* dw 0 */ > + uint32_t tcp_timestamp_val; > + > + /* dw 1 */ > + uint32_t tcp_timestamp_ecr; > + > + /* dw 2 */ > + uint32_t valid:1; > + uint32_t cqe_type:2; > + uint32_t rsvd3:7; > + uint32_t rss_policy:4; > + uint32_t rsvd2:2; > + uint32_t data_offset:8; > + uint32_t rsvd1:1; > + uint32_t lro_desc:1; > + uint32_t lro_timer_pop:1; > + uint32_t rss_bank:1; > + uint32_t qnq:1; > + uint32_t rsvd:2; > + uint32_t rss_flush:1; > + > + /* dw 3 */ > + uint32_t rss_hash_value; > +#else > + /* dw 0 */ > + uint32_t tcp_timestamp_val; > + > + /* dw 1 */ > + uint32_t tcp_timestamp_ecr; > + > + /* dw 2 */ > + uint32_t rss_flush:1; > + uint32_t rsvd:2; > + uint32_t qnq:1; > + uint32_t rss_bank:1; > + uint32_t lro_timer_pop:1; > + uint32_t lro_desc:1; > + uint32_t rsvd1:1; > + uint32_t data_offset:8; > + uint32_t rsvd2:2; > + uint32_t rss_policy:4; > + uint32_t rsvd3:7; > + uint32_t cqe_type:2; > + uint32_t valid:1; > + > + /* dw 3 */ > + uint32_t rss_hash_value; > +#endif > +}; > + > +struct nic_hwlro_cqe_part2 { > +#ifdef _BIG_ENDIAN > + /* dw 0 */ > + uint32_t ip_opt:1; > + uint32_t vtp:1; > + uint32_t pkt_size:14; > + uint32_t vlan_tag:16; > + > + /* dw 1 */ > + uint32_t tcp_window:16; > + uint32_t coalesced_size:16; > + =20 > + /* dw 2 */ > + uint32_t valid:1; > + uint32_t cqe_type:2; > + uint32_t rsvd:2; > + uint32_t push:1; > + uint32_t ts_opt:1; > + uint32_t threshold:1; > + uint32_t seg_cnt:8; > + uint32_t frame_lifespan:8; > + uint32_t ipv6_frame:1; > + uint32_t l4_cksum_pass:1; > + uint32_t ip_cksum_pass:1; > + uint32_t udpframe:1; > + uint32_t tcpframe:1; > + uint32_t ipframe:1; > + uint32_t rss_hp:1; > + uint32_t error:1; > + =20 > + /* dw 3 */ > + uint32_t tcp_ack_num; > +#else > + /* dw 0 */ > + uint32_t vlan_tag:16; > + uint32_t pkt_size:14; > + uint32_t vtp:1; > + uint32_t ip_opt:1; > + > + /* dw 1 */ > + uint32_t coalesced_size:16; > + uint32_t tcp_window:16; > + > + /* dw 2 */ > + uint32_t error:1; > + uint32_t rss_hp:1; > + uint32_t ipframe:1; > + uint32_t tcpframe:1; > + uint32_t udpframe:1; > + uint32_t ip_cksum_pass:1; > + uint32_t l4_cksum_pass:1; > + uint32_t ipv6_frame:1; > + uint32_t frame_lifespan:8; > + uint32_t seg_cnt:8; > + uint32_t threshold:1; > + uint32_t ts_opt:1; > + uint32_t push:1; > + uint32_t rsvd:2; > + uint32_t cqe_type:2; > + uint32_t valid:1; > + > + /* dw 3 */ > + uint32_t tcp_ack_num; > +#endif > +}; >=20 > Modified: head/sys/dev/oce/oce_if.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/dev/oce/oce_if.c Wed Sep 21 22:09:17 2016 (r306147) > +++ head/sys/dev/oce/oce_if.c Wed Sep 21 22:53:16 2016 (r306148) > @@ -42,77 +42,92 @@ > #include "opt_inet.h" >=20 > #include "oce_if.h" > +#include "oce_user.h" > + > +#define is_tso_pkt(m) (m->m_pkthdr.csum_flags & CSUM_TSO) >=20 > /* UE Status Low CSR */ > static char *ue_status_low_desc[] =3D { > - "CEV", > - "CTX", > - "DBUF", > - "ERX", > - "Host", > - "MPU", > - "NDMA", > - "PTC ", > - "RDMA ", > - "RXF ", > - "RXIPS ", > - "RXULP0 ", > - "RXULP1 ", > - "RXULP2 ", > - "TIM ", > - "TPOST ", > - "TPRE ", > - "TXIPS ", > - "TXULP0 ", > - "TXULP1 ", > - "UC ", > - "WDMA ", > - "TXULP2 ", > - "HOST1 ", > - "P0_OB_LINK ", > - "P1_OB_LINK ", > - "HOST_GPIO ", > - "MBOX ", > - "AXGMAC0", > - "AXGMAC1", > - "JTAG", > - "MPU_INTPEND" > + "CEV", > + "CTX", > + "DBUF", > + "ERX", > + "Host", > + "MPU", > + "NDMA", > + "PTC ", > + "RDMA ", > + "RXF ", > + "RXIPS ", > + "RXULP0 ", > + "RXULP1 ", > + "RXULP2 ", > + "TIM ", > + "TPOST ", > + "TPRE ", > + "TXIPS ", > + "TXULP0 ", > + "TXULP1 ", > + "UC ", > + "WDMA ", > + "TXULP2 ", > + "HOST1 ", > + "P0_OB_LINK ", > + "P1_OB_LINK ", > + "HOST_GPIO ", > + "MBOX ", > + "AXGMAC0", > + "AXGMAC1", > + "JTAG", > + "MPU_INTPEND" > }; >=20 > /* UE Status High CSR */ > static char *ue_status_hi_desc[] =3D { > - "LPCMEMHOST", > - "MGMT_MAC", > - "PCS0ONLINE", > - "MPU_IRAM", > - "PCS1ONLINE", > - "PCTL0", > - "PCTL1", > - "PMEM", > - "RR", > - "TXPB", > - "RXPP", > - "XAUI", > - "TXP", > - "ARM", > - "IPC", > - "HOST2", > - "HOST3", > - "HOST4", > - "HOST5", > - "HOST6", > - "HOST7", > - "HOST8", > - "HOST9", > - "NETC", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown" > + "LPCMEMHOST", > + "MGMT_MAC", > + "PCS0ONLINE", > + "MPU_IRAM", > + "PCS1ONLINE", > + "PCTL0", > + "PCTL1", > + "PMEM", > + "RR", > + "TXPB", > + "RXPP", > + "XAUI", > + "TXP", > + "ARM", > + "IPC", > + "HOST2", > + "HOST3", > + "HOST4", > + "HOST5", > + "HOST6", > + "HOST7", > + "HOST8", > + "HOST9", > + "NETC", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown" > +}; > + > +struct oce_common_cqe_info{ > + uint8_t vtp:1; > + uint8_t l4_cksum_pass:1; > + uint8_t ip_cksum_pass:1; > + uint8_t ipv6_frame:1; > + uint8_t qnq:1; > + uint8_t rsvd:3; > + uint8_t num_frags; > + uint16_t pkt_size; > + uint16_t vtag; > }; >=20 >=20 > @@ -140,17 +155,19 @@ static int oce_media_change(struct ifne > /* Transmit routines prototypes */ > static int oce_tx(POCE_SOFTC sc, struct mbuf **mpp, int wq_index); > static void oce_tx_restart(POCE_SOFTC sc, struct oce_wq *wq); > -static void oce_tx_complete(struct oce_wq *wq, uint32_t wqe_idx, > - uint32_t status); > +static void oce_process_tx_completion(struct oce_wq *wq); > static int oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, > struct oce_wq *wq); >=20 > /* Receive routines prototypes */ > -static void oce_discard_rx_comp(struct oce_rq *rq, struct oce_nic_rx_cqe *= cqe); > static int oce_cqe_vtp_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); > static int oce_cqe_portid_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe= ); > -static void oce_rx(struct oce_rq *rq, uint32_t rqe_idx, > - struct oce_nic_rx_cqe *cqe); > +static void oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); > +static void oce_check_rx_bufs(POCE_SOFTC sc, uint32_t num_cqes, struct oc= e_rq *rq); > +static uint16_t oce_rq_handler_lro(void *arg); > +static void oce_correct_header(struct mbuf *m, struct nic_hwlro_cqe_part1= *cqe1, struct nic_hwlro_cqe_part2 *cqe2); > +static void oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singleton_cqe *= cqe, struct nic_hwlro_cqe_part2 *cqe2); > +static void oce_rx_mbuf_chain(struct oce_rq *rq, struct oce_common_cqe_in= fo *cqe_info, struct mbuf **m); >=20 > /* Helper function prototypes in this file */ > static int oce_attach_ifp(POCE_SOFTC sc); > @@ -169,11 +186,12 @@ static void process_link_state(POCE_SOFT > static int oce_tx_asic_stall_verify(POCE_SOFTC sc, struct mbuf *m); > static void oce_get_config(POCE_SOFTC sc); > static struct mbuf *oce_insert_vlan_tag(POCE_SOFTC sc, struct mbuf *m, boo= lean_t *complete); > +static void oce_read_env_variables(POCE_SOFTC sc); > + >=20 > /* IP specific */ > #if defined(INET6) || defined(INET) > static int oce_init_lro(POCE_SOFTC sc); > -static void oce_rx_flush_lro(struct oce_rq *rq); > static struct mbuf * oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp); > #endif >=20 > @@ -206,7 +224,7 @@ const char component_revision[32] =3D {"// > /* Module capabilites and parameters */ > uint32_t oce_max_rsp_handled =3D OCE_MAX_RSP_HANDLED; > uint32_t oce_enable_rss =3D OCE_MODCAP_RSS; > - > +uint32_t oce_rq_buf_size =3D 2048; >=20 > TUNABLE_INT("hw.oce.max_rsp_handled", &oce_max_rsp_handled); > TUNABLE_INT("hw.oce.enable_rss", &oce_enable_rss); > @@ -222,8 +240,10 @@ static uint32_t supportedDevices[] =3D { > (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_SH > }; >=20 > +POCE_SOFTC softc_head =3D NULL; > +POCE_SOFTC softc_tail =3D NULL; >=20 > - > +struct oce_rdma_if *oce_rdma_if =3D NULL; >=20 > /*************************************************************************= **** > * Driver entry points functions * > @@ -292,7 +312,8 @@ oce_attach(device_t dev) >=20 > sc->tx_ring_size =3D OCE_TX_RING_SIZE; > sc->rx_ring_size =3D OCE_RX_RING_SIZE; > - sc->rq_frag_size =3D OCE_RQ_BUF_SIZE; > + /* receive fragment size should be multiple of 2K */ > + sc->rq_frag_size =3D ((oce_rq_buf_size / 2048) * 2048); > sc->flow_control =3D OCE_DEFAULT_FLOW_CONTROL; > sc->promisc =3D OCE_DEFAULT_PROMISCUOUS; >=20 > @@ -304,6 +325,8 @@ oce_attach(device_t dev) > if (rc) > goto pci_res_free; >=20 > + oce_read_env_variables(sc); > + > oce_get_config(sc); >=20 > setup_max_queues_want(sc); =20 > @@ -341,11 +364,19 @@ oce_attach(device_t dev) >=20 > oce_add_sysctls(sc); >=20 > - callout_init(&sc->timer, 1); > + callout_init(&sc->timer, CALLOUT_MPSAFE); > rc =3D callout_reset(&sc->timer, 2 * hz, oce_local_timer, sc); > if (rc) > goto stats_free; >=20 > + sc->next =3DNULL; > + if (softc_tail !=3D NULL) { > + softc_tail->next =3D sc; > + } else { > + softc_head =3D sc; > + } > + softc_tail =3D sc; > + > return 0; >=20 > stats_free: > @@ -383,6 +414,22 @@ static int > oce_detach(device_t dev) > { > POCE_SOFTC sc =3D device_get_softc(dev); > + POCE_SOFTC poce_sc_tmp, *ppoce_sc_tmp1, poce_sc_tmp2 =3D NULL; > + > + poce_sc_tmp =3D softc_head; > + ppoce_sc_tmp1 =3D &softc_head; > + while (poce_sc_tmp !=3D NULL) { > + if (poce_sc_tmp =3D=3D sc) { > + *ppoce_sc_tmp1 =3D sc->next; > + if (sc->next =3D=3D NULL) { > + softc_tail =3D poce_sc_tmp2; > + } > + break; > + } > + poce_sc_tmp2 =3D poce_sc_tmp; > + ppoce_sc_tmp1 =3D &poce_sc_tmp->next; > + poce_sc_tmp =3D poce_sc_tmp->next; > + } >=20 > LOCK(&sc->dev_lock); > oce_if_deactivate(sc); > @@ -520,8 +567,16 @@ oce_ioctl(struct ifnet *ifp, u_long comm > oce_vid_config(sc); > } > #if defined(INET6) || defined(INET) > - if (u & IFCAP_LRO) > + if (u & IFCAP_LRO) { > ifp->if_capenable ^=3D IFCAP_LRO; > + if(sc->enable_hwlro) { > + if(ifp->if_capenable & IFCAP_LRO) { > + rc =3D oce_mbox_nic_set_iface_lro_config(sc, 1); > + }else { > + rc =3D oce_mbox_nic_set_iface_lro_config(sc, 0); > + } > + } > + } > #endif >=20 > break; > @@ -563,6 +618,9 @@ oce_multiq_start(struct ifnet *ifp, stru > int queue_index =3D 0; > int status =3D 0; >=20 > + if (!sc->link_status) > + return ENXIO; > + > if (M_HASHTYPE_GET(m) !=3D M_HASHTYPE_NONE) > queue_index =3D m->m_pkthdr.flowid % sc->nwqs; >=20 > @@ -653,20 +711,41 @@ oce_setup_intr(POCE_SOFTC sc) > { > int rc =3D 0, use_intx =3D 0; > int vector =3D 0, req_vectors =3D 0; > + int tot_req_vectors, tot_vectors; >=20 > if (is_rss_enabled(sc)) > req_vectors =3D MAX((sc->nrqs - 1), sc->nwqs); > else > req_vectors =3D 1; >=20 > - if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { > + tot_req_vectors =3D req_vectors; > + if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { > + if (req_vectors > 1) { > + tot_req_vectors +=3D OCE_RDMA_VECTORS; > + sc->roce_intr_count =3D OCE_RDMA_VECTORS; > + } > + } > + > + if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { > sc->intr_count =3D req_vectors; > - rc =3D pci_alloc_msix(sc->dev, &sc->intr_count); > + tot_vectors =3D tot_req_vectors; > + rc =3D pci_alloc_msix(sc->dev, &tot_vectors); > if (rc !=3D 0) { > use_intx =3D 1; > pci_release_msi(sc->dev); > - } else > - sc->flags |=3D OCE_FLAGS_USING_MSIX; > + } else { > + if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { > + if (tot_vectors < tot_req_vectors) { > + if (sc->intr_count < (2 * OCE_RDMA_VECTORS)) { > + sc->roce_intr_count =3D (tot_vectors / 2); > + } > + sc->intr_count =3D tot_vectors - sc->roce_intr_count; > + } > + } else { > + sc->intr_count =3D tot_vectors; > + } > + sc->flags |=3D OCE_FLAGS_USING_MSIX; > + } > } else > use_intx =3D 1; >=20 > @@ -854,6 +933,79 @@ oce_media_change(struct ifnet *ifp) > } >=20 >=20 > +static void oce_is_pkt_dest_bmc(POCE_SOFTC sc, > + struct mbuf *m, boolean_t *os2bmc, > + struct mbuf **m_new) > +{ > + struct ether_header *eh =3D NULL; > + > + eh =3D mtod(m, struct ether_header *); > + > + if (!is_os2bmc_enabled(sc) || *os2bmc) { > + *os2bmc =3D FALSE; > + goto done; > + } > + if (!ETHER_IS_MULTICAST(eh->ether_dhost)) > + goto done; >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Thu Sep 22 00:25:24 2016 Return-Path: Delivered-To: svn-src-all@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 60685BE46C4; Thu, 22 Sep 2016 00:25:24 +0000 (UTC) (envelope-from cem@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 2F7D338F; Thu, 22 Sep 2016 00:25:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M0PNoE021036; Thu, 22 Sep 2016 00:25:23 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M0PNAi021031; Thu, 22 Sep 2016 00:25:23 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609220025.u8M0PNAi021031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Sep 2016 00:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306149 - head/sys/dev/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 00:25:24 -0000 Author: cem Date: Thu Sep 22 00:25:23 2016 New Revision: 306149 URL: https://svnweb.freebsd.org/changeset/base/306149 Log: Revert r306148 to fix build Requested by: jpaetzel Reported by: Larry Rosenman , Jenkins Modified: head/sys/dev/oce/oce_hw.c head/sys/dev/oce/oce_hw.h head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/oce/oce_mbox.c head/sys/dev/oce/oce_queue.c head/sys/dev/oce/oce_sysctl.c Modified: head/sys/dev/oce/oce_hw.c ============================================================================== --- head/sys/dev/oce/oce_hw.c Wed Sep 21 22:53:16 2016 (r306148) +++ head/sys/dev/oce/oce_hw.c Thu Sep 22 00:25:23 2016 (r306149) @@ -393,11 +393,6 @@ oce_create_nw_interface(POCE_SOFTC sc) if (IS_SH(sc) || IS_XE201(sc)) capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; - if (sc->enable_hwlro) { - capab_flags |= MBX_RX_IFACE_FLAGS_LRO; - capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO; - } - /* enable capabilities controlled via driver startup parameters */ if (is_rss_enabled(sc)) capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; Modified: head/sys/dev/oce/oce_hw.h ============================================================================== --- head/sys/dev/oce/oce_hw.h Wed Sep 21 22:53:16 2016 (r306148) +++ head/sys/dev/oce/oce_hw.h Thu Sep 22 00:25:23 2016 (r306149) @@ -111,9 +111,6 @@ #define PD_MPU_MBOX_DB 0x0160 #define PD_MQ_DB 0x0140 -#define DB_OFFSET 0xc0 -#define DB_LRO_RQ_ID_MASK 0x7FF - /* EQE completion types */ #define EQ_MINOR_CODE_COMPLETION 0x00 #define EQ_MINOR_CODE_OTHER 0x01 @@ -183,7 +180,6 @@ #define ASYNC_EVENT_GRP5 0x5 #define ASYNC_EVENT_CODE_DEBUG 0x6 #define ASYNC_EVENT_PVID_STATE 0x3 -#define ASYNC_EVENT_OS2BMC 0x5 #define ASYNC_EVENT_DEBUG_QNQ 0x1 #define ASYNC_EVENT_CODE_SLIPORT 0x11 #define VLAN_VID_MASK 0x0FFF @@ -726,34 +722,6 @@ struct oce_async_cqe_link_state { } u0; }; -/* OS2BMC async event */ -struct oce_async_evt_grp5_os2bmc { - union { - struct { - uint32_t lrn_enable:1; - uint32_t lrn_disable:1; - uint32_t mgmt_enable:1; - uint32_t mgmt_disable:1; - uint32_t rsvd0:12; - uint32_t vlan_tag:16; - uint32_t arp_filter:1; - uint32_t dhcp_client_filt:1; - uint32_t dhcp_server_filt:1; - uint32_t net_bios_filt:1; - uint32_t rsvd1:3; - uint32_t bcast_filt:1; - uint32_t ipv6_nbr_filt:1; - uint32_t ipv6_ra_filt:1; - uint32_t ipv6_ras_filt:1; - uint32_t rsvd2[4]; - uint32_t mcast_filt:1; - uint32_t rsvd3:16; - uint32_t evt_tag; - uint32_t dword3; - } s; - uint32_t dword[4]; - } u; -}; /* PVID aync event */ struct oce_async_event_grp5_pvid_state { @@ -1428,7 +1396,7 @@ typedef union oce_cq_ctx_u { uint32_t dw5rsvd3:1; uint32_t eventable:1; /* dw6 */ - uint32_t eq_id:16; + uint32_t eq_id:8; uint32_t dw6rsvd1:15; uint32_t armed:1; /* dw7 */ @@ -2435,8 +2403,8 @@ struct oce_nic_hdr_wqe { uint32_t tcpcs:1; uint32_t udpcs:1; uint32_t ipcs:1; - uint32_t mgmt:1; - uint32_t lso6:1; + uint32_t rsvd3:1; + uint32_t rsvd2:1; uint32_t forward:1; uint32_t crc:1; uint32_t event:1; @@ -2458,8 +2426,8 @@ struct oce_nic_hdr_wqe { uint32_t event:1; uint32_t crc:1; uint32_t forward:1; - uint32_t lso6:1; - uint32_t mgmt:1; + uint32_t rsvd2:1; + uint32_t rsvd3:1; uint32_t ipcs:1; uint32_t udpcs:1; uint32_t tcpcs:1; @@ -3042,53 +3010,6 @@ struct oce_rxf_stats_v0 { uint32_t rsvd1[6]; }; -struct oce_port_rxf_stats_v2 { - uint32_t rsvd0[10]; - uint32_t roce_bytes_received_lsd; - uint32_t roce_bytes_received_msd; - uint32_t rsvd1[5]; - uint32_t roce_frames_received; - uint32_t rx_crc_errors; - uint32_t rx_alignment_symbol_errors; - uint32_t rx_pause_frames; - uint32_t rx_priority_pause_frames; - uint32_t rx_control_frames; - uint32_t rx_in_range_errors; - uint32_t rx_out_range_errors; - uint32_t rx_frame_too_long; - uint32_t rx_address_match_errors; - uint32_t rx_dropped_too_small; - uint32_t rx_dropped_too_short; - uint32_t rx_dropped_header_too_small; - uint32_t rx_dropped_tcp_length; - uint32_t rx_dropped_runt; - uint32_t rsvd2[10]; - uint32_t rx_ip_checksum_errs; - uint32_t rx_tcp_checksum_errs; - uint32_t rx_udp_checksum_errs; - uint32_t rsvd3[7]; - uint32_t rx_switched_unicast_packets; - uint32_t rx_switched_multicast_packets; - uint32_t rx_switched_broadcast_packets; - uint32_t rsvd4[3]; - uint32_t tx_pauseframes; - uint32_t tx_priority_pauseframes; - uint32_t tx_controlframes; - uint32_t rsvd5[10]; - uint32_t rxpp_fifo_overflow_drop; - uint32_t rx_input_fifo_overflow_drop; - uint32_t pmem_fifo_overflow_drop; - uint32_t jabber_events; - uint32_t rsvd6[3]; - uint32_t rx_drops_payload_size; - uint32_t rx_drops_clipped_header; - uint32_t rx_drops_crc; - uint32_t roce_drops_payload_len; - uint32_t roce_drops_crc; - uint32_t rsvd7[19]; -}; - - struct oce_port_rxf_stats_v1 { uint32_t rsvd0[12]; uint32_t rx_crc_errors; @@ -3125,20 +3046,6 @@ struct oce_port_rxf_stats_v1 { uint32_t rsvd5[3]; }; -struct oce_rxf_stats_v2 { - struct oce_port_rxf_stats_v2 port[4]; - uint32_t rsvd0[2]; - uint32_t rx_drops_no_pbuf; - uint32_t rx_drops_no_txpb; - uint32_t rx_drops_no_erx_descr; - uint32_t rx_drops_no_tpre_descr; - uint32_t rsvd1[6]; - uint32_t rx_drops_too_many_frags; - uint32_t rx_drops_invalid_ring; - uint32_t forwarded_packets; - uint32_t rx_drops_mtu; - uint32_t rsvd2[35]; -}; struct oce_rxf_stats_v1 { struct oce_port_rxf_stats_v1 port[4]; @@ -3155,11 +3062,6 @@ struct oce_rxf_stats_v1 { uint32_t rsvd2[14]; }; -struct oce_erx_stats_v2 { - uint32_t rx_drops_no_fragments[136]; - uint32_t rsvd[3]; -}; - struct oce_erx_stats_v1 { uint32_t rx_drops_no_fragments[68]; uint32_t rsvd[4]; @@ -3176,15 +3078,6 @@ struct oce_pmem_stats { uint32_t rsvd[5]; }; -struct oce_hw_stats_v2 { - struct oce_rxf_stats_v2 rxf; - uint32_t rsvd0[OCE_TXP_SW_SZ]; - struct oce_erx_stats_v2 erx; - struct oce_pmem_stats pmem; - uint32_t rsvd1[18]; -}; - - struct oce_hw_stats_v1 { struct oce_rxf_stats_v1 rxf; uint32_t rsvd0[OCE_TXP_SW_SZ]; @@ -3200,22 +3093,32 @@ struct oce_hw_stats_v0 { struct oce_pmem_stats pmem; }; -#define MBX_GET_NIC_STATS(version) \ - struct mbx_get_nic_stats_v##version { \ - struct mbx_hdr hdr; \ - union { \ - struct { \ - uint32_t rsvd0; \ - } req; \ - union { \ - struct oce_hw_stats_v##version stats; \ - } rsp; \ - } params; \ -} - -MBX_GET_NIC_STATS(0); -MBX_GET_NIC_STATS(1); -MBX_GET_NIC_STATS(2); +struct mbx_get_nic_stats_v0 { + struct mbx_hdr hdr; + union { + struct { + uint32_t rsvd0; + } req; + + union { + struct oce_hw_stats_v0 stats; + } rsp; + } params; +}; + +struct mbx_get_nic_stats { + struct mbx_hdr hdr; + union { + struct { + uint32_t rsvd0; + } req; + + struct { + struct oce_hw_stats_v1 stats; + } rsp; + } params; +}; + /* [18(0x12)] NIC_GET_PPORT_STATS */ struct pport_stats { @@ -3825,373 +3728,3 @@ enum OCE_QUEUE_RX_STATS { QUEUE_RX_BUFFER_ERRORS = 8, QUEUE_RX_N_WORDS = 10 }; - -/* HW LRO structures */ -struct mbx_nic_query_lro_capabilities { - struct mbx_hdr hdr; - union { - struct { - uint32_t rsvd[6]; - } req; - struct { -#ifdef _BIG_ENDIAN - uint32_t lro_flags; - uint16_t lro_rq_cnt; - uint16_t plro_max_offload; - uint32_t rsvd[4]; -#else - uint32_t lro_flags; - uint16_t plro_max_offload; - uint16_t lro_rq_cnt; - uint32_t rsvd[4]; -#endif - } rsp; - } params; -}; - -struct mbx_nic_set_iface_lro_config { - struct mbx_hdr hdr; - union { - struct { -#ifdef _BIG_ENDIAN - uint32_t lro_flags; - uint32_t iface_id; - uint32_t max_clsc_byte_cnt; - uint32_t max_clsc_seg_cnt; - uint32_t max_clsc_usec_delay; - uint32_t min_clsc_frame_byte_cnt; - uint32_t rsvd[2]; -#else - uint32_t lro_flags; - uint32_t iface_id; - uint32_t max_clsc_byte_cnt; - uint32_t max_clsc_seg_cnt; - uint32_t max_clsc_usec_delay; - uint32_t min_clsc_frame_byte_cnt; - uint32_t rsvd[2]; -#endif - } req; - struct { -#ifdef _BIG_ENDIAN - uint32_t lro_flags; - uint32_t rsvd[7]; -#else - uint32_t lro_flags; - uint32_t rsvd[7]; -#endif - } rsp; - } params; -}; - - -struct mbx_create_nic_rq_v2 { - struct mbx_hdr hdr; - union { - struct { -#ifdef _BIG_ENDIAN - uint8_t num_pages; - uint8_t frag_size; - uint16_t cq_id; - - uint32_t if_id; - - uint16_t page_size; - uint16_t max_frame_size; - - uint16_t rsvd; - uint16_t pd_id; - - uint16_t rsvd1; - uint16_t rq_flags; - - uint16_t hds_fixed_offset; - uint8_t hds_start; - uint8_t hds_frag; - - uint16_t hds_backfill_size; - uint16_t hds_frag_size; - - uint32_t rbq_id; - - uint32_t rsvd2[8]; - - struct phys_addr pages[2]; -#else - uint16_t cq_id; - uint8_t frag_size; - uint8_t num_pages; - - uint32_t if_id; - - uint16_t max_frame_size; - uint16_t page_size; - - uint16_t pd_id; - uint16_t rsvd; - - uint16_t rq_flags; - uint16_t rsvd1; - - uint8_t hds_frag; - uint8_t hds_start; - uint16_t hds_fixed_offset; - - uint16_t hds_frag_size; - uint16_t hds_backfill_size; - - uint32_t rbq_id; - - uint32_t rsvd2[8]; - - struct phys_addr pages[2]; -#endif - } req; - struct { -#ifdef _BIG_ENDIAN - uint8_t rsvd0; - uint8_t rss_cpuid; - uint16_t rq_id; - - uint8_t db_format; - uint8_t db_reg_set; - uint16_t rsvd1; - - uint32_t db_offset; - - uint32_t rsvd2; - - uint16_t rsvd3; - uint16_t rq_flags; - -#else - uint16_t rq_id; - uint8_t rss_cpuid; - uint8_t rsvd0; - - uint16_t rsvd1; - uint8_t db_reg_set; - uint8_t db_format; - - uint32_t db_offset; - - uint32_t rsvd2; - - uint16_t rq_flags; - uint16_t rsvd3; -#endif - } rsp; - - } params; -}; - -struct mbx_delete_nic_rq_v1 { - struct mbx_hdr hdr; - union { - struct { -#ifdef _BIG_ENDIAN - uint16_t bypass_flush; - uint16_t rq_id; - uint16_t rsvd; - uint16_t rq_flags; -#else - uint16_t rq_id; - uint16_t bypass_flush; - uint16_t rq_flags; - uint16_t rsvd; -#endif - } req; - struct { - uint32_t rsvd[2]; - } rsp; - } params; -}; - -struct nic_hwlro_singleton_cqe { -#ifdef _BIG_ENDIAN - /* dw 0 */ - uint32_t ip_opt:1; - uint32_t vtp:1; - uint32_t pkt_size:14; - uint32_t vlan_tag:16; - - /* dw 1 */ - uint32_t num_frags:3; - uint32_t rsvd1:3; - uint32_t frag_index:10; - uint32_t rsvd:8; - uint32_t ipv6_frame:1; - uint32_t l4_cksum_pass:1; - uint32_t ip_cksum_pass:1; - uint32_t udpframe:1; - uint32_t tcpframe:1; - uint32_t ipframe:1; - uint32_t rss_hp:1; - uint32_t error:1; - - /* dw 2 */ - uint32_t valid:1; - uint32_t cqe_type:2; - uint32_t debug:7; - uint32_t rsvd4:6; - uint32_t data_offset:8; - uint32_t rsvd3:3; - uint32_t rss_bank:1; - uint32_t qnq:1; - uint32_t rsvd2:3; - - /* dw 3 */ - uint32_t rss_hash_value; -#else - /* dw 0 */ - uint32_t vlan_tag:16; - uint32_t pkt_size:14; - uint32_t vtp:1; - uint32_t ip_opt:1; - - /* dw 1 */ - uint32_t error:1; - uint32_t rss_hp:1; - uint32_t ipframe:1; - uint32_t tcpframe:1; - uint32_t udpframe:1; - uint32_t ip_cksum_pass:1; - uint32_t l4_cksum_pass:1; - uint32_t ipv6_frame:1; - uint32_t rsvd:8; - uint32_t frag_index:10; - uint32_t rsvd1:3; - uint32_t num_frags:3; - - /* dw 2 */ - uint32_t rsvd2:3; - uint32_t qnq:1; - uint32_t rss_bank:1; - uint32_t rsvd3:3; - uint32_t data_offset:8; - uint32_t rsvd4:6; - uint32_t debug:7; - uint32_t cqe_type:2; - uint32_t valid:1; - - /* dw 3 */ - uint32_t rss_hash_value; -#endif -}; - -struct nic_hwlro_cqe_part1 { -#ifdef _BIG_ENDIAN - /* dw 0 */ - uint32_t tcp_timestamp_val; - - /* dw 1 */ - uint32_t tcp_timestamp_ecr; - - /* dw 2 */ - uint32_t valid:1; - uint32_t cqe_type:2; - uint32_t rsvd3:7; - uint32_t rss_policy:4; - uint32_t rsvd2:2; - uint32_t data_offset:8; - uint32_t rsvd1:1; - uint32_t lro_desc:1; - uint32_t lro_timer_pop:1; - uint32_t rss_bank:1; - uint32_t qnq:1; - uint32_t rsvd:2; - uint32_t rss_flush:1; - - /* dw 3 */ - uint32_t rss_hash_value; -#else - /* dw 0 */ - uint32_t tcp_timestamp_val; - - /* dw 1 */ - uint32_t tcp_timestamp_ecr; - - /* dw 2 */ - uint32_t rss_flush:1; - uint32_t rsvd:2; - uint32_t qnq:1; - uint32_t rss_bank:1; - uint32_t lro_timer_pop:1; - uint32_t lro_desc:1; - uint32_t rsvd1:1; - uint32_t data_offset:8; - uint32_t rsvd2:2; - uint32_t rss_policy:4; - uint32_t rsvd3:7; - uint32_t cqe_type:2; - uint32_t valid:1; - - /* dw 3 */ - uint32_t rss_hash_value; -#endif -}; - -struct nic_hwlro_cqe_part2 { -#ifdef _BIG_ENDIAN - /* dw 0 */ - uint32_t ip_opt:1; - uint32_t vtp:1; - uint32_t pkt_size:14; - uint32_t vlan_tag:16; - - /* dw 1 */ - uint32_t tcp_window:16; - uint32_t coalesced_size:16; - - /* dw 2 */ - uint32_t valid:1; - uint32_t cqe_type:2; - uint32_t rsvd:2; - uint32_t push:1; - uint32_t ts_opt:1; - uint32_t threshold:1; - uint32_t seg_cnt:8; - uint32_t frame_lifespan:8; - uint32_t ipv6_frame:1; - uint32_t l4_cksum_pass:1; - uint32_t ip_cksum_pass:1; - uint32_t udpframe:1; - uint32_t tcpframe:1; - uint32_t ipframe:1; - uint32_t rss_hp:1; - uint32_t error:1; - - /* dw 3 */ - uint32_t tcp_ack_num; -#else - /* dw 0 */ - uint32_t vlan_tag:16; - uint32_t pkt_size:14; - uint32_t vtp:1; - uint32_t ip_opt:1; - - /* dw 1 */ - uint32_t coalesced_size:16; - uint32_t tcp_window:16; - - /* dw 2 */ - uint32_t error:1; - uint32_t rss_hp:1; - uint32_t ipframe:1; - uint32_t tcpframe:1; - uint32_t udpframe:1; - uint32_t ip_cksum_pass:1; - uint32_t l4_cksum_pass:1; - uint32_t ipv6_frame:1; - uint32_t frame_lifespan:8; - uint32_t seg_cnt:8; - uint32_t threshold:1; - uint32_t ts_opt:1; - uint32_t push:1; - uint32_t rsvd:2; - uint32_t cqe_type:2; - uint32_t valid:1; - - /* dw 3 */ - uint32_t tcp_ack_num; -#endif -}; Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Wed Sep 21 22:53:16 2016 (r306148) +++ head/sys/dev/oce/oce_if.c Thu Sep 22 00:25:23 2016 (r306149) @@ -42,92 +42,77 @@ #include "opt_inet.h" #include "oce_if.h" -#include "oce_user.h" - -#define is_tso_pkt(m) (m->m_pkthdr.csum_flags & CSUM_TSO) /* UE Status Low CSR */ static char *ue_status_low_desc[] = { - "CEV", - "CTX", - "DBUF", - "ERX", - "Host", - "MPU", - "NDMA", - "PTC ", - "RDMA ", - "RXF ", - "RXIPS ", - "RXULP0 ", - "RXULP1 ", - "RXULP2 ", - "TIM ", - "TPOST ", - "TPRE ", - "TXIPS ", - "TXULP0 ", - "TXULP1 ", - "UC ", - "WDMA ", - "TXULP2 ", - "HOST1 ", - "P0_OB_LINK ", - "P1_OB_LINK ", - "HOST_GPIO ", - "MBOX ", - "AXGMAC0", - "AXGMAC1", - "JTAG", - "MPU_INTPEND" + "CEV", + "CTX", + "DBUF", + "ERX", + "Host", + "MPU", + "NDMA", + "PTC ", + "RDMA ", + "RXF ", + "RXIPS ", + "RXULP0 ", + "RXULP1 ", + "RXULP2 ", + "TIM ", + "TPOST ", + "TPRE ", + "TXIPS ", + "TXULP0 ", + "TXULP1 ", + "UC ", + "WDMA ", + "TXULP2 ", + "HOST1 ", + "P0_OB_LINK ", + "P1_OB_LINK ", + "HOST_GPIO ", + "MBOX ", + "AXGMAC0", + "AXGMAC1", + "JTAG", + "MPU_INTPEND" }; /* UE Status High CSR */ static char *ue_status_hi_desc[] = { - "LPCMEMHOST", - "MGMT_MAC", - "PCS0ONLINE", - "MPU_IRAM", - "PCS1ONLINE", - "PCTL0", - "PCTL1", - "PMEM", - "RR", - "TXPB", - "RXPP", - "XAUI", - "TXP", - "ARM", - "IPC", - "HOST2", - "HOST3", - "HOST4", - "HOST5", - "HOST6", - "HOST7", - "HOST8", - "HOST9", - "NETC", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown" -}; - -struct oce_common_cqe_info{ - uint8_t vtp:1; - uint8_t l4_cksum_pass:1; - uint8_t ip_cksum_pass:1; - uint8_t ipv6_frame:1; - uint8_t qnq:1; - uint8_t rsvd:3; - uint8_t num_frags; - uint16_t pkt_size; - uint16_t vtag; + "LPCMEMHOST", + "MGMT_MAC", + "PCS0ONLINE", + "MPU_IRAM", + "PCS1ONLINE", + "PCTL0", + "PCTL1", + "PMEM", + "RR", + "TXPB", + "RXPP", + "XAUI", + "TXP", + "ARM", + "IPC", + "HOST2", + "HOST3", + "HOST4", + "HOST5", + "HOST6", + "HOST7", + "HOST8", + "HOST9", + "NETC", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown" }; @@ -155,19 +140,17 @@ static int oce_media_change(struct ifne /* Transmit routines prototypes */ static int oce_tx(POCE_SOFTC sc, struct mbuf **mpp, int wq_index); static void oce_tx_restart(POCE_SOFTC sc, struct oce_wq *wq); -static void oce_process_tx_completion(struct oce_wq *wq); +static void oce_tx_complete(struct oce_wq *wq, uint32_t wqe_idx, + uint32_t status); static int oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq); /* Receive routines prototypes */ +static void oce_discard_rx_comp(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); static int oce_cqe_vtp_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); static int oce_cqe_portid_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); -static void oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); -static void oce_check_rx_bufs(POCE_SOFTC sc, uint32_t num_cqes, struct oce_rq *rq); -static uint16_t oce_rq_handler_lro(void *arg); -static void oce_correct_header(struct mbuf *m, struct nic_hwlro_cqe_part1 *cqe1, struct nic_hwlro_cqe_part2 *cqe2); -static void oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singleton_cqe *cqe, struct nic_hwlro_cqe_part2 *cqe2); -static void oce_rx_mbuf_chain(struct oce_rq *rq, struct oce_common_cqe_info *cqe_info, struct mbuf **m); +static void oce_rx(struct oce_rq *rq, uint32_t rqe_idx, + struct oce_nic_rx_cqe *cqe); /* Helper function prototypes in this file */ static int oce_attach_ifp(POCE_SOFTC sc); @@ -186,12 +169,11 @@ static void process_link_state(POCE_SOFT static int oce_tx_asic_stall_verify(POCE_SOFTC sc, struct mbuf *m); static void oce_get_config(POCE_SOFTC sc); static struct mbuf *oce_insert_vlan_tag(POCE_SOFTC sc, struct mbuf *m, boolean_t *complete); -static void oce_read_env_variables(POCE_SOFTC sc); - /* IP specific */ #if defined(INET6) || defined(INET) static int oce_init_lro(POCE_SOFTC sc); +static void oce_rx_flush_lro(struct oce_rq *rq); static struct mbuf * oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp); #endif @@ -224,7 +206,7 @@ const char component_revision[32] = {"// /* Module capabilites and parameters */ uint32_t oce_max_rsp_handled = OCE_MAX_RSP_HANDLED; uint32_t oce_enable_rss = OCE_MODCAP_RSS; -uint32_t oce_rq_buf_size = 2048; + TUNABLE_INT("hw.oce.max_rsp_handled", &oce_max_rsp_handled); TUNABLE_INT("hw.oce.enable_rss", &oce_enable_rss); @@ -240,10 +222,8 @@ static uint32_t supportedDevices[] = { (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_SH }; -POCE_SOFTC softc_head = NULL; -POCE_SOFTC softc_tail = NULL; -struct oce_rdma_if *oce_rdma_if = NULL; + /***************************************************************************** * Driver entry points functions * @@ -312,8 +292,7 @@ oce_attach(device_t dev) sc->tx_ring_size = OCE_TX_RING_SIZE; sc->rx_ring_size = OCE_RX_RING_SIZE; - /* receive fragment size should be multiple of 2K */ - sc->rq_frag_size = ((oce_rq_buf_size / 2048) * 2048); + sc->rq_frag_size = OCE_RQ_BUF_SIZE; sc->flow_control = OCE_DEFAULT_FLOW_CONTROL; sc->promisc = OCE_DEFAULT_PROMISCUOUS; @@ -325,8 +304,6 @@ oce_attach(device_t dev) if (rc) goto pci_res_free; - oce_read_env_variables(sc); - oce_get_config(sc); setup_max_queues_want(sc); @@ -364,19 +341,11 @@ oce_attach(device_t dev) oce_add_sysctls(sc); - callout_init(&sc->timer, CALLOUT_MPSAFE); + callout_init(&sc->timer, 1); rc = callout_reset(&sc->timer, 2 * hz, oce_local_timer, sc); if (rc) goto stats_free; - sc->next =NULL; - if (softc_tail != NULL) { - softc_tail->next = sc; - } else { - softc_head = sc; - } - softc_tail = sc; - return 0; stats_free: @@ -414,22 +383,6 @@ static int oce_detach(device_t dev) { POCE_SOFTC sc = device_get_softc(dev); - POCE_SOFTC poce_sc_tmp, *ppoce_sc_tmp1, poce_sc_tmp2 = NULL; - - poce_sc_tmp = softc_head; - ppoce_sc_tmp1 = &softc_head; - while (poce_sc_tmp != NULL) { - if (poce_sc_tmp == sc) { - *ppoce_sc_tmp1 = sc->next; - if (sc->next == NULL) { - softc_tail = poce_sc_tmp2; - } - break; - } - poce_sc_tmp2 = poce_sc_tmp; - ppoce_sc_tmp1 = &poce_sc_tmp->next; - poce_sc_tmp = poce_sc_tmp->next; - } LOCK(&sc->dev_lock); oce_if_deactivate(sc); @@ -567,16 +520,8 @@ oce_ioctl(struct ifnet *ifp, u_long comm oce_vid_config(sc); } #if defined(INET6) || defined(INET) - if (u & IFCAP_LRO) { + if (u & IFCAP_LRO) ifp->if_capenable ^= IFCAP_LRO; - if(sc->enable_hwlro) { - if(ifp->if_capenable & IFCAP_LRO) { - rc = oce_mbox_nic_set_iface_lro_config(sc, 1); - }else { - rc = oce_mbox_nic_set_iface_lro_config(sc, 0); - } - } - } #endif break; @@ -618,9 +563,6 @@ oce_multiq_start(struct ifnet *ifp, stru int queue_index = 0; int status = 0; - if (!sc->link_status) - return ENXIO; - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) queue_index = m->m_pkthdr.flowid % sc->nwqs; @@ -711,41 +653,20 @@ oce_setup_intr(POCE_SOFTC sc) { int rc = 0, use_intx = 0; int vector = 0, req_vectors = 0; - int tot_req_vectors, tot_vectors; if (is_rss_enabled(sc)) req_vectors = MAX((sc->nrqs - 1), sc->nwqs); else req_vectors = 1; - tot_req_vectors = req_vectors; - if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { - if (req_vectors > 1) { - tot_req_vectors += OCE_RDMA_VECTORS; - sc->roce_intr_count = OCE_RDMA_VECTORS; - } - } - - if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { + if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { sc->intr_count = req_vectors; - tot_vectors = tot_req_vectors; - rc = pci_alloc_msix(sc->dev, &tot_vectors); + rc = pci_alloc_msix(sc->dev, &sc->intr_count); if (rc != 0) { use_intx = 1; pci_release_msi(sc->dev); - } else { - if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { - if (tot_vectors < tot_req_vectors) { - if (sc->intr_count < (2 * OCE_RDMA_VECTORS)) { - sc->roce_intr_count = (tot_vectors / 2); - } - sc->intr_count = tot_vectors - sc->roce_intr_count; - } - } else { - sc->intr_count = tot_vectors; - } - sc->flags |= OCE_FLAGS_USING_MSIX; - } + } else + sc->flags |= OCE_FLAGS_USING_MSIX; } else use_intx = 1; @@ -933,79 +854,6 @@ oce_media_change(struct ifnet *ifp) } -static void oce_is_pkt_dest_bmc(POCE_SOFTC sc, - struct mbuf *m, boolean_t *os2bmc, - struct mbuf **m_new) -{ - struct ether_header *eh = NULL; - - eh = mtod(m, struct ether_header *); - - if (!is_os2bmc_enabled(sc) || *os2bmc) { - *os2bmc = FALSE; - goto done; - } - if (!ETHER_IS_MULTICAST(eh->ether_dhost)) - goto done; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 02:31:59 2016 Return-Path: Delivered-To: svn-src-all@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 C7F6FBE36EA; Thu, 22 Sep 2016 02:31:59 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 7478E12C; Thu, 22 Sep 2016 02:31:59 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2C594206D9; Wed, 21 Sep 2016 22:31:58 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Wed, 21 Sep 2016 22:31:58 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Tuc/axxx4XNEVIi lbsd73Ib5b1c=; b=ieziytZEyNKyAV6OabtE495b2buiT6myVoY6NM4OUh3tV0a jo2AFFBU5l0s90bsTbjleKf9x1jEjbtH0bKwqHKjw6DwUsn0pbs4/8Wh3NqWlaiO 6m8/g9CcJ73KDEJUiavbMyO7N1SjAYjndCzX+tmwfy1FdT4RQSpNj1SBeHpg= X-Sasl-enc: n2aODye0ffH9wjI9bQWGJhcEk70GnUgVfTnvXZFcKZTQ 1474511517 Received: from [192.168.8.161] (207-118-211-133.dyn.centurytel.net [207.118.211.133]) by mail.messagingengine.com (Postfix) with ESMTPA id 3FF5AF2C38; Wed, 21 Sep 2016 22:31:57 -0400 (EDT) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306149 - head/sys/dev/oce From: Josh Paetzel X-Mailer: iPhone Mail (14A403) In-Reply-To: <201609220025.u8M0PNAi021031@repo.freebsd.org> Date: Wed, 21 Sep 2016 21:31:56 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <7E868E48-9F1A-4C25-A2E7-6ADDDBCD5BAC@tcbug.org> References: <201609220025.u8M0PNAi021031@repo.freebsd.org> To: "Conrad E. Meyer" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 02:31:59 -0000 Thanks. I've investigated now. The disk filled up on the machine I ran make u= niverse on which inexplicably caused it to report builds had succeeded. The v= endor patch was clearly missing a header file and can't possibly build. Thanks, Josh Paetzel > On Sep 21, 2016, at 7:25 PM, Conrad E. Meyer wrote: >=20 > Author: cem > Date: Thu Sep 22 00:25:23 2016 > New Revision: 306149 > URL: https://svnweb.freebsd.org/changeset/base/306149 >=20 > Log: > Revert r306148 to fix build >=20 > Requested by: jpaetzel > Reported by: Larry Rosenman , Jenkins >=20 > Modified: > head/sys/dev/oce/oce_hw.c > head/sys/dev/oce/oce_hw.h > head/sys/dev/oce/oce_if.c > head/sys/dev/oce/oce_if.h > head/sys/dev/oce/oce_mbox.c > head/sys/dev/oce/oce_queue.c > head/sys/dev/oce/oce_sysctl.c >=20 > Modified: head/sys/dev/oce/oce_hw.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/dev/oce/oce_hw.c Wed Sep 21 22:53:16 2016 (r306148) > +++ head/sys/dev/oce/oce_hw.c Thu Sep 22 00:25:23 2016 (r306149) > @@ -393,11 +393,6 @@ oce_create_nw_interface(POCE_SOFTC sc) > if (IS_SH(sc) || IS_XE201(sc)) > capab_flags |=3D MBX_RX_IFACE_FLAGS_MULTICAST; >=20 > - if (sc->enable_hwlro) { > - capab_flags |=3D MBX_RX_IFACE_FLAGS_LRO; > - capab_en_flags |=3D MBX_RX_IFACE_FLAGS_LRO; > - } > - > /* enable capabilities controlled via driver startup parameters */ > if (is_rss_enabled(sc)) > capab_en_flags |=3D MBX_RX_IFACE_FLAGS_RSS; >=20 > Modified: head/sys/dev/oce/oce_hw.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/dev/oce/oce_hw.h Wed Sep 21 22:53:16 2016 (r306148) > +++ head/sys/dev/oce/oce_hw.h Thu Sep 22 00:25:23 2016 (r306149) > @@ -111,9 +111,6 @@ > #define PD_MPU_MBOX_DB 0x0160 > #define PD_MQ_DB 0x0140 >=20 > -#define DB_OFFSET 0xc0 > -#define DB_LRO_RQ_ID_MASK 0x7FF > - > /* EQE completion types */ > #define EQ_MINOR_CODE_COMPLETION 0x00 > #define EQ_MINOR_CODE_OTHER 0x01 > @@ -183,7 +180,6 @@ > #define ASYNC_EVENT_GRP5 0x5 > #define ASYNC_EVENT_CODE_DEBUG 0x6 > #define ASYNC_EVENT_PVID_STATE 0x3 > -#define ASYNC_EVENT_OS2BMC 0x5 > #define ASYNC_EVENT_DEBUG_QNQ 0x1 > #define ASYNC_EVENT_CODE_SLIPORT 0x11 > #define VLAN_VID_MASK 0x0FFF > @@ -726,34 +722,6 @@ struct oce_async_cqe_link_state { > } u0; > }; >=20 > -/* OS2BMC async event */ > -struct oce_async_evt_grp5_os2bmc { > - union { > - struct { > - uint32_t lrn_enable:1; > - uint32_t lrn_disable:1; > - uint32_t mgmt_enable:1; > - uint32_t mgmt_disable:1; > - uint32_t rsvd0:12; > - uint32_t vlan_tag:16; > - uint32_t arp_filter:1; > - uint32_t dhcp_client_filt:1; > - uint32_t dhcp_server_filt:1; > - uint32_t net_bios_filt:1; > - uint32_t rsvd1:3; > - uint32_t bcast_filt:1; > - uint32_t ipv6_nbr_filt:1; > - uint32_t ipv6_ra_filt:1; > - uint32_t ipv6_ras_filt:1; > - uint32_t rsvd2[4]; > - uint32_t mcast_filt:1; > - uint32_t rsvd3:16; > - uint32_t evt_tag; > - uint32_t dword3; > - } s; > - uint32_t dword[4]; > - } u; > -}; >=20 > /* PVID aync event */ > struct oce_async_event_grp5_pvid_state { > @@ -1428,7 +1396,7 @@ typedef union oce_cq_ctx_u { > uint32_t dw5rsvd3:1; > uint32_t eventable:1; > /* dw6 */ > - uint32_t eq_id:16; > + uint32_t eq_id:8; > uint32_t dw6rsvd1:15; > uint32_t armed:1; > /* dw7 */ > @@ -2435,8 +2403,8 @@ struct oce_nic_hdr_wqe { > uint32_t tcpcs:1; > uint32_t udpcs:1; > uint32_t ipcs:1; > - uint32_t mgmt:1; > - uint32_t lso6:1; > + uint32_t rsvd3:1; > + uint32_t rsvd2:1; > uint32_t forward:1; > uint32_t crc:1; > uint32_t event:1; > @@ -2458,8 +2426,8 @@ struct oce_nic_hdr_wqe { > uint32_t event:1; > uint32_t crc:1; > uint32_t forward:1; > - uint32_t lso6:1; > - uint32_t mgmt:1; > + uint32_t rsvd2:1; > + uint32_t rsvd3:1; > uint32_t ipcs:1; > uint32_t udpcs:1; > uint32_t tcpcs:1; > @@ -3042,53 +3010,6 @@ struct oce_rxf_stats_v0 { > uint32_t rsvd1[6]; > }; >=20 > -struct oce_port_rxf_stats_v2 { > - uint32_t rsvd0[10]; > - uint32_t roce_bytes_received_lsd; > - uint32_t roce_bytes_received_msd; > - uint32_t rsvd1[5]; > - uint32_t roce_frames_received; > - uint32_t rx_crc_errors; > - uint32_t rx_alignment_symbol_errors; > - uint32_t rx_pause_frames; > - uint32_t rx_priority_pause_frames; > - uint32_t rx_control_frames; > - uint32_t rx_in_range_errors; > - uint32_t rx_out_range_errors; > - uint32_t rx_frame_too_long; > - uint32_t rx_address_match_errors; > - uint32_t rx_dropped_too_small; > - uint32_t rx_dropped_too_short; > - uint32_t rx_dropped_header_too_small; > - uint32_t rx_dropped_tcp_length; > - uint32_t rx_dropped_runt; > - uint32_t rsvd2[10]; > - uint32_t rx_ip_checksum_errs; > - uint32_t rx_tcp_checksum_errs; > - uint32_t rx_udp_checksum_errs; > - uint32_t rsvd3[7]; > - uint32_t rx_switched_unicast_packets; > - uint32_t rx_switched_multicast_packets; > - uint32_t rx_switched_broadcast_packets; > - uint32_t rsvd4[3]; > - uint32_t tx_pauseframes; > - uint32_t tx_priority_pauseframes; > - uint32_t tx_controlframes; > - uint32_t rsvd5[10]; > - uint32_t rxpp_fifo_overflow_drop; > - uint32_t rx_input_fifo_overflow_drop; > - uint32_t pmem_fifo_overflow_drop; > - uint32_t jabber_events; > - uint32_t rsvd6[3]; > - uint32_t rx_drops_payload_size; > - uint32_t rx_drops_clipped_header; > - uint32_t rx_drops_crc; > - uint32_t roce_drops_payload_len; > - uint32_t roce_drops_crc; > - uint32_t rsvd7[19]; > -}; > - > - > struct oce_port_rxf_stats_v1 { > uint32_t rsvd0[12]; > uint32_t rx_crc_errors; > @@ -3125,20 +3046,6 @@ struct oce_port_rxf_stats_v1 { > uint32_t rsvd5[3]; > }; >=20 > -struct oce_rxf_stats_v2 { > - struct oce_port_rxf_stats_v2 port[4]; > - uint32_t rsvd0[2]; > - uint32_t rx_drops_no_pbuf; > - uint32_t rx_drops_no_txpb; > - uint32_t rx_drops_no_erx_descr; > - uint32_t rx_drops_no_tpre_descr; > - uint32_t rsvd1[6]; > - uint32_t rx_drops_too_many_frags; > - uint32_t rx_drops_invalid_ring; > - uint32_t forwarded_packets; > - uint32_t rx_drops_mtu; > - uint32_t rsvd2[35]; > -}; >=20 > struct oce_rxf_stats_v1 { > struct oce_port_rxf_stats_v1 port[4]; > @@ -3155,11 +3062,6 @@ struct oce_rxf_stats_v1 { > uint32_t rsvd2[14]; > }; >=20 > -struct oce_erx_stats_v2 { > - uint32_t rx_drops_no_fragments[136]; > - uint32_t rsvd[3]; > -}; > - > struct oce_erx_stats_v1 { > uint32_t rx_drops_no_fragments[68]; > uint32_t rsvd[4]; > @@ -3176,15 +3078,6 @@ struct oce_pmem_stats { > uint32_t rsvd[5]; > }; >=20 > -struct oce_hw_stats_v2 { > - struct oce_rxf_stats_v2 rxf; > - uint32_t rsvd0[OCE_TXP_SW_SZ]; > - struct oce_erx_stats_v2 erx; > - struct oce_pmem_stats pmem; > - uint32_t rsvd1[18]; > -}; > - > - > struct oce_hw_stats_v1 { > struct oce_rxf_stats_v1 rxf; > uint32_t rsvd0[OCE_TXP_SW_SZ]; > @@ -3200,22 +3093,32 @@ struct oce_hw_stats_v0 { > struct oce_pmem_stats pmem; > }; >=20 > -#define MBX_GET_NIC_STATS(version) \ > - struct mbx_get_nic_stats_v##version { \ > - struct mbx_hdr hdr; \ > - union { \ > - struct { \ > - uint32_t rsvd0; \ > - } req; \ > - union { \ > - struct oce_hw_stats_v##version stats; \ > - } rsp; \ > - } params; \ > -} =20 > - > -MBX_GET_NIC_STATS(0); > -MBX_GET_NIC_STATS(1); > -MBX_GET_NIC_STATS(2); > +struct mbx_get_nic_stats_v0 { > + struct mbx_hdr hdr; > + union { > + struct { > + uint32_t rsvd0; > + } req; > + > + union { > + struct oce_hw_stats_v0 stats; > + } rsp; > + } params; > +}; > + > +struct mbx_get_nic_stats { > + struct mbx_hdr hdr; > + union { > + struct { > + uint32_t rsvd0; > + } req; > + =20 > + struct { > + struct oce_hw_stats_v1 stats; > + } rsp; > + } params; > +}; > + >=20 > /* [18(0x12)] NIC_GET_PPORT_STATS */ > struct pport_stats { > @@ -3825,373 +3728,3 @@ enum OCE_QUEUE_RX_STATS { > QUEUE_RX_BUFFER_ERRORS =3D 8, > QUEUE_RX_N_WORDS =3D 10 > }; > - > -/* HW LRO structures */ > -struct mbx_nic_query_lro_capabilities { > - struct mbx_hdr hdr; > - union { > - struct { > - uint32_t rsvd[6]; > - } req; > - struct { > -#ifdef _BIG_ENDIAN > - uint32_t lro_flags; > - uint16_t lro_rq_cnt; > - uint16_t plro_max_offload; > - uint32_t rsvd[4]; > -#else > - uint32_t lro_flags; > - uint16_t plro_max_offload; > - uint16_t lro_rq_cnt; > - uint32_t rsvd[4]; > -#endif > - } rsp; > - } params; > -}; > - > -struct mbx_nic_set_iface_lro_config { > - struct mbx_hdr hdr; > - union { > - struct { > -#ifdef _BIG_ENDIAN > - uint32_t lro_flags; > - uint32_t iface_id; > - uint32_t max_clsc_byte_cnt; > - uint32_t max_clsc_seg_cnt; > - uint32_t max_clsc_usec_delay; > - uint32_t min_clsc_frame_byte_cnt; > - uint32_t rsvd[2]; > -#else > - uint32_t lro_flags; > - uint32_t iface_id; > - uint32_t max_clsc_byte_cnt; > - uint32_t max_clsc_seg_cnt; > - uint32_t max_clsc_usec_delay; > - uint32_t min_clsc_frame_byte_cnt; > - uint32_t rsvd[2]; > -#endif > - } req; > - struct { > -#ifdef _BIG_ENDIAN > - uint32_t lro_flags; > - uint32_t rsvd[7]; > -#else > - uint32_t lro_flags; > - uint32_t rsvd[7]; > -#endif > - } rsp; > - } params; > -}; > - > - > -struct mbx_create_nic_rq_v2 { > - struct mbx_hdr hdr; > - union { > - struct { > -#ifdef _BIG_ENDIAN > - uint8_t num_pages; > - uint8_t frag_size; > - uint16_t cq_id; > - > - uint32_t if_id; > - > - uint16_t page_size; > - uint16_t max_frame_size; > - > - uint16_t rsvd; > - uint16_t pd_id; > - > - uint16_t rsvd1; > - uint16_t rq_flags; > - > - uint16_t hds_fixed_offset; > - uint8_t hds_start; > - uint8_t hds_frag; > - > - uint16_t hds_backfill_size; > - uint16_t hds_frag_size; > - > - uint32_t rbq_id; > - > - uint32_t rsvd2[8]; > - > - struct phys_addr pages[2]; > -#else > - uint16_t cq_id; > - uint8_t frag_size; > - uint8_t num_pages; > - > - uint32_t if_id; > - > - uint16_t max_frame_size; > - uint16_t page_size; > - > - uint16_t pd_id; > - uint16_t rsvd; > - > - uint16_t rq_flags; > - uint16_t rsvd1; > - > - uint8_t hds_frag; > - uint8_t hds_start; > - uint16_t hds_fixed_offset; > - > - uint16_t hds_frag_size; > - uint16_t hds_backfill_size; > - > - uint32_t rbq_id; > - > - uint32_t rsvd2[8]; > - > - struct phys_addr pages[2]; > -#endif > - } req; > - struct { > -#ifdef _BIG_ENDIAN > - uint8_t rsvd0; > - uint8_t rss_cpuid; > - uint16_t rq_id; > - > - uint8_t db_format; > - uint8_t db_reg_set; > - uint16_t rsvd1; > - > - uint32_t db_offset; > - > - uint32_t rsvd2; > - > - uint16_t rsvd3; > - uint16_t rq_flags; > - > -#else > - uint16_t rq_id; > - uint8_t rss_cpuid; > - uint8_t rsvd0; > - > - uint16_t rsvd1; > - uint8_t db_reg_set; > - uint8_t db_format; > - > - uint32_t db_offset; > - > - uint32_t rsvd2; > - > - uint16_t rq_flags; > - uint16_t rsvd3; > -#endif > - } rsp; > - > - } params; > -}; > - > -struct mbx_delete_nic_rq_v1 { > - struct mbx_hdr hdr; > - union { > - struct { > -#ifdef _BIG_ENDIAN > - uint16_t bypass_flush; > - uint16_t rq_id; > - uint16_t rsvd; > - uint16_t rq_flags; > -#else > - uint16_t rq_id; > - uint16_t bypass_flush; > - uint16_t rq_flags; > - uint16_t rsvd; > -#endif > - } req; > - struct { > - uint32_t rsvd[2]; > - } rsp; > - } params; > -}; > - > -struct nic_hwlro_singleton_cqe { > -#ifdef _BIG_ENDIAN > - /* dw 0 */ > - uint32_t ip_opt:1; > - uint32_t vtp:1; > - uint32_t pkt_size:14; > - uint32_t vlan_tag:16; > - > - /* dw 1 */ > - uint32_t num_frags:3; > - uint32_t rsvd1:3; > - uint32_t frag_index:10; > - uint32_t rsvd:8; > - uint32_t ipv6_frame:1; > - uint32_t l4_cksum_pass:1; > - uint32_t ip_cksum_pass:1; > - uint32_t udpframe:1; > - uint32_t tcpframe:1; > - uint32_t ipframe:1; > - uint32_t rss_hp:1; > - uint32_t error:1; > - > - /* dw 2 */ > - uint32_t valid:1; > - uint32_t cqe_type:2; > - uint32_t debug:7; > - uint32_t rsvd4:6; > - uint32_t data_offset:8; > - uint32_t rsvd3:3; > - uint32_t rss_bank:1; > - uint32_t qnq:1; > - uint32_t rsvd2:3; > - =20 > - /* dw 3 */ > - uint32_t rss_hash_value; > -#else > - /* dw 0 */ > - uint32_t vlan_tag:16; > - uint32_t pkt_size:14; > - uint32_t vtp:1; > - uint32_t ip_opt:1; > - > - /* dw 1 */ > - uint32_t error:1; > - uint32_t rss_hp:1; > - uint32_t ipframe:1; > - uint32_t tcpframe:1; > - uint32_t udpframe:1; > - uint32_t ip_cksum_pass:1; > - uint32_t l4_cksum_pass:1; > - uint32_t ipv6_frame:1; > - uint32_t rsvd:8; > - uint32_t frag_index:10; > - uint32_t rsvd1:3; > - uint32_t num_frags:3; > - > - /* dw 2 */ > - uint32_t rsvd2:3; > - uint32_t qnq:1; > - uint32_t rss_bank:1; > - uint32_t rsvd3:3; > - uint32_t data_offset:8; > - uint32_t rsvd4:6; > - uint32_t debug:7; > - uint32_t cqe_type:2; > - uint32_t valid:1; > -=20 > - /* dw 3 */ > - uint32_t rss_hash_value; > -#endif > -}; > - > -struct nic_hwlro_cqe_part1 { > -#ifdef _BIG_ENDIAN > - /* dw 0 */ > - uint32_t tcp_timestamp_val; > - > - /* dw 1 */ > - uint32_t tcp_timestamp_ecr; > - > - /* dw 2 */ > - uint32_t valid:1; > - uint32_t cqe_type:2; > - uint32_t rsvd3:7; > - uint32_t rss_policy:4; > - uint32_t rsvd2:2; > - uint32_t data_offset:8; > - uint32_t rsvd1:1; > - uint32_t lro_desc:1; > - uint32_t lro_timer_pop:1; > - uint32_t rss_bank:1; > - uint32_t qnq:1; > - uint32_t rsvd:2; > - uint32_t rss_flush:1; > - > - /* dw 3 */ > - uint32_t rss_hash_value; > -#else > - /* dw 0 */ > - uint32_t tcp_timestamp_val; > - > - /* dw 1 */ > - uint32_t tcp_timestamp_ecr; > - > - /* dw 2 */ > - uint32_t rss_flush:1; > - uint32_t rsvd:2; > - uint32_t qnq:1; > - uint32_t rss_bank:1; > - uint32_t lro_timer_pop:1; > - uint32_t lro_desc:1; > - uint32_t rsvd1:1; > - uint32_t data_offset:8; > - uint32_t rsvd2:2; > - uint32_t rss_policy:4; > - uint32_t rsvd3:7; > - uint32_t cqe_type:2; > - uint32_t valid:1; > - > - /* dw 3 */ > - uint32_t rss_hash_value; > -#endif > -}; > - > -struct nic_hwlro_cqe_part2 { > -#ifdef _BIG_ENDIAN > - /* dw 0 */ > - uint32_t ip_opt:1; > - uint32_t vtp:1; > - uint32_t pkt_size:14; > - uint32_t vlan_tag:16; > - > - /* dw 1 */ > - uint32_t tcp_window:16; > - uint32_t coalesced_size:16; > - =20 > - /* dw 2 */ > - uint32_t valid:1; > - uint32_t cqe_type:2; > - uint32_t rsvd:2; > - uint32_t push:1; > - uint32_t ts_opt:1; > - uint32_t threshold:1; > - uint32_t seg_cnt:8; > - uint32_t frame_lifespan:8; > - uint32_t ipv6_frame:1; > - uint32_t l4_cksum_pass:1; > - uint32_t ip_cksum_pass:1; > - uint32_t udpframe:1; > - uint32_t tcpframe:1; > - uint32_t ipframe:1; > - uint32_t rss_hp:1; > - uint32_t error:1; > - =20 > - /* dw 3 */ > - uint32_t tcp_ack_num; > -#else > - /* dw 0 */ > - uint32_t vlan_tag:16; > - uint32_t pkt_size:14; > - uint32_t vtp:1; > - uint32_t ip_opt:1; > - > - /* dw 1 */ > - uint32_t coalesced_size:16; > - uint32_t tcp_window:16; > - > - /* dw 2 */ > - uint32_t error:1; > - uint32_t rss_hp:1; > - uint32_t ipframe:1; > - uint32_t tcpframe:1; > - uint32_t udpframe:1; > - uint32_t ip_cksum_pass:1; > - uint32_t l4_cksum_pass:1; > - uint32_t ipv6_frame:1; > - uint32_t frame_lifespan:8; > - uint32_t seg_cnt:8; > - uint32_t threshold:1; > - uint32_t ts_opt:1; > - uint32_t push:1; > - uint32_t rsvd:2; > - uint32_t cqe_type:2; > - uint32_t valid:1; > - > - /* dw 3 */ > - uint32_t tcp_ack_num; > -#endif > -}; >=20 > Modified: head/sys/dev/oce/oce_if.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/dev/oce/oce_if.c Wed Sep 21 22:53:16 2016 (r306148) > +++ head/sys/dev/oce/oce_if.c Thu Sep 22 00:25:23 2016 (r306149) > @@ -42,92 +42,77 @@ > #include "opt_inet.h" >=20 > #include "oce_if.h" > -#include "oce_user.h" > - > -#define is_tso_pkt(m) (m->m_pkthdr.csum_flags & CSUM_TSO) >=20 > /* UE Status Low CSR */ > static char *ue_status_low_desc[] =3D { > - "CEV", > - "CTX", > - "DBUF", > - "ERX", > - "Host", > - "MPU", > - "NDMA", > - "PTC ", > - "RDMA ", > - "RXF ", > - "RXIPS ", > - "RXULP0 ", > - "RXULP1 ", > - "RXULP2 ", > - "TIM ", > - "TPOST ", > - "TPRE ", > - "TXIPS ", > - "TXULP0 ", > - "TXULP1 ", > - "UC ", > - "WDMA ", > - "TXULP2 ", > - "HOST1 ", > - "P0_OB_LINK ", > - "P1_OB_LINK ", > - "HOST_GPIO ", > - "MBOX ", > - "AXGMAC0", > - "AXGMAC1", > - "JTAG", > - "MPU_INTPEND" > + "CEV", > + "CTX", > + "DBUF", > + "ERX", > + "Host", > + "MPU", > + "NDMA", > + "PTC ", > + "RDMA ", > + "RXF ", > + "RXIPS ", > + "RXULP0 ", > + "RXULP1 ", > + "RXULP2 ", > + "TIM ", > + "TPOST ", > + "TPRE ", > + "TXIPS ", > + "TXULP0 ", > + "TXULP1 ", > + "UC ", > + "WDMA ", > + "TXULP2 ", > + "HOST1 ", > + "P0_OB_LINK ", > + "P1_OB_LINK ", > + "HOST_GPIO ", > + "MBOX ", > + "AXGMAC0", > + "AXGMAC1", > + "JTAG", > + "MPU_INTPEND" > }; >=20 > /* UE Status High CSR */ > static char *ue_status_hi_desc[] =3D { > - "LPCMEMHOST", > - "MGMT_MAC", > - "PCS0ONLINE", > - "MPU_IRAM", > - "PCS1ONLINE", > - "PCTL0", > - "PCTL1", > - "PMEM", > - "RR", > - "TXPB", > - "RXPP", > - "XAUI", > - "TXP", > - "ARM", > - "IPC", > - "HOST2", > - "HOST3", > - "HOST4", > - "HOST5", > - "HOST6", > - "HOST7", > - "HOST8", > - "HOST9", > - "NETC", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown", > - "Unknown" > -}; > - > -struct oce_common_cqe_info{ > - uint8_t vtp:1; > - uint8_t l4_cksum_pass:1; > - uint8_t ip_cksum_pass:1; > - uint8_t ipv6_frame:1; > - uint8_t qnq:1; > - uint8_t rsvd:3; > - uint8_t num_frags; > - uint16_t pkt_size; > - uint16_t vtag; > + "LPCMEMHOST", > + "MGMT_MAC", > + "PCS0ONLINE", > + "MPU_IRAM", > + "PCS1ONLINE", > + "PCTL0", > + "PCTL1", > + "PMEM", > + "RR", > + "TXPB", > + "RXPP", > + "XAUI", > + "TXP", > + "ARM", > + "IPC", > + "HOST2", > + "HOST3", > + "HOST4", > + "HOST5", > + "HOST6", > + "HOST7", > + "HOST8", > + "HOST9", > + "NETC", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown", > + "Unknown" > }; >=20 >=20 > @@ -155,19 +140,17 @@ static int oce_media_change(struct ifne > /* Transmit routines prototypes */ > static int oce_tx(POCE_SOFTC sc, struct mbuf **mpp, int wq_index); > static void oce_tx_restart(POCE_SOFTC sc, struct oce_wq *wq); > -static void oce_process_tx_completion(struct oce_wq *wq); > +static void oce_tx_complete(struct oce_wq *wq, uint32_t wqe_idx, > + uint32_t status); > static int oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, > struct oce_wq *wq); >=20 > /* Receive routines prototypes */ > +static void oce_discard_rx_comp(struct oce_rq *rq, struct oce_nic_rx_cqe *= cqe); > static int oce_cqe_vtp_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); > static int oce_cqe_portid_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe= ); > -static void oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); > -static void oce_check_rx_bufs(POCE_SOFTC sc, uint32_t num_cqes, struct oc= e_rq *rq); > -static uint16_t oce_rq_handler_lro(void *arg); > -static void oce_correct_header(struct mbuf *m, struct nic_hwlro_cqe_part1= *cqe1, struct nic_hwlro_cqe_part2 *cqe2); > -static void oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singleton_cqe *= cqe, struct nic_hwlro_cqe_part2 *cqe2); > -static void oce_rx_mbuf_chain(struct oce_rq *rq, struct oce_common_cqe_in= fo *cqe_info, struct mbuf **m); > +static void oce_rx(struct oce_rq *rq, uint32_t rqe_idx, > + struct oce_nic_rx_cqe *cqe); >=20 > /* Helper function prototypes in this file */ > static int oce_attach_ifp(POCE_SOFTC sc); > @@ -186,12 +169,11 @@ static void process_link_state(POCE_SOFT > static int oce_tx_asic_stall_verify(POCE_SOFTC sc, struct mbuf *m); > static void oce_get_config(POCE_SOFTC sc); > static struct mbuf *oce_insert_vlan_tag(POCE_SOFTC sc, struct mbuf *m, boo= lean_t *complete); > -static void oce_read_env_variables(POCE_SOFTC sc); > - >=20 > /* IP specific */ > #if defined(INET6) || defined(INET) > static int oce_init_lro(POCE_SOFTC sc); > +static void oce_rx_flush_lro(struct oce_rq *rq); > static struct mbuf * oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp); > #endif >=20 > @@ -224,7 +206,7 @@ const char component_revision[32] =3D {"// > /* Module capabilites and parameters */ > uint32_t oce_max_rsp_handled =3D OCE_MAX_RSP_HANDLED; > uint32_t oce_enable_rss =3D OCE_MODCAP_RSS; > -uint32_t oce_rq_buf_size =3D 2048; > + >=20 > TUNABLE_INT("hw.oce.max_rsp_handled", &oce_max_rsp_handled); > TUNABLE_INT("hw.oce.enable_rss", &oce_enable_rss); > @@ -240,10 +222,8 @@ static uint32_t supportedDevices[] =3D { > (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_SH > }; >=20 > -POCE_SOFTC softc_head =3D NULL; > -POCE_SOFTC softc_tail =3D NULL; >=20 > -struct oce_rdma_if *oce_rdma_if =3D NULL; > + >=20 > /*************************************************************************= **** > * Driver entry points functions * > @@ -312,8 +292,7 @@ oce_attach(device_t dev) >=20 > sc->tx_ring_size =3D OCE_TX_RING_SIZE; > sc->rx_ring_size =3D OCE_RX_RING_SIZE; > - /* receive fragment size should be multiple of 2K */ > - sc->rq_frag_size =3D ((oce_rq_buf_size / 2048) * 2048); > + sc->rq_frag_size =3D OCE_RQ_BUF_SIZE; > sc->flow_control =3D OCE_DEFAULT_FLOW_CONTROL; > sc->promisc =3D OCE_DEFAULT_PROMISCUOUS; >=20 > @@ -325,8 +304,6 @@ oce_attach(device_t dev) > if (rc) > goto pci_res_free; >=20 > - oce_read_env_variables(sc); > - > oce_get_config(sc); >=20 > setup_max_queues_want(sc); =20 > @@ -364,19 +341,11 @@ oce_attach(device_t dev) >=20 > oce_add_sysctls(sc); >=20 > - callout_init(&sc->timer, CALLOUT_MPSAFE); > + callout_init(&sc->timer, 1); > rc =3D callout_reset(&sc->timer, 2 * hz, oce_local_timer, sc); > if (rc) > goto stats_free; >=20 > - sc->next =3DNULL; > - if (softc_tail !=3D NULL) { > - softc_tail->next =3D sc; > - } else { > - softc_head =3D sc; > - } > - softc_tail =3D sc; > - > return 0; >=20 > stats_free: > @@ -414,22 +383,6 @@ static int > oce_detach(device_t dev) > { > POCE_SOFTC sc =3D device_get_softc(dev); > - POCE_SOFTC poce_sc_tmp, *ppoce_sc_tmp1, poce_sc_tmp2 =3D NULL; > - > - poce_sc_tmp =3D softc_head; > - ppoce_sc_tmp1 =3D &softc_head; > - while (poce_sc_tmp !=3D NULL) { > - if (poce_sc_tmp =3D=3D sc) { > - *ppoce_sc_tmp1 =3D sc->next; > - if (sc->next =3D=3D NULL) { > - softc_tail =3D poce_sc_tmp2; > - } > - break; > - } > - poce_sc_tmp2 =3D poce_sc_tmp; > - ppoce_sc_tmp1 =3D &poce_sc_tmp->next; > - poce_sc_tmp =3D poce_sc_tmp->next; > - } >=20 > LOCK(&sc->dev_lock); > oce_if_deactivate(sc); > @@ -567,16 +520,8 @@ oce_ioctl(struct ifnet *ifp, u_long comm > oce_vid_config(sc); > } > #if defined(INET6) || defined(INET) > - if (u & IFCAP_LRO) { > + if (u & IFCAP_LRO) > ifp->if_capenable ^=3D IFCAP_LRO; > - if(sc->enable_hwlro) { > - if(ifp->if_capenable & IFCAP_LRO) { > - rc =3D oce_mbox_nic_set_iface_lro_config(sc, 1); > - }else { > - rc =3D oce_mbox_nic_set_iface_lro_config(sc, 0); > - } > - } > - } > #endif >=20 > break; > @@ -618,9 +563,6 @@ oce_multiq_start(struct ifnet *ifp, stru > int queue_index =3D 0; > int status =3D 0; >=20 > - if (!sc->link_status) > - return ENXIO; > - > if (M_HASHTYPE_GET(m) !=3D M_HASHTYPE_NONE) > queue_index =3D m->m_pkthdr.flowid % sc->nwqs; >=20 > @@ -711,41 +653,20 @@ oce_setup_intr(POCE_SOFTC sc) > { > int rc =3D 0, use_intx =3D 0; > int vector =3D 0, req_vectors =3D 0; > - int tot_req_vectors, tot_vectors; >=20 > if (is_rss_enabled(sc)) > req_vectors =3D MAX((sc->nrqs - 1), sc->nwqs); > else > req_vectors =3D 1; >=20 > - tot_req_vectors =3D req_vectors; > - if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { > - if (req_vectors > 1) { > - tot_req_vectors +=3D OCE_RDMA_VECTORS; > - sc->roce_intr_count =3D OCE_RDMA_VECTORS; > - } > - } > - > - if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { > + if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { > sc->intr_count =3D req_vectors; > - tot_vectors =3D tot_req_vectors; > - rc =3D pci_alloc_msix(sc->dev, &tot_vectors); > + rc =3D pci_alloc_msix(sc->dev, &sc->intr_count); > if (rc !=3D 0) { > use_intx =3D 1; > pci_release_msi(sc->dev); > - } else { > - if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { > - if (tot_vectors < tot_req_vectors) { > - if (sc->intr_count < (2 * OCE_RDMA_VECTORS)) { > - sc->roce_intr_count =3D (tot_vectors / 2); > - } > - sc->intr_count =3D tot_vectors - sc->roce_intr_count; > - } > - } else { > - sc->intr_count =3D tot_vectors; > - } > - sc->flags |=3D OCE_FLAGS_USING_MSIX; > - } > + } else > + sc->flags |=3D OCE_FLAGS_USING_MSIX; > } else > use_intx =3D 1; >=20 > @@ -933,79 +854,6 @@ oce_media_change(struct ifnet *ifp) > } >=20 >=20 > -static void oce_is_pkt_dest_bmc(POCE_SOFTC sc, > - struct mbuf *m, boolean_t *os2bmc, > - struct mbuf **m_new) > -{ > - struct ether_header *eh =3D NULL; > - > - eh =3D mtod(m, struct ether_header *); > - > - if (!is_os2bmc_enabled(sc) || *os2bmc) { > - *os2bmc =3D FALSE; > - goto done; > - } > - if (!ETHER_IS_MULTICAST(eh->ether_dhost)) > - goto done; >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Thu Sep 22 03:28:44 2016 Return-Path: Delivered-To: svn-src-all@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 467C3BE281E; Thu, 22 Sep 2016 03:28:44 +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 246938C4; Thu, 22 Sep 2016 03:28:44 +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 u8M3Shi6088253; Thu, 22 Sep 2016 03:28:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M3Sh5J088251; Thu, 22 Sep 2016 03:28:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609220328.u8M3Sh5J088251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Sep 2016 03:28: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: r306150 - stable/11/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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 03:28:44 -0000 Author: mav Date: Thu Sep 22 03:28:43 2016 New Revision: 306150 URL: https://svnweb.freebsd.org/changeset/base/306150 Log: MFC r305591: Decode ATA Status Return descriptor. Modified: 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/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.c Thu Sep 22 00:25:23 2016 (r306149) +++ stable/11/sys/cam/scsi/scsi_all.c Thu Sep 22 03:28:43 2016 (r306150) @@ -4652,6 +4652,53 @@ scsi_sense_progress_sbuf(struct sbuf *sb scsi_progress_sbuf(sb, progress_val); } +void +scsi_sense_ata_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, + u_int sense_len, uint8_t *cdb, int cdb_len, + struct scsi_inquiry_data *inq_data, + struct scsi_sense_desc_header *header) +{ + struct scsi_sense_ata_ret_desc *res; + + res = (struct scsi_sense_ata_ret_desc *)header; + + sbuf_printf(sb, "ATA status: %02x (%s%s%s%s%s%s%s%s), ", + res->status, + (res->status & 0x80) ? "BSY " : "", + (res->status & 0x40) ? "DRDY " : "", + (res->status & 0x20) ? "DF " : "", + (res->status & 0x10) ? "SERV " : "", + (res->status & 0x08) ? "DRQ " : "", + (res->status & 0x04) ? "CORR " : "", + (res->status & 0x02) ? "IDX " : "", + (res->status & 0x01) ? "ERR" : ""); + if (res->status & 1) { + sbuf_printf(sb, "error: %02x (%s%s%s%s%s%s%s%s), ", + res->error, + (res->error & 0x80) ? "ICRC " : "", + (res->error & 0x40) ? "UNC " : "", + (res->error & 0x20) ? "MC " : "", + (res->error & 0x10) ? "IDNF " : "", + (res->error & 0x08) ? "MCR " : "", + (res->error & 0x04) ? "ABRT " : "", + (res->error & 0x02) ? "NM " : "", + (res->error & 0x01) ? "ILI" : ""); + } + + if (res->flags & SSD_DESC_ATA_FLAG_EXTEND) { + sbuf_printf(sb, "count: %02x%02x, ", + res->count_15_8, res->count_7_0); + sbuf_printf(sb, "LBA: %02x%02x%02x%02x%02x%02x, ", + res->lba_47_40, res->lba_39_32, res->lba_31_24, + res->lba_23_16, res->lba_15_8, res->lba_7_0); + } else { + sbuf_printf(sb, "count: %02x, ", res->count_7_0); + sbuf_printf(sb, "LBA: %02x%02x%02x, ", + res->lba_23_16, res->lba_15_8, res->lba_7_0); + } + sbuf_printf(sb, "device: %02x, ", res->device); +} + /* * Generic sense descriptor printing routine. This is used when we have * not yet implemented a specific printing routine for this descriptor. @@ -4698,6 +4745,7 @@ struct scsi_sense_desc_printer { {SSD_DESC_FRU, scsi_sense_fru_sbuf}, {SSD_DESC_STREAM, scsi_sense_stream_sbuf}, {SSD_DESC_BLOCK, scsi_sense_block_sbuf}, + {SSD_DESC_ATA, scsi_sense_ata_sbuf}, {SSD_DESC_PROGRESS, scsi_sense_progress_sbuf} }; Modified: stable/11/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.h Thu Sep 22 00:25:23 2016 (r306149) +++ stable/11/sys/cam/scsi/scsi_all.h Thu Sep 22 03:28:43 2016 (r306150) @@ -3682,6 +3682,10 @@ void scsi_sense_progress_sbuf(struct sbu u_int sense_len, uint8_t *cdb, int cdb_len, struct scsi_inquiry_data *inq_data, struct scsi_sense_desc_header *header); +void scsi_sense_ata_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, + u_int sense_len, uint8_t *cdb, int cdb_len, + struct scsi_inquiry_data *inq_data, + struct scsi_sense_desc_header *header); void scsi_sense_generic_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, u_int sense_len, uint8_t *cdb, int cdb_len, struct scsi_inquiry_data *inq_data, From owner-svn-src-all@freebsd.org Thu Sep 22 03:29:48 2016 Return-Path: Delivered-To: svn-src-all@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 D27DABE2920; Thu, 22 Sep 2016 03:29:48 +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 A1742A33; Thu, 22 Sep 2016 03:29: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 u8M3TlQe088349; Thu, 22 Sep 2016 03:29:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M3TlIh088348; Thu, 22 Sep 2016 03:29:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609220329.u8M3TlIh088348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Sep 2016 03:29: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: r306151 - stable/11/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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 03:29:48 -0000 Author: mav Date: Thu Sep 22 03:29:47 2016 New Revision: 306151 URL: https://svnweb.freebsd.org/changeset/base/306151 Log: MFC r305608: "ATA pass through information available" is not an error. Modified: stable/11/sys/cam/scsi/scsi_all.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.c Thu Sep 22 03:28:43 2016 (r306150) +++ stable/11/sys/cam/scsi/scsi_all.c Thu Sep 22 03:29:47 2016 (r306151) @@ -1056,7 +1056,7 @@ static struct asc_table_entry asc_table[ { SST(0x00, 0x1C, SS_RDEF, /* XXX TBD */ "Verify operation in progress") }, /* DT B */ - { SST(0x00, 0x1D, SS_RDEF, /* XXX TBD */ + { SST(0x00, 0x1D, SS_NOP, "ATA pass through information available") }, /* DT R MAEBKV */ { SST(0x00, 0x1E, SS_RDEF, /* XXX TBD */ From owner-svn-src-all@freebsd.org Thu Sep 22 03:30:30 2016 Return-Path: Delivered-To: svn-src-all@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 2B798BE29F5; Thu, 22 Sep 2016 03:30:30 +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 EF8BCBA7; Thu, 22 Sep 2016 03:30:29 +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 u8M3UTPm088450; Thu, 22 Sep 2016 03:30:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M3UT9X088449; Thu, 22 Sep 2016 03:30:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609220330.u8M3UT9X088449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Sep 2016 03:30: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: r306152 - stable/11/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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 03:30:30 -0000 Author: mav Date: Thu Sep 22 03:30:28 2016 New Revision: 306152 URL: https://svnweb.freebsd.org/changeset/base/306152 Log: MFC r305609: "Extended copy information available" is not an error either. Modified: stable/11/sys/cam/scsi/scsi_all.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.c Thu Sep 22 03:29:47 2016 (r306151) +++ stable/11/sys/cam/scsi/scsi_all.c Thu Sep 22 03:30:28 2016 (r306152) @@ -1065,7 +1065,7 @@ static struct asc_table_entry asc_table[ { SST(0x00, 0x1F, SS_RDEF, /* XXX TBD */ "Logical unit transitioning to another power condition") }, /* DT P B */ - { SST(0x00, 0x20, SS_RDEF, /* XXX TBD */ + { SST(0x00, 0x20, SS_NOP, "Extended copy information available") }, /* D */ { SST(0x00, 0x21, SS_RDEF, /* XXX TBD */ From owner-svn-src-all@freebsd.org Thu Sep 22 03:31:15 2016 Return-Path: Delivered-To: svn-src-all@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 DFC65BE2ABD; Thu, 22 Sep 2016 03:31:15 +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 A9C2ED9C; Thu, 22 Sep 2016 03:31:15 +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 u8M3VECZ089999; Thu, 22 Sep 2016 03:31:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M3VEJb089998; Thu, 22 Sep 2016 03:31:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609220331.u8M3VEJb089998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Sep 2016 03:31: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: r306153 - stable/11/sys/cam X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 03:31:16 -0000 Author: mav Date: Thu Sep 22 03:31:14 2016 New Revision: 306153 URL: https://svnweb.freebsd.org/changeset/base/306153 Log: MFC r305610: Don't report to devd statuses that CAM doesn't consider errors. Some statuses, such as "ATA pass through information available", are part part of absolutely normal operation and do not worth reporting. Modified: stable/11/sys/cam/cam_periph.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_periph.c ============================================================================== --- stable/11/sys/cam/cam_periph.c Thu Sep 22 03:30:28 2016 (r306152) +++ stable/11/sys/cam/cam_periph.c Thu Sep 22 03:31:14 2016 (r306153) @@ -1772,7 +1772,7 @@ cam_periph_error(union ccb *ccb, cam_fla xpt_print(ccb->ccb_h.path, "Retrying command\n"); } - if (devctl_err) + if (devctl_err && (error != 0 || (action & SSQ_PRINT_SENSE) != 0)) cam_periph_devctl_notify(orig_ccb); if ((action & SSQ_LOST) != 0) { From owner-svn-src-all@freebsd.org Thu Sep 22 03:33:48 2016 Return-Path: Delivered-To: svn-src-all@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 F3FEABE2FB9; Thu, 22 Sep 2016 03:33:47 +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 BDA091BF; Thu, 22 Sep 2016 03:33:47 +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 u8M3XkLQ092166; Thu, 22 Sep 2016 03:33:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M3XkOL092165; Thu, 22 Sep 2016 03:33:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609220333.u8M3XkOL092165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Sep 2016 03:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306154 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 03:33:48 -0000 Author: mav Date: Thu Sep 22 03:33:46 2016 New Revision: 306154 URL: https://svnweb.freebsd.org/changeset/base/306154 Log: MFC r305608: "ATA pass through information available" is not an error. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Thu Sep 22 03:31:14 2016 (r306153) +++ stable/10/sys/cam/scsi/scsi_all.c Thu Sep 22 03:33:46 2016 (r306154) @@ -1055,7 +1055,7 @@ static struct asc_table_entry asc_table[ { SST(0x00, 0x1C, SS_RDEF, /* XXX TBD */ "Verify operation in progress") }, /* DT B */ - { SST(0x00, 0x1D, SS_RDEF, /* XXX TBD */ + { SST(0x00, 0x1D, SS_NOP, "ATA pass through information available") }, /* DT R MAEBKV */ { SST(0x00, 0x1E, SS_RDEF, /* XXX TBD */ From owner-svn-src-all@freebsd.org Thu Sep 22 03:34:27 2016 Return-Path: Delivered-To: svn-src-all@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 3048EBE3099; Thu, 22 Sep 2016 03:34:27 +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 031A7362; Thu, 22 Sep 2016 03:34:26 +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 u8M3YQhU092247; Thu, 22 Sep 2016 03:34:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M3YQJN092246; Thu, 22 Sep 2016 03:34:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609220334.u8M3YQJN092246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Sep 2016 03:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306155 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 03:34:27 -0000 Author: mav Date: Thu Sep 22 03:34:26 2016 New Revision: 306155 URL: https://svnweb.freebsd.org/changeset/base/306155 Log: MFC r305609: "Extended copy information available" is not an error either. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Thu Sep 22 03:33:46 2016 (r306154) +++ stable/10/sys/cam/scsi/scsi_all.c Thu Sep 22 03:34:26 2016 (r306155) @@ -1064,7 +1064,7 @@ static struct asc_table_entry asc_table[ { SST(0x00, 0x1F, SS_RDEF, /* XXX TBD */ "Logical unit transitioning to another power condition") }, /* DT P B */ - { SST(0x00, 0x20, SS_RDEF, /* XXX TBD */ + { SST(0x00, 0x20, SS_NOP, "Extended copy information available") }, /* D */ { SST(0x00, 0x21, SS_RDEF, /* XXX TBD */ From owner-svn-src-all@freebsd.org Thu Sep 22 03:35:03 2016 Return-Path: Delivered-To: svn-src-all@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 ACE5CBE318B; Thu, 22 Sep 2016 03:35:03 +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 7A21574F; Thu, 22 Sep 2016 03:35:03 +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 u8M3Z29c092334; Thu, 22 Sep 2016 03:35:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M3Z2s8092333; Thu, 22 Sep 2016 03:35:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609220335.u8M3Z2s8092333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Sep 2016 03:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306156 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 03:35:03 -0000 Author: mav Date: Thu Sep 22 03:35:02 2016 New Revision: 306156 URL: https://svnweb.freebsd.org/changeset/base/306156 Log: MFC r305610: Don't report to devd statuses that CAM doesn't consider errors. Some statuses, such as "ATA pass through information available", are part part of absolutely normal operation and do not worth reporting. Modified: stable/10/sys/cam/cam_periph.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_periph.c ============================================================================== --- stable/10/sys/cam/cam_periph.c Thu Sep 22 03:34:26 2016 (r306155) +++ stable/10/sys/cam/cam_periph.c Thu Sep 22 03:35:02 2016 (r306156) @@ -1772,7 +1772,7 @@ cam_periph_error(union ccb *ccb, cam_fla xpt_print(ccb->ccb_h.path, "Retrying command\n"); } - if (devctl_err) + if (devctl_err && (error != 0 || (action & SSQ_PRINT_SENSE) != 0)) cam_periph_devctl_notify(orig_ccb); if ((action & SSQ_LOST) != 0) { From owner-svn-src-all@freebsd.org Thu Sep 22 04:49:32 2016 Return-Path: Delivered-To: svn-src-all@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 9FE62BE2080; Thu, 22 Sep 2016 04:49:32 +0000 (UTC) (envelope-from markj@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 6F0911B6F; Thu, 22 Sep 2016 04:49:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M4nVLV018345; Thu, 22 Sep 2016 04:49:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M4nVRt018344; Thu, 22 Sep 2016 04:49:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609220449.u8M4nVRt018344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 22 Sep 2016 04:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306157 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 04:49:32 -0000 Author: markj Date: Thu Sep 22 04:49:31 2016 New Revision: 306157 URL: https://svnweb.freebsd.org/changeset/base/306157 Log: Annotate syscall provider pointer arguments with the "userland" keyword. This causes dtrace to automatically copyin arguments from userland, so one no longer has to explicitly use the copyin() action to do so. Moreover, copyin() on userland addresses is a no-op, so existing scripts should be unaffected by this change. Discussed with: rstone MFC after: 2 weeks Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Thu Sep 22 03:35:02 2016 (r306156) +++ head/sys/kern/makesyscalls.sh Thu Sep 22 04:49:31 2016 (r306157) @@ -418,7 +418,10 @@ s/\$//g for (i = 1; i <= argc; i++) { arg = argtype[i] sub("__restrict$", "", arg) - printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp + if (index(arg, "*") > 0) + printf("\t\tcase %d:\n\t\t\tp = \"userland %s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp + else + printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp if (index(arg, "*") > 0 || arg == "caddr_t") printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \ i - 1, \ From owner-svn-src-all@freebsd.org Thu Sep 22 04:50:04 2016 Return-Path: Delivered-To: svn-src-all@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 B02A8BE216D; Thu, 22 Sep 2016 04:50:04 +0000 (UTC) (envelope-from markj@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 6AA2F1CFE; Thu, 22 Sep 2016 04:50:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M4o3LM018430; Thu, 22 Sep 2016 04:50:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M4o3QW018428; Thu, 22 Sep 2016 04:50:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609220450.u8M4o3QW018428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 22 Sep 2016 04:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306158 - in head/sys: amd64/linux amd64/linux32 compat/cloudabi32 compat/cloudabi64 compat/freebsd32 i386/linux kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 04:50:04 -0000 Author: markj Date: Thu Sep 22 04:50:03 2016 New Revision: 306158 URL: https://svnweb.freebsd.org/changeset/base/306158 Log: Regenerate syscall provider argument strings. Modified: head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/compat/cloudabi32/cloudabi32_systrace_args.c head/sys/compat/cloudabi64/cloudabi64_systrace_args.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/i386/linux/linux_systrace_args.c head/sys/kern/systrace_args.c Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Thu Sep 22 04:49:31 2016 (r306157) +++ head/sys/amd64/linux/linux_systrace_args.c Thu Sep 22 04:50:03 2016 (r306158) @@ -2286,7 +2286,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "u_int"; @@ -2302,7 +2302,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "u_int"; @@ -2315,7 +2315,7 @@ systrace_entry_setargdesc(int sysnum, in case 2: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -2341,10 +2341,10 @@ systrace_entry_setargdesc(int sysnum, in case 4: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "struct l_newstat *"; + p = "userland struct l_newstat *"; break; default: break; @@ -2357,7 +2357,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "struct l_newstat *"; + p = "userland struct l_newstat *"; break; default: break; @@ -2367,10 +2367,10 @@ systrace_entry_setargdesc(int sysnum, in case 6: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "struct l_newstat *"; + p = "userland struct l_newstat *"; break; default: break; @@ -2380,7 +2380,7 @@ systrace_entry_setargdesc(int sysnum, in case 7: switch(ndx) { case 0: - p = "struct pollfd *"; + p = "userland struct pollfd *"; break; case 1: p = "u_int"; @@ -2479,10 +2479,10 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "l_sigaction_t *"; + p = "userland l_sigaction_t *"; break; case 2: - p = "l_sigaction_t *"; + p = "userland l_sigaction_t *"; break; case 3: p = "l_size_t"; @@ -2498,10 +2498,10 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "l_sigset_t *"; + p = "userland l_sigset_t *"; break; case 2: - p = "l_sigset_t *"; + p = "userland l_sigset_t *"; break; case 3: p = "l_size_t"; @@ -2514,7 +2514,7 @@ systrace_entry_setargdesc(int sysnum, in case 15: switch(ndx) { case 0: - p = "struct l_ucontext *"; + p = "userland struct l_ucontext *"; break; default: break; @@ -2543,7 +2543,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "l_size_t"; @@ -2562,7 +2562,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "l_size_t"; @@ -2581,7 +2581,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct iovec *"; + p = "userland struct iovec *"; break; case 2: p = "u_int"; @@ -2597,7 +2597,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct iovec *"; + p = "userland struct iovec *"; break; case 2: p = "u_int"; @@ -2610,7 +2610,7 @@ systrace_entry_setargdesc(int sysnum, in case 21: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -2623,7 +2623,7 @@ systrace_entry_setargdesc(int sysnum, in case 22: switch(ndx) { case 0: - p = "l_ulong *"; + p = "userland l_ulong *"; break; default: break; @@ -2636,16 +2636,16 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "l_fd_set *"; + p = "userland l_fd_set *"; break; case 2: - p = "l_fd_set *"; + p = "userland l_fd_set *"; break; case 3: - p = "l_fd_set *"; + p = "userland l_fd_set *"; break; case 4: - p = "struct l_timeval *"; + p = "userland struct l_timeval *"; break; default: break; @@ -2702,7 +2702,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_size_t"; break; case 2: - p = "u_char *"; + p = "userland u_char *"; break; default: break; @@ -2712,7 +2712,7 @@ systrace_entry_setargdesc(int sysnum, in case 28: switch(ndx) { case 0: - p = "void *"; + p = "userland void *"; break; case 1: p = "size_t"; @@ -2747,7 +2747,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "l_int"; @@ -2766,7 +2766,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 2: - p = "struct l_shmid_ds *"; + p = "userland struct l_shmid_ds *"; break; default: break; @@ -2802,10 +2802,10 @@ systrace_entry_setargdesc(int sysnum, in case 35: switch(ndx) { case 0: - p = "const struct l_timespec *"; + p = "userland const struct l_timespec *"; break; case 1: - p = "struct l_timespec *"; + p = "userland struct l_timespec *"; break; default: break; @@ -2818,7 +2818,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "struct l_itimerval *"; + p = "userland struct l_itimerval *"; break; default: break; @@ -2841,10 +2841,10 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "struct l_itimerval *"; + p = "userland struct l_itimerval *"; break; case 2: - p = "struct l_itimerval *"; + p = "userland struct l_itimerval *"; break; default: break; @@ -2863,7 +2863,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 2: - p = "l_long *"; + p = "userland l_long *"; break; case 3: p = "l_size_t"; @@ -3146,16 +3146,16 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "void *"; + p = "userland void *"; break; case 2: - p = "void *"; + p = "userland void *"; break; case 3: - p = "void *"; + p = "userland void *"; break; case 4: - p = "void *"; + p = "userland void *"; break; default: break; @@ -3171,13 +3171,13 @@ systrace_entry_setargdesc(int sysnum, in case 59: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "char **"; + p = "userland char **"; break; case 2: - p = "char **"; + p = "userland char **"; break; default: break; @@ -3200,13 +3200,13 @@ systrace_entry_setargdesc(int sysnum, in p = "l_pid_t"; break; case 1: - p = "l_int *"; + p = "userland l_int *"; break; case 2: p = "l_int"; break; case 3: - p = "struct rusage *"; + p = "userland struct rusage *"; break; default: break; @@ -3229,7 +3229,7 @@ systrace_entry_setargdesc(int sysnum, in case 63: switch(ndx) { case 0: - p = "struct l_new_utsname *"; + p = "userland struct l_new_utsname *"; break; default: break; @@ -3258,7 +3258,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "struct l_sembuf *"; + p = "userland struct l_sembuf *"; break; case 2: p = "l_uint"; @@ -3290,7 +3290,7 @@ systrace_entry_setargdesc(int sysnum, in case 67: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; default: break; @@ -3316,7 +3316,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "struct l_msgbuf *"; + p = "userland struct l_msgbuf *"; break; case 2: p = "l_size_t"; @@ -3335,7 +3335,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "struct l_msgbuf *"; + p = "userland struct l_msgbuf *"; break; case 2: p = "l_size_t"; @@ -3360,7 +3360,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 2: - p = "struct l_msqid_ds *"; + p = "userland struct l_msqid_ds *"; break; default: break; @@ -3419,7 +3419,7 @@ systrace_entry_setargdesc(int sysnum, in case 76: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_ulong"; @@ -3448,7 +3448,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "void *"; + p = "userland void *"; break; case 2: p = "l_uint"; @@ -3461,7 +3461,7 @@ systrace_entry_setargdesc(int sysnum, in case 79: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_ulong"; @@ -3474,7 +3474,7 @@ systrace_entry_setargdesc(int sysnum, in case 80: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; default: break; @@ -3494,10 +3494,10 @@ systrace_entry_setargdesc(int sysnum, in case 82: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "char *"; + p = "userland char *"; break; default: break; @@ -3507,7 +3507,7 @@ systrace_entry_setargdesc(int sysnum, in case 83: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -3520,7 +3520,7 @@ systrace_entry_setargdesc(int sysnum, in case 84: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; default: break; @@ -3530,7 +3530,7 @@ systrace_entry_setargdesc(int sysnum, in case 85: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -3543,10 +3543,10 @@ systrace_entry_setargdesc(int sysnum, in case 86: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "char *"; + p = "userland char *"; break; default: break; @@ -3556,7 +3556,7 @@ systrace_entry_setargdesc(int sysnum, in case 87: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; default: break; @@ -3566,10 +3566,10 @@ systrace_entry_setargdesc(int sysnum, in case 88: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "char *"; + p = "userland char *"; break; default: break; @@ -3579,10 +3579,10 @@ systrace_entry_setargdesc(int sysnum, in case 89: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "l_int"; @@ -3595,7 +3595,7 @@ systrace_entry_setargdesc(int sysnum, in case 90: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_mode_t"; @@ -3621,7 +3621,7 @@ systrace_entry_setargdesc(int sysnum, in case 92: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_uid_t"; @@ -3653,7 +3653,7 @@ systrace_entry_setargdesc(int sysnum, in case 94: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_uid_t"; @@ -3679,10 +3679,10 @@ systrace_entry_setargdesc(int sysnum, in case 96: switch(ndx) { case 0: - p = "struct l_timeval *"; + p = "userland struct l_timeval *"; break; case 1: - p = "struct timezone *"; + p = "userland struct timezone *"; break; default: break; @@ -3695,7 +3695,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "struct l_rlimit *"; + p = "userland struct l_rlimit *"; break; default: break; @@ -3708,7 +3708,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct rusage *"; + p = "userland struct rusage *"; break; default: break; @@ -3718,7 +3718,7 @@ systrace_entry_setargdesc(int sysnum, in case 99: switch(ndx) { case 0: - p = "struct l_sysinfo *"; + p = "userland struct l_sysinfo *"; break; default: break; @@ -3728,7 +3728,7 @@ systrace_entry_setargdesc(int sysnum, in case 100: switch(ndx) { case 0: - p = "struct l_times_argv *"; + p = "userland struct l_times_argv *"; break; default: break; @@ -3763,7 +3763,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "l_int"; @@ -3856,7 +3856,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "l_gid_t *"; + p = "userland l_gid_t *"; break; default: break; @@ -3869,7 +3869,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "l_gid_t *"; + p = "userland l_gid_t *"; break; default: break; @@ -3895,13 +3895,13 @@ systrace_entry_setargdesc(int sysnum, in case 118: switch(ndx) { case 0: - p = "uid_t *"; + p = "userland uid_t *"; break; case 1: - p = "uid_t *"; + p = "userland uid_t *"; break; case 2: - p = "uid_t *"; + p = "userland uid_t *"; break; default: break; @@ -3927,13 +3927,13 @@ systrace_entry_setargdesc(int sysnum, in case 120: switch(ndx) { case 0: - p = "gid_t *"; + p = "userland gid_t *"; break; case 1: - p = "gid_t *"; + p = "userland gid_t *"; break; case 2: - p = "gid_t *"; + p = "userland gid_t *"; break; default: break; @@ -3983,10 +3983,10 @@ systrace_entry_setargdesc(int sysnum, in case 125: switch(ndx) { case 0: - p = "struct l_user_cap_header *"; + p = "userland struct l_user_cap_header *"; break; case 1: - p = "struct l_user_cap_data *"; + p = "userland struct l_user_cap_data *"; break; default: break; @@ -3996,10 +3996,10 @@ systrace_entry_setargdesc(int sysnum, in case 126: switch(ndx) { case 0: - p = "struct l_user_cap_header *"; + p = "userland struct l_user_cap_header *"; break; case 1: - p = "struct l_user_cap_data *"; + p = "userland struct l_user_cap_data *"; break; default: break; @@ -4009,7 +4009,7 @@ systrace_entry_setargdesc(int sysnum, in case 127: switch(ndx) { case 0: - p = "l_sigset_t *"; + p = "userland l_sigset_t *"; break; case 1: p = "l_size_t"; @@ -4022,13 +4022,13 @@ systrace_entry_setargdesc(int sysnum, in case 128: switch(ndx) { case 0: - p = "l_sigset_t *"; + p = "userland l_sigset_t *"; break; case 1: - p = "l_siginfo_t *"; + p = "userland l_siginfo_t *"; break; case 2: - p = "struct l_timeval *"; + p = "userland struct l_timeval *"; break; case 3: p = "l_size_t"; @@ -4047,7 +4047,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 2: - p = "l_siginfo_t *"; + p = "userland l_siginfo_t *"; break; default: break; @@ -4057,7 +4057,7 @@ systrace_entry_setargdesc(int sysnum, in case 130: switch(ndx) { case 0: - p = "l_sigset_t *"; + p = "userland l_sigset_t *"; break; case 1: p = "l_size_t"; @@ -4070,10 +4070,10 @@ systrace_entry_setargdesc(int sysnum, in case 131: switch(ndx) { case 0: - p = "l_stack_t *"; + p = "userland l_stack_t *"; break; case 1: - p = "l_stack_t *"; + p = "userland l_stack_t *"; break; default: break; @@ -4083,10 +4083,10 @@ systrace_entry_setargdesc(int sysnum, in case 132: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "struct l_utimbuf *"; + p = "userland struct l_utimbuf *"; break; default: break; @@ -4096,7 +4096,7 @@ systrace_entry_setargdesc(int sysnum, in case 133: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -4125,7 +4125,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_dev_t"; break; case 1: - p = "struct l_ustat *"; + p = "userland struct l_ustat *"; break; default: break; @@ -4135,10 +4135,10 @@ systrace_entry_setargdesc(int sysnum, in case 137: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "struct l_statfs_buf *"; + p = "userland struct l_statfs_buf *"; break; default: break; @@ -4151,7 +4151,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "struct l_statfs_buf *"; + p = "userland struct l_statfs_buf *"; break; default: break; @@ -4209,7 +4209,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_pid_t"; break; case 1: - p = "struct sched_param *"; + p = "userland struct sched_param *"; break; default: break; @@ -4222,7 +4222,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_pid_t"; break; case 1: - p = "struct sched_param *"; + p = "userland struct sched_param *"; break; default: break; @@ -4238,7 +4238,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 2: - p = "struct sched_param *"; + p = "userland struct sched_param *"; break; default: break; @@ -4281,7 +4281,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_pid_t"; break; case 1: - p = "struct l_timespec *"; + p = "userland struct l_timespec *"; break; default: break; @@ -4291,7 +4291,7 @@ systrace_entry_setargdesc(int sysnum, in case 149: switch(ndx) { case 0: - p = "const void *"; + p = "userland const void *"; break; case 1: p = "size_t"; @@ -4304,7 +4304,7 @@ systrace_entry_setargdesc(int sysnum, in case 150: switch(ndx) { case 0: - p = "const void *"; + p = "userland const void *"; break; case 1: p = "size_t"; @@ -4336,7 +4336,7 @@ systrace_entry_setargdesc(int sysnum, in case 156: switch(ndx) { case 0: - p = "struct l___sysctl_args *"; + p = "userland struct l___sysctl_args *"; break; default: break; @@ -4387,7 +4387,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "struct l_rlimit *"; + p = "userland struct l_rlimit *"; break; default: break; @@ -4397,7 +4397,7 @@ systrace_entry_setargdesc(int sysnum, in case 161: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; default: break; @@ -4410,7 +4410,7 @@ systrace_entry_setargdesc(int sysnum, in case 163: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; default: break; @@ -4420,10 +4420,10 @@ systrace_entry_setargdesc(int sysnum, in case 164: switch(ndx) { case 0: - p = "struct l_timeval *"; + p = "userland struct l_timeval *"; break; case 1: - p = "struct timezone *"; + p = "userland struct timezone *"; break; default: break; @@ -4433,19 +4433,19 @@ systrace_entry_setargdesc(int sysnum, in case 165: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: - p = "char *"; + p = "userland char *"; break; case 3: p = "l_ulong"; break; case 4: - p = "void *"; + p = "userland void *"; break; default: break; @@ -4455,7 +4455,7 @@ systrace_entry_setargdesc(int sysnum, in case 166: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -4468,7 +4468,7 @@ systrace_entry_setargdesc(int sysnum, in case 167: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; default: break; @@ -4490,7 +4490,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 3: - p = "void *"; + p = "userland void *"; break; default: break; @@ -4500,7 +4500,7 @@ systrace_entry_setargdesc(int sysnum, in case 170: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_uint"; @@ -4513,7 +4513,7 @@ systrace_entry_setargdesc(int sysnum, in case 171: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -4624,7 +4624,7 @@ systrace_entry_setargdesc(int sysnum, in case 201: switch(ndx) { case 0: - p = "l_time_t *"; + p = "userland l_time_t *"; break; default: break; @@ -4634,7 +4634,7 @@ systrace_entry_setargdesc(int sysnum, in case 202: switch(ndx) { case 0: - p = "void *"; + p = "userland void *"; break; case 1: p = "int"; @@ -4643,10 +4643,10 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 3: - p = "struct l_timespec *"; + p = "userland struct l_timespec *"; break; case 4: - p = "void *"; + p = "userland void *"; break; case 5: p = "int"; @@ -4665,7 +4665,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 2: - p = "l_ulong *"; + p = "userland l_ulong *"; break; default: break; @@ -4681,7 +4681,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 2: - p = "l_ulong *"; + p = "userland l_ulong *"; break; default: break; @@ -4719,7 +4719,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "void *"; + p = "userland void *"; break; case 2: p = "l_uint"; @@ -4732,7 +4732,7 @@ systrace_entry_setargdesc(int sysnum, in case 218: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 06:24:42 2016 Return-Path: Delivered-To: svn-src-all@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 930DCBE4A46; Thu, 22 Sep 2016 06:24:42 +0000 (UTC) (envelope-from stevek@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 65B265ED; Thu, 22 Sep 2016 06:24:42 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M6OfoX055593; Thu, 22 Sep 2016 06:24:41 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M6Oemr055586; Thu, 22 Sep 2016 06:24:40 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201609220624.u8M6Oemr055586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Thu, 22 Sep 2016 06:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306159 - in head/sys/boot: efi/libefi i386/libi386 ofw/libofw powerpc/kboot powerpc/ps3 uboot/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 06:24:42 -0000 Author: stevek Date: Thu Sep 22 06:24:40 2016 New Revision: 306159 URL: https://svnweb.freebsd.org/changeset/base/306159 Log: The getsecs() function is implemented in platform- and bootfw-specific files and, in a number of these places, there were problems with how they were declared. Some used int return instead of time_t. On some architectures the bit width of time_t did not naturally fit into an integer and could lead to some unexpected behavior. (For example, 32-bit ARM builds uses a 64-bit time_t.) Make sure the function prototypes always specify void for the argument list when they do not have any arguemnts, otherwise some compilers can complain about the prototype. Reported by: Kevin Zheng Reviewed by: sjg Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D7463 Modified: head/sys/boot/efi/libefi/time.c head/sys/boot/efi/libefi/time_event.c head/sys/boot/i386/libi386/pxe.c head/sys/boot/ofw/libofw/ofw_time.c head/sys/boot/powerpc/kboot/main.c head/sys/boot/powerpc/ps3/main.c head/sys/boot/uboot/lib/time.c Modified: head/sys/boot/efi/libefi/time.c ============================================================================== --- head/sys/boot/efi/libefi/time.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/efi/libefi/time.c Thu Sep 22 06:24:40 2016 (r306159) @@ -228,7 +228,7 @@ time(time_t *tloc) } time_t -getsecs() +getsecs(void) { return time(0); } Modified: head/sys/boot/efi/libefi/time_event.c ============================================================================== --- head/sys/boot/efi/libefi/time_event.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/efi/libefi/time_event.c Thu Sep 22 06:24:40 2016 (r306159) @@ -76,7 +76,7 @@ time(time_t *tloc) } time_t -getsecs() +getsecs(void) { return time(0); } Modified: head/sys/boot/i386/libi386/pxe.c ============================================================================== --- head/sys/boot/i386/libi386/pxe.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/i386/libi386/pxe.c Thu Sep 22 06:24:40 2016 (r306159) @@ -586,7 +586,7 @@ bangpxe_call(int func) time_t -getsecs() +getsecs(void) { time_t n = 0; time(&n); Modified: head/sys/boot/ofw/libofw/ofw_time.c ============================================================================== --- head/sys/boot/ofw/libofw/ofw_time.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/ofw/libofw/ofw_time.c Thu Sep 22 06:24:40 2016 (r306159) @@ -41,8 +41,8 @@ time(time_t *tloc) return secs; } -int -getsecs() +time_t +getsecs(void) { time_t n = 0; time(&n); Modified: head/sys/boot/powerpc/kboot/main.c ============================================================================== --- head/sys/boot/powerpc/kboot/main.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/powerpc/kboot/main.c Thu Sep 22 06:24:40 2016 (r306159) @@ -151,8 +151,8 @@ delay(int usecs) } while (t < ti + usecs); } -int -getsecs() +time_t +getsecs(void) { struct host_timeval tv; host_gettimeofday(&tv, NULL); Modified: head/sys/boot/powerpc/ps3/main.c ============================================================================== --- head/sys/boot/powerpc/ps3/main.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/powerpc/ps3/main.c Thu Sep 22 06:24:40 2016 (r306159) @@ -179,10 +179,10 @@ delay(int usecs) tb = mftb(); } -int -getsecs() +time_t +getsecs(void) { - return ((mftb() - basetb)*ns_per_tick/1000000000); + return ((time_t)((mftb() - basetb)*ns_per_tick/1000000000)); } time_t Modified: head/sys/boot/uboot/lib/time.c ============================================================================== --- head/sys/boot/uboot/lib/time.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/uboot/lib/time.c Thu Sep 22 06:24:40 2016 (r306159) @@ -47,7 +47,7 @@ time(time_t *tloc) return (secs); } -int +time_t getsecs(void) { From owner-svn-src-all@freebsd.org Thu Sep 22 07:33:44 2016 Return-Path: Delivered-To: svn-src-all@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 CE6CBBE4915; Thu, 22 Sep 2016 07:33:44 +0000 (UTC) (envelope-from trasz@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 909BB61C; Thu, 22 Sep 2016 07:33:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M7Xhdk081662; Thu, 22 Sep 2016 07:33:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M7XhcM081660; Thu, 22 Sep 2016 07:33:43 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609220733.u8M7XhcM081660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 22 Sep 2016 07:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306160 - head/usr.sbin/diskinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 07:33:44 -0000 Author: trasz Date: Thu Sep 22 07:33:43 2016 New Revision: 306160 URL: https://svnweb.freebsd.org/changeset/base/306160 Log: Add "diskinfo -i", a simple aio-based IOPS benchmark. MFC after: 1 month Modified: head/usr.sbin/diskinfo/diskinfo.8 head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.8 ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.8 Thu Sep 22 06:24:40 2016 (r306159) +++ head/usr.sbin/diskinfo/diskinfo.8 Thu Sep 22 07:33:43 2016 (r306160) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2004 +.Dd September 22, 2016 .Dt DISKINFO 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd get information about disk device .Sh SYNOPSIS .Nm -.Op Fl ctv +.Op Fl citv .Ar disk ... .Sh DESCRIPTION The @@ -59,6 +59,10 @@ The option triggers a simple measurement of the I/O read command overhead. .Pp The +.Fl i +option triggers a simple IOPS benchmark. +.Pp +The .Fl t option triggers a simple and rather naive benchmark of the disks seek and transfer performance. Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Thu Sep 22 06:24:40 2016 (r306159) +++ head/usr.sbin/diskinfo/diskinfo.c Thu Sep 22 07:33:43 2016 (r306160) @@ -40,22 +40,26 @@ #include #include #include +#include #include #include #include #include +#define NAIO 128 + static void usage(void) { - fprintf(stderr, "usage: diskinfo [-ctv] disk ...\n"); + fprintf(stderr, "usage: diskinfo [-citv] disk ...\n"); exit (1); } -static int opt_c, opt_t, opt_v; +static int opt_c, opt_i, opt_t, opt_v; static void speeddisk(int fd, off_t mediasize, u_int sectorsize); static void commandtime(int fd, off_t mediasize, u_int sectorsize); +static void iopsbench(int fd, off_t mediasize, u_int sectorsize); static int zonecheck(int fd, uint32_t *zone_mode, char *zone_str, size_t zone_str_len); @@ -70,12 +74,16 @@ main(int argc, char **argv) u_int sectorsize, fwsectors, fwheads, zoned = 0; uint32_t zone_mode; - while ((ch = getopt(argc, argv, "ctv")) != -1) { + while ((ch = getopt(argc, argv, "citv")) != -1) { switch (ch) { case 'c': opt_c = 1; opt_v = 1; break; + case 'i': + opt_i = 1; + opt_v = 1; + break; case 't': opt_t = 1; opt_v = 1; @@ -188,6 +196,8 @@ main(int argc, char **argv) commandtime(fd, mediasize, sectorsize); if (opt_t) speeddisk(fd, mediasize, sectorsize); + if (opt_i) + iopsbench(fd, mediasize, sectorsize); out: close(fd); } @@ -270,6 +280,16 @@ TR(double count) } static void +TI(double count) +{ + double dt; + + dt = delta_t(); + printf("%8.0f ops in %10.6f sec = %8.0f IOPS\n", + count, dt, count / dt); +} + +static void speeddisk(int fd, off_t mediasize, u_int sectorsize) { int bulk, i; @@ -418,6 +438,91 @@ commandtime(int fd, off_t mediasize, u_i return; } +static void +iops(int fd, off_t mediasize, u_int sectorsize) +{ + struct aiocb aios[NAIO], *aiop; + ssize_t ret; + off_t sectorcount; + int error, i, queued, completed; + + sectorcount = mediasize / sectorsize; + + for (i = 0; i < NAIO; i++) { + aiop = &(aios[i]); + bzero(aiop, sizeof(*aiop)); + aiop->aio_buf = malloc(sectorsize); + if (aiop->aio_buf == NULL) + err(1, "malloc"); + } + + T0(); + for (i = 0; i < NAIO; i++) { + aiop = &(aios[i]); + + aiop->aio_fildes = fd; + aiop->aio_offset = (random() % (sectorcount)) * sectorsize; + aiop->aio_nbytes = sectorsize; + + error = aio_read(aiop); + if (error != 0) + err(1, "aio_read"); + } + + queued = i; + completed = 0; + + for (;;) { + ret = aio_waitcomplete(&aiop, NULL); + if (ret < 0) + err(1, "aio_waitcomplete"); + if (ret != (ssize_t)sectorsize) + errx(1, "short read"); + + completed++; + + if (delta_t() < 3.0) { + aiop->aio_fildes = fd; + aiop->aio_offset = (random() % (sectorcount)) * sectorsize; + aiop->aio_nbytes = sectorsize; + + error = aio_read(aiop); + if (error != 0) + err(1, "aio_read"); + + queued++; + } else if (completed == queued) { + break; + } + } + + TI(completed); + + return; +} + +static void +iopsbench(int fd, off_t mediasize, u_int sectorsize) +{ + printf("Asynchronous random reads:\n"); + + printf("\tsectorsize: "); + iops(fd, mediasize, sectorsize); + + if (sectorsize != 4096) { + printf("\t4 kbytes: "); + iops(fd, mediasize, 4096); + } + + printf("\t32 kbytes: "); + iops(fd, mediasize, 32 * 1024); + + printf("\t128 kbytes: "); + iops(fd, mediasize, 128 * 1024); + + printf("\n"); +} + static int zonecheck(int fd, uint32_t *zone_mode, char *zone_str, size_t zone_str_len) { From owner-svn-src-all@freebsd.org Thu Sep 22 07:55:08 2016 Return-Path: Delivered-To: svn-src-all@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 62F98BE5B45; Thu, 22 Sep 2016 07:55:08 +0000 (UTC) (envelope-from trasz@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 1852F5E4; Thu, 22 Sep 2016 07:55:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M7t7Dj089004; Thu, 22 Sep 2016 07:55:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M7t7Yj089003; Thu, 22 Sep 2016 07:55:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609220755.u8M7t7Yj089003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 22 Sep 2016 07:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306161 - head/usr.sbin/diskinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 07:55:08 -0000 Author: trasz Date: Thu Sep 22 07:55:07 2016 New Revision: 306161 URL: https://svnweb.freebsd.org/changeset/base/306161 Log: Small tweaks to the diskinfo(8) manual page, to make it more consistent with others. MFC after: 1 month Modified: head/usr.sbin/diskinfo/diskinfo.8 Modified: head/usr.sbin/diskinfo/diskinfo.8 ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.8 Thu Sep 22 07:33:43 2016 (r306160) +++ head/usr.sbin/diskinfo/diskinfo.8 Thu Sep 22 07:55:07 2016 (r306161) @@ -44,35 +44,34 @@ The utility prints out information about a disk device, and optionally runs a naive performance test on the device. .Pp +The following options are available: +.Bl -tag -width ".Fl v" +.It Fl v +Print fields one per line with a descriptive comment. +.It Fl c +Perform a simple measurement of the I/O read command overhead. +.It Fl i +Perform a simple IOPS benchmark. +.It Fl t +Perform a simple and rather naive benchmark of the disks seek +and transfer performance. +.El +.Pp If given no arguments, the output will be a single line per specified device with the following fields: device name, sectorsize, media size in bytes, media size in sectors, stripe size, stripe offset, firmware cylinders, firmware heads, and firmware sectors. The last three fields are only present if the information is available. -.Pp -If given the -.Fl v -option, the fields will be printed one per line with a descriptive comment. -.Pp -The -.Fl c -option triggers a simple measurement of the I/O read command overhead. -.Pp -The -.Fl i -option triggers a simple IOPS benchmark. -.Pp -The -.Fl t -option triggers a simple and rather naive benchmark of the disks seek -and transfer performance. .Sh HISTORY The .Nm command appeared in .Fx 5.1 . .Sh AUTHORS -.An Poul-Henning Kamp +The +.Nm +utility was written by +.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org . .Sh BUGS There are in order of increasing severity: lies, damn lies, statistics, and computer benchmarks. From owner-svn-src-all@freebsd.org Thu Sep 22 08:15:01 2016 Return-Path: Delivered-To: svn-src-all@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 C7412BE14F4; Thu, 22 Sep 2016 08:15:01 +0000 (UTC) (envelope-from ed@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 88CF3929; Thu, 22 Sep 2016 08:15:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M8F0Kx096304; Thu, 22 Sep 2016 08:15:00 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M8F0Lo096297; Thu, 22 Sep 2016 08:15:00 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609220815.u8M8F0Lo096297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 22 Sep 2016 08:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306162 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 08:15:01 -0000 Author: ed Date: Thu Sep 22 08:14:59 2016 New Revision: 306162 URL: https://svnweb.freebsd.org/changeset/base/306162 Log: Make it possible to safely use TPIDRURW from userspace. On amd64, arm64 and i386, we have the possibility to switch between TLS areas in userspace. The nice thing about this is that it makes it easier to do light-weight threading, if we ever feel like doing that. On armv6, let's go into the same direction by making it possible to safely use the TPIDRURW register, which is intended for this purpose. Clean up the ARMv6 code to remove md_tp entirely. Simply add a dedicated field to the PCB to hold the value of TPIDRURW across context switches, like we do for any other register. As userspace currently uses the read-only TPIDRURO register, simply ensure that we keep both values in sync where possible. The system calls for modifying the read-only register will simply write the intended value into both registers, so that it lazily ends up in the PCB during the next context switch. Reviewed by: https://reviews.freebsd.org/D7951 Approved by: andrew Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D7951 Modified: head/sys/arm/arm/genassym.c head/sys/arm/arm/swtch-v6.S head/sys/arm/arm/sys_machdep.c head/sys/arm/arm/vm_machdep.c head/sys/arm/include/frame.h head/sys/arm/include/pcpu.h head/sys/arm/include/proc.h Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Thu Sep 22 07:55:07 2016 (r306161) +++ head/sys/arm/arm/genassym.c Thu Sep 22 08:14:59 2016 (r306162) @@ -81,6 +81,9 @@ ASSYM(PCB_R12, offsetof(struct pcb, pcb_ ASSYM(PCB_SP, offsetof(struct pcb, pcb_regs.sf_sp)); ASSYM(PCB_LR, offsetof(struct pcb, pcb_regs.sf_lr)); ASSYM(PCB_PC, offsetof(struct pcb, pcb_regs.sf_pc)); +#if __ARM_ARCH >= 6 +ASSYM(PCB_TPIDRURW, offsetof(struct pcb, pcb_regs.sf_tpidrurw)); +#endif ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); @@ -100,8 +103,8 @@ ASSYM(TD_FLAGS, offsetof(struct thread, ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_MD, offsetof(struct thread, td_md)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); -ASSYM(MD_TP, offsetof(struct mdthread, md_tp)); #if __ARM_ARCH < 6 +ASSYM(MD_TP, offsetof(struct mdthread, md_tp)); ASSYM(MD_RAS_START, offsetof(struct mdthread, md_ras_start)); ASSYM(MD_RAS_END, offsetof(struct mdthread, md_ras_end)); #endif Modified: head/sys/arm/arm/swtch-v6.S ============================================================================== --- head/sys/arm/arm/swtch-v6.S Thu Sep 22 07:55:07 2016 (r306161) +++ head/sys/arm/arm/swtch-v6.S Thu Sep 22 08:14:59 2016 (r306162) @@ -291,6 +291,8 @@ ENTRY(cpu_switch) ldr r3, [r0, #(TD_PCB)] add r3, #(PCB_R4) stmia r3, {r4-r12, sp, lr, pc} + mrc CP15_TPIDRURW(r4) + str r4, [r3, #(PCB_TPIDRURW - PCB_R4)] #ifdef INVARIANTS cmp r1, #0 /* new thread? */ @@ -437,9 +439,6 @@ sw1: cmp r3, r6 beq 1b #endif - /* Set the new tls */ - ldr r0, [r11, #(TD_MD + MD_TP)] - mcr CP15_TPIDRURO(r0) /* write tls thread reg 2 */ /* We have a new curthread now so make a note it */ str r11, [r8, #PC_CURTHREAD] @@ -452,7 +451,14 @@ sw1: * Restore all saved registers and return. Note that some saved * registers can be changed when either cpu_fork(), cpu_copy_thread(), * cpu_fork_kthread_handler(), or makectx() was called. - */ + * + * The value of TPIDRURW is also written into TPIDRURO, as + * userspace still uses TPIDRURO, modifying it through + * sysarch(ARM_SET_TP, addr). + */ + ldr r3, [r7, #PCB_TPIDRURW] + mcr CP15_TPIDRURW(r3) /* write tls thread reg 2 */ + mcr CP15_TPIDRURO(r3) /* write tls thread reg 3 */ add r3, r7, #PCB_R4 ldmia r3, {r4-r12, sp, pc} Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Thu Sep 22 07:55:07 2016 (r306161) +++ head/sys/arm/arm/sys_machdep.c Thu Sep 22 08:14:59 2016 (r306162) @@ -166,10 +166,10 @@ static int arm32_set_tp(struct thread *td, void *args) { - td->td_md.md_tp = (register_t)args; #if __ARM_ARCH >= 6 set_tls(args); #else + td->td_md.md_tp = (register_t)args; *(register_t *)ARM_TP_ADDRESS = (register_t)args; #endif return (0); @@ -180,7 +180,7 @@ arm32_get_tp(struct thread *td, void *ar { #if __ARM_ARCH >= 6 - td->td_retval[0] = td->td_md.md_tp; + td->td_retval[0] = (register_t)get_tls(); #else td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS; #endif Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Thu Sep 22 07:55:07 2016 (r306161) +++ head/sys/arm/arm/vm_machdep.c Thu Sep 22 08:14:59 2016 (r306162) @@ -82,8 +82,8 @@ __FBSDID("$FreeBSD$"); * struct switchframe and trapframe must both be a multiple of 8 * for correct stack alignment. */ -CTASSERT(sizeof(struct switchframe) == 48); -CTASSERT(sizeof(struct trapframe) == 80); +_Static_assert((sizeof(struct switchframe) % 8) == 0, "Bad alignment"); +_Static_assert((sizeof(struct trapframe) % 8) == 0, "Bad alignment"); uint32_t initial_fpscr = VFPSCR_DN | VFPSCR_FZ; @@ -134,6 +134,9 @@ cpu_fork(register struct thread *td1, re pcb2->pcb_regs.sf_r5 = (register_t)td2; pcb2->pcb_regs.sf_lr = (register_t)fork_trampoline; pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame); +#if __ARM_ARCH >= 6 + pcb2->pcb_regs.sf_tpidrurw = (register_t)get_tls(); +#endif pcb2->pcb_vfpcpu = -1; pcb2->pcb_vfpstate.fpscr = initial_fpscr; @@ -147,9 +150,7 @@ cpu_fork(register struct thread *td1, re /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; td2->td_md.md_saved_cspr = PSR_SVC32_MODE; -#if __ARM_ARCH >= 6 - td2->td_md.md_tp = td1->td_md.md_tp; -#else +#if __ARM_ARCH < 6 td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; #endif } @@ -272,16 +273,18 @@ int cpu_set_user_tls(struct thread *td, void *tls_base) { - td->td_md.md_tp = (register_t)tls_base; - if (td == curthread) { - critical_enter(); #if __ARM_ARCH >= 6 + td->td_pcb->pcb_regs.sf_tpidrurw = (register_t)tls_base; + if (td == curthread) set_tls(tls_base); #else + td->td_md.md_tp = (register_t)tls_base; + if (td == curthread) { + critical_enter(); *(register_t *)ARM_TP_ADDRESS = (register_t)tls_base; -#endif critical_exit(); } +#endif return (0); } Modified: head/sys/arm/include/frame.h ============================================================================== --- head/sys/arm/include/frame.h Thu Sep 22 07:55:07 2016 (r306161) +++ head/sys/arm/include/frame.h Thu Sep 22 08:14:59 2016 (r306162) @@ -117,6 +117,10 @@ struct switchframe register_t sf_sp; register_t sf_lr; register_t sf_pc; +#if __ARM_ARCH >= 6 + register_t sf_tpidrurw; + register_t sf_spare0; +#endif }; Modified: head/sys/arm/include/pcpu.h ============================================================================== --- head/sys/arm/include/pcpu.h Thu Sep 22 07:55:07 2016 (r306161) +++ head/sys/arm/include/pcpu.h Thu Sep 22 08:14:59 2016 (r306162) @@ -103,7 +103,8 @@ get_tls(void) { void *tls; - __asm __volatile("mrc p15, 0, %0, c13, c0, 3" : "=r" (tls)); + /* TPIDRURW contains the authoritative value. */ + __asm __volatile("mrc p15, 0, %0, c13, c0, 2" : "=r" (tls)); return (tls); } @@ -111,7 +112,15 @@ static inline void set_tls(void *tls) { - __asm __volatile("mcr p15, 0, %0, c13, c0, 3" : : "r" (tls)); + /* + * Update both TPIDRURW and TPIDRURO. TPIDRURW needs to be written + * first to ensure that a context switch between the two writes will + * still give the desired result of updating both. + */ + __asm __volatile( + "mcr p15, 0, %0, c13, c0, 2\n" + "mcr p15, 0, %0, c13, c0, 3\n" + : : "r" (tls)); } #define curthread get_curthread() Modified: head/sys/arm/include/proc.h ============================================================================== --- head/sys/arm/include/proc.h Thu Sep 22 07:55:07 2016 (r306161) +++ head/sys/arm/include/proc.h Thu Sep 22 08:14:59 2016 (r306162) @@ -53,8 +53,8 @@ struct mdthread { int md_ptrace_addr; int md_ptrace_instr_alt; int md_ptrace_addr_alt; - register_t md_tp; #if __ARM_ARCH < 6 + register_t md_tp; void *md_ras_start; void *md_ras_end; #endif From owner-svn-src-all@freebsd.org Thu Sep 22 08:56:55 2016 Return-Path: Delivered-To: svn-src-all@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 86811BE4FE5; Thu, 22 Sep 2016 08:56:55 +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 4A942AE7; Thu, 22 Sep 2016 08:56:55 +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 u8M8usb3011440; Thu, 22 Sep 2016 08:56:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M8usi1011435; Thu, 22 Sep 2016 08:56:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220856.u8M8usi1011435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 08:56: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: r306165 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 08:56:55 -0000 Author: kib Date: Thu Sep 22 08:56:54 2016 New Revision: 306165 URL: https://svnweb.freebsd.org/changeset/base/306165 Log: MFC r305592: Partially lift suspension when ffs_reload() finished with cgs and going to re-read inodes. Modified: stable/11/sys/ufs/ffs/ffs_extern.h stable/11/sys/ufs/ffs/ffs_suspend.c stable/11/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_extern.h ============================================================================== --- stable/11/sys/ufs/ffs/ffs_extern.h Thu Sep 22 08:51:42 2016 (r306164) +++ stable/11/sys/ufs/ffs/ffs_extern.h Thu Sep 22 08:56:54 2016 (r306165) @@ -106,6 +106,9 @@ void ffs_susp_uninitialize(void); #define FFSV_FORCEINSMQ 0x0001 +#define FFSR_FORCE 0x0001 +#define FFSR_UNSUSPEND 0x0002 + extern struct vop_vector ffs_vnodeops1; extern struct vop_vector ffs_fifoops1; extern struct vop_vector ffs_vnodeops2; Modified: stable/11/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_suspend.c Thu Sep 22 08:51:42 2016 (r306164) +++ stable/11/sys/ufs/ffs/ffs_suspend.c Thu Sep 22 08:56:54 2016 (r306165) @@ -235,7 +235,7 @@ ffs_susp_dtor(void *data) KASSERT((mp->mnt_kern_flag & MNTK_SUSPEND) != 0, ("MNTK_SUSPEND not set")); - error = ffs_reload(mp, curthread, 1); + error = ffs_reload(mp, curthread, FFSR_FORCE | FFSR_UNSUSPEND); if (error != 0) panic("failed to unsuspend writes on %s", fs->fs_fsmnt); Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Sep 22 08:51:42 2016 (r306164) +++ stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Sep 22 08:56:54 2016 (r306165) @@ -573,11 +573,13 @@ ffs_cmount(struct mntarg *ma, void *data * 2) re-read superblock from disk. * 3) re-read summary information from disk. * 4) invalidate all inactive vnodes. - * 5) invalidate all cached file data. - * 6) re-read inode data for all active vnodes. + * 5) clear MNTK_SUSPEND2 and MNTK_SUSPENDED flags, allowing secondary + * writers, if requested. + * 6) invalidate all cached file data. + * 7) re-read inode data for all active vnodes. */ int -ffs_reload(struct mount *mp, struct thread *td, int force) +ffs_reload(struct mount *mp, struct thread *td, int flags) { struct vnode *vp, *mvp, *devvp; struct inode *ip; @@ -592,7 +594,7 @@ ffs_reload(struct mount *mp, struct thre ump = VFSTOUFS(mp); MNT_ILOCK(mp); - if ((mp->mnt_flag & MNT_RDONLY) == 0 && force == 0) { + if ((mp->mnt_flag & MNT_RDONLY) == 0 && (flags & FFSR_FORCE) == 0) { MNT_IUNLOCK(mp); return (EINVAL); } @@ -682,6 +684,12 @@ ffs_reload(struct mount *mp, struct thre size = fs->fs_ncg * sizeof(u_int8_t); fs->fs_contigdirs = (u_int8_t *)space; bzero(fs->fs_contigdirs, size); + if ((flags & FFSR_UNSUSPEND) != 0) { + MNT_ILOCK(mp); + mp->mnt_kern_flag &= ~(MNTK_SUSPENDED | MNTK_SUSPEND2); + wakeup(&mp->mnt_flag); + MNT_IUNLOCK(mp); + } loop: MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { From owner-svn-src-all@freebsd.org Thu Sep 22 08:59:59 2016 Return-Path: Delivered-To: svn-src-all@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 56167BE527B; Thu, 22 Sep 2016 08:59:59 +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 0883FCEA; Thu, 22 Sep 2016 08:59:58 +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 u8M8xwAS011590; Thu, 22 Sep 2016 08:59:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M8xwsJ011589; Thu, 22 Sep 2016 08:59:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220859.u8M8xwsJ011589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 08:59: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: r306166 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 08:59:59 -0000 Author: kib Date: Thu Sep 22 08:59:58 2016 New Revision: 306166 URL: https://svnweb.freebsd.org/changeset/base/306166 Log: MFC r305593: There is no need to upgrade the last dvp lock on lookups for modifying operations. Instead of upgrading, assert that the lock is exclusive. Explain the cause in comments. Modified: stable/11/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 08:56:54 2016 (r306165) +++ stable/11/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 08:59:58 2016 (r306166) @@ -76,32 +76,6 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, C /* true if old FS format...*/ #define OFSFMT(vp) ((vp)->v_mount->mnt_maxsymlinklen <= 0) -#ifdef QUOTA -static int -ufs_lookup_upgrade_lock(struct vnode *vp) -{ - int error; - - ASSERT_VOP_LOCKED(vp, __FUNCTION__); - if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) - return (0); - - error = 0; - - /* - * Upgrade vnode lock, since getinoquota() - * requires exclusive lock to modify inode. - */ - vhold(vp); - vn_lock(vp, LK_UPGRADE | LK_RETRY); - VI_LOCK(vp); - if (vp->v_iflag & VI_DOOMED) - error = ENOENT; - vdropl(vp); - return (error); -} -#endif - static int ufs_delete_denied(struct vnode *vdp, struct vnode *tdp, struct ucred *cred, struct thread *td) @@ -259,12 +233,25 @@ ufs_lookup_ino(struct vnode *vdp, struct vnode_create_vobject(vdp, DIP(dp, i_size), cnp->cn_thread); bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; -#ifdef QUOTA - if ((nameiop == DELETE || nameiop == RENAME) && (flags & ISLASTCN)) { - error = ufs_lookup_upgrade_lock(vdp); - if (error != 0) - return (error); - } + +#ifdef DEBUG_VFS_LOCKS + /* + * Assert that the directory vnode is locked, and locked + * exclusively for the last component lookup for modifying + * operations. + * + * The directory-modifying operations need to save + * intermediate state in the inode between namei() call and + * actual directory manipulations. See fields in the struct + * inode marked as 'used during directory lookup'. We must + * ensure that upgrade in namei() does not happen, since + * upgrade might need to unlock vdp. If quotas are enabled, + * getinoquota() also requires exclusive lock to modify inode. + */ + ASSERT_VOP_LOCKED(vdp, "ufs_lookup1"); + if ((nameiop == CREATE || nameiop == DELETE || nameiop == RENAME) && + (flags & (LOCKPARENT | ISLASTCN)) == (LOCKPARENT | ISLASTCN)) + ASSERT_VOP_ELOCKED(vdp, "ufs_lookup2"); #endif restart: From owner-svn-src-all@freebsd.org Thu Sep 22 09:02:05 2016 Return-Path: Delivered-To: svn-src-all@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 49F1FBE5626; Thu, 22 Sep 2016 09:02:05 +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 19F631B4; Thu, 22 Sep 2016 09:02:05 +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 u8M924TN015371; Thu, 22 Sep 2016 09:02:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M924xe015370; Thu, 22 Sep 2016 09:02:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220902.u8M924xe015370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 09:02: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: r306167 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:02:05 -0000 Author: kib Date: Thu Sep 22 09:02:04 2016 New Revision: 306167 URL: https://svnweb.freebsd.org/changeset/base/306167 Log: MFC r305594: In softdep_prealloc(), return early not only for snapshots, but for the quota files as well. Modified: stable/11/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 08:59:58 2016 (r306166) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 09:02:04 2016 (r306167) @@ -2997,10 +2997,13 @@ softdep_prealloc(vp, waitok) ("softdep_prealloc called on non-softdep filesystem")); /* * Nothing to do if we are not running journaled soft updates. - * If we currently hold the snapshot lock, we must avoid handling - * other resources that could cause deadlock. + * If we currently hold the snapshot lock, we must avoid + * handling other resources that could cause deadlock. Do not + * touch quotas vnode since it is typically recursed with + * other vnode locks held. */ - if (DOINGSUJ(vp) == 0 || IS_SNAPSHOT(VTOI(vp))) + if (DOINGSUJ(vp) == 0 || IS_SNAPSHOT(VTOI(vp)) || + (vp->v_vflag & VV_SYSTEM) != 0) return (0); ump = VFSTOUFS(vp->v_mount); ACQUIRE_LOCK(ump); From owner-svn-src-all@freebsd.org Thu Sep 22 09:04:06 2016 Return-Path: Delivered-To: svn-src-all@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 D0C81BE58F5; Thu, 22 Sep 2016 09:04:06 +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 A19AA6E3; Thu, 22 Sep 2016 09:04:06 +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 u8M945OJ015486; Thu, 22 Sep 2016 09:04:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M9451s015485; Thu, 22 Sep 2016 09:04:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220904.u8M9451s015485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 09:04:05 +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: r306168 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:04:06 -0000 Author: kib Date: Thu Sep 22 09:04:05 2016 New Revision: 306168 URL: https://svnweb.freebsd.org/changeset/base/306168 Log: MFC r305595: In dqsync(), when called from quotactl(), um_quotas entry might appear cleared since nothing prevents completion of the parallel quotaoff. There is nothing to sync in this case, and no reason to panic. Modified: stable/11/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_quota.c Thu Sep 22 09:02:04 2016 (r306167) +++ stable/11/sys/ufs/ufs/ufs_quota.c Thu Sep 22 09:04:05 2016 (r306168) @@ -1538,8 +1538,13 @@ dqsync(struct vnode *vp, struct dquot *d if ((ump = dq->dq_ump) == NULL) return (0); UFS_LOCK(ump); - if ((dqvp = ump->um_quotas[dq->dq_type]) == NULLVP) - panic("dqsync: file"); + if ((dqvp = ump->um_quotas[dq->dq_type]) == NULLVP) { + if (vp == NULL) { + UFS_UNLOCK(ump); + return (0); + } else + panic("dqsync: file"); + } vref(dqvp); UFS_UNLOCK(ump); From owner-svn-src-all@freebsd.org Thu Sep 22 09:06:02 2016 Return-Path: Delivered-To: svn-src-all@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 41CF4BE5A5B; Thu, 22 Sep 2016 09:06:02 +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 11E688DA; Thu, 22 Sep 2016 09:06:02 +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 u8M961kr015606; Thu, 22 Sep 2016 09:06:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M961U0015605; Thu, 22 Sep 2016 09:06:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220906.u8M961U0015605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 09:06:01 +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: r306169 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:06:02 -0000 Author: kib Date: Thu Sep 22 09:06:01 2016 New Revision: 306169 URL: https://svnweb.freebsd.org/changeset/base/306169 Log: MFC r305597: When extending directory inode in ufs_direnter(), adjust i_endoff. Modified: stable/11/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 09:04:05 2016 (r306168) +++ stable/11/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 09:06:01 2016 (r306169) @@ -908,6 +908,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir } dp->i_size = dp->i_offset + DIRBLKSIZ; DIP_SET(dp, i_size, dp->i_size); + dp->i_endoff = dp->i_size; dp->i_flag |= IN_CHANGE | IN_UPDATE; dirp->d_reclen = DIRBLKSIZ; blkoff = dp->i_offset & From owner-svn-src-all@freebsd.org Thu Sep 22 09:08:12 2016 Return-Path: Delivered-To: svn-src-all@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 B9962BE5BF9; Thu, 22 Sep 2016 09:08:12 +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 88BE4ABC; Thu, 22 Sep 2016 09:08:12 +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 u8M98BZX015733; Thu, 22 Sep 2016 09:08:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M98B0r015732; Thu, 22 Sep 2016 09:08:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220908.u8M98B0r015732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 09:08: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: r306170 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:08:12 -0000 Author: kib Date: Thu Sep 22 09:08:11 2016 New Revision: 306170 URL: https://svnweb.freebsd.org/changeset/base/306170 Log: MFC r305598: When logging unlikely UFS_TRUNCATE() failure in ufs_direnter(), include error code. Modified: stable/11/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 09:06:01 2016 (r306169) +++ stable/11/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 09:08:11 2016 (r306170) @@ -1124,7 +1124,8 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr); if (error != 0) - vn_printf(dvp, "ufs_direnter: failed to truncate "); + vn_printf(dvp, "ufs_direnter: failed to truncate " + "err %d", error); #ifdef UFS_DIRHASH if (error == 0 && dp->i_dirhash != NULL) ufsdirhash_dirtrunc(dp, dp->i_endoff); From owner-svn-src-all@freebsd.org Thu Sep 22 09:10:32 2016 Return-Path: Delivered-To: svn-src-all@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 11F2FBE5E24; Thu, 22 Sep 2016 09:10:32 +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 D334CC98; Thu, 22 Sep 2016 09:10:31 +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 u8M9AVEq015878; Thu, 22 Sep 2016 09:10:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M9AUh6015877; Thu, 22 Sep 2016 09:10:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220910.u8M9AUh6015877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 09:10:30 +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: r306171 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:10:32 -0000 Author: kib Date: Thu Sep 22 09:10:30 2016 New Revision: 306171 URL: https://svnweb.freebsd.org/changeset/base/306171 Log: MFC r305599: Do not leak transient ENOLCK error from flush_newblk_dep() loop. Modified: stable/11/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 09:08:11 2016 (r306170) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 09:10:30 2016 (r306171) @@ -12852,6 +12852,7 @@ flush_newblk_dep(vp, mp, lbn) LK_INTERLOCK, BO_LOCKPTR(bo)); if (error == ENOLCK) { ACQUIRE_LOCK(ump); + error = 0; continue; /* Slept, retry */ } if (error != 0) From owner-svn-src-all@freebsd.org Thu Sep 22 09:14:05 2016 Return-Path: Delivered-To: svn-src-all@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 91111BE42B8; Thu, 22 Sep 2016 09:14:05 +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 63AA5149; Thu, 22 Sep 2016 09:14:05 +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 u8M9E4rO019334; Thu, 22 Sep 2016 09:14:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M9E4Ep019333; Thu, 22 Sep 2016 09:14:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609220914.u8M9E4Ep019333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 09:14: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: r306172 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:14:05 -0000 Author: kib Date: Thu Sep 22 09:14:04 2016 New Revision: 306172 URL: https://svnweb.freebsd.org/changeset/base/306172 Log: MFC r305601: On rename, do not perform truncation of dirhash if the vnode truncation failed. Modified: stable/11/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_vnops.c Thu Sep 22 09:10:30 2016 (r306171) +++ stable/11/sys/ufs/ufs/ufs_vnops.c Thu Sep 22 09:14:04 2016 (r306172) @@ -1529,11 +1529,21 @@ unlockout: * are no longer needed. */ if (error == 0 && endoff != 0) { + error = UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, + tcnp->cn_cred); + if (error != 0) + vn_printf(tdvp, "ufs_rename: failed to truncate " + "err %d", error); #ifdef UFS_DIRHASH - if (tdp->i_dirhash != NULL) + else if (tdp->i_dirhash != NULL) ufsdirhash_dirtrunc(tdp, endoff); #endif - UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred); + /* + * Even if the directory compaction failed, rename was + * succesful. Do not propagate a UFS_TRUNCATE() error + * to the caller. + */ + error = 0; } if (error == 0 && tdp->i_flag & IN_NEEDSYNC) error = VOP_FSYNC(tdvp, MNT_WAIT, td); From owner-svn-src-all@freebsd.org Thu Sep 22 09:28:17 2016 Return-Path: Delivered-To: svn-src-all@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 BC692BE35A0; Thu, 22 Sep 2016 09:28:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C871DCE; Thu, 22 Sep 2016 09:28:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u8M9S8TO063387 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 22 Sep 2016 12:28:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8M9S8TO063387 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8M9S85q063386; Thu, 22 Sep 2016 12:28:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Sep 2016 12:28:08 +0300 From: Konstantin Belousov To: Ed Schouten Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306162 - in head/sys/arm: arm include Message-ID: <20160922092808.GR38409@kib.kiev.ua> References: <201609220815.u8M8F0Lo096297@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609220815.u8M8F0Lo096297@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:28:17 -0000 On Thu, Sep 22, 2016 at 08:15:00AM +0000, Ed Schouten wrote: > Author: ed > Date: Thu Sep 22 08:14:59 2016 > New Revision: 306162 > URL: https://svnweb.freebsd.org/changeset/base/306162 > > Log: > Make it possible to safely use TPIDRURW from userspace. > > On amd64, arm64 and i386, we have the possibility to switch between TLS > areas in userspace. The nice thing about this is that it makes it easier > to do light-weight threading, if we ever feel like doing that. On armv6, > let's go into the same direction by making it possible to safely use the > TPIDRURW register, which is intended for this purpose. What do you mean about 'possibility to switch between TLS areas in usermode' ? On x86, kernel switches %fs/%gs bases on the context switches. There is, indeed, a way to turn off this functionality, but it is somewhat unobvious, I have to admit. E.g. on Ivy+, RDFSBASE/RDGSBASE work. WRFSBASE/WRGSBASE are enabled, but they are de-facto not functional, since next context switch overrides the base, in default setup. From owner-svn-src-all@freebsd.org Thu Sep 22 09:33:23 2016 Return-Path: Delivered-To: svn-src-all@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 C44E7BE3C38; Thu, 22 Sep 2016 09:33:23 +0000 (UTC) (envelope-from kevlo@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 974C765E; Thu, 22 Sep 2016 09:33:23 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M9XMoV026970; Thu, 22 Sep 2016 09:33:22 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M9XMQT026969; Thu, 22 Sep 2016 09:33:22 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609220933.u8M9XMQT026969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 22 Sep 2016 09:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306173 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:33:23 -0000 Author: kevlo Date: Thu Sep 22 09:33:22 2016 New Revision: 306173 URL: https://svnweb.freebsd.org/changeset/base/306173 Log: Add TP-Link Archer T4U. It will be used by the updated rtwn(4) / urtwn(4) driver. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Sep 22 09:14:04 2016 (r306172) +++ head/sys/dev/usb/usbdevs Thu Sep 22 09:33:22 2016 (r306173) @@ -739,6 +739,7 @@ vendor VIALABS 0x2109 VIA Labs vendor ERICSSON 0x2282 Ericsson vendor MOTOROLA2 0x22b8 Motorola vendor WETELECOM 0x22de WeTelecom +vendor TPLINK 0x2357 TP-Link vendor WESTMOUNTAIN 0x2405 West Mountain Radio vendor TRIPPLITE 0x2478 Tripp-Lite vendor HIROSE 0x2631 Hirose Electric @@ -4472,6 +4473,9 @@ product TOSHIBA G450 0x0d45 G450 modem product TOSHIBA HSDPA 0x1302 G450 modem product TOSHIBA TRANSMEMORY 0x6545 USB ThumbDrive +/* TP-Link products */ +product TPLINK T4U 0x0101 Archer T4U + /* Trek Technology products */ product TREK THUMBDRIVE 0x1111 ThumbDrive product TREK MEMKEY 0x8888 IBM USB Memory Key From owner-svn-src-all@freebsd.org Thu Sep 22 09:58:48 2016 Return-Path: Delivered-To: svn-src-all@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 104FCBE58B5; Thu, 22 Sep 2016 09:58:48 +0000 (UTC) (envelope-from oshogbo@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 E0C3E92C; Thu, 22 Sep 2016 09:58:47 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8M9wlaU034765; Thu, 22 Sep 2016 09:58:47 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8M9wkfh034759; Thu, 22 Sep 2016 09:58:46 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201609220958.u8M9wkfh034759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 22 Sep 2016 09:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:58:48 -0000 Author: oshogbo Date: Thu Sep 22 09:58:46 2016 New Revision: 306174 URL: https://svnweb.freebsd.org/changeset/base/306174 Log: capsicum: propagate rights on accept(2) Descriptor returned by accept(2) should inherits capabilities rights from the listening socket. PR: 201052 Reviewed by: emaste, jonathan Discussed with: many Differential Revision: https://reviews.freebsd.org/D7724 Modified: head/sys/compat/cloudabi/cloudabi_sock.c head/sys/compat/linux/linux_socket.c head/sys/kern/kern_sendfile.c head/sys/kern/uipc_syscalls.c head/sys/netinet/sctp_syscalls.c head/sys/sys/socketvar.h Modified: head/sys/compat/cloudabi/cloudabi_sock.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread int error; error = getsock_cap(td, uap->sock, cap_rights_init(&rights, - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); if (error != 0) return (error); so = fp->f_data; Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) return (EINVAL); if (error == EINVAL) { - error1 = getsock_cap(td, s, &rights, &fp, NULL); + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); if (error1 != 0) return (error1); so = fp->f_data; Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int * The socket must be a stream socket and connected. */ error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), - sock_fp, NULL); + sock_fp, NULL, NULL); if (error != 0) return (error); *so = (*sock_fp)->f_data; Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char /* * Convert a user file descriptor to a kernel file entry and check if required * capability rights are present. + * If required copy of current set of capability rights is returned. * A reference on the file entry is held upon returning. */ int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, - struct file **fpp, u_int *fflagp) + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) { struct file *fp; int error; - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); + error = fget_cap(td, fd, rightsp, &fp, havecapsp); if (error != 0) return (error); if (fp->f_type != DTYPE_SOCKET) { fdrop(fp, td); + if (havecapsp != NULL) + filecaps_free(havecapsp); return (ENOTSOCK); } if (fflagp != NULL) @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd AUDIT_ARG_FD(fd); AUDIT_ARG_SOCKADDR(td, dirfd, sa); error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), - &fp, NULL); + &fp, NULL, NULL); if (error != 0) return (error); so = fp->f_data; @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis AUDIT_ARG_FD(uap->s); error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), - &fp, NULL); + &fp, NULL, NULL); if (error == 0) { so = fp->f_data; #ifdef MAC @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s struct file *headfp, *nfp = NULL; struct sockaddr *sa = NULL; struct socket *head, *so; + struct filecaps fcaps; cap_rights_t rights; u_int fflag; pid_t pgid; @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s AUDIT_ARG_FD(s); error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), - &headfp, &fflag); + &headfp, &fflag, &fcaps); if (error != 0) return (error); head = headfp->f_data; @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s if (error != 0) goto done; #endif - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); + error = falloc_caps(td, &nfp, &fd, + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); if (error != 0) goto done; ACCEPT_LOCK(); @@ -440,6 +445,8 @@ noconnection: * a reference on nfp to the caller on success if they request it. */ done: + if (nfp == NULL) + filecaps_free(&fcaps); if (fp != NULL) { if (error == 0) { *fp = nfp; @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di AUDIT_ARG_FD(fd); AUDIT_ARG_SOCKADDR(td, dirfd, sa); error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), - &fp, NULL); + &fp, NULL, NULL); if (error != 0) return (error); so = fp->f_data; @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); cap_rights_set(&rights, CAP_CONNECT); } - error = getsock_cap(td, s, &rights, &fp, NULL); + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); if (error != 0) return (error); so = (struct socket *)fp->f_data; @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st AUDIT_ARG_FD(s); error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), - &fp, NULL); + &fp, NULL, NULL); if (error != 0) return (error); so = fp->f_data; @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s AUDIT_ARG_FD(uap->s); error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), - &fp, NULL); + &fp, NULL, NULL); if (error == 0) { so = fp->f_data; error = soshutdown(so, uap->how); @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s AUDIT_ARG_FD(s); error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), - &fp, NULL); + &fp, NULL, NULL); if (error == 0) { so = fp->f_data; error = sosetopt(so, &sopt); @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s AUDIT_ARG_FD(s); error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), - &fp, NULL); + &fp, NULL, NULL); if (error == 0) { so = fp->f_data; error = sogetopt(so, &sopt); @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int AUDIT_ARG_FD(fd); error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), - &fp, NULL); + &fp, NULL, NULL); if (error != 0) return (error); so = fp->f_data; @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int AUDIT_ARG_FD(fd); error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), - &fp, NULL); + &fp, NULL, NULL); if (error != 0) return (error); so = fp->f_data; Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) } AUDIT_ARG_FD(uap->sd); - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); if (error != 0) goto sctp_bad; #ifdef KTRACE @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) } AUDIT_ARG_FD(uap->sd); - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); if (error != 0) goto sctp_bad1; @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) AUDIT_ARG_FD(uap->sd); error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), - &fp, NULL); + &fp, NULL, NULL); if (error != 0) return (error); #ifdef COMPAT_FREEBSD32 Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) @@ -321,6 +321,7 @@ extern u_long sb_max; extern so_gen_t so_gencnt; struct file; +struct filecaps; struct filedesc; struct mbuf; struct sockaddr; @@ -340,7 +341,7 @@ struct uio; */ int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, - struct file **fpp, u_int *fflagp); + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); void soabort(struct socket *so); int soaccept(struct socket *so, struct sockaddr **nam); void soaio_enqueue(struct task *task); From owner-svn-src-all@freebsd.org Thu Sep 22 10:42:41 2016 Return-Path: Delivered-To: svn-src-all@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 8E5F7BE4752; Thu, 22 Sep 2016 10:42:41 +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 4D0221C28; Thu, 22 Sep 2016 10:42:41 +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 u8MAgeZ0054033; Thu, 22 Sep 2016 10:42:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MAge6p054030; Thu, 22 Sep 2016 10:42:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221042.u8MAge6p054030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:42:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306175 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:42:41 -0000 Author: kib Date: Thu Sep 22 10:42:40 2016 New Revision: 306175 URL: https://svnweb.freebsd.org/changeset/base/306175 Log: MFC r305592: Partially lift suspension when ffs_reload() finished with cgs and going to re-read inodes. Modified: stable/10/sys/ufs/ffs/ffs_extern.h stable/10/sys/ufs/ffs/ffs_suspend.c stable/10/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_extern.h ============================================================================== --- stable/10/sys/ufs/ffs/ffs_extern.h Thu Sep 22 09:58:46 2016 (r306174) +++ stable/10/sys/ufs/ffs/ffs_extern.h Thu Sep 22 10:42:40 2016 (r306175) @@ -107,6 +107,9 @@ void ffs_susp_uninitialize(void); #define FFSV_FORCEINSMQ 0x0001 +#define FFSR_FORCE 0x0001 +#define FFSR_UNSUSPEND 0x0002 + extern struct vop_vector ffs_vnodeops1; extern struct vop_vector ffs_fifoops1; extern struct vop_vector ffs_vnodeops2; Modified: stable/10/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_suspend.c Thu Sep 22 09:58:46 2016 (r306174) +++ stable/10/sys/ufs/ffs/ffs_suspend.c Thu Sep 22 10:42:40 2016 (r306175) @@ -234,7 +234,7 @@ ffs_susp_dtor(void *data) KASSERT((mp->mnt_kern_flag & MNTK_SUSPEND) != 0, ("MNTK_SUSPEND not set")); - error = ffs_reload(mp, curthread, 1); + error = ffs_reload(mp, curthread, FFSR_FORCE | FFSR_UNSUSPEND); if (error != 0) panic("failed to unsuspend writes on %s", fs->fs_fsmnt); Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vfsops.c Thu Sep 22 09:58:46 2016 (r306174) +++ stable/10/sys/ufs/ffs/ffs_vfsops.c Thu Sep 22 10:42:40 2016 (r306175) @@ -583,11 +583,13 @@ ffs_cmount(struct mntarg *ma, void *data * 2) re-read superblock from disk. * 3) re-read summary information from disk. * 4) invalidate all inactive vnodes. - * 5) invalidate all cached file data. - * 6) re-read inode data for all active vnodes. + * 5) clear MNTK_SUSPEND2 and MNTK_SUSPENDED flags, allowing secondary + * writers, if requested. + * 6) invalidate all cached file data. + * 7) re-read inode data for all active vnodes. */ int -ffs_reload(struct mount *mp, struct thread *td, int force) +ffs_reload(struct mount *mp, struct thread *td, int flags) { struct vnode *vp, *mvp, *devvp; struct inode *ip; @@ -602,7 +604,7 @@ ffs_reload(struct mount *mp, struct thre ump = VFSTOUFS(mp); MNT_ILOCK(mp); - if ((mp->mnt_flag & MNT_RDONLY) == 0 && force == 0) { + if ((mp->mnt_flag & MNT_RDONLY) == 0 && (flags & FFSR_FORCE) == 0) { MNT_IUNLOCK(mp); return (EINVAL); } @@ -692,6 +694,12 @@ ffs_reload(struct mount *mp, struct thre size = fs->fs_ncg * sizeof(u_int8_t); fs->fs_contigdirs = (u_int8_t *)space; bzero(fs->fs_contigdirs, size); + if ((flags & FFSR_UNSUSPEND) != 0) { + MNT_ILOCK(mp); + mp->mnt_kern_flag &= ~(MNTK_SUSPENDED | MNTK_SUSPEND2); + wakeup(&mp->mnt_flag); + MNT_IUNLOCK(mp); + } loop: MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { From owner-svn-src-all@freebsd.org Thu Sep 22 10:44:57 2016 Return-Path: Delivered-To: svn-src-all@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 B7518BE49DB; Thu, 22 Sep 2016 10:44:57 +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 6E20A1E47; Thu, 22 Sep 2016 10:44:57 +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 u8MAiuLg054172; Thu, 22 Sep 2016 10:44:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MAiuAq054171; Thu, 22 Sep 2016 10:44:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221044.u8MAiuAq054171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306176 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:44:57 -0000 Author: kib Date: Thu Sep 22 10:44:56 2016 New Revision: 306176 URL: https://svnweb.freebsd.org/changeset/base/306176 Log: MFC r305593: There is no need to upgrade the last dvp lock on lookups for modifying operations. Instead of upgrading, assert that the lock is exclusive. Explain the cause in comments. Modified: stable/10/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 10:42:40 2016 (r306175) +++ stable/10/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 10:44:56 2016 (r306176) @@ -76,32 +76,6 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, C /* true if old FS format...*/ #define OFSFMT(vp) ((vp)->v_mount->mnt_maxsymlinklen <= 0) -#ifdef QUOTA -static int -ufs_lookup_upgrade_lock(struct vnode *vp) -{ - int error; - - ASSERT_VOP_LOCKED(vp, __FUNCTION__); - if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) - return (0); - - error = 0; - - /* - * Upgrade vnode lock, since getinoquota() - * requires exclusive lock to modify inode. - */ - vhold(vp); - vn_lock(vp, LK_UPGRADE | LK_RETRY); - VI_LOCK(vp); - if (vp->v_iflag & VI_DOOMED) - error = ENOENT; - vdropl(vp); - return (error); -} -#endif - static int ufs_delete_denied(struct vnode *vdp, struct vnode *tdp, struct ucred *cred, struct thread *td) @@ -259,12 +233,25 @@ ufs_lookup_ino(struct vnode *vdp, struct vnode_create_vobject(vdp, DIP(dp, i_size), cnp->cn_thread); bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; -#ifdef QUOTA - if ((nameiop == DELETE || nameiop == RENAME) && (flags & ISLASTCN)) { - error = ufs_lookup_upgrade_lock(vdp); - if (error != 0) - return (error); - } + +#ifdef DEBUG_VFS_LOCKS + /* + * Assert that the directory vnode is locked, and locked + * exclusively for the last component lookup for modifying + * operations. + * + * The directory-modifying operations need to save + * intermediate state in the inode between namei() call and + * actual directory manipulations. See fields in the struct + * inode marked as 'used during directory lookup'. We must + * ensure that upgrade in namei() does not happen, since + * upgrade might need to unlock vdp. If quotas are enabled, + * getinoquota() also requires exclusive lock to modify inode. + */ + ASSERT_VOP_LOCKED(vdp, "ufs_lookup1"); + if ((nameiop == CREATE || nameiop == DELETE || nameiop == RENAME) && + (flags & (LOCKPARENT | ISLASTCN)) == (LOCKPARENT | ISLASTCN)) + ASSERT_VOP_ELOCKED(vdp, "ufs_lookup2"); #endif restart: From owner-svn-src-all@freebsd.org Thu Sep 22 10:46:09 2016 Return-Path: Delivered-To: svn-src-all@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 67895BE4B85; Thu, 22 Sep 2016 10:46:09 +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 3742E119; Thu, 22 Sep 2016 10:46:09 +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 u8MAk8Pc054274; Thu, 22 Sep 2016 10:46:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MAk8Go054273; Thu, 22 Sep 2016 10:46:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221046.u8MAk8Go054273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306177 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:46:09 -0000 Author: kib Date: Thu Sep 22 10:46:08 2016 New Revision: 306177 URL: https://svnweb.freebsd.org/changeset/base/306177 Log: MFC r305594: In softdep_prealloc(), return early not only for snapshots, but for the quota files as well. Modified: stable/10/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 10:44:56 2016 (r306176) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 10:46:08 2016 (r306177) @@ -2996,10 +2996,13 @@ softdep_prealloc(vp, waitok) ("softdep_prealloc called on non-softdep filesystem")); /* * Nothing to do if we are not running journaled soft updates. - * If we currently hold the snapshot lock, we must avoid handling - * other resources that could cause deadlock. + * If we currently hold the snapshot lock, we must avoid + * handling other resources that could cause deadlock. Do not + * touch quotas vnode since it is typically recursed with + * other vnode locks held. */ - if (DOINGSUJ(vp) == 0 || IS_SNAPSHOT(VTOI(vp))) + if (DOINGSUJ(vp) == 0 || IS_SNAPSHOT(VTOI(vp)) || + (vp->v_vflag & VV_SYSTEM) != 0) return (0); ump = VFSTOUFS(vp->v_mount); ACQUIRE_LOCK(ump); From owner-svn-src-all@freebsd.org Thu Sep 22 10:47:57 2016 Return-Path: Delivered-To: svn-src-all@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 B9CBFBE4DA0; Thu, 22 Sep 2016 10:47:57 +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 8A9B0379; Thu, 22 Sep 2016 10:47:57 +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 u8MAluvt054381; Thu, 22 Sep 2016 10:47:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MAluFv054380; Thu, 22 Sep 2016 10:47:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221047.u8MAluFv054380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306178 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:47:57 -0000 Author: kib Date: Thu Sep 22 10:47:56 2016 New Revision: 306178 URL: https://svnweb.freebsd.org/changeset/base/306178 Log: MFC r305595: In dqsync(), when called from quotactl(), um_quotas entry might appear cleared since nothing prevents completion of the parallel quotaoff. There is nothing to sync in this case, and no reason to panic. Modified: stable/10/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_quota.c Thu Sep 22 10:46:08 2016 (r306177) +++ stable/10/sys/ufs/ufs/ufs_quota.c Thu Sep 22 10:47:56 2016 (r306178) @@ -1542,8 +1542,13 @@ dqsync(struct vnode *vp, struct dquot *d if ((ump = dq->dq_ump) == NULL) return (0); UFS_LOCK(ump); - if ((dqvp = ump->um_quotas[dq->dq_type]) == NULLVP) - panic("dqsync: file"); + if ((dqvp = ump->um_quotas[dq->dq_type]) == NULLVP) { + if (vp == NULL) { + UFS_UNLOCK(ump); + return (0); + } else + panic("dqsync: file"); + } vref(dqvp); UFS_UNLOCK(ump); From owner-svn-src-all@freebsd.org Thu Sep 22 10:49:43 2016 Return-Path: Delivered-To: svn-src-all@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 80B50BE4FDD; Thu, 22 Sep 2016 10:49:43 +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 5098D7F5; Thu, 22 Sep 2016 10:49:43 +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 u8MAngI2054498; Thu, 22 Sep 2016 10:49:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MAnga2054497; Thu, 22 Sep 2016 10:49:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221049.u8MAnga2054497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306179 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:49:43 -0000 Author: kib Date: Thu Sep 22 10:49:42 2016 New Revision: 306179 URL: https://svnweb.freebsd.org/changeset/base/306179 Log: MFC r305597: When extending directory inode in ufs_direnter(), adjust i_endoff. Modified: stable/10/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 10:47:56 2016 (r306178) +++ stable/10/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 10:49:42 2016 (r306179) @@ -908,6 +908,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir } dp->i_size = dp->i_offset + DIRBLKSIZ; DIP_SET(dp, i_size, dp->i_size); + dp->i_endoff = dp->i_size; dp->i_flag |= IN_CHANGE | IN_UPDATE; dirp->d_reclen = DIRBLKSIZ; blkoff = dp->i_offset & From owner-svn-src-all@freebsd.org Thu Sep 22 10:51:48 2016 Return-Path: Delivered-To: svn-src-all@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 F09B8BE523D; Thu, 22 Sep 2016 10:51:48 +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 BDF72CA2; Thu, 22 Sep 2016 10:51:48 +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 u8MAplql056058; Thu, 22 Sep 2016 10:51:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MApldD056057; Thu, 22 Sep 2016 10:51:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221051.u8MApldD056057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306180 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:51:49 -0000 Author: kib Date: Thu Sep 22 10:51:47 2016 New Revision: 306180 URL: https://svnweb.freebsd.org/changeset/base/306180 Log: MFC r305598: When logging unlikely UFS_TRUNCATE() failure in ufs_direnter(), include error code. Modified: stable/10/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 10:49:42 2016 (r306179) +++ stable/10/sys/ufs/ufs/ufs_lookup.c Thu Sep 22 10:51:47 2016 (r306180) @@ -1124,7 +1124,8 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr); if (error != 0) - vprint("ufs_direnter: failed to truncate", dvp); + vn_printf(dvp, "ufs_direnter: failed to truncate " + "err %d", error); #ifdef UFS_DIRHASH if (error == 0 && dp->i_dirhash != NULL) ufsdirhash_dirtrunc(dp, dp->i_endoff); From owner-svn-src-all@freebsd.org Thu Sep 22 10:53:15 2016 Return-Path: Delivered-To: svn-src-all@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 1FB3CBE549A; Thu, 22 Sep 2016 10:53: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 E398AEE8; Thu, 22 Sep 2016 10:53:14 +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 u8MArE7n058174; Thu, 22 Sep 2016 10:53:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MArExb058173; Thu, 22 Sep 2016 10:53:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221053.u8MArExb058173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306181 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:53:15 -0000 Author: kib Date: Thu Sep 22 10:53:13 2016 New Revision: 306181 URL: https://svnweb.freebsd.org/changeset/base/306181 Log: MFC r305599: Do not leak transient ENOLCK error from flush_newblk_dep() loop. Modified: stable/10/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 10:51:47 2016 (r306180) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 10:53:13 2016 (r306181) @@ -12843,6 +12843,7 @@ flush_newblk_dep(vp, mp, lbn) LK_INTERLOCK, BO_LOCKPTR(bo)); if (error == ENOLCK) { ACQUIRE_LOCK(ump); + error = 0; continue; /* Slept, retry */ } if (error != 0) From owner-svn-src-all@freebsd.org Thu Sep 22 10:54:32 2016 Return-Path: Delivered-To: svn-src-all@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 01D66BE555A; Thu, 22 Sep 2016 10:54:32 +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 C6C2E105C; Thu, 22 Sep 2016 10:54:31 +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 u8MAsVde058268; Thu, 22 Sep 2016 10:54:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MAsVxA058267; Thu, 22 Sep 2016 10:54:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221054.u8MAsVxA058267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306182 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:54:32 -0000 Author: kib Date: Thu Sep 22 10:54:30 2016 New Revision: 306182 URL: https://svnweb.freebsd.org/changeset/base/306182 Log: MFC r305601: On rename, do not perform truncation of dirhash if the vnode truncation failed. Modified: stable/10/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_vnops.c Thu Sep 22 10:53:13 2016 (r306181) +++ stable/10/sys/ufs/ufs/ufs_vnops.c Thu Sep 22 10:54:30 2016 (r306182) @@ -1530,11 +1530,21 @@ unlockout: * are no longer needed. */ if (error == 0 && endoff != 0) { + error = UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, + tcnp->cn_cred); + if (error != 0) + vn_printf(tdvp, "ufs_rename: failed to truncate " + "err %d", error); #ifdef UFS_DIRHASH - if (tdp->i_dirhash != NULL) + else if (tdp->i_dirhash != NULL) ufsdirhash_dirtrunc(tdp, endoff); #endif - UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred); + /* + * Even if the directory compaction failed, rename was + * succesful. Do not propagate a UFS_TRUNCATE() error + * to the caller. + */ + error = 0; } if (error == 0 && tdp->i_flag & IN_NEEDSYNC) error = VOP_FSYNC(tdvp, MNT_WAIT, td); From owner-svn-src-all@freebsd.org Thu Sep 22 10:58:21 2016 Return-Path: Delivered-To: svn-src-all@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 F405EBE5939; Thu, 22 Sep 2016 10:58:20 +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 C153D148A; Thu, 22 Sep 2016 10:58:20 +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 u8MAwJMx058467; Thu, 22 Sep 2016 10:58:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MAwJmu058466; Thu, 22 Sep 2016 10:58:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609221058.u8MAwJmu058466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Sep 2016 10:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306183 - stable/9/sys/ufs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 10:58:21 -0000 Author: kib Date: Thu Sep 22 10:58:19 2016 New Revision: 306183 URL: https://svnweb.freebsd.org/changeset/base/306183 Log: MFC r305599: Do not leak transient ENOLCK error from flush_newblk_dep() loop. Modified: stable/9/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 10:54:30 2016 (r306182) +++ stable/9/sys/ufs/ffs/ffs_softdep.c Thu Sep 22 10:58:19 2016 (r306183) @@ -12577,6 +12577,7 @@ flush_newblk_dep(vp, mp, lbn) LK_INTERLOCK, BO_MTX(bo)); if (error == ENOLCK) { ACQUIRE_LOCK(&lk); + error = 0; continue; /* Slept, retry */ } if (error != 0) From owner-svn-src-all@freebsd.org Thu Sep 22 11:54:22 2016 Return-Path: Delivered-To: svn-src-all@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 256A1BE5F21; Thu, 22 Sep 2016 11:54:22 +0000 (UTC) (envelope-from oshogbo@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 EC47310CA; Thu, 22 Sep 2016 11:54:21 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MBsLfo081002; Thu, 22 Sep 2016 11:54:21 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MBsLO9081001; Thu, 22 Sep 2016 11:54:21 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201609221154.u8MBsLO9081001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 22 Sep 2016 11:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306184 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 11:54:22 -0000 Author: oshogbo Date: Thu Sep 22 11:54:20 2016 New Revision: 306184 URL: https://svnweb.freebsd.org/changeset/base/306184 Log: fd: simplify fgetvp_rights by using fget_cap_locked Reviewed by: mjg Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Sep 22 10:58:19 2016 (r306183) +++ head/sys/kern/kern_descrip.c Thu Sep 22 11:54:20 2016 (r306184) @@ -2781,30 +2781,31 @@ fgetvp_rights(struct thread *td, int fd, struct filecaps *havecaps, struct vnode **vpp) { struct filedesc *fdp; + struct filecaps caps; struct file *fp; -#ifdef CAPABILITIES int error; -#endif fdp = td->td_proc->p_fd; - fp = fget_locked(fdp, fd); - if (fp == NULL || fp->f_ops == &badfileops) - return (EBADF); - -#ifdef CAPABILITIES - error = cap_check(cap_rights(fdp, fd), needrightsp); + error = fget_cap_locked(fdp, fd, needrightsp, &fp, &caps); if (error != 0) return (error); -#endif - - if (fp->f_vnode == NULL) - return (EINVAL); + if (fp->f_ops == &badfileops) { + error = EBADF; + goto out; + } + if (fp->f_vnode == NULL) { + error = EINVAL; + goto out; + } + *havecaps = caps; *vpp = fp->f_vnode; vref(*vpp); - filecaps_copy(&fdp->fd_ofiles[fd].fde_caps, havecaps, true); return (0); +out: + filecaps_free(&caps); + return (error); } int From owner-svn-src-all@freebsd.org Thu Sep 22 12:08:28 2016 Return-Path: Delivered-To: svn-src-all@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 28128BE38D5; Thu, 22 Sep 2016 12:08:28 +0000 (UTC) (envelope-from ed@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 D68D61F95; Thu, 22 Sep 2016 12:08:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MC8Rc5084894; Thu, 22 Sep 2016 12:08:27 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MC8QA9084891; Thu, 22 Sep 2016 12:08:26 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201609221208.u8MC8QA9084891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 22 Sep 2016 12:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306185 - in head: share/man/man4 sys/modules sys/modules/cloudabi32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 12:08:28 -0000 Author: ed Date: Thu Sep 22 12:08:26 2016 New Revision: 306185 URL: https://svnweb.freebsd.org/changeset/base/306185 Log: Make the cloudabi32 kernel module available on ARMv6. Now that all of the necessary bits for ARMv6 support for CloudABI have been checked in, let's hook the kernel module up to the build and document its existence. Modified: head/share/man/man4/cloudabi.4 head/sys/modules/Makefile head/sys/modules/cloudabi32/Makefile Modified: head/share/man/man4/cloudabi.4 ============================================================================== --- head/share/man/man4/cloudabi.4 Thu Sep 22 11:54:20 2016 (r306184) +++ head/share/man/man4/cloudabi.4 Thu Sep 22 12:08:26 2016 (r306185) @@ -22,7 +22,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 24, 2016 +.Dd September 22, 2016 .Dt CLOUDABI 4 .Os .Sh NAME @@ -84,7 +84,7 @@ module can be loaded on any architecture .Fx , the .Nm cloudabi32 -module is only available on i386 and amd64. +module is only available on amd64, armv6 and i386. The same holds for the .Nm cloudabi64 module, Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Sep 22 11:54:20 2016 (r306184) +++ head/sys/modules/Makefile Thu Sep 22 12:08:26 2016 (r306185) @@ -768,7 +768,8 @@ _epic= epic _igb= igb .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ + ${MACHINE_CPUARCH} == "i386") _cloudabi32= cloudabi32 .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" Modified: head/sys/modules/cloudabi32/Makefile ============================================================================== --- head/sys/modules/cloudabi32/Makefile Thu Sep 22 11:54:20 2016 (r306184) +++ head/sys/modules/cloudabi32/Makefile Thu Sep 22 12:08:26 2016 (r306185) @@ -14,14 +14,18 @@ SRCS= cloudabi32_fd.c cloudabi32_module. OBJS= cloudabi32_vdso_blob.o CLEANFILES=cloudabi32_vdso.o -.if ${MACHINE_CPUARCH} == "i386" -VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686.S -OUTPUT_TARGET=elf32-i386-freebsd -BINARY_ARCHITECTURE=aarch32 -.elif ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S OUTPUT_TARGET=elf64-x86-64-freebsd BINARY_ARCHITECTURE=i386 +.elif ${MACHINE_ARCH} == "armv6" +VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_armv6.S +OUTPUT_TARGET=elf32-littlearm +BINARY_ARCHITECTURE=arm +.elif ${MACHINE_CPUARCH} == "i386" +VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686.S +OUTPUT_TARGET=elf32-i386-freebsd +BINARY_ARCHITECTURE=i386 .endif cloudabi32_vdso.o: ${VDSO_SRCS} From owner-svn-src-all@freebsd.org Thu Sep 22 12:41:55 2016 Return-Path: Delivered-To: svn-src-all@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 0EE16BE559D; Thu, 22 Sep 2016 12:41:55 +0000 (UTC) (envelope-from br@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 D60648E8; Thu, 22 Sep 2016 12:41:54 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MCfse9097500; Thu, 22 Sep 2016 12:41:54 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MCfsvv097499; Thu, 22 Sep 2016 12:41:54 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609221241.u8MCfsvv097499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 22 Sep 2016 12:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306186 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 12:41:55 -0000 Author: br Date: Thu Sep 22 12:41:53 2016 New Revision: 306186 URL: https://svnweb.freebsd.org/changeset/base/306186 Log: Adjust the sopt_val pointer on bigendian systems (e.g. MIPS64EB). sooptcopyin() checks if size of data provided by user is <= than we can accept, else it strips down the size. On bigendian platforms we have to move pointer as well so we copy the actual data. Reviewed by: gnn Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7980 Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Thu Sep 22 12:08:26 2016 (r306185) +++ head/sys/kern/uipc_socket.c Thu Sep 22 12:41:53 2016 (r306186) @@ -2455,8 +2455,12 @@ sooptcopyin(struct sockopt *sopt, void * */ if ((valsize = sopt->sopt_valsize) < minlen) return EINVAL; - if (valsize > len) + if (valsize > len) { +#if _BYTE_ORDER == _BIG_ENDIAN + sopt->sopt_val = (void *)((uintptr_t)sopt->sopt_val + (valsize - len)); +#endif sopt->sopt_valsize = valsize = len; + } if (sopt->sopt_td != NULL) return (copyin(sopt->sopt_val, buf, valsize)); From owner-svn-src-all@freebsd.org Thu Sep 22 12:48:02 2016 Return-Path: Delivered-To: svn-src-all@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 8AACCBE5B72; Thu, 22 Sep 2016 12:48:02 +0000 (UTC) (envelope-from br@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 5A06AA1; Thu, 22 Sep 2016 12:48:02 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MCm13g001204; Thu, 22 Sep 2016 12:48:01 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MCm12K001202; Thu, 22 Sep 2016 12:48:01 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609221248.u8MCm12K001202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 22 Sep 2016 12:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306187 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 12:48:02 -0000 Author: br Date: Thu Sep 22 12:48:01 2016 New Revision: 306187 URL: https://svnweb.freebsd.org/changeset/base/306187 Log: Set the standard freebsd brand note for ELF binaries on MIPS, so binaries now get correct osreldate. Reviewed by: jhb Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7899 Modified: head/sys/mips/mips/elf_machdep.c head/sys/mips/mips/freebsd32_machdep.c Modified: head/sys/mips/mips/elf_machdep.c ============================================================================== --- head/sys/mips/mips/elf_machdep.c Thu Sep 22 12:41:53 2016 (r306186) +++ head/sys/mips/mips/elf_machdep.c Thu Sep 22 12:48:01 2016 (r306187) @@ -92,7 +92,8 @@ static Elf64_Brandinfo freebsd_brand_inf .interp_path = "/libexec/ld-elf.so.1", .sysvec = &elf64_freebsd_sysvec, .interp_newpath = NULL, - .flags = 0 + .brand_note = &elf64_freebsd_brandnote, + .flags = BI_BRAND_NOTE }; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, @@ -147,7 +148,8 @@ static Elf32_Brandinfo freebsd_brand_inf .interp_path = "/libexec/ld-elf.so.1", .sysvec = &elf32_freebsd_sysvec, .interp_newpath = NULL, - .flags = 0 + .brand_note = &elf32_freebsd_brandnote, + .flags = BI_BRAND_NOTE }; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Thu Sep 22 12:41:53 2016 (r306186) +++ head/sys/mips/mips/freebsd32_machdep.c Thu Sep 22 12:48:01 2016 (r306187) @@ -117,7 +117,8 @@ static Elf32_Brandinfo freebsd_brand_inf .interp_path = "/libexec/ld-elf.so.1", .sysvec = &elf32_freebsd_sysvec, .interp_newpath = "/libexec/ld-elf32.so.1", - .flags = 0 + .brand_note = &elf32_freebsd_brandnote, + .flags = BI_BRAND_NOTE }; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, From owner-svn-src-all@freebsd.org Thu Sep 22 12:53:12 2016 Return-Path: Delivered-To: svn-src-all@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 2EBCDBE516F; Thu, 22 Sep 2016 12:53:12 +0000 (UTC) (envelope-from br@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 00410A98; Thu, 22 Sep 2016 12:53:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MCrBp8005144; Thu, 22 Sep 2016 12:53:11 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MCrBO4005143; Thu, 22 Sep 2016 12:53:11 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609221253.u8MCrBO4005143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 22 Sep 2016 12:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306188 - head/tests/sys/geom/class/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 12:53:12 -0000 Author: br Date: Thu Sep 22 12:53:11 2016 New Revision: 306188 URL: https://svnweb.freebsd.org/changeset/base/306188 Log: Use bsdlabel as we don't have hardlink disklabel -> bsdlabel on some platforms. Reviewed by: ngie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7968 Modified: head/tests/sys/geom/class/eli/resize_test.sh Modified: head/tests/sys/geom/class/eli/resize_test.sh ============================================================================== --- head/tests/sys/geom/class/eli/resize_test.sh Thu Sep 22 12:48:01 2016 (r306187) +++ head/tests/sys/geom/class/eli/resize_test.sh Thu Sep 22 12:53:11 2016 (r306188) @@ -18,7 +18,7 @@ setsize() { { echo a: $(($partszMB * $BLKS_PER_MB)) 0 4.2BSD 1024 8192 echo c: $(($unitszMB * $BLKS_PER_MB)) 0 unused 0 0 - } | disklabel -R $md /dev/stdin + } | bsdlabel -R $md /dev/stdin } # Initialise From owner-svn-src-all@freebsd.org Thu Sep 22 12:54:46 2016 Return-Path: Delivered-To: svn-src-all@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 78CA2BE529F for ; Thu, 22 Sep 2016 12:54:46 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x236.google.com (mail-yb0-x236.google.com [IPv6:2607:f8b0:4002:c09::236]) (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 38D5FD25 for ; Thu, 22 Sep 2016 12:54:46 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x236.google.com with SMTP id x93so53347637ybh.1 for ; Thu, 22 Sep 2016 05:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aVPUbzXfqoC71fCgTZsteV/axYxhSJXMBmA6CV9YK+k=; b=Dl8JFci3dkCFQiaGwd8MOWNt7zrTGJzTsN5f0DYiIu1xbOMqgm1+gEZNP1F/+TNHa6 g0slRU3/e3fBHY3D7couMhkiD5/SnHabqypU2pnN+kpnYblNfOc3w82IY1Ye791bn5g+ 8acNsNcDAvYpX9MiOXqkv29MGJFWFnBVEzGYH/LFjXB5kMB/JJpRw796aYCL5sikSWG1 N74gBUCTRPwphRi1W6MeN6a8WDRr6Zuw2wJu+YkXYPN1wn7Px3qyeam45Q/pSEmL0Dlb XPIPJR+YxYMoJILQXkks4LSdGv/fjla3Q5/AVUEPEfFR5Vv1SoBMwFA5azRoRRJ77h+i ElWw== 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=aVPUbzXfqoC71fCgTZsteV/axYxhSJXMBmA6CV9YK+k=; b=MQdpBYhK5oHHh/kdnzfmdU8/jU/YqEqJAxckl3PX1xRpcsKpXF7HBE1wZExEjZRRWq 0SMsSSB9B6EEJs/VxCa+AAuLoimoA+hbZYEcxy4RZSby6YrxZpPU9tjle2vL6gYveYoh xnq7FvVYKDHkPuxSIWoxiW33psBIktENxYf9ZxNjIVdbbqBup53rrrdIjV04OnDGzvu2 Odn3ORyBWMvVg5aUbPFHq7YlRUopU0DhhJMbdwn5DT0ky+2BFVAnwfiCmjvEA3bOL1Bz k6FGLHA7EJoETpJiRt438J/Zy/FqqFAIdwLqc6bOHBq2tTC7rt54z8PB5MeNxtVRy8Wr Jlrw== X-Gm-Message-State: AE9vXwOHg+WVW2X7vA4HjQPAdmGo3rtmu61eU4VfvW3mXwbemIxqYgx1NoSwWlOpGp6YrtGKkLR43M+2bb/mZA== X-Received: by 10.37.201.1 with SMTP id z1mr1269673ybf.70.1474548885399; Thu, 22 Sep 2016 05:54:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Thu, 22 Sep 2016 05:54:44 -0700 (PDT) In-Reply-To: <20160922092808.GR38409@kib.kiev.ua> References: <201609220815.u8M8F0Lo096297@repo.freebsd.org> <20160922092808.GR38409@kib.kiev.ua> From: Ed Schouten Date: Thu, 22 Sep 2016 14:54:44 +0200 Message-ID: Subject: Re: svn commit: r306162 - in head/sys/arm: arm include To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 12:54:46 -0000 Hi Kostik, 2016-09-22 11:28 GMT+02:00 Konstantin Belousov : > What do you mean about 'possibility to switch between TLS areas in > usermode' ? On x86, kernel switches %fs/%gs bases on the context > switches. There is, indeed, a way to turn off this functionality, but it > is somewhat unobvious, I have to admit. On x86 I've solved this by not letting apps have ownership over %fs/%gs. Instead, they simply assume that they point to some valid piece of memory. They can only use %fs:0. That way we now effectively have the ability to adjust TLS from userspace on all architectures freely. This feature is already used extensively by the userspace emulator, where you can run CloudABI executables on unmodified operating systems. You can even run an emulator inside of an emulator inside of an emulator. Not useful, but a good demonstration/test. Another thing this could be useful for is that it allows us to implement something like a simple truss(1) that doesn't depend on kernel-level tracing facilities, but merely captures system call invocations inside the process itself. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Thu Sep 22 13:04:07 2016 Return-Path: Delivered-To: svn-src-all@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 019D3BE3107; Thu, 22 Sep 2016 13:04:07 +0000 (UTC) (envelope-from jkim@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 98DFAE98; Thu, 22 Sep 2016 13:04:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MD45m7009299; Thu, 22 Sep 2016 13:04:05 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MD43ee009275; Thu, 22 Sep 2016 13:04:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221304.u8MD43ee009275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 13:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306189 - in vendor-crypto/openssl/dist: . apps crypto crypto/aes/asm crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/cms crypto/comp crypto/conf crypto/des crypto/des/asm crypto/... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 13:04:07 -0000 Author: jkim Date: Thu Sep 22 13:04:03 2016 New Revision: 306189 URL: https://svnweb.freebsd.org/changeset/base/306189 Log: Import OpenSSL 1.0.2i. Added: vendor-crypto/openssl/dist/doc/crypto/d2i_PrivateKey.pod vendor-crypto/openssl/dist/ssl/bad_dtls_test.c (contents, props changed) vendor-crypto/openssl/dist/ssl/dtlstest.c (contents, props changed) Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/CONTRIBUTING vendor-crypto/openssl/dist/Configure vendor-crypto/openssl/dist/FREEBSD-Xlist vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/Makefile.org vendor-crypto/openssl/dist/Makefile.shared vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/CA.pl vendor-crypto/openssl/dist/apps/CA.pl.in vendor-crypto/openssl/dist/apps/apps.c vendor-crypto/openssl/dist/apps/apps.h vendor-crypto/openssl/dist/apps/ca.c vendor-crypto/openssl/dist/apps/dgst.c vendor-crypto/openssl/dist/apps/enc.c vendor-crypto/openssl/dist/apps/passwd.c vendor-crypto/openssl/dist/apps/pkcs12.c vendor-crypto/openssl/dist/apps/req.c vendor-crypto/openssl/dist/apps/s_apps.h vendor-crypto/openssl/dist/apps/s_cb.c vendor-crypto/openssl/dist/apps/s_client.c vendor-crypto/openssl/dist/apps/s_server.c vendor-crypto/openssl/dist/apps/speed.c vendor-crypto/openssl/dist/apps/srp.c vendor-crypto/openssl/dist/apps/verify.c vendor-crypto/openssl/dist/apps/x509.c vendor-crypto/openssl/dist/crypto/LPdir_unix.c vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-armv7.pl vendor-crypto/openssl/dist/crypto/asn1/a_bytes.c vendor-crypto/openssl/dist/crypto/asn1/a_object.c vendor-crypto/openssl/dist/crypto/asn1/a_set.c vendor-crypto/openssl/dist/crypto/asn1/a_strex.c vendor-crypto/openssl/dist/crypto/asn1/a_strnid.c vendor-crypto/openssl/dist/crypto/asn1/ameth_lib.c vendor-crypto/openssl/dist/crypto/asn1/asn1_lib.c vendor-crypto/openssl/dist/crypto/asn1/asn_mime.c vendor-crypto/openssl/dist/crypto/asn1/bio_asn1.c vendor-crypto/openssl/dist/crypto/asn1/bio_ndef.c vendor-crypto/openssl/dist/crypto/asn1/charmap.pl vendor-crypto/openssl/dist/crypto/asn1/d2i_pr.c vendor-crypto/openssl/dist/crypto/asn1/f_enum.c vendor-crypto/openssl/dist/crypto/asn1/f_int.c vendor-crypto/openssl/dist/crypto/asn1/f_string.c vendor-crypto/openssl/dist/crypto/asn1/i2d_pr.c vendor-crypto/openssl/dist/crypto/asn1/p5_pbe.c vendor-crypto/openssl/dist/crypto/asn1/p5_pbev2.c vendor-crypto/openssl/dist/crypto/asn1/t_req.c vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c vendor-crypto/openssl/dist/crypto/asn1/tasn_enc.c vendor-crypto/openssl/dist/crypto/asn1/tasn_prn.c vendor-crypto/openssl/dist/crypto/asn1/tasn_utl.c vendor-crypto/openssl/dist/crypto/asn1/x_bignum.c vendor-crypto/openssl/dist/crypto/asn1/x_name.c vendor-crypto/openssl/dist/crypto/asn1/x_x509.c vendor-crypto/openssl/dist/crypto/bio/b_print.c vendor-crypto/openssl/dist/crypto/bio/bf_nbio.c vendor-crypto/openssl/dist/crypto/bio/bio.h vendor-crypto/openssl/dist/crypto/bio/bss_bio.c vendor-crypto/openssl/dist/crypto/bio/bss_file.c vendor-crypto/openssl/dist/crypto/bio/bss_rtcp.c vendor-crypto/openssl/dist/crypto/bn/asm/x86-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont5.pl vendor-crypto/openssl/dist/crypto/bn/bn.h vendor-crypto/openssl/dist/crypto/bn/bn_div.c vendor-crypto/openssl/dist/crypto/bn/bn_lib.c vendor-crypto/openssl/dist/crypto/bn/bn_print.c vendor-crypto/openssl/dist/crypto/bn/bn_rand.c vendor-crypto/openssl/dist/crypto/bn/bn_word.c vendor-crypto/openssl/dist/crypto/bn/bntest.c vendor-crypto/openssl/dist/crypto/cms/cms_enc.c vendor-crypto/openssl/dist/crypto/cms/cms_ess.c vendor-crypto/openssl/dist/crypto/cms/cms_lib.c vendor-crypto/openssl/dist/crypto/cms/cms_pwri.c vendor-crypto/openssl/dist/crypto/comp/comp.h vendor-crypto/openssl/dist/crypto/conf/conf_def.h vendor-crypto/openssl/dist/crypto/conf/conf_mod.c vendor-crypto/openssl/dist/crypto/conf/keysets.pl vendor-crypto/openssl/dist/crypto/des/asm/dest4-sparcv9.pl vendor-crypto/openssl/dist/crypto/des/des.c vendor-crypto/openssl/dist/crypto/des/enc_writ.c vendor-crypto/openssl/dist/crypto/dh/dh_ameth.c vendor-crypto/openssl/dist/crypto/dsa/dsa_ameth.c vendor-crypto/openssl/dist/crypto/dsa/dsa_gen.c vendor-crypto/openssl/dist/crypto/dsa/dsa_ossl.c vendor-crypto/openssl/dist/crypto/ec/Makefile vendor-crypto/openssl/dist/crypto/ec/asm/ecp_nistz256-x86_64.pl vendor-crypto/openssl/dist/crypto/ec/ec_ameth.c vendor-crypto/openssl/dist/crypto/ec/ec_key.c vendor-crypto/openssl/dist/crypto/ec/ecp_nistz256.c vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist/crypto/evp/bio_enc.c vendor-crypto/openssl/dist/crypto/evp/bio_ok.c vendor-crypto/openssl/dist/crypto/evp/c_all.c vendor-crypto/openssl/dist/crypto/evp/digest.c vendor-crypto/openssl/dist/crypto/evp/e_rc4_hmac_md5.c vendor-crypto/openssl/dist/crypto/evp/e_seed.c vendor-crypto/openssl/dist/crypto/evp/evp_enc.c vendor-crypto/openssl/dist/crypto/evp/evp_test.c vendor-crypto/openssl/dist/crypto/evp/openbsd_hw.c vendor-crypto/openssl/dist/crypto/evp/p_lib.c vendor-crypto/openssl/dist/crypto/evp/pmeth_gn.c vendor-crypto/openssl/dist/crypto/evp/pmeth_lib.c vendor-crypto/openssl/dist/crypto/hmac/hmac.c vendor-crypto/openssl/dist/crypto/jpake/jpake.c vendor-crypto/openssl/dist/crypto/lhash/lhash.c vendor-crypto/openssl/dist/crypto/md2/md2_dgst.c vendor-crypto/openssl/dist/crypto/md32_common.h vendor-crypto/openssl/dist/crypto/mdc2/mdc2dgst.c vendor-crypto/openssl/dist/crypto/mem.c vendor-crypto/openssl/dist/crypto/mem_clr.c vendor-crypto/openssl/dist/crypto/modes/asm/ghash-sparcv9.pl vendor-crypto/openssl/dist/crypto/o_init.c vendor-crypto/openssl/dist/crypto/o_time.c vendor-crypto/openssl/dist/crypto/objects/o_names.c vendor-crypto/openssl/dist/crypto/ocsp/ocsp_cl.c vendor-crypto/openssl/dist/crypto/ocsp/ocsp_ext.c vendor-crypto/openssl/dist/crypto/ocsp/ocsp_lib.c vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/ossl_typ.h vendor-crypto/openssl/dist/crypto/pem/pem.h vendor-crypto/openssl/dist/crypto/pem/pem_err.c vendor-crypto/openssl/dist/crypto/pem/pem_lib.c vendor-crypto/openssl/dist/crypto/pem/pvkfmt.c vendor-crypto/openssl/dist/crypto/perlasm/sparcv9_modes.pl vendor-crypto/openssl/dist/crypto/pkcs12/p12_mutl.c vendor-crypto/openssl/dist/crypto/pkcs12/p12_npas.c vendor-crypto/openssl/dist/crypto/pkcs12/p12_utl.c vendor-crypto/openssl/dist/crypto/pkcs12/pkcs12.h vendor-crypto/openssl/dist/crypto/pkcs7/pk7_doit.c vendor-crypto/openssl/dist/crypto/rand/md_rand.c vendor-crypto/openssl/dist/crypto/rand/rand_unix.c vendor-crypto/openssl/dist/crypto/rand/randfile.c vendor-crypto/openssl/dist/crypto/rsa/rsa_ameth.c vendor-crypto/openssl/dist/crypto/rsa/rsa_chk.c vendor-crypto/openssl/dist/crypto/rsa/rsa_lib.c vendor-crypto/openssl/dist/crypto/rsa/rsa_pmeth.c vendor-crypto/openssl/dist/crypto/sha/asm/sha1-x86_64.pl vendor-crypto/openssl/dist/crypto/sparccpuid.S vendor-crypto/openssl/dist/crypto/srp/srp_lib.c vendor-crypto/openssl/dist/crypto/srp/srp_vfy.c vendor-crypto/openssl/dist/crypto/ts/ts.h vendor-crypto/openssl/dist/crypto/ts/ts_lib.c vendor-crypto/openssl/dist/crypto/ts/ts_rsp_verify.c vendor-crypto/openssl/dist/crypto/ui/ui_lib.c vendor-crypto/openssl/dist/crypto/whrlpool/wp_dgst.c vendor-crypto/openssl/dist/crypto/x509/by_dir.c vendor-crypto/openssl/dist/crypto/x509/x509.h vendor-crypto/openssl/dist/crypto/x509/x509_att.c vendor-crypto/openssl/dist/crypto/x509/x509_err.c vendor-crypto/openssl/dist/crypto/x509/x509_obj.c vendor-crypto/openssl/dist/crypto/x509/x509_r2x.c vendor-crypto/openssl/dist/crypto/x509/x509_txt.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.h vendor-crypto/openssl/dist/crypto/x509/x509spki.c vendor-crypto/openssl/dist/crypto/x509v3/v3_addr.c vendor-crypto/openssl/dist/crypto/x509v3/v3_alt.c vendor-crypto/openssl/dist/crypto/x509v3/v3_conf.c vendor-crypto/openssl/dist/doc/apps/cms.pod vendor-crypto/openssl/dist/doc/apps/s_client.pod vendor-crypto/openssl/dist/doc/apps/s_server.pod vendor-crypto/openssl/dist/doc/apps/smime.pod vendor-crypto/openssl/dist/doc/apps/verify.pod vendor-crypto/openssl/dist/doc/apps/x509.pod vendor-crypto/openssl/dist/doc/apps/x509v3_config.pod vendor-crypto/openssl/dist/doc/crypto/BIO_s_bio.pod vendor-crypto/openssl/dist/doc/crypto/BN_bn2bin.pod vendor-crypto/openssl/dist/doc/crypto/BN_rand.pod vendor-crypto/openssl/dist/doc/crypto/EVP_EncryptInit.pod vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_cmp.pod vendor-crypto/openssl/dist/doc/crypto/OBJ_nid2obj.pod vendor-crypto/openssl/dist/doc/crypto/OPENSSL_config.pod vendor-crypto/openssl/dist/doc/crypto/OPENSSL_ia32cap.pod vendor-crypto/openssl/dist/doc/crypto/X509_verify_cert.pod vendor-crypto/openssl/dist/doc/crypto/d2i_X509.pod vendor-crypto/openssl/dist/doc/crypto/hmac.pod vendor-crypto/openssl/dist/doc/crypto/rand.pod vendor-crypto/openssl/dist/doc/crypto/ui.pod vendor-crypto/openssl/dist/engines/ccgost/gost2001.c vendor-crypto/openssl/dist/engines/ccgost/gost2001_keyx.c vendor-crypto/openssl/dist/engines/ccgost/gost94_keyx.c vendor-crypto/openssl/dist/engines/ccgost/gost_ameth.c vendor-crypto/openssl/dist/engines/ccgost/gost_pmeth.c vendor-crypto/openssl/dist/engines/e_4758cca.c vendor-crypto/openssl/dist/engines/e_aep.c vendor-crypto/openssl/dist/engines/e_capi.c vendor-crypto/openssl/dist/engines/e_chil.c vendor-crypto/openssl/dist/ssl/Makefile vendor-crypto/openssl/dist/ssl/d1_both.c vendor-crypto/openssl/dist/ssl/d1_clnt.c vendor-crypto/openssl/dist/ssl/d1_lib.c vendor-crypto/openssl/dist/ssl/d1_pkt.c vendor-crypto/openssl/dist/ssl/d1_srvr.c vendor-crypto/openssl/dist/ssl/s23_clnt.c vendor-crypto/openssl/dist/ssl/s2_clnt.c vendor-crypto/openssl/dist/ssl/s2_srvr.c vendor-crypto/openssl/dist/ssl/s3_both.c vendor-crypto/openssl/dist/ssl/s3_clnt.c vendor-crypto/openssl/dist/ssl/s3_enc.c vendor-crypto/openssl/dist/ssl/s3_lib.c vendor-crypto/openssl/dist/ssl/s3_pkt.c vendor-crypto/openssl/dist/ssl/s3_srvr.c vendor-crypto/openssl/dist/ssl/ssl.h vendor-crypto/openssl/dist/ssl/ssl_asn1.c vendor-crypto/openssl/dist/ssl/ssl_ciph.c vendor-crypto/openssl/dist/ssl/ssl_err.c vendor-crypto/openssl/dist/ssl/ssl_lib.c vendor-crypto/openssl/dist/ssl/ssl_locl.h vendor-crypto/openssl/dist/ssl/ssl_rsa.c vendor-crypto/openssl/dist/ssl/ssl_sess.c vendor-crypto/openssl/dist/ssl/ssltest.c vendor-crypto/openssl/dist/ssl/sslv2conftest.c vendor-crypto/openssl/dist/ssl/t1_enc.c vendor-crypto/openssl/dist/ssl/t1_lib.c vendor-crypto/openssl/dist/util/mk1mf.pl vendor-crypto/openssl/dist/util/mkerr.pl vendor-crypto/openssl/dist/util/ssleay.num Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/CHANGES Thu Sep 22 13:04:03 2016 (r306189) @@ -2,6 +2,166 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] + + *) OCSP Status Request extension unbounded memory growth + + A malicious client can send an excessively large OCSP Status Request + extension. If that client continually requests renegotiation, sending a + large OCSP Status Request extension each time, then there will be unbounded + memory growth on the server. This will eventually lead to a Denial Of + Service attack through memory exhaustion. Servers with a default + configuration are vulnerable even if they do not support OCSP. Builds using + the "no-ocsp" build time option are not affected. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6304) + [Matt Caswell] + + *) In order to mitigate the SWEET32 attack, the DES ciphers were moved from + HIGH to MEDIUM. + + This issue was reported to OpenSSL Karthikeyan Bhargavan and Gaetan + Leurent (INRIA) + (CVE-2016-2183) + [Rich Salz] + + *) OOB write in MDC2_Update() + + An overflow can occur in MDC2_Update() either if called directly or + through the EVP_DigestUpdate() function using MDC2. If an attacker + is able to supply very large amounts of input data after a previous + call to EVP_EncryptUpdate() with a partial block then a length check + can overflow resulting in a heap corruption. + + The amount of data needed is comparable to SIZE_MAX which is impractical + on most platforms. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6303) + [Stephen Henson] + + *) Malformed SHA512 ticket DoS + + If a server uses SHA512 for TLS session ticket HMAC it is vulnerable to a + DoS attack where a malformed ticket will result in an OOB read which will + ultimately crash. + + The use of SHA512 in TLS session tickets is comparatively rare as it requires + a custom server callback and ticket lookup mechanism. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6302) + [Stephen Henson] + + *) OOB write in BN_bn2dec() + + The function BN_bn2dec() does not check the return value of BN_div_word(). + This can cause an OOB write if an application uses this function with an + overly large BIGNUM. This could be a problem if an overly large certificate + or CRL is printed out from an untrusted source. TLS is not affected because + record limits will reject an oversized certificate before it is parsed. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2182) + [Stephen Henson] + + *) OOB read in TS_OBJ_print_bio() + + The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is + the total length the OID text representation would use and not the amount + of data written. This will result in OOB reads when large OIDs are + presented. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2180) + [Stephen Henson] + + *) Pointer arithmetic undefined behaviour + + Avoid some undefined pointer arithmetic + + A common idiom in the codebase is to check limits in the following manner: + "p + len > limit" + + Where "p" points to some malloc'd data of SIZE bytes and + limit == p + SIZE + + "len" here could be from some externally supplied data (e.g. from a TLS + message). + + The rules of C pointer arithmetic are such that "p + len" is only well + defined where len <= SIZE. Therefore the above idiom is actually + undefined behaviour. + + For example this could cause problems if some malloc implementation + provides an address for "p" such that "p + len" actually overflows for + values of len that are too big and therefore p + len < limit. + + This issue was reported to OpenSSL by Guido Vranken + (CVE-2016-2177) + [Matt Caswell] + + *) Constant time flag not preserved in DSA signing + + Operations in the DSA signing algorithm should run in constant time in + order to avoid side channel attacks. A flaw in the OpenSSL DSA + implementation means that a non-constant time codepath is followed for + certain operations. This has been demonstrated through a cache-timing + attack to be sufficient for an attacker to recover the private DSA key. + + This issue was reported by César Pereida (Aalto University), Billy Brumley + (Tampere University of Technology), and Yuval Yarom (The University of + Adelaide and NICTA). + (CVE-2016-2178) + [César Pereida] + + *) DTLS buffered message DoS + + In a DTLS connection where handshake messages are delivered out-of-order + those messages that OpenSSL is not yet ready to process will be buffered + for later use. Under certain circumstances, a flaw in the logic means that + those messages do not get removed from the buffer even though the handshake + has been completed. An attacker could force up to approx. 15 messages to + remain in the buffer when they are no longer required. These messages will + be cleared when the DTLS connection is closed. The default maximum size for + a message is 100k. Therefore the attacker could force an additional 1500k + to be consumed per connection. By opening many simulataneous connections an + attacker could cause a DoS attack through memory exhaustion. + + This issue was reported to OpenSSL by Quan Luo. + (CVE-2016-2179) + [Matt Caswell] + + *) DTLS replay protection DoS + + A flaw in the DTLS replay attack protection mechanism means that records + that arrive for future epochs update the replay protection "window" before + the MAC for the record has been validated. This could be exploited by an + attacker by sending a record for the next epoch (which does not have to + decrypt or have a valid MAC), with a very large sequence number. This means + that all subsequent legitimate packets are dropped causing a denial of + service for a specific DTLS connection. + + This issue was reported to OpenSSL by the OCAP audit team. + (CVE-2016-2181) + [Matt Caswell] + + *) Certificate message OOB reads + + In OpenSSL 1.0.2 and earlier some missing message length checks can result + in OOB reads of up to 2 bytes beyond an allocated buffer. There is a + theoretical DoS risk but this has not been observed in practice on common + platforms. + + The messages affected are client certificate, client certificate request + and server certificate. As a result the attack can only be performed + against a client or a server which enables client authentication. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6306) + [Stephen Henson] + Changes between 1.0.2g and 1.0.2h [3 May 2016] *) Prevent padding oracle in AES-NI CBC MAC check Modified: vendor-crypto/openssl/dist/CONTRIBUTING ============================================================================== --- vendor-crypto/openssl/dist/CONTRIBUTING Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/CONTRIBUTING Thu Sep 22 13:04:03 2016 (r306189) @@ -1,38 +1,75 @@ -HOW TO CONTRIBUTE TO OpenSSL ----------------------------- +HOW TO CONTRIBUTE TO PATCHES OpenSSL +------------------------------------ -Development is coordinated on the openssl-dev mailing list (see -http://www.openssl.org for information on subscribing). If you -would like to submit a patch, send it to rt@openssl.org with -the string "[PATCH]" in the subject. Please be sure to include a -textual explanation of what your patch does. - -You can also make GitHub pull requests. If you do this, please also send -mail to rt@openssl.org with a brief description and a link to the PR so -that we can more easily keep track of it. +(Please visit https://www.openssl.org/community/getting-started.html for +other ideas about how to contribute.) +Development is coordinated on the openssl-dev mailing list (see the +above link or https://mta.openssl.org for information on subscribing). If you are unsure as to whether a feature will be useful for the general -OpenSSL community please discuss it on the openssl-dev mailing list first. -Someone may be already working on the same thing or there may be a good -reason as to why that feature isn't implemented. - -Patches should be as up to date as possible, preferably relative to the -current Git or the last snapshot. They should follow our coding style -(see https://www.openssl.org/policies/codingstyle.html) and compile without -warnings using the --strict-warnings flag. OpenSSL compiles on many varied -platforms: try to ensure you only use portable features. - -Our preferred format for patch files is "git format-patch" output. For example -to provide a patch file containing the last commit in your local git repository -use the following command: +OpenSSL community you might want to discuss it on the openssl-dev mailing +list first. Someone may be already working on the same thing or there +may be a good reason as to why that feature isn't implemented. + +The best way to submit a patch is to make a pull request on GitHub. +(It is not necessary to send mail to rt@openssl.org to open a ticket!) +If you think the patch could use feedback from the community, please +start a thread on openssl-dev. + +You can also submit patches by sending it as mail to rt@openssl.org. +Please include the word "PATCH" and an explanation of what the patch +does in the subject line. If you do this, our preferred format is "git +format-patch" output. For example to provide a patch file containing the +last commit in your local git repository use the following command: -# git format-patch --stdout HEAD^ >mydiffs.patch + % git format-patch --stdout HEAD^ >mydiffs.patch Another method of creating an acceptable patch file without using git is as follows: -# cd openssl-work -# [your changes] -# ./Configure dist; make clean -# cd .. -# diff -ur openssl-orig openssl-work > mydiffs.patch + % cd openssl-work + ...make your changes... + % ./Configure dist; make clean + % cd .. + % diff -ur openssl-orig openssl-work >mydiffs.patch + +Note that pull requests are generally easier for the team, and community, to +work with. Pull requests benefit from all of the standard GitHub features, +including code review tools, simpler integration, and CI build support. + +No matter how a patch is submitted, the following items will help make +the acceptance and review process faster: + + 1. Anything other than trivial contributions will require a contributor + licensing agreement, giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the OpenSSL license (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + + 3. Patches should be as current as possible. When using GitHub, please + expect to have to rebase and update often. Note that we do not accept merge + commits. You will be asked to remove them before a patch is considered + acceptable. + + 4. Patches should follow our coding style (see + https://www.openssl.org/policies/codingstyle.html) and compile without + warnings. Where gcc or clang is availble you should use the + --strict-warnings Configure option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + + 5. When at all possible, patches should include tests. These can either be + added to an existing test, or completely new. Please see test/README + for information on the test framework. + + 6. New features or changed functionality must include documentation. Please + look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of + our style. Modified: vendor-crypto/openssl/dist/Configure ============================================================================== --- vendor-crypto/openssl/dist/Configure Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/Configure Thu Sep 22 13:04:03 2016 (r306189) @@ -799,7 +799,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). @@ -1082,11 +1082,6 @@ if (defined($disabled{"md5"}) || defined $disabled{"tls1"} = "forced"; } -if (defined($disabled{"tls1"})) - { - $disabled{"tlsext"} = "forced"; - } - if (defined($disabled{"ec"}) || defined($disabled{"dsa"}) || defined($disabled{"dh"})) { @@ -1254,6 +1249,7 @@ my $shared_extension = $fields[$idx_shar my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib]; my $ar = $ENV{'AR'} || "ar"; my $arflags = $fields[$idx_arflags]; +my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres"; my $multilib = $fields[$idx_multilib]; # if $prefix/lib$multilib is not an existing directory, then @@ -1562,8 +1558,15 @@ $cpuid_obj="mem_clr.o" unless ($cpuid_ob $des_obj=$des_enc unless ($des_obj =~ /\.o$/); $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); -$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); $rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); +if ($rc4_obj =~ /\.o$/) + { + $cflags.=" -DRC4_ASM"; + } +else + { + $rc4_obj=$rc4_enc; + } if ($sha1_obj =~ /\.o$/) { # $sha1_obj=$sha1_enc; @@ -1717,12 +1720,14 @@ while () s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/; s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/; s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; + s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc"; } else { s/^CC=.*$/CC= $cc/; s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; + s/^RC=.*/RC= $windres/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang"; } Modified: vendor-crypto/openssl/dist/FREEBSD-Xlist ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-Xlist Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/FREEBSD-Xlist Thu Sep 22 13:04:03 2016 (r306189) @@ -26,7 +26,7 @@ openssl-*/apps/demoCA openssl-*/apps/demoSRP openssl-*/apps/md4.c openssl-*/apps/openssl-vms.cnf -openssl-*/apps/vms_decc_init.c +openssl-*/apps/vms_* openssl-*/apps/winrand.c openssl-*/bugs openssl-*/certs/demo Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Thu Sep 22 13:04:03 2016 (r306189) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://repo.freebsd.org/base" -setenv OSSLVER 1.0.2h -# OSSLTAG format: v1_0_2h +setenv OSSLVER 1.0.2i +# OSSLTAG format: v1_0_2i ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist/Makefile ============================================================================== --- vendor-crypto/openssl/dist/Makefile Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/Makefile Thu Sep 22 13:04:03 2016 (r306189) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2h +VERSION=1.0.2i MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -68,6 +68,7 @@ EXE_EXT= ARFLAGS= AR= ar $(ARFLAGS) r RANLIB= /usr/bin/ranlib +RC= windres NM= nm PERL= /usr/bin/perl TAR= tar @@ -210,6 +211,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -368,6 +370,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: vendor-crypto/openssl/dist/Makefile.org ============================================================================== --- vendor-crypto/openssl/dist/Makefile.org Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/Makefile.org Thu Sep 22 13:04:03 2016 (r306189) @@ -66,6 +66,7 @@ EXE_EXT= ARFLAGS= AR=ar $(ARFLAGS) r RANLIB= ranlib +RC= windres NM= nm PERL= perl TAR= tar @@ -208,6 +209,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -366,6 +368,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: vendor-crypto/openssl/dist/Makefile.shared ============================================================================== --- vendor-crypto/openssl/dist/Makefile.shared Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/Makefile.shared Thu Sep 22 13:04:03 2016 (r306189) @@ -293,7 +293,7 @@ link_a.cygwin: fi; \ dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \ $(PERL) util/mkrc.pl $$dll_name | \ - $(CROSS_COMPILE)windres -o rc.o; \ + $(RC) -o rc.o; \ extras="$$extras rc.o"; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/NEWS Thu Sep 22 13:04:03 2016 (r306189) @@ -5,6 +5,20 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] + + o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) + o SWEET32 Mitigation (CVE-2016-2183) + o OOB write in MDC2_Update() (CVE-2016-6303) + o Malformed SHA512 ticket DoS (CVE-2016-6302) + o OOB write in BN_bn2dec() (CVE-2016-2182) + o OOB read in TS_OBJ_print_bio() (CVE-2016-2180) + o Pointer arithmetic undefined behaviour (CVE-2016-2177) + o Constant time flag not preserved in DSA signing (CVE-2016-2178) + o DTLS buffered message DoS (CVE-2016-2179) + o DTLS replay protection DoS (CVE-2016-2181) + o Certificate message OOB reads (CVE-2016-6306) + Major changes between OpenSSL 1.0.2g and OpenSSL 1.0.2h [3 May 2016] o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/README Thu Sep 22 13:04:03 2016 (r306189) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2h 3 May 2016 + OpenSSL 1.0.2i 22 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/apps/CA.pl ============================================================================== --- vendor-crypto/openssl/dist/apps/CA.pl Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/CA.pl Thu Sep 22 13:04:03 2016 (r306189) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: vendor-crypto/openssl/dist/apps/CA.pl.in ============================================================================== --- vendor-crypto/openssl/dist/apps/CA.pl.in Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/CA.pl.in Thu Sep 22 13:04:03 2016 (r306189) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: vendor-crypto/openssl/dist/apps/apps.c ============================================================================== --- vendor-crypto/openssl/dist/apps/apps.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/apps.c Thu Sep 22 13:04:03 2016 (r306189) @@ -215,7 +215,8 @@ int args_from_file(char *file, int *argc if (arg != NULL) OPENSSL_free(arg); arg = (char **)OPENSSL_malloc(sizeof(char *) * (i * 2)); - + if (arg == NULL) + return 0; *argv = arg; num = 0; p = buf; @@ -2374,6 +2375,8 @@ int args_verify(char ***pargs, int *parg flags |= X509_V_FLAG_PARTIAL_CHAIN; else if (!strcmp(arg, "-no_alt_chains")) flags |= X509_V_FLAG_NO_ALT_CHAINS; + else if (!strcmp(arg, "-allow_proxy_certs")) + flags |= X509_V_FLAG_ALLOW_PROXY_CERTS; else return 0; @@ -3195,6 +3198,36 @@ int app_isdir(const char *name) #endif /* raw_read|write section */ +#if defined(__VMS) +# include "vms_term_sock.h" +static int stdin_sock = -1; + +static void close_stdin_sock(void) +{ + TerminalSocket (TERM_SOCK_DELETE, &stdin_sock); +} + +int fileno_stdin(void) +{ + if (stdin_sock == -1) { + TerminalSocket(TERM_SOCK_CREATE, &stdin_sock); + atexit(close_stdin_sock); + } + + return stdin_sock; +} +#else +int fileno_stdin(void) +{ + return fileno(stdin); +} +#endif + +int fileno_stdout(void) +{ + return fileno(stdout); +} + #if defined(_WIN32) && defined(STD_INPUT_HANDLE) int raw_read_stdin(void *buf, int siz) { @@ -3204,10 +3237,17 @@ int raw_read_stdin(void *buf, int siz) else return (-1); } +#elif defined(__VMS) +#include + +int raw_read_stdin(void *buf, int siz) +{ + return recv(fileno_stdin(), buf, siz, 0); +} #else int raw_read_stdin(void *buf, int siz) { - return read(fileno(stdin), buf, siz); + return read(fileno_stdin(), buf, siz); } #endif @@ -3223,6 +3263,6 @@ int raw_write_stdout(const void *buf, in #else int raw_write_stdout(const void *buf, int siz) { - return write(fileno(stdout), buf, siz); + return write(fileno_stdout(), buf, siz); } #endif Modified: vendor-crypto/openssl/dist/apps/apps.h ============================================================================== --- vendor-crypto/openssl/dist/apps/apps.h Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/apps.h Thu Sep 22 13:04:03 2016 (r306189) @@ -375,6 +375,8 @@ void store_setup_crl_download(X509_STORE # define SERIAL_RAND_BITS 64 int app_isdir(const char *); +int fileno_stdin(void); +int fileno_stdout(void); int raw_read_stdin(void *, int); int raw_write_stdout(const void *, int); Modified: vendor-crypto/openssl/dist/apps/ca.c ============================================================================== --- vendor-crypto/openssl/dist/apps/ca.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/ca.c Thu Sep 22 13:04:03 2016 (r306189) @@ -2103,25 +2103,23 @@ static int do_body(X509 **xret, EVP_PKEY goto err; /* We now just add it to the database */ - row[DB_type] = (char *)OPENSSL_malloc(2); - tm = X509_get_notAfter(ret); - row[DB_exp_date] = (char *)OPENSSL_malloc(tm->length + 1); - memcpy(row[DB_exp_date], tm->data, tm->length); - row[DB_exp_date][tm->length] = '\0'; - - row[DB_rev_date] = NULL; - - /* row[DB_serial] done already */ - row[DB_file] = (char *)OPENSSL_malloc(8); + row[DB_type] = OPENSSL_malloc(2); + row[DB_exp_date] = OPENSSL_malloc(tm->length + 1); + row[DB_rev_date] = OPENSSL_malloc(1); + row[DB_file] = OPENSSL_malloc(8); row[DB_name] = X509_NAME_oneline(X509_get_subject_name(ret), NULL, 0); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || + (row[DB_rev_date] == NULL) || (row[DB_file] == NULL) || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto err; } - BUF_strlcpy(row[DB_file], "unknown", 8); + + memcpy(row[DB_exp_date], tm->data, tm->length); + row[DB_exp_date][tm->length] = '\0'; + row[DB_rev_date][0] = '\0'; + strcpy(row[DB_file], "unknown"); row[DB_type][0] = 'V'; row[DB_type][1] = '\0'; @@ -2307,6 +2305,7 @@ static int certify_spkac(X509 **xret, ch j = NETSCAPE_SPKI_verify(spki, pktmp); if (j <= 0) { + EVP_PKEY_free(pktmp); BIO_printf(bio_err, "signature verification failed on SPKAC public key\n"); goto err; Modified: vendor-crypto/openssl/dist/apps/dgst.c ============================================================================== --- vendor-crypto/openssl/dist/apps/dgst.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/dgst.c Thu Sep 22 13:04:03 2016 (r306189) @@ -243,6 +243,11 @@ int MAIN(int argc, char **argv) argv++; } + if (keyfile != NULL && argc > 1) { + BIO_printf(bio_err, "Can only sign or verify one file\n"); + goto end; + } + if (do_verify && !sigfile) { BIO_printf(bio_err, "No signature to verify: use the -signature option\n"); Modified: vendor-crypto/openssl/dist/apps/enc.c ============================================================================== --- vendor-crypto/openssl/dist/apps/enc.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/enc.c Thu Sep 22 13:04:03 2016 (r306189) @@ -509,7 +509,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "invalid hex salt value\n"); goto end; } - } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) + } else if (RAND_bytes(salt, sizeof salt) <= 0) goto end; /* * If -P option then don't bother writing Modified: vendor-crypto/openssl/dist/apps/passwd.c ============================================================================== --- vendor-crypto/openssl/dist/apps/passwd.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/passwd.c Thu Sep 22 13:04:03 2016 (r306189) @@ -416,7 +416,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 2) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 2) <= 0) goto err; (*salt_p)[0] = cov_2char[(*salt_p)[0] & 0x3f]; /* 6 bits */ (*salt_p)[1] = cov_2char[(*salt_p)[1] & 0x3f]; /* 6 bits */ @@ -437,7 +437,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 8) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 8) <= 0) goto err; for (i = 0; i < 8; i++) Modified: vendor-crypto/openssl/dist/apps/pkcs12.c ============================================================================== --- vendor-crypto/openssl/dist/apps/pkcs12.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/pkcs12.c Thu Sep 22 13:04:03 2016 (r306189) @@ -832,6 +832,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 EVP_PKEY *pkey; PKCS8_PRIV_KEY_INFO *p8; X509 *x509; + int ret = 0; switch (M_PKCS12_bag_type(bag)) { case NID_keyBag: @@ -844,7 +845,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(pkey = EVP_PKCS82PKEY(p8))) return 0; print_attribs(out, p8->attributes, "Key Attributes"); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -864,7 +865,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 } print_attribs(out, p8->attributes, "Key Attributes"); PKCS8_PRIV_KEY_INFO_free(p8); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -884,7 +885,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(x509 = PKCS12_certbag2x509(bag))) return 0; dump_cert_text(out, x509); - PEM_write_bio_X509(out, x509); + ret = PEM_write_bio_X509(out, x509); X509_free(x509); break; @@ -902,7 +903,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 return 1; break; } - return 1; + return ret; } /* Given a single certificate return a verified chain or NULL if error */ @@ -931,16 +932,70 @@ static int get_cert_chain(X509 *cert, X5 int alg_print(BIO *x, X509_ALGOR *alg) { - PBEPARAM *pbe; - const unsigned char *p; - p = alg->parameter->value.sequence->data; - pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length); - if (!pbe) - return 1; - BIO_printf(bio_err, "%s, Iteration %ld\n", - OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)), - ASN1_INTEGER_get(pbe->iter)); - PBEPARAM_free(pbe); + int pbenid, aparamtype; + ASN1_OBJECT *aoid; + void *aparam; + PBEPARAM *pbe = NULL; + + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, alg); + + pbenid = OBJ_obj2nid(aoid); + + BIO_printf(x, "%s", OBJ_nid2ln(pbenid)); + + /* + * If PBE algorithm is PBES2 decode algorithm parameters + * for additional details. + */ + if (pbenid == NID_pbes2) { + PBE2PARAM *pbe2 = NULL; + int encnid; + if (aparamtype == V_ASN1_SEQUENCE) + pbe2 = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBE2PARAM)); + if (pbe2 == NULL) { + BIO_puts(x, ""); + goto done; + } + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, pbe2->keyfunc); + pbenid = OBJ_obj2nid(aoid); + X509_ALGOR_get0(&aoid, NULL, NULL, pbe2->encryption); + encnid = OBJ_obj2nid(aoid); + BIO_printf(x, ", %s, %s", OBJ_nid2ln(pbenid), + OBJ_nid2sn(encnid)); + /* If KDF is PBKDF2 decode parameters */ + if (pbenid == NID_id_pbkdf2) { + PBKDF2PARAM *kdf = NULL; + int prfnid; + if (aparamtype == V_ASN1_SEQUENCE) + kdf = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBKDF2PARAM)); + if (kdf == NULL) { + BIO_puts(x, ""); + goto done; + } + + if (kdf->prf == NULL) { + prfnid = NID_hmacWithSHA1; + } else { + X509_ALGOR_get0(&aoid, NULL, NULL, kdf->prf); + prfnid = OBJ_obj2nid(aoid); + } + BIO_printf(x, ", Iteration %ld, PRF %s", + ASN1_INTEGER_get(kdf->iter), OBJ_nid2sn(prfnid)); + PBKDF2PARAM_free(kdf); + } + PBE2PARAM_free(pbe2); + } else { + if (aparamtype == V_ASN1_SEQUENCE) + pbe = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBEPARAM)); + if (pbe == NULL) { + BIO_puts(x, ""); + goto done; + } + BIO_printf(x, ", Iteration %ld", ASN1_INTEGER_get(pbe->iter)); + PBEPARAM_free(pbe); + } + done: + BIO_puts(x, "\n"); return 1; } Modified: vendor-crypto/openssl/dist/apps/req.c ============================================================================== --- vendor-crypto/openssl/dist/apps/req.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/req.c Thu Sep 22 13:04:03 2016 (r306189) @@ -332,9 +332,10 @@ int MAIN(int argc, char **argv) subject = 1; else if (strcmp(*argv, "-text") == 0) text = 1; - else if (strcmp(*argv, "-x509") == 0) + else if (strcmp(*argv, "-x509") == 0) { + newreq = 1; x509 = 1; - else if (strcmp(*argv, "-asn1-kludge") == 0) + } else if (strcmp(*argv, "-asn1-kludge") == 0) kludge = 1; else if (strcmp(*argv, "-no-asn1-kludge") == 0) kludge = 0; @@ -756,7 +757,7 @@ int MAIN(int argc, char **argv) } } - if (newreq || x509) { + if (newreq) { if (pkey == NULL) { BIO_printf(bio_err, "you need to specify a private key\n"); goto end; @@ -1331,12 +1332,11 @@ static int auto_info(X509_REQ *req, STAC break; } #ifndef CHARSET_EBCDIC - if (*p == '+') + if (*type == '+') { #else - if (*p == os_toascii['+']) + if (*type == os_toascii['+']) { #endif - { - p++; + type++; mval = -1; } else mval = 0; Modified: vendor-crypto/openssl/dist/apps/s_apps.h ============================================================================== --- vendor-crypto/openssl/dist/apps/s_apps.h Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/s_apps.h Thu Sep 22 13:04:03 2016 (r306189) @@ -199,7 +199,8 @@ int load_excert(SSL_EXCERT **pexc, BIO * void print_ssl_summary(BIO *bio, SSL *s); #ifdef HEADER_SSL_H int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr); + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt); int args_ssl_call(SSL_CTX *ctx, BIO *err, SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, int no_ecdhe, int no_jpake); int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls, Modified: vendor-crypto/openssl/dist/apps/s_cb.c ============================================================================== --- vendor-crypto/openssl/dist/apps/s_cb.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/s_cb.c Thu Sep 22 13:04:03 2016 (r306189) @@ -1507,11 +1507,18 @@ void print_ssl_summary(BIO *bio, SSL *s) } int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr) + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt) { char *arg = **pargs, *argn = (*pargs)[1]; int rv; + if (strcmp(arg, "-no_ssl2") == 0 || strcmp(arg, "-no_ssl3") == 0 + || strcmp(arg, "-no_tls1") == 0 || strcmp(arg, "-no_tls1_1") == 0 + || strcmp(arg, "-no_tls1_2") == 0) { + *no_prot_opt = 1; + } + /* Attempt to run SSL configuration command */ rv = SSL_CONF_cmd_argv(cctx, pargc, pargs); /* If parameter not recognised just return */ Modified: vendor-crypto/openssl/dist/apps/s_client.c ============================================================================== --- vendor-crypto/openssl/dist/apps/s_client.c Thu Sep 22 12:53:11 2016 (r306188) +++ vendor-crypto/openssl/dist/apps/s_client.c Thu Sep 22 13:04:03 2016 (r306189) @@ -242,9 +242,9 @@ static unsigned int psk_client_cb(SSL *s unsigned char *psk, unsigned int max_psk_len) { - unsigned int psk_len = 0; int ret; - BIGNUM *bn = NULL; + long key_len; + unsigned char *key; if (c_debug) BIO_printf(bio_c_out, "psk_client_cb\n"); @@ -265,32 +265,29 @@ static unsigned int psk_client_cb(SSL *s if (c_debug) BIO_printf(bio_c_out, "created identity '%s' len=%d\n", identity, ret); - ret = BN_hex2bn(&bn, psk_key); - if (!ret) { - BIO_printf(bio_err, "Could not convert PSK key '%s' to BIGNUM\n", + + /* convert the PSK key to binary */ + key = string_to_hex(psk_key, &key_len); + if (key == NULL) { + BIO_printf(bio_err, "Could not convert PSK key '%s' to buffer\n", psk_key); - if (bn) - BN_free(bn); return 0; } - - if ((unsigned int)BN_num_bytes(bn) > max_psk_len) { + if ((unsigned long)key_len > (unsigned long)max_psk_len) { BIO_printf(bio_err, - "psk buffer of callback is too small (%d) for key (%d)\n", - max_psk_len, BN_num_bytes(bn)); - BN_free(bn); + "psk buffer of callback is too small (%d) for key (%ld)\n", + max_psk_len, key_len); + OPENSSL_free(key); return 0; } - psk_len = BN_bn2bin(bn, psk); - BN_free(bn); - if (psk_len == 0) - goto out_err; + memcpy(psk, key, key_len); + OPENSSL_free(key); if (c_debug) - BIO_printf(bio_c_out, "created PSK len=%d\n", psk_len); + BIO_printf(bio_c_out, "created PSK len=%ld\n", key_len); - return psk_len; + return key_len; out_err: if (c_debug) BIO_printf(bio_err, "Error in PSK client callback\n"); @@ -747,6 +744,7 @@ int MAIN(int argc, char **argv) int crl_format = FORMAT_PEM; int crl_download = 0; STACK_OF(X509_CRL) *crls = NULL; + int prot_opt = 0, no_prot_opt = 0; meth = SSLv23_client_method(); @@ -850,7 +848,8 @@ int MAIN(int argc, char **argv) if (badarg) goto bad; continue; - } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args)) { + } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args, + &no_prot_opt)) { if (badarg) goto bad; continue; @@ -942,31 +941,42 @@ int MAIN(int argc, char **argv) } #endif #ifndef OPENSSL_NO_SSL2 - else if (strcmp(*argv, "-ssl2") == 0) + else if (strcmp(*argv, "-ssl2") == 0) { meth = SSLv2_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_SSL3_METHOD - else if (strcmp(*argv, "-ssl3") == 0) + else if (strcmp(*argv, "-ssl3") == 0) { meth = SSLv3_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_TLS1 - else if (strcmp(*argv, "-tls1_2") == 0) + else if (strcmp(*argv, "-tls1_2") == 0) { meth = TLSv1_2_client_method(); - else if (strcmp(*argv, "-tls1_1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1_1") == 0) { meth = TLSv1_1_client_method(); - else if (strcmp(*argv, "-tls1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1") == 0) { meth = TLSv1_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_DTLS1 else if (strcmp(*argv, "-dtls") == 0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 13:04:54 2016 Return-Path: Delivered-To: svn-src-all@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 E225DBE3250; Thu, 22 Sep 2016 13:04:53 +0000 (UTC) (envelope-from jkim@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 EF1E6144; Thu, 22 Sep 2016 13:04:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MD4pXZ009505; Thu, 22 Sep 2016 13:04:51 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MD4p2Y009504; Thu, 22 Sep 2016 13:04:51 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221304.u8MD4p2Y009504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 13:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306190 - vendor-crypto/openssl/1.0.2i X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 13:04:54 -0000 Author: jkim Date: Thu Sep 22 13:04:51 2016 New Revision: 306190 URL: https://svnweb.freebsd.org/changeset/base/306190 Log: Tag OpenSSL 1.0.2i. Added: vendor-crypto/openssl/1.0.2i/ - copied from r306189, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Thu Sep 22 13:06:03 2016 Return-Path: Delivered-To: svn-src-all@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 D4393BE340B; Thu, 22 Sep 2016 13:06:03 +0000 (UTC) (envelope-from jkim@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 7365531D; Thu, 22 Sep 2016 13:06:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MD628t009630; Thu, 22 Sep 2016 13:06:02 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MD5x8K009593; Thu, 22 Sep 2016 13:05:59 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221305.u8MD5x8K009593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 13:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306191 - in vendor-crypto/openssl/dist-1.0.1: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/cms crypto/des crypto/dsa crypto/evp crypto/md2 crypto/mdc2 crypto/ocsp crypto/pem c... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 13:06:03 -0000 Author: jkim Date: Thu Sep 22 13:05:59 2016 New Revision: 306191 URL: https://svnweb.freebsd.org/changeset/base/306191 Log: Import OpenSSL 1.0.1u. Added: vendor-crypto/openssl/dist-1.0.1/doc/crypto/d2i_PrivateKey.pod Modified: vendor-crypto/openssl/dist-1.0.1/CHANGES vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING vendor-crypto/openssl/dist-1.0.1/Configure vendor-crypto/openssl/dist-1.0.1/FREEBSD-upgrade vendor-crypto/openssl/dist-1.0.1/Makefile vendor-crypto/openssl/dist-1.0.1/NEWS vendor-crypto/openssl/dist-1.0.1/README vendor-crypto/openssl/dist-1.0.1/apps/apps.c vendor-crypto/openssl/dist-1.0.1/apps/enc.c vendor-crypto/openssl/dist-1.0.1/apps/passwd.c vendor-crypto/openssl/dist-1.0.1/apps/s_server.c vendor-crypto/openssl/dist-1.0.1/apps/x509.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_bytes.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_object.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_set.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn1_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn_mime.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/d2i_pr.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_enum.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_int.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_string.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbe.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbev2.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_enc.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_prn.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/x_name.c vendor-crypto/openssl/dist-1.0.1/crypto/bio/bf_nbio.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_print.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_rand.c vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_enc.c vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_ess.c vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_pwri.c vendor-crypto/openssl/dist-1.0.1/crypto/des/des.c vendor-crypto/openssl/dist-1.0.1/crypto/des/enc_writ.c vendor-crypto/openssl/dist-1.0.1/crypto/dsa/dsa_gen.c vendor-crypto/openssl/dist-1.0.1/crypto/dsa/dsa_ossl.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/bio_ok.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/digest.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/e_seed.c vendor-crypto/openssl/dist-1.0.1/crypto/md2/md2_dgst.c vendor-crypto/openssl/dist-1.0.1/crypto/md32_common.h vendor-crypto/openssl/dist-1.0.1/crypto/mdc2/mdc2dgst.c vendor-crypto/openssl/dist-1.0.1/crypto/ocsp/ocsp_ext.c vendor-crypto/openssl/dist-1.0.1/crypto/opensslv.h vendor-crypto/openssl/dist-1.0.1/crypto/pem/pem.h vendor-crypto/openssl/dist-1.0.1/crypto/pem/pem_err.c vendor-crypto/openssl/dist-1.0.1/crypto/pem/pem_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/pem/pvkfmt.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs12/p12_mutl.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs12/p12_npas.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs12/p12_utl.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs12/pkcs12.h vendor-crypto/openssl/dist-1.0.1/crypto/pkcs7/pk7_doit.c vendor-crypto/openssl/dist-1.0.1/crypto/rand/rand_unix.c vendor-crypto/openssl/dist-1.0.1/crypto/srp/srp_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/srp/srp_vfy.c vendor-crypto/openssl/dist-1.0.1/crypto/ts/ts_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/whrlpool/wp_dgst.c vendor-crypto/openssl/dist-1.0.1/crypto/x509/x509.h vendor-crypto/openssl/dist-1.0.1/crypto/x509/x509_err.c vendor-crypto/openssl/dist-1.0.1/crypto/x509/x509_txt.c vendor-crypto/openssl/dist-1.0.1/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist-1.0.1/crypto/x509/x509_vfy.h vendor-crypto/openssl/dist-1.0.1/crypto/x509v3/v3_addr.c vendor-crypto/openssl/dist-1.0.1/doc/apps/cms.pod vendor-crypto/openssl/dist-1.0.1/doc/apps/smime.pod vendor-crypto/openssl/dist-1.0.1/doc/apps/verify.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/X509_verify_cert.pod vendor-crypto/openssl/dist-1.0.1/ssl/d1_both.c vendor-crypto/openssl/dist-1.0.1/ssl/d1_clnt.c vendor-crypto/openssl/dist-1.0.1/ssl/d1_lib.c vendor-crypto/openssl/dist-1.0.1/ssl/d1_pkt.c vendor-crypto/openssl/dist-1.0.1/ssl/d1_srvr.c vendor-crypto/openssl/dist-1.0.1/ssl/s23_clnt.c vendor-crypto/openssl/dist-1.0.1/ssl/s2_clnt.c vendor-crypto/openssl/dist-1.0.1/ssl/s2_srvr.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_both.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_clnt.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_lib.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_srvr.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl.h vendor-crypto/openssl/dist-1.0.1/ssl/ssl_err.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_lib.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_locl.h vendor-crypto/openssl/dist-1.0.1/ssl/ssl_sess.c vendor-crypto/openssl/dist-1.0.1/ssl/t1_lib.c Modified: vendor-crypto/openssl/dist-1.0.1/CHANGES ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/CHANGES Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/CHANGES Thu Sep 22 13:05:59 2016 (r306191) @@ -2,6 +2,166 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1t and 1.0.1u [22 Sep 2016] + + *) OCSP Status Request extension unbounded memory growth + + A malicious client can send an excessively large OCSP Status Request + extension. If that client continually requests renegotiation, sending a + large OCSP Status Request extension each time, then there will be unbounded + memory growth on the server. This will eventually lead to a Denial Of + Service attack through memory exhaustion. Servers with a default + configuration are vulnerable even if they do not support OCSP. Builds using + the "no-ocsp" build time option are not affected. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6304) + [Matt Caswell] + + *) In order to mitigate the SWEET32 attack, the DES ciphers were moved from + HIGH to MEDIUM. + + This issue was reported to OpenSSL Karthikeyan Bhargavan and Gaetan + Leurent (INRIA) + (CVE-2016-2183) + [Rich Salz] + + *) OOB write in MDC2_Update() + + An overflow can occur in MDC2_Update() either if called directly or + through the EVP_DigestUpdate() function using MDC2. If an attacker + is able to supply very large amounts of input data after a previous + call to EVP_EncryptUpdate() with a partial block then a length check + can overflow resulting in a heap corruption. + + The amount of data needed is comparable to SIZE_MAX which is impractical + on most platforms. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6303) + [Stephen Henson] + + *) Malformed SHA512 ticket DoS + + If a server uses SHA512 for TLS session ticket HMAC it is vulnerable to a + DoS attack where a malformed ticket will result in an OOB read which will + ultimately crash. + + The use of SHA512 in TLS session tickets is comparatively rare as it requires + a custom server callback and ticket lookup mechanism. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6302) + [Stephen Henson] + + *) OOB write in BN_bn2dec() + + The function BN_bn2dec() does not check the return value of BN_div_word(). + This can cause an OOB write if an application uses this function with an + overly large BIGNUM. This could be a problem if an overly large certificate + or CRL is printed out from an untrusted source. TLS is not affected because + record limits will reject an oversized certificate before it is parsed. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2182) + [Stephen Henson] + + *) OOB read in TS_OBJ_print_bio() + + The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is + the total length the OID text representation would use and not the amount + of data written. This will result in OOB reads when large OIDs are + presented. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2180) + [Stephen Henson] + + *) Pointer arithmetic undefined behaviour + + Avoid some undefined pointer arithmetic + + A common idiom in the codebase is to check limits in the following manner: + "p + len > limit" + + Where "p" points to some malloc'd data of SIZE bytes and + limit == p + SIZE + + "len" here could be from some externally supplied data (e.g. from a TLS + message). + + The rules of C pointer arithmetic are such that "p + len" is only well + defined where len <= SIZE. Therefore the above idiom is actually + undefined behaviour. + + For example this could cause problems if some malloc implementation + provides an address for "p" such that "p + len" actually overflows for + values of len that are too big and therefore p + len < limit. + + This issue was reported to OpenSSL by Guido Vranken + (CVE-2016-2177) + [Matt Caswell] + + *) Constant time flag not preserved in DSA signing + + Operations in the DSA signing algorithm should run in constant time in + order to avoid side channel attacks. A flaw in the OpenSSL DSA + implementation means that a non-constant time codepath is followed for + certain operations. This has been demonstrated through a cache-timing + attack to be sufficient for an attacker to recover the private DSA key. + + This issue was reported by César Pereida (Aalto University), Billy Brumley + (Tampere University of Technology), and Yuval Yarom (The University of + Adelaide and NICTA). + (CVE-2016-2178) + [César Pereida] + + *) DTLS buffered message DoS + + In a DTLS connection where handshake messages are delivered out-of-order + those messages that OpenSSL is not yet ready to process will be buffered + for later use. Under certain circumstances, a flaw in the logic means that + those messages do not get removed from the buffer even though the handshake + has been completed. An attacker could force up to approx. 15 messages to + remain in the buffer when they are no longer required. These messages will + be cleared when the DTLS connection is closed. The default maximum size for + a message is 100k. Therefore the attacker could force an additional 1500k + to be consumed per connection. By opening many simulataneous connections an + attacker could cause a DoS attack through memory exhaustion. + + This issue was reported to OpenSSL by Quan Luo. + (CVE-2016-2179) + [Matt Caswell] + + *) DTLS replay protection DoS + + A flaw in the DTLS replay attack protection mechanism means that records + that arrive for future epochs update the replay protection "window" before + the MAC for the record has been validated. This could be exploited by an + attacker by sending a record for the next epoch (which does not have to + decrypt or have a valid MAC), with a very large sequence number. This means + that all subsequent legitimate packets are dropped causing a denial of + service for a specific DTLS connection. + + This issue was reported to OpenSSL by the OCAP audit team. + (CVE-2016-2181) + [Matt Caswell] + + *) Certificate message OOB reads + + In OpenSSL 1.0.2 and earlier some missing message length checks can result + in OOB reads of up to 2 bytes beyond an allocated buffer. There is a + theoretical DoS risk but this has not been observed in practice on common + platforms. + + The messages affected are client certificate, client certificate request + and server certificate. As a result the attack can only be performed + against a client or a server which enables client authentication. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6306) + [Stephen Henson] + Changes between 1.0.1s and 1.0.1t [3 May 2016] *) Prevent padding oracle in AES-NI CBC MAC check Modified: vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING Thu Sep 22 13:05:59 2016 (r306191) @@ -1,38 +1,75 @@ -HOW TO CONTRIBUTE TO OpenSSL ----------------------------- +HOW TO CONTRIBUTE TO PATCHES OpenSSL +------------------------------------ -Development is coordinated on the openssl-dev mailing list (see -http://www.openssl.org for information on subscribing). If you -would like to submit a patch, send it to rt@openssl.org with -the string "[PATCH]" in the subject. Please be sure to include a -textual explanation of what your patch does. - -You can also make GitHub pull requests. If you do this, please also send -mail to rt@openssl.org with a brief description and a link to the PR so -that we can more easily keep track of it. +(Please visit https://www.openssl.org/community/getting-started.html for +other ideas about how to contribute.) +Development is coordinated on the openssl-dev mailing list (see the +above link or https://mta.openssl.org for information on subscribing). If you are unsure as to whether a feature will be useful for the general -OpenSSL community please discuss it on the openssl-dev mailing list first. -Someone may be already working on the same thing or there may be a good -reason as to why that feature isn't implemented. - -Patches should be as up to date as possible, preferably relative to the -current Git or the last snapshot. They should follow our coding style -(see https://www.openssl.org/policies/codingstyle.html) and compile without -warnings using the --strict-warnings flag. OpenSSL compiles on many varied -platforms: try to ensure you only use portable features. - -Our preferred format for patch files is "git format-patch" output. For example -to provide a patch file containing the last commit in your local git repository -use the following command: +OpenSSL community you might want to discuss it on the openssl-dev mailing +list first. Someone may be already working on the same thing or there +may be a good reason as to why that feature isn't implemented. + +The best way to submit a patch is to make a pull request on GitHub. +(It is not necessary to send mail to rt@openssl.org to open a ticket!) +If you think the patch could use feedback from the community, please +start a thread on openssl-dev. + +You can also submit patches by sending it as mail to rt@openssl.org. +Please include the word "PATCH" and an explanation of what the patch +does in the subject line. If you do this, our preferred format is "git +format-patch" output. For example to provide a patch file containing the +last commit in your local git repository use the following command: -# git format-patch --stdout HEAD^ >mydiffs.patch + % git format-patch --stdout HEAD^ >mydiffs.patch Another method of creating an acceptable patch file without using git is as follows: -# cd openssl-work -# [your changes] -# ./Configure dist; make clean -# cd .. -# diff -ur openssl-orig openssl-work > mydiffs.patch + % cd openssl-work + ...make your changes... + % ./Configure dist; make clean + % cd .. + % diff -ur openssl-orig openssl-work >mydiffs.patch + +Note that pull requests are generally easier for the team, and community, to +work with. Pull requests benefit from all of the standard GitHub features, +including code review tools, simpler integration, and CI build support. + +No matter how a patch is submitted, the following items will help make +the acceptance and review process faster: + + 1. Anything other than trivial contributions will require a contributor + licensing agreement, giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the OpenSSL license (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + + 3. Patches should be as current as possible. When using GitHub, please + expect to have to rebase and update often. Note that we do not accept merge + commits. You will be asked to remove them before a patch is considered + acceptable. + + 4. Patches should follow our coding style (see + https://www.openssl.org/policies/codingstyle.html) and compile without + warnings. Where gcc or clang is availble you should use the + --strict-warnings Configure option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + + 5. When at all possible, patches should include tests. These can either be + added to an existing test, or completely new. Please see test/README + for information on the test framework. + + 6. New features or changed functionality must include documentation. Please + look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of + our style. Modified: vendor-crypto/openssl/dist-1.0.1/Configure ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/Configure Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/Configure Thu Sep 22 13:05:59 2016 (r306191) @@ -741,7 +741,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). Modified: vendor-crypto/openssl/dist-1.0.1/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/FREEBSD-upgrade Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/FREEBSD-upgrade Thu Sep 22 13:05:59 2016 (r306191) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://svn.freebsd.org/base" -setenv OSSLVER 1.0.1t -# OSSLTAG format: v1_0_1t +setenv OSSLVER 1.0.1u +# OSSLTAG format: v1_0_1u ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist-1.0.1/Makefile ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/Makefile Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/Makefile Thu Sep 22 13:05:59 2016 (r306191) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1t +VERSION=1.0.1u MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: vendor-crypto/openssl/dist-1.0.1/NEWS ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/NEWS Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/NEWS Thu Sep 22 13:05:59 2016 (r306191) @@ -5,6 +5,20 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1t and OpenSSL 1.0.1u [22 Sep 2016] + + o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) + o SWEET32 Mitigation (CVE-2016-2183) + o OOB write in MDC2_Update() (CVE-2016-6303) + o Malformed SHA512 ticket DoS (CVE-2016-6302) + o OOB write in BN_bn2dec() (CVE-2016-2182) + o OOB read in TS_OBJ_print_bio() (CVE-2016-2180) + o Pointer arithmetic undefined behaviour (CVE-2016-2177) + o Constant time flag not preserved in DSA signing (CVE-2016-2178) + o DTLS buffered message DoS (CVE-2016-2179) + o DTLS replay protection DoS (CVE-2016-2181) + o Certificate message OOB reads (CVE-2016-6306) + Major changes between OpenSSL 1.0.1s and OpenSSL 1.0.1t [3 May 2016] o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) Modified: vendor-crypto/openssl/dist-1.0.1/README ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/README Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/README Thu Sep 22 13:05:59 2016 (r306191) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1t 3 May 2016 + OpenSSL 1.0.1u 22 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist-1.0.1/apps/apps.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/apps/apps.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/apps/apps.c Thu Sep 22 13:05:59 2016 (r306191) @@ -2241,6 +2241,8 @@ int args_verify(char ***pargs, int *parg flags |= X509_V_FLAG_CHECK_SS_SIGNATURE; else if (!strcmp(arg, "-no_alt_chains")) flags |= X509_V_FLAG_NO_ALT_CHAINS; + else if (!strcmp(arg, "-allow_proxy_certs")) + flags |= X509_V_FLAG_ALLOW_PROXY_CERTS; else return 0; Modified: vendor-crypto/openssl/dist-1.0.1/apps/enc.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/apps/enc.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/apps/enc.c Thu Sep 22 13:05:59 2016 (r306191) @@ -509,7 +509,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "invalid hex salt value\n"); goto end; } - } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) + } else if (RAND_bytes(salt, sizeof salt) <= 0) goto end; /* * If -P option then don't bother writing Modified: vendor-crypto/openssl/dist-1.0.1/apps/passwd.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/apps/passwd.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/apps/passwd.c Thu Sep 22 13:05:59 2016 (r306191) @@ -416,7 +416,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 2) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 2) <= 0) goto err; (*salt_p)[0] = cov_2char[(*salt_p)[0] & 0x3f]; /* 6 bits */ (*salt_p)[1] = cov_2char[(*salt_p)[1] & 0x3f]; /* 6 bits */ @@ -437,7 +437,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 8) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 8) <= 0) goto err; for (i = 0; i < 8; i++) Modified: vendor-crypto/openssl/dist-1.0.1/apps/s_server.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/apps/s_server.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/apps/s_server.c Thu Sep 22 13:05:59 2016 (r306191) @@ -2968,7 +2968,7 @@ static int generate_session_id(const SSL { unsigned int count = 0; do { - if (RAND_pseudo_bytes(id, *id_len) < 0) + if (RAND_bytes(id, *id_len) <= 0) return 0; /* * Prefix the session_id with the required prefix. NB: If our prefix Modified: vendor-crypto/openssl/dist-1.0.1/apps/x509.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/apps/x509.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/apps/x509.c Thu Sep 22 13:05:59 2016 (r306191) @@ -1053,6 +1053,10 @@ static int x509_certify(X509_STORE *ctx, EVP_PKEY *upkey; upkey = X509_get_pubkey(xca); + if (upkey == NULL) { + BIO_printf(bio_err, "Error obtaining CA X509 public key\n"); + goto end; + } EVP_PKEY_copy_parameters(upkey, pkey); EVP_PKEY_free(upkey); @@ -1161,6 +1165,8 @@ static int sign(X509 *x, EVP_PKEY *pkey, EVP_PKEY *pktmp; pktmp = X509_get_pubkey(x); + if (pktmp == NULL) + goto err; EVP_PKEY_copy_parameters(pktmp, pkey); EVP_PKEY_save_parameters(pktmp, 1); EVP_PKEY_free(pktmp); Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_bytes.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_bytes.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_bytes.c Thu Sep 22 13:05:59 2016 (r306191) @@ -60,7 +60,12 @@ #include "cryptlib.h" #include -static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c); +static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c, + int depth); +static ASN1_STRING *int_d2i_ASN1_bytes(ASN1_STRING **a, + const unsigned char **pp, long length, + int Ptag, int Pclass, int depth, + int *perr); /* * type is a 'bitmap' of acceptable string types. */ @@ -99,7 +104,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_ST ret = (*a); if (len != 0) { - s = (unsigned char *)OPENSSL_malloc((int)len + 1); + s = OPENSSL_malloc((int)len + 1); if (s == NULL) { i = ERR_R_MALLOC_FAILURE; goto err; @@ -154,15 +159,38 @@ int i2d_ASN1_bytes(ASN1_STRING *a, unsig return (r); } +/* + * Maximum recursion depth of d2i_ASN1_bytes(): much more than should be + * encountered in pratice. + */ + +#define ASN1_BYTES_MAXDEPTH 20 + ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, long length, int Ptag, int Pclass) { + int err = 0; + ASN1_STRING *s = int_d2i_ASN1_bytes(a, pp, length, Ptag, Pclass, 0, &err); + if (err != 0) + ASN1err(ASN1_F_D2I_ASN1_BYTES, err); + return s; +} + +static ASN1_STRING *int_d2i_ASN1_bytes(ASN1_STRING **a, + const unsigned char **pp, long length, + int Ptag, int Pclass, + int depth, int *perr) +{ ASN1_STRING *ret = NULL; const unsigned char *p; unsigned char *s; long len; int inf, tag, xclass; - int i = 0; + + if (depth > ASN1_BYTES_MAXDEPTH) { + *perr = ASN1_R_NESTED_ASN1_STRING; + return NULL; + } if ((a == NULL) || ((*a) == NULL)) { if ((ret = ASN1_STRING_new()) == NULL) @@ -173,18 +201,19 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING p = *pp; inf = ASN1_get_object(&p, &len, &tag, &xclass, length); if (inf & 0x80) { - i = ASN1_R_BAD_OBJECT_HEADER; + *perr = ASN1_R_BAD_OBJECT_HEADER; goto err; } if (tag != Ptag) { - i = ASN1_R_WRONG_TAG; + *perr = ASN1_R_WRONG_TAG; goto err; } if (inf & V_ASN1_CONSTRUCTED) { ASN1_const_CTX c; + c.error = 0; c.pp = pp; c.p = p; c.inf = inf; @@ -192,17 +221,18 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING c.tag = Ptag; c.xclass = Pclass; c.max = (length == 0) ? 0 : (p + length); - if (!asn1_collate_primitive(ret, &c)) + if (!asn1_collate_primitive(ret, &c, depth)) { + *perr = c.error; goto err; - else { + } else { p = c.p; } } else { if (len != 0) { if ((ret->length < len) || (ret->data == NULL)) { - s = (unsigned char *)OPENSSL_malloc((int)len + 1); + s = OPENSSL_malloc((int)len + 1); if (s == NULL) { - i = ERR_R_MALLOC_FAILURE; + *perr = ERR_R_MALLOC_FAILURE; goto err; } if (ret->data != NULL) @@ -230,7 +260,6 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING err: if ((ret != NULL) && ((a == NULL) || (*a != ret))) ASN1_STRING_free(ret); - ASN1err(ASN1_F_D2I_ASN1_BYTES, i); return (NULL); } @@ -242,7 +271,8 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING * There have been a few bug fixes for this function from Paul Keogh * , many thanks to him */ -static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c) +static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c, + int depth) { ASN1_STRING *os = NULL; BUF_MEM b; @@ -270,9 +300,8 @@ static int asn1_collate_primitive(ASN1_S } c->q = c->p; - if (d2i_ASN1_bytes(&os, &c->p, c->max - c->p, c->tag, c->xclass) - == NULL) { - c->error = ERR_R_ASN1_LIB; + if (int_d2i_ASN1_bytes(&os, &c->p, c->max - c->p, c->tag, c->xclass, + depth + 1, &c->error) == NULL) { goto err; } @@ -297,7 +326,6 @@ static int asn1_collate_primitive(ASN1_S ASN1_STRING_free(os); return (1); err: - ASN1err(ASN1_F_ASN1_COLLATE_PRIMITIVE, c->error); if (os != NULL) ASN1_STRING_free(os); if (b.data != NULL) Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_object.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_object.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_object.c Thu Sep 22 13:05:59 2016 (r306191) @@ -73,7 +73,7 @@ int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsi return (0); objsize = ASN1_object_size(0, a->length, V_ASN1_OBJECT); - if (pp == NULL) + if (pp == NULL || objsize == -1) return objsize; p = *pp; @@ -174,8 +174,12 @@ int a2d_ASN1_OBJECT(unsigned char *out, if (!tmp) goto err; } - while (blsize--) - tmp[i++] = (unsigned char)BN_div_word(bl, 0x80L); + while (blsize--) { + BN_ULONG t = BN_div_word(bl, 0x80L); + if (t == (BN_ULONG)-1) + goto err; + tmp[i++] = (unsigned char)t; + } } else { for (;;) { Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_set.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_set.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/a_set.c Thu Sep 22 13:05:59 2016 (r306191) @@ -57,6 +57,7 @@ */ #include +#include #include "cryptlib.h" #include @@ -98,10 +99,14 @@ int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) if (a == NULL) return (0); - for (i = sk_OPENSSL_BLOCK_num(a) - 1; i >= 0; i--) + for (i = sk_OPENSSL_BLOCK_num(a) - 1; i >= 0; i--) { + int tmplen = i2d(sk_OPENSSL_BLOCK_value(a, i), NULL); + if (tmplen > INT_MAX - ret) + return -1; ret += i2d(sk_OPENSSL_BLOCK_value(a, i), NULL); + } r = ASN1_object_size(1, ret, ex_tag); - if (pp == NULL) + if (pp == NULL || r == -1) return (r); p = *pp; Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn1_lib.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn1_lib.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn1_lib.c Thu Sep 22 13:05:59 2016 (r306191) @@ -256,26 +256,30 @@ static void asn1_put_length(unsigned cha int ASN1_object_size(int constructed, int length, int tag) { - int ret; - - ret = length; - ret++; + int ret = 1; + if (length < 0) + return -1; if (tag >= 31) { while (tag > 0) { tag >>= 7; ret++; } } - if (constructed == 2) - return ret + 3; - ret++; - if (length > 127) { - while (length > 0) { - length >>= 8; - ret++; + if (constructed == 2) { + ret += 3; + } else { + ret++; + if (length > 127) { + int tmplen = length; + while (tmplen > 0) { + tmplen >>= 8; + ret++; + } } } - return (ret); + if (ret >= INT_MAX - length) + return -1; + return ret + length; } static int _asn1_Finish(ASN1_const_CTX *c) @@ -324,7 +328,7 @@ int asn1_GetSequence(ASN1_const_CTX *c, return (0); } if (c->inf == (1 | V_ASN1_CONSTRUCTED)) - c->slen = *length + *(c->pp) - c->p; + c->slen = *length; c->eos = 0; return (1); } @@ -366,7 +370,7 @@ int ASN1_STRING_set(ASN1_STRING *str, co else len = strlen(data); } - if ((str->length < len) || (str->data == NULL)) { + if ((str->length <= len) || (str->data == NULL)) { c = str->data; if (c == NULL) str->data = OPENSSL_malloc(len + 1); Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn_mime.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn_mime.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn_mime.c Thu Sep 22 13:05:59 2016 (r306191) @@ -289,7 +289,7 @@ int SMIME_write_ASN1(BIO *bio, ASN1_VALU if ((flags & SMIME_DETACHED) && data) { /* We want multipart/signed */ /* Generate a random boundary */ - if (RAND_pseudo_bytes((unsigned char *)bound, 32) < 0) + if (RAND_bytes((unsigned char *)bound, 32) <= 0) return 0; for (i = 0; i < 32; i++) { c = bound[i] & 0xf; Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/d2i_pr.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/d2i_pr.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/d2i_pr.c Thu Sep 22 13:05:59 2016 (r306191) @@ -97,15 +97,17 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_P if (!ret->ameth->old_priv_decode || !ret->ameth->old_priv_decode(ret, &p, length)) { if (ret->ameth->priv_decode) { + EVP_PKEY *tmp; PKCS8_PRIV_KEY_INFO *p8 = NULL; p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); if (!p8) goto err; - EVP_PKEY_free(ret); - ret = EVP_PKCS82PKEY(p8); + tmp = EVP_PKCS82PKEY(p8); PKCS8_PRIV_KEY_INFO_free(p8); - if (ret == NULL) + if (tmp == NULL) goto err; + EVP_PKEY_free(ret); + ret = tmp; } else { ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB); goto err; Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_enum.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_enum.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_enum.c Thu Sep 22 13:05:59 2016 (r306191) @@ -160,8 +160,6 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_EN i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -199,5 +197,7 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_EN err_sl: ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_int.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_int.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_int.c Thu Sep 22 13:05:59 2016 (r306191) @@ -172,8 +172,6 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEG sp = OPENSSL_realloc_clean(s, slen, num + i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_INTEGER, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -211,5 +209,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEG err_sl: ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_string.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_string.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/f_string.c Thu Sep 22 13:05:59 2016 (r306191) @@ -166,8 +166,6 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_STRING, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -205,5 +203,7 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING err_sl: ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbe.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbe.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbe.c Thu Sep 22 13:05:59 2016 (r306191) @@ -101,7 +101,7 @@ int PKCS5_pbe_set0_algor(X509_ALGOR *alg sstr = ASN1_STRING_data(pbe->salt); if (salt) memcpy(sstr, salt, saltlen); - else if (RAND_pseudo_bytes(sstr, saltlen) < 0) + else if (RAND_bytes(sstr, saltlen) <= 0) goto err; if (!ASN1_item_pack(pbe, ASN1_ITEM_rptr(PBEPARAM), &pbe_str)) { Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbev2.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbev2.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/p5_pbev2.c Thu Sep 22 13:05:59 2016 (r306191) @@ -120,7 +120,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_ if (EVP_CIPHER_iv_length(cipher)) { if (aiv) memcpy(iv, aiv, EVP_CIPHER_iv_length(cipher)); - else if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) + else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) <= 0) goto err; } @@ -225,7 +225,7 @@ X509_ALGOR *PKCS5_pbkdf2_set(int iter, u if (salt) memcpy(osalt->data, salt, saltlen); - else if (RAND_pseudo_bytes(osalt->data, saltlen) < 0) + else if (RAND_bytes(osalt->data, saltlen) <= 0) goto merr; if (iter <= 0) Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_enc.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_enc.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_enc.c Thu Sep 22 13:05:59 2016 (r306191) @@ -59,6 +59,7 @@ #include #include +#include #include "cryptlib.h" #include #include @@ -216,17 +217,19 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) { const ASN1_TEMPLATE *seqtt; ASN1_VALUE **pseqval; + int tmplen; seqtt = asn1_do_adb(pval, tt, 1); if (!seqtt) return 0; pseqval = asn1_get_field_ptr(pval, seqtt); - /* FIXME: check for errors in enhanced version */ - seqcontlen += asn1_template_ex_i2d(pseqval, NULL, seqtt, - -1, aclass); + tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass); + if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen)) + return -1; + seqcontlen += tmplen; } seqlen = ASN1_object_size(ndef, seqcontlen, tag); - if (!out) + if (!out || seqlen == -1) return seqlen; /* Output SEQUENCE header */ ASN1_put_object(out, ndef, seqcontlen, tag, aclass); @@ -339,19 +342,24 @@ static int asn1_template_ex_i2d(ASN1_VAL /* Determine total length of items */ skcontlen = 0; for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) { + int tmplen; skitem = sk_ASN1_VALUE_value(sk, i); - skcontlen += ASN1_item_ex_i2d(&skitem, NULL, - ASN1_ITEM_ptr(tt->item), - -1, iclass); + tmplen = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item), + -1, iclass); + if (tmplen == -1 || (skcontlen > INT_MAX - tmplen)) + return -1; + skcontlen += tmplen; } sklen = ASN1_object_size(ndef, skcontlen, sktag); + if (sklen == -1) + return -1; /* If EXPLICIT need length of surrounding tag */ if (flags & ASN1_TFLG_EXPTAG) ret = ASN1_object_size(ndef, sklen, ttag); else ret = sklen; - if (!out) + if (!out || ret == -1) return ret; /* Now encode this lot... */ @@ -380,7 +388,7 @@ static int asn1_template_ex_i2d(ASN1_VAL return 0; /* Find length of EXPLICIT tag */ ret = ASN1_object_size(ndef, i, ttag); - if (out) { + if (out && ret != -1) { /* Output tag and item */ ASN1_put_object(out, ndef, i, ttag, tclass); ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), -1, iclass); Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_prn.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_prn.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_prn.c Thu Sep 22 13:05:59 2016 (r306191) @@ -446,6 +446,8 @@ static int asn1_print_integer_ctx(BIO *o char *s; int ret = 1; s = i2s_ASN1_INTEGER(NULL, str); + if (s == NULL) + return 0; if (BIO_puts(out, s) <= 0) ret = 0; OPENSSL_free(s); Modified: vendor-crypto/openssl/dist-1.0.1/crypto/asn1/x_name.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/asn1/x_name.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/asn1/x_name.c Thu Sep 22 13:05:59 2016 (r306191) @@ -199,10 +199,8 @@ static int x509_name_ex_d2i(ASN1_VALUE * int i, j, ret; STACK_OF(X509_NAME_ENTRY) *entries; X509_NAME_ENTRY *entry; - if (len > X509_NAME_MAX) { - ASN1err(ASN1_F_X509_NAME_EX_D2I, ASN1_R_TOO_LONG); - return 0; - } + if (len > X509_NAME_MAX) + len = X509_NAME_MAX; q = p; /* Get internal representation of Name */ Modified: vendor-crypto/openssl/dist-1.0.1/crypto/bio/bf_nbio.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/bio/bf_nbio.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/bio/bf_nbio.c Thu Sep 22 13:05:59 2016 (r306191) @@ -139,7 +139,7 @@ static int nbiof_read(BIO *b, char *out, BIO_clear_retry_flags(b); #if 1 - if (RAND_pseudo_bytes(&n, 1) < 0) + if (RAND_bytes(&n, 1) <= 0) return -1; num = (n & 0x07); @@ -179,7 +179,7 @@ static int nbiof_write(BIO *b, const cha num = nt->lwn; nt->lwn = 0; } else { - if (RAND_pseudo_bytes(&n, 1) < 0) + if (RAND_bytes(&n, 1) <= 0) return -1; num = (n & 7); } Modified: vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_lib.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_lib.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_lib.c Thu Sep 22 13:05:59 2016 (r306191) @@ -569,7 +569,7 @@ void BN_clear(BIGNUM *a) { bn_check_top(a); if (a->d != NULL) - memset(a->d, 0, a->dmax * sizeof(a->d[0])); + OPENSSL_cleanse(a->d, a->dmax * sizeof(a->d[0])); a->top = 0; a->neg = 0; } Modified: vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_print.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_print.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_print.c Thu Sep 22 13:05:59 2016 (r306191) @@ -111,6 +111,7 @@ char *BN_bn2dec(const BIGNUM *a) char *p; BIGNUM *t = NULL; BN_ULONG *bn_data = NULL, *lp; + int bn_data_num; /*- * get an upper bound for the length of the decimal integer @@ -120,9 +121,9 @@ char *BN_bn2dec(const BIGNUM *a) */ i = BN_num_bits(a) * 3; num = (i / 10 + i / 1000 + 1) + 1; - bn_data = - (BN_ULONG *)OPENSSL_malloc((num / BN_DEC_NUM + 1) * sizeof(BN_ULONG)); - buf = (char *)OPENSSL_malloc(num + 3); + bn_data_num = num / BN_DEC_NUM + 1; + bn_data = OPENSSL_malloc(bn_data_num * sizeof(BN_ULONG)); + buf = OPENSSL_malloc(num + 3); if ((buf == NULL) || (bn_data == NULL)) { BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); goto err; @@ -140,9 +141,12 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); + if (*lp == (BN_ULONG)-1) + goto err; lp++; } lp--; Modified: vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_rand.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_rand.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_rand.c Thu Sep 22 13:05:59 2016 (r306191) @@ -145,13 +145,9 @@ static int bnrand(int pseudorand, BIGNUM time(&tim); RAND_add(&tim, sizeof(tim), 0.0); - if (pseudorand) { - if (RAND_pseudo_bytes(buf, bytes) == -1) - goto err; - } else { - if (RAND_bytes(buf, bytes) <= 0) - goto err; - } + /* We ignore the value of pseudorand and always call RAND_bytes */ + if (RAND_bytes(buf, bytes) <= 0) + goto err; #if 1 if (pseudorand == 2) { Modified: vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_enc.c ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_enc.c Thu Sep 22 13:04:51 2016 (r306190) +++ vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_enc.c Thu Sep 22 13:05:59 2016 (r306191) @@ -119,7 +119,7 @@ BIO *cms_EncryptedContent_init_bio(CMS_E /* Generate a random IV if we need one */ ivlen = EVP_CIPHER_CTX_iv_length(ctx); if (ivlen > 0) { - if (RAND_pseudo_bytes(iv, ivlen) <= 0) + if (RAND_bytes(iv, ivlen) <= 0) goto err; piv = iv; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 13:06:53 2016 Return-Path: Delivered-To: svn-src-all@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 91C4DBE34F9; Thu, 22 Sep 2016 13:06:53 +0000 (UTC) (envelope-from jkim@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 4B1EF6CC; Thu, 22 Sep 2016 13:06:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MD6qAM009705; Thu, 22 Sep 2016 13:06:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MD6qCc009704; Thu, 22 Sep 2016 13:06:52 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221306.u8MD6qCc009704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 13:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306192 - vendor-crypto/openssl/1.0.1u X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 13:06:53 -0000 Author: jkim Date: Thu Sep 22 13:06:52 2016 New Revision: 306192 URL: https://svnweb.freebsd.org/changeset/base/306192 Log: Tag OpenSSL 1.0.1u. Added: vendor-crypto/openssl/1.0.1u/ - copied from r306191, vendor-crypto/openssl/dist-1.0.1/ From owner-svn-src-all@freebsd.org Thu Sep 22 13:27:48 2016 Return-Path: Delivered-To: svn-src-all@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 53AB6BE4B95; Thu, 22 Sep 2016 13:27:48 +0000 (UTC) (envelope-from jkim@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 F3E3880F; Thu, 22 Sep 2016 13:27:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MDRlpV017304; Thu, 22 Sep 2016 13:27:47 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MDRjkS017282; Thu, 22 Sep 2016 13:27:45 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221327.u8MDRjkS017282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 13:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306193 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 13:27:48 -0000 Author: jkim Date: Thu Sep 22 13:27:44 2016 New Revision: 306193 URL: https://svnweb.freebsd.org/changeset/base/306193 Log: Merge OpenSSL 1.0.2i. Added: head/crypto/openssl/doc/crypto/d2i_PrivateKey.pod - copied unchanged from r306189, vendor-crypto/openssl/dist/doc/crypto/d2i_PrivateKey.pod head/crypto/openssl/ssl/bad_dtls_test.c - copied unchanged from r306189, vendor-crypto/openssl/dist/ssl/bad_dtls_test.c head/crypto/openssl/ssl/dtlstest.c - copied unchanged from r306189, vendor-crypto/openssl/dist/ssl/dtlstest.c head/secure/lib/libcrypto/man/d2i_PrivateKey.3 (contents, props changed) Modified: head/crypto/openssl/CHANGES head/crypto/openssl/CONTRIBUTING head/crypto/openssl/Configure head/crypto/openssl/Makefile head/crypto/openssl/Makefile.org head/crypto/openssl/Makefile.shared head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/CA.pl head/crypto/openssl/apps/CA.pl.in head/crypto/openssl/apps/apps.c head/crypto/openssl/apps/apps.h head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/dgst.c head/crypto/openssl/apps/enc.c head/crypto/openssl/apps/passwd.c head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/apps/req.c head/crypto/openssl/apps/s_apps.h head/crypto/openssl/apps/s_cb.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/srp.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/crypto/LPdir_unix.c head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl head/crypto/openssl/crypto/asn1/a_bytes.c head/crypto/openssl/crypto/asn1/a_object.c head/crypto/openssl/crypto/asn1/a_set.c head/crypto/openssl/crypto/asn1/a_strex.c head/crypto/openssl/crypto/asn1/a_strnid.c head/crypto/openssl/crypto/asn1/ameth_lib.c head/crypto/openssl/crypto/asn1/asn1_lib.c head/crypto/openssl/crypto/asn1/asn_mime.c head/crypto/openssl/crypto/asn1/bio_asn1.c head/crypto/openssl/crypto/asn1/bio_ndef.c head/crypto/openssl/crypto/asn1/charmap.pl head/crypto/openssl/crypto/asn1/d2i_pr.c head/crypto/openssl/crypto/asn1/f_enum.c head/crypto/openssl/crypto/asn1/f_int.c head/crypto/openssl/crypto/asn1/f_string.c head/crypto/openssl/crypto/asn1/i2d_pr.c head/crypto/openssl/crypto/asn1/p5_pbe.c head/crypto/openssl/crypto/asn1/p5_pbev2.c head/crypto/openssl/crypto/asn1/t_req.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/tasn_enc.c head/crypto/openssl/crypto/asn1/tasn_prn.c head/crypto/openssl/crypto/asn1/tasn_utl.c head/crypto/openssl/crypto/asn1/x_bignum.c head/crypto/openssl/crypto/asn1/x_name.c head/crypto/openssl/crypto/asn1/x_x509.c head/crypto/openssl/crypto/bio/b_print.c head/crypto/openssl/crypto/bio/bf_nbio.c head/crypto/openssl/crypto/bio/bio.h head/crypto/openssl/crypto/bio/bss_bio.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bio/bss_rtcp.c head/crypto/openssl/crypto/bn/asm/x86-mont.pl head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl head/crypto/openssl/crypto/bn/bn.h head/crypto/openssl/crypto/bn/bn_div.c head/crypto/openssl/crypto/bn/bn_lib.c head/crypto/openssl/crypto/bn/bn_print.c head/crypto/openssl/crypto/bn/bn_rand.c head/crypto/openssl/crypto/bn/bn_word.c head/crypto/openssl/crypto/bn/bntest.c head/crypto/openssl/crypto/cms/cms_enc.c head/crypto/openssl/crypto/cms/cms_ess.c head/crypto/openssl/crypto/cms/cms_lib.c head/crypto/openssl/crypto/cms/cms_pwri.c head/crypto/openssl/crypto/comp/comp.h head/crypto/openssl/crypto/conf/conf_def.h head/crypto/openssl/crypto/conf/conf_mod.c head/crypto/openssl/crypto/conf/keysets.pl head/crypto/openssl/crypto/des/asm/dest4-sparcv9.pl head/crypto/openssl/crypto/des/des.c head/crypto/openssl/crypto/des/enc_writ.c head/crypto/openssl/crypto/dh/dh_ameth.c head/crypto/openssl/crypto/dsa/dsa_ameth.c head/crypto/openssl/crypto/dsa/dsa_gen.c head/crypto/openssl/crypto/dsa/dsa_ossl.c head/crypto/openssl/crypto/ec/Makefile head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl head/crypto/openssl/crypto/ec/ec_ameth.c head/crypto/openssl/crypto/ec/ec_key.c head/crypto/openssl/crypto/ec/ecp_nistz256.c head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/evp/bio_enc.c head/crypto/openssl/crypto/evp/bio_ok.c head/crypto/openssl/crypto/evp/c_all.c head/crypto/openssl/crypto/evp/digest.c head/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c head/crypto/openssl/crypto/evp/e_seed.c head/crypto/openssl/crypto/evp/evp_enc.c head/crypto/openssl/crypto/evp/evp_test.c head/crypto/openssl/crypto/evp/openbsd_hw.c head/crypto/openssl/crypto/evp/p_lib.c head/crypto/openssl/crypto/evp/pmeth_gn.c head/crypto/openssl/crypto/evp/pmeth_lib.c head/crypto/openssl/crypto/hmac/hmac.c head/crypto/openssl/crypto/jpake/jpake.c head/crypto/openssl/crypto/lhash/lhash.c head/crypto/openssl/crypto/md2/md2_dgst.c head/crypto/openssl/crypto/md32_common.h head/crypto/openssl/crypto/mdc2/mdc2dgst.c head/crypto/openssl/crypto/mem.c head/crypto/openssl/crypto/mem_clr.c head/crypto/openssl/crypto/modes/asm/ghash-sparcv9.pl head/crypto/openssl/crypto/o_init.c head/crypto/openssl/crypto/o_time.c head/crypto/openssl/crypto/objects/o_names.c head/crypto/openssl/crypto/ocsp/ocsp_cl.c head/crypto/openssl/crypto/ocsp/ocsp_ext.c head/crypto/openssl/crypto/ocsp/ocsp_lib.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/ossl_typ.h head/crypto/openssl/crypto/pem/pem.h head/crypto/openssl/crypto/pem/pem_err.c head/crypto/openssl/crypto/pem/pem_lib.c head/crypto/openssl/crypto/pem/pvkfmt.c head/crypto/openssl/crypto/perlasm/sparcv9_modes.pl head/crypto/openssl/crypto/pkcs12/p12_mutl.c head/crypto/openssl/crypto/pkcs12/p12_npas.c head/crypto/openssl/crypto/pkcs12/p12_utl.c head/crypto/openssl/crypto/pkcs12/pkcs12.h head/crypto/openssl/crypto/pkcs7/pk7_doit.c head/crypto/openssl/crypto/rand/md_rand.c head/crypto/openssl/crypto/rand/rand_unix.c head/crypto/openssl/crypto/rand/randfile.c head/crypto/openssl/crypto/rsa/rsa_ameth.c head/crypto/openssl/crypto/rsa/rsa_chk.c head/crypto/openssl/crypto/rsa/rsa_lib.c head/crypto/openssl/crypto/rsa/rsa_pmeth.c head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl head/crypto/openssl/crypto/sparccpuid.S head/crypto/openssl/crypto/srp/srp_lib.c head/crypto/openssl/crypto/srp/srp_vfy.c head/crypto/openssl/crypto/ts/ts.h head/crypto/openssl/crypto/ts/ts_lib.c head/crypto/openssl/crypto/ts/ts_rsp_verify.c head/crypto/openssl/crypto/ui/ui_lib.c head/crypto/openssl/crypto/whrlpool/wp_dgst.c head/crypto/openssl/crypto/x509/by_dir.c head/crypto/openssl/crypto/x509/x509.h head/crypto/openssl/crypto/x509/x509_att.c head/crypto/openssl/crypto/x509/x509_err.c head/crypto/openssl/crypto/x509/x509_obj.c head/crypto/openssl/crypto/x509/x509_r2x.c head/crypto/openssl/crypto/x509/x509_txt.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x509_vfy.h head/crypto/openssl/crypto/x509/x509spki.c head/crypto/openssl/crypto/x509v3/v3_addr.c head/crypto/openssl/crypto/x509v3/v3_alt.c head/crypto/openssl/crypto/x509v3/v3_conf.c head/crypto/openssl/doc/apps/cms.pod head/crypto/openssl/doc/apps/s_client.pod head/crypto/openssl/doc/apps/s_server.pod head/crypto/openssl/doc/apps/smime.pod head/crypto/openssl/doc/apps/verify.pod head/crypto/openssl/doc/apps/x509.pod head/crypto/openssl/doc/apps/x509v3_config.pod head/crypto/openssl/doc/crypto/BIO_s_bio.pod head/crypto/openssl/doc/crypto/BN_bn2bin.pod head/crypto/openssl/doc/crypto/BN_rand.pod head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod head/crypto/openssl/doc/crypto/EVP_PKEY_cmp.pod head/crypto/openssl/doc/crypto/OBJ_nid2obj.pod head/crypto/openssl/doc/crypto/OPENSSL_config.pod head/crypto/openssl/doc/crypto/OPENSSL_ia32cap.pod head/crypto/openssl/doc/crypto/X509_verify_cert.pod head/crypto/openssl/doc/crypto/d2i_X509.pod head/crypto/openssl/doc/crypto/hmac.pod head/crypto/openssl/doc/crypto/rand.pod head/crypto/openssl/doc/crypto/ui.pod head/crypto/openssl/engines/ccgost/gost2001.c head/crypto/openssl/engines/ccgost/gost2001_keyx.c head/crypto/openssl/engines/ccgost/gost94_keyx.c head/crypto/openssl/engines/ccgost/gost_ameth.c head/crypto/openssl/engines/ccgost/gost_pmeth.c head/crypto/openssl/engines/e_4758cca.c head/crypto/openssl/engines/e_aep.c head/crypto/openssl/engines/e_capi.c head/crypto/openssl/engines/e_chil.c head/crypto/openssl/ssl/Makefile head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_both.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_enc.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl_asn1.c head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_err.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_rsa.c head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/sslv2conftest.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/util/mk1mf.pl head/crypto/openssl/util/mkerr.pl head/crypto/openssl/util/ssleay.num head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/Makefile.man head/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S head/secure/lib/libcrypto/amd64/sha1-x86_64.S head/secure/lib/libcrypto/amd64/x86_64-mont.S head/secure/lib/libcrypto/amd64/x86_64-mont5.S head/secure/lib/libcrypto/arm/bsaes-armv7.S head/secure/lib/libcrypto/i386/x86-mont.S head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/EC_GROUP_new.3 head/secure/lib/libcrypto/man/EC_KEY_new.3 head/secure/lib/libcrypto/man/EC_POINT_add.3 head/secure/lib/libcrypto/man/EC_POINT_new.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_check_host.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPKParameters.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ec.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CONF_CTX_new.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libssl/man/SSL_CONF_cmd.3 head/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 head/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get0_param.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set1_curves.3 head/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_check_chain.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/CHANGES Thu Sep 22 13:27:44 2016 (r306193) @@ -2,6 +2,166 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] + + *) OCSP Status Request extension unbounded memory growth + + A malicious client can send an excessively large OCSP Status Request + extension. If that client continually requests renegotiation, sending a + large OCSP Status Request extension each time, then there will be unbounded + memory growth on the server. This will eventually lead to a Denial Of + Service attack through memory exhaustion. Servers with a default + configuration are vulnerable even if they do not support OCSP. Builds using + the "no-ocsp" build time option are not affected. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6304) + [Matt Caswell] + + *) In order to mitigate the SWEET32 attack, the DES ciphers were moved from + HIGH to MEDIUM. + + This issue was reported to OpenSSL Karthikeyan Bhargavan and Gaetan + Leurent (INRIA) + (CVE-2016-2183) + [Rich Salz] + + *) OOB write in MDC2_Update() + + An overflow can occur in MDC2_Update() either if called directly or + through the EVP_DigestUpdate() function using MDC2. If an attacker + is able to supply very large amounts of input data after a previous + call to EVP_EncryptUpdate() with a partial block then a length check + can overflow resulting in a heap corruption. + + The amount of data needed is comparable to SIZE_MAX which is impractical + on most platforms. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6303) + [Stephen Henson] + + *) Malformed SHA512 ticket DoS + + If a server uses SHA512 for TLS session ticket HMAC it is vulnerable to a + DoS attack where a malformed ticket will result in an OOB read which will + ultimately crash. + + The use of SHA512 in TLS session tickets is comparatively rare as it requires + a custom server callback and ticket lookup mechanism. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6302) + [Stephen Henson] + + *) OOB write in BN_bn2dec() + + The function BN_bn2dec() does not check the return value of BN_div_word(). + This can cause an OOB write if an application uses this function with an + overly large BIGNUM. This could be a problem if an overly large certificate + or CRL is printed out from an untrusted source. TLS is not affected because + record limits will reject an oversized certificate before it is parsed. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2182) + [Stephen Henson] + + *) OOB read in TS_OBJ_print_bio() + + The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is + the total length the OID text representation would use and not the amount + of data written. This will result in OOB reads when large OIDs are + presented. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2180) + [Stephen Henson] + + *) Pointer arithmetic undefined behaviour + + Avoid some undefined pointer arithmetic + + A common idiom in the codebase is to check limits in the following manner: + "p + len > limit" + + Where "p" points to some malloc'd data of SIZE bytes and + limit == p + SIZE + + "len" here could be from some externally supplied data (e.g. from a TLS + message). + + The rules of C pointer arithmetic are such that "p + len" is only well + defined where len <= SIZE. Therefore the above idiom is actually + undefined behaviour. + + For example this could cause problems if some malloc implementation + provides an address for "p" such that "p + len" actually overflows for + values of len that are too big and therefore p + len < limit. + + This issue was reported to OpenSSL by Guido Vranken + (CVE-2016-2177) + [Matt Caswell] + + *) Constant time flag not preserved in DSA signing + + Operations in the DSA signing algorithm should run in constant time in + order to avoid side channel attacks. A flaw in the OpenSSL DSA + implementation means that a non-constant time codepath is followed for + certain operations. This has been demonstrated through a cache-timing + attack to be sufficient for an attacker to recover the private DSA key. + + This issue was reported by César Pereida (Aalto University), Billy Brumley + (Tampere University of Technology), and Yuval Yarom (The University of + Adelaide and NICTA). + (CVE-2016-2178) + [César Pereida] + + *) DTLS buffered message DoS + + In a DTLS connection where handshake messages are delivered out-of-order + those messages that OpenSSL is not yet ready to process will be buffered + for later use. Under certain circumstances, a flaw in the logic means that + those messages do not get removed from the buffer even though the handshake + has been completed. An attacker could force up to approx. 15 messages to + remain in the buffer when they are no longer required. These messages will + be cleared when the DTLS connection is closed. The default maximum size for + a message is 100k. Therefore the attacker could force an additional 1500k + to be consumed per connection. By opening many simulataneous connections an + attacker could cause a DoS attack through memory exhaustion. + + This issue was reported to OpenSSL by Quan Luo. + (CVE-2016-2179) + [Matt Caswell] + + *) DTLS replay protection DoS + + A flaw in the DTLS replay attack protection mechanism means that records + that arrive for future epochs update the replay protection "window" before + the MAC for the record has been validated. This could be exploited by an + attacker by sending a record for the next epoch (which does not have to + decrypt or have a valid MAC), with a very large sequence number. This means + that all subsequent legitimate packets are dropped causing a denial of + service for a specific DTLS connection. + + This issue was reported to OpenSSL by the OCAP audit team. + (CVE-2016-2181) + [Matt Caswell] + + *) Certificate message OOB reads + + In OpenSSL 1.0.2 and earlier some missing message length checks can result + in OOB reads of up to 2 bytes beyond an allocated buffer. There is a + theoretical DoS risk but this has not been observed in practice on common + platforms. + + The messages affected are client certificate, client certificate request + and server certificate. As a result the attack can only be performed + against a client or a server which enables client authentication. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6306) + [Stephen Henson] + Changes between 1.0.2g and 1.0.2h [3 May 2016] *) Prevent padding oracle in AES-NI CBC MAC check Modified: head/crypto/openssl/CONTRIBUTING ============================================================================== --- head/crypto/openssl/CONTRIBUTING Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/CONTRIBUTING Thu Sep 22 13:27:44 2016 (r306193) @@ -1,38 +1,75 @@ -HOW TO CONTRIBUTE TO OpenSSL ----------------------------- +HOW TO CONTRIBUTE TO PATCHES OpenSSL +------------------------------------ -Development is coordinated on the openssl-dev mailing list (see -http://www.openssl.org for information on subscribing). If you -would like to submit a patch, send it to rt@openssl.org with -the string "[PATCH]" in the subject. Please be sure to include a -textual explanation of what your patch does. - -You can also make GitHub pull requests. If you do this, please also send -mail to rt@openssl.org with a brief description and a link to the PR so -that we can more easily keep track of it. +(Please visit https://www.openssl.org/community/getting-started.html for +other ideas about how to contribute.) +Development is coordinated on the openssl-dev mailing list (see the +above link or https://mta.openssl.org for information on subscribing). If you are unsure as to whether a feature will be useful for the general -OpenSSL community please discuss it on the openssl-dev mailing list first. -Someone may be already working on the same thing or there may be a good -reason as to why that feature isn't implemented. - -Patches should be as up to date as possible, preferably relative to the -current Git or the last snapshot. They should follow our coding style -(see https://www.openssl.org/policies/codingstyle.html) and compile without -warnings using the --strict-warnings flag. OpenSSL compiles on many varied -platforms: try to ensure you only use portable features. - -Our preferred format for patch files is "git format-patch" output. For example -to provide a patch file containing the last commit in your local git repository -use the following command: +OpenSSL community you might want to discuss it on the openssl-dev mailing +list first. Someone may be already working on the same thing or there +may be a good reason as to why that feature isn't implemented. + +The best way to submit a patch is to make a pull request on GitHub. +(It is not necessary to send mail to rt@openssl.org to open a ticket!) +If you think the patch could use feedback from the community, please +start a thread on openssl-dev. + +You can also submit patches by sending it as mail to rt@openssl.org. +Please include the word "PATCH" and an explanation of what the patch +does in the subject line. If you do this, our preferred format is "git +format-patch" output. For example to provide a patch file containing the +last commit in your local git repository use the following command: -# git format-patch --stdout HEAD^ >mydiffs.patch + % git format-patch --stdout HEAD^ >mydiffs.patch Another method of creating an acceptable patch file without using git is as follows: -# cd openssl-work -# [your changes] -# ./Configure dist; make clean -# cd .. -# diff -ur openssl-orig openssl-work > mydiffs.patch + % cd openssl-work + ...make your changes... + % ./Configure dist; make clean + % cd .. + % diff -ur openssl-orig openssl-work >mydiffs.patch + +Note that pull requests are generally easier for the team, and community, to +work with. Pull requests benefit from all of the standard GitHub features, +including code review tools, simpler integration, and CI build support. + +No matter how a patch is submitted, the following items will help make +the acceptance and review process faster: + + 1. Anything other than trivial contributions will require a contributor + licensing agreement, giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the OpenSSL license (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + + 3. Patches should be as current as possible. When using GitHub, please + expect to have to rebase and update often. Note that we do not accept merge + commits. You will be asked to remove them before a patch is considered + acceptable. + + 4. Patches should follow our coding style (see + https://www.openssl.org/policies/codingstyle.html) and compile without + warnings. Where gcc or clang is availble you should use the + --strict-warnings Configure option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + + 5. When at all possible, patches should include tests. These can either be + added to an existing test, or completely new. Please see test/README + for information on the test framework. + + 6. New features or changed functionality must include documentation. Please + look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of + our style. Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/Configure Thu Sep 22 13:27:44 2016 (r306193) @@ -799,7 +799,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). @@ -1082,11 +1082,6 @@ if (defined($disabled{"md5"}) || defined $disabled{"tls1"} = "forced"; } -if (defined($disabled{"tls1"})) - { - $disabled{"tlsext"} = "forced"; - } - if (defined($disabled{"ec"}) || defined($disabled{"dsa"}) || defined($disabled{"dh"})) { @@ -1254,6 +1249,7 @@ my $shared_extension = $fields[$idx_shar my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib]; my $ar = $ENV{'AR'} || "ar"; my $arflags = $fields[$idx_arflags]; +my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres"; my $multilib = $fields[$idx_multilib]; # if $prefix/lib$multilib is not an existing directory, then @@ -1562,8 +1558,15 @@ $cpuid_obj="mem_clr.o" unless ($cpuid_ob $des_obj=$des_enc unless ($des_obj =~ /\.o$/); $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); -$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); $rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); +if ($rc4_obj =~ /\.o$/) + { + $cflags.=" -DRC4_ASM"; + } +else + { + $rc4_obj=$rc4_enc; + } if ($sha1_obj =~ /\.o$/) { # $sha1_obj=$sha1_enc; @@ -1717,12 +1720,14 @@ while () s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/; s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/; s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; + s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc"; } else { s/^CC=.*$/CC= $cc/; s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; + s/^RC=.*/RC= $windres/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang"; } Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/Makefile Thu Sep 22 13:27:44 2016 (r306193) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2h +VERSION=1.0.2i MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -68,6 +68,7 @@ EXE_EXT= ARFLAGS= AR= ar $(ARFLAGS) r RANLIB= /usr/bin/ranlib +RC= windres NM= nm PERL= /usr/bin/perl TAR= tar @@ -210,6 +211,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -368,6 +370,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: head/crypto/openssl/Makefile.org ============================================================================== --- head/crypto/openssl/Makefile.org Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/Makefile.org Thu Sep 22 13:27:44 2016 (r306193) @@ -66,6 +66,7 @@ EXE_EXT= ARFLAGS?= r AR=ar $(ARFLAGS) RANLIB= ranlib +RC= windres NM= nm PERL= perl TAR= tar @@ -208,6 +209,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -366,6 +368,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: head/crypto/openssl/Makefile.shared ============================================================================== --- head/crypto/openssl/Makefile.shared Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/Makefile.shared Thu Sep 22 13:27:44 2016 (r306193) @@ -293,7 +293,7 @@ link_a.cygwin: fi; \ dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \ $(PERL) util/mkrc.pl $$dll_name | \ - $(CROSS_COMPILE)windres -o rc.o; \ + $(RC) -o rc.o; \ extras="$$extras rc.o"; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/NEWS Thu Sep 22 13:27:44 2016 (r306193) @@ -5,6 +5,20 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] + + o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) + o SWEET32 Mitigation (CVE-2016-2183) + o OOB write in MDC2_Update() (CVE-2016-6303) + o Malformed SHA512 ticket DoS (CVE-2016-6302) + o OOB write in BN_bn2dec() (CVE-2016-2182) + o OOB read in TS_OBJ_print_bio() (CVE-2016-2180) + o Pointer arithmetic undefined behaviour (CVE-2016-2177) + o Constant time flag not preserved in DSA signing (CVE-2016-2178) + o DTLS buffered message DoS (CVE-2016-2179) + o DTLS replay protection DoS (CVE-2016-2181) + o Certificate message OOB reads (CVE-2016-6306) + Major changes between OpenSSL 1.0.2g and OpenSSL 1.0.2h [3 May 2016] o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/README Thu Sep 22 13:27:44 2016 (r306193) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2h 3 May 2016 + OpenSSL 1.0.2i 22 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/CA.pl ============================================================================== --- head/crypto/openssl/apps/CA.pl Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/CA.pl Thu Sep 22 13:27:44 2016 (r306193) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: head/crypto/openssl/apps/CA.pl.in ============================================================================== --- head/crypto/openssl/apps/CA.pl.in Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/CA.pl.in Thu Sep 22 13:27:44 2016 (r306193) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: head/crypto/openssl/apps/apps.c ============================================================================== --- head/crypto/openssl/apps/apps.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/apps.c Thu Sep 22 13:27:44 2016 (r306193) @@ -215,7 +215,8 @@ int args_from_file(char *file, int *argc if (arg != NULL) OPENSSL_free(arg); arg = (char **)OPENSSL_malloc(sizeof(char *) * (i * 2)); - + if (arg == NULL) + return 0; *argv = arg; num = 0; p = buf; @@ -2374,6 +2375,8 @@ int args_verify(char ***pargs, int *parg flags |= X509_V_FLAG_PARTIAL_CHAIN; else if (!strcmp(arg, "-no_alt_chains")) flags |= X509_V_FLAG_NO_ALT_CHAINS; + else if (!strcmp(arg, "-allow_proxy_certs")) + flags |= X509_V_FLAG_ALLOW_PROXY_CERTS; else return 0; @@ -3195,6 +3198,36 @@ int app_isdir(const char *name) #endif /* raw_read|write section */ +#if defined(__VMS) +# include "vms_term_sock.h" +static int stdin_sock = -1; + +static void close_stdin_sock(void) +{ + TerminalSocket (TERM_SOCK_DELETE, &stdin_sock); +} + +int fileno_stdin(void) +{ + if (stdin_sock == -1) { + TerminalSocket(TERM_SOCK_CREATE, &stdin_sock); + atexit(close_stdin_sock); + } + + return stdin_sock; +} +#else +int fileno_stdin(void) +{ + return fileno(stdin); +} +#endif + +int fileno_stdout(void) +{ + return fileno(stdout); +} + #if defined(_WIN32) && defined(STD_INPUT_HANDLE) int raw_read_stdin(void *buf, int siz) { @@ -3204,10 +3237,17 @@ int raw_read_stdin(void *buf, int siz) else return (-1); } +#elif defined(__VMS) +#include + +int raw_read_stdin(void *buf, int siz) +{ + return recv(fileno_stdin(), buf, siz, 0); +} #else int raw_read_stdin(void *buf, int siz) { - return read(fileno(stdin), buf, siz); + return read(fileno_stdin(), buf, siz); } #endif @@ -3223,6 +3263,6 @@ int raw_write_stdout(const void *buf, in #else int raw_write_stdout(const void *buf, int siz) { - return write(fileno(stdout), buf, siz); + return write(fileno_stdout(), buf, siz); } #endif Modified: head/crypto/openssl/apps/apps.h ============================================================================== --- head/crypto/openssl/apps/apps.h Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/apps.h Thu Sep 22 13:27:44 2016 (r306193) @@ -375,6 +375,8 @@ void store_setup_crl_download(X509_STORE # define SERIAL_RAND_BITS 64 int app_isdir(const char *); +int fileno_stdin(void); +int fileno_stdout(void); int raw_read_stdin(void *, int); int raw_write_stdout(const void *, int); Modified: head/crypto/openssl/apps/ca.c ============================================================================== --- head/crypto/openssl/apps/ca.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/ca.c Thu Sep 22 13:27:44 2016 (r306193) @@ -2103,25 +2103,23 @@ static int do_body(X509 **xret, EVP_PKEY goto err; /* We now just add it to the database */ - row[DB_type] = (char *)OPENSSL_malloc(2); - tm = X509_get_notAfter(ret); - row[DB_exp_date] = (char *)OPENSSL_malloc(tm->length + 1); - memcpy(row[DB_exp_date], tm->data, tm->length); - row[DB_exp_date][tm->length] = '\0'; - - row[DB_rev_date] = NULL; - - /* row[DB_serial] done already */ - row[DB_file] = (char *)OPENSSL_malloc(8); + row[DB_type] = OPENSSL_malloc(2); + row[DB_exp_date] = OPENSSL_malloc(tm->length + 1); + row[DB_rev_date] = OPENSSL_malloc(1); + row[DB_file] = OPENSSL_malloc(8); row[DB_name] = X509_NAME_oneline(X509_get_subject_name(ret), NULL, 0); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || + (row[DB_rev_date] == NULL) || (row[DB_file] == NULL) || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto err; } - BUF_strlcpy(row[DB_file], "unknown", 8); + + memcpy(row[DB_exp_date], tm->data, tm->length); + row[DB_exp_date][tm->length] = '\0'; + row[DB_rev_date][0] = '\0'; + strcpy(row[DB_file], "unknown"); row[DB_type][0] = 'V'; row[DB_type][1] = '\0'; @@ -2307,6 +2305,7 @@ static int certify_spkac(X509 **xret, ch j = NETSCAPE_SPKI_verify(spki, pktmp); if (j <= 0) { + EVP_PKEY_free(pktmp); BIO_printf(bio_err, "signature verification failed on SPKAC public key\n"); goto err; Modified: head/crypto/openssl/apps/dgst.c ============================================================================== --- head/crypto/openssl/apps/dgst.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/dgst.c Thu Sep 22 13:27:44 2016 (r306193) @@ -243,6 +243,11 @@ int MAIN(int argc, char **argv) argv++; } + if (keyfile != NULL && argc > 1) { + BIO_printf(bio_err, "Can only sign or verify one file\n"); + goto end; + } + if (do_verify && !sigfile) { BIO_printf(bio_err, "No signature to verify: use the -signature option\n"); Modified: head/crypto/openssl/apps/enc.c ============================================================================== --- head/crypto/openssl/apps/enc.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/enc.c Thu Sep 22 13:27:44 2016 (r306193) @@ -509,7 +509,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "invalid hex salt value\n"); goto end; } - } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) + } else if (RAND_bytes(salt, sizeof salt) <= 0) goto end; /* * If -P option then don't bother writing Modified: head/crypto/openssl/apps/passwd.c ============================================================================== --- head/crypto/openssl/apps/passwd.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/passwd.c Thu Sep 22 13:27:44 2016 (r306193) @@ -416,7 +416,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 2) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 2) <= 0) goto err; (*salt_p)[0] = cov_2char[(*salt_p)[0] & 0x3f]; /* 6 bits */ (*salt_p)[1] = cov_2char[(*salt_p)[1] & 0x3f]; /* 6 bits */ @@ -437,7 +437,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 8) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 8) <= 0) goto err; for (i = 0; i < 8; i++) Modified: head/crypto/openssl/apps/pkcs12.c ============================================================================== --- head/crypto/openssl/apps/pkcs12.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/pkcs12.c Thu Sep 22 13:27:44 2016 (r306193) @@ -832,6 +832,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 EVP_PKEY *pkey; PKCS8_PRIV_KEY_INFO *p8; X509 *x509; + int ret = 0; switch (M_PKCS12_bag_type(bag)) { case NID_keyBag: @@ -844,7 +845,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(pkey = EVP_PKCS82PKEY(p8))) return 0; print_attribs(out, p8->attributes, "Key Attributes"); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -864,7 +865,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 } print_attribs(out, p8->attributes, "Key Attributes"); PKCS8_PRIV_KEY_INFO_free(p8); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -884,7 +885,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(x509 = PKCS12_certbag2x509(bag))) return 0; dump_cert_text(out, x509); - PEM_write_bio_X509(out, x509); + ret = PEM_write_bio_X509(out, x509); X509_free(x509); break; @@ -902,7 +903,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 return 1; break; } - return 1; + return ret; } /* Given a single certificate return a verified chain or NULL if error */ @@ -931,16 +932,70 @@ static int get_cert_chain(X509 *cert, X5 int alg_print(BIO *x, X509_ALGOR *alg) { - PBEPARAM *pbe; - const unsigned char *p; - p = alg->parameter->value.sequence->data; - pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length); - if (!pbe) - return 1; - BIO_printf(bio_err, "%s, Iteration %ld\n", - OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)), - ASN1_INTEGER_get(pbe->iter)); - PBEPARAM_free(pbe); + int pbenid, aparamtype; + ASN1_OBJECT *aoid; + void *aparam; + PBEPARAM *pbe = NULL; + + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, alg); + + pbenid = OBJ_obj2nid(aoid); + + BIO_printf(x, "%s", OBJ_nid2ln(pbenid)); + + /* + * If PBE algorithm is PBES2 decode algorithm parameters + * for additional details. + */ + if (pbenid == NID_pbes2) { + PBE2PARAM *pbe2 = NULL; + int encnid; + if (aparamtype == V_ASN1_SEQUENCE) + pbe2 = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBE2PARAM)); + if (pbe2 == NULL) { + BIO_puts(x, ""); + goto done; + } + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, pbe2->keyfunc); + pbenid = OBJ_obj2nid(aoid); + X509_ALGOR_get0(&aoid, NULL, NULL, pbe2->encryption); + encnid = OBJ_obj2nid(aoid); + BIO_printf(x, ", %s, %s", OBJ_nid2ln(pbenid), + OBJ_nid2sn(encnid)); + /* If KDF is PBKDF2 decode parameters */ + if (pbenid == NID_id_pbkdf2) { + PBKDF2PARAM *kdf = NULL; + int prfnid; + if (aparamtype == V_ASN1_SEQUENCE) + kdf = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBKDF2PARAM)); + if (kdf == NULL) { + BIO_puts(x, ""); + goto done; + } + + if (kdf->prf == NULL) { + prfnid = NID_hmacWithSHA1; + } else { + X509_ALGOR_get0(&aoid, NULL, NULL, kdf->prf); + prfnid = OBJ_obj2nid(aoid); + } + BIO_printf(x, ", Iteration %ld, PRF %s", + ASN1_INTEGER_get(kdf->iter), OBJ_nid2sn(prfnid)); + PBKDF2PARAM_free(kdf); + } + PBE2PARAM_free(pbe2); + } else { + if (aparamtype == V_ASN1_SEQUENCE) + pbe = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBEPARAM)); + if (pbe == NULL) { + BIO_puts(x, ""); + goto done; + } + BIO_printf(x, ", Iteration %ld", ASN1_INTEGER_get(pbe->iter)); + PBEPARAM_free(pbe); + } + done: + BIO_puts(x, "\n"); return 1; } Modified: head/crypto/openssl/apps/req.c ============================================================================== --- head/crypto/openssl/apps/req.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/req.c Thu Sep 22 13:27:44 2016 (r306193) @@ -332,9 +332,10 @@ int MAIN(int argc, char **argv) subject = 1; else if (strcmp(*argv, "-text") == 0) text = 1; - else if (strcmp(*argv, "-x509") == 0) + else if (strcmp(*argv, "-x509") == 0) { + newreq = 1; x509 = 1; - else if (strcmp(*argv, "-asn1-kludge") == 0) + } else if (strcmp(*argv, "-asn1-kludge") == 0) kludge = 1; else if (strcmp(*argv, "-no-asn1-kludge") == 0) kludge = 0; @@ -756,7 +757,7 @@ int MAIN(int argc, char **argv) } } - if (newreq || x509) { + if (newreq) { if (pkey == NULL) { BIO_printf(bio_err, "you need to specify a private key\n"); goto end; @@ -1331,12 +1332,11 @@ static int auto_info(X509_REQ *req, STAC break; } #ifndef CHARSET_EBCDIC - if (*p == '+') + if (*type == '+') { #else - if (*p == os_toascii['+']) + if (*type == os_toascii['+']) { #endif - { - p++; + type++; mval = -1; } else mval = 0; Modified: head/crypto/openssl/apps/s_apps.h ============================================================================== --- head/crypto/openssl/apps/s_apps.h Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/s_apps.h Thu Sep 22 13:27:44 2016 (r306193) @@ -199,7 +199,8 @@ int load_excert(SSL_EXCERT **pexc, BIO * void print_ssl_summary(BIO *bio, SSL *s); #ifdef HEADER_SSL_H int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr); + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt); int args_ssl_call(SSL_CTX *ctx, BIO *err, SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, int no_ecdhe, int no_jpake); int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls, Modified: head/crypto/openssl/apps/s_cb.c ============================================================================== --- head/crypto/openssl/apps/s_cb.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/s_cb.c Thu Sep 22 13:27:44 2016 (r306193) @@ -1507,11 +1507,18 @@ void print_ssl_summary(BIO *bio, SSL *s) } int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr) + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt) { char *arg = **pargs, *argn = (*pargs)[1]; int rv; + if (strcmp(arg, "-no_ssl2") == 0 || strcmp(arg, "-no_ssl3") == 0 + || strcmp(arg, "-no_tls1") == 0 || strcmp(arg, "-no_tls1_1") == 0 + || strcmp(arg, "-no_tls1_2") == 0) { + *no_prot_opt = 1; + } + /* Attempt to run SSL configuration command */ rv = SSL_CONF_cmd_argv(cctx, pargc, pargs); /* If parameter not recognised just return */ Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Thu Sep 22 13:06:52 2016 (r306192) +++ head/crypto/openssl/apps/s_client.c Thu Sep 22 13:27:44 2016 (r306193) @@ -242,9 +242,9 @@ static unsigned int psk_client_cb(SSL *s unsigned char *psk, unsigned int max_psk_len) { - unsigned int psk_len = 0; int ret; - BIGNUM *bn = NULL; + long key_len; + unsigned char *key; if (c_debug) BIO_printf(bio_c_out, "psk_client_cb\n"); @@ -265,32 +265,29 @@ static unsigned int psk_client_cb(SSL *s if (c_debug) BIO_printf(bio_c_out, "created identity '%s' len=%d\n", identity, ret); - ret = BN_hex2bn(&bn, psk_key); - if (!ret) { - BIO_printf(bio_err, "Could not convert PSK key '%s' to BIGNUM\n", + + /* convert the PSK key to binary */ + key = string_to_hex(psk_key, &key_len); + if (key == NULL) { + BIO_printf(bio_err, "Could not convert PSK key '%s' to buffer\n", psk_key); - if (bn) - BN_free(bn); return 0; } - - if ((unsigned int)BN_num_bytes(bn) > max_psk_len) { + if ((unsigned long)key_len > (unsigned long)max_psk_len) { BIO_printf(bio_err, - "psk buffer of callback is too small (%d) for key (%d)\n", - max_psk_len, BN_num_bytes(bn)); - BN_free(bn); + "psk buffer of callback is too small (%d) for key (%ld)\n", + max_psk_len, key_len); + OPENSSL_free(key); return 0; } - psk_len = BN_bn2bin(bn, psk); - BN_free(bn); - if (psk_len == 0) - goto out_err; + memcpy(psk, key, key_len); + OPENSSL_free(key); if (c_debug) - BIO_printf(bio_c_out, "created PSK len=%d\n", psk_len); + BIO_printf(bio_c_out, "created PSK len=%ld\n", key_len); - return psk_len; + return key_len; out_err: if (c_debug) BIO_printf(bio_err, "Error in PSK client callback\n"); @@ -747,6 +744,7 @@ int MAIN(int argc, char **argv) int crl_format = FORMAT_PEM; int crl_download = 0; STACK_OF(X509_CRL) *crls = NULL; + int prot_opt = 0, no_prot_opt = 0; meth = SSLv23_client_method(); @@ -850,7 +848,8 @@ int MAIN(int argc, char **argv) if (badarg) goto bad; continue; - } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args)) { + } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args, + &no_prot_opt)) { if (badarg) goto bad; continue; @@ -942,31 +941,42 @@ int MAIN(int argc, char **argv) } #endif #ifndef OPENSSL_NO_SSL2 - else if (strcmp(*argv, "-ssl2") == 0) + else if (strcmp(*argv, "-ssl2") == 0) { meth = SSLv2_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_SSL3_METHOD - else if (strcmp(*argv, "-ssl3") == 0) + else if (strcmp(*argv, "-ssl3") == 0) { meth = SSLv3_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_TLS1 - else if (strcmp(*argv, "-tls1_2") == 0) + else if (strcmp(*argv, "-tls1_2") == 0) { meth = TLSv1_2_client_method(); - else if (strcmp(*argv, "-tls1_1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1_1") == 0) { meth = TLSv1_1_client_method(); - else if (strcmp(*argv, "-tls1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1") == 0) { meth = TLSv1_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_DTLS1 else if (strcmp(*argv, "-dtls") == 0) { meth = DTLS_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-dtls1") == 0) { meth = DTLSv1_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-dtls1_2") == 0) { meth = DTLSv1_2_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-timeout") == 0) enable_timeouts = 1; else if (strcmp(*argv, "-mtu") == 0) { @@ -1149,6 +1159,17 @@ int MAIN(int argc, char **argv) } #endif + if (prot_opt > 1) { + BIO_printf(bio_err, "Cannot supply multiple protocol flags\n"); + goto end; + } + + if (prot_opt == 1 && no_prot_opt) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 13:59:29 2016 Return-Path: Delivered-To: svn-src-all@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 06BA8BE5469; Thu, 22 Sep 2016 13:59:29 +0000 (UTC) (envelope-from gavin@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 C88F4E99; Thu, 22 Sep 2016 13:59:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MDxR3f028936; Thu, 22 Sep 2016 13:59:27 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MDxRhx028935; Thu, 22 Sep 2016 13:59:27 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201609221359.u8MDxRhx028935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 22 Sep 2016 13:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306194 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 13:59:29 -0000 Author: gavin Date: Thu Sep 22 13:59:27 2016 New Revision: 306194 URL: https://svnweb.freebsd.org/changeset/base/306194 Log: Whitespace commit (literally): Add a missing space. Sponsored by: EuroBSDCon 2016 Devsummit, Belgrade, Serbia. Modified: head/share/man/man9/owll.9 Modified: head/share/man/man9/owll.9 ============================================================================== --- head/share/man/man9/owll.9 Thu Sep 22 13:27:44 2016 (r306193) +++ head/share/man/man9/owll.9 Thu Sep 22 13:59:27 2016 (r306194) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2015 +.Dd September 22, 2016 .Dt OWLL 9 .Os .Sh NAME @@ -52,7 +52,7 @@ Semiconductor 1-Wire from upper layers o .Fn OWLL_WRITE_ONE and .Fn OWLL_WRITE_ZERO -writes a one bitor a zero bit respectively on the 1-Wire bus. +writes a one bit or a zero bit respectively on the 1-Wire bus. .Pp .Fn OWLL_READ_DATA reads one bit from the 1-Wire bus. From owner-svn-src-all@freebsd.org Thu Sep 22 14:34:12 2016 Return-Path: Delivered-To: svn-src-all@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 21337BE557E; Thu, 22 Sep 2016 14:34:12 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) (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 DB06917D; Thu, 22 Sep 2016 14:34:11 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sc1.bsdpad.com ([163.172.212.18]:41791) by ppsw-30.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bn54i-000Kpp-fl (Exim 4.86_36-e07b163) (return-path ); Thu, 22 Sep 2016 15:34:09 +0100 Date: Thu, 22 Sep 2016 14:34:12 +0000 From: Ruslan Bukin To: Mariusz Zaborski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys Message-ID: <20160922143412.GA69951@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201609220958.u8M9wkfh034759@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 14:34:12 -0000 Hi Mariusz my MIPS64EB kernel stops booting with this somewhere here: [...] Starting file system checks: /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946580 blocks, 0.0% fragmentation) Mounting local filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat random: unblocking device. any idea ? (should I rebuild something?) thanks! Ruslan On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: > Author: oshogbo > Date: Thu Sep 22 09:58:46 2016 > New Revision: 306174 > URL: https://svnweb.freebsd.org/changeset/base/306174 > > Log: > capsicum: propagate rights on accept(2) > > Descriptor returned by accept(2) should inherits capabilities rights from > the listening socket. > > PR: 201052 > Reviewed by: emaste, jonathan > Discussed with: many > Differential Revision: https://reviews.freebsd.org/D7724 > > Modified: > head/sys/compat/cloudabi/cloudabi_sock.c > head/sys/compat/linux/linux_socket.c > head/sys/kern/kern_sendfile.c > head/sys/kern/uipc_syscalls.c > head/sys/netinet/sctp_syscalls.c > head/sys/sys/socketvar.h > > Modified: head/sys/compat/cloudabi/cloudabi_sock.c > ============================================================================== > --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) > +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) > @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread > int error; > > error = getsock_cap(td, uap->sock, cap_rights_init(&rights, > - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); > + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); > if (error != 0) > return (error); > so = fp->f_data; > > Modified: head/sys/compat/linux/linux_socket.c > ============================================================================== > --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) > +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) > @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i > if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) > return (EINVAL); > if (error == EINVAL) { > - error1 = getsock_cap(td, s, &rights, &fp, NULL); > + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); > if (error1 != 0) > return (error1); > so = fp->f_data; > > Modified: head/sys/kern/kern_sendfile.c > ============================================================================== > --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) > +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) > @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int > * The socket must be a stream socket and connected. > */ > error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), > - sock_fp, NULL); > + sock_fp, NULL, NULL); > if (error != 0) > return (error); > *so = (*sock_fp)->f_data; > > Modified: head/sys/kern/uipc_syscalls.c > ============================================================================== > --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char > /* > * Convert a user file descriptor to a kernel file entry and check if required > * capability rights are present. > + * If required copy of current set of capability rights is returned. > * A reference on the file entry is held upon returning. > */ > int > getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > - struct file **fpp, u_int *fflagp) > + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) > { > struct file *fp; > int error; > > - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); > + error = fget_cap(td, fd, rightsp, &fp, havecapsp); > if (error != 0) > return (error); > if (fp->f_type != DTYPE_SOCKET) { > fdrop(fp, td); > + if (havecapsp != NULL) > + filecaps_free(havecapsp); > return (ENOTSOCK); > } > if (fflagp != NULL) > @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd > AUDIT_ARG_FD(fd); > AUDIT_ARG_SOCKADDR(td, dirfd, sa); > error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), > - &fp, NULL); > + &fp, NULL, NULL); > if (error != 0) > return (error); > so = fp->f_data; > @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis > > AUDIT_ARG_FD(uap->s); > error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), > - &fp, NULL); > + &fp, NULL, NULL); > if (error == 0) { > so = fp->f_data; > #ifdef MAC > @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s > struct file *headfp, *nfp = NULL; > struct sockaddr *sa = NULL; > struct socket *head, *so; > + struct filecaps fcaps; > cap_rights_t rights; > u_int fflag; > pid_t pgid; > @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s > > AUDIT_ARG_FD(s); > error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), > - &headfp, &fflag); > + &headfp, &fflag, &fcaps); > if (error != 0) > return (error); > head = headfp->f_data; > @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s > if (error != 0) > goto done; > #endif > - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); > + error = falloc_caps(td, &nfp, &fd, > + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); > if (error != 0) > goto done; > ACCEPT_LOCK(); > @@ -440,6 +445,8 @@ noconnection: > * a reference on nfp to the caller on success if they request it. > */ > done: > + if (nfp == NULL) > + filecaps_free(&fcaps); > if (fp != NULL) { > if (error == 0) { > *fp = nfp; > @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di > AUDIT_ARG_FD(fd); > AUDIT_ARG_SOCKADDR(td, dirfd, sa); > error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), > - &fp, NULL); > + &fp, NULL, NULL); > if (error != 0) > return (error); > so = fp->f_data; > @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st > AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); > cap_rights_set(&rights, CAP_CONNECT); > } > - error = getsock_cap(td, s, &rights, &fp, NULL); > + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); > if (error != 0) > return (error); > so = (struct socket *)fp->f_data; > @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st > > AUDIT_ARG_FD(s); > error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), > - &fp, NULL); > + &fp, NULL, NULL); > if (error != 0) > return (error); > so = fp->f_data; > @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s > > AUDIT_ARG_FD(uap->s); > error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), > - &fp, NULL); > + &fp, NULL, NULL); > if (error == 0) { > so = fp->f_data; > error = soshutdown(so, uap->how); > @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s > > AUDIT_ARG_FD(s); > error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), > - &fp, NULL); > + &fp, NULL, NULL); > if (error == 0) { > so = fp->f_data; > error = sosetopt(so, &sopt); > @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s > > AUDIT_ARG_FD(s); > error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), > - &fp, NULL); > + &fp, NULL, NULL); > if (error == 0) { > so = fp->f_data; > error = sogetopt(so, &sopt); > @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int > > AUDIT_ARG_FD(fd); > error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), > - &fp, NULL); > + &fp, NULL, NULL); > if (error != 0) > return (error); > so = fp->f_data; > @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int > > AUDIT_ARG_FD(fd); > error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), > - &fp, NULL); > + &fp, NULL, NULL); > if (error != 0) > return (error); > so = fp->f_data; > > Modified: head/sys/netinet/sctp_syscalls.c > ============================================================================== > --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) > } > > AUDIT_ARG_FD(uap->sd); > - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > if (error != 0) > goto sctp_bad; > #ifdef KTRACE > @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) > } > > AUDIT_ARG_FD(uap->sd); > - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > if (error != 0) > goto sctp_bad1; > > @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) > > AUDIT_ARG_FD(uap->sd); > error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), > - &fp, NULL); > + &fp, NULL, NULL); > if (error != 0) > return (error); > #ifdef COMPAT_FREEBSD32 > > Modified: head/sys/sys/socketvar.h > ============================================================================== > --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) > +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) > @@ -321,6 +321,7 @@ extern u_long sb_max; > extern so_gen_t so_gencnt; > > struct file; > +struct filecaps; > struct filedesc; > struct mbuf; > struct sockaddr; > @@ -340,7 +341,7 @@ struct uio; > */ > int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); > int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > - struct file **fpp, u_int *fflagp); > + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); > void soabort(struct socket *so); > int soaccept(struct socket *so, struct sockaddr **nam); > void soaio_enqueue(struct task *task); > From owner-svn-src-all@freebsd.org Thu Sep 22 14:39:19 2016 Return-Path: Delivered-To: svn-src-all@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 C26E6BE5A31; Thu, 22 Sep 2016 14:39:19 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (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 2D6FD78C; Thu, 22 Sep 2016 14:39:19 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by mail-lf0-x232.google.com with SMTP id b71so43398458lfg.0; Thu, 22 Sep 2016 07:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=JK/s6QhXSWdLPyW0YN4EdoHRCMumouYC8dWUPrscPlw=; b=0RVMYFUP+yQ/ZVkKjJI01jf/AYAePiM7PUs3jL6s1ajInGnPxUMoFAzmxNRU/gkO5t 1Kd3Vb6ia61Vx3wV7h21VtJvvQtxB1eF7BHeI8DeZKLQw42SProwIKB1P2vfZgW8oh7D 8tljabv2qq1ykcTrCRZQzcndVNRK0CzFL1MDXh3Hy6Y74W3QJGzvfnsKLpeeNXhvhXuq gIpgQ5V+Y+IG4lZz58tBZLXDO69fmmyD8iDlINwwKh9E1puAwccwBW+/QkjN4guL1j2K LZlERpg7/ifbaxZlATzP/pnaP4hc0mf7ec4X3j7Rhb81c0XLcjpXb3SK4xIOIr/VHSDQ MUIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=JK/s6QhXSWdLPyW0YN4EdoHRCMumouYC8dWUPrscPlw=; b=EcZVZMuzVuLtikCceUqsKNeAK3EOMD+mZsYH6EWYnrP7RQ0AJmnsI/1hhANvWhIhkn I4Ih1A4uZKOe/u+rWSAU/yfCblBfMXvYc5ahvHM+HtasfVMnbVWTZUb9uUyk5I90FobK 5kv++oOGLBm6+MhaSopaXyjsAbTYTXeUtZyPHqR6keVjOOhUVymjF8lU/akl8+0prCfo 51e5MYCXcuMm61fRYuSvV83t52ipIvdDpDQuakfsYmIEOSLj+CN9csRJMDse3BLTtQPs v31qFMoUI3ESTnu53ZhkPducwCYJxQRVIG2Te6ukGEXWyhBhSGj61Lvtdo/lmrer7fyI Kpuw== X-Gm-Message-State: AE9vXwOQH/03e30cikp7l9SN2xJGZolnWmM7WNLiBCs/+fD0mX4KbRj7bqT0Fq9BBrqY0zpVAFDbLJSZuvGY5w== X-Received: by 10.194.87.227 with SMTP id bb3mr2365167wjb.62.1474555156738; Thu, 22 Sep 2016 07:39:16 -0700 (PDT) MIME-Version: 1.0 Sender: oshogbo.vx@gmail.com Received: by 10.28.158.197 with HTTP; Thu, 22 Sep 2016 07:39:16 -0700 (PDT) In-Reply-To: <20160922143412.GA69951@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> <20160922143412.GA69951@bsdpad.com> From: Mariusz Zaborski Date: Thu, 22 Sep 2016 16:39:16 +0200 X-Google-Sender-Auth: 1WVOlGjF9-eGBXkDnnN9asparhE Message-ID: Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys To: Ruslan Bukin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 14:39:19 -0000 Hi Ruslan, Does it hang on some network script? Thanks, Mariusz On 22 September 2016 at 16:34, Ruslan Bukin wrote: > Hi Mariusz > > my MIPS64EB kernel stops booting with this > > somewhere here: > [...] > Starting file system checks: > /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946580 blocks, 0.0% fragmentation) > Mounting local filesystems:. > ELF ldconfig path: /lib /usr/lib /usr/lib/compat > random: unblocking device. > > any idea ? (should I rebuild something?) > > thanks! > > Ruslan > > On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: >> Author: oshogbo >> Date: Thu Sep 22 09:58:46 2016 >> New Revision: 306174 >> URL: https://svnweb.freebsd.org/changeset/base/306174 >> >> Log: >> capsicum: propagate rights on accept(2) >> >> Descriptor returned by accept(2) should inherits capabilities rights from >> the listening socket. >> >> PR: 201052 >> Reviewed by: emaste, jonathan >> Discussed with: many >> Differential Revision: https://reviews.freebsd.org/D7724 >> >> Modified: >> head/sys/compat/cloudabi/cloudabi_sock.c >> head/sys/compat/linux/linux_socket.c >> head/sys/kern/kern_sendfile.c >> head/sys/kern/uipc_syscalls.c >> head/sys/netinet/sctp_syscalls.c >> head/sys/sys/socketvar.h >> >> Modified: head/sys/compat/cloudabi/cloudabi_sock.c >> ============================================================================== >> --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) >> +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) >> @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread >> int error; >> >> error = getsock_cap(td, uap->sock, cap_rights_init(&rights, >> - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); >> + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); >> if (error != 0) >> return (error); >> so = fp->f_data; >> >> Modified: head/sys/compat/linux/linux_socket.c >> ============================================================================== >> --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) >> +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) >> @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i >> if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) >> return (EINVAL); >> if (error == EINVAL) { >> - error1 = getsock_cap(td, s, &rights, &fp, NULL); >> + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); >> if (error1 != 0) >> return (error1); >> so = fp->f_data; >> >> Modified: head/sys/kern/kern_sendfile.c >> ============================================================================== >> --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) >> +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) >> @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int >> * The socket must be a stream socket and connected. >> */ >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), >> - sock_fp, NULL); >> + sock_fp, NULL, NULL); >> if (error != 0) >> return (error); >> *so = (*sock_fp)->f_data; >> >> Modified: head/sys/kern/uipc_syscalls.c >> ============================================================================== >> --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) >> +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) >> @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char >> /* >> * Convert a user file descriptor to a kernel file entry and check if required >> * capability rights are present. >> + * If required copy of current set of capability rights is returned. >> * A reference on the file entry is held upon returning. >> */ >> int >> getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, >> - struct file **fpp, u_int *fflagp) >> + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) >> { >> struct file *fp; >> int error; >> >> - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); >> + error = fget_cap(td, fd, rightsp, &fp, havecapsp); >> if (error != 0) >> return (error); >> if (fp->f_type != DTYPE_SOCKET) { >> fdrop(fp, td); >> + if (havecapsp != NULL) >> + filecaps_free(havecapsp); >> return (ENOTSOCK); >> } >> if (fflagp != NULL) >> @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd >> AUDIT_ARG_FD(fd); >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error != 0) >> return (error); >> so = fp->f_data; >> @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis >> >> AUDIT_ARG_FD(uap->s); >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error == 0) { >> so = fp->f_data; >> #ifdef MAC >> @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s >> struct file *headfp, *nfp = NULL; >> struct sockaddr *sa = NULL; >> struct socket *head, *so; >> + struct filecaps fcaps; >> cap_rights_t rights; >> u_int fflag; >> pid_t pgid; >> @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s >> >> AUDIT_ARG_FD(s); >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), >> - &headfp, &fflag); >> + &headfp, &fflag, &fcaps); >> if (error != 0) >> return (error); >> head = headfp->f_data; >> @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s >> if (error != 0) >> goto done; >> #endif >> - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); >> + error = falloc_caps(td, &nfp, &fd, >> + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); >> if (error != 0) >> goto done; >> ACCEPT_LOCK(); >> @@ -440,6 +445,8 @@ noconnection: >> * a reference on nfp to the caller on success if they request it. >> */ >> done: >> + if (nfp == NULL) >> + filecaps_free(&fcaps); >> if (fp != NULL) { >> if (error == 0) { >> *fp = nfp; >> @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di >> AUDIT_ARG_FD(fd); >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error != 0) >> return (error); >> so = fp->f_data; >> @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st >> AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); >> cap_rights_set(&rights, CAP_CONNECT); >> } >> - error = getsock_cap(td, s, &rights, &fp, NULL); >> + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); >> if (error != 0) >> return (error); >> so = (struct socket *)fp->f_data; >> @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st >> >> AUDIT_ARG_FD(s); >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error != 0) >> return (error); >> so = fp->f_data; >> @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s >> >> AUDIT_ARG_FD(uap->s); >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error == 0) { >> so = fp->f_data; >> error = soshutdown(so, uap->how); >> @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s >> >> AUDIT_ARG_FD(s); >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error == 0) { >> so = fp->f_data; >> error = sosetopt(so, &sopt); >> @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s >> >> AUDIT_ARG_FD(s); >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error == 0) { >> so = fp->f_data; >> error = sogetopt(so, &sopt); >> @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int >> >> AUDIT_ARG_FD(fd); >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error != 0) >> return (error); >> so = fp->f_data; >> @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int >> >> AUDIT_ARG_FD(fd); >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error != 0) >> return (error); >> so = fp->f_data; >> >> Modified: head/sys/netinet/sctp_syscalls.c >> ============================================================================== >> --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) >> +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) >> @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) >> } >> >> AUDIT_ARG_FD(uap->sd); >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); >> if (error != 0) >> goto sctp_bad; >> #ifdef KTRACE >> @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) >> } >> >> AUDIT_ARG_FD(uap->sd); >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); >> if (error != 0) >> goto sctp_bad1; >> >> @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) >> >> AUDIT_ARG_FD(uap->sd); >> error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), >> - &fp, NULL); >> + &fp, NULL, NULL); >> if (error != 0) >> return (error); >> #ifdef COMPAT_FREEBSD32 >> >> Modified: head/sys/sys/socketvar.h >> ============================================================================== >> --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) >> +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) >> @@ -321,6 +321,7 @@ extern u_long sb_max; >> extern so_gen_t so_gencnt; >> >> struct file; >> +struct filecaps; >> struct filedesc; >> struct mbuf; >> struct sockaddr; >> @@ -340,7 +341,7 @@ struct uio; >> */ >> int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); >> int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, >> - struct file **fpp, u_int *fflagp); >> + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); >> void soabort(struct socket *so); >> int soaccept(struct socket *so, struct sockaddr **nam); >> void soaio_enqueue(struct task *task); >> From owner-svn-src-all@freebsd.org Thu Sep 22 14:56:23 2016 Return-Path: Delivered-To: svn-src-all@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 F3705BE5D1A; Thu, 22 Sep 2016 14:56:23 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) (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 AA743776; Thu, 22 Sep 2016 14:56:23 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sc1.bsdpad.com ([163.172.212.18]:16083) by ppsw-30.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bn5QD-000gwe-f5 (Exim 4.86_36-e07b163) (return-path ); Thu, 22 Sep 2016 15:56:21 +0100 Date: Thu, 22 Sep 2016 14:56:25 +0000 From: Ruslan Bukin To: Mariusz Zaborski Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys Message-ID: <20160922145625.GA70214@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> <20160922143412.GA69951@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 14:56:24 -0000 May be. The next line should be /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). but it hangs before this line Ruslan On Thu, Sep 22, 2016 at 04:39:16PM +0200, Mariusz Zaborski wrote: > Hi Ruslan, > > Does it hang on some network script? > > Thanks, > Mariusz > > > On 22 September 2016 at 16:34, Ruslan Bukin wrote: > > Hi Mariusz > > > > my MIPS64EB kernel stops booting with this > > > > somewhere here: > > [...] > > Starting file system checks: > > /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946580 blocks, 0.0% fragmentation) > > Mounting local filesystems:. > > ELF ldconfig path: /lib /usr/lib /usr/lib/compat > > random: unblocking device. > > > > any idea ? (should I rebuild something?) > > > > thanks! > > > > Ruslan > > > > On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: > >> Author: oshogbo > >> Date: Thu Sep 22 09:58:46 2016 > >> New Revision: 306174 > >> URL: https://svnweb.freebsd.org/changeset/base/306174 > >> > >> Log: > >> capsicum: propagate rights on accept(2) > >> > >> Descriptor returned by accept(2) should inherits capabilities rights from > >> the listening socket. > >> > >> PR: 201052 > >> Reviewed by: emaste, jonathan > >> Discussed with: many > >> Differential Revision: https://reviews.freebsd.org/D7724 > >> > >> Modified: > >> head/sys/compat/cloudabi/cloudabi_sock.c > >> head/sys/compat/linux/linux_socket.c > >> head/sys/kern/kern_sendfile.c > >> head/sys/kern/uipc_syscalls.c > >> head/sys/netinet/sctp_syscalls.c > >> head/sys/sys/socketvar.h > >> > >> Modified: head/sys/compat/cloudabi/cloudabi_sock.c > >> ============================================================================== > >> --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) > >> +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) > >> @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread > >> int error; > >> > >> error = getsock_cap(td, uap->sock, cap_rights_init(&rights, > >> - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); > >> + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> so = fp->f_data; > >> > >> Modified: head/sys/compat/linux/linux_socket.c > >> ============================================================================== > >> --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) > >> +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) > >> @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i > >> if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) > >> return (EINVAL); > >> if (error == EINVAL) { > >> - error1 = getsock_cap(td, s, &rights, &fp, NULL); > >> + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); > >> if (error1 != 0) > >> return (error1); > >> so = fp->f_data; > >> > >> Modified: head/sys/kern/kern_sendfile.c > >> ============================================================================== > >> --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) > >> +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) > >> @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int > >> * The socket must be a stream socket and connected. > >> */ > >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), > >> - sock_fp, NULL); > >> + sock_fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> *so = (*sock_fp)->f_data; > >> > >> Modified: head/sys/kern/uipc_syscalls.c > >> ============================================================================== > >> --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > >> +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > >> @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char > >> /* > >> * Convert a user file descriptor to a kernel file entry and check if required > >> * capability rights are present. > >> + * If required copy of current set of capability rights is returned. > >> * A reference on the file entry is held upon returning. > >> */ > >> int > >> getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > >> - struct file **fpp, u_int *fflagp) > >> + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) > >> { > >> struct file *fp; > >> int error; > >> > >> - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); > >> + error = fget_cap(td, fd, rightsp, &fp, havecapsp); > >> if (error != 0) > >> return (error); > >> if (fp->f_type != DTYPE_SOCKET) { > >> fdrop(fp, td); > >> + if (havecapsp != NULL) > >> + filecaps_free(havecapsp); > >> return (ENOTSOCK); > >> } > >> if (fflagp != NULL) > >> @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd > >> AUDIT_ARG_FD(fd); > >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> so = fp->f_data; > >> @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis > >> > >> AUDIT_ARG_FD(uap->s); > >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error == 0) { > >> so = fp->f_data; > >> #ifdef MAC > >> @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s > >> struct file *headfp, *nfp = NULL; > >> struct sockaddr *sa = NULL; > >> struct socket *head, *so; > >> + struct filecaps fcaps; > >> cap_rights_t rights; > >> u_int fflag; > >> pid_t pgid; > >> @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s > >> > >> AUDIT_ARG_FD(s); > >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), > >> - &headfp, &fflag); > >> + &headfp, &fflag, &fcaps); > >> if (error != 0) > >> return (error); > >> head = headfp->f_data; > >> @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s > >> if (error != 0) > >> goto done; > >> #endif > >> - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); > >> + error = falloc_caps(td, &nfp, &fd, > >> + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); > >> if (error != 0) > >> goto done; > >> ACCEPT_LOCK(); > >> @@ -440,6 +445,8 @@ noconnection: > >> * a reference on nfp to the caller on success if they request it. > >> */ > >> done: > >> + if (nfp == NULL) > >> + filecaps_free(&fcaps); > >> if (fp != NULL) { > >> if (error == 0) { > >> *fp = nfp; > >> @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di > >> AUDIT_ARG_FD(fd); > >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> so = fp->f_data; > >> @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st > >> AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); > >> cap_rights_set(&rights, CAP_CONNECT); > >> } > >> - error = getsock_cap(td, s, &rights, &fp, NULL); > >> + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> so = (struct socket *)fp->f_data; > >> @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st > >> > >> AUDIT_ARG_FD(s); > >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> so = fp->f_data; > >> @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s > >> > >> AUDIT_ARG_FD(uap->s); > >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error == 0) { > >> so = fp->f_data; > >> error = soshutdown(so, uap->how); > >> @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s > >> > >> AUDIT_ARG_FD(s); > >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error == 0) { > >> so = fp->f_data; > >> error = sosetopt(so, &sopt); > >> @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s > >> > >> AUDIT_ARG_FD(s); > >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error == 0) { > >> so = fp->f_data; > >> error = sogetopt(so, &sopt); > >> @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int > >> > >> AUDIT_ARG_FD(fd); > >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> so = fp->f_data; > >> @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int > >> > >> AUDIT_ARG_FD(fd); > >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> so = fp->f_data; > >> > >> Modified: head/sys/netinet/sctp_syscalls.c > >> ============================================================================== > >> --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > >> +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > >> @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) > >> } > >> > >> AUDIT_ARG_FD(uap->sd); > >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > >> if (error != 0) > >> goto sctp_bad; > >> #ifdef KTRACE > >> @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) > >> } > >> > >> AUDIT_ARG_FD(uap->sd); > >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > >> if (error != 0) > >> goto sctp_bad1; > >> > >> @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) > >> > >> AUDIT_ARG_FD(uap->sd); > >> error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), > >> - &fp, NULL); > >> + &fp, NULL, NULL); > >> if (error != 0) > >> return (error); > >> #ifdef COMPAT_FREEBSD32 > >> > >> Modified: head/sys/sys/socketvar.h > >> ============================================================================== > >> --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) > >> +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) > >> @@ -321,6 +321,7 @@ extern u_long sb_max; > >> extern so_gen_t so_gencnt; > >> > >> struct file; > >> +struct filecaps; > >> struct filedesc; > >> struct mbuf; > >> struct sockaddr; > >> @@ -340,7 +341,7 @@ struct uio; > >> */ > >> int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); > >> int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > >> - struct file **fpp, u_int *fflagp); > >> + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); > >> void soabort(struct socket *so); > >> int soaccept(struct socket *so, struct sockaddr **nam); > >> void soaio_enqueue(struct task *task); > >> From owner-svn-src-all@freebsd.org Thu Sep 22 14:57:52 2016 Return-Path: Delivered-To: svn-src-all@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 8AB50BE5F87; Thu, 22 Sep 2016 14:57:52 +0000 (UTC) (envelope-from jkim@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 29D49989; Thu, 22 Sep 2016 14:57:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MEvpjZ052589; Thu, 22 Sep 2016 14:57:51 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MEvndR052567; Thu, 22 Sep 2016 14:57:49 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221457.u8MEvndR052567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 14:57: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: r306195 - in stable/11: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 14:57:52 -0000 Author: jkim Date: Thu Sep 22 14:57:48 2016 New Revision: 306195 URL: https://svnweb.freebsd.org/changeset/base/306195 Log: MFC: r306193 Merge OpenSSL 1.0.2u. Added: stable/11/crypto/openssl/doc/crypto/d2i_PrivateKey.pod - copied unchanged from r306193, head/crypto/openssl/doc/crypto/d2i_PrivateKey.pod stable/11/crypto/openssl/ssl/bad_dtls_test.c - copied unchanged from r306193, head/crypto/openssl/ssl/bad_dtls_test.c stable/11/crypto/openssl/ssl/dtlstest.c - copied unchanged from r306193, head/crypto/openssl/ssl/dtlstest.c stable/11/secure/lib/libcrypto/man/d2i_PrivateKey.3 - copied unchanged from r306193, head/secure/lib/libcrypto/man/d2i_PrivateKey.3 Modified: stable/11/crypto/openssl/CHANGES stable/11/crypto/openssl/CONTRIBUTING stable/11/crypto/openssl/Configure stable/11/crypto/openssl/Makefile stable/11/crypto/openssl/Makefile.org stable/11/crypto/openssl/Makefile.shared stable/11/crypto/openssl/NEWS stable/11/crypto/openssl/README stable/11/crypto/openssl/apps/CA.pl stable/11/crypto/openssl/apps/CA.pl.in stable/11/crypto/openssl/apps/apps.c stable/11/crypto/openssl/apps/apps.h stable/11/crypto/openssl/apps/ca.c stable/11/crypto/openssl/apps/dgst.c stable/11/crypto/openssl/apps/enc.c stable/11/crypto/openssl/apps/passwd.c stable/11/crypto/openssl/apps/pkcs12.c stable/11/crypto/openssl/apps/req.c stable/11/crypto/openssl/apps/s_apps.h stable/11/crypto/openssl/apps/s_cb.c stable/11/crypto/openssl/apps/s_client.c stable/11/crypto/openssl/apps/s_server.c stable/11/crypto/openssl/apps/speed.c stable/11/crypto/openssl/apps/srp.c stable/11/crypto/openssl/apps/verify.c stable/11/crypto/openssl/apps/x509.c stable/11/crypto/openssl/crypto/LPdir_unix.c stable/11/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl stable/11/crypto/openssl/crypto/asn1/a_bytes.c stable/11/crypto/openssl/crypto/asn1/a_object.c stable/11/crypto/openssl/crypto/asn1/a_set.c stable/11/crypto/openssl/crypto/asn1/a_strex.c stable/11/crypto/openssl/crypto/asn1/a_strnid.c stable/11/crypto/openssl/crypto/asn1/ameth_lib.c stable/11/crypto/openssl/crypto/asn1/asn1_lib.c stable/11/crypto/openssl/crypto/asn1/asn_mime.c stable/11/crypto/openssl/crypto/asn1/bio_asn1.c stable/11/crypto/openssl/crypto/asn1/bio_ndef.c stable/11/crypto/openssl/crypto/asn1/charmap.pl stable/11/crypto/openssl/crypto/asn1/d2i_pr.c stable/11/crypto/openssl/crypto/asn1/f_enum.c stable/11/crypto/openssl/crypto/asn1/f_int.c stable/11/crypto/openssl/crypto/asn1/f_string.c stable/11/crypto/openssl/crypto/asn1/i2d_pr.c stable/11/crypto/openssl/crypto/asn1/p5_pbe.c stable/11/crypto/openssl/crypto/asn1/p5_pbev2.c stable/11/crypto/openssl/crypto/asn1/t_req.c stable/11/crypto/openssl/crypto/asn1/tasn_dec.c stable/11/crypto/openssl/crypto/asn1/tasn_enc.c stable/11/crypto/openssl/crypto/asn1/tasn_prn.c stable/11/crypto/openssl/crypto/asn1/tasn_utl.c stable/11/crypto/openssl/crypto/asn1/x_bignum.c stable/11/crypto/openssl/crypto/asn1/x_name.c stable/11/crypto/openssl/crypto/asn1/x_x509.c stable/11/crypto/openssl/crypto/bio/b_print.c stable/11/crypto/openssl/crypto/bio/bf_nbio.c stable/11/crypto/openssl/crypto/bio/bio.h stable/11/crypto/openssl/crypto/bio/bss_bio.c stable/11/crypto/openssl/crypto/bio/bss_file.c stable/11/crypto/openssl/crypto/bio/bss_rtcp.c stable/11/crypto/openssl/crypto/bn/asm/x86-mont.pl stable/11/crypto/openssl/crypto/bn/asm/x86_64-gcc.c stable/11/crypto/openssl/crypto/bn/asm/x86_64-mont.pl stable/11/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl stable/11/crypto/openssl/crypto/bn/bn.h stable/11/crypto/openssl/crypto/bn/bn_div.c stable/11/crypto/openssl/crypto/bn/bn_lib.c stable/11/crypto/openssl/crypto/bn/bn_print.c stable/11/crypto/openssl/crypto/bn/bn_rand.c stable/11/crypto/openssl/crypto/bn/bn_word.c stable/11/crypto/openssl/crypto/bn/bntest.c stable/11/crypto/openssl/crypto/cms/cms_enc.c stable/11/crypto/openssl/crypto/cms/cms_ess.c stable/11/crypto/openssl/crypto/cms/cms_lib.c stable/11/crypto/openssl/crypto/cms/cms_pwri.c stable/11/crypto/openssl/crypto/comp/comp.h stable/11/crypto/openssl/crypto/conf/conf_def.h stable/11/crypto/openssl/crypto/conf/conf_mod.c stable/11/crypto/openssl/crypto/conf/keysets.pl stable/11/crypto/openssl/crypto/des/asm/dest4-sparcv9.pl stable/11/crypto/openssl/crypto/des/des.c stable/11/crypto/openssl/crypto/des/enc_writ.c stable/11/crypto/openssl/crypto/dh/dh_ameth.c stable/11/crypto/openssl/crypto/dsa/dsa_ameth.c stable/11/crypto/openssl/crypto/dsa/dsa_gen.c stable/11/crypto/openssl/crypto/dsa/dsa_ossl.c stable/11/crypto/openssl/crypto/ec/Makefile stable/11/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl stable/11/crypto/openssl/crypto/ec/ec_ameth.c stable/11/crypto/openssl/crypto/ec/ec_key.c stable/11/crypto/openssl/crypto/ec/ecp_nistz256.c stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c stable/11/crypto/openssl/crypto/evp/bio_enc.c stable/11/crypto/openssl/crypto/evp/bio_ok.c stable/11/crypto/openssl/crypto/evp/c_all.c stable/11/crypto/openssl/crypto/evp/digest.c stable/11/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c stable/11/crypto/openssl/crypto/evp/e_seed.c stable/11/crypto/openssl/crypto/evp/evp_enc.c stable/11/crypto/openssl/crypto/evp/evp_test.c stable/11/crypto/openssl/crypto/evp/openbsd_hw.c stable/11/crypto/openssl/crypto/evp/p_lib.c stable/11/crypto/openssl/crypto/evp/pmeth_gn.c stable/11/crypto/openssl/crypto/evp/pmeth_lib.c stable/11/crypto/openssl/crypto/hmac/hmac.c stable/11/crypto/openssl/crypto/jpake/jpake.c stable/11/crypto/openssl/crypto/lhash/lhash.c stable/11/crypto/openssl/crypto/md2/md2_dgst.c stable/11/crypto/openssl/crypto/md32_common.h stable/11/crypto/openssl/crypto/mdc2/mdc2dgst.c stable/11/crypto/openssl/crypto/mem.c stable/11/crypto/openssl/crypto/mem_clr.c stable/11/crypto/openssl/crypto/modes/asm/ghash-sparcv9.pl stable/11/crypto/openssl/crypto/o_init.c stable/11/crypto/openssl/crypto/o_time.c stable/11/crypto/openssl/crypto/objects/o_names.c stable/11/crypto/openssl/crypto/ocsp/ocsp_cl.c stable/11/crypto/openssl/crypto/ocsp/ocsp_ext.c stable/11/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/11/crypto/openssl/crypto/opensslv.h stable/11/crypto/openssl/crypto/ossl_typ.h stable/11/crypto/openssl/crypto/pem/pem.h stable/11/crypto/openssl/crypto/pem/pem_err.c stable/11/crypto/openssl/crypto/pem/pem_lib.c stable/11/crypto/openssl/crypto/pem/pvkfmt.c stable/11/crypto/openssl/crypto/perlasm/sparcv9_modes.pl stable/11/crypto/openssl/crypto/pkcs12/p12_mutl.c stable/11/crypto/openssl/crypto/pkcs12/p12_npas.c stable/11/crypto/openssl/crypto/pkcs12/p12_utl.c stable/11/crypto/openssl/crypto/pkcs12/pkcs12.h stable/11/crypto/openssl/crypto/pkcs7/pk7_doit.c stable/11/crypto/openssl/crypto/rand/md_rand.c stable/11/crypto/openssl/crypto/rand/rand_unix.c stable/11/crypto/openssl/crypto/rand/randfile.c stable/11/crypto/openssl/crypto/rsa/rsa_ameth.c stable/11/crypto/openssl/crypto/rsa/rsa_chk.c stable/11/crypto/openssl/crypto/rsa/rsa_lib.c stable/11/crypto/openssl/crypto/rsa/rsa_pmeth.c stable/11/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl stable/11/crypto/openssl/crypto/sparccpuid.S stable/11/crypto/openssl/crypto/srp/srp_lib.c stable/11/crypto/openssl/crypto/srp/srp_vfy.c stable/11/crypto/openssl/crypto/ts/ts.h stable/11/crypto/openssl/crypto/ts/ts_lib.c stable/11/crypto/openssl/crypto/ts/ts_rsp_verify.c stable/11/crypto/openssl/crypto/ui/ui_lib.c stable/11/crypto/openssl/crypto/whrlpool/wp_dgst.c stable/11/crypto/openssl/crypto/x509/by_dir.c stable/11/crypto/openssl/crypto/x509/x509.h stable/11/crypto/openssl/crypto/x509/x509_att.c stable/11/crypto/openssl/crypto/x509/x509_err.c stable/11/crypto/openssl/crypto/x509/x509_obj.c stable/11/crypto/openssl/crypto/x509/x509_r2x.c stable/11/crypto/openssl/crypto/x509/x509_txt.c stable/11/crypto/openssl/crypto/x509/x509_vfy.c stable/11/crypto/openssl/crypto/x509/x509_vfy.h stable/11/crypto/openssl/crypto/x509/x509spki.c stable/11/crypto/openssl/crypto/x509v3/v3_addr.c stable/11/crypto/openssl/crypto/x509v3/v3_alt.c stable/11/crypto/openssl/crypto/x509v3/v3_conf.c stable/11/crypto/openssl/doc/apps/cms.pod stable/11/crypto/openssl/doc/apps/s_client.pod stable/11/crypto/openssl/doc/apps/s_server.pod stable/11/crypto/openssl/doc/apps/smime.pod stable/11/crypto/openssl/doc/apps/verify.pod stable/11/crypto/openssl/doc/apps/x509.pod stable/11/crypto/openssl/doc/apps/x509v3_config.pod stable/11/crypto/openssl/doc/crypto/BIO_s_bio.pod stable/11/crypto/openssl/doc/crypto/BN_bn2bin.pod stable/11/crypto/openssl/doc/crypto/BN_rand.pod stable/11/crypto/openssl/doc/crypto/EVP_EncryptInit.pod stable/11/crypto/openssl/doc/crypto/EVP_PKEY_cmp.pod stable/11/crypto/openssl/doc/crypto/OBJ_nid2obj.pod stable/11/crypto/openssl/doc/crypto/OPENSSL_config.pod stable/11/crypto/openssl/doc/crypto/OPENSSL_ia32cap.pod stable/11/crypto/openssl/doc/crypto/X509_verify_cert.pod stable/11/crypto/openssl/doc/crypto/d2i_X509.pod stable/11/crypto/openssl/doc/crypto/hmac.pod stable/11/crypto/openssl/doc/crypto/rand.pod stable/11/crypto/openssl/doc/crypto/ui.pod stable/11/crypto/openssl/engines/ccgost/gost2001.c stable/11/crypto/openssl/engines/ccgost/gost2001_keyx.c stable/11/crypto/openssl/engines/ccgost/gost94_keyx.c stable/11/crypto/openssl/engines/ccgost/gost_ameth.c stable/11/crypto/openssl/engines/ccgost/gost_pmeth.c stable/11/crypto/openssl/engines/e_4758cca.c stable/11/crypto/openssl/engines/e_aep.c stable/11/crypto/openssl/engines/e_capi.c stable/11/crypto/openssl/engines/e_chil.c stable/11/crypto/openssl/ssl/Makefile stable/11/crypto/openssl/ssl/d1_both.c stable/11/crypto/openssl/ssl/d1_clnt.c stable/11/crypto/openssl/ssl/d1_lib.c stable/11/crypto/openssl/ssl/d1_pkt.c stable/11/crypto/openssl/ssl/d1_srvr.c stable/11/crypto/openssl/ssl/s23_clnt.c stable/11/crypto/openssl/ssl/s2_clnt.c stable/11/crypto/openssl/ssl/s2_srvr.c stable/11/crypto/openssl/ssl/s3_both.c stable/11/crypto/openssl/ssl/s3_clnt.c stable/11/crypto/openssl/ssl/s3_enc.c stable/11/crypto/openssl/ssl/s3_lib.c stable/11/crypto/openssl/ssl/s3_pkt.c stable/11/crypto/openssl/ssl/s3_srvr.c stable/11/crypto/openssl/ssl/ssl.h stable/11/crypto/openssl/ssl/ssl_asn1.c stable/11/crypto/openssl/ssl/ssl_ciph.c stable/11/crypto/openssl/ssl/ssl_err.c stable/11/crypto/openssl/ssl/ssl_lib.c stable/11/crypto/openssl/ssl/ssl_locl.h stable/11/crypto/openssl/ssl/ssl_rsa.c stable/11/crypto/openssl/ssl/ssl_sess.c stable/11/crypto/openssl/ssl/ssltest.c stable/11/crypto/openssl/ssl/sslv2conftest.c stable/11/crypto/openssl/ssl/t1_enc.c stable/11/crypto/openssl/ssl/t1_lib.c stable/11/crypto/openssl/util/mk1mf.pl stable/11/crypto/openssl/util/mkerr.pl stable/11/crypto/openssl/util/ssleay.num stable/11/secure/lib/libcrypto/Makefile.inc stable/11/secure/lib/libcrypto/Makefile.man stable/11/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S stable/11/secure/lib/libcrypto/amd64/sha1-x86_64.S stable/11/secure/lib/libcrypto/amd64/x86_64-mont.S stable/11/secure/lib/libcrypto/amd64/x86_64-mont5.S stable/11/secure/lib/libcrypto/arm/bsaes-armv7.S stable/11/secure/lib/libcrypto/i386/x86-mont.S stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/11/secure/lib/libcrypto/man/BIO_f_md.3 stable/11/secure/lib/libcrypto/man/BIO_f_null.3 stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/11/secure/lib/libcrypto/man/BIO_find_type.3 stable/11/secure/lib/libcrypto/man/BIO_new.3 stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/11/secure/lib/libcrypto/man/BIO_push.3 stable/11/secure/lib/libcrypto/man/BIO_read.3 stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 stable/11/secure/lib/libcrypto/man/BIO_s_file.3 stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 stable/11/secure/lib/libcrypto/man/BIO_s_null.3 stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 stable/11/secure/lib/libcrypto/man/BN_add.3 stable/11/secure/lib/libcrypto/man/BN_add_word.3 stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 stable/11/secure/lib/libcrypto/man/BN_cmp.3 stable/11/secure/lib/libcrypto/man/BN_copy.3 stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/11/secure/lib/libcrypto/man/BN_new.3 stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 stable/11/secure/lib/libcrypto/man/BN_rand.3 stable/11/secure/lib/libcrypto/man/BN_set_bit.3 stable/11/secure/lib/libcrypto/man/BN_swap.3 stable/11/secure/lib/libcrypto/man/BN_zero.3 stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/11/secure/lib/libcrypto/man/CMS_compress.3 stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 stable/11/secure/lib/libcrypto/man/CMS_final.3 stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/11/secure/lib/libcrypto/man/CMS_sign.3 stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 stable/11/secure/lib/libcrypto/man/CMS_verify.3 stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/11/secure/lib/libcrypto/man/DH_generate_key.3 stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DH_new.3 stable/11/secure/lib/libcrypto/man/DH_set_method.3 stable/11/secure/lib/libcrypto/man/DH_size.3 stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DSA_new.3 stable/11/secure/lib/libcrypto/man/DSA_set_method.3 stable/11/secure/lib/libcrypto/man/DSA_sign.3 stable/11/secure/lib/libcrypto/man/DSA_size.3 stable/11/secure/lib/libcrypto/man/EC_GFp_simple_method.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_copy.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_new.3 stable/11/secure/lib/libcrypto/man/EC_KEY_new.3 stable/11/secure/lib/libcrypto/man/EC_POINT_add.3 stable/11/secure/lib/libcrypto/man/EC_POINT_new.3 stable/11/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/11/secure/lib/libcrypto/man/ERR_clear_error.3 stable/11/secure/lib/libcrypto/man/ERR_error_string.3 stable/11/secure/lib/libcrypto/man/ERR_get_error.3 stable/11/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/11/secure/lib/libcrypto/man/ERR_load_strings.3 stable/11/secure/lib/libcrypto/man/ERR_print_errors.3 stable/11/secure/lib/libcrypto/man/ERR_put_error.3 stable/11/secure/lib/libcrypto/man/ERR_remove_state.3 stable/11/secure/lib/libcrypto/man/ERR_set_mark.3 stable/11/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/11/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncodeInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/11/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/11/secure/lib/libcrypto/man/EVP_SealInit.3 stable/11/secure/lib/libcrypto/man/EVP_SignInit.3 stable/11/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/11/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/11/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/11/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/11/secure/lib/libcrypto/man/OPENSSL_config.3 stable/11/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/11/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 stable/11/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/11/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/11/secure/lib/libcrypto/man/PKCS12_create.3 stable/11/secure/lib/libcrypto/man/PKCS12_parse.3 stable/11/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/11/secure/lib/libcrypto/man/PKCS7_verify.3 stable/11/secure/lib/libcrypto/man/RAND_add.3 stable/11/secure/lib/libcrypto/man/RAND_bytes.3 stable/11/secure/lib/libcrypto/man/RAND_cleanup.3 stable/11/secure/lib/libcrypto/man/RAND_egd.3 stable/11/secure/lib/libcrypto/man/RAND_load_file.3 stable/11/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/11/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/11/secure/lib/libcrypto/man/RSA_check_key.3 stable/11/secure/lib/libcrypto/man/RSA_generate_key.3 stable/11/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/RSA_new.3 stable/11/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/11/secure/lib/libcrypto/man/RSA_print.3 stable/11/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_set_method.3 stable/11/secure/lib/libcrypto/man/RSA_sign.3 stable/11/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/11/secure/lib/libcrypto/man/RSA_size.3 stable/11/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/11/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/11/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/11/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/11/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/11/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/11/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/11/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/11/secure/lib/libcrypto/man/X509_check_host.3 stable/11/secure/lib/libcrypto/man/X509_new.3 stable/11/secure/lib/libcrypto/man/X509_verify_cert.3 stable/11/secure/lib/libcrypto/man/bio.3 stable/11/secure/lib/libcrypto/man/blowfish.3 stable/11/secure/lib/libcrypto/man/bn.3 stable/11/secure/lib/libcrypto/man/bn_internal.3 stable/11/secure/lib/libcrypto/man/buffer.3 stable/11/secure/lib/libcrypto/man/crypto.3 stable/11/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/11/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 stable/11/secure/lib/libcrypto/man/d2i_DHparams.3 stable/11/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_ECPKParameters.3 stable/11/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_X509.3 stable/11/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/11/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/11/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/11/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/11/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/11/secure/lib/libcrypto/man/des.3 stable/11/secure/lib/libcrypto/man/dh.3 stable/11/secure/lib/libcrypto/man/dsa.3 stable/11/secure/lib/libcrypto/man/ec.3 stable/11/secure/lib/libcrypto/man/ecdsa.3 stable/11/secure/lib/libcrypto/man/engine.3 stable/11/secure/lib/libcrypto/man/err.3 stable/11/secure/lib/libcrypto/man/evp.3 stable/11/secure/lib/libcrypto/man/hmac.3 stable/11/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/11/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/11/secure/lib/libcrypto/man/lh_stats.3 stable/11/secure/lib/libcrypto/man/lhash.3 stable/11/secure/lib/libcrypto/man/md5.3 stable/11/secure/lib/libcrypto/man/mdc2.3 stable/11/secure/lib/libcrypto/man/pem.3 stable/11/secure/lib/libcrypto/man/rand.3 stable/11/secure/lib/libcrypto/man/rc4.3 stable/11/secure/lib/libcrypto/man/ripemd.3 stable/11/secure/lib/libcrypto/man/rsa.3 stable/11/secure/lib/libcrypto/man/sha.3 stable/11/secure/lib/libcrypto/man/threads.3 stable/11/secure/lib/libcrypto/man/ui.3 stable/11/secure/lib/libcrypto/man/ui_compat.3 stable/11/secure/lib/libcrypto/man/x509.3 stable/11/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/11/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 stable/11/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/11/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/11/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_free.3 stable/11/secure/lib/libssl/man/SSL_CTX_get0_param.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/11/secure/lib/libssl/man/SSL_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_curves.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 stable/11/secure/lib/libssl/man/SSL_SESSION_free.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/11/secure/lib/libssl/man/SSL_accept.3 stable/11/secure/lib/libssl/man/SSL_alert_type_string.3 stable/11/secure/lib/libssl/man/SSL_check_chain.3 stable/11/secure/lib/libssl/man/SSL_clear.3 stable/11/secure/lib/libssl/man/SSL_connect.3 stable/11/secure/lib/libssl/man/SSL_do_handshake.3 stable/11/secure/lib/libssl/man/SSL_free.3 stable/11/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/11/secure/lib/libssl/man/SSL_get_ciphers.3 stable/11/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/11/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/11/secure/lib/libssl/man/SSL_get_error.3 stable/11/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/11/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_get_fd.3 stable/11/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/11/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/11/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/11/secure/lib/libssl/man/SSL_get_rbio.3 stable/11/secure/lib/libssl/man/SSL_get_session.3 stable/11/secure/lib/libssl/man/SSL_get_verify_result.3 stable/11/secure/lib/libssl/man/SSL_get_version.3 stable/11/secure/lib/libssl/man/SSL_library_init.3 stable/11/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/11/secure/lib/libssl/man/SSL_new.3 stable/11/secure/lib/libssl/man/SSL_pending.3 stable/11/secure/lib/libssl/man/SSL_read.3 stable/11/secure/lib/libssl/man/SSL_rstate_string.3 stable/11/secure/lib/libssl/man/SSL_session_reused.3 stable/11/secure/lib/libssl/man/SSL_set_bio.3 stable/11/secure/lib/libssl/man/SSL_set_connect_state.3 stable/11/secure/lib/libssl/man/SSL_set_fd.3 stable/11/secure/lib/libssl/man/SSL_set_session.3 stable/11/secure/lib/libssl/man/SSL_set_shutdown.3 stable/11/secure/lib/libssl/man/SSL_set_verify_result.3 stable/11/secure/lib/libssl/man/SSL_shutdown.3 stable/11/secure/lib/libssl/man/SSL_state_string.3 stable/11/secure/lib/libssl/man/SSL_want.3 stable/11/secure/lib/libssl/man/SSL_write.3 stable/11/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/11/secure/lib/libssl/man/ssl.3 stable/11/secure/usr.bin/openssl/man/CA.pl.1 stable/11/secure/usr.bin/openssl/man/asn1parse.1 stable/11/secure/usr.bin/openssl/man/c_rehash.1 stable/11/secure/usr.bin/openssl/man/ca.1 stable/11/secure/usr.bin/openssl/man/ciphers.1 stable/11/secure/usr.bin/openssl/man/cms.1 stable/11/secure/usr.bin/openssl/man/crl.1 stable/11/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/11/secure/usr.bin/openssl/man/dgst.1 stable/11/secure/usr.bin/openssl/man/dhparam.1 stable/11/secure/usr.bin/openssl/man/dsa.1 stable/11/secure/usr.bin/openssl/man/dsaparam.1 stable/11/secure/usr.bin/openssl/man/ec.1 stable/11/secure/usr.bin/openssl/man/ecparam.1 stable/11/secure/usr.bin/openssl/man/enc.1 stable/11/secure/usr.bin/openssl/man/errstr.1 stable/11/secure/usr.bin/openssl/man/gendsa.1 stable/11/secure/usr.bin/openssl/man/genpkey.1 stable/11/secure/usr.bin/openssl/man/genrsa.1 stable/11/secure/usr.bin/openssl/man/nseq.1 stable/11/secure/usr.bin/openssl/man/ocsp.1 stable/11/secure/usr.bin/openssl/man/openssl.1 stable/11/secure/usr.bin/openssl/man/passwd.1 stable/11/secure/usr.bin/openssl/man/pkcs12.1 stable/11/secure/usr.bin/openssl/man/pkcs7.1 stable/11/secure/usr.bin/openssl/man/pkcs8.1 stable/11/secure/usr.bin/openssl/man/pkey.1 stable/11/secure/usr.bin/openssl/man/pkeyparam.1 stable/11/secure/usr.bin/openssl/man/pkeyutl.1 stable/11/secure/usr.bin/openssl/man/rand.1 stable/11/secure/usr.bin/openssl/man/req.1 stable/11/secure/usr.bin/openssl/man/rsa.1 stable/11/secure/usr.bin/openssl/man/rsautl.1 stable/11/secure/usr.bin/openssl/man/s_client.1 stable/11/secure/usr.bin/openssl/man/s_server.1 stable/11/secure/usr.bin/openssl/man/s_time.1 stable/11/secure/usr.bin/openssl/man/sess_id.1 stable/11/secure/usr.bin/openssl/man/smime.1 stable/11/secure/usr.bin/openssl/man/speed.1 stable/11/secure/usr.bin/openssl/man/spkac.1 stable/11/secure/usr.bin/openssl/man/ts.1 stable/11/secure/usr.bin/openssl/man/tsget.1 stable/11/secure/usr.bin/openssl/man/verify.1 stable/11/secure/usr.bin/openssl/man/version.1 stable/11/secure/usr.bin/openssl/man/x509.1 stable/11/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssl/CHANGES ============================================================================== --- stable/11/crypto/openssl/CHANGES Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/CHANGES Thu Sep 22 14:57:48 2016 (r306195) @@ -2,6 +2,166 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] + + *) OCSP Status Request extension unbounded memory growth + + A malicious client can send an excessively large OCSP Status Request + extension. If that client continually requests renegotiation, sending a + large OCSP Status Request extension each time, then there will be unbounded + memory growth on the server. This will eventually lead to a Denial Of + Service attack through memory exhaustion. Servers with a default + configuration are vulnerable even if they do not support OCSP. Builds using + the "no-ocsp" build time option are not affected. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6304) + [Matt Caswell] + + *) In order to mitigate the SWEET32 attack, the DES ciphers were moved from + HIGH to MEDIUM. + + This issue was reported to OpenSSL Karthikeyan Bhargavan and Gaetan + Leurent (INRIA) + (CVE-2016-2183) + [Rich Salz] + + *) OOB write in MDC2_Update() + + An overflow can occur in MDC2_Update() either if called directly or + through the EVP_DigestUpdate() function using MDC2. If an attacker + is able to supply very large amounts of input data after a previous + call to EVP_EncryptUpdate() with a partial block then a length check + can overflow resulting in a heap corruption. + + The amount of data needed is comparable to SIZE_MAX which is impractical + on most platforms. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6303) + [Stephen Henson] + + *) Malformed SHA512 ticket DoS + + If a server uses SHA512 for TLS session ticket HMAC it is vulnerable to a + DoS attack where a malformed ticket will result in an OOB read which will + ultimately crash. + + The use of SHA512 in TLS session tickets is comparatively rare as it requires + a custom server callback and ticket lookup mechanism. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6302) + [Stephen Henson] + + *) OOB write in BN_bn2dec() + + The function BN_bn2dec() does not check the return value of BN_div_word(). + This can cause an OOB write if an application uses this function with an + overly large BIGNUM. This could be a problem if an overly large certificate + or CRL is printed out from an untrusted source. TLS is not affected because + record limits will reject an oversized certificate before it is parsed. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2182) + [Stephen Henson] + + *) OOB read in TS_OBJ_print_bio() + + The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is + the total length the OID text representation would use and not the amount + of data written. This will result in OOB reads when large OIDs are + presented. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2180) + [Stephen Henson] + + *) Pointer arithmetic undefined behaviour + + Avoid some undefined pointer arithmetic + + A common idiom in the codebase is to check limits in the following manner: + "p + len > limit" + + Where "p" points to some malloc'd data of SIZE bytes and + limit == p + SIZE + + "len" here could be from some externally supplied data (e.g. from a TLS + message). + + The rules of C pointer arithmetic are such that "p + len" is only well + defined where len <= SIZE. Therefore the above idiom is actually + undefined behaviour. + + For example this could cause problems if some malloc implementation + provides an address for "p" such that "p + len" actually overflows for + values of len that are too big and therefore p + len < limit. + + This issue was reported to OpenSSL by Guido Vranken + (CVE-2016-2177) + [Matt Caswell] + + *) Constant time flag not preserved in DSA signing + + Operations in the DSA signing algorithm should run in constant time in + order to avoid side channel attacks. A flaw in the OpenSSL DSA + implementation means that a non-constant time codepath is followed for + certain operations. This has been demonstrated through a cache-timing + attack to be sufficient for an attacker to recover the private DSA key. + + This issue was reported by César Pereida (Aalto University), Billy Brumley + (Tampere University of Technology), and Yuval Yarom (The University of + Adelaide and NICTA). + (CVE-2016-2178) + [César Pereida] + + *) DTLS buffered message DoS + + In a DTLS connection where handshake messages are delivered out-of-order + those messages that OpenSSL is not yet ready to process will be buffered + for later use. Under certain circumstances, a flaw in the logic means that + those messages do not get removed from the buffer even though the handshake + has been completed. An attacker could force up to approx. 15 messages to + remain in the buffer when they are no longer required. These messages will + be cleared when the DTLS connection is closed. The default maximum size for + a message is 100k. Therefore the attacker could force an additional 1500k + to be consumed per connection. By opening many simulataneous connections an + attacker could cause a DoS attack through memory exhaustion. + + This issue was reported to OpenSSL by Quan Luo. + (CVE-2016-2179) + [Matt Caswell] + + *) DTLS replay protection DoS + + A flaw in the DTLS replay attack protection mechanism means that records + that arrive for future epochs update the replay protection "window" before + the MAC for the record has been validated. This could be exploited by an + attacker by sending a record for the next epoch (which does not have to + decrypt or have a valid MAC), with a very large sequence number. This means + that all subsequent legitimate packets are dropped causing a denial of + service for a specific DTLS connection. + + This issue was reported to OpenSSL by the OCAP audit team. + (CVE-2016-2181) + [Matt Caswell] + + *) Certificate message OOB reads + + In OpenSSL 1.0.2 and earlier some missing message length checks can result + in OOB reads of up to 2 bytes beyond an allocated buffer. There is a + theoretical DoS risk but this has not been observed in practice on common + platforms. + + The messages affected are client certificate, client certificate request + and server certificate. As a result the attack can only be performed + against a client or a server which enables client authentication. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6306) + [Stephen Henson] + Changes between 1.0.2g and 1.0.2h [3 May 2016] *) Prevent padding oracle in AES-NI CBC MAC check Modified: stable/11/crypto/openssl/CONTRIBUTING ============================================================================== --- stable/11/crypto/openssl/CONTRIBUTING Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/CONTRIBUTING Thu Sep 22 14:57:48 2016 (r306195) @@ -1,38 +1,75 @@ -HOW TO CONTRIBUTE TO OpenSSL ----------------------------- +HOW TO CONTRIBUTE TO PATCHES OpenSSL +------------------------------------ -Development is coordinated on the openssl-dev mailing list (see -http://www.openssl.org for information on subscribing). If you -would like to submit a patch, send it to rt@openssl.org with -the string "[PATCH]" in the subject. Please be sure to include a -textual explanation of what your patch does. - -You can also make GitHub pull requests. If you do this, please also send -mail to rt@openssl.org with a brief description and a link to the PR so -that we can more easily keep track of it. +(Please visit https://www.openssl.org/community/getting-started.html for +other ideas about how to contribute.) +Development is coordinated on the openssl-dev mailing list (see the +above link or https://mta.openssl.org for information on subscribing). If you are unsure as to whether a feature will be useful for the general -OpenSSL community please discuss it on the openssl-dev mailing list first. -Someone may be already working on the same thing or there may be a good -reason as to why that feature isn't implemented. - -Patches should be as up to date as possible, preferably relative to the -current Git or the last snapshot. They should follow our coding style -(see https://www.openssl.org/policies/codingstyle.html) and compile without -warnings using the --strict-warnings flag. OpenSSL compiles on many varied -platforms: try to ensure you only use portable features. - -Our preferred format for patch files is "git format-patch" output. For example -to provide a patch file containing the last commit in your local git repository -use the following command: +OpenSSL community you might want to discuss it on the openssl-dev mailing +list first. Someone may be already working on the same thing or there +may be a good reason as to why that feature isn't implemented. + +The best way to submit a patch is to make a pull request on GitHub. +(It is not necessary to send mail to rt@openssl.org to open a ticket!) +If you think the patch could use feedback from the community, please +start a thread on openssl-dev. + +You can also submit patches by sending it as mail to rt@openssl.org. +Please include the word "PATCH" and an explanation of what the patch +does in the subject line. If you do this, our preferred format is "git +format-patch" output. For example to provide a patch file containing the +last commit in your local git repository use the following command: -# git format-patch --stdout HEAD^ >mydiffs.patch + % git format-patch --stdout HEAD^ >mydiffs.patch Another method of creating an acceptable patch file without using git is as follows: -# cd openssl-work -# [your changes] -# ./Configure dist; make clean -# cd .. -# diff -ur openssl-orig openssl-work > mydiffs.patch + % cd openssl-work + ...make your changes... + % ./Configure dist; make clean + % cd .. + % diff -ur openssl-orig openssl-work >mydiffs.patch + +Note that pull requests are generally easier for the team, and community, to +work with. Pull requests benefit from all of the standard GitHub features, +including code review tools, simpler integration, and CI build support. + +No matter how a patch is submitted, the following items will help make +the acceptance and review process faster: + + 1. Anything other than trivial contributions will require a contributor + licensing agreement, giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the OpenSSL license (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + + 3. Patches should be as current as possible. When using GitHub, please + expect to have to rebase and update often. Note that we do not accept merge + commits. You will be asked to remove them before a patch is considered + acceptable. + + 4. Patches should follow our coding style (see + https://www.openssl.org/policies/codingstyle.html) and compile without + warnings. Where gcc or clang is availble you should use the + --strict-warnings Configure option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + + 5. When at all possible, patches should include tests. These can either be + added to an existing test, or completely new. Please see test/README + for information on the test framework. + + 6. New features or changed functionality must include documentation. Please + look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of + our style. Modified: stable/11/crypto/openssl/Configure ============================================================================== --- stable/11/crypto/openssl/Configure Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/Configure Thu Sep 22 14:57:48 2016 (r306195) @@ -799,7 +799,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). @@ -1082,11 +1082,6 @@ if (defined($disabled{"md5"}) || defined $disabled{"tls1"} = "forced"; } -if (defined($disabled{"tls1"})) - { - $disabled{"tlsext"} = "forced"; - } - if (defined($disabled{"ec"}) || defined($disabled{"dsa"}) || defined($disabled{"dh"})) { @@ -1254,6 +1249,7 @@ my $shared_extension = $fields[$idx_shar my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib]; my $ar = $ENV{'AR'} || "ar"; my $arflags = $fields[$idx_arflags]; +my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres"; my $multilib = $fields[$idx_multilib]; # if $prefix/lib$multilib is not an existing directory, then @@ -1562,8 +1558,15 @@ $cpuid_obj="mem_clr.o" unless ($cpuid_ob $des_obj=$des_enc unless ($des_obj =~ /\.o$/); $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); -$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); $rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); +if ($rc4_obj =~ /\.o$/) + { + $cflags.=" -DRC4_ASM"; + } +else + { + $rc4_obj=$rc4_enc; + } if ($sha1_obj =~ /\.o$/) { # $sha1_obj=$sha1_enc; @@ -1717,12 +1720,14 @@ while () s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/; s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/; s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; + s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc"; } else { s/^CC=.*$/CC= $cc/; s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; + s/^RC=.*/RC= $windres/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang"; } Modified: stable/11/crypto/openssl/Makefile ============================================================================== --- stable/11/crypto/openssl/Makefile Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/Makefile Thu Sep 22 14:57:48 2016 (r306195) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2h +VERSION=1.0.2i MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -68,6 +68,7 @@ EXE_EXT= ARFLAGS= AR= ar $(ARFLAGS) r RANLIB= /usr/bin/ranlib +RC= windres NM= nm PERL= /usr/bin/perl TAR= tar @@ -210,6 +211,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -368,6 +370,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: stable/11/crypto/openssl/Makefile.org ============================================================================== --- stable/11/crypto/openssl/Makefile.org Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/Makefile.org Thu Sep 22 14:57:48 2016 (r306195) @@ -66,6 +66,7 @@ EXE_EXT= ARFLAGS?= r AR=ar $(ARFLAGS) RANLIB= ranlib +RC= windres NM= nm PERL= perl TAR= tar @@ -208,6 +209,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -366,6 +368,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: stable/11/crypto/openssl/Makefile.shared ============================================================================== --- stable/11/crypto/openssl/Makefile.shared Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/Makefile.shared Thu Sep 22 14:57:48 2016 (r306195) @@ -293,7 +293,7 @@ link_a.cygwin: fi; \ dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \ $(PERL) util/mkrc.pl $$dll_name | \ - $(CROSS_COMPILE)windres -o rc.o; \ + $(RC) -o rc.o; \ extras="$$extras rc.o"; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ Modified: stable/11/crypto/openssl/NEWS ============================================================================== --- stable/11/crypto/openssl/NEWS Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/NEWS Thu Sep 22 14:57:48 2016 (r306195) @@ -5,6 +5,20 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] + + o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) + o SWEET32 Mitigation (CVE-2016-2183) + o OOB write in MDC2_Update() (CVE-2016-6303) + o Malformed SHA512 ticket DoS (CVE-2016-6302) + o OOB write in BN_bn2dec() (CVE-2016-2182) + o OOB read in TS_OBJ_print_bio() (CVE-2016-2180) + o Pointer arithmetic undefined behaviour (CVE-2016-2177) + o Constant time flag not preserved in DSA signing (CVE-2016-2178) + o DTLS buffered message DoS (CVE-2016-2179) + o DTLS replay protection DoS (CVE-2016-2181) + o Certificate message OOB reads (CVE-2016-6306) + Major changes between OpenSSL 1.0.2g and OpenSSL 1.0.2h [3 May 2016] o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) Modified: stable/11/crypto/openssl/README ============================================================================== --- stable/11/crypto/openssl/README Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/README Thu Sep 22 14:57:48 2016 (r306195) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2h 3 May 2016 + OpenSSL 1.0.2i 22 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/11/crypto/openssl/apps/CA.pl ============================================================================== --- stable/11/crypto/openssl/apps/CA.pl Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/CA.pl Thu Sep 22 14:57:48 2016 (r306195) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: stable/11/crypto/openssl/apps/CA.pl.in ============================================================================== --- stable/11/crypto/openssl/apps/CA.pl.in Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/CA.pl.in Thu Sep 22 14:57:48 2016 (r306195) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: stable/11/crypto/openssl/apps/apps.c ============================================================================== --- stable/11/crypto/openssl/apps/apps.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/apps.c Thu Sep 22 14:57:48 2016 (r306195) @@ -215,7 +215,8 @@ int args_from_file(char *file, int *argc if (arg != NULL) OPENSSL_free(arg); arg = (char **)OPENSSL_malloc(sizeof(char *) * (i * 2)); - + if (arg == NULL) + return 0; *argv = arg; num = 0; p = buf; @@ -2374,6 +2375,8 @@ int args_verify(char ***pargs, int *parg flags |= X509_V_FLAG_PARTIAL_CHAIN; else if (!strcmp(arg, "-no_alt_chains")) flags |= X509_V_FLAG_NO_ALT_CHAINS; + else if (!strcmp(arg, "-allow_proxy_certs")) + flags |= X509_V_FLAG_ALLOW_PROXY_CERTS; else return 0; @@ -3195,6 +3198,36 @@ int app_isdir(const char *name) #endif /* raw_read|write section */ +#if defined(__VMS) +# include "vms_term_sock.h" +static int stdin_sock = -1; + +static void close_stdin_sock(void) +{ + TerminalSocket (TERM_SOCK_DELETE, &stdin_sock); +} + +int fileno_stdin(void) +{ + if (stdin_sock == -1) { + TerminalSocket(TERM_SOCK_CREATE, &stdin_sock); + atexit(close_stdin_sock); + } + + return stdin_sock; +} +#else +int fileno_stdin(void) +{ + return fileno(stdin); +} +#endif + +int fileno_stdout(void) +{ + return fileno(stdout); +} + #if defined(_WIN32) && defined(STD_INPUT_HANDLE) int raw_read_stdin(void *buf, int siz) { @@ -3204,10 +3237,17 @@ int raw_read_stdin(void *buf, int siz) else return (-1); } +#elif defined(__VMS) +#include + +int raw_read_stdin(void *buf, int siz) +{ + return recv(fileno_stdin(), buf, siz, 0); +} #else int raw_read_stdin(void *buf, int siz) { - return read(fileno(stdin), buf, siz); + return read(fileno_stdin(), buf, siz); } #endif @@ -3223,6 +3263,6 @@ int raw_write_stdout(const void *buf, in #else int raw_write_stdout(const void *buf, int siz) { - return write(fileno(stdout), buf, siz); + return write(fileno_stdout(), buf, siz); } #endif Modified: stable/11/crypto/openssl/apps/apps.h ============================================================================== --- stable/11/crypto/openssl/apps/apps.h Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/apps.h Thu Sep 22 14:57:48 2016 (r306195) @@ -375,6 +375,8 @@ void store_setup_crl_download(X509_STORE # define SERIAL_RAND_BITS 64 int app_isdir(const char *); +int fileno_stdin(void); +int fileno_stdout(void); int raw_read_stdin(void *, int); int raw_write_stdout(const void *, int); Modified: stable/11/crypto/openssl/apps/ca.c ============================================================================== --- stable/11/crypto/openssl/apps/ca.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/ca.c Thu Sep 22 14:57:48 2016 (r306195) @@ -2103,25 +2103,23 @@ static int do_body(X509 **xret, EVP_PKEY goto err; /* We now just add it to the database */ - row[DB_type] = (char *)OPENSSL_malloc(2); - tm = X509_get_notAfter(ret); - row[DB_exp_date] = (char *)OPENSSL_malloc(tm->length + 1); - memcpy(row[DB_exp_date], tm->data, tm->length); - row[DB_exp_date][tm->length] = '\0'; - - row[DB_rev_date] = NULL; - - /* row[DB_serial] done already */ - row[DB_file] = (char *)OPENSSL_malloc(8); + row[DB_type] = OPENSSL_malloc(2); + row[DB_exp_date] = OPENSSL_malloc(tm->length + 1); + row[DB_rev_date] = OPENSSL_malloc(1); + row[DB_file] = OPENSSL_malloc(8); row[DB_name] = X509_NAME_oneline(X509_get_subject_name(ret), NULL, 0); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || + (row[DB_rev_date] == NULL) || (row[DB_file] == NULL) || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto err; } - BUF_strlcpy(row[DB_file], "unknown", 8); + + memcpy(row[DB_exp_date], tm->data, tm->length); + row[DB_exp_date][tm->length] = '\0'; + row[DB_rev_date][0] = '\0'; + strcpy(row[DB_file], "unknown"); row[DB_type][0] = 'V'; row[DB_type][1] = '\0'; @@ -2307,6 +2305,7 @@ static int certify_spkac(X509 **xret, ch j = NETSCAPE_SPKI_verify(spki, pktmp); if (j <= 0) { + EVP_PKEY_free(pktmp); BIO_printf(bio_err, "signature verification failed on SPKAC public key\n"); goto err; Modified: stable/11/crypto/openssl/apps/dgst.c ============================================================================== --- stable/11/crypto/openssl/apps/dgst.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/dgst.c Thu Sep 22 14:57:48 2016 (r306195) @@ -243,6 +243,11 @@ int MAIN(int argc, char **argv) argv++; } + if (keyfile != NULL && argc > 1) { + BIO_printf(bio_err, "Can only sign or verify one file\n"); + goto end; + } + if (do_verify && !sigfile) { BIO_printf(bio_err, "No signature to verify: use the -signature option\n"); Modified: stable/11/crypto/openssl/apps/enc.c ============================================================================== --- stable/11/crypto/openssl/apps/enc.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/enc.c Thu Sep 22 14:57:48 2016 (r306195) @@ -509,7 +509,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "invalid hex salt value\n"); goto end; } - } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) + } else if (RAND_bytes(salt, sizeof salt) <= 0) goto end; /* * If -P option then don't bother writing Modified: stable/11/crypto/openssl/apps/passwd.c ============================================================================== --- stable/11/crypto/openssl/apps/passwd.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/passwd.c Thu Sep 22 14:57:48 2016 (r306195) @@ -416,7 +416,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 2) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 2) <= 0) goto err; (*salt_p)[0] = cov_2char[(*salt_p)[0] & 0x3f]; /* 6 bits */ (*salt_p)[1] = cov_2char[(*salt_p)[1] & 0x3f]; /* 6 bits */ @@ -437,7 +437,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 8) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 8) <= 0) goto err; for (i = 0; i < 8; i++) Modified: stable/11/crypto/openssl/apps/pkcs12.c ============================================================================== --- stable/11/crypto/openssl/apps/pkcs12.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/pkcs12.c Thu Sep 22 14:57:48 2016 (r306195) @@ -832,6 +832,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 EVP_PKEY *pkey; PKCS8_PRIV_KEY_INFO *p8; X509 *x509; + int ret = 0; switch (M_PKCS12_bag_type(bag)) { case NID_keyBag: @@ -844,7 +845,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(pkey = EVP_PKCS82PKEY(p8))) return 0; print_attribs(out, p8->attributes, "Key Attributes"); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -864,7 +865,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 } print_attribs(out, p8->attributes, "Key Attributes"); PKCS8_PRIV_KEY_INFO_free(p8); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -884,7 +885,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(x509 = PKCS12_certbag2x509(bag))) return 0; dump_cert_text(out, x509); - PEM_write_bio_X509(out, x509); + ret = PEM_write_bio_X509(out, x509); X509_free(x509); break; @@ -902,7 +903,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 return 1; break; } - return 1; + return ret; } /* Given a single certificate return a verified chain or NULL if error */ @@ -931,16 +932,70 @@ static int get_cert_chain(X509 *cert, X5 int alg_print(BIO *x, X509_ALGOR *alg) { - PBEPARAM *pbe; - const unsigned char *p; - p = alg->parameter->value.sequence->data; - pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length); - if (!pbe) - return 1; - BIO_printf(bio_err, "%s, Iteration %ld\n", - OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)), - ASN1_INTEGER_get(pbe->iter)); - PBEPARAM_free(pbe); + int pbenid, aparamtype; + ASN1_OBJECT *aoid; + void *aparam; + PBEPARAM *pbe = NULL; + + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, alg); + + pbenid = OBJ_obj2nid(aoid); + + BIO_printf(x, "%s", OBJ_nid2ln(pbenid)); + + /* + * If PBE algorithm is PBES2 decode algorithm parameters + * for additional details. + */ + if (pbenid == NID_pbes2) { + PBE2PARAM *pbe2 = NULL; + int encnid; + if (aparamtype == V_ASN1_SEQUENCE) + pbe2 = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBE2PARAM)); + if (pbe2 == NULL) { + BIO_puts(x, ""); + goto done; + } + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, pbe2->keyfunc); + pbenid = OBJ_obj2nid(aoid); + X509_ALGOR_get0(&aoid, NULL, NULL, pbe2->encryption); + encnid = OBJ_obj2nid(aoid); + BIO_printf(x, ", %s, %s", OBJ_nid2ln(pbenid), + OBJ_nid2sn(encnid)); + /* If KDF is PBKDF2 decode parameters */ + if (pbenid == NID_id_pbkdf2) { + PBKDF2PARAM *kdf = NULL; + int prfnid; + if (aparamtype == V_ASN1_SEQUENCE) + kdf = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBKDF2PARAM)); + if (kdf == NULL) { + BIO_puts(x, ""); + goto done; + } + + if (kdf->prf == NULL) { + prfnid = NID_hmacWithSHA1; + } else { + X509_ALGOR_get0(&aoid, NULL, NULL, kdf->prf); + prfnid = OBJ_obj2nid(aoid); + } + BIO_printf(x, ", Iteration %ld, PRF %s", + ASN1_INTEGER_get(kdf->iter), OBJ_nid2sn(prfnid)); + PBKDF2PARAM_free(kdf); + } + PBE2PARAM_free(pbe2); + } else { + if (aparamtype == V_ASN1_SEQUENCE) + pbe = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBEPARAM)); + if (pbe == NULL) { + BIO_puts(x, ""); + goto done; + } + BIO_printf(x, ", Iteration %ld", ASN1_INTEGER_get(pbe->iter)); + PBEPARAM_free(pbe); + } + done: + BIO_puts(x, "\n"); return 1; } Modified: stable/11/crypto/openssl/apps/req.c ============================================================================== --- stable/11/crypto/openssl/apps/req.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/req.c Thu Sep 22 14:57:48 2016 (r306195) @@ -332,9 +332,10 @@ int MAIN(int argc, char **argv) subject = 1; else if (strcmp(*argv, "-text") == 0) text = 1; - else if (strcmp(*argv, "-x509") == 0) + else if (strcmp(*argv, "-x509") == 0) { + newreq = 1; x509 = 1; - else if (strcmp(*argv, "-asn1-kludge") == 0) + } else if (strcmp(*argv, "-asn1-kludge") == 0) kludge = 1; else if (strcmp(*argv, "-no-asn1-kludge") == 0) kludge = 0; @@ -756,7 +757,7 @@ int MAIN(int argc, char **argv) } } - if (newreq || x509) { + if (newreq) { if (pkey == NULL) { BIO_printf(bio_err, "you need to specify a private key\n"); goto end; @@ -1331,12 +1332,11 @@ static int auto_info(X509_REQ *req, STAC break; } #ifndef CHARSET_EBCDIC - if (*p == '+') + if (*type == '+') { #else - if (*p == os_toascii['+']) + if (*type == os_toascii['+']) { #endif - { - p++; + type++; mval = -1; } else mval = 0; Modified: stable/11/crypto/openssl/apps/s_apps.h ============================================================================== --- stable/11/crypto/openssl/apps/s_apps.h Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/s_apps.h Thu Sep 22 14:57:48 2016 (r306195) @@ -199,7 +199,8 @@ int load_excert(SSL_EXCERT **pexc, BIO * void print_ssl_summary(BIO *bio, SSL *s); #ifdef HEADER_SSL_H int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr); + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt); int args_ssl_call(SSL_CTX *ctx, BIO *err, SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, int no_ecdhe, int no_jpake); int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls, Modified: stable/11/crypto/openssl/apps/s_cb.c ============================================================================== --- stable/11/crypto/openssl/apps/s_cb.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/s_cb.c Thu Sep 22 14:57:48 2016 (r306195) @@ -1507,11 +1507,18 @@ void print_ssl_summary(BIO *bio, SSL *s) } int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr) + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt) { char *arg = **pargs, *argn = (*pargs)[1]; int rv; + if (strcmp(arg, "-no_ssl2") == 0 || strcmp(arg, "-no_ssl3") == 0 + || strcmp(arg, "-no_tls1") == 0 || strcmp(arg, "-no_tls1_1") == 0 + || strcmp(arg, "-no_tls1_2") == 0) { + *no_prot_opt = 1; + } + /* Attempt to run SSL configuration command */ rv = SSL_CONF_cmd_argv(cctx, pargc, pargs); /* If parameter not recognised just return */ Modified: stable/11/crypto/openssl/apps/s_client.c ============================================================================== --- stable/11/crypto/openssl/apps/s_client.c Thu Sep 22 13:59:27 2016 (r306194) +++ stable/11/crypto/openssl/apps/s_client.c Thu Sep 22 14:57:48 2016 (r306195) @@ -242,9 +242,9 @@ static unsigned int psk_client_cb(SSL *s unsigned char *psk, unsigned int max_psk_len) { - unsigned int psk_len = 0; int ret; - BIGNUM *bn = NULL; + long key_len; + unsigned char *key; if (c_debug) BIO_printf(bio_c_out, "psk_client_cb\n"); @@ -265,32 +265,29 @@ static unsigned int psk_client_cb(SSL *s if (c_debug) BIO_printf(bio_c_out, "created identity '%s' len=%d\n", identity, ret); - ret = BN_hex2bn(&bn, psk_key); - if (!ret) { - BIO_printf(bio_err, "Could not convert PSK key '%s' to BIGNUM\n", + + /* convert the PSK key to binary */ + key = string_to_hex(psk_key, &key_len); + if (key == NULL) { + BIO_printf(bio_err, "Could not convert PSK key '%s' to buffer\n", psk_key); - if (bn) - BN_free(bn); return 0; } - - if ((unsigned int)BN_num_bytes(bn) > max_psk_len) { + if ((unsigned long)key_len > (unsigned long)max_psk_len) { BIO_printf(bio_err, - "psk buffer of callback is too small (%d) for key (%d)\n", - max_psk_len, BN_num_bytes(bn)); - BN_free(bn); + "psk buffer of callback is too small (%d) for key (%ld)\n", + max_psk_len, key_len); + OPENSSL_free(key); return 0; } - psk_len = BN_bn2bin(bn, psk); - BN_free(bn); - if (psk_len == 0) - goto out_err; + memcpy(psk, key, key_len); + OPENSSL_free(key); if (c_debug) - BIO_printf(bio_c_out, "created PSK len=%d\n", psk_len); + BIO_printf(bio_c_out, "created PSK len=%ld\n", key_len); - return psk_len; + return key_len; out_err: if (c_debug) BIO_printf(bio_err, "Error in PSK client callback\n"); @@ -747,6 +744,7 @@ int MAIN(int argc, char **argv) int crl_format = FORMAT_PEM; int crl_download = 0; STACK_OF(X509_CRL) *crls = NULL; + int prot_opt = 0, no_prot_opt = 0; meth = SSLv23_client_method(); @@ -850,7 +848,8 @@ int MAIN(int argc, char **argv) if (badarg) goto bad; continue; - } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args)) { + } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args, + &no_prot_opt)) { if (badarg) goto bad; continue; @@ -942,31 +941,42 @@ int MAIN(int argc, char **argv) } #endif #ifndef OPENSSL_NO_SSL2 - else if (strcmp(*argv, "-ssl2") == 0) + else if (strcmp(*argv, "-ssl2") == 0) { meth = SSLv2_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_SSL3_METHOD - else if (strcmp(*argv, "-ssl3") == 0) + else if (strcmp(*argv, "-ssl3") == 0) { meth = SSLv3_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_TLS1 - else if (strcmp(*argv, "-tls1_2") == 0) + else if (strcmp(*argv, "-tls1_2") == 0) { meth = TLSv1_2_client_method(); - else if (strcmp(*argv, "-tls1_1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1_1") == 0) { meth = TLSv1_1_client_method(); - else if (strcmp(*argv, "-tls1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1") == 0) { meth = TLSv1_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_DTLS1 else if (strcmp(*argv, "-dtls") == 0) { meth = DTLS_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-dtls1") == 0) { meth = DTLSv1_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-dtls1_2") == 0) { meth = DTLSv1_2_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-timeout") == 0) enable_timeouts = 1; else if (strcmp(*argv, "-mtu") == 0) { @@ -1149,6 +1159,17 @@ int MAIN(int argc, char **argv) } #endif + if (prot_opt > 1) { + BIO_printf(bio_err, "Cannot supply multiple protocol flags\n"); + goto end; + } + + if (prot_opt == 1 && no_prot_opt) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 15:05:42 2016 Return-Path: Delivered-To: svn-src-all@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 B6D58BE591B; Thu, 22 Sep 2016 15:05:42 +0000 (UTC) (envelope-from jkim@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 5CCFD2FF; Thu, 22 Sep 2016 15:05:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MF5fRJ056751; Thu, 22 Sep 2016 15:05:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MF5c5i056719; Thu, 22 Sep 2016 15:05:38 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221505.u8MF5c5i056719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 15:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306196 - in stable/10: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/cms ... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 15:05:42 -0000 Author: jkim Date: Thu Sep 22 15:05:38 2016 New Revision: 306196 URL: https://svnweb.freebsd.org/changeset/base/306196 Log: Merge OpenSSL 1.0.1u. Added: stable/10/crypto/openssl/doc/crypto/d2i_PrivateKey.pod - copied unchanged from r306191, vendor-crypto/openssl/dist-1.0.1/doc/crypto/d2i_PrivateKey.pod stable/10/secure/lib/libcrypto/man/d2i_PrivateKey.3 (contents, props changed) Modified: stable/10/crypto/openssl/CHANGES stable/10/crypto/openssl/CONTRIBUTING stable/10/crypto/openssl/Configure stable/10/crypto/openssl/Makefile stable/10/crypto/openssl/NEWS stable/10/crypto/openssl/README stable/10/crypto/openssl/apps/apps.c stable/10/crypto/openssl/apps/enc.c stable/10/crypto/openssl/apps/passwd.c stable/10/crypto/openssl/apps/s_server.c stable/10/crypto/openssl/apps/x509.c stable/10/crypto/openssl/crypto/asn1/a_bytes.c stable/10/crypto/openssl/crypto/asn1/a_object.c stable/10/crypto/openssl/crypto/asn1/a_set.c stable/10/crypto/openssl/crypto/asn1/asn1_lib.c stable/10/crypto/openssl/crypto/asn1/asn_mime.c stable/10/crypto/openssl/crypto/asn1/d2i_pr.c stable/10/crypto/openssl/crypto/asn1/f_enum.c stable/10/crypto/openssl/crypto/asn1/f_int.c stable/10/crypto/openssl/crypto/asn1/f_string.c stable/10/crypto/openssl/crypto/asn1/p5_pbe.c stable/10/crypto/openssl/crypto/asn1/p5_pbev2.c stable/10/crypto/openssl/crypto/asn1/tasn_enc.c stable/10/crypto/openssl/crypto/asn1/tasn_prn.c stable/10/crypto/openssl/crypto/asn1/x_name.c stable/10/crypto/openssl/crypto/bio/bf_nbio.c stable/10/crypto/openssl/crypto/bn/bn_lib.c stable/10/crypto/openssl/crypto/bn/bn_print.c stable/10/crypto/openssl/crypto/bn/bn_rand.c stable/10/crypto/openssl/crypto/cms/cms_enc.c stable/10/crypto/openssl/crypto/cms/cms_ess.c stable/10/crypto/openssl/crypto/cms/cms_pwri.c stable/10/crypto/openssl/crypto/des/des.c stable/10/crypto/openssl/crypto/des/enc_writ.c stable/10/crypto/openssl/crypto/dsa/dsa_gen.c stable/10/crypto/openssl/crypto/dsa/dsa_ossl.c stable/10/crypto/openssl/crypto/evp/bio_ok.c stable/10/crypto/openssl/crypto/evp/digest.c stable/10/crypto/openssl/crypto/evp/e_seed.c stable/10/crypto/openssl/crypto/md2/md2_dgst.c stable/10/crypto/openssl/crypto/md32_common.h stable/10/crypto/openssl/crypto/mdc2/mdc2dgst.c stable/10/crypto/openssl/crypto/ocsp/ocsp_ext.c stable/10/crypto/openssl/crypto/opensslv.h stable/10/crypto/openssl/crypto/pem/pem.h stable/10/crypto/openssl/crypto/pem/pem_err.c stable/10/crypto/openssl/crypto/pem/pem_lib.c stable/10/crypto/openssl/crypto/pem/pvkfmt.c stable/10/crypto/openssl/crypto/pkcs12/p12_mutl.c stable/10/crypto/openssl/crypto/pkcs12/p12_npas.c stable/10/crypto/openssl/crypto/pkcs12/p12_utl.c stable/10/crypto/openssl/crypto/pkcs12/pkcs12.h stable/10/crypto/openssl/crypto/pkcs7/pk7_doit.c stable/10/crypto/openssl/crypto/rand/rand_unix.c stable/10/crypto/openssl/crypto/srp/srp_lib.c stable/10/crypto/openssl/crypto/srp/srp_vfy.c stable/10/crypto/openssl/crypto/ts/ts_lib.c stable/10/crypto/openssl/crypto/whrlpool/wp_dgst.c stable/10/crypto/openssl/crypto/x509/x509.h stable/10/crypto/openssl/crypto/x509/x509_err.c stable/10/crypto/openssl/crypto/x509/x509_txt.c stable/10/crypto/openssl/crypto/x509/x509_vfy.c stable/10/crypto/openssl/crypto/x509/x509_vfy.h stable/10/crypto/openssl/crypto/x509v3/v3_addr.c stable/10/crypto/openssl/doc/apps/cms.pod stable/10/crypto/openssl/doc/apps/smime.pod stable/10/crypto/openssl/doc/apps/verify.pod stable/10/crypto/openssl/doc/crypto/X509_verify_cert.pod stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/d1_clnt.c stable/10/crypto/openssl/ssl/d1_lib.c stable/10/crypto/openssl/ssl/d1_pkt.c stable/10/crypto/openssl/ssl/d1_srvr.c stable/10/crypto/openssl/ssl/s23_clnt.c stable/10/crypto/openssl/ssl/s2_clnt.c stable/10/crypto/openssl/ssl/s2_srvr.c stable/10/crypto/openssl/ssl/s3_both.c stable/10/crypto/openssl/ssl/s3_clnt.c stable/10/crypto/openssl/ssl/s3_lib.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/crypto/openssl/ssl/ssl.h stable/10/crypto/openssl/ssl/ssl_err.c stable/10/crypto/openssl/ssl/ssl_lib.c stable/10/crypto/openssl/ssl/ssl_locl.h stable/10/crypto/openssl/ssl/ssl_sess.c stable/10/crypto/openssl/ssl/t1_lib.c stable/10/secure/lib/libcrypto/Makefile.inc stable/10/secure/lib/libcrypto/Makefile.man stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/10/secure/lib/libcrypto/man/BIO_f_md.3 stable/10/secure/lib/libcrypto/man/BIO_f_null.3 stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/10/secure/lib/libcrypto/man/BIO_find_type.3 stable/10/secure/lib/libcrypto/man/BIO_new.3 stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/10/secure/lib/libcrypto/man/BIO_push.3 stable/10/secure/lib/libcrypto/man/BIO_read.3 stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 stable/10/secure/lib/libcrypto/man/BIO_s_file.3 stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 stable/10/secure/lib/libcrypto/man/BIO_s_null.3 stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 stable/10/secure/lib/libcrypto/man/BN_add.3 stable/10/secure/lib/libcrypto/man/BN_add_word.3 stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 stable/10/secure/lib/libcrypto/man/BN_cmp.3 stable/10/secure/lib/libcrypto/man/BN_copy.3 stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/10/secure/lib/libcrypto/man/BN_new.3 stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 stable/10/secure/lib/libcrypto/man/BN_rand.3 stable/10/secure/lib/libcrypto/man/BN_set_bit.3 stable/10/secure/lib/libcrypto/man/BN_swap.3 stable/10/secure/lib/libcrypto/man/BN_zero.3 stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/10/secure/lib/libcrypto/man/CMS_compress.3 stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 stable/10/secure/lib/libcrypto/man/CMS_final.3 stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/10/secure/lib/libcrypto/man/CMS_sign.3 stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 stable/10/secure/lib/libcrypto/man/CMS_verify.3 stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/10/secure/lib/libcrypto/man/DH_generate_key.3 stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DH_new.3 stable/10/secure/lib/libcrypto/man/DH_set_method.3 stable/10/secure/lib/libcrypto/man/DH_size.3 stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DSA_new.3 stable/10/secure/lib/libcrypto/man/DSA_set_method.3 stable/10/secure/lib/libcrypto/man/DSA_sign.3 stable/10/secure/lib/libcrypto/man/DSA_size.3 stable/10/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/10/secure/lib/libcrypto/man/ERR_clear_error.3 stable/10/secure/lib/libcrypto/man/ERR_error_string.3 stable/10/secure/lib/libcrypto/man/ERR_get_error.3 stable/10/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/10/secure/lib/libcrypto/man/ERR_load_strings.3 stable/10/secure/lib/libcrypto/man/ERR_print_errors.3 stable/10/secure/lib/libcrypto/man/ERR_put_error.3 stable/10/secure/lib/libcrypto/man/ERR_remove_state.3 stable/10/secure/lib/libcrypto/man/ERR_set_mark.3 stable/10/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/10/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncodeInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/10/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/10/secure/lib/libcrypto/man/EVP_SealInit.3 stable/10/secure/lib/libcrypto/man/EVP_SignInit.3 stable/10/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/10/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/10/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/10/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/10/secure/lib/libcrypto/man/OPENSSL_config.3 stable/10/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/10/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/10/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/10/secure/lib/libcrypto/man/PKCS12_create.3 stable/10/secure/lib/libcrypto/man/PKCS12_parse.3 stable/10/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/10/secure/lib/libcrypto/man/PKCS7_verify.3 stable/10/secure/lib/libcrypto/man/RAND_add.3 stable/10/secure/lib/libcrypto/man/RAND_bytes.3 stable/10/secure/lib/libcrypto/man/RAND_cleanup.3 stable/10/secure/lib/libcrypto/man/RAND_egd.3 stable/10/secure/lib/libcrypto/man/RAND_load_file.3 stable/10/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/10/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/10/secure/lib/libcrypto/man/RSA_check_key.3 stable/10/secure/lib/libcrypto/man/RSA_generate_key.3 stable/10/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/RSA_new.3 stable/10/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/10/secure/lib/libcrypto/man/RSA_print.3 stable/10/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_set_method.3 stable/10/secure/lib/libcrypto/man/RSA_sign.3 stable/10/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/10/secure/lib/libcrypto/man/RSA_size.3 stable/10/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/10/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/10/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/10/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/10/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/10/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/10/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/10/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/10/secure/lib/libcrypto/man/X509_new.3 stable/10/secure/lib/libcrypto/man/X509_verify_cert.3 stable/10/secure/lib/libcrypto/man/bio.3 stable/10/secure/lib/libcrypto/man/blowfish.3 stable/10/secure/lib/libcrypto/man/bn.3 stable/10/secure/lib/libcrypto/man/bn_internal.3 stable/10/secure/lib/libcrypto/man/buffer.3 stable/10/secure/lib/libcrypto/man/crypto.3 stable/10/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/10/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 stable/10/secure/lib/libcrypto/man/d2i_DHparams.3 stable/10/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_X509.3 stable/10/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/10/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/10/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/10/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/10/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/10/secure/lib/libcrypto/man/des.3 stable/10/secure/lib/libcrypto/man/dh.3 stable/10/secure/lib/libcrypto/man/dsa.3 stable/10/secure/lib/libcrypto/man/ecdsa.3 stable/10/secure/lib/libcrypto/man/engine.3 stable/10/secure/lib/libcrypto/man/err.3 stable/10/secure/lib/libcrypto/man/evp.3 stable/10/secure/lib/libcrypto/man/hmac.3 stable/10/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/10/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/10/secure/lib/libcrypto/man/lh_stats.3 stable/10/secure/lib/libcrypto/man/lhash.3 stable/10/secure/lib/libcrypto/man/md5.3 stable/10/secure/lib/libcrypto/man/mdc2.3 stable/10/secure/lib/libcrypto/man/pem.3 stable/10/secure/lib/libcrypto/man/rand.3 stable/10/secure/lib/libcrypto/man/rc4.3 stable/10/secure/lib/libcrypto/man/ripemd.3 stable/10/secure/lib/libcrypto/man/rsa.3 stable/10/secure/lib/libcrypto/man/sha.3 stable/10/secure/lib/libcrypto/man/threads.3 stable/10/secure/lib/libcrypto/man/ui.3 stable/10/secure/lib/libcrypto/man/ui_compat.3 stable/10/secure/lib/libcrypto/man/x509.3 stable/10/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/10/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/10/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/10/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_free.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/10/secure/lib/libssl/man/SSL_CTX_new.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/10/secure/lib/libssl/man/SSL_SESSION_free.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/10/secure/lib/libssl/man/SSL_accept.3 stable/10/secure/lib/libssl/man/SSL_alert_type_string.3 stable/10/secure/lib/libssl/man/SSL_clear.3 stable/10/secure/lib/libssl/man/SSL_connect.3 stable/10/secure/lib/libssl/man/SSL_do_handshake.3 stable/10/secure/lib/libssl/man/SSL_free.3 stable/10/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/10/secure/lib/libssl/man/SSL_get_ciphers.3 stable/10/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/10/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/10/secure/lib/libssl/man/SSL_get_error.3 stable/10/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/10/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_get_fd.3 stable/10/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/10/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/10/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/10/secure/lib/libssl/man/SSL_get_rbio.3 stable/10/secure/lib/libssl/man/SSL_get_session.3 stable/10/secure/lib/libssl/man/SSL_get_verify_result.3 stable/10/secure/lib/libssl/man/SSL_get_version.3 stable/10/secure/lib/libssl/man/SSL_library_init.3 stable/10/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/10/secure/lib/libssl/man/SSL_new.3 stable/10/secure/lib/libssl/man/SSL_pending.3 stable/10/secure/lib/libssl/man/SSL_read.3 stable/10/secure/lib/libssl/man/SSL_rstate_string.3 stable/10/secure/lib/libssl/man/SSL_session_reused.3 stable/10/secure/lib/libssl/man/SSL_set_bio.3 stable/10/secure/lib/libssl/man/SSL_set_connect_state.3 stable/10/secure/lib/libssl/man/SSL_set_fd.3 stable/10/secure/lib/libssl/man/SSL_set_session.3 stable/10/secure/lib/libssl/man/SSL_set_shutdown.3 stable/10/secure/lib/libssl/man/SSL_set_verify_result.3 stable/10/secure/lib/libssl/man/SSL_shutdown.3 stable/10/secure/lib/libssl/man/SSL_state_string.3 stable/10/secure/lib/libssl/man/SSL_want.3 stable/10/secure/lib/libssl/man/SSL_write.3 stable/10/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/10/secure/lib/libssl/man/ssl.3 stable/10/secure/usr.bin/openssl/man/CA.pl.1 stable/10/secure/usr.bin/openssl/man/asn1parse.1 stable/10/secure/usr.bin/openssl/man/c_rehash.1 stable/10/secure/usr.bin/openssl/man/ca.1 stable/10/secure/usr.bin/openssl/man/ciphers.1 stable/10/secure/usr.bin/openssl/man/cms.1 stable/10/secure/usr.bin/openssl/man/crl.1 stable/10/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/10/secure/usr.bin/openssl/man/dgst.1 stable/10/secure/usr.bin/openssl/man/dhparam.1 stable/10/secure/usr.bin/openssl/man/dsa.1 stable/10/secure/usr.bin/openssl/man/dsaparam.1 stable/10/secure/usr.bin/openssl/man/ec.1 stable/10/secure/usr.bin/openssl/man/ecparam.1 stable/10/secure/usr.bin/openssl/man/enc.1 stable/10/secure/usr.bin/openssl/man/errstr.1 stable/10/secure/usr.bin/openssl/man/gendsa.1 stable/10/secure/usr.bin/openssl/man/genpkey.1 stable/10/secure/usr.bin/openssl/man/genrsa.1 stable/10/secure/usr.bin/openssl/man/nseq.1 stable/10/secure/usr.bin/openssl/man/ocsp.1 stable/10/secure/usr.bin/openssl/man/openssl.1 stable/10/secure/usr.bin/openssl/man/passwd.1 stable/10/secure/usr.bin/openssl/man/pkcs12.1 stable/10/secure/usr.bin/openssl/man/pkcs7.1 stable/10/secure/usr.bin/openssl/man/pkcs8.1 stable/10/secure/usr.bin/openssl/man/pkey.1 stable/10/secure/usr.bin/openssl/man/pkeyparam.1 stable/10/secure/usr.bin/openssl/man/pkeyutl.1 stable/10/secure/usr.bin/openssl/man/rand.1 stable/10/secure/usr.bin/openssl/man/req.1 stable/10/secure/usr.bin/openssl/man/rsa.1 stable/10/secure/usr.bin/openssl/man/rsautl.1 stable/10/secure/usr.bin/openssl/man/s_client.1 stable/10/secure/usr.bin/openssl/man/s_server.1 stable/10/secure/usr.bin/openssl/man/s_time.1 stable/10/secure/usr.bin/openssl/man/sess_id.1 stable/10/secure/usr.bin/openssl/man/smime.1 stable/10/secure/usr.bin/openssl/man/speed.1 stable/10/secure/usr.bin/openssl/man/spkac.1 stable/10/secure/usr.bin/openssl/man/ts.1 stable/10/secure/usr.bin/openssl/man/tsget.1 stable/10/secure/usr.bin/openssl/man/verify.1 stable/10/secure/usr.bin/openssl/man/version.1 stable/10/secure/usr.bin/openssl/man/x509.1 stable/10/secure/usr.bin/openssl/man/x509v3_config.1 Modified: stable/10/crypto/openssl/CHANGES ============================================================================== --- stable/10/crypto/openssl/CHANGES Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/CHANGES Thu Sep 22 15:05:38 2016 (r306196) @@ -2,6 +2,166 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1t and 1.0.1u [22 Sep 2016] + + *) OCSP Status Request extension unbounded memory growth + + A malicious client can send an excessively large OCSP Status Request + extension. If that client continually requests renegotiation, sending a + large OCSP Status Request extension each time, then there will be unbounded + memory growth on the server. This will eventually lead to a Denial Of + Service attack through memory exhaustion. Servers with a default + configuration are vulnerable even if they do not support OCSP. Builds using + the "no-ocsp" build time option are not affected. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6304) + [Matt Caswell] + + *) In order to mitigate the SWEET32 attack, the DES ciphers were moved from + HIGH to MEDIUM. + + This issue was reported to OpenSSL Karthikeyan Bhargavan and Gaetan + Leurent (INRIA) + (CVE-2016-2183) + [Rich Salz] + + *) OOB write in MDC2_Update() + + An overflow can occur in MDC2_Update() either if called directly or + through the EVP_DigestUpdate() function using MDC2. If an attacker + is able to supply very large amounts of input data after a previous + call to EVP_EncryptUpdate() with a partial block then a length check + can overflow resulting in a heap corruption. + + The amount of data needed is comparable to SIZE_MAX which is impractical + on most platforms. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6303) + [Stephen Henson] + + *) Malformed SHA512 ticket DoS + + If a server uses SHA512 for TLS session ticket HMAC it is vulnerable to a + DoS attack where a malformed ticket will result in an OOB read which will + ultimately crash. + + The use of SHA512 in TLS session tickets is comparatively rare as it requires + a custom server callback and ticket lookup mechanism. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6302) + [Stephen Henson] + + *) OOB write in BN_bn2dec() + + The function BN_bn2dec() does not check the return value of BN_div_word(). + This can cause an OOB write if an application uses this function with an + overly large BIGNUM. This could be a problem if an overly large certificate + or CRL is printed out from an untrusted source. TLS is not affected because + record limits will reject an oversized certificate before it is parsed. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2182) + [Stephen Henson] + + *) OOB read in TS_OBJ_print_bio() + + The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is + the total length the OID text representation would use and not the amount + of data written. This will result in OOB reads when large OIDs are + presented. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2180) + [Stephen Henson] + + *) Pointer arithmetic undefined behaviour + + Avoid some undefined pointer arithmetic + + A common idiom in the codebase is to check limits in the following manner: + "p + len > limit" + + Where "p" points to some malloc'd data of SIZE bytes and + limit == p + SIZE + + "len" here could be from some externally supplied data (e.g. from a TLS + message). + + The rules of C pointer arithmetic are such that "p + len" is only well + defined where len <= SIZE. Therefore the above idiom is actually + undefined behaviour. + + For example this could cause problems if some malloc implementation + provides an address for "p" such that "p + len" actually overflows for + values of len that are too big and therefore p + len < limit. + + This issue was reported to OpenSSL by Guido Vranken + (CVE-2016-2177) + [Matt Caswell] + + *) Constant time flag not preserved in DSA signing + + Operations in the DSA signing algorithm should run in constant time in + order to avoid side channel attacks. A flaw in the OpenSSL DSA + implementation means that a non-constant time codepath is followed for + certain operations. This has been demonstrated through a cache-timing + attack to be sufficient for an attacker to recover the private DSA key. + + This issue was reported by César Pereida (Aalto University), Billy Brumley + (Tampere University of Technology), and Yuval Yarom (The University of + Adelaide and NICTA). + (CVE-2016-2178) + [César Pereida] + + *) DTLS buffered message DoS + + In a DTLS connection where handshake messages are delivered out-of-order + those messages that OpenSSL is not yet ready to process will be buffered + for later use. Under certain circumstances, a flaw in the logic means that + those messages do not get removed from the buffer even though the handshake + has been completed. An attacker could force up to approx. 15 messages to + remain in the buffer when they are no longer required. These messages will + be cleared when the DTLS connection is closed. The default maximum size for + a message is 100k. Therefore the attacker could force an additional 1500k + to be consumed per connection. By opening many simulataneous connections an + attacker could cause a DoS attack through memory exhaustion. + + This issue was reported to OpenSSL by Quan Luo. + (CVE-2016-2179) + [Matt Caswell] + + *) DTLS replay protection DoS + + A flaw in the DTLS replay attack protection mechanism means that records + that arrive for future epochs update the replay protection "window" before + the MAC for the record has been validated. This could be exploited by an + attacker by sending a record for the next epoch (which does not have to + decrypt or have a valid MAC), with a very large sequence number. This means + that all subsequent legitimate packets are dropped causing a denial of + service for a specific DTLS connection. + + This issue was reported to OpenSSL by the OCAP audit team. + (CVE-2016-2181) + [Matt Caswell] + + *) Certificate message OOB reads + + In OpenSSL 1.0.2 and earlier some missing message length checks can result + in OOB reads of up to 2 bytes beyond an allocated buffer. There is a + theoretical DoS risk but this has not been observed in practice on common + platforms. + + The messages affected are client certificate, client certificate request + and server certificate. As a result the attack can only be performed + against a client or a server which enables client authentication. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6306) + [Stephen Henson] + Changes between 1.0.1s and 1.0.1t [3 May 2016] *) Prevent padding oracle in AES-NI CBC MAC check Modified: stable/10/crypto/openssl/CONTRIBUTING ============================================================================== --- stable/10/crypto/openssl/CONTRIBUTING Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/CONTRIBUTING Thu Sep 22 15:05:38 2016 (r306196) @@ -1,38 +1,75 @@ -HOW TO CONTRIBUTE TO OpenSSL ----------------------------- +HOW TO CONTRIBUTE TO PATCHES OpenSSL +------------------------------------ -Development is coordinated on the openssl-dev mailing list (see -http://www.openssl.org for information on subscribing). If you -would like to submit a patch, send it to rt@openssl.org with -the string "[PATCH]" in the subject. Please be sure to include a -textual explanation of what your patch does. - -You can also make GitHub pull requests. If you do this, please also send -mail to rt@openssl.org with a brief description and a link to the PR so -that we can more easily keep track of it. +(Please visit https://www.openssl.org/community/getting-started.html for +other ideas about how to contribute.) +Development is coordinated on the openssl-dev mailing list (see the +above link or https://mta.openssl.org for information on subscribing). If you are unsure as to whether a feature will be useful for the general -OpenSSL community please discuss it on the openssl-dev mailing list first. -Someone may be already working on the same thing or there may be a good -reason as to why that feature isn't implemented. - -Patches should be as up to date as possible, preferably relative to the -current Git or the last snapshot. They should follow our coding style -(see https://www.openssl.org/policies/codingstyle.html) and compile without -warnings using the --strict-warnings flag. OpenSSL compiles on many varied -platforms: try to ensure you only use portable features. - -Our preferred format for patch files is "git format-patch" output. For example -to provide a patch file containing the last commit in your local git repository -use the following command: +OpenSSL community you might want to discuss it on the openssl-dev mailing +list first. Someone may be already working on the same thing or there +may be a good reason as to why that feature isn't implemented. + +The best way to submit a patch is to make a pull request on GitHub. +(It is not necessary to send mail to rt@openssl.org to open a ticket!) +If you think the patch could use feedback from the community, please +start a thread on openssl-dev. + +You can also submit patches by sending it as mail to rt@openssl.org. +Please include the word "PATCH" and an explanation of what the patch +does in the subject line. If you do this, our preferred format is "git +format-patch" output. For example to provide a patch file containing the +last commit in your local git repository use the following command: -# git format-patch --stdout HEAD^ >mydiffs.patch + % git format-patch --stdout HEAD^ >mydiffs.patch Another method of creating an acceptable patch file without using git is as follows: -# cd openssl-work -# [your changes] -# ./Configure dist; make clean -# cd .. -# diff -ur openssl-orig openssl-work > mydiffs.patch + % cd openssl-work + ...make your changes... + % ./Configure dist; make clean + % cd .. + % diff -ur openssl-orig openssl-work >mydiffs.patch + +Note that pull requests are generally easier for the team, and community, to +work with. Pull requests benefit from all of the standard GitHub features, +including code review tools, simpler integration, and CI build support. + +No matter how a patch is submitted, the following items will help make +the acceptance and review process faster: + + 1. Anything other than trivial contributions will require a contributor + licensing agreement, giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the OpenSSL license (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + + 3. Patches should be as current as possible. When using GitHub, please + expect to have to rebase and update often. Note that we do not accept merge + commits. You will be asked to remove them before a patch is considered + acceptable. + + 4. Patches should follow our coding style (see + https://www.openssl.org/policies/codingstyle.html) and compile without + warnings. Where gcc or clang is availble you should use the + --strict-warnings Configure option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + + 5. When at all possible, patches should include tests. These can either be + added to an existing test, or completely new. Please see test/README + for information on the test framework. + + 6. New features or changed functionality must include documentation. Please + look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of + our style. Modified: stable/10/crypto/openssl/Configure ============================================================================== --- stable/10/crypto/openssl/Configure Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/Configure Thu Sep 22 15:05:38 2016 (r306196) @@ -741,7 +741,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). Modified: stable/10/crypto/openssl/Makefile ============================================================================== --- stable/10/crypto/openssl/Makefile Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/Makefile Thu Sep 22 15:05:38 2016 (r306196) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1t +VERSION=1.0.1u MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: stable/10/crypto/openssl/NEWS ============================================================================== --- stable/10/crypto/openssl/NEWS Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/NEWS Thu Sep 22 15:05:38 2016 (r306196) @@ -5,6 +5,20 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1t and OpenSSL 1.0.1u [22 Sep 2016] + + o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) + o SWEET32 Mitigation (CVE-2016-2183) + o OOB write in MDC2_Update() (CVE-2016-6303) + o Malformed SHA512 ticket DoS (CVE-2016-6302) + o OOB write in BN_bn2dec() (CVE-2016-2182) + o OOB read in TS_OBJ_print_bio() (CVE-2016-2180) + o Pointer arithmetic undefined behaviour (CVE-2016-2177) + o Constant time flag not preserved in DSA signing (CVE-2016-2178) + o DTLS buffered message DoS (CVE-2016-2179) + o DTLS replay protection DoS (CVE-2016-2181) + o Certificate message OOB reads (CVE-2016-6306) + Major changes between OpenSSL 1.0.1s and OpenSSL 1.0.1t [3 May 2016] o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) Modified: stable/10/crypto/openssl/README ============================================================================== --- stable/10/crypto/openssl/README Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/README Thu Sep 22 15:05:38 2016 (r306196) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1t 3 May 2016 + OpenSSL 1.0.1u 22 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/10/crypto/openssl/apps/apps.c ============================================================================== --- stable/10/crypto/openssl/apps/apps.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/apps/apps.c Thu Sep 22 15:05:38 2016 (r306196) @@ -2241,6 +2241,8 @@ int args_verify(char ***pargs, int *parg flags |= X509_V_FLAG_CHECK_SS_SIGNATURE; else if (!strcmp(arg, "-no_alt_chains")) flags |= X509_V_FLAG_NO_ALT_CHAINS; + else if (!strcmp(arg, "-allow_proxy_certs")) + flags |= X509_V_FLAG_ALLOW_PROXY_CERTS; else return 0; Modified: stable/10/crypto/openssl/apps/enc.c ============================================================================== --- stable/10/crypto/openssl/apps/enc.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/apps/enc.c Thu Sep 22 15:05:38 2016 (r306196) @@ -509,7 +509,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "invalid hex salt value\n"); goto end; } - } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) + } else if (RAND_bytes(salt, sizeof salt) <= 0) goto end; /* * If -P option then don't bother writing Modified: stable/10/crypto/openssl/apps/passwd.c ============================================================================== --- stable/10/crypto/openssl/apps/passwd.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/apps/passwd.c Thu Sep 22 15:05:38 2016 (r306196) @@ -416,7 +416,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 2) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 2) <= 0) goto err; (*salt_p)[0] = cov_2char[(*salt_p)[0] & 0x3f]; /* 6 bits */ (*salt_p)[1] = cov_2char[(*salt_p)[1] & 0x3f]; /* 6 bits */ @@ -437,7 +437,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 8) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 8) <= 0) goto err; for (i = 0; i < 8; i++) Modified: stable/10/crypto/openssl/apps/s_server.c ============================================================================== --- stable/10/crypto/openssl/apps/s_server.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/apps/s_server.c Thu Sep 22 15:05:38 2016 (r306196) @@ -2968,7 +2968,7 @@ static int generate_session_id(const SSL { unsigned int count = 0; do { - if (RAND_pseudo_bytes(id, *id_len) < 0) + if (RAND_bytes(id, *id_len) <= 0) return 0; /* * Prefix the session_id with the required prefix. NB: If our prefix Modified: stable/10/crypto/openssl/apps/x509.c ============================================================================== --- stable/10/crypto/openssl/apps/x509.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/apps/x509.c Thu Sep 22 15:05:38 2016 (r306196) @@ -1053,6 +1053,10 @@ static int x509_certify(X509_STORE *ctx, EVP_PKEY *upkey; upkey = X509_get_pubkey(xca); + if (upkey == NULL) { + BIO_printf(bio_err, "Error obtaining CA X509 public key\n"); + goto end; + } EVP_PKEY_copy_parameters(upkey, pkey); EVP_PKEY_free(upkey); @@ -1161,6 +1165,8 @@ static int sign(X509 *x, EVP_PKEY *pkey, EVP_PKEY *pktmp; pktmp = X509_get_pubkey(x); + if (pktmp == NULL) + goto err; EVP_PKEY_copy_parameters(pktmp, pkey); EVP_PKEY_save_parameters(pktmp, 1); EVP_PKEY_free(pktmp); Modified: stable/10/crypto/openssl/crypto/asn1/a_bytes.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/a_bytes.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/a_bytes.c Thu Sep 22 15:05:38 2016 (r306196) @@ -60,7 +60,12 @@ #include "cryptlib.h" #include -static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c); +static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c, + int depth); +static ASN1_STRING *int_d2i_ASN1_bytes(ASN1_STRING **a, + const unsigned char **pp, long length, + int Ptag, int Pclass, int depth, + int *perr); /* * type is a 'bitmap' of acceptable string types. */ @@ -99,7 +104,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_ST ret = (*a); if (len != 0) { - s = (unsigned char *)OPENSSL_malloc((int)len + 1); + s = OPENSSL_malloc((int)len + 1); if (s == NULL) { i = ERR_R_MALLOC_FAILURE; goto err; @@ -154,15 +159,38 @@ int i2d_ASN1_bytes(ASN1_STRING *a, unsig return (r); } +/* + * Maximum recursion depth of d2i_ASN1_bytes(): much more than should be + * encountered in pratice. + */ + +#define ASN1_BYTES_MAXDEPTH 20 + ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, long length, int Ptag, int Pclass) { + int err = 0; + ASN1_STRING *s = int_d2i_ASN1_bytes(a, pp, length, Ptag, Pclass, 0, &err); + if (err != 0) + ASN1err(ASN1_F_D2I_ASN1_BYTES, err); + return s; +} + +static ASN1_STRING *int_d2i_ASN1_bytes(ASN1_STRING **a, + const unsigned char **pp, long length, + int Ptag, int Pclass, + int depth, int *perr) +{ ASN1_STRING *ret = NULL; const unsigned char *p; unsigned char *s; long len; int inf, tag, xclass; - int i = 0; + + if (depth > ASN1_BYTES_MAXDEPTH) { + *perr = ASN1_R_NESTED_ASN1_STRING; + return NULL; + } if ((a == NULL) || ((*a) == NULL)) { if ((ret = ASN1_STRING_new()) == NULL) @@ -173,18 +201,19 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING p = *pp; inf = ASN1_get_object(&p, &len, &tag, &xclass, length); if (inf & 0x80) { - i = ASN1_R_BAD_OBJECT_HEADER; + *perr = ASN1_R_BAD_OBJECT_HEADER; goto err; } if (tag != Ptag) { - i = ASN1_R_WRONG_TAG; + *perr = ASN1_R_WRONG_TAG; goto err; } if (inf & V_ASN1_CONSTRUCTED) { ASN1_const_CTX c; + c.error = 0; c.pp = pp; c.p = p; c.inf = inf; @@ -192,17 +221,18 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING c.tag = Ptag; c.xclass = Pclass; c.max = (length == 0) ? 0 : (p + length); - if (!asn1_collate_primitive(ret, &c)) + if (!asn1_collate_primitive(ret, &c, depth)) { + *perr = c.error; goto err; - else { + } else { p = c.p; } } else { if (len != 0) { if ((ret->length < len) || (ret->data == NULL)) { - s = (unsigned char *)OPENSSL_malloc((int)len + 1); + s = OPENSSL_malloc((int)len + 1); if (s == NULL) { - i = ERR_R_MALLOC_FAILURE; + *perr = ERR_R_MALLOC_FAILURE; goto err; } if (ret->data != NULL) @@ -230,7 +260,6 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING err: if ((ret != NULL) && ((a == NULL) || (*a != ret))) ASN1_STRING_free(ret); - ASN1err(ASN1_F_D2I_ASN1_BYTES, i); return (NULL); } @@ -242,7 +271,8 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING * There have been a few bug fixes for this function from Paul Keogh * , many thanks to him */ -static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c) +static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c, + int depth) { ASN1_STRING *os = NULL; BUF_MEM b; @@ -270,9 +300,8 @@ static int asn1_collate_primitive(ASN1_S } c->q = c->p; - if (d2i_ASN1_bytes(&os, &c->p, c->max - c->p, c->tag, c->xclass) - == NULL) { - c->error = ERR_R_ASN1_LIB; + if (int_d2i_ASN1_bytes(&os, &c->p, c->max - c->p, c->tag, c->xclass, + depth + 1, &c->error) == NULL) { goto err; } @@ -297,7 +326,6 @@ static int asn1_collate_primitive(ASN1_S ASN1_STRING_free(os); return (1); err: - ASN1err(ASN1_F_ASN1_COLLATE_PRIMITIVE, c->error); if (os != NULL) ASN1_STRING_free(os); if (b.data != NULL) Modified: stable/10/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/a_object.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/a_object.c Thu Sep 22 15:05:38 2016 (r306196) @@ -73,7 +73,7 @@ int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsi return (0); objsize = ASN1_object_size(0, a->length, V_ASN1_OBJECT); - if (pp == NULL) + if (pp == NULL || objsize == -1) return objsize; p = *pp; @@ -174,8 +174,12 @@ int a2d_ASN1_OBJECT(unsigned char *out, if (!tmp) goto err; } - while (blsize--) - tmp[i++] = (unsigned char)BN_div_word(bl, 0x80L); + while (blsize--) { + BN_ULONG t = BN_div_word(bl, 0x80L); + if (t == (BN_ULONG)-1) + goto err; + tmp[i++] = (unsigned char)t; + } } else { for (;;) { Modified: stable/10/crypto/openssl/crypto/asn1/a_set.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/a_set.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/a_set.c Thu Sep 22 15:05:38 2016 (r306196) @@ -57,6 +57,7 @@ */ #include +#include #include "cryptlib.h" #include @@ -98,10 +99,14 @@ int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) if (a == NULL) return (0); - for (i = sk_OPENSSL_BLOCK_num(a) - 1; i >= 0; i--) + for (i = sk_OPENSSL_BLOCK_num(a) - 1; i >= 0; i--) { + int tmplen = i2d(sk_OPENSSL_BLOCK_value(a, i), NULL); + if (tmplen > INT_MAX - ret) + return -1; ret += i2d(sk_OPENSSL_BLOCK_value(a, i), NULL); + } r = ASN1_object_size(1, ret, ex_tag); - if (pp == NULL) + if (pp == NULL || r == -1) return (r); p = *pp; Modified: stable/10/crypto/openssl/crypto/asn1/asn1_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/asn1_lib.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/asn1_lib.c Thu Sep 22 15:05:38 2016 (r306196) @@ -256,26 +256,30 @@ static void asn1_put_length(unsigned cha int ASN1_object_size(int constructed, int length, int tag) { - int ret; - - ret = length; - ret++; + int ret = 1; + if (length < 0) + return -1; if (tag >= 31) { while (tag > 0) { tag >>= 7; ret++; } } - if (constructed == 2) - return ret + 3; - ret++; - if (length > 127) { - while (length > 0) { - length >>= 8; - ret++; + if (constructed == 2) { + ret += 3; + } else { + ret++; + if (length > 127) { + int tmplen = length; + while (tmplen > 0) { + tmplen >>= 8; + ret++; + } } } - return (ret); + if (ret >= INT_MAX - length) + return -1; + return ret + length; } static int _asn1_Finish(ASN1_const_CTX *c) @@ -324,7 +328,7 @@ int asn1_GetSequence(ASN1_const_CTX *c, return (0); } if (c->inf == (1 | V_ASN1_CONSTRUCTED)) - c->slen = *length + *(c->pp) - c->p; + c->slen = *length; c->eos = 0; return (1); } @@ -366,7 +370,7 @@ int ASN1_STRING_set(ASN1_STRING *str, co else len = strlen(data); } - if ((str->length < len) || (str->data == NULL)) { + if ((str->length <= len) || (str->data == NULL)) { c = str->data; if (c == NULL) str->data = OPENSSL_malloc(len + 1); Modified: stable/10/crypto/openssl/crypto/asn1/asn_mime.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/asn_mime.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/asn_mime.c Thu Sep 22 15:05:38 2016 (r306196) @@ -289,7 +289,7 @@ int SMIME_write_ASN1(BIO *bio, ASN1_VALU if ((flags & SMIME_DETACHED) && data) { /* We want multipart/signed */ /* Generate a random boundary */ - if (RAND_pseudo_bytes((unsigned char *)bound, 32) < 0) + if (RAND_bytes((unsigned char *)bound, 32) <= 0) return 0; for (i = 0; i < 32; i++) { c = bound[i] & 0xf; Modified: stable/10/crypto/openssl/crypto/asn1/d2i_pr.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/d2i_pr.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/d2i_pr.c Thu Sep 22 15:05:38 2016 (r306196) @@ -97,15 +97,17 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_P if (!ret->ameth->old_priv_decode || !ret->ameth->old_priv_decode(ret, &p, length)) { if (ret->ameth->priv_decode) { + EVP_PKEY *tmp; PKCS8_PRIV_KEY_INFO *p8 = NULL; p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); if (!p8) goto err; - EVP_PKEY_free(ret); - ret = EVP_PKCS82PKEY(p8); + tmp = EVP_PKCS82PKEY(p8); PKCS8_PRIV_KEY_INFO_free(p8); - if (ret == NULL) + if (tmp == NULL) goto err; + EVP_PKEY_free(ret); + ret = tmp; } else { ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB); goto err; Modified: stable/10/crypto/openssl/crypto/asn1/f_enum.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/f_enum.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/f_enum.c Thu Sep 22 15:05:38 2016 (r306196) @@ -160,8 +160,6 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_EN i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -199,5 +197,7 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_EN err_sl: ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } Modified: stable/10/crypto/openssl/crypto/asn1/f_int.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/f_int.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/f_int.c Thu Sep 22 15:05:38 2016 (r306196) @@ -172,8 +172,6 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEG sp = OPENSSL_realloc_clean(s, slen, num + i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_INTEGER, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -211,5 +209,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEG err_sl: ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } Modified: stable/10/crypto/openssl/crypto/asn1/f_string.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/f_string.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/f_string.c Thu Sep 22 15:05:38 2016 (r306196) @@ -166,8 +166,6 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_STRING, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -205,5 +203,7 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING err_sl: ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } Modified: stable/10/crypto/openssl/crypto/asn1/p5_pbe.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/p5_pbe.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/p5_pbe.c Thu Sep 22 15:05:38 2016 (r306196) @@ -101,7 +101,7 @@ int PKCS5_pbe_set0_algor(X509_ALGOR *alg sstr = ASN1_STRING_data(pbe->salt); if (salt) memcpy(sstr, salt, saltlen); - else if (RAND_pseudo_bytes(sstr, saltlen) < 0) + else if (RAND_bytes(sstr, saltlen) <= 0) goto err; if (!ASN1_item_pack(pbe, ASN1_ITEM_rptr(PBEPARAM), &pbe_str)) { Modified: stable/10/crypto/openssl/crypto/asn1/p5_pbev2.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/p5_pbev2.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/p5_pbev2.c Thu Sep 22 15:05:38 2016 (r306196) @@ -120,7 +120,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_ if (EVP_CIPHER_iv_length(cipher)) { if (aiv) memcpy(iv, aiv, EVP_CIPHER_iv_length(cipher)); - else if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) + else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) <= 0) goto err; } @@ -225,7 +225,7 @@ X509_ALGOR *PKCS5_pbkdf2_set(int iter, u if (salt) memcpy(osalt->data, salt, saltlen); - else if (RAND_pseudo_bytes(osalt->data, saltlen) < 0) + else if (RAND_bytes(osalt->data, saltlen) <= 0) goto merr; if (iter <= 0) Modified: stable/10/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/tasn_enc.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/tasn_enc.c Thu Sep 22 15:05:38 2016 (r306196) @@ -59,6 +59,7 @@ #include #include +#include #include "cryptlib.h" #include #include @@ -216,17 +217,19 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) { const ASN1_TEMPLATE *seqtt; ASN1_VALUE **pseqval; + int tmplen; seqtt = asn1_do_adb(pval, tt, 1); if (!seqtt) return 0; pseqval = asn1_get_field_ptr(pval, seqtt); - /* FIXME: check for errors in enhanced version */ - seqcontlen += asn1_template_ex_i2d(pseqval, NULL, seqtt, - -1, aclass); + tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass); + if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen)) + return -1; + seqcontlen += tmplen; } seqlen = ASN1_object_size(ndef, seqcontlen, tag); - if (!out) + if (!out || seqlen == -1) return seqlen; /* Output SEQUENCE header */ ASN1_put_object(out, ndef, seqcontlen, tag, aclass); @@ -339,19 +342,24 @@ static int asn1_template_ex_i2d(ASN1_VAL /* Determine total length of items */ skcontlen = 0; for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) { + int tmplen; skitem = sk_ASN1_VALUE_value(sk, i); - skcontlen += ASN1_item_ex_i2d(&skitem, NULL, - ASN1_ITEM_ptr(tt->item), - -1, iclass); + tmplen = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item), + -1, iclass); + if (tmplen == -1 || (skcontlen > INT_MAX - tmplen)) + return -1; + skcontlen += tmplen; } sklen = ASN1_object_size(ndef, skcontlen, sktag); + if (sklen == -1) + return -1; /* If EXPLICIT need length of surrounding tag */ if (flags & ASN1_TFLG_EXPTAG) ret = ASN1_object_size(ndef, sklen, ttag); else ret = sklen; - if (!out) + if (!out || ret == -1) return ret; /* Now encode this lot... */ @@ -380,7 +388,7 @@ static int asn1_template_ex_i2d(ASN1_VAL return 0; /* Find length of EXPLICIT tag */ ret = ASN1_object_size(ndef, i, ttag); - if (out) { + if (out && ret != -1) { /* Output tag and item */ ASN1_put_object(out, ndef, i, ttag, tclass); ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), -1, iclass); Modified: stable/10/crypto/openssl/crypto/asn1/tasn_prn.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/tasn_prn.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/tasn_prn.c Thu Sep 22 15:05:38 2016 (r306196) @@ -446,6 +446,8 @@ static int asn1_print_integer_ctx(BIO *o char *s; int ret = 1; s = i2s_ASN1_INTEGER(NULL, str); + if (s == NULL) + return 0; if (BIO_puts(out, s) <= 0) ret = 0; OPENSSL_free(s); Modified: stable/10/crypto/openssl/crypto/asn1/x_name.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/x_name.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/asn1/x_name.c Thu Sep 22 15:05:38 2016 (r306196) @@ -199,10 +199,8 @@ static int x509_name_ex_d2i(ASN1_VALUE * int i, j, ret; STACK_OF(X509_NAME_ENTRY) *entries; X509_NAME_ENTRY *entry; - if (len > X509_NAME_MAX) { - ASN1err(ASN1_F_X509_NAME_EX_D2I, ASN1_R_TOO_LONG); - return 0; - } + if (len > X509_NAME_MAX) + len = X509_NAME_MAX; q = p; /* Get internal representation of Name */ Modified: stable/10/crypto/openssl/crypto/bio/bf_nbio.c ============================================================================== --- stable/10/crypto/openssl/crypto/bio/bf_nbio.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/bio/bf_nbio.c Thu Sep 22 15:05:38 2016 (r306196) @@ -139,7 +139,7 @@ static int nbiof_read(BIO *b, char *out, BIO_clear_retry_flags(b); #if 1 - if (RAND_pseudo_bytes(&n, 1) < 0) + if (RAND_bytes(&n, 1) <= 0) return -1; num = (n & 0x07); @@ -179,7 +179,7 @@ static int nbiof_write(BIO *b, const cha num = nt->lwn; nt->lwn = 0; } else { - if (RAND_pseudo_bytes(&n, 1) < 0) + if (RAND_bytes(&n, 1) <= 0) return -1; num = (n & 7); } Modified: stable/10/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_lib.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/bn/bn_lib.c Thu Sep 22 15:05:38 2016 (r306196) @@ -569,7 +569,7 @@ void BN_clear(BIGNUM *a) { bn_check_top(a); if (a->d != NULL) - memset(a->d, 0, a->dmax * sizeof(a->d[0])); + OPENSSL_cleanse(a->d, a->dmax * sizeof(a->d[0])); a->top = 0; a->neg = 0; } Modified: stable/10/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_print.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/bn/bn_print.c Thu Sep 22 15:05:38 2016 (r306196) @@ -111,6 +111,7 @@ char *BN_bn2dec(const BIGNUM *a) char *p; BIGNUM *t = NULL; BN_ULONG *bn_data = NULL, *lp; + int bn_data_num; /*- * get an upper bound for the length of the decimal integer @@ -120,9 +121,9 @@ char *BN_bn2dec(const BIGNUM *a) */ i = BN_num_bits(a) * 3; num = (i / 10 + i / 1000 + 1) + 1; - bn_data = - (BN_ULONG *)OPENSSL_malloc((num / BN_DEC_NUM + 1) * sizeof(BN_ULONG)); - buf = (char *)OPENSSL_malloc(num + 3); + bn_data_num = num / BN_DEC_NUM + 1; + bn_data = OPENSSL_malloc(bn_data_num * sizeof(BN_ULONG)); + buf = OPENSSL_malloc(num + 3); if ((buf == NULL) || (bn_data == NULL)) { BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); goto err; @@ -140,9 +141,12 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); + if (*lp == (BN_ULONG)-1) + goto err; lp++; } lp--; Modified: stable/10/crypto/openssl/crypto/bn/bn_rand.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_rand.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/bn/bn_rand.c Thu Sep 22 15:05:38 2016 (r306196) @@ -145,13 +145,9 @@ static int bnrand(int pseudorand, BIGNUM time(&tim); RAND_add(&tim, sizeof(tim), 0.0); - if (pseudorand) { - if (RAND_pseudo_bytes(buf, bytes) == -1) - goto err; - } else { - if (RAND_bytes(buf, bytes) <= 0) - goto err; - } + /* We ignore the value of pseudorand and always call RAND_bytes */ + if (RAND_bytes(buf, bytes) <= 0) + goto err; #if 1 if (pseudorand == 2) { Modified: stable/10/crypto/openssl/crypto/cms/cms_enc.c ============================================================================== --- stable/10/crypto/openssl/crypto/cms/cms_enc.c Thu Sep 22 14:57:48 2016 (r306195) +++ stable/10/crypto/openssl/crypto/cms/cms_enc.c Thu Sep 22 15:05:38 2016 (r306196) @@ -119,7 +119,7 @@ BIO *cms_EncryptedContent_init_bio(CMS_E /* Generate a random IV if we need one */ ivlen = EVP_CIPHER_CTX_iv_length(ctx); if (ivlen > 0) { - if (RAND_pseudo_bytes(iv, ivlen) <= 0) + if (RAND_bytes(iv, ivlen) <= 0) goto err; piv = iv; } @@ -179,10 +179,9 @@ BIO *cms_EncryptedContent_init_bio(CMS_E CMS_R_CIPHER_INITIALISATION_ERROR); goto err; } - - if (piv) { + if (enc) { calg->parameter = ASN1_TYPE_new(); - if (!calg->parameter) { + if (calg->parameter == NULL) { CMSerr(CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO, ERR_R_MALLOC_FAILURE); goto err; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 15:11:10 2016 Return-Path: Delivered-To: svn-src-all@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 70E68BE50BB; Thu, 22 Sep 2016 15:11:10 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 E101EA7D; Thu, 22 Sep 2016 15:11:09 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id w84so258617502wmg.1; Thu, 22 Sep 2016 08:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fanTHfJFJzWYpTMBpLhjovapexr1HMD3fMvp44Qo8Cc=; b=z8sjYmO1NguacV6Y24F/VuryET089gbhvXx1zcWAWEb5Z5nef1+zu6U5HcmURFgFWU DufkSHiw4LDqHC5qWcnOi7fuhluO8Qr9kIVkqSwJHkyYuJ0JJTHYCpWEauFCXGtkZTIg 0HtPXSZtJ1ZMdHHSDWorwmu8XwGSOWCYmjTlLn3sqLHQc0NVWIxYRh/WvxZC5LXFmR2s RK4z1TCRnO9glWkZvnNJMM6NLO4cLMgB8A3TB4Arj648RsEM3+VV29nx0c4G98Rkqp6T SJcO/p706W/lPqbk9MxF4BCjpErOXLnngndzx4lkXFA3bP+cKG1kJwv9TNeh9QfiMw/k dsqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fanTHfJFJzWYpTMBpLhjovapexr1HMD3fMvp44Qo8Cc=; b=YFLI0rY5DV3jxCKK+mmYYbNWLk0EnAgm7mgWmhgqaK5i5zhCV0AtYqSEp5HrrgI5R3 2WBBlSgT22jNaTs2n8EXK8V5lPp5jJf+8gJgso1VZuFxdVB2+88NO+9KIcr2C3ra/SHm VziAHpE3DyNbep+5MymZjR6K608XTnhUrHcWzog2jKZ/IoOuykdA/Mthmdhgs+JhY9HT Sef2m3bx3uYbwbSfXODIjbCTe9VRxpd2vctp7bM/FTi/+F4+Fc5gzzq2/9w707UL3YLA +0OKuXpl3kJnoVUp7Nr+0GqWywVRlQobsLOHH9aiDbmY8IPCtu7X7XsPs7uB5Ct4ur5w sv/w== X-Gm-Message-State: AE9vXwNQfFsmA0BoFa9zCGVgifPUe69KtejNTjyGAr0HRaGFhY3iwtCKAOVq12qyJzoUNr46EZ+I1n7LEqhTog== X-Received: by 10.28.32.15 with SMTP id g15mr8925731wmg.25.1474557068184; Thu, 22 Sep 2016 08:11:08 -0700 (PDT) MIME-Version: 1.0 Sender: oshogbo.vx@gmail.com Received: by 10.28.158.197 with HTTP; Thu, 22 Sep 2016 08:11:07 -0700 (PDT) In-Reply-To: <20160922145625.GA70214@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> <20160922143412.GA69951@bsdpad.com> <20160922145625.GA70214@bsdpad.com> From: Mariusz Zaborski Date: Thu, 22 Sep 2016 17:11:07 +0200 X-Google-Sender-Auth: 3FoyaRAzZwGdAuuNJbzVOogqUNw Message-ID: Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys To: Ruslan Bukin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 15:11:10 -0000 I tested it on the mips for Malta kernel and it's works fine. I will try to do it on mips64, are you using qemu to test it? What is ctrl + t reporting you? On 22 September 2016 at 16:56, Ruslan Bukin wrote: > May be. The next line should be > /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). > > but it hangs before this line > > Ruslan > > On Thu, Sep 22, 2016 at 04:39:16PM +0200, Mariusz Zaborski wrote: >> Hi Ruslan, >> >> Does it hang on some network script? >> >> Thanks, >> Mariusz >> >> >> On 22 September 2016 at 16:34, Ruslan Bukin wrote: >> > Hi Mariusz >> > >> > my MIPS64EB kernel stops booting with this >> > >> > somewhere here: >> > [...] >> > Starting file system checks: >> > /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946580 blocks, 0.0% fragmentation) >> > Mounting local filesystems:. >> > ELF ldconfig path: /lib /usr/lib /usr/lib/compat >> > random: unblocking device. >> > >> > any idea ? (should I rebuild something?) >> > >> > thanks! >> > >> > Ruslan >> > >> > On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: >> >> Author: oshogbo >> >> Date: Thu Sep 22 09:58:46 2016 >> >> New Revision: 306174 >> >> URL: https://svnweb.freebsd.org/changeset/base/306174 >> >> >> >> Log: >> >> capsicum: propagate rights on accept(2) >> >> >> >> Descriptor returned by accept(2) should inherits capabilities rights from >> >> the listening socket. >> >> >> >> PR: 201052 >> >> Reviewed by: emaste, jonathan >> >> Discussed with: many >> >> Differential Revision: https://reviews.freebsd.org/D7724 >> >> >> >> Modified: >> >> head/sys/compat/cloudabi/cloudabi_sock.c >> >> head/sys/compat/linux/linux_socket.c >> >> head/sys/kern/kern_sendfile.c >> >> head/sys/kern/uipc_syscalls.c >> >> head/sys/netinet/sctp_syscalls.c >> >> head/sys/sys/socketvar.h >> >> >> >> Modified: head/sys/compat/cloudabi/cloudabi_sock.c >> >> ============================================================================== >> >> --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) >> >> +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) >> >> @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread >> >> int error; >> >> >> >> error = getsock_cap(td, uap->sock, cap_rights_init(&rights, >> >> - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); >> >> + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> so = fp->f_data; >> >> >> >> Modified: head/sys/compat/linux/linux_socket.c >> >> ============================================================================== >> >> --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) >> >> +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) >> >> @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i >> >> if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) >> >> return (EINVAL); >> >> if (error == EINVAL) { >> >> - error1 = getsock_cap(td, s, &rights, &fp, NULL); >> >> + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); >> >> if (error1 != 0) >> >> return (error1); >> >> so = fp->f_data; >> >> >> >> Modified: head/sys/kern/kern_sendfile.c >> >> ============================================================================== >> >> --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) >> >> +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) >> >> @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int >> >> * The socket must be a stream socket and connected. >> >> */ >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), >> >> - sock_fp, NULL); >> >> + sock_fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> *so = (*sock_fp)->f_data; >> >> >> >> Modified: head/sys/kern/uipc_syscalls.c >> >> ============================================================================== >> >> --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) >> >> +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) >> >> @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char >> >> /* >> >> * Convert a user file descriptor to a kernel file entry and check if required >> >> * capability rights are present. >> >> + * If required copy of current set of capability rights is returned. >> >> * A reference on the file entry is held upon returning. >> >> */ >> >> int >> >> getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, >> >> - struct file **fpp, u_int *fflagp) >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) >> >> { >> >> struct file *fp; >> >> int error; >> >> >> >> - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); >> >> + error = fget_cap(td, fd, rightsp, &fp, havecapsp); >> >> if (error != 0) >> >> return (error); >> >> if (fp->f_type != DTYPE_SOCKET) { >> >> fdrop(fp, td); >> >> + if (havecapsp != NULL) >> >> + filecaps_free(havecapsp); >> >> return (ENOTSOCK); >> >> } >> >> if (fflagp != NULL) >> >> @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd >> >> AUDIT_ARG_FD(fd); >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> so = fp->f_data; >> >> @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis >> >> >> >> AUDIT_ARG_FD(uap->s); >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error == 0) { >> >> so = fp->f_data; >> >> #ifdef MAC >> >> @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s >> >> struct file *headfp, *nfp = NULL; >> >> struct sockaddr *sa = NULL; >> >> struct socket *head, *so; >> >> + struct filecaps fcaps; >> >> cap_rights_t rights; >> >> u_int fflag; >> >> pid_t pgid; >> >> @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s >> >> >> >> AUDIT_ARG_FD(s); >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), >> >> - &headfp, &fflag); >> >> + &headfp, &fflag, &fcaps); >> >> if (error != 0) >> >> return (error); >> >> head = headfp->f_data; >> >> @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s >> >> if (error != 0) >> >> goto done; >> >> #endif >> >> - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); >> >> + error = falloc_caps(td, &nfp, &fd, >> >> + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); >> >> if (error != 0) >> >> goto done; >> >> ACCEPT_LOCK(); >> >> @@ -440,6 +445,8 @@ noconnection: >> >> * a reference on nfp to the caller on success if they request it. >> >> */ >> >> done: >> >> + if (nfp == NULL) >> >> + filecaps_free(&fcaps); >> >> if (fp != NULL) { >> >> if (error == 0) { >> >> *fp = nfp; >> >> @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di >> >> AUDIT_ARG_FD(fd); >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> so = fp->f_data; >> >> @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st >> >> AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); >> >> cap_rights_set(&rights, CAP_CONNECT); >> >> } >> >> - error = getsock_cap(td, s, &rights, &fp, NULL); >> >> + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> so = (struct socket *)fp->f_data; >> >> @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st >> >> >> >> AUDIT_ARG_FD(s); >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> so = fp->f_data; >> >> @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s >> >> >> >> AUDIT_ARG_FD(uap->s); >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error == 0) { >> >> so = fp->f_data; >> >> error = soshutdown(so, uap->how); >> >> @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s >> >> >> >> AUDIT_ARG_FD(s); >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error == 0) { >> >> so = fp->f_data; >> >> error = sosetopt(so, &sopt); >> >> @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s >> >> >> >> AUDIT_ARG_FD(s); >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error == 0) { >> >> so = fp->f_data; >> >> error = sogetopt(so, &sopt); >> >> @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int >> >> >> >> AUDIT_ARG_FD(fd); >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> so = fp->f_data; >> >> @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int >> >> >> >> AUDIT_ARG_FD(fd); >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> so = fp->f_data; >> >> >> >> Modified: head/sys/netinet/sctp_syscalls.c >> >> ============================================================================== >> >> --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) >> >> +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) >> >> @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) >> >> } >> >> >> >> AUDIT_ARG_FD(uap->sd); >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); >> >> if (error != 0) >> >> goto sctp_bad; >> >> #ifdef KTRACE >> >> @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) >> >> } >> >> >> >> AUDIT_ARG_FD(uap->sd); >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); >> >> if (error != 0) >> >> goto sctp_bad1; >> >> >> >> @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) >> >> >> >> AUDIT_ARG_FD(uap->sd); >> >> error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), >> >> - &fp, NULL); >> >> + &fp, NULL, NULL); >> >> if (error != 0) >> >> return (error); >> >> #ifdef COMPAT_FREEBSD32 >> >> >> >> Modified: head/sys/sys/socketvar.h >> >> ============================================================================== >> >> --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) >> >> +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) >> >> @@ -321,6 +321,7 @@ extern u_long sb_max; >> >> extern so_gen_t so_gencnt; >> >> >> >> struct file; >> >> +struct filecaps; >> >> struct filedesc; >> >> struct mbuf; >> >> struct sockaddr; >> >> @@ -340,7 +341,7 @@ struct uio; >> >> */ >> >> int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); >> >> int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, >> >> - struct file **fpp, u_int *fflagp); >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); >> >> void soabort(struct socket *so); >> >> int soaccept(struct socket *so, struct sockaddr **nam); >> >> void soaio_enqueue(struct task *task); >> >> From owner-svn-src-all@freebsd.org Thu Sep 22 15:17:38 2016 Return-Path: Delivered-To: svn-src-all@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 D8FACBE59D5; Thu, 22 Sep 2016 15:17:38 +0000 (UTC) (envelope-from imp@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 52DAE3EE; Thu, 22 Sep 2016 15:17:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MFHb5Q061059; Thu, 22 Sep 2016 15:17:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MFHb8V061051; Thu, 22 Sep 2016 15:17:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609221517.u8MFHb8V061051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 22 Sep 2016 15:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306197 - in head: lib/libc/locale sys/gnu/dts/arm sys/gnu/dts/include/dt-bindings/clock sys/gnu/dts/include/dt-bindings/dma sys/gnu/dts/include/dt-bindings/gpio sys/gnu/dts/include/dt-... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 15:17:38 -0000 Author: imp Date: Thu Sep 22 15:17:36 2016 New Revision: 306197 URL: https://svnweb.freebsd.org/changeset/base/306197 Log: Revert and redo r306083. Update the device tree source files to a Linux 4.7-RC. The dts tree currently can't be merged w/o specific revisions. Note: due to a stupid bug in the commit checking script, I couldn't just remove the svn:keyword tag from the new files, I had to add fbsd:nokeywords to all the files (including ones that didn't need it) Added: - copied from r303380, vendor/device-tree/dist/include/dt-bindings/iio/adc/ - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/iio/adi,ad5592r.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/media/tvp5150.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/memory/mt8173-larb-port.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/r8a7779-sysc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/r8a7790-sysc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/r8a7791-sysc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/r8a7793-sysc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/r8a7794-sysc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/r8a7795-sysc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/rk3368-power.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/power/rk3399-power.h Directory Properties: head/sys/gnu/dts/include/dt-bindings/iio/adc/ (props changed) head/sys/gnu/dts/include/dt-bindings/iio/adi,ad5592r.h (props changed) head/sys/gnu/dts/include/dt-bindings/media/tvp5150.h (props changed) head/sys/gnu/dts/include/dt-bindings/memory/mt8173-larb-port.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7779-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7790-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7791-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7793-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7794-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7795-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/rk3368-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/rk3399-power.h (props changed) Replaced: - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am335x-baltos.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am335x-icev2.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am572x-idk.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am57xx-commercial-grade.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am57xx-idk-common.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/am57xx-industrial-grade.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-eb-11mp-revb.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-eb-11mp.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-eb-a9mp.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-eb-mp.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-eb.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-eb.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-pba8.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-pbx-a9.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/arm-realview-pbx.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/artpec6-devboard.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/artpec6.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/aspeed-ast2500-evb.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/aspeed-bmc-opp-palmetto.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/aspeed-g4.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/aspeed-g5.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/bcm2835-rpi-a.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/bcm47094-dlink-dir-885l.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/dra7-dspeve-thermal.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/dra7-iva-thermal.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/dra72-evm-common.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/dra72-evm-revc.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/exynos-syscon-restart.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/exynos3250-artik5-eval.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/exynos3250-artik5.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/exynos4412-ppmu-common.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/exynos5410-pinctrl.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/exynos5420-cpus.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6dl-tx6s-8034.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6dl-tx6s-8035.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6dl-tx6u-8033.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6dl-tx6u-81xx-mb7.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-apalis-ixora.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-b450v3.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-b650v3.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-b850v3.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-ba16.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-bx50v3.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-evi.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-icore-rqs.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-marsboard.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-tx6q-1036.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6q-tx6q-11x0-mb7.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6qdl-apalis.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6qdl-icore-rqs.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6qp-nitrogen6_max.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6qp-sabreauto.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6qp-sabresd.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6qp.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6sx-nitrogen6sx.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6sx-sdb-sai.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6ul-pico-hobbit.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6ul-tx6ul-0010.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6ul-tx6ul-0011.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6ul-tx6ul-mainboard.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx6ul-tx6ul.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/imx7d-nitrogen7.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2e-clocks.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2e-evm.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2e-netcp.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2e.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2g-evm.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2g.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2hk-clocks.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2hk-evm.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2hk-netcp.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2hk.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2l-clocks.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2l-evm.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2l-netcp.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/keystone-k2l.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation-6282.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation-duo-6281.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsqvl.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsvl.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswsxl.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswvl.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswxl.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linkstation.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/kirkwood-linksys-viper.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/logicpd-som-lv-37xx-devkit.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/logicpd-som-lv.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/lpc3250-ea3250.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/lpc3250-phy3250.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mps2-an385.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mps2-an399.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mps2.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mt2701-pinfunc.h - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mt7623-evb.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mt7623.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mvebu-linkstation-fan.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/mvebu-linkstation-gpio-simple.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/omap3-sniper.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/omap4-kc1.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/orion5x-kuroboxpro.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/orion5x-linkstation-lsgl.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/orion5x-linkstation.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/ox810se.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c-pins.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/qcom-apq8064-asus-nexus7-flo.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/qcom-apq8064-pins.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk01.1-c1.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk01.1.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/qcom-ipq4019.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/rk3288-miqi.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/socfpga_cyclone5_vining_fpga.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/stm32f469-disco.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun4i-a10-dserve-dsrv9703c.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun5i-a13-difrnce-dit4350.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun6i-a31s-colorfly-e708-q1.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun7i-a20-itead-ibox.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun7i-a20-lamobo-r1.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-lime2-emmc.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun8i-a23-polaroid-mid2809pxe04.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun8i-a83t-allwinner-h8homlet-v2.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun8i-a83t-cubietruck-plus.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun8i-a83t.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-2.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-one.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-pc.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/sunxi-itead-core-common.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/tps65217.dtsi - copied unchanged from r303380, vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-ace.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-sanji.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-b.dts - copied unchanged from r303380, vendor/device-tree/dist/src/arm/wd-mbwe.dts - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/clock/ath79-clk.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/clock/axis,artpec6-clkctrl.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/clock/hi3519-clock.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/clock/microchip,pic32-clock.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq4019.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/clock/rk3399-cru.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/gpio/meson-gxbb-gpio.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/gpio/tegra186-gpio.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/mfd/max77620.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/pinctrl/hisi.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/pinctrl/mt7623-pinfunc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/pinctrl/stm32f429-pinfunc.h - copied unchanged from r303380, vendor/device-tree/dist/include/dt-bindings/reset/pistachio-resets.h Directory Properties: head/sys/gnu/dts/arm/am335x-baltos-ir2110.dts (props changed) head/sys/gnu/dts/arm/am335x-baltos-ir3220.dts (props changed) head/sys/gnu/dts/arm/am335x-baltos.dtsi (props changed) head/sys/gnu/dts/arm/am335x-icev2.dts (props changed) head/sys/gnu/dts/arm/am572x-idk.dts (props changed) head/sys/gnu/dts/arm/am57xx-commercial-grade.dtsi (props changed) head/sys/gnu/dts/arm/am57xx-idk-common.dtsi (props changed) head/sys/gnu/dts/arm/am57xx-industrial-grade.dtsi (props changed) head/sys/gnu/dts/arm/arm-realview-eb-11mp-revb.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-11mp.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-a9mp.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-mp.dtsi (props changed) head/sys/gnu/dts/arm/arm-realview-eb.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb.dtsi (props changed) head/sys/gnu/dts/arm/arm-realview-pba8.dts (props changed) head/sys/gnu/dts/arm/arm-realview-pbx-a9.dts (props changed) head/sys/gnu/dts/arm/arm-realview-pbx.dtsi (props changed) head/sys/gnu/dts/arm/artpec6-devboard.dts (props changed) head/sys/gnu/dts/arm/artpec6.dtsi (props changed) head/sys/gnu/dts/arm/aspeed-ast2500-evb.dts (props changed) head/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts (props changed) head/sys/gnu/dts/arm/aspeed-g4.dtsi (props changed) head/sys/gnu/dts/arm/aspeed-g5.dtsi (props changed) head/sys/gnu/dts/arm/bcm2835-rpi-a.dts (props changed) head/sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts (props changed) head/sys/gnu/dts/arm/dra7-dspeve-thermal.dtsi (props changed) head/sys/gnu/dts/arm/dra7-iva-thermal.dtsi (props changed) head/sys/gnu/dts/arm/dra72-evm-common.dtsi (props changed) head/sys/gnu/dts/arm/dra72-evm-revc.dts (props changed) head/sys/gnu/dts/arm/exynos-syscon-restart.dtsi (props changed) head/sys/gnu/dts/arm/exynos3250-artik5-eval.dts (props changed) head/sys/gnu/dts/arm/exynos3250-artik5.dtsi (props changed) head/sys/gnu/dts/arm/exynos4412-ppmu-common.dtsi (props changed) head/sys/gnu/dts/arm/exynos5410-pinctrl.dtsi (props changed) head/sys/gnu/dts/arm/exynos5420-cpus.dtsi (props changed) head/sys/gnu/dts/arm/imx6dl-tx6s-8034.dts (props changed) head/sys/gnu/dts/arm/imx6dl-tx6s-8035.dts (props changed) head/sys/gnu/dts/arm/imx6dl-tx6u-8033.dts (props changed) head/sys/gnu/dts/arm/imx6dl-tx6u-81xx-mb7.dts (props changed) head/sys/gnu/dts/arm/imx6q-apalis-ixora.dts (props changed) head/sys/gnu/dts/arm/imx6q-b450v3.dts (props changed) head/sys/gnu/dts/arm/imx6q-b650v3.dts (props changed) head/sys/gnu/dts/arm/imx6q-b850v3.dts (props changed) head/sys/gnu/dts/arm/imx6q-ba16.dtsi (props changed) head/sys/gnu/dts/arm/imx6q-bx50v3.dtsi (props changed) head/sys/gnu/dts/arm/imx6q-evi.dts (props changed) head/sys/gnu/dts/arm/imx6q-icore-rqs.dts (props changed) head/sys/gnu/dts/arm/imx6q-marsboard.dts (props changed) head/sys/gnu/dts/arm/imx6q-tx6q-1036.dts (props changed) head/sys/gnu/dts/arm/imx6q-tx6q-11x0-mb7.dts (props changed) head/sys/gnu/dts/arm/imx6qdl-apalis.dtsi (props changed) head/sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi (props changed) head/sys/gnu/dts/arm/imx6qp-nitrogen6_max.dts (props changed) head/sys/gnu/dts/arm/imx6qp-sabreauto.dts (props changed) head/sys/gnu/dts/arm/imx6qp-sabresd.dts (props changed) head/sys/gnu/dts/arm/imx6qp.dtsi (props changed) head/sys/gnu/dts/arm/imx6sx-nitrogen6sx.dts (props changed) head/sys/gnu/dts/arm/imx6sx-sdb-sai.dts (props changed) head/sys/gnu/dts/arm/imx6ul-pico-hobbit.dts (props changed) head/sys/gnu/dts/arm/imx6ul-tx6ul-0010.dts (props changed) head/sys/gnu/dts/arm/imx6ul-tx6ul-0011.dts (props changed) head/sys/gnu/dts/arm/imx6ul-tx6ul-mainboard.dts (props changed) head/sys/gnu/dts/arm/imx6ul-tx6ul.dtsi (props changed) head/sys/gnu/dts/arm/imx7d-nitrogen7.dts (props changed) head/sys/gnu/dts/arm/keystone-k2e-clocks.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2e-evm.dts (props changed) head/sys/gnu/dts/arm/keystone-k2e-netcp.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2e.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2g-evm.dts (props changed) head/sys/gnu/dts/arm/keystone-k2g.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2hk-clocks.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2hk-evm.dts (props changed) head/sys/gnu/dts/arm/keystone-k2hk-netcp.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2hk.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2l-clocks.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2l-evm.dts (props changed) head/sys/gnu/dts/arm/keystone-k2l-netcp.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2l.dtsi (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation-6282.dtsi (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation-duo-6281.dtsi (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation-lsqvl.dts (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation-lsvl.dts (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation-lswsxl.dts (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation-lswvl.dts (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation-lswxl.dts (props changed) head/sys/gnu/dts/arm/kirkwood-linkstation.dtsi (props changed) head/sys/gnu/dts/arm/kirkwood-linksys-viper.dts (props changed) head/sys/gnu/dts/arm/logicpd-som-lv-37xx-devkit.dts (props changed) head/sys/gnu/dts/arm/logicpd-som-lv.dtsi (props changed) head/sys/gnu/dts/arm/lpc3250-ea3250.dts (props changed) head/sys/gnu/dts/arm/lpc3250-phy3250.dts (props changed) head/sys/gnu/dts/arm/mps2-an385.dts (props changed) head/sys/gnu/dts/arm/mps2-an399.dts (props changed) head/sys/gnu/dts/arm/mps2.dtsi (props changed) head/sys/gnu/dts/arm/mt2701-pinfunc.h (props changed) head/sys/gnu/dts/arm/mt7623-evb.dts (props changed) head/sys/gnu/dts/arm/mt7623.dtsi (props changed) head/sys/gnu/dts/arm/mvebu-linkstation-fan.dtsi (props changed) head/sys/gnu/dts/arm/mvebu-linkstation-gpio-simple.dtsi (props changed) head/sys/gnu/dts/arm/omap3-sniper.dts (props changed) head/sys/gnu/dts/arm/omap4-kc1.dts (props changed) head/sys/gnu/dts/arm/orion5x-kuroboxpro.dts (props changed) head/sys/gnu/dts/arm/orion5x-linkstation-lsgl.dts (props changed) head/sys/gnu/dts/arm/orion5x-linkstation.dtsi (props changed) head/sys/gnu/dts/arm/ox810se.dtsi (props changed) head/sys/gnu/dts/arm/qcom-apq8064-arrow-db600c-pins.dtsi (props changed) head/sys/gnu/dts/arm/qcom-apq8064-arrow-db600c.dts (props changed) head/sys/gnu/dts/arm/qcom-apq8064-asus-nexus7-flo.dts (props changed) head/sys/gnu/dts/arm/qcom-apq8064-pins.dtsi (props changed) head/sys/gnu/dts/arm/qcom-ipq4019-ap.dk01.1-c1.dts (props changed) head/sys/gnu/dts/arm/qcom-ipq4019-ap.dk01.1.dtsi (props changed) head/sys/gnu/dts/arm/qcom-ipq4019.dtsi (props changed) head/sys/gnu/dts/arm/rk3288-miqi.dts (props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_vining_fpga.dts (props changed) head/sys/gnu/dts/arm/stm32f469-disco.dts (props changed) head/sys/gnu/dts/arm/sun4i-a10-dserve-dsrv9703c.dts (props changed) head/sys/gnu/dts/arm/sun5i-a13-difrnce-dit4350.dts (props changed) head/sys/gnu/dts/arm/sun6i-a31s-colorfly-e708-q1.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-itead-ibox.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-lamobo-r1.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2-emmc.dts (props changed) head/sys/gnu/dts/arm/sun8i-a23-polaroid-mid2809pxe04.dts (props changed) head/sys/gnu/dts/arm/sun8i-a83t-allwinner-h8homlet-v2.dts (props changed) head/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts (props changed) head/sys/gnu/dts/arm/sun8i-a83t.dtsi (props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-2.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-one.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-pc.dts (props changed) head/sys/gnu/dts/arm/sunxi-itead-core-common.dtsi (props changed) head/sys/gnu/dts/arm/tps65217.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-ph1-pro4-ace.dts (props changed) head/sys/gnu/dts/arm/uniphier-ph1-pro4-sanji.dts (props changed) head/sys/gnu/dts/arm/vf610-zii-dev-rev-b.dts (props changed) head/sys/gnu/dts/arm/wd-mbwe.dts (props changed) head/sys/gnu/dts/include/dt-bindings/clock/ath79-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/axis,artpec6-clkctrl.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/hi3519-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/microchip,pic32-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq4019.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3399-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/meson-gxbb-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/tegra186-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/max77620.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/hisi.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/mt7623-pinfunc.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32f429-pinfunc.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/pistachio-resets.h (props changed) Deleted: head/sys/gnu/dts/arm/ea3250.dts head/sys/gnu/dts/arm/k2e-clocks.dtsi head/sys/gnu/dts/arm/k2e-evm.dts head/sys/gnu/dts/arm/k2e-netcp.dtsi head/sys/gnu/dts/arm/k2e.dtsi head/sys/gnu/dts/arm/k2hk-clocks.dtsi head/sys/gnu/dts/arm/k2hk-evm.dts head/sys/gnu/dts/arm/k2hk-netcp.dtsi head/sys/gnu/dts/arm/k2hk.dtsi head/sys/gnu/dts/arm/k2l-clocks.dtsi head/sys/gnu/dts/arm/k2l-evm.dts head/sys/gnu/dts/arm/k2l-netcp.dtsi head/sys/gnu/dts/arm/k2l.dtsi head/sys/gnu/dts/arm/kirkwood-lswvl.dts head/sys/gnu/dts/arm/kirkwood-lswxl.dts head/sys/gnu/dts/arm/phy3250.dts head/sys/gnu/dts/arm/rk3288-thermal.dtsi Modified: head/sys/gnu/dts/arm/alpine.dtsi (contents, props changed) head/sys/gnu/dts/arm/am335x-baltos-ir5221.dts (contents, props changed) head/sys/gnu/dts/arm/am335x-bone-common.dtsi head/sys/gnu/dts/arm/am335x-chiliboard.dts (contents, props changed) head/sys/gnu/dts/arm/am335x-chilisom.dtsi (contents, props changed) head/sys/gnu/dts/arm/am335x-cm-t335.dts (contents, props changed) head/sys/gnu/dts/arm/am335x-evm.dts head/sys/gnu/dts/arm/am335x-igep0033.dtsi head/sys/gnu/dts/arm/am335x-nano.dts head/sys/gnu/dts/arm/am335x-pepper.dts head/sys/gnu/dts/arm/am335x-phycore-som.dtsi (contents, props changed) head/sys/gnu/dts/arm/am335x-shc.dts (contents, props changed) head/sys/gnu/dts/arm/am335x-sl50.dts (contents, props changed) head/sys/gnu/dts/arm/am33xx-clocks.dtsi head/sys/gnu/dts/arm/am33xx.dtsi head/sys/gnu/dts/arm/am35xx-clocks.dtsi head/sys/gnu/dts/arm/am4372.dtsi head/sys/gnu/dts/arm/am437x-cm-t43.dts (contents, props changed) head/sys/gnu/dts/arm/am437x-gp-evm.dts head/sys/gnu/dts/arm/am437x-sk-evm.dts head/sys/gnu/dts/arm/am43x-epos-evm.dts head/sys/gnu/dts/arm/am43xx-clocks.dtsi head/sys/gnu/dts/arm/am57xx-beagle-x15.dts head/sys/gnu/dts/arm/am57xx-cl-som-am57x.dts (contents, props changed) head/sys/gnu/dts/arm/am57xx-sbc-am57x.dts (contents, props changed) head/sys/gnu/dts/arm/arm-realview-pb1176.dts head/sys/gnu/dts/arm/arm-realview-pb11mp.dts (contents, props changed) head/sys/gnu/dts/arm/armada-370-db.dts head/sys/gnu/dts/arm/armada-370-mirabox.dts head/sys/gnu/dts/arm/armada-370-netgear-rn104.dts head/sys/gnu/dts/arm/armada-370-synology-ds213j.dts head/sys/gnu/dts/arm/armada-375.dtsi head/sys/gnu/dts/arm/armada-385-db-ap.dts head/sys/gnu/dts/arm/armada-385-linksys.dtsi (contents, props changed) head/sys/gnu/dts/arm/armada-388-clearfog.dts (contents, props changed) head/sys/gnu/dts/arm/armada-388-db.dts head/sys/gnu/dts/arm/armada-388-gp.dts head/sys/gnu/dts/arm/armada-38x-solidrun-microsom.dtsi (contents, props changed) head/sys/gnu/dts/arm/armada-38x.dtsi head/sys/gnu/dts/arm/armada-xp-axpwifiap.dts head/sys/gnu/dts/arm/armada-xp-db.dts head/sys/gnu/dts/arm/armada-xp-gp.dts head/sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts head/sys/gnu/dts/arm/armada-xp-linksys-mamba.dts (contents, props changed) head/sys/gnu/dts/arm/armada-xp-matrix.dts head/sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts head/sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts head/sys/gnu/dts/arm/armada-xp-synology-ds414.dts head/sys/gnu/dts/arm/armada-xp.dtsi head/sys/gnu/dts/arm/armv7-m.dtsi head/sys/gnu/dts/arm/at91-sama5d2_xplained.dts (contents, props changed) head/sys/gnu/dts/arm/at91-sama5d4_xplained.dts (contents, props changed) head/sys/gnu/dts/arm/at91-sama5d4ek.dts head/sys/gnu/dts/arm/at91-vinco.dts (contents, props changed) head/sys/gnu/dts/arm/axm55xx.dtsi (contents, props changed) head/sys/gnu/dts/arm/bcm-cygnus-clock.dtsi head/sys/gnu/dts/arm/bcm-cygnus.dtsi head/sys/gnu/dts/arm/bcm-nsp.dtsi (contents, props changed) head/sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts (contents, props changed) head/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts head/sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts (contents, props changed) head/sys/gnu/dts/arm/bcm2835-rpi-b.dts head/sys/gnu/dts/arm/bcm2835-rpi.dtsi head/sys/gnu/dts/arm/bcm2835.dtsi head/sys/gnu/dts/arm/bcm2836-rpi-2-b.dts (contents, props changed) head/sys/gnu/dts/arm/bcm283x.dtsi (contents, props changed) head/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts head/sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts head/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts head/sys/gnu/dts/arm/bcm4708-smartrg-sr400ac.dts (contents, props changed) head/sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts head/sys/gnu/dts/arm/bcm4709-buffalo-wxr-1900dhp.dts (contents, props changed) head/sys/gnu/dts/arm/bcm4709-netgear-r8000.dts (contents, props changed) head/sys/gnu/dts/arm/bcm5301x.dtsi head/sys/gnu/dts/arm/cros-adc-thermistors.dtsi head/sys/gnu/dts/arm/cros-ec-keyboard.dtsi head/sys/gnu/dts/arm/da850-enbw-cmc.dts head/sys/gnu/dts/arm/da850-evm.dts head/sys/gnu/dts/arm/da850.dtsi head/sys/gnu/dts/arm/dm8148-evm.dts (contents, props changed) head/sys/gnu/dts/arm/dm8148-t410.dts (contents, props changed) head/sys/gnu/dts/arm/dm814x-clocks.dtsi (contents, props changed) head/sys/gnu/dts/arm/dm814x.dtsi (contents, props changed) head/sys/gnu/dts/arm/dm8168-evm.dts head/sys/gnu/dts/arm/dm816x-clocks.dtsi head/sys/gnu/dts/arm/dm816x.dtsi head/sys/gnu/dts/arm/dra62x-clocks.dtsi (contents, props changed) head/sys/gnu/dts/arm/dra62x-j5eco-evm.dts (contents, props changed) head/sys/gnu/dts/arm/dra7-evm.dts head/sys/gnu/dts/arm/dra7.dtsi head/sys/gnu/dts/arm/dra72-evm.dts head/sys/gnu/dts/arm/dra74x.dtsi head/sys/gnu/dts/arm/dra7xx-clocks.dtsi head/sys/gnu/dts/arm/emev2-kzm9d.dts head/sys/gnu/dts/arm/emev2.dtsi head/sys/gnu/dts/arm/exynos3250-monk.dts head/sys/gnu/dts/arm/exynos3250-pinctrl.dtsi head/sys/gnu/dts/arm/exynos3250-rinato.dts head/sys/gnu/dts/arm/exynos3250.dtsi head/sys/gnu/dts/arm/exynos4.dtsi head/sys/gnu/dts/arm/exynos4210-origen.dts head/sys/gnu/dts/arm/exynos4210-pinctrl.dtsi head/sys/gnu/dts/arm/exynos4210-smdkv310.dts head/sys/gnu/dts/arm/exynos4210-trats.dts head/sys/gnu/dts/arm/exynos4210-universal_c210.dts head/sys/gnu/dts/arm/exynos4210.dtsi head/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi head/sys/gnu/dts/arm/exynos4412-odroidx.dts head/sys/gnu/dts/arm/exynos4412-origen.dts head/sys/gnu/dts/arm/exynos4412-smdk4412.dts head/sys/gnu/dts/arm/exynos4412-trats2.dts head/sys/gnu/dts/arm/exynos4415.dtsi head/sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi head/sys/gnu/dts/arm/exynos4x12.dtsi head/sys/gnu/dts/arm/exynos5.dtsi head/sys/gnu/dts/arm/exynos5250-arndale.dts head/sys/gnu/dts/arm/exynos5250-smdk5250.dts head/sys/gnu/dts/arm/exynos5250-snow-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/exynos5250-spring.dts head/sys/gnu/dts/arm/exynos5250.dtsi head/sys/gnu/dts/arm/exynos5410-smdk5410.dts head/sys/gnu/dts/arm/exynos5410.dtsi head/sys/gnu/dts/arm/exynos5420-arndale-octa.dts head/sys/gnu/dts/arm/exynos5420-peach-pit.dts (contents, props changed) head/sys/gnu/dts/arm/exynos5420-smdk5420.dts head/sys/gnu/dts/arm/exynos5420.dtsi head/sys/gnu/dts/arm/exynos5422-cpu-thermal.dtsi (contents, props changed) head/sys/gnu/dts/arm/exynos5422-cpus.dtsi (contents, props changed) head/sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/exynos5440.dtsi head/sys/gnu/dts/arm/exynos5800-peach-pi.dts (contents, props changed) head/sys/gnu/dts/arm/exynos5800.dtsi head/sys/gnu/dts/arm/hi3620.dtsi head/sys/gnu/dts/arm/hip01.dtsi head/sys/gnu/dts/arm/hisi-x5hd2.dtsi head/sys/gnu/dts/arm/imx23.dtsi head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts head/sys/gnu/dts/arm/imx25-pinfunc.h head/sys/gnu/dts/arm/imx25.dtsi head/sys/gnu/dts/arm/imx28-apf28dev.dts head/sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi head/sys/gnu/dts/arm/imx28-m28.dtsi head/sys/gnu/dts/arm/imx28-tx28.dts head/sys/gnu/dts/arm/imx28.dtsi head/sys/gnu/dts/arm/imx31.dtsi head/sys/gnu/dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts head/sys/gnu/dts/arm/imx35.dtsi head/sys/gnu/dts/arm/imx51-pinfunc.h head/sys/gnu/dts/arm/imx6q-tbs2910.dts head/sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-gw552x.dtsi head/sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi head/sys/gnu/dts/arm/imx6qdl-microsom.dtsi head/sys/gnu/dts/arm/imx6qdl-nit6xlite.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-nitrogen6_max.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-udoo.dtsi head/sys/gnu/dts/arm/imx6sl-warp.dts (contents, props changed) head/sys/gnu/dts/arm/imx6sx-sabreauto.dts head/sys/gnu/dts/arm/imx6sx-sdb.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6ul-14x14-evk.dts (contents, props changed) head/sys/gnu/dts/arm/imx6ul-pinfunc.h (contents, props changed) head/sys/gnu/dts/arm/imx6ul.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx7d-sbc-imx7.dts (contents, props changed) head/sys/gnu/dts/arm/imx7d-sdb.dts (contents, props changed) head/sys/gnu/dts/arm/imx7d.dtsi (contents, props changed) head/sys/gnu/dts/arm/integrator.dtsi head/sys/gnu/dts/arm/keystone.dtsi head/sys/gnu/dts/arm/kirkwood-6192.dtsi head/sys/gnu/dts/arm/kirkwood-6281.dtsi head/sys/gnu/dts/arm/kirkwood-6282.dtsi head/sys/gnu/dts/arm/kirkwood-98dx4122.dtsi head/sys/gnu/dts/arm/kirkwood-b3.dts head/sys/gnu/dts/arm/kirkwood-blackarmor-nas220.dts head/sys/gnu/dts/arm/kirkwood-cloudbox.dts head/sys/gnu/dts/arm/kirkwood-db-88f6281.dts head/sys/gnu/dts/arm/kirkwood-db-88f6282.dts head/sys/gnu/dts/arm/kirkwood-dir665.dts head/sys/gnu/dts/arm/kirkwood-dnskw.dtsi head/sys/gnu/dts/arm/kirkwood-ds111.dts head/sys/gnu/dts/arm/kirkwood-ds112.dts head/sys/gnu/dts/arm/kirkwood-ds212.dts head/sys/gnu/dts/arm/kirkwood-ds411.dts head/sys/gnu/dts/arm/kirkwood-ds411slim.dts head/sys/gnu/dts/arm/kirkwood-ib62x0.dts head/sys/gnu/dts/arm/kirkwood-iconnect.dts head/sys/gnu/dts/arm/kirkwood-km_common.dtsi head/sys/gnu/dts/arm/kirkwood-laplug.dts head/sys/gnu/dts/arm/kirkwood-lsxl.dtsi head/sys/gnu/dts/arm/kirkwood-mplcec4.dts head/sys/gnu/dts/arm/kirkwood-mv88f6281gtw-ge.dts head/sys/gnu/dts/arm/kirkwood-nas2big.dts (contents, props changed) head/sys/gnu/dts/arm/kirkwood-netgear_readynas_duo_v2.dts head/sys/gnu/dts/arm/kirkwood-netgear_readynas_nv+_v2.dts head/sys/gnu/dts/arm/kirkwood-netxbig.dtsi head/sys/gnu/dts/arm/kirkwood-ns2-common.dtsi head/sys/gnu/dts/arm/kirkwood-nsa310.dts head/sys/gnu/dts/arm/kirkwood-nsa320.dts head/sys/gnu/dts/arm/kirkwood-nsa325.dts (contents, props changed) head/sys/gnu/dts/arm/kirkwood-nsa3x0-common.dtsi head/sys/gnu/dts/arm/kirkwood-openblocks_a6.dts head/sys/gnu/dts/arm/kirkwood-openblocks_a7.dts head/sys/gnu/dts/arm/kirkwood-openrd-client.dts head/sys/gnu/dts/arm/kirkwood-openrd.dtsi head/sys/gnu/dts/arm/kirkwood-pogoplug-series-4.dts (contents, props changed) head/sys/gnu/dts/arm/kirkwood-rd88f6192.dts head/sys/gnu/dts/arm/kirkwood-rd88f6281-a.dts head/sys/gnu/dts/arm/kirkwood-rd88f6281-z0.dts head/sys/gnu/dts/arm/kirkwood-rd88f6281.dtsi head/sys/gnu/dts/arm/kirkwood-rs212.dts head/sys/gnu/dts/arm/kirkwood-synology.dtsi head/sys/gnu/dts/arm/kirkwood-t5325.dts head/sys/gnu/dts/arm/kirkwood-ts219-6281.dts head/sys/gnu/dts/arm/kirkwood-ts219-6282.dts head/sys/gnu/dts/arm/kirkwood-ts219.dtsi head/sys/gnu/dts/arm/kirkwood-ts419-6282.dts head/sys/gnu/dts/arm/kirkwood-ts419.dtsi head/sys/gnu/dts/arm/kirkwood.dtsi head/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit.dts (contents, props changed) head/sys/gnu/dts/arm/logicpd-torpedo-som.dtsi (contents, props changed) head/sys/gnu/dts/arm/lpc18xx.dtsi (contents, props changed) head/sys/gnu/dts/arm/lpc32xx.dtsi head/sys/gnu/dts/arm/lpc4350-hitex-eval.dts (contents, props changed) head/sys/gnu/dts/arm/lpc4357-ea4357-devkit.dts (contents, props changed) head/sys/gnu/dts/arm/ls1021a.dtsi head/sys/gnu/dts/arm/meson8.dtsi head/sys/gnu/dts/arm/meson8b.dtsi (contents, props changed) head/sys/gnu/dts/arm/mt2701.dtsi (contents, props changed) head/sys/gnu/dts/arm/omap2420-clocks.dtsi head/sys/gnu/dts/arm/omap2420-n8x0-common.dtsi head/sys/gnu/dts/arm/omap2420.dtsi head/sys/gnu/dts/arm/omap2430-clocks.dtsi head/sys/gnu/dts/arm/omap2430.dtsi head/sys/gnu/dts/arm/omap24xx-clocks.dtsi head/sys/gnu/dts/arm/omap3-beagle.dts head/sys/gnu/dts/arm/omap3-cm-t3x.dtsi head/sys/gnu/dts/arm/omap3-devkit8000-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/omap3-evm-37xx.dts head/sys/gnu/dts/arm/omap3-gta04.dtsi head/sys/gnu/dts/arm/omap3-igep.dtsi head/sys/gnu/dts/arm/omap3-igep0020-common.dtsi head/sys/gnu/dts/arm/omap3-igep0030-common.dtsi head/sys/gnu/dts/arm/omap3-ldp.dts head/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi head/sys/gnu/dts/arm/omap3-n9.dts head/sys/gnu/dts/arm/omap3-n900.dts head/sys/gnu/dts/arm/omap3-n950-n9.dtsi head/sys/gnu/dts/arm/omap3-n950.dts head/sys/gnu/dts/arm/omap3-overo-base.dtsi head/sys/gnu/dts/arm/omap3-pandora-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/omap3-tao3530.dtsi head/sys/gnu/dts/arm/omap3-zoom3.dts head/sys/gnu/dts/arm/omap3.dtsi head/sys/gnu/dts/arm/omap3430-sdp.dts head/sys/gnu/dts/arm/omap3430es1-clocks.dtsi head/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi head/sys/gnu/dts/arm/omap34xx.dtsi head/sys/gnu/dts/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi head/sys/gnu/dts/arm/omap36xx-clocks.dtsi head/sys/gnu/dts/arm/omap36xx-omap3430es2plus-clocks.dtsi head/sys/gnu/dts/arm/omap36xx.dtsi head/sys/gnu/dts/arm/omap3xxx-clocks.dtsi head/sys/gnu/dts/arm/omap4-var-som-om44.dtsi head/sys/gnu/dts/arm/omap4.dtsi head/sys/gnu/dts/arm/omap443x-clocks.dtsi head/sys/gnu/dts/arm/omap443x.dtsi head/sys/gnu/dts/arm/omap4460.dtsi head/sys/gnu/dts/arm/omap446x-clocks.dtsi head/sys/gnu/dts/arm/omap44xx-clocks.dtsi head/sys/gnu/dts/arm/omap5-board-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/omap5-cm-t54.dts head/sys/gnu/dts/arm/omap5-igep0050.dts (contents, props changed) head/sys/gnu/dts/arm/omap5-uevm.dts head/sys/gnu/dts/arm/omap5.dtsi head/sys/gnu/dts/arm/omap54xx-clocks.dtsi head/sys/gnu/dts/arm/orion5x-linkstation-lswtgl.dts (contents, props changed) head/sys/gnu/dts/arm/pxa27x.dtsi head/sys/gnu/dts/arm/pxa3xx.dtsi head/sys/gnu/dts/arm/qcom-apq8064-cm-qs600.dts (contents, props changed) head/sys/gnu/dts/arm/qcom-apq8064-ifc6410.dts (contents, props changed) head/sys/gnu/dts/arm/qcom-apq8064.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-apq8084.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-ipq8064.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-msm8660.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-msm8960.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-msm8974.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-pm8841.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-pm8941.dtsi (contents, props changed) head/sys/gnu/dts/arm/r7s72100.dtsi head/sys/gnu/dts/arm/r8a73a4-ape6evm.dts head/sys/gnu/dts/arm/r8a73a4.dtsi head/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts head/sys/gnu/dts/arm/r8a7740.dtsi head/sys/gnu/dts/arm/r8a7778-bockw.dts head/sys/gnu/dts/arm/r8a7778.dtsi head/sys/gnu/dts/arm/r8a7779-marzen.dts head/sys/gnu/dts/arm/r8a7779.dtsi head/sys/gnu/dts/arm/r8a7790-lager.dts head/sys/gnu/dts/arm/r8a7790.dtsi head/sys/gnu/dts/arm/r8a7791-koelsch.dts head/sys/gnu/dts/arm/r8a7791-porter.dts (contents, props changed) head/sys/gnu/dts/arm/r8a7791.dtsi head/sys/gnu/dts/arm/r8a7793-gose.dts (contents, props changed) head/sys/gnu/dts/arm/r8a7793.dtsi (contents, props changed) head/sys/gnu/dts/arm/r8a7794-alt.dts head/sys/gnu/dts/arm/r8a7794-silk.dts (contents, props changed) head/sys/gnu/dts/arm/r8a7794.dtsi head/sys/gnu/dts/arm/rk3036-evb.dts (contents, props changed) head/sys/gnu/dts/arm/rk3036-kylin.dts (contents, props changed) head/sys/gnu/dts/arm/rk3036.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3066a-bqcurie2.dts head/sys/gnu/dts/arm/rk3066a-marsboard.dts head/sys/gnu/dts/arm/rk3066a-rayeager.dts head/sys/gnu/dts/arm/rk3066a.dtsi head/sys/gnu/dts/arm/rk3188-radxarock.dts head/sys/gnu/dts/arm/rk3188.dtsi head/sys/gnu/dts/arm/rk3228-evb.dts (contents, props changed) head/sys/gnu/dts/arm/rk3228.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288-evb.dtsi head/sys/gnu/dts/arm/rk3288-firefly.dtsi head/sys/gnu/dts/arm/rk3288-popmetal.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-r89.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-rock2-som.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288-rock2-square.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-chromebook.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-jaq.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-jerry.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-minnie.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-pinky.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-speedy.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288.dtsi head/sys/gnu/dts/arm/rk3xxx.dtsi head/sys/gnu/dts/arm/s5pv210-aquila.dts head/sys/gnu/dts/arm/s5pv210-goni.dts head/sys/gnu/dts/arm/s5pv210-smdkv210.dts head/sys/gnu/dts/arm/s5pv210.dtsi head/sys/gnu/dts/arm/sama5d2-pinfunc.h (contents, props changed) head/sys/gnu/dts/arm/sama5d2.dtsi (contents, props changed) head/sys/gnu/dts/arm/sama5d4.dtsi head/sys/gnu/dts/arm/sh73a0-kzm9g.dts head/sys/gnu/dts/arm/sh73a0.dtsi head/sys/gnu/dts/arm/socfpga.dtsi (contents, props changed) head/sys/gnu/dts/arm/socfpga_arria10.dtsi (contents, props changed) head/sys/gnu/dts/arm/socfpga_arria10_socdk_sdmmc.dts (contents, props changed) head/sys/gnu/dts/arm/socfpga_cyclone5.dtsi (contents, props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_sockit.dts (contents, props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_socrates.dts (contents, props changed) head/sys/gnu/dts/arm/spear1310-evb.dts head/sys/gnu/dts/arm/spear1340-evb.dts head/sys/gnu/dts/arm/spear13xx.dtsi head/sys/gnu/dts/arm/spear320-hmi.dts head/sys/gnu/dts/arm/ste-ccu9540.dts head/sys/gnu/dts/arm/ste-dbx5x0.dtsi head/sys/gnu/dts/arm/ste-href-stuib.dtsi head/sys/gnu/dts/arm/ste-href-tvk1281618.dtsi head/sys/gnu/dts/arm/ste-hrefprev60.dtsi head/sys/gnu/dts/arm/ste-hrefv60plus.dtsi head/sys/gnu/dts/arm/ste-nomadik-nhk15.dts head/sys/gnu/dts/arm/ste-nomadik-stn8815.dtsi head/sys/gnu/dts/arm/ste-snowball.dts head/sys/gnu/dts/arm/ste-u300.dts head/sys/gnu/dts/arm/stih407-family.dtsi head/sys/gnu/dts/arm/stm32429i-eval.dts (contents, props changed) head/sys/gnu/dts/arm/stm32f429-disco.dts (contents, props changed) head/sys/gnu/dts/arm/stm32f429.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun4i-a10-a1000.dts head/sys/gnu/dts/arm/sun4i-a10-chuwi-v7-cw0825.dts head/sys/gnu/dts/arm/sun4i-a10-hyundai-a7hd.dts head/sys/gnu/dts/arm/sun4i-a10-inet97fv2.dts head/sys/gnu/dts/arm/sun4i-a10-inet9f-rev03.dts (contents, props changed) head/sys/gnu/dts/arm/sun4i-a10-itead-iteaduino-plus.dts (contents, props changed) head/sys/gnu/dts/arm/sun4i-a10-mk802.dts head/sys/gnu/dts/arm/sun4i-a10.dtsi head/sys/gnu/dts/arm/sun5i-a10s.dtsi head/sys/gnu/dts/arm/sun5i-a13-empire-electronix-d709.dts (contents, props changed) head/sys/gnu/dts/arm/sun5i-a13-inet-98v-rev2.dts (contents, props changed) head/sys/gnu/dts/arm/sun5i-a13-olinuxino-micro.dts head/sys/gnu/dts/arm/sun5i-a13.dtsi head/sys/gnu/dts/arm/sun5i-r8-chip.dts (contents, props changed) head/sys/gnu/dts/arm/sun5i-r8.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun5i.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun6i-a31.dtsi head/sys/gnu/dts/arm/sun6i-a31s-primo81.dts (contents, props changed) head/sys/gnu/dts/arm/sun6i-a31s-sina31s-core.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun6i-a31s-yones-toptech-bs1078-v2.dts (contents, props changed) head/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts head/sys/gnu/dts/arm/sun7i-a20-mk808c.dts (contents, props changed) head/sys/gnu/dts/arm/sun7i-a20-olimex-som-evb.dts (contents, props changed) head/sys/gnu/dts/arm/sun7i-a20.dtsi head/sys/gnu/dts/arm/sun8i-a23-a33.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun8i-a23-gt90h-v4.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-a33-sinlinx-sina33.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-plus.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-h3.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun8i-q8-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun9i-a80-cubieboard4.dts (contents, props changed) head/sys/gnu/dts/arm/sun9i-a80-optimus.dts head/sys/gnu/dts/arm/sun9i-a80.dtsi head/sys/gnu/dts/arm/tango4-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/tango4-smp8758.dtsi (contents, props changed) head/sys/gnu/dts/arm/tango4-vantage-1172.dts (contents, props changed) head/sys/gnu/dts/arm/tegra114-dalmore.dts head/sys/gnu/dts/arm/tegra114-roth.dts head/sys/gnu/dts/arm/tegra114-tn7.dts head/sys/gnu/dts/arm/tegra114.dtsi head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts head/sys/gnu/dts/arm/tegra124-nyan.dtsi (contents, props changed) head/sys/gnu/dts/arm/tegra124-venice2.dts head/sys/gnu/dts/arm/tegra124.dtsi head/sys/gnu/dts/arm/tegra20-harmony.dts head/sys/gnu/dts/arm/tegra20-iris-512.dts head/sys/gnu/dts/arm/tegra20-medcom-wide.dts head/sys/gnu/dts/arm/tegra20-paz00.dts head/sys/gnu/dts/arm/tegra20-seaboard.dts head/sys/gnu/dts/arm/tegra20-tamonten.dtsi head/sys/gnu/dts/arm/tegra20-trimslice.dts head/sys/gnu/dts/arm/tegra20-ventana.dts head/sys/gnu/dts/arm/tegra20-whistler.dts head/sys/gnu/dts/arm/tegra20.dtsi head/sys/gnu/dts/arm/tegra30-apalis-eval.dts head/sys/gnu/dts/arm/tegra30-beaver.dts head/sys/gnu/dts/arm/tegra30-cardhu.dtsi head/sys/gnu/dts/arm/tegra30-colibri-eval-v3.dts head/sys/gnu/dts/arm/tegra30.dtsi head/sys/gnu/dts/arm/twl6030.dtsi head/sys/gnu/dts/arm/uniphier-common32.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-ld4-ref.dts (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-ld4.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-ld6b-ref.dts (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-pro4-ref.dts (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-pro4.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-pro5.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-sld3-ref.dts (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-sld3.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-sld8-ref.dts (contents, props changed) head/sys/gnu/dts/arm/uniphier-ph1-sld8.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-pinctrl.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-proxstream2-gentil.dts (contents, props changed) head/sys/gnu/dts/arm/uniphier-proxstream2.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-ref-daughter.dtsi (contents, props changed) head/sys/gnu/dts/arm/uniphier-support-card.dtsi (contents, props changed) head/sys/gnu/dts/arm/versatile-ab.dts head/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi head/sys/gnu/dts/arm/vexpress-v2m.dtsi head/sys/gnu/dts/arm/vexpress-v2p-ca15-tc1.dts head/sys/gnu/dts/arm/vexpress-v2p-ca15_a7.dts head/sys/gnu/dts/arm/vexpress-v2p-ca5s.dts head/sys/gnu/dts/arm/vexpress-v2p-ca9.dts head/sys/gnu/dts/arm/vf-colibri-eval-v3.dtsi head/sys/gnu/dts/arm/vf-colibri.dtsi head/sys/gnu/dts/arm/vf500-colibri-eval-v3.dts head/sys/gnu/dts/arm/vf500-colibri.dtsi head/sys/gnu/dts/arm/vf500.dtsi head/sys/gnu/dts/arm/vf610-colibri-eval-v3.dts head/sys/gnu/dts/arm/vf610-colibri.dtsi head/sys/gnu/dts/arm/vf610-twr.dts head/sys/gnu/dts/arm/vfxxx.dtsi head/sys/gnu/dts/arm/zynq-parallella.dts head/sys/gnu/dts/arm/zynq-zc702.dts head/sys/gnu/dts/arm/zynq-zc706.dts head/sys/gnu/dts/arm/zynq-zed.dts head/sys/gnu/dts/arm/zynq-zybo.dts head/sys/gnu/dts/include/dt-bindings/clock/bcm-cygnus.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/bcm2835.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos3250.h head/sys/gnu/dts/include/dt-bindings/clock/exynos5433.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx6qdl-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx7d-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/lpc32xx-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/mt8173-clk.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8916.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8996.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8996.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7793-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7794-clock.h head/sys/gnu/dts/include/dt-bindings/clock/rk3036-cru.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru-common.h head/sys/gnu/dts/include/dt-bindings/clock/rk3228-cru.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/tegra210-car.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/input/linux-event-codes.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/mfd/arizona.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/thermal/tegra124-soctherm.h Directory Properties: head/ (props changed) head/lib/libc/locale/ascii.c (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/ipfilter/ (props changed) head/sys/contrib/libfdt/ (props changed) head/sys/contrib/octeon-sdk/ (props changed) head/sys/contrib/x86emu/ (props changed) head/sys/contrib/xz-embedded/ (props changed) head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/arm/alphascale-asm9260-devkit.dts (props changed) head/sys/gnu/dts/arm/alphascale-asm9260.dtsi (props changed) head/sys/gnu/dts/arm/alpine-db.dts (props changed) head/sys/gnu/dts/arm/am335x-bonegreen.dts (props changed) head/sys/gnu/dts/arm/am335x-sbc-t335.dts (props changed) head/sys/gnu/dts/arm/am335x-wega-rdk.dts (props changed) head/sys/gnu/dts/arm/am335x-wega.dtsi (props changed) head/sys/gnu/dts/arm/am437x-sbc-t43.dts (props changed) head/sys/gnu/dts/arm/armada-370-dlink-dns327l.dts (props changed) head/sys/gnu/dts/arm/armada-370-seagate-nas-2bay.dts (props changed) head/sys/gnu/dts/arm/armada-370-seagate-nas-4bay.dts (props changed) head/sys/gnu/dts/arm/armada-370-seagate-nas-xbay.dtsi (props changed) head/sys/gnu/dts/arm/armada-370-seagate-personal-cloud-2bay.dts (props changed) head/sys/gnu/dts/arm/armada-370-seagate-personal-cloud.dts (props changed) head/sys/gnu/dts/arm/armada-370-seagate-personal-cloud.dtsi (props changed) head/sys/gnu/dts/arm/armada-385-linksys-caiman.dts (props changed) head/sys/gnu/dts/arm/armada-385-linksys-cobra.dts (props changed) head/sys/gnu/dts/arm/armada-390.dtsi (props changed) head/sys/gnu/dts/arm/armada-398-db.dts (props changed) head/sys/gnu/dts/arm/armada-398.dtsi (props changed) head/sys/gnu/dts/arm/armada-39x.dtsi (props changed) head/sys/gnu/dts/arm/at91-ariettag25.dts (props changed) head/sys/gnu/dts/arm/at91-kizbox.dts (props changed) head/sys/gnu/dts/arm/at91-kizbox2.dts (props changed) head/sys/gnu/dts/arm/at91-kizboxmini.dts (props changed) head/sys/gnu/dts/arm/at91-sama5d4_ma5d4.dtsi (props changed) head/sys/gnu/dts/arm/at91-sama5d4_ma5d4evk.dts (props changed) head/sys/gnu/dts/arm/at91sam9x5dm.dtsi (props changed) head/sys/gnu/dts/arm/axm5516-amarillo.dts (props changed) head/sys/gnu/dts/arm/axp152.dtsi (props changed) head/sys/gnu/dts/arm/axp22x.dtsi (props changed) head/sys/gnu/dts/arm/bcm2836.dtsi (props changed) head/sys/gnu/dts/arm/bcm4708-asus-rt-ac56u.dts (props changed) head/sys/gnu/dts/arm/bcm4708-asus-rt-ac68u.dts (props changed) head/sys/gnu/dts/arm/bcm4709-asus-rt-ac87u.dts (props changed) head/sys/gnu/dts/arm/bcm4709-netgear-r7000.dts (props changed) head/sys/gnu/dts/arm/bcm5301x-nand-cs0-bch8.dtsi (props changed) head/sys/gnu/dts/arm/bcm94708.dts (props changed) head/sys/gnu/dts/arm/bcm94709.dts (props changed) head/sys/gnu/dts/arm/bcm953012k.dts (props changed) head/sys/gnu/dts/arm/bcm958305k.dts (props changed) head/sys/gnu/dts/arm/bcm958625k.dts (props changed) head/sys/gnu/dts/arm/bcm9hmidc.dtsi (props changed) head/sys/gnu/dts/arm/compulab-sb-som.dtsi (props changed) head/sys/gnu/dts/arm/cros-ec-sbs.dtsi (props changed) head/sys/gnu/dts/arm/dove-cm-a510.dtsi (props changed) head/sys/gnu/dts/arm/dove-sbc-a510.dts (props changed) head/sys/gnu/dts/arm/dra62x.dtsi (props changed) head/sys/gnu/dts/arm/exynos4-cpu-thermal.dtsi (props changed) head/sys/gnu/dts/arm/exynos4412-tmu-sensor-conf.dtsi (props changed) head/sys/gnu/dts/arm/exynos5250-snow-rev5.dts (props changed) head/sys/gnu/dts/arm/exynos5250-snow.dts (props changed) head/sys/gnu/dts/arm/exynos5420-trip-points.dtsi (props changed) head/sys/gnu/dts/arm/exynos5422-odroidxu3-audio.dtsi (props changed) head/sys/gnu/dts/arm/exynos5422-odroidxu3-lite.dts (props changed) head/sys/gnu/dts/arm/exynos5422-odroidxu4.dts (props changed) head/sys/gnu/dts/arm/exynos5440-tmu-sensor-conf.dtsi (props changed) head/sys/gnu/dts/arm/exynos5440-trip-points.dtsi (props changed) head/sys/gnu/dts/arm/imx51-ts4800.dts (props changed) head/sys/gnu/dts/arm/imx6dl-apf6dev.dts (props changed) head/sys/gnu/dts/arm/imx6dl-aristainetos2_4.dts (props changed) head/sys/gnu/dts/arm/imx6dl-aristainetos2_7.dts (props changed) head/sys/gnu/dts/arm/imx6dl-gw551x.dts (props changed) head/sys/gnu/dts/arm/imx6dl-nit6xlite.dts (props changed) head/sys/gnu/dts/arm/imx6q-apf6dev.dts (props changed) head/sys/gnu/dts/arm/imx6q-gw551x.dts (props changed) head/sys/gnu/dts/arm/imx6q-nitrogen6_max.dts (props changed) head/sys/gnu/dts/arm/imx6q-novena.dts (props changed) head/sys/gnu/dts/arm/imx6qdl-apf6.dtsi (props changed) head/sys/gnu/dts/arm/imx6qdl-aristainetos2.dtsi (props changed) head/sys/gnu/dts/arm/imx6qdl-gw551x.dtsi (props changed) head/sys/gnu/dts/arm/imx6sx-sdb-reva.dts (props changed) head/sys/gnu/dts/arm/imx7d-cl-som-imx7.dts (props changed) head/sys/gnu/dts/arm/imx7d-pinfunc.h (props changed) head/sys/gnu/dts/arm/lpc4337-ciaa.dts (props changed) head/sys/gnu/dts/arm/lpc4350.dtsi (props changed) head/sys/gnu/dts/arm/lpc4357.dtsi (props changed) head/sys/gnu/dts/arm/meson8-minix-neo-x8.dts (props changed) head/sys/gnu/dts/arm/meson8b-mxq.dts (props changed) head/sys/gnu/dts/arm/meson8b-odroidc1.dts (props changed) head/sys/gnu/dts/arm/mmp2-brownstone.dts (props changed) head/sys/gnu/dts/arm/mmp2.dtsi (props changed) head/sys/gnu/dts/arm/mt2701-evb.dts (props changed) head/sys/gnu/dts/arm/mt6580-evbp1.dts (props changed) head/sys/gnu/dts/arm/mt6580.dtsi (props changed) head/sys/gnu/dts/arm/mt8135-pinfunc.h (props changed) head/sys/gnu/dts/arm/omap3-devkit8000-lcd-common.dtsi (props changed) head/sys/gnu/dts/arm/omap3-devkit8000-lcd43.dts (props changed) head/sys/gnu/dts/arm/omap3-devkit8000-lcd70.dts (props changed) head/sys/gnu/dts/arm/omap3-overo-palo35-common.dtsi (props changed) head/sys/gnu/dts/arm/omap3-overo-palo35.dts (props changed) head/sys/gnu/dts/arm/omap3-overo-storm-palo35.dts (props changed) head/sys/gnu/dts/arm/omap3-overo-storm-tobiduo.dts (props changed) head/sys/gnu/dts/arm/omap3-overo-tobiduo-common.dtsi (props changed) head/sys/gnu/dts/arm/omap3-overo-tobiduo.dts (props changed) head/sys/gnu/dts/arm/omap3-pandora-1ghz.dts (props changed) head/sys/gnu/dts/arm/omap3-pandora-600mhz.dts (props changed) head/sys/gnu/dts/arm/orion5x-lswsgl.dts (props changed) head/sys/gnu/dts/arm/pxa168-aspenite.dts (props changed) head/sys/gnu/dts/arm/pxa168.dtsi (props changed) head/sys/gnu/dts/arm/pxa910-dkb.dts (props changed) head/sys/gnu/dts/arm/pxa910.dtsi (props changed) head/sys/gnu/dts/arm/qcom-apq8064-sony-xperia-yuga.dts (props changed) head/sys/gnu/dts/arm/qcom-apq8064-v2.0.dtsi (props changed) head/sys/gnu/dts/arm/qcom-apq8074-dragonboard.dts (props changed) head/sys/gnu/dts/arm/qcom-apq8084-ifc6540.dts (props changed) head/sys/gnu/dts/arm/qcom-apq8084-mtp.dts (props changed) head/sys/gnu/dts/arm/qcom-ipq8064-ap148.dts (props changed) head/sys/gnu/dts/arm/qcom-ipq8064-v1.0.dtsi (props changed) head/sys/gnu/dts/arm/qcom-msm8660-surf.dts (props changed) head/sys/gnu/dts/arm/qcom-msm8960-cdp.dts (props changed) head/sys/gnu/dts/arm/qcom-msm8974-sony-xperia-honami.dts (props changed) head/sys/gnu/dts/arm/qcom-pma8084.dtsi (props changed) head/sys/gnu/dts/arm/r8a77xx-aa121td01-panel.dtsi (props changed) head/sys/gnu/dts/arm/rk3288-veyron-brain.dts (props changed) head/sys/gnu/dts/arm/rk3288-veyron-mickey.dts (props changed) head/sys/gnu/dts/arm/rk3288-veyron-sdmmc.dtsi (props changed) head/sys/gnu/dts/arm/s3c6400.dtsi (props changed) head/sys/gnu/dts/arm/s3c6410-mini6410.dts (props changed) head/sys/gnu/dts/arm/s3c6410-smdk6410.dts (props changed) head/sys/gnu/dts/arm/s3c6410.dtsi (props changed) head/sys/gnu/dts/arm/s3c64xx-pinctrl.dtsi (props changed) head/sys/gnu/dts/arm/s3c64xx.dtsi (props changed) head/sys/gnu/dts/arm/socfpga_arria10_socdk.dtsi (props changed) head/sys/gnu/dts/arm/socfpga_arria5.dtsi (props changed) head/sys/gnu/dts/arm/socfpga_arria5_socdk.dts (props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_de0_sockit.dts (props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_mcv.dtsi (props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_mcvevk.dts (props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_socdk.dts (props changed) head/sys/gnu/dts/arm/socfpga_vt.dts (props changed) head/sys/gnu/dts/arm/sun4i-a10-gemei-g9.dts (props changed) head/sys/gnu/dts/arm/sun4i-a10-inet1.dts (props changed) head/sys/gnu/dts/arm/sun4i-a10-jesurun-q5.dts (props changed) head/sys/gnu/dts/arm/sun4i-a10-pcduino2.dts (props changed) head/sys/gnu/dts/arm/sun4i-a10-pov-protab2-ips9.dts (props changed) head/sys/gnu/dts/arm/sun5i-a10s-auxtek-t003.dts (props changed) head/sys/gnu/dts/arm/sun5i-a10s-auxtek-t004.dts (props changed) head/sys/gnu/dts/arm/sun5i-a10s-wobo-i5.dts (props changed) head/sys/gnu/dts/arm/sun5i-a13-q8-tablet.dts (props changed) head/sys/gnu/dts/arm/sun5i-a13-utoo-p66.dts (props changed) head/sys/gnu/dts/arm/sun5i-q8-common.dtsi (props changed) head/sys/gnu/dts/arm/sun6i-a31-i7.dts (props changed) head/sys/gnu/dts/arm/sun6i-a31-mele-a1000g-quad.dts (props changed) head/sys/gnu/dts/arm/sun6i-a31s-sina31s.dts (props changed) head/sys/gnu/dts/arm/sun6i-a31s-sinovoip-bpi-m2.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-icnova-swac.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-orangepi-mini.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-orangepi.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-pcduino3-nano.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-wexler-tab7200.dts (props changed) head/sys/gnu/dts/arm/sun7i-a20-wits-pro-a20-dkt.dts (props changed) head/sys/gnu/dts/arm/sun8i-a23-evb.dts (props changed) head/sys/gnu/dts/arm/sun8i-a23-q8-tablet.dts (props changed) head/sys/gnu/dts/arm/sun8i-a33-et-q8-v1.6.dts (props changed) head/sys/gnu/dts/arm/sun8i-a33-ga10h-v1.1.dts (props changed) head/sys/gnu/dts/arm/sun8i-a33-ippo-q8h-v1.2.dts (props changed) head/sys/gnu/dts/arm/sun8i-a33-q8-tablet.dts (props changed) head/sys/gnu/dts/arm/sun8i-a33.dtsi (props changed) head/sys/gnu/dts/arm/sunxi-q8-common.dtsi (props changed) head/sys/gnu/dts/arm/tegra124-jetson-tk1-emc.dtsi (props changed) head/sys/gnu/dts/arm/tegra124-nyan-big-emc.dtsi (props changed) head/sys/gnu/dts/arm/tegra124-nyan-blaze-emc.dtsi (props changed) head/sys/gnu/dts/arm/tegra124-nyan-blaze.dts (props changed) head/sys/gnu/dts/arm/uniphier-ph1-ld6b.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-proxstream2-vodka.dts (props changed) head/sys/gnu/dts/arm/vf610m4-colibri.dts (props changed) head/sys/gnu/dts/arm/vf610m4-cosmic.dts (props changed) head/sys/gnu/dts/arm/vf610m4.dtsi (props changed) head/sys/gnu/dts/arm/zx296702-ad1.dts (props changed) head/sys/gnu/dts/arm/zx296702.dtsi (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/include/dt-bindings/clock/alphascale,asm9260.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/bcm-ns2.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/bcm-nsp.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/bcm2835-aux.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/hi6220-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/jz4740-cgu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/jz4780-cgu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/lpc18xx-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/lpc18xx-cgu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/lsi,axm5516-clks.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/marvell,mmp2.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa168.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa1928.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa910.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/maxim,max77686.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/maxim,max77802.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/meson8b-clkc.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/mt8135-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/pistachio-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq806x.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8660.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8960.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-ipq806x.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-msm8960.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8960.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a73a4-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7778-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7795-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/renesas-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3368-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rockchip,rk808.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/samsung,s2mps11.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/samsung,s3c64xx-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun4i-a10-pll2.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/zx296702-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/dma/axi-dmac.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/meson8b-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/i2c/ (props changed) head/sys/gnu/dts/include/dt-bindings/i2c/i2c.h (props changed) head/sys/gnu/dts/include/dt-bindings/iio/ (props changed) head/sys/gnu/dts/include/dt-bindings/iio/adc/fsl-imx25-gcq.h (props changed) head/sys/gnu/dts/include/dt-bindings/iio/qcom,spmi-vadc.h (props changed) head/sys/gnu/dts/include/dt-bindings/interrupt-controller/irq-st.h (props changed) head/sys/gnu/dts/include/dt-bindings/leds/ (props changed) head/sys/gnu/dts/include/dt-bindings/leds/common.h (props changed) head/sys/gnu/dts/include/dt-bindings/leds/leds-netxbig.h (props changed) head/sys/gnu/dts/include/dt-bindings/leds/leds-ns2.h (props changed) head/sys/gnu/dts/include/dt-bindings/media/ (props changed) head/sys/gnu/dts/include/dt-bindings/media/c8sectpfe.h (props changed) head/sys/gnu/dts/include/dt-bindings/media/omap3-isp.h (props changed) head/sys/gnu/dts/include/dt-bindings/media/xilinx-vip.h (props changed) head/sys/gnu/dts/include/dt-bindings/memory/tegra210-mc.h (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/atmel-flexcom.h (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/st-lpc.h (props changed) head/sys/gnu/dts/include/dt-bindings/net/ (props changed) head/sys/gnu/dts/include/dt-bindings/net/ti-dp83867.h (props changed) head/sys/gnu/dts/include/dt-bindings/phy/phy-pistachio-usb.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/bcm2835.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/dm814x.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/mt6397-pinfunc.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/mt65xx.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/qcom,pmic-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/qcom,pmic-mpp.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/ (props changed) head/sys/gnu/dts/include/dt-bindings/power/mt8173-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/raspberrypi-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/rk3288-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/regulator/ (props changed) head/sys/gnu/dts/include/dt-bindings/regulator/maxim,max77802.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/ (props changed) head/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr-a10.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/hisi,hi6220-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/mt8135-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/mt8173-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-ipq806x.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8660.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8916.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8960.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-msm8960.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/stih407-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/stih415-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/stih416-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/tegra124-car.h (props changed) head/sys/gnu/dts/include/dt-bindings/soc/ (props changed) head/sys/gnu/dts/include/dt-bindings/soc/qcom,gsbi.h (props changed) head/sys/gnu/dts/include/dt-bindings/sound/apq8016-lpass.h (props changed) head/sys/gnu/dts/include/dt-bindings/sound/audio-jack-events.h (props changed) head/sys/gnu/dts/include/dt-bindings/sound/tas2552.h (props changed) Modified: head/sys/gnu/dts/arm/alpine.dtsi ============================================================================== --- head/sys/gnu/dts/arm/alpine.dtsi Thu Sep 22 15:05:38 2016 (r306196) +++ head/sys/gnu/dts/arm/alpine.dtsi Thu Sep 22 15:17:36 2016 (r306197) @@ -155,6 +155,16 @@ ranges = <0x02000000 0x0 0xfe000000 0x0 0xfe000000 0x0 0x1000000>; bus-range = <0x00 0x00>; + msi-parent = <&msix>; + }; + + msix: msix@fbe00000 { + compatible = "al,alpine-msix"; + reg = <0x0 0xfbe00000 0x0 0x100000>; + interrupt-controller; + msi-controller; + al,msi-base-spi = <96>; + al,msi-num-spis = <64>; }; }; }; Copied: head/sys/gnu/dts/arm/am335x-baltos-ir2110.dts (from r303380, vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-baltos-ir2110.dts Thu Sep 22 15:17:36 2016 (r306197, copy of r303380, vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts) @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" + +/ { + model = "OnRISC Baltos iR 2110"; +}; + +&am33xx_pinmux { + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ + AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ + AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ + AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ + AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ + AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ + AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ + >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&cpsw_emac0 { + phy_id = <&davinci_mdio>, <1>; + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <7>; + phy-mode = "rgmii-txid"; + dual_emac_res_vlan = <2>; +}; + +&phy_sel { + rmii-clock-ext = <1>; +}; Copied: head/sys/gnu/dts/arm/am335x-baltos-ir3220.dts (from r303380, vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-baltos-ir3220.dts Thu Sep 22 15:17:36 2016 (r306197, copy of r303380, vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts) @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" + +/ { + model = "OnRISC Baltos iR 3220"; +}; + +&am33xx_pinmux { + tca6416_pins: pinmux_tca6416_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */ + >; + }; + + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ + AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ + AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ + AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ + AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ + AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ + AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ + >; + }; + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd_mux3 */ + AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1) /* spi0_d0.uart2_txd_mux3 */ + AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE2) /* i2c0_sda.uart2_ctsn_mux0 */ + AM33XX_IOPAD(0x98c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* i2c0_scl.uart2_rtsn_mux0 */ + AM33XX_IOPAD(0x830, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.gpio1[12] DTR */ + AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.gpio1[13] DSR */ + AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.gpio1[14] DCD */ + AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad15.gpio1[15] RI */ + + AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */ + >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&i2c1 { + tca6416: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <20 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&tca6416_pins>; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&cpsw_emac0 { + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; + fixed-link { + speed = <100>; + full-duplex; + }; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <7>; + phy-mode = "rgmii-txid"; + dual_emac_res_vlan = <2>; +}; + +&phy_sel { + rmii-clock-ext = <1>; +}; Modified: head/sys/gnu/dts/arm/am335x-baltos-ir5221.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-baltos-ir5221.dts Thu Sep 22 15:05:38 2016 (r306196) +++ head/sys/gnu/dts/arm/am335x-baltos-ir5221.dts Thu Sep 22 15:17:36 2016 (r306197) @@ -13,83 +13,19 @@ /dts-v1/; -#include "am33xx.dtsi" -#include -#include +#include "am335x-baltos.dtsi" / { model = "OnRISC Baltos iR 5221"; - compatible = "vscom,onrisc", "ti,am33xx"; - - cpus { - cpu@0 { - cpu0-supply = <&vdd1_reg>; - }; - }; - - memory { - device_type = "memory"; - reg = <0x80000000 0x10000000>; /* 256 MB */ - }; - - vbat: fixedregulator@0 { - compatible = "regulator-fixed"; - regulator-name = "vbat"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-boot-on; - }; - - wl12xx_vmmc: fixedregulator@2 { - pinctrl-names = "default"; - pinctrl-0 = <&wl12xx_gpio>; - compatible = "regulator-fixed"; - regulator-name = "vwl1271"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - gpio = <&gpio3 8 0>; - startup-delay-us = <70000>; - enable-active-high; - }; }; &am33xx_pinmux { - mmc2_pins: pinmux_mmc2_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0_mux0 */ - AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1_mux0 */ - AM33XX_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2_mux0 */ - AM33XX_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3_mux0 */ - AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk_mux0 */ - AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd_mux0 */ - AM33XX_IOPAD(0x9e4, PIN_INPUT_PULLUP | MUX_MODE7) /* emu0.gpio3[7] */ - >; - }; - - wl12xx_gpio: pinmux_wl12xx_gpio { - pinctrl-single,pins = < - AM33XX_IOPAD(0x9e8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* emu1.gpio3[8] */ - >; - }; - - tps65910_pins: pinmux_tps65910_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ben1.gpio1[28] */ - >; - }; - tca6416_pins: pinmux_tca6416_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */ >; }; - i2c1_pins: pinmux_i2c1_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE2) /* spi0_d1.i2c1_sda_mux3 */ - AM33XX_IOPAD(0x95c, PIN_INPUT | MUX_MODE2) /* spi0_cs0.i2c1_scl_mux3 */ - >; - }; dcan1_pins: pinmux_dcan1_pins { pinctrl-single,pins = < @@ -98,19 +34,12 @@ >; }; - uart0_pins: pinmux_uart0_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ - AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ - >; - }; - uart1_pins: pinmux_uart1_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ - AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE7) /* uart1_ctsn, INPUT | MODE0 */ - AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* uart1_rtsn, OUTPUT | MODE0 */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ + AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ @@ -122,8 +51,8 @@ pinctrl-single,pins = < AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd_mux3 */ AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1) /* spi0_d0.uart2_txd_mux3 */ - AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE7) /* i2c0_sda.uart2_ctsn_mux0 */ - AM33XX_IOPAD(0x98c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* i2c0_scl.uart2_rtsn_mux0 */ + AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE2) /* i2c0_sda.uart2_ctsn_mux0 */ + AM33XX_IOPAD(0x98c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* i2c0_scl.uart2_rtsn_mux0 */ AM33XX_IOPAD(0x830, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.gpio1[12] DTR */ AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.gpio1[13] DSR */ AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.gpio1[14] DCD */ @@ -133,150 +62,6 @@ >; }; - cpsw_default: cpsw_default { - pinctrl-single,pins = < - /* Slave 1 */ - AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ - AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_tx_en.rmii1_txen */ - AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ - AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ - AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ - AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ - AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii1_refclk */ - - - /* Slave 2 */ - AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ - AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ - AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ - AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ - AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ - AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ - AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ - AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ - AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ - AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ - AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ - AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ - >; - }; - - cpsw_sleep: cpsw_sleep { - pinctrl-single,pins = < - /* Slave 1 reset value */ - AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) - - /* Slave 2 reset value*/ - AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7) - >; - }; - - davinci_mdio_default: davinci_mdio_default { - pinctrl-single,pins = < - /* MDIO */ - AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ - AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ - >; - }; - - davinci_mdio_sleep: davinci_mdio_sleep { - pinctrl-single,pins = < - /* MDIO reset value */ - AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) - >; - }; - - nandflash_pins_s0: nandflash_pins_s0 { - pinctrl-single,pins = < - AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ - AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ - AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ - AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ - AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ - AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ - AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ - AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ - AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ - AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ - AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ - AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ - AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ - AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ - AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ - >; - }; -}; - -&elm { - status = "okay"; -}; - -&gpmc { - pinctrl-names = "default"; - pinctrl-0 = <&nandflash_pins_s0>; - ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ - status = "okay"; - - nand@0,0 { - reg = <0 0 0>; /* CS0, offset 0 */ - nand-bus-width = <8>; - ti,nand-ecc-opt = "bch8"; - ti,nand-xfer-type = "polled"; - - gpmc,device-nand = "true"; - gpmc,device-width = <1>; - gpmc,sync-clk-ps = <0>; - gpmc,cs-on-ns = <0>; - gpmc,cs-rd-off-ns = <44>; - gpmc,cs-wr-off-ns = <44>; - gpmc,adv-on-ns = <6>; - gpmc,adv-rd-off-ns = <34>; - gpmc,adv-wr-off-ns = <44>; - gpmc,we-on-ns = <0>; - gpmc,we-off-ns = <40>; - gpmc,oe-on-ns = <0>; - gpmc,oe-off-ns = <54>; - gpmc,access-ns = <64>; - gpmc,rd-cycle-ns = <82>; - gpmc,wr-cycle-ns = <82>; - gpmc,wait-on-read = "true"; - gpmc,wait-on-write = "true"; - gpmc,bus-turnaround-ns = <0>; - gpmc,cycle2cycle-delay-ns = <0>; - gpmc,clk-activation-ns = <0>; - gpmc,wait-monitoring-ns = <0>; - gpmc,wr-access-ns = <40>; - gpmc,wr-data-mux-bus-ns = <0>; - - #address-cells = <1>; - #size-cells = <1>; - elm_id = <&elm>; - }; -}; - -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins>; - - status = "okay"; }; &uart1 { @@ -286,8 +71,6 @@ dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; - cts-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - rts-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; status = "okay"; }; @@ -299,35 +82,11 @@ dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; - rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; status = "okay"; }; &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins>; - - status = "okay"; - clock-frequency = <400000>; - - tps: tps@2d { - reg = <0x2d>; - gpio-controller; - #gpio-cells = <2>; - interrupt-parent = <&gpio1>; - interrupts = <28 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&tps65910_pins>; - }; - - at24@50 { - compatible = "at24,24c02"; - pagesize = <8>; - reg = <0x50>; - }; - tca6416: gpio@20 { compatible = "ti,tca6416"; reg = <0x20>; @@ -340,14 +99,6 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - &usb0_phy { status = "okay"; }; @@ -366,112 +117,13 @@ dr_mode = "otg"; }; -&cppi41dma { - status = "okay"; -}; - -#include "tps65910.dtsi" - -&tps { - vcc1-supply = <&vbat>; - vcc2-supply = <&vbat>; - vcc3-supply = <&vbat>; - vcc4-supply = <&vbat>; - vcc5-supply = <&vbat>; - vcc6-supply = <&vbat>; - vcc7-supply = <&vbat>; - vccio-supply = <&vbat>; - - ti,en-ck32k-xtal = <1>; - - regulators { - vrtc_reg: regulator@0 { - regulator-always-on; - }; - - vio_reg: regulator@1 { - regulator-always-on; - }; - - vdd1_reg: regulator@2 { - /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ - regulator-name = "vdd_mpu"; - regulator-min-microvolt = <912500>; - regulator-max-microvolt = <1312500>; - regulator-boot-on; - regulator-always-on; - }; - - vdd2_reg: regulator@3 { - /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ - regulator-name = "vdd_core"; - regulator-min-microvolt = <912500>; - regulator-max-microvolt = <1150000>; - regulator-boot-on; - regulator-always-on; - }; - - vdd3_reg: regulator@4 { - regulator-always-on; - }; - - vdig1_reg: regulator@5 { - regulator-always-on; - }; - - vdig2_reg: regulator@6 { - regulator-always-on; - }; - - vpll_reg: regulator@7 { - regulator-always-on; - }; - - vdac_reg: regulator@8 { - regulator-always-on; - }; - - vaux1_reg: regulator@9 { - regulator-always-on; - }; - - vaux2_reg: regulator@10 { - regulator-always-on; - }; - - vaux33_reg: regulator@11 { - regulator-always-on; - }; - - vmmc_reg: regulator@12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - }; -}; - -&mac { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&cpsw_default>; - pinctrl-1 = <&cpsw_sleep>; - dual_emac = <1>; - - status = "okay"; -}; - -&davinci_mdio { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&davinci_mdio_default>; - pinctrl-1 = <&davinci_mdio_sleep>; - - status = "okay"; -}; - &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; phy-mode = "rmii"; dual_emac_res_vlan = <1>; + fixed-link { + speed = <100>; + full-duplex; + }; }; &cpsw_emac1 { @@ -484,42 +136,6 @@ rmii-clock-ext = <1>; }; -&mmc1 { - vmmc-supply = <&vmmc_reg>; - status = "okay"; -}; - -&mmc2 { - status = "okay"; - vmmc-supply = <&wl12xx_vmmc>; - ti,non-removable; - bus-width = <4>; - cap-power-off-card; - pinctrl-names = "default"; - pinctrl-0 = <&mmc2_pins>; - - #address-cells = <1>; - #size-cells = <0>; - wlcore: wlcore@2 { - compatible = "ti,wl1835"; - reg = <2>; - interrupt-parent = <&gpio3>; - interrupts = <7 IRQ_TYPE_LEVEL_HIGH>; - }; -}; - -&sham { - status = "okay"; -}; - -&aes { - status = "okay"; -}; - -&gpio0 { - ti,no-reset-on-init; -}; - &dcan1 { pinctrl-names = "default"; pinctrl-0 = <&dcan1_pins>; Copied: head/sys/gnu/dts/arm/am335x-baltos.dtsi (from r303380, vendor/device-tree/dist/src/arm/am335x-baltos.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-baltos.dtsi Thu Sep 22 15:17:36 2016 (r306197, copy of r303380, vendor/device-tree/dist/src/arm/am335x-baltos.dtsi) @@ -0,0 +1,408 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +#include "am33xx.dtsi" +#include +#include + +/ { + compatible = "vscom,onrisc", "ti,am33xx"; + + cpus { + cpu@0 { + cpu0-supply = <&vdd1_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + + wl12xx_vmmc: fixedregulator@2 { + pinctrl-names = "default"; + pinctrl-0 = <&wl12xx_gpio>; + compatible = "regulator-fixed"; + regulator-name = "vwl1271"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 8 0>; + startup-delay-us = <70000>; + enable-active-high; + }; +}; + +&am33xx_pinmux { + mmc2_pins: pinmux_mmc2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0_mux0 */ + AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1_mux0 */ + AM33XX_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2_mux0 */ + AM33XX_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3_mux0 */ + AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk_mux0 */ + AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd_mux0 */ + AM33XX_IOPAD(0x9e4, PIN_INPUT_PULLUP | MUX_MODE7) /* emu0.gpio3[7] */ + >; + }; + + wl12xx_gpio: pinmux_wl12xx_gpio { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9e8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* emu1.gpio3[8] */ + >; + }; + + tps65910_pins: pinmux_tps65910_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ben1.gpio1[28] */ + >; + }; + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE2) /* spi0_d1.i2c1_sda_mux3 */ + AM33XX_IOPAD(0x95c, PIN_INPUT | MUX_MODE2) /* spi0_cs0.i2c1_scl_mux3 */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_tx_en.rmii1_txen */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii1_refclk */ + + + /* Slave 2 */ + AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ + AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ + AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ + AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ + AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ + AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ + AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ + AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ + AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ + AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ + >; + }; + + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) + + /* Slave 2 reset value*/ + AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + davinci_mdio_sleep: davinci_mdio_sleep { + pinctrl-single,pins = < + /* MDIO reset value */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + nandflash_pins_s0: nandflash_pins_s0 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ + AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ + AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ + AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ + AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ + AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ + AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ + AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ + AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ + AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ + AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ + AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ + AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ + AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ + AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ + >; + }; +}; + +&elm { + status = "okay"; +}; + +&gpmc { + pinctrl-names = "default"; + pinctrl-0 = <&nandflash_pins_s0>; + ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ + status = "okay"; + + nand@0,0 { + compatible = "ti,omap2-nand"; + reg = <0 0 4>; /* CS0, offset 0, IO size 4 */ + interrupt-parent = <&gpmc>; + interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ + <1 IRQ_TYPE_NONE>; /* termcount */ + rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ + nand-bus-width = <8>; + ti,nand-ecc-opt = "bch8"; + ti,nand-xfer-type = "polled"; + + gpmc,device-nand = "true"; + gpmc,device-width = <1>; + gpmc,sync-clk-ps = <0>; + gpmc,cs-on-ns = <0>; + gpmc,cs-rd-off-ns = <44>; + gpmc,cs-wr-off-ns = <44>; + gpmc,adv-on-ns = <6>; + gpmc,adv-rd-off-ns = <34>; + gpmc,adv-wr-off-ns = <44>; + gpmc,we-on-ns = <0>; + gpmc,we-off-ns = <40>; + gpmc,oe-on-ns = <0>; + gpmc,oe-off-ns = <54>; + gpmc,access-ns = <64>; + gpmc,rd-cycle-ns = <82>; + gpmc,wr-cycle-ns = <82>; + gpmc,bus-turnaround-ns = <0>; + gpmc,cycle2cycle-delay-ns = <0>; + gpmc,clk-activation-ns = <0>; + gpmc,wr-access-ns = <40>; + gpmc,wr-data-mux-bus-ns = <0>; + + #address-cells = <1>; + #size-cells = <1>; + elm_id = <&elm>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tps: tps@2d { + reg = <0x2d>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio1>; + interrupts = <28 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&tps65910_pins>; + }; + + at24@50 { + compatible = "at24,24c02"; + pagesize = <8>; + reg = <0x50>; + }; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&cppi41dma { + status = "okay"; +}; + +#include "tps65910.dtsi" + +&tps { + vcc1-supply = <&vbat>; + vcc2-supply = <&vbat>; + vcc3-supply = <&vbat>; + vcc4-supply = <&vbat>; + vcc5-supply = <&vbat>; + vcc6-supply = <&vbat>; + vcc7-supply = <&vbat>; + vccio-supply = <&vbat>; + + ti,en-ck32k-xtal = <1>; + + regulators { + vrtc_reg: regulator@0 { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 15:21:52 2016 Return-Path: Delivered-To: svn-src-all@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 9C19EBE5E30; Thu, 22 Sep 2016 15:21:52 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) (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 533AD9C5; Thu, 22 Sep 2016 15:21:51 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sc1.bsdpad.com ([163.172.212.18]:32299) by ppsw-30.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bn5os-0008DV-dQ (Exim 4.86_36-e07b163) (return-path ); Thu, 22 Sep 2016 16:21:50 +0100 Date: Thu, 22 Sep 2016 15:21:53 +0000 From: Ruslan Bukin To: Mariusz Zaborski Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys Message-ID: <20160922152153.GA70762@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> <20160922143412.GA69951@bsdpad.com> <20160922145625.GA70214@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 15:21:52 -0000 Hi It reports nothing. Yes I use qemu: /home/rb743/dev/qemu/qemu/build1/mips64-softmmu/qemu-system-mips64 -M malta -kernel ~/obj/mips.mips64/home/rb743/dev/freebsd-mips/sys/MALTA64/kernel -hda /home/rb743/world-mips64eb/mips64eb.img -nographic -smp 1 -cpu 5kf -net nic -net user -m 2048M -redir tcp:4022::22 Ruslan On Thu, Sep 22, 2016 at 05:11:07PM +0200, Mariusz Zaborski wrote: > I tested it on the mips for Malta kernel and it's works fine. I will > try to do it on mips64, are you using qemu to test it? > What is ctrl + t reporting you? > > > On 22 September 2016 at 16:56, Ruslan Bukin wrote: > > May be. The next line should be > > /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). > > > > but it hangs before this line > > > > Ruslan > > > > On Thu, Sep 22, 2016 at 04:39:16PM +0200, Mariusz Zaborski wrote: > >> Hi Ruslan, > >> > >> Does it hang on some network script? > >> > >> Thanks, > >> Mariusz > >> > >> > >> On 22 September 2016 at 16:34, Ruslan Bukin wrote: > >> > Hi Mariusz > >> > > >> > my MIPS64EB kernel stops booting with this > >> > > >> > somewhere here: > >> > [...] > >> > Starting file system checks: > >> > /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946580 blocks, 0.0% fragmentation) > >> > Mounting local filesystems:. > >> > ELF ldconfig path: /lib /usr/lib /usr/lib/compat > >> > random: unblocking device. > >> > > >> > any idea ? (should I rebuild something?) > >> > > >> > thanks! > >> > > >> > Ruslan > >> > > >> > On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: > >> >> Author: oshogbo > >> >> Date: Thu Sep 22 09:58:46 2016 > >> >> New Revision: 306174 > >> >> URL: https://svnweb.freebsd.org/changeset/base/306174 > >> >> > >> >> Log: > >> >> capsicum: propagate rights on accept(2) > >> >> > >> >> Descriptor returned by accept(2) should inherits capabilities rights from > >> >> the listening socket. > >> >> > >> >> PR: 201052 > >> >> Reviewed by: emaste, jonathan > >> >> Discussed with: many > >> >> Differential Revision: https://reviews.freebsd.org/D7724 > >> >> > >> >> Modified: > >> >> head/sys/compat/cloudabi/cloudabi_sock.c > >> >> head/sys/compat/linux/linux_socket.c > >> >> head/sys/kern/kern_sendfile.c > >> >> head/sys/kern/uipc_syscalls.c > >> >> head/sys/netinet/sctp_syscalls.c > >> >> head/sys/sys/socketvar.h > >> >> > >> >> Modified: head/sys/compat/cloudabi/cloudabi_sock.c > >> >> ============================================================================== > >> >> --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) > >> >> +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) > >> >> @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread > >> >> int error; > >> >> > >> >> error = getsock_cap(td, uap->sock, cap_rights_init(&rights, > >> >> - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); > >> >> + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> so = fp->f_data; > >> >> > >> >> Modified: head/sys/compat/linux/linux_socket.c > >> >> ============================================================================== > >> >> --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) > >> >> +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) > >> >> @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i > >> >> if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) > >> >> return (EINVAL); > >> >> if (error == EINVAL) { > >> >> - error1 = getsock_cap(td, s, &rights, &fp, NULL); > >> >> + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); > >> >> if (error1 != 0) > >> >> return (error1); > >> >> so = fp->f_data; > >> >> > >> >> Modified: head/sys/kern/kern_sendfile.c > >> >> ============================================================================== > >> >> --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) > >> >> +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) > >> >> @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int > >> >> * The socket must be a stream socket and connected. > >> >> */ > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), > >> >> - sock_fp, NULL); > >> >> + sock_fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> *so = (*sock_fp)->f_data; > >> >> > >> >> Modified: head/sys/kern/uipc_syscalls.c > >> >> ============================================================================== > >> >> --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > >> >> +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > >> >> @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char > >> >> /* > >> >> * Convert a user file descriptor to a kernel file entry and check if required > >> >> * capability rights are present. > >> >> + * If required copy of current set of capability rights is returned. > >> >> * A reference on the file entry is held upon returning. > >> >> */ > >> >> int > >> >> getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > >> >> - struct file **fpp, u_int *fflagp) > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) > >> >> { > >> >> struct file *fp; > >> >> int error; > >> >> > >> >> - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); > >> >> + error = fget_cap(td, fd, rightsp, &fp, havecapsp); > >> >> if (error != 0) > >> >> return (error); > >> >> if (fp->f_type != DTYPE_SOCKET) { > >> >> fdrop(fp, td); > >> >> + if (havecapsp != NULL) > >> >> + filecaps_free(havecapsp); > >> >> return (ENOTSOCK); > >> >> } > >> >> if (fflagp != NULL) > >> >> @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd > >> >> AUDIT_ARG_FD(fd); > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> so = fp->f_data; > >> >> @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis > >> >> > >> >> AUDIT_ARG_FD(uap->s); > >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error == 0) { > >> >> so = fp->f_data; > >> >> #ifdef MAC > >> >> @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s > >> >> struct file *headfp, *nfp = NULL; > >> >> struct sockaddr *sa = NULL; > >> >> struct socket *head, *so; > >> >> + struct filecaps fcaps; > >> >> cap_rights_t rights; > >> >> u_int fflag; > >> >> pid_t pgid; > >> >> @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s > >> >> > >> >> AUDIT_ARG_FD(s); > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), > >> >> - &headfp, &fflag); > >> >> + &headfp, &fflag, &fcaps); > >> >> if (error != 0) > >> >> return (error); > >> >> head = headfp->f_data; > >> >> @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s > >> >> if (error != 0) > >> >> goto done; > >> >> #endif > >> >> - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); > >> >> + error = falloc_caps(td, &nfp, &fd, > >> >> + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); > >> >> if (error != 0) > >> >> goto done; > >> >> ACCEPT_LOCK(); > >> >> @@ -440,6 +445,8 @@ noconnection: > >> >> * a reference on nfp to the caller on success if they request it. > >> >> */ > >> >> done: > >> >> + if (nfp == NULL) > >> >> + filecaps_free(&fcaps); > >> >> if (fp != NULL) { > >> >> if (error == 0) { > >> >> *fp = nfp; > >> >> @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di > >> >> AUDIT_ARG_FD(fd); > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> so = fp->f_data; > >> >> @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st > >> >> AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); > >> >> cap_rights_set(&rights, CAP_CONNECT); > >> >> } > >> >> - error = getsock_cap(td, s, &rights, &fp, NULL); > >> >> + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> so = (struct socket *)fp->f_data; > >> >> @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st > >> >> > >> >> AUDIT_ARG_FD(s); > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> so = fp->f_data; > >> >> @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s > >> >> > >> >> AUDIT_ARG_FD(uap->s); > >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error == 0) { > >> >> so = fp->f_data; > >> >> error = soshutdown(so, uap->how); > >> >> @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s > >> >> > >> >> AUDIT_ARG_FD(s); > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error == 0) { > >> >> so = fp->f_data; > >> >> error = sosetopt(so, &sopt); > >> >> @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s > >> >> > >> >> AUDIT_ARG_FD(s); > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error == 0) { > >> >> so = fp->f_data; > >> >> error = sogetopt(so, &sopt); > >> >> @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int > >> >> > >> >> AUDIT_ARG_FD(fd); > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> so = fp->f_data; > >> >> @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int > >> >> > >> >> AUDIT_ARG_FD(fd); > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> so = fp->f_data; > >> >> > >> >> Modified: head/sys/netinet/sctp_syscalls.c > >> >> ============================================================================== > >> >> --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > >> >> +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > >> >> @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) > >> >> } > >> >> > >> >> AUDIT_ARG_FD(uap->sd); > >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > >> >> if (error != 0) > >> >> goto sctp_bad; > >> >> #ifdef KTRACE > >> >> @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) > >> >> } > >> >> > >> >> AUDIT_ARG_FD(uap->sd); > >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > >> >> if (error != 0) > >> >> goto sctp_bad1; > >> >> > >> >> @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) > >> >> > >> >> AUDIT_ARG_FD(uap->sd); > >> >> error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), > >> >> - &fp, NULL); > >> >> + &fp, NULL, NULL); > >> >> if (error != 0) > >> >> return (error); > >> >> #ifdef COMPAT_FREEBSD32 > >> >> > >> >> Modified: head/sys/sys/socketvar.h > >> >> ============================================================================== > >> >> --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) > >> >> +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) > >> >> @@ -321,6 +321,7 @@ extern u_long sb_max; > >> >> extern so_gen_t so_gencnt; > >> >> > >> >> struct file; > >> >> +struct filecaps; > >> >> struct filedesc; > >> >> struct mbuf; > >> >> struct sockaddr; > >> >> @@ -340,7 +341,7 @@ struct uio; > >> >> */ > >> >> int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); > >> >> int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > >> >> - struct file **fpp, u_int *fflagp); > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); > >> >> void soabort(struct socket *so); > >> >> int soaccept(struct socket *so, struct sockaddr **nam); > >> >> void soaio_enqueue(struct task *task); > >> >> > From owner-svn-src-all@freebsd.org Thu Sep 22 15:27:46 2016 Return-Path: Delivered-To: svn-src-all@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 1CCDEBE5538; Thu, 22 Sep 2016 15:27:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB84FCB; Thu, 22 Sep 2016 15:27:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r306195 - in stable/11: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto... To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201609221457.u8MEvndR052567@repo.freebsd.org> From: Jung-uk Kim Message-ID: <37fa9e53-3cb0-1e41-38f1-cce64c6c5636@FreeBSD.org> Date: Thu, 22 Sep 2016 11:27:40 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609221457.u8MEvndR052567@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uooUtaMj5eQ3Iul0DMUvcBDWQGKKTuFkE" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 15:27:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uooUtaMj5eQ3Iul0DMUvcBDWQGKKTuFkE Content-Type: multipart/mixed; boundary="Ip9eXp3biHXqfO7VNqMUhm4ELmSJ7D9xQ"; protected-headers="v1" From: Jung-uk Kim To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Message-ID: <37fa9e53-3cb0-1e41-38f1-cce64c6c5636@FreeBSD.org> Subject: Re: svn commit: r306195 - in stable/11: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto... References: <201609221457.u8MEvndR052567@repo.freebsd.org> In-Reply-To: <201609221457.u8MEvndR052567@repo.freebsd.org> --Ip9eXp3biHXqfO7VNqMUhm4ELmSJ7D9xQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/22/2016 10:57, Jung-uk Kim wrote: > Author: jkim > Date: Thu Sep 22 14:57:48 2016 > New Revision: 306195 > URL: https://svnweb.freebsd.org/changeset/base/306195 >=20 > Log: > MFC: r306193 > =20 > Merge OpenSSL 1.0.2u. ^^^^^^ Sorry, it should be read 1.0.2i. Jung-uk Kim --Ip9eXp3biHXqfO7VNqMUhm4ELmSJ7D9xQ-- --uooUtaMj5eQ3Iul0DMUvcBDWQGKKTuFkE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJX4/hxAAoJEHyflib82/FGTeMH/jpu+lwM/m4yspuuef0tOxg0 AhnzRUftHbXyVGYC5ubLtKtt0YFxKkfwAfO4gMvcDYqtP7qgOjVYaeKaHrpF3s2a ofwA9xTaHyeHKnPv2FaaDFrSXQj+jr7wRnL7XGEzKPzepnfQIrcrFhqdIYxdMAYc rjwj79jQOki1d3eTxSUoBCE4euPuItu4BorJJolSfHOBC5CWIxdz01IDNRHah8ew 1GMAZo2ZvvWopKoyxn8a1zPVbcoM8UmTF4zQEmbyhdOqZinoR7zPINEUSAQL5QKH hrqg0T8dLG7Fl/PlN2ivPy0rEXxJMoYWQs/EZkdNOeVZaFkZIRuub/S1T8pUYxk= =6cbg -----END PGP SIGNATURE----- --uooUtaMj5eQ3Iul0DMUvcBDWQGKKTuFkE-- From owner-svn-src-all@freebsd.org Thu Sep 22 15:55:31 2016 Return-Path: Delivered-To: svn-src-all@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 D65E6BE69C9; Thu, 22 Sep 2016 15:55:31 +0000 (UTC) (envelope-from jkim@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 536D018E1; Thu, 22 Sep 2016 15:55:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MFtUOk076335; Thu, 22 Sep 2016 15:55:30 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MFtS6R076312; Thu, 22 Sep 2016 15:55:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609221555.u8MFtS6R076312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 22 Sep 2016 15:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306198 - in releng/11.0: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/cryp... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 15:55:31 -0000 Author: jkim Date: Thu Sep 22 15:55:27 2016 New Revision: 306198 URL: https://svnweb.freebsd.org/changeset/base/306198 Log: MFS: r306195 Merge OpenSSL 1.0.2i. Approved by: re (gjb, implicit), so (delphij) Added: releng/11.0/crypto/openssl/doc/crypto/d2i_PrivateKey.pod - copied unchanged from r306195, stable/11/crypto/openssl/doc/crypto/d2i_PrivateKey.pod releng/11.0/crypto/openssl/ssl/bad_dtls_test.c - copied unchanged from r306195, stable/11/crypto/openssl/ssl/bad_dtls_test.c releng/11.0/crypto/openssl/ssl/dtlstest.c - copied unchanged from r306195, stable/11/crypto/openssl/ssl/dtlstest.c releng/11.0/secure/lib/libcrypto/man/d2i_PrivateKey.3 - copied unchanged from r306195, stable/11/secure/lib/libcrypto/man/d2i_PrivateKey.3 Modified: releng/11.0/crypto/openssl/CHANGES releng/11.0/crypto/openssl/CONTRIBUTING releng/11.0/crypto/openssl/Configure releng/11.0/crypto/openssl/Makefile releng/11.0/crypto/openssl/Makefile.org releng/11.0/crypto/openssl/Makefile.shared releng/11.0/crypto/openssl/NEWS releng/11.0/crypto/openssl/README releng/11.0/crypto/openssl/apps/CA.pl releng/11.0/crypto/openssl/apps/CA.pl.in releng/11.0/crypto/openssl/apps/apps.c releng/11.0/crypto/openssl/apps/apps.h releng/11.0/crypto/openssl/apps/ca.c releng/11.0/crypto/openssl/apps/dgst.c releng/11.0/crypto/openssl/apps/enc.c releng/11.0/crypto/openssl/apps/passwd.c releng/11.0/crypto/openssl/apps/pkcs12.c releng/11.0/crypto/openssl/apps/req.c releng/11.0/crypto/openssl/apps/s_apps.h releng/11.0/crypto/openssl/apps/s_cb.c releng/11.0/crypto/openssl/apps/s_client.c releng/11.0/crypto/openssl/apps/s_server.c releng/11.0/crypto/openssl/apps/speed.c releng/11.0/crypto/openssl/apps/srp.c releng/11.0/crypto/openssl/apps/verify.c releng/11.0/crypto/openssl/apps/x509.c releng/11.0/crypto/openssl/crypto/LPdir_unix.c releng/11.0/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl releng/11.0/crypto/openssl/crypto/asn1/a_bytes.c releng/11.0/crypto/openssl/crypto/asn1/a_object.c releng/11.0/crypto/openssl/crypto/asn1/a_set.c releng/11.0/crypto/openssl/crypto/asn1/a_strex.c releng/11.0/crypto/openssl/crypto/asn1/a_strnid.c releng/11.0/crypto/openssl/crypto/asn1/ameth_lib.c releng/11.0/crypto/openssl/crypto/asn1/asn1_lib.c releng/11.0/crypto/openssl/crypto/asn1/asn_mime.c releng/11.0/crypto/openssl/crypto/asn1/bio_asn1.c releng/11.0/crypto/openssl/crypto/asn1/bio_ndef.c releng/11.0/crypto/openssl/crypto/asn1/charmap.pl releng/11.0/crypto/openssl/crypto/asn1/d2i_pr.c releng/11.0/crypto/openssl/crypto/asn1/f_enum.c releng/11.0/crypto/openssl/crypto/asn1/f_int.c releng/11.0/crypto/openssl/crypto/asn1/f_string.c releng/11.0/crypto/openssl/crypto/asn1/i2d_pr.c releng/11.0/crypto/openssl/crypto/asn1/p5_pbe.c releng/11.0/crypto/openssl/crypto/asn1/p5_pbev2.c releng/11.0/crypto/openssl/crypto/asn1/t_req.c releng/11.0/crypto/openssl/crypto/asn1/tasn_dec.c releng/11.0/crypto/openssl/crypto/asn1/tasn_enc.c releng/11.0/crypto/openssl/crypto/asn1/tasn_prn.c releng/11.0/crypto/openssl/crypto/asn1/tasn_utl.c releng/11.0/crypto/openssl/crypto/asn1/x_bignum.c releng/11.0/crypto/openssl/crypto/asn1/x_name.c releng/11.0/crypto/openssl/crypto/asn1/x_x509.c releng/11.0/crypto/openssl/crypto/bio/b_print.c releng/11.0/crypto/openssl/crypto/bio/bf_nbio.c releng/11.0/crypto/openssl/crypto/bio/bio.h releng/11.0/crypto/openssl/crypto/bio/bss_bio.c releng/11.0/crypto/openssl/crypto/bio/bss_file.c releng/11.0/crypto/openssl/crypto/bio/bss_rtcp.c releng/11.0/crypto/openssl/crypto/bn/asm/x86-mont.pl releng/11.0/crypto/openssl/crypto/bn/asm/x86_64-gcc.c releng/11.0/crypto/openssl/crypto/bn/asm/x86_64-mont.pl releng/11.0/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl releng/11.0/crypto/openssl/crypto/bn/bn.h releng/11.0/crypto/openssl/crypto/bn/bn_div.c releng/11.0/crypto/openssl/crypto/bn/bn_lib.c releng/11.0/crypto/openssl/crypto/bn/bn_print.c releng/11.0/crypto/openssl/crypto/bn/bn_rand.c releng/11.0/crypto/openssl/crypto/bn/bn_word.c releng/11.0/crypto/openssl/crypto/bn/bntest.c releng/11.0/crypto/openssl/crypto/cms/cms_enc.c releng/11.0/crypto/openssl/crypto/cms/cms_ess.c releng/11.0/crypto/openssl/crypto/cms/cms_lib.c releng/11.0/crypto/openssl/crypto/cms/cms_pwri.c releng/11.0/crypto/openssl/crypto/comp/comp.h releng/11.0/crypto/openssl/crypto/conf/conf_def.h releng/11.0/crypto/openssl/crypto/conf/conf_mod.c releng/11.0/crypto/openssl/crypto/conf/keysets.pl releng/11.0/crypto/openssl/crypto/des/asm/dest4-sparcv9.pl releng/11.0/crypto/openssl/crypto/des/des.c releng/11.0/crypto/openssl/crypto/des/enc_writ.c releng/11.0/crypto/openssl/crypto/dh/dh_ameth.c releng/11.0/crypto/openssl/crypto/dsa/dsa_ameth.c releng/11.0/crypto/openssl/crypto/dsa/dsa_gen.c releng/11.0/crypto/openssl/crypto/dsa/dsa_ossl.c releng/11.0/crypto/openssl/crypto/ec/Makefile releng/11.0/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl releng/11.0/crypto/openssl/crypto/ec/ec_ameth.c releng/11.0/crypto/openssl/crypto/ec/ec_key.c releng/11.0/crypto/openssl/crypto/ec/ecp_nistz256.c releng/11.0/crypto/openssl/crypto/engine/eng_cryptodev.c releng/11.0/crypto/openssl/crypto/evp/bio_enc.c releng/11.0/crypto/openssl/crypto/evp/bio_ok.c releng/11.0/crypto/openssl/crypto/evp/c_all.c releng/11.0/crypto/openssl/crypto/evp/digest.c releng/11.0/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c releng/11.0/crypto/openssl/crypto/evp/e_seed.c releng/11.0/crypto/openssl/crypto/evp/evp_enc.c releng/11.0/crypto/openssl/crypto/evp/evp_test.c releng/11.0/crypto/openssl/crypto/evp/openbsd_hw.c releng/11.0/crypto/openssl/crypto/evp/p_lib.c releng/11.0/crypto/openssl/crypto/evp/pmeth_gn.c releng/11.0/crypto/openssl/crypto/evp/pmeth_lib.c releng/11.0/crypto/openssl/crypto/hmac/hmac.c releng/11.0/crypto/openssl/crypto/jpake/jpake.c releng/11.0/crypto/openssl/crypto/lhash/lhash.c releng/11.0/crypto/openssl/crypto/md2/md2_dgst.c releng/11.0/crypto/openssl/crypto/md32_common.h releng/11.0/crypto/openssl/crypto/mdc2/mdc2dgst.c releng/11.0/crypto/openssl/crypto/mem.c releng/11.0/crypto/openssl/crypto/mem_clr.c releng/11.0/crypto/openssl/crypto/modes/asm/ghash-sparcv9.pl releng/11.0/crypto/openssl/crypto/o_init.c releng/11.0/crypto/openssl/crypto/o_time.c releng/11.0/crypto/openssl/crypto/objects/o_names.c releng/11.0/crypto/openssl/crypto/ocsp/ocsp_cl.c releng/11.0/crypto/openssl/crypto/ocsp/ocsp_ext.c releng/11.0/crypto/openssl/crypto/ocsp/ocsp_lib.c releng/11.0/crypto/openssl/crypto/opensslv.h releng/11.0/crypto/openssl/crypto/ossl_typ.h releng/11.0/crypto/openssl/crypto/pem/pem.h releng/11.0/crypto/openssl/crypto/pem/pem_err.c releng/11.0/crypto/openssl/crypto/pem/pem_lib.c releng/11.0/crypto/openssl/crypto/pem/pvkfmt.c releng/11.0/crypto/openssl/crypto/perlasm/sparcv9_modes.pl releng/11.0/crypto/openssl/crypto/pkcs12/p12_mutl.c releng/11.0/crypto/openssl/crypto/pkcs12/p12_npas.c releng/11.0/crypto/openssl/crypto/pkcs12/p12_utl.c releng/11.0/crypto/openssl/crypto/pkcs12/pkcs12.h releng/11.0/crypto/openssl/crypto/pkcs7/pk7_doit.c releng/11.0/crypto/openssl/crypto/rand/md_rand.c releng/11.0/crypto/openssl/crypto/rand/rand_unix.c releng/11.0/crypto/openssl/crypto/rand/randfile.c releng/11.0/crypto/openssl/crypto/rsa/rsa_ameth.c releng/11.0/crypto/openssl/crypto/rsa/rsa_chk.c releng/11.0/crypto/openssl/crypto/rsa/rsa_lib.c releng/11.0/crypto/openssl/crypto/rsa/rsa_pmeth.c releng/11.0/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl releng/11.0/crypto/openssl/crypto/sparccpuid.S releng/11.0/crypto/openssl/crypto/srp/srp_lib.c releng/11.0/crypto/openssl/crypto/srp/srp_vfy.c releng/11.0/crypto/openssl/crypto/ts/ts.h releng/11.0/crypto/openssl/crypto/ts/ts_lib.c releng/11.0/crypto/openssl/crypto/ts/ts_rsp_verify.c releng/11.0/crypto/openssl/crypto/ui/ui_lib.c releng/11.0/crypto/openssl/crypto/whrlpool/wp_dgst.c releng/11.0/crypto/openssl/crypto/x509/by_dir.c releng/11.0/crypto/openssl/crypto/x509/x509.h releng/11.0/crypto/openssl/crypto/x509/x509_att.c releng/11.0/crypto/openssl/crypto/x509/x509_err.c releng/11.0/crypto/openssl/crypto/x509/x509_obj.c releng/11.0/crypto/openssl/crypto/x509/x509_r2x.c releng/11.0/crypto/openssl/crypto/x509/x509_txt.c releng/11.0/crypto/openssl/crypto/x509/x509_vfy.c releng/11.0/crypto/openssl/crypto/x509/x509_vfy.h releng/11.0/crypto/openssl/crypto/x509/x509spki.c releng/11.0/crypto/openssl/crypto/x509v3/v3_addr.c releng/11.0/crypto/openssl/crypto/x509v3/v3_alt.c releng/11.0/crypto/openssl/crypto/x509v3/v3_conf.c releng/11.0/crypto/openssl/doc/apps/cms.pod releng/11.0/crypto/openssl/doc/apps/s_client.pod releng/11.0/crypto/openssl/doc/apps/s_server.pod releng/11.0/crypto/openssl/doc/apps/smime.pod releng/11.0/crypto/openssl/doc/apps/verify.pod releng/11.0/crypto/openssl/doc/apps/x509.pod releng/11.0/crypto/openssl/doc/apps/x509v3_config.pod releng/11.0/crypto/openssl/doc/crypto/BIO_s_bio.pod releng/11.0/crypto/openssl/doc/crypto/BN_bn2bin.pod releng/11.0/crypto/openssl/doc/crypto/BN_rand.pod releng/11.0/crypto/openssl/doc/crypto/EVP_EncryptInit.pod releng/11.0/crypto/openssl/doc/crypto/EVP_PKEY_cmp.pod releng/11.0/crypto/openssl/doc/crypto/OBJ_nid2obj.pod releng/11.0/crypto/openssl/doc/crypto/OPENSSL_config.pod releng/11.0/crypto/openssl/doc/crypto/OPENSSL_ia32cap.pod releng/11.0/crypto/openssl/doc/crypto/X509_verify_cert.pod releng/11.0/crypto/openssl/doc/crypto/d2i_X509.pod releng/11.0/crypto/openssl/doc/crypto/hmac.pod releng/11.0/crypto/openssl/doc/crypto/rand.pod releng/11.0/crypto/openssl/doc/crypto/ui.pod releng/11.0/crypto/openssl/engines/ccgost/gost2001.c releng/11.0/crypto/openssl/engines/ccgost/gost2001_keyx.c releng/11.0/crypto/openssl/engines/ccgost/gost94_keyx.c releng/11.0/crypto/openssl/engines/ccgost/gost_ameth.c releng/11.0/crypto/openssl/engines/ccgost/gost_pmeth.c releng/11.0/crypto/openssl/engines/e_4758cca.c releng/11.0/crypto/openssl/engines/e_aep.c releng/11.0/crypto/openssl/engines/e_capi.c releng/11.0/crypto/openssl/engines/e_chil.c releng/11.0/crypto/openssl/ssl/Makefile releng/11.0/crypto/openssl/ssl/d1_both.c releng/11.0/crypto/openssl/ssl/d1_clnt.c releng/11.0/crypto/openssl/ssl/d1_lib.c releng/11.0/crypto/openssl/ssl/d1_pkt.c releng/11.0/crypto/openssl/ssl/d1_srvr.c releng/11.0/crypto/openssl/ssl/s23_clnt.c releng/11.0/crypto/openssl/ssl/s2_clnt.c releng/11.0/crypto/openssl/ssl/s2_srvr.c releng/11.0/crypto/openssl/ssl/s3_both.c releng/11.0/crypto/openssl/ssl/s3_clnt.c releng/11.0/crypto/openssl/ssl/s3_enc.c releng/11.0/crypto/openssl/ssl/s3_lib.c releng/11.0/crypto/openssl/ssl/s3_pkt.c releng/11.0/crypto/openssl/ssl/s3_srvr.c releng/11.0/crypto/openssl/ssl/ssl.h releng/11.0/crypto/openssl/ssl/ssl_asn1.c releng/11.0/crypto/openssl/ssl/ssl_ciph.c releng/11.0/crypto/openssl/ssl/ssl_err.c releng/11.0/crypto/openssl/ssl/ssl_lib.c releng/11.0/crypto/openssl/ssl/ssl_locl.h releng/11.0/crypto/openssl/ssl/ssl_rsa.c releng/11.0/crypto/openssl/ssl/ssl_sess.c releng/11.0/crypto/openssl/ssl/ssltest.c releng/11.0/crypto/openssl/ssl/sslv2conftest.c releng/11.0/crypto/openssl/ssl/t1_enc.c releng/11.0/crypto/openssl/ssl/t1_lib.c releng/11.0/crypto/openssl/util/mk1mf.pl releng/11.0/crypto/openssl/util/mkerr.pl releng/11.0/crypto/openssl/util/ssleay.num releng/11.0/secure/lib/libcrypto/Makefile.inc releng/11.0/secure/lib/libcrypto/Makefile.man releng/11.0/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S releng/11.0/secure/lib/libcrypto/amd64/sha1-x86_64.S releng/11.0/secure/lib/libcrypto/amd64/x86_64-mont.S releng/11.0/secure/lib/libcrypto/amd64/x86_64-mont5.S releng/11.0/secure/lib/libcrypto/i386/x86-mont.S releng/11.0/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_length.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_new.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 releng/11.0/secure/lib/libcrypto/man/ASN1_TIME_set.3 releng/11.0/secure/lib/libcrypto/man/ASN1_generate_nconf.3 releng/11.0/secure/lib/libcrypto/man/BIO_ctrl.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_base64.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_buffer.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_cipher.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_md.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_null.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_ssl.3 releng/11.0/secure/lib/libcrypto/man/BIO_find_type.3 releng/11.0/secure/lib/libcrypto/man/BIO_new.3 releng/11.0/secure/lib/libcrypto/man/BIO_new_CMS.3 releng/11.0/secure/lib/libcrypto/man/BIO_push.3 releng/11.0/secure/lib/libcrypto/man/BIO_read.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_accept.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_bio.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_connect.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_fd.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_file.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_mem.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_null.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_socket.3 releng/11.0/secure/lib/libcrypto/man/BIO_set_callback.3 releng/11.0/secure/lib/libcrypto/man/BIO_should_retry.3 releng/11.0/secure/lib/libcrypto/man/BN_BLINDING_new.3 releng/11.0/secure/lib/libcrypto/man/BN_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/BN_CTX_start.3 releng/11.0/secure/lib/libcrypto/man/BN_add.3 releng/11.0/secure/lib/libcrypto/man/BN_add_word.3 releng/11.0/secure/lib/libcrypto/man/BN_bn2bin.3 releng/11.0/secure/lib/libcrypto/man/BN_cmp.3 releng/11.0/secure/lib/libcrypto/man/BN_copy.3 releng/11.0/secure/lib/libcrypto/man/BN_generate_prime.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_inverse.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 releng/11.0/secure/lib/libcrypto/man/BN_new.3 releng/11.0/secure/lib/libcrypto/man/BN_num_bytes.3 releng/11.0/secure/lib/libcrypto/man/BN_rand.3 releng/11.0/secure/lib/libcrypto/man/BN_set_bit.3 releng/11.0/secure/lib/libcrypto/man/BN_swap.3 releng/11.0/secure/lib/libcrypto/man/BN_zero.3 releng/11.0/secure/lib/libcrypto/man/CMS_add0_cert.3 releng/11.0/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 releng/11.0/secure/lib/libcrypto/man/CMS_add1_signer.3 releng/11.0/secure/lib/libcrypto/man/CMS_compress.3 releng/11.0/secure/lib/libcrypto/man/CMS_decrypt.3 releng/11.0/secure/lib/libcrypto/man/CMS_encrypt.3 releng/11.0/secure/lib/libcrypto/man/CMS_final.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_type.3 releng/11.0/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 releng/11.0/secure/lib/libcrypto/man/CMS_sign.3 releng/11.0/secure/lib/libcrypto/man/CMS_sign_receipt.3 releng/11.0/secure/lib/libcrypto/man/CMS_uncompress.3 releng/11.0/secure/lib/libcrypto/man/CMS_verify.3 releng/11.0/secure/lib/libcrypto/man/CMS_verify_receipt.3 releng/11.0/secure/lib/libcrypto/man/CONF_modules_free.3 releng/11.0/secure/lib/libcrypto/man/CONF_modules_load_file.3 releng/11.0/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 releng/11.0/secure/lib/libcrypto/man/DH_generate_key.3 releng/11.0/secure/lib/libcrypto/man/DH_generate_parameters.3 releng/11.0/secure/lib/libcrypto/man/DH_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/DH_new.3 releng/11.0/secure/lib/libcrypto/man/DH_set_method.3 releng/11.0/secure/lib/libcrypto/man/DH_size.3 releng/11.0/secure/lib/libcrypto/man/DSA_SIG_new.3 releng/11.0/secure/lib/libcrypto/man/DSA_do_sign.3 releng/11.0/secure/lib/libcrypto/man/DSA_dup_DH.3 releng/11.0/secure/lib/libcrypto/man/DSA_generate_key.3 releng/11.0/secure/lib/libcrypto/man/DSA_generate_parameters.3 releng/11.0/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/DSA_new.3 releng/11.0/secure/lib/libcrypto/man/DSA_set_method.3 releng/11.0/secure/lib/libcrypto/man/DSA_sign.3 releng/11.0/secure/lib/libcrypto/man/DSA_size.3 releng/11.0/secure/lib/libcrypto/man/EC_GFp_simple_method.3 releng/11.0/secure/lib/libcrypto/man/EC_GROUP_copy.3 releng/11.0/secure/lib/libcrypto/man/EC_GROUP_new.3 releng/11.0/secure/lib/libcrypto/man/EC_KEY_new.3 releng/11.0/secure/lib/libcrypto/man/EC_POINT_add.3 releng/11.0/secure/lib/libcrypto/man/EC_POINT_new.3 releng/11.0/secure/lib/libcrypto/man/ERR_GET_LIB.3 releng/11.0/secure/lib/libcrypto/man/ERR_clear_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_error_string.3 releng/11.0/secure/lib/libcrypto/man/ERR_get_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 releng/11.0/secure/lib/libcrypto/man/ERR_load_strings.3 releng/11.0/secure/lib/libcrypto/man/ERR_print_errors.3 releng/11.0/secure/lib/libcrypto/man/ERR_put_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_remove_state.3 releng/11.0/secure/lib/libcrypto/man/ERR_set_mark.3 releng/11.0/secure/lib/libcrypto/man/EVP_BytesToKey.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestSignInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_EncodeInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_EncryptInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_OpenInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_derive.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_new.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_sign.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_verify.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 releng/11.0/secure/lib/libcrypto/man/EVP_SealInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_SignInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_VerifyInit.3 releng/11.0/secure/lib/libcrypto/man/OBJ_nid2obj.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_Applink.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_config.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 releng/11.0/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 releng/11.0/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 releng/11.0/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 releng/11.0/secure/lib/libcrypto/man/PKCS12_create.3 releng/11.0/secure/lib/libcrypto/man/PKCS12_parse.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_decrypt.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_encrypt.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_sign.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_verify.3 releng/11.0/secure/lib/libcrypto/man/RAND_add.3 releng/11.0/secure/lib/libcrypto/man/RAND_bytes.3 releng/11.0/secure/lib/libcrypto/man/RAND_cleanup.3 releng/11.0/secure/lib/libcrypto/man/RAND_egd.3 releng/11.0/secure/lib/libcrypto/man/RAND_load_file.3 releng/11.0/secure/lib/libcrypto/man/RAND_set_rand_method.3 releng/11.0/secure/lib/libcrypto/man/RSA_blinding_on.3 releng/11.0/secure/lib/libcrypto/man/RSA_check_key.3 releng/11.0/secure/lib/libcrypto/man/RSA_generate_key.3 releng/11.0/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/RSA_new.3 releng/11.0/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 releng/11.0/secure/lib/libcrypto/man/RSA_print.3 releng/11.0/secure/lib/libcrypto/man/RSA_private_encrypt.3 releng/11.0/secure/lib/libcrypto/man/RSA_public_encrypt.3 releng/11.0/secure/lib/libcrypto/man/RSA_set_method.3 releng/11.0/secure/lib/libcrypto/man/RSA_sign.3 releng/11.0/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 releng/11.0/secure/lib/libcrypto/man/RSA_size.3 releng/11.0/secure/lib/libcrypto/man/SMIME_read_CMS.3 releng/11.0/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 releng/11.0/secure/lib/libcrypto/man/SMIME_write_CMS.3 releng/11.0/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_print_ex.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 releng/11.0/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 releng/11.0/secure/lib/libcrypto/man/X509_check_host.3 releng/11.0/secure/lib/libcrypto/man/X509_new.3 releng/11.0/secure/lib/libcrypto/man/X509_verify_cert.3 releng/11.0/secure/lib/libcrypto/man/bio.3 releng/11.0/secure/lib/libcrypto/man/blowfish.3 releng/11.0/secure/lib/libcrypto/man/bn.3 releng/11.0/secure/lib/libcrypto/man/bn_internal.3 releng/11.0/secure/lib/libcrypto/man/buffer.3 releng/11.0/secure/lib/libcrypto/man/crypto.3 releng/11.0/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 releng/11.0/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 releng/11.0/secure/lib/libcrypto/man/d2i_DHparams.3 releng/11.0/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_ECPKParameters.3 releng/11.0/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_CRL.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_NAME.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_REQ.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_SIG.3 releng/11.0/secure/lib/libcrypto/man/des.3 releng/11.0/secure/lib/libcrypto/man/dh.3 releng/11.0/secure/lib/libcrypto/man/dsa.3 releng/11.0/secure/lib/libcrypto/man/ec.3 releng/11.0/secure/lib/libcrypto/man/ecdsa.3 releng/11.0/secure/lib/libcrypto/man/engine.3 releng/11.0/secure/lib/libcrypto/man/err.3 releng/11.0/secure/lib/libcrypto/man/evp.3 releng/11.0/secure/lib/libcrypto/man/hmac.3 releng/11.0/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 releng/11.0/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 releng/11.0/secure/lib/libcrypto/man/lh_stats.3 releng/11.0/secure/lib/libcrypto/man/lhash.3 releng/11.0/secure/lib/libcrypto/man/md5.3 releng/11.0/secure/lib/libcrypto/man/mdc2.3 releng/11.0/secure/lib/libcrypto/man/pem.3 releng/11.0/secure/lib/libcrypto/man/rand.3 releng/11.0/secure/lib/libcrypto/man/rc4.3 releng/11.0/secure/lib/libcrypto/man/ripemd.3 releng/11.0/secure/lib/libcrypto/man/rsa.3 releng/11.0/secure/lib/libcrypto/man/sha.3 releng/11.0/secure/lib/libcrypto/man/threads.3 releng/11.0/secure/lib/libcrypto/man/ui.3 releng/11.0/secure/lib/libcrypto/man/ui_compat.3 releng/11.0/secure/lib/libcrypto/man/x509.3 releng/11.0/secure/lib/libssl/man/SSL_CIPHER_get_name.3 releng/11.0/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_new.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_cmd.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add_session.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_ctrl.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_free.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get0_param.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_new.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_number.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sessions.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set1_curves.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_options.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_timeout.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_verify.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_certificate.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_free.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_get_time.3 releng/11.0/secure/lib/libssl/man/SSL_accept.3 releng/11.0/secure/lib/libssl/man/SSL_alert_type_string.3 releng/11.0/secure/lib/libssl/man/SSL_check_chain.3 releng/11.0/secure/lib/libssl/man/SSL_clear.3 releng/11.0/secure/lib/libssl/man/SSL_connect.3 releng/11.0/secure/lib/libssl/man/SSL_do_handshake.3 releng/11.0/secure/lib/libssl/man/SSL_free.3 releng/11.0/secure/lib/libssl/man/SSL_get_SSL_CTX.3 releng/11.0/secure/lib/libssl/man/SSL_get_ciphers.3 releng/11.0/secure/lib/libssl/man/SSL_get_client_CA_list.3 releng/11.0/secure/lib/libssl/man/SSL_get_current_cipher.3 releng/11.0/secure/lib/libssl/man/SSL_get_default_timeout.3 releng/11.0/secure/lib/libssl/man/SSL_get_error.3 releng/11.0/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 releng/11.0/secure/lib/libssl/man/SSL_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_get_fd.3 releng/11.0/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 releng/11.0/secure/lib/libssl/man/SSL_get_peer_certificate.3 releng/11.0/secure/lib/libssl/man/SSL_get_psk_identity.3 releng/11.0/secure/lib/libssl/man/SSL_get_rbio.3 releng/11.0/secure/lib/libssl/man/SSL_get_session.3 releng/11.0/secure/lib/libssl/man/SSL_get_verify_result.3 releng/11.0/secure/lib/libssl/man/SSL_get_version.3 releng/11.0/secure/lib/libssl/man/SSL_library_init.3 releng/11.0/secure/lib/libssl/man/SSL_load_client_CA_file.3 releng/11.0/secure/lib/libssl/man/SSL_new.3 releng/11.0/secure/lib/libssl/man/SSL_pending.3 releng/11.0/secure/lib/libssl/man/SSL_read.3 releng/11.0/secure/lib/libssl/man/SSL_rstate_string.3 releng/11.0/secure/lib/libssl/man/SSL_session_reused.3 releng/11.0/secure/lib/libssl/man/SSL_set_bio.3 releng/11.0/secure/lib/libssl/man/SSL_set_connect_state.3 releng/11.0/secure/lib/libssl/man/SSL_set_fd.3 releng/11.0/secure/lib/libssl/man/SSL_set_session.3 releng/11.0/secure/lib/libssl/man/SSL_set_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_set_verify_result.3 releng/11.0/secure/lib/libssl/man/SSL_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_state_string.3 releng/11.0/secure/lib/libssl/man/SSL_want.3 releng/11.0/secure/lib/libssl/man/SSL_write.3 releng/11.0/secure/lib/libssl/man/d2i_SSL_SESSION.3 releng/11.0/secure/lib/libssl/man/ssl.3 releng/11.0/secure/usr.bin/openssl/man/CA.pl.1 releng/11.0/secure/usr.bin/openssl/man/asn1parse.1 releng/11.0/secure/usr.bin/openssl/man/c_rehash.1 releng/11.0/secure/usr.bin/openssl/man/ca.1 releng/11.0/secure/usr.bin/openssl/man/ciphers.1 releng/11.0/secure/usr.bin/openssl/man/cms.1 releng/11.0/secure/usr.bin/openssl/man/crl.1 releng/11.0/secure/usr.bin/openssl/man/crl2pkcs7.1 releng/11.0/secure/usr.bin/openssl/man/dgst.1 releng/11.0/secure/usr.bin/openssl/man/dhparam.1 releng/11.0/secure/usr.bin/openssl/man/dsa.1 releng/11.0/secure/usr.bin/openssl/man/dsaparam.1 releng/11.0/secure/usr.bin/openssl/man/ec.1 releng/11.0/secure/usr.bin/openssl/man/ecparam.1 releng/11.0/secure/usr.bin/openssl/man/enc.1 releng/11.0/secure/usr.bin/openssl/man/errstr.1 releng/11.0/secure/usr.bin/openssl/man/gendsa.1 releng/11.0/secure/usr.bin/openssl/man/genpkey.1 releng/11.0/secure/usr.bin/openssl/man/genrsa.1 releng/11.0/secure/usr.bin/openssl/man/nseq.1 releng/11.0/secure/usr.bin/openssl/man/ocsp.1 releng/11.0/secure/usr.bin/openssl/man/openssl.1 releng/11.0/secure/usr.bin/openssl/man/passwd.1 releng/11.0/secure/usr.bin/openssl/man/pkcs12.1 releng/11.0/secure/usr.bin/openssl/man/pkcs7.1 releng/11.0/secure/usr.bin/openssl/man/pkcs8.1 releng/11.0/secure/usr.bin/openssl/man/pkey.1 releng/11.0/secure/usr.bin/openssl/man/pkeyparam.1 releng/11.0/secure/usr.bin/openssl/man/pkeyutl.1 releng/11.0/secure/usr.bin/openssl/man/rand.1 releng/11.0/secure/usr.bin/openssl/man/req.1 releng/11.0/secure/usr.bin/openssl/man/rsa.1 releng/11.0/secure/usr.bin/openssl/man/rsautl.1 releng/11.0/secure/usr.bin/openssl/man/s_client.1 releng/11.0/secure/usr.bin/openssl/man/s_server.1 releng/11.0/secure/usr.bin/openssl/man/s_time.1 releng/11.0/secure/usr.bin/openssl/man/sess_id.1 releng/11.0/secure/usr.bin/openssl/man/smime.1 releng/11.0/secure/usr.bin/openssl/man/speed.1 releng/11.0/secure/usr.bin/openssl/man/spkac.1 releng/11.0/secure/usr.bin/openssl/man/ts.1 releng/11.0/secure/usr.bin/openssl/man/tsget.1 releng/11.0/secure/usr.bin/openssl/man/verify.1 releng/11.0/secure/usr.bin/openssl/man/version.1 releng/11.0/secure/usr.bin/openssl/man/x509.1 releng/11.0/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/crypto/openssl/CHANGES ============================================================================== --- releng/11.0/crypto/openssl/CHANGES Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/CHANGES Thu Sep 22 15:55:27 2016 (r306198) @@ -2,6 +2,166 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] + + *) OCSP Status Request extension unbounded memory growth + + A malicious client can send an excessively large OCSP Status Request + extension. If that client continually requests renegotiation, sending a + large OCSP Status Request extension each time, then there will be unbounded + memory growth on the server. This will eventually lead to a Denial Of + Service attack through memory exhaustion. Servers with a default + configuration are vulnerable even if they do not support OCSP. Builds using + the "no-ocsp" build time option are not affected. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6304) + [Matt Caswell] + + *) In order to mitigate the SWEET32 attack, the DES ciphers were moved from + HIGH to MEDIUM. + + This issue was reported to OpenSSL Karthikeyan Bhargavan and Gaetan + Leurent (INRIA) + (CVE-2016-2183) + [Rich Salz] + + *) OOB write in MDC2_Update() + + An overflow can occur in MDC2_Update() either if called directly or + through the EVP_DigestUpdate() function using MDC2. If an attacker + is able to supply very large amounts of input data after a previous + call to EVP_EncryptUpdate() with a partial block then a length check + can overflow resulting in a heap corruption. + + The amount of data needed is comparable to SIZE_MAX which is impractical + on most platforms. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6303) + [Stephen Henson] + + *) Malformed SHA512 ticket DoS + + If a server uses SHA512 for TLS session ticket HMAC it is vulnerable to a + DoS attack where a malformed ticket will result in an OOB read which will + ultimately crash. + + The use of SHA512 in TLS session tickets is comparatively rare as it requires + a custom server callback and ticket lookup mechanism. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6302) + [Stephen Henson] + + *) OOB write in BN_bn2dec() + + The function BN_bn2dec() does not check the return value of BN_div_word(). + This can cause an OOB write if an application uses this function with an + overly large BIGNUM. This could be a problem if an overly large certificate + or CRL is printed out from an untrusted source. TLS is not affected because + record limits will reject an oversized certificate before it is parsed. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2182) + [Stephen Henson] + + *) OOB read in TS_OBJ_print_bio() + + The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is + the total length the OID text representation would use and not the amount + of data written. This will result in OOB reads when large OIDs are + presented. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-2180) + [Stephen Henson] + + *) Pointer arithmetic undefined behaviour + + Avoid some undefined pointer arithmetic + + A common idiom in the codebase is to check limits in the following manner: + "p + len > limit" + + Where "p" points to some malloc'd data of SIZE bytes and + limit == p + SIZE + + "len" here could be from some externally supplied data (e.g. from a TLS + message). + + The rules of C pointer arithmetic are such that "p + len" is only well + defined where len <= SIZE. Therefore the above idiom is actually + undefined behaviour. + + For example this could cause problems if some malloc implementation + provides an address for "p" such that "p + len" actually overflows for + values of len that are too big and therefore p + len < limit. + + This issue was reported to OpenSSL by Guido Vranken + (CVE-2016-2177) + [Matt Caswell] + + *) Constant time flag not preserved in DSA signing + + Operations in the DSA signing algorithm should run in constant time in + order to avoid side channel attacks. A flaw in the OpenSSL DSA + implementation means that a non-constant time codepath is followed for + certain operations. This has been demonstrated through a cache-timing + attack to be sufficient for an attacker to recover the private DSA key. + + This issue was reported by César Pereida (Aalto University), Billy Brumley + (Tampere University of Technology), and Yuval Yarom (The University of + Adelaide and NICTA). + (CVE-2016-2178) + [César Pereida] + + *) DTLS buffered message DoS + + In a DTLS connection where handshake messages are delivered out-of-order + those messages that OpenSSL is not yet ready to process will be buffered + for later use. Under certain circumstances, a flaw in the logic means that + those messages do not get removed from the buffer even though the handshake + has been completed. An attacker could force up to approx. 15 messages to + remain in the buffer when they are no longer required. These messages will + be cleared when the DTLS connection is closed. The default maximum size for + a message is 100k. Therefore the attacker could force an additional 1500k + to be consumed per connection. By opening many simulataneous connections an + attacker could cause a DoS attack through memory exhaustion. + + This issue was reported to OpenSSL by Quan Luo. + (CVE-2016-2179) + [Matt Caswell] + + *) DTLS replay protection DoS + + A flaw in the DTLS replay attack protection mechanism means that records + that arrive for future epochs update the replay protection "window" before + the MAC for the record has been validated. This could be exploited by an + attacker by sending a record for the next epoch (which does not have to + decrypt or have a valid MAC), with a very large sequence number. This means + that all subsequent legitimate packets are dropped causing a denial of + service for a specific DTLS connection. + + This issue was reported to OpenSSL by the OCAP audit team. + (CVE-2016-2181) + [Matt Caswell] + + *) Certificate message OOB reads + + In OpenSSL 1.0.2 and earlier some missing message length checks can result + in OOB reads of up to 2 bytes beyond an allocated buffer. There is a + theoretical DoS risk but this has not been observed in practice on common + platforms. + + The messages affected are client certificate, client certificate request + and server certificate. As a result the attack can only be performed + against a client or a server which enables client authentication. + + This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.) + (CVE-2016-6306) + [Stephen Henson] + Changes between 1.0.2g and 1.0.2h [3 May 2016] *) Prevent padding oracle in AES-NI CBC MAC check Modified: releng/11.0/crypto/openssl/CONTRIBUTING ============================================================================== --- releng/11.0/crypto/openssl/CONTRIBUTING Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/CONTRIBUTING Thu Sep 22 15:55:27 2016 (r306198) @@ -1,38 +1,75 @@ -HOW TO CONTRIBUTE TO OpenSSL ----------------------------- +HOW TO CONTRIBUTE TO PATCHES OpenSSL +------------------------------------ -Development is coordinated on the openssl-dev mailing list (see -http://www.openssl.org for information on subscribing). If you -would like to submit a patch, send it to rt@openssl.org with -the string "[PATCH]" in the subject. Please be sure to include a -textual explanation of what your patch does. - -You can also make GitHub pull requests. If you do this, please also send -mail to rt@openssl.org with a brief description and a link to the PR so -that we can more easily keep track of it. +(Please visit https://www.openssl.org/community/getting-started.html for +other ideas about how to contribute.) +Development is coordinated on the openssl-dev mailing list (see the +above link or https://mta.openssl.org for information on subscribing). If you are unsure as to whether a feature will be useful for the general -OpenSSL community please discuss it on the openssl-dev mailing list first. -Someone may be already working on the same thing or there may be a good -reason as to why that feature isn't implemented. - -Patches should be as up to date as possible, preferably relative to the -current Git or the last snapshot. They should follow our coding style -(see https://www.openssl.org/policies/codingstyle.html) and compile without -warnings using the --strict-warnings flag. OpenSSL compiles on many varied -platforms: try to ensure you only use portable features. - -Our preferred format for patch files is "git format-patch" output. For example -to provide a patch file containing the last commit in your local git repository -use the following command: +OpenSSL community you might want to discuss it on the openssl-dev mailing +list first. Someone may be already working on the same thing or there +may be a good reason as to why that feature isn't implemented. + +The best way to submit a patch is to make a pull request on GitHub. +(It is not necessary to send mail to rt@openssl.org to open a ticket!) +If you think the patch could use feedback from the community, please +start a thread on openssl-dev. + +You can also submit patches by sending it as mail to rt@openssl.org. +Please include the word "PATCH" and an explanation of what the patch +does in the subject line. If you do this, our preferred format is "git +format-patch" output. For example to provide a patch file containing the +last commit in your local git repository use the following command: -# git format-patch --stdout HEAD^ >mydiffs.patch + % git format-patch --stdout HEAD^ >mydiffs.patch Another method of creating an acceptable patch file without using git is as follows: -# cd openssl-work -# [your changes] -# ./Configure dist; make clean -# cd .. -# diff -ur openssl-orig openssl-work > mydiffs.patch + % cd openssl-work + ...make your changes... + % ./Configure dist; make clean + % cd .. + % diff -ur openssl-orig openssl-work >mydiffs.patch + +Note that pull requests are generally easier for the team, and community, to +work with. Pull requests benefit from all of the standard GitHub features, +including code review tools, simpler integration, and CI build support. + +No matter how a patch is submitted, the following items will help make +the acceptance and review process faster: + + 1. Anything other than trivial contributions will require a contributor + licensing agreement, giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the OpenSSL license (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + + 3. Patches should be as current as possible. When using GitHub, please + expect to have to rebase and update often. Note that we do not accept merge + commits. You will be asked to remove them before a patch is considered + acceptable. + + 4. Patches should follow our coding style (see + https://www.openssl.org/policies/codingstyle.html) and compile without + warnings. Where gcc or clang is availble you should use the + --strict-warnings Configure option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + + 5. When at all possible, patches should include tests. These can either be + added to an existing test, or completely new. Please see test/README + for information on the test framework. + + 6. New features or changed functionality must include documentation. Please + look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of + our style. Modified: releng/11.0/crypto/openssl/Configure ============================================================================== --- releng/11.0/crypto/openssl/Configure Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/Configure Thu Sep 22 15:55:27 2016 (r306198) @@ -799,7 +799,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). @@ -1082,11 +1082,6 @@ if (defined($disabled{"md5"}) || defined $disabled{"tls1"} = "forced"; } -if (defined($disabled{"tls1"})) - { - $disabled{"tlsext"} = "forced"; - } - if (defined($disabled{"ec"}) || defined($disabled{"dsa"}) || defined($disabled{"dh"})) { @@ -1254,6 +1249,7 @@ my $shared_extension = $fields[$idx_shar my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib]; my $ar = $ENV{'AR'} || "ar"; my $arflags = $fields[$idx_arflags]; +my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres"; my $multilib = $fields[$idx_multilib]; # if $prefix/lib$multilib is not an existing directory, then @@ -1562,8 +1558,15 @@ $cpuid_obj="mem_clr.o" unless ($cpuid_ob $des_obj=$des_enc unless ($des_obj =~ /\.o$/); $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); -$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); $rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); +if ($rc4_obj =~ /\.o$/) + { + $cflags.=" -DRC4_ASM"; + } +else + { + $rc4_obj=$rc4_enc; + } if ($sha1_obj =~ /\.o$/) { # $sha1_obj=$sha1_enc; @@ -1717,12 +1720,14 @@ while () s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/; s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/; s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; + s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc"; } else { s/^CC=.*$/CC= $cc/; s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; + s/^RC=.*/RC= $windres/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang"; } Modified: releng/11.0/crypto/openssl/Makefile ============================================================================== --- releng/11.0/crypto/openssl/Makefile Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/Makefile Thu Sep 22 15:55:27 2016 (r306198) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2h +VERSION=1.0.2i MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -68,6 +68,7 @@ EXE_EXT= ARFLAGS= AR= ar $(ARFLAGS) r RANLIB= /usr/bin/ranlib +RC= windres NM= nm PERL= /usr/bin/perl TAR= tar @@ -210,6 +211,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -368,6 +370,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: releng/11.0/crypto/openssl/Makefile.org ============================================================================== --- releng/11.0/crypto/openssl/Makefile.org Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/Makefile.org Thu Sep 22 15:55:27 2016 (r306198) @@ -66,6 +66,7 @@ EXE_EXT= ARFLAGS?= r AR=ar $(ARFLAGS) RANLIB= ranlib +RC= windres NM= nm PERL= perl TAR= tar @@ -208,6 +209,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM) CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ + RC='$(RC)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ @@ -366,6 +368,7 @@ libcrypto.pc: Makefile echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ echo 'includedir=$${prefix}/include'; \ + echo 'enginesdir=$${libdir}/engines'; \ echo ''; \ echo 'Name: OpenSSL-libcrypto'; \ echo 'Description: OpenSSL cryptography library'; \ Modified: releng/11.0/crypto/openssl/Makefile.shared ============================================================================== --- releng/11.0/crypto/openssl/Makefile.shared Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/Makefile.shared Thu Sep 22 15:55:27 2016 (r306198) @@ -293,7 +293,7 @@ link_a.cygwin: fi; \ dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \ $(PERL) util/mkrc.pl $$dll_name | \ - $(CROSS_COMPILE)windres -o rc.o; \ + $(RC) -o rc.o; \ extras="$$extras rc.o"; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ Modified: releng/11.0/crypto/openssl/NEWS ============================================================================== --- releng/11.0/crypto/openssl/NEWS Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/NEWS Thu Sep 22 15:55:27 2016 (r306198) @@ -5,6 +5,20 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] + + o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) + o SWEET32 Mitigation (CVE-2016-2183) + o OOB write in MDC2_Update() (CVE-2016-6303) + o Malformed SHA512 ticket DoS (CVE-2016-6302) + o OOB write in BN_bn2dec() (CVE-2016-2182) + o OOB read in TS_OBJ_print_bio() (CVE-2016-2180) + o Pointer arithmetic undefined behaviour (CVE-2016-2177) + o Constant time flag not preserved in DSA signing (CVE-2016-2178) + o DTLS buffered message DoS (CVE-2016-2179) + o DTLS replay protection DoS (CVE-2016-2181) + o Certificate message OOB reads (CVE-2016-6306) + Major changes between OpenSSL 1.0.2g and OpenSSL 1.0.2h [3 May 2016] o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) Modified: releng/11.0/crypto/openssl/README ============================================================================== --- releng/11.0/crypto/openssl/README Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/README Thu Sep 22 15:55:27 2016 (r306198) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2h 3 May 2016 + OpenSSL 1.0.2i 22 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: releng/11.0/crypto/openssl/apps/CA.pl ============================================================================== --- releng/11.0/crypto/openssl/apps/CA.pl Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/CA.pl Thu Sep 22 15:55:27 2016 (r306198) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: releng/11.0/crypto/openssl/apps/CA.pl.in ============================================================================== --- releng/11.0/crypto/openssl/apps/CA.pl.in Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/CA.pl.in Thu Sep 22 15:55:27 2016 (r306198) @@ -64,7 +64,7 @@ $RET = 0; foreach (@ARGV) { if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n"; exit 0; } elsif (/^-newcert$/) { # create a certificate @@ -186,4 +186,3 @@ while () { } } } - Modified: releng/11.0/crypto/openssl/apps/apps.c ============================================================================== --- releng/11.0/crypto/openssl/apps/apps.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/apps.c Thu Sep 22 15:55:27 2016 (r306198) @@ -215,7 +215,8 @@ int args_from_file(char *file, int *argc if (arg != NULL) OPENSSL_free(arg); arg = (char **)OPENSSL_malloc(sizeof(char *) * (i * 2)); - + if (arg == NULL) + return 0; *argv = arg; num = 0; p = buf; @@ -2374,6 +2375,8 @@ int args_verify(char ***pargs, int *parg flags |= X509_V_FLAG_PARTIAL_CHAIN; else if (!strcmp(arg, "-no_alt_chains")) flags |= X509_V_FLAG_NO_ALT_CHAINS; + else if (!strcmp(arg, "-allow_proxy_certs")) + flags |= X509_V_FLAG_ALLOW_PROXY_CERTS; else return 0; @@ -3195,6 +3198,36 @@ int app_isdir(const char *name) #endif /* raw_read|write section */ +#if defined(__VMS) +# include "vms_term_sock.h" +static int stdin_sock = -1; + +static void close_stdin_sock(void) +{ + TerminalSocket (TERM_SOCK_DELETE, &stdin_sock); +} + +int fileno_stdin(void) +{ + if (stdin_sock == -1) { + TerminalSocket(TERM_SOCK_CREATE, &stdin_sock); + atexit(close_stdin_sock); + } + + return stdin_sock; +} +#else +int fileno_stdin(void) +{ + return fileno(stdin); +} +#endif + +int fileno_stdout(void) +{ + return fileno(stdout); +} + #if defined(_WIN32) && defined(STD_INPUT_HANDLE) int raw_read_stdin(void *buf, int siz) { @@ -3204,10 +3237,17 @@ int raw_read_stdin(void *buf, int siz) else return (-1); } +#elif defined(__VMS) +#include + +int raw_read_stdin(void *buf, int siz) +{ + return recv(fileno_stdin(), buf, siz, 0); +} #else int raw_read_stdin(void *buf, int siz) { - return read(fileno(stdin), buf, siz); + return read(fileno_stdin(), buf, siz); } #endif @@ -3223,6 +3263,6 @@ int raw_write_stdout(const void *buf, in #else int raw_write_stdout(const void *buf, int siz) { - return write(fileno(stdout), buf, siz); + return write(fileno_stdout(), buf, siz); } #endif Modified: releng/11.0/crypto/openssl/apps/apps.h ============================================================================== --- releng/11.0/crypto/openssl/apps/apps.h Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/apps.h Thu Sep 22 15:55:27 2016 (r306198) @@ -375,6 +375,8 @@ void store_setup_crl_download(X509_STORE # define SERIAL_RAND_BITS 64 int app_isdir(const char *); +int fileno_stdin(void); +int fileno_stdout(void); int raw_read_stdin(void *, int); int raw_write_stdout(const void *, int); Modified: releng/11.0/crypto/openssl/apps/ca.c ============================================================================== --- releng/11.0/crypto/openssl/apps/ca.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/ca.c Thu Sep 22 15:55:27 2016 (r306198) @@ -2103,25 +2103,23 @@ static int do_body(X509 **xret, EVP_PKEY goto err; /* We now just add it to the database */ - row[DB_type] = (char *)OPENSSL_malloc(2); - tm = X509_get_notAfter(ret); - row[DB_exp_date] = (char *)OPENSSL_malloc(tm->length + 1); - memcpy(row[DB_exp_date], tm->data, tm->length); - row[DB_exp_date][tm->length] = '\0'; - - row[DB_rev_date] = NULL; - - /* row[DB_serial] done already */ - row[DB_file] = (char *)OPENSSL_malloc(8); + row[DB_type] = OPENSSL_malloc(2); + row[DB_exp_date] = OPENSSL_malloc(tm->length + 1); + row[DB_rev_date] = OPENSSL_malloc(1); + row[DB_file] = OPENSSL_malloc(8); row[DB_name] = X509_NAME_oneline(X509_get_subject_name(ret), NULL, 0); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || + (row[DB_rev_date] == NULL) || (row[DB_file] == NULL) || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto err; } - BUF_strlcpy(row[DB_file], "unknown", 8); + + memcpy(row[DB_exp_date], tm->data, tm->length); + row[DB_exp_date][tm->length] = '\0'; + row[DB_rev_date][0] = '\0'; + strcpy(row[DB_file], "unknown"); row[DB_type][0] = 'V'; row[DB_type][1] = '\0'; @@ -2307,6 +2305,7 @@ static int certify_spkac(X509 **xret, ch j = NETSCAPE_SPKI_verify(spki, pktmp); if (j <= 0) { + EVP_PKEY_free(pktmp); BIO_printf(bio_err, "signature verification failed on SPKAC public key\n"); goto err; Modified: releng/11.0/crypto/openssl/apps/dgst.c ============================================================================== --- releng/11.0/crypto/openssl/apps/dgst.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/dgst.c Thu Sep 22 15:55:27 2016 (r306198) @@ -243,6 +243,11 @@ int MAIN(int argc, char **argv) argv++; } + if (keyfile != NULL && argc > 1) { + BIO_printf(bio_err, "Can only sign or verify one file\n"); + goto end; + } + if (do_verify && !sigfile) { BIO_printf(bio_err, "No signature to verify: use the -signature option\n"); Modified: releng/11.0/crypto/openssl/apps/enc.c ============================================================================== --- releng/11.0/crypto/openssl/apps/enc.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/enc.c Thu Sep 22 15:55:27 2016 (r306198) @@ -509,7 +509,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "invalid hex salt value\n"); goto end; } - } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) + } else if (RAND_bytes(salt, sizeof salt) <= 0) goto end; /* * If -P option then don't bother writing Modified: releng/11.0/crypto/openssl/apps/passwd.c ============================================================================== --- releng/11.0/crypto/openssl/apps/passwd.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/passwd.c Thu Sep 22 15:55:27 2016 (r306198) @@ -416,7 +416,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 2) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 2) <= 0) goto err; (*salt_p)[0] = cov_2char[(*salt_p)[0] & 0x3f]; /* 6 bits */ (*salt_p)[1] = cov_2char[(*salt_p)[1] & 0x3f]; /* 6 bits */ @@ -437,7 +437,7 @@ static int do_passwd(int passed_salt, ch if (*salt_malloc_p == NULL) goto err; } - if (RAND_pseudo_bytes((unsigned char *)*salt_p, 8) < 0) + if (RAND_bytes((unsigned char *)*salt_p, 8) <= 0) goto err; for (i = 0; i < 8; i++) Modified: releng/11.0/crypto/openssl/apps/pkcs12.c ============================================================================== --- releng/11.0/crypto/openssl/apps/pkcs12.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/pkcs12.c Thu Sep 22 15:55:27 2016 (r306198) @@ -832,6 +832,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 EVP_PKEY *pkey; PKCS8_PRIV_KEY_INFO *p8; X509 *x509; + int ret = 0; switch (M_PKCS12_bag_type(bag)) { case NID_keyBag: @@ -844,7 +845,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(pkey = EVP_PKCS82PKEY(p8))) return 0; print_attribs(out, p8->attributes, "Key Attributes"); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -864,7 +865,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 } print_attribs(out, p8->attributes, "Key Attributes"); PKCS8_PRIV_KEY_INFO_free(p8); - PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); + ret = PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass); EVP_PKEY_free(pkey); break; @@ -884,7 +885,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 if (!(x509 = PKCS12_certbag2x509(bag))) return 0; dump_cert_text(out, x509); - PEM_write_bio_X509(out, x509); + ret = PEM_write_bio_X509(out, x509); X509_free(x509); break; @@ -902,7 +903,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS1 return 1; break; } - return 1; + return ret; } /* Given a single certificate return a verified chain or NULL if error */ @@ -931,16 +932,70 @@ static int get_cert_chain(X509 *cert, X5 int alg_print(BIO *x, X509_ALGOR *alg) { - PBEPARAM *pbe; - const unsigned char *p; - p = alg->parameter->value.sequence->data; - pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length); - if (!pbe) - return 1; - BIO_printf(bio_err, "%s, Iteration %ld\n", - OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)), - ASN1_INTEGER_get(pbe->iter)); - PBEPARAM_free(pbe); + int pbenid, aparamtype; + ASN1_OBJECT *aoid; + void *aparam; + PBEPARAM *pbe = NULL; + + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, alg); + + pbenid = OBJ_obj2nid(aoid); + + BIO_printf(x, "%s", OBJ_nid2ln(pbenid)); + + /* + * If PBE algorithm is PBES2 decode algorithm parameters + * for additional details. + */ + if (pbenid == NID_pbes2) { + PBE2PARAM *pbe2 = NULL; + int encnid; + if (aparamtype == V_ASN1_SEQUENCE) + pbe2 = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBE2PARAM)); + if (pbe2 == NULL) { + BIO_puts(x, ""); + goto done; + } + X509_ALGOR_get0(&aoid, &aparamtype, &aparam, pbe2->keyfunc); + pbenid = OBJ_obj2nid(aoid); + X509_ALGOR_get0(&aoid, NULL, NULL, pbe2->encryption); + encnid = OBJ_obj2nid(aoid); + BIO_printf(x, ", %s, %s", OBJ_nid2ln(pbenid), + OBJ_nid2sn(encnid)); + /* If KDF is PBKDF2 decode parameters */ + if (pbenid == NID_id_pbkdf2) { + PBKDF2PARAM *kdf = NULL; + int prfnid; + if (aparamtype == V_ASN1_SEQUENCE) + kdf = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBKDF2PARAM)); + if (kdf == NULL) { + BIO_puts(x, ""); + goto done; + } + + if (kdf->prf == NULL) { + prfnid = NID_hmacWithSHA1; + } else { + X509_ALGOR_get0(&aoid, NULL, NULL, kdf->prf); + prfnid = OBJ_obj2nid(aoid); + } + BIO_printf(x, ", Iteration %ld, PRF %s", + ASN1_INTEGER_get(kdf->iter), OBJ_nid2sn(prfnid)); + PBKDF2PARAM_free(kdf); + } + PBE2PARAM_free(pbe2); + } else { + if (aparamtype == V_ASN1_SEQUENCE) + pbe = ASN1_item_unpack(aparam, ASN1_ITEM_rptr(PBEPARAM)); + if (pbe == NULL) { + BIO_puts(x, ""); + goto done; + } + BIO_printf(x, ", Iteration %ld", ASN1_INTEGER_get(pbe->iter)); + PBEPARAM_free(pbe); + } + done: + BIO_puts(x, "\n"); return 1; } Modified: releng/11.0/crypto/openssl/apps/req.c ============================================================================== --- releng/11.0/crypto/openssl/apps/req.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/req.c Thu Sep 22 15:55:27 2016 (r306198) @@ -332,9 +332,10 @@ int MAIN(int argc, char **argv) subject = 1; else if (strcmp(*argv, "-text") == 0) text = 1; - else if (strcmp(*argv, "-x509") == 0) + else if (strcmp(*argv, "-x509") == 0) { + newreq = 1; x509 = 1; - else if (strcmp(*argv, "-asn1-kludge") == 0) + } else if (strcmp(*argv, "-asn1-kludge") == 0) kludge = 1; else if (strcmp(*argv, "-no-asn1-kludge") == 0) kludge = 0; @@ -756,7 +757,7 @@ int MAIN(int argc, char **argv) } } - if (newreq || x509) { + if (newreq) { if (pkey == NULL) { BIO_printf(bio_err, "you need to specify a private key\n"); goto end; @@ -1331,12 +1332,11 @@ static int auto_info(X509_REQ *req, STAC break; } #ifndef CHARSET_EBCDIC - if (*p == '+') + if (*type == '+') { #else - if (*p == os_toascii['+']) + if (*type == os_toascii['+']) { #endif - { - p++; + type++; mval = -1; } else mval = 0; Modified: releng/11.0/crypto/openssl/apps/s_apps.h ============================================================================== --- releng/11.0/crypto/openssl/apps/s_apps.h Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/s_apps.h Thu Sep 22 15:55:27 2016 (r306198) @@ -199,7 +199,8 @@ int load_excert(SSL_EXCERT **pexc, BIO * void print_ssl_summary(BIO *bio, SSL *s); #ifdef HEADER_SSL_H int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr); + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt); int args_ssl_call(SSL_CTX *ctx, BIO *err, SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, int no_ecdhe, int no_jpake); int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls, Modified: releng/11.0/crypto/openssl/apps/s_cb.c ============================================================================== --- releng/11.0/crypto/openssl/apps/s_cb.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/s_cb.c Thu Sep 22 15:55:27 2016 (r306198) @@ -1507,11 +1507,18 @@ void print_ssl_summary(BIO *bio, SSL *s) } int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, - int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr) + int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr, + int *no_prot_opt) { char *arg = **pargs, *argn = (*pargs)[1]; int rv; + if (strcmp(arg, "-no_ssl2") == 0 || strcmp(arg, "-no_ssl3") == 0 + || strcmp(arg, "-no_tls1") == 0 || strcmp(arg, "-no_tls1_1") == 0 + || strcmp(arg, "-no_tls1_2") == 0) { + *no_prot_opt = 1; + } + /* Attempt to run SSL configuration command */ rv = SSL_CONF_cmd_argv(cctx, pargc, pargs); /* If parameter not recognised just return */ Modified: releng/11.0/crypto/openssl/apps/s_client.c ============================================================================== --- releng/11.0/crypto/openssl/apps/s_client.c Thu Sep 22 15:17:36 2016 (r306197) +++ releng/11.0/crypto/openssl/apps/s_client.c Thu Sep 22 15:55:27 2016 (r306198) @@ -242,9 +242,9 @@ static unsigned int psk_client_cb(SSL *s unsigned char *psk, unsigned int max_psk_len) { - unsigned int psk_len = 0; int ret; - BIGNUM *bn = NULL; + long key_len; + unsigned char *key; if (c_debug) BIO_printf(bio_c_out, "psk_client_cb\n"); @@ -265,32 +265,29 @@ static unsigned int psk_client_cb(SSL *s if (c_debug) BIO_printf(bio_c_out, "created identity '%s' len=%d\n", identity, ret); - ret = BN_hex2bn(&bn, psk_key); - if (!ret) { - BIO_printf(bio_err, "Could not convert PSK key '%s' to BIGNUM\n", + + /* convert the PSK key to binary */ + key = string_to_hex(psk_key, &key_len); + if (key == NULL) { + BIO_printf(bio_err, "Could not convert PSK key '%s' to buffer\n", psk_key); - if (bn) - BN_free(bn); return 0; } - - if ((unsigned int)BN_num_bytes(bn) > max_psk_len) { + if ((unsigned long)key_len > (unsigned long)max_psk_len) { BIO_printf(bio_err, - "psk buffer of callback is too small (%d) for key (%d)\n", - max_psk_len, BN_num_bytes(bn)); - BN_free(bn); + "psk buffer of callback is too small (%d) for key (%ld)\n", + max_psk_len, key_len); + OPENSSL_free(key); return 0; } - psk_len = BN_bn2bin(bn, psk); - BN_free(bn); - if (psk_len == 0) - goto out_err; + memcpy(psk, key, key_len); + OPENSSL_free(key); if (c_debug) - BIO_printf(bio_c_out, "created PSK len=%d\n", psk_len); + BIO_printf(bio_c_out, "created PSK len=%ld\n", key_len); - return psk_len; + return key_len; out_err: if (c_debug) BIO_printf(bio_err, "Error in PSK client callback\n"); @@ -747,6 +744,7 @@ int MAIN(int argc, char **argv) int crl_format = FORMAT_PEM; int crl_download = 0; STACK_OF(X509_CRL) *crls = NULL; + int prot_opt = 0, no_prot_opt = 0; meth = SSLv23_client_method(); @@ -850,7 +848,8 @@ int MAIN(int argc, char **argv) if (badarg) goto bad; continue; - } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args)) { + } else if (args_ssl(&argv, &argc, cctx, &badarg, bio_err, &ssl_args, + &no_prot_opt)) { if (badarg) goto bad; continue; @@ -942,31 +941,42 @@ int MAIN(int argc, char **argv) } #endif #ifndef OPENSSL_NO_SSL2 - else if (strcmp(*argv, "-ssl2") == 0) + else if (strcmp(*argv, "-ssl2") == 0) { meth = SSLv2_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_SSL3_METHOD - else if (strcmp(*argv, "-ssl3") == 0) + else if (strcmp(*argv, "-ssl3") == 0) { meth = SSLv3_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_TLS1 - else if (strcmp(*argv, "-tls1_2") == 0) + else if (strcmp(*argv, "-tls1_2") == 0) { meth = TLSv1_2_client_method(); - else if (strcmp(*argv, "-tls1_1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1_1") == 0) { meth = TLSv1_1_client_method(); - else if (strcmp(*argv, "-tls1") == 0) + prot_opt++; + } else if (strcmp(*argv, "-tls1") == 0) { meth = TLSv1_client_method(); + prot_opt++; + } #endif #ifndef OPENSSL_NO_DTLS1 else if (strcmp(*argv, "-dtls") == 0) { meth = DTLS_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-dtls1") == 0) { meth = DTLSv1_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-dtls1_2") == 0) { meth = DTLSv1_2_client_method(); socket_type = SOCK_DGRAM; + prot_opt++; } else if (strcmp(*argv, "-timeout") == 0) enable_timeouts = 1; else if (strcmp(*argv, "-mtu") == 0) { @@ -1149,6 +1159,17 @@ int MAIN(int argc, char **argv) } #endif + if (prot_opt > 1) { + BIO_printf(bio_err, "Cannot supply multiple protocol flags\n"); + goto end; + } + + if (prot_opt == 1 && no_prot_opt) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 16:05:20 2016 Return-Path: Delivered-To: svn-src-all@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 4BEE2BE6FF6; Thu, 22 Sep 2016 16:05:20 +0000 (UTC) (envelope-from imp@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 068EB1E67; Thu, 22 Sep 2016 16:05:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MG5J5Y079999; Thu, 22 Sep 2016 16:05:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MG5JLZ079998; Thu, 22 Sep 2016 16:05:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609221605.u8MG5JLZ079998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 22 Sep 2016 16:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306199 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 16:05:20 -0000 Author: imp Date: Thu Sep 22 16:05:19 2016 New Revision: 306199 URL: https://svnweb.freebsd.org/changeset/base/306199 Log: Revert svn:mergeinfo added inadvertantly in last commit r306197 Modified: Directory Properties: head/lib/libc/locale/ascii.c (props changed) From owner-svn-src-all@freebsd.org Thu Sep 22 16:11:02 2016 Return-Path: Delivered-To: svn-src-all@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 B78F3BE568B; Thu, 22 Sep 2016 16:11:02 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) (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 6E57269D; Thu, 22 Sep 2016 16:11:02 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sc1.bsdpad.com ([163.172.212.18]:17293) by ppsw-30.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bn6aR-000web-d6 (Exim 4.86_36-e07b163) (return-path ); Thu, 22 Sep 2016 17:10:59 +0100 Date: Thu, 22 Sep 2016 16:11:02 +0000 From: Ruslan Bukin To: Mariusz Zaborski Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys Message-ID: <20160922161102.GA71374@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> <20160922143412.GA69951@bsdpad.com> <20160922145625.GA70214@bsdpad.com> <20160922152153.GA70762@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160922152153.GA70762@bsdpad.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 16:11:02 -0000 I have just tested this with MIPS64EL and the result is the same. So you can try both EL or EB e.g. make -j16 TARGET=mips TARGET_ARCH=mips64el KERNCONF=MALTA64 buildkernel Ruslan On Thu, Sep 22, 2016 at 03:21:53PM +0000, Ruslan Bukin wrote: > Hi > > It reports nothing. Yes I use qemu: > /home/rb743/dev/qemu/qemu/build1/mips64-softmmu/qemu-system-mips64 -M malta -kernel ~/obj/mips.mips64/home/rb743/dev/freebsd-mips/sys/MALTA64/kernel -hda /home/rb743/world-mips64eb/mips64eb.img -nographic -smp 1 -cpu 5kf -net nic -net user -m 2048M -redir tcp:4022::22 > > Ruslan > > On Thu, Sep 22, 2016 at 05:11:07PM +0200, Mariusz Zaborski wrote: > > I tested it on the mips for Malta kernel and it's works fine. I will > > try to do it on mips64, are you using qemu to test it? > > What is ctrl + t reporting you? > > > > > > On 22 September 2016 at 16:56, Ruslan Bukin wrote: > > > May be. The next line should be > > > /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). > > > > > > but it hangs before this line > > > > > > Ruslan > > > > > > On Thu, Sep 22, 2016 at 04:39:16PM +0200, Mariusz Zaborski wrote: > > >> Hi Ruslan, > > >> > > >> Does it hang on some network script? > > >> > > >> Thanks, > > >> Mariusz > > >> > > >> > > >> On 22 September 2016 at 16:34, Ruslan Bukin wrote: > > >> > Hi Mariusz > > >> > > > >> > my MIPS64EB kernel stops booting with this > > >> > > > >> > somewhere here: > > >> > [...] > > >> > Starting file system checks: > > >> > /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946580 blocks, 0.0% fragmentation) > > >> > Mounting local filesystems:. > > >> > ELF ldconfig path: /lib /usr/lib /usr/lib/compat > > >> > random: unblocking device. > > >> > > > >> > any idea ? (should I rebuild something?) > > >> > > > >> > thanks! > > >> > > > >> > Ruslan > > >> > > > >> > On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: > > >> >> Author: oshogbo > > >> >> Date: Thu Sep 22 09:58:46 2016 > > >> >> New Revision: 306174 > > >> >> URL: https://svnweb.freebsd.org/changeset/base/306174 > > >> >> > > >> >> Log: > > >> >> capsicum: propagate rights on accept(2) > > >> >> > > >> >> Descriptor returned by accept(2) should inherits capabilities rights from > > >> >> the listening socket. > > >> >> > > >> >> PR: 201052 > > >> >> Reviewed by: emaste, jonathan > > >> >> Discussed with: many > > >> >> Differential Revision: https://reviews.freebsd.org/D7724 > > >> >> > > >> >> Modified: > > >> >> head/sys/compat/cloudabi/cloudabi_sock.c > > >> >> head/sys/compat/linux/linux_socket.c > > >> >> head/sys/kern/kern_sendfile.c > > >> >> head/sys/kern/uipc_syscalls.c > > >> >> head/sys/netinet/sctp_syscalls.c > > >> >> head/sys/sys/socketvar.h > > >> >> > > >> >> Modified: head/sys/compat/cloudabi/cloudabi_sock.c > > >> >> ============================================================================== > > >> >> --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) > > >> >> +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) > > >> >> @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread > > >> >> int error; > > >> >> > > >> >> error = getsock_cap(td, uap->sock, cap_rights_init(&rights, > > >> >> - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); > > >> >> + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> so = fp->f_data; > > >> >> > > >> >> Modified: head/sys/compat/linux/linux_socket.c > > >> >> ============================================================================== > > >> >> --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) > > >> >> +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) > > >> >> @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i > > >> >> if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) > > >> >> return (EINVAL); > > >> >> if (error == EINVAL) { > > >> >> - error1 = getsock_cap(td, s, &rights, &fp, NULL); > > >> >> + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); > > >> >> if (error1 != 0) > > >> >> return (error1); > > >> >> so = fp->f_data; > > >> >> > > >> >> Modified: head/sys/kern/kern_sendfile.c > > >> >> ============================================================================== > > >> >> --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) > > >> >> +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) > > >> >> @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int > > >> >> * The socket must be a stream socket and connected. > > >> >> */ > > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), > > >> >> - sock_fp, NULL); > > >> >> + sock_fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> *so = (*sock_fp)->f_data; > > >> >> > > >> >> Modified: head/sys/kern/uipc_syscalls.c > > >> >> ============================================================================== > > >> >> --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > > >> >> +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > > >> >> @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char > > >> >> /* > > >> >> * Convert a user file descriptor to a kernel file entry and check if required > > >> >> * capability rights are present. > > >> >> + * If required copy of current set of capability rights is returned. > > >> >> * A reference on the file entry is held upon returning. > > >> >> */ > > >> >> int > > >> >> getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > > >> >> - struct file **fpp, u_int *fflagp) > > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) > > >> >> { > > >> >> struct file *fp; > > >> >> int error; > > >> >> > > >> >> - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); > > >> >> + error = fget_cap(td, fd, rightsp, &fp, havecapsp); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> if (fp->f_type != DTYPE_SOCKET) { > > >> >> fdrop(fp, td); > > >> >> + if (havecapsp != NULL) > > >> >> + filecaps_free(havecapsp); > > >> >> return (ENOTSOCK); > > >> >> } > > >> >> if (fflagp != NULL) > > >> >> @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd > > >> >> AUDIT_ARG_FD(fd); > > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> so = fp->f_data; > > >> >> @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis > > >> >> > > >> >> AUDIT_ARG_FD(uap->s); > > >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error == 0) { > > >> >> so = fp->f_data; > > >> >> #ifdef MAC > > >> >> @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s > > >> >> struct file *headfp, *nfp = NULL; > > >> >> struct sockaddr *sa = NULL; > > >> >> struct socket *head, *so; > > >> >> + struct filecaps fcaps; > > >> >> cap_rights_t rights; > > >> >> u_int fflag; > > >> >> pid_t pgid; > > >> >> @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s > > >> >> > > >> >> AUDIT_ARG_FD(s); > > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), > > >> >> - &headfp, &fflag); > > >> >> + &headfp, &fflag, &fcaps); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> head = headfp->f_data; > > >> >> @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s > > >> >> if (error != 0) > > >> >> goto done; > > >> >> #endif > > >> >> - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); > > >> >> + error = falloc_caps(td, &nfp, &fd, > > >> >> + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); > > >> >> if (error != 0) > > >> >> goto done; > > >> >> ACCEPT_LOCK(); > > >> >> @@ -440,6 +445,8 @@ noconnection: > > >> >> * a reference on nfp to the caller on success if they request it. > > >> >> */ > > >> >> done: > > >> >> + if (nfp == NULL) > > >> >> + filecaps_free(&fcaps); > > >> >> if (fp != NULL) { > > >> >> if (error == 0) { > > >> >> *fp = nfp; > > >> >> @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di > > >> >> AUDIT_ARG_FD(fd); > > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> so = fp->f_data; > > >> >> @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st > > >> >> AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); > > >> >> cap_rights_set(&rights, CAP_CONNECT); > > >> >> } > > >> >> - error = getsock_cap(td, s, &rights, &fp, NULL); > > >> >> + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> so = (struct socket *)fp->f_data; > > >> >> @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st > > >> >> > > >> >> AUDIT_ARG_FD(s); > > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> so = fp->f_data; > > >> >> @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s > > >> >> > > >> >> AUDIT_ARG_FD(uap->s); > > >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error == 0) { > > >> >> so = fp->f_data; > > >> >> error = soshutdown(so, uap->how); > > >> >> @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s > > >> >> > > >> >> AUDIT_ARG_FD(s); > > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error == 0) { > > >> >> so = fp->f_data; > > >> >> error = sosetopt(so, &sopt); > > >> >> @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s > > >> >> > > >> >> AUDIT_ARG_FD(s); > > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error == 0) { > > >> >> so = fp->f_data; > > >> >> error = sogetopt(so, &sopt); > > >> >> @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int > > >> >> > > >> >> AUDIT_ARG_FD(fd); > > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> so = fp->f_data; > > >> >> @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int > > >> >> > > >> >> AUDIT_ARG_FD(fd); > > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> so = fp->f_data; > > >> >> > > >> >> Modified: head/sys/netinet/sctp_syscalls.c > > >> >> ============================================================================== > > >> >> --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > > >> >> +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > > >> >> @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) > > >> >> } > > >> >> > > >> >> AUDIT_ARG_FD(uap->sd); > > >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > > >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> goto sctp_bad; > > >> >> #ifdef KTRACE > > >> >> @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) > > >> >> } > > >> >> > > >> >> AUDIT_ARG_FD(uap->sd); > > >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > > >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> goto sctp_bad1; > > >> >> > > >> >> @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) > > >> >> > > >> >> AUDIT_ARG_FD(uap->sd); > > >> >> error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), > > >> >> - &fp, NULL); > > >> >> + &fp, NULL, NULL); > > >> >> if (error != 0) > > >> >> return (error); > > >> >> #ifdef COMPAT_FREEBSD32 > > >> >> > > >> >> Modified: head/sys/sys/socketvar.h > > >> >> ============================================================================== > > >> >> --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) > > >> >> +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) > > >> >> @@ -321,6 +321,7 @@ extern u_long sb_max; > > >> >> extern so_gen_t so_gencnt; > > >> >> > > >> >> struct file; > > >> >> +struct filecaps; > > >> >> struct filedesc; > > >> >> struct mbuf; > > >> >> struct sockaddr; > > >> >> @@ -340,7 +341,7 @@ struct uio; > > >> >> */ > > >> >> int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); > > >> >> int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > > >> >> - struct file **fpp, u_int *fflagp); > > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); > > >> >> void soabort(struct socket *so); > > >> >> int soaccept(struct socket *so, struct sockaddr **nam); > > >> >> void soaio_enqueue(struct task *task); > > >> >> > > > From owner-svn-src-all@freebsd.org Thu Sep 22 16:47:01 2016 Return-Path: Delivered-To: svn-src-all@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 1847FBE62DF; Thu, 22 Sep 2016 16:47:01 +0000 (UTC) (envelope-from ache@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 C4FD0D85; Thu, 22 Sep 2016 16:47:00 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MGl0qT095776; Thu, 22 Sep 2016 16:47:00 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MGl0bN095772; Thu, 22 Sep 2016 16:47:00 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609221647.u8MGl0bN095772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Thu, 22 Sep 2016 16:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306200 - stable/10/bin/cat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 16:47:01 -0000 Author: ache Date: Thu Sep 22 16:46:59 2016 New Revision: 306200 URL: https://svnweb.freebsd.org/changeset/base/306200 Log: MFC r305841 Implement multibyte encoding support for -v with fallback Modified: stable/10/bin/cat/cat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cat/cat.c ============================================================================== --- stable/10/bin/cat/cat.c Thu Sep 22 16:05:19 2016 (r306199) +++ stable/10/bin/cat/cat.c Thu Sep 22 16:46:59 2016 (r306200) @@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include static int bflag, eflag, lflag, nflag, sflag, tflag, vflag; static int rval; @@ -205,6 +207,7 @@ static void cook_cat(FILE *fp) { int ch, gobble, line, prev; + wint_t wch; /* Reset EOF condition on stdin. */ if (fp == stdin && feof(stdin)) @@ -237,18 +240,40 @@ cook_cat(FILE *fp) continue; } } else if (vflag) { - if (!isascii(ch) && !isprint(ch)) { + (void)ungetc(ch, fp); + /* + * Our getwc(3) doesn't change file position + * on error. + */ + if ((wch = getwc(fp)) == WEOF) { + if (ferror(fp) && errno == EILSEQ) { + clearerr(fp); + /* Resync attempt. */ + memset(&fp->_mbstate, 0, sizeof(mbstate_t)); + if ((ch = getc(fp)) == EOF) + break; + wch = ch; + goto ilseq; + } else + break; + } + if (!iswascii(wch) && !iswprint(wch)) { +ilseq: if (putchar('M') == EOF || putchar('-') == EOF) break; - ch = toascii(ch); + wch = toascii(wch); } - if (iscntrl(ch)) { - if (putchar('^') == EOF || - putchar(ch == '\177' ? '?' : - ch | 0100) == EOF) + if (iswcntrl(wch)) { + ch = toascii(wch); + ch = (ch == '\177') ? '?' : (ch | 0100); + if (putchar('^') == EOF || putchar(ch) == EOF) break; continue; } + if (putwchar(wch) == WEOF) + break; + ch = -1; + continue; } if (putchar(ch) == EOF) break; From owner-svn-src-all@freebsd.org Thu Sep 22 16:49:54 2016 Return-Path: Delivered-To: svn-src-all@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 8AFFABE6558; Thu, 22 Sep 2016 16:49:54 +0000 (UTC) (envelope-from ache@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 41A69F70; Thu, 22 Sep 2016 16:49:54 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MGnrV4095920; Thu, 22 Sep 2016 16:49:53 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MGnrh9095919; Thu, 22 Sep 2016 16:49:53 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609221649.u8MGnrh9095919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Thu, 22 Sep 2016 16:49:53 +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: r306201 - stable/11/bin/cat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 16:49:54 -0000 Author: ache Date: Thu Sep 22 16:49:53 2016 New Revision: 306201 URL: https://svnweb.freebsd.org/changeset/base/306201 Log: MFC r305841 Implement multibyte encoding support for -v with fallback Modified: stable/11/bin/cat/cat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.c ============================================================================== --- stable/11/bin/cat/cat.c Thu Sep 22 16:46:59 2016 (r306200) +++ stable/11/bin/cat/cat.c Thu Sep 22 16:49:53 2016 (r306201) @@ -64,6 +64,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include static int bflag, eflag, lflag, nflag, sflag, tflag, vflag; static int rval; @@ -207,6 +209,7 @@ static void cook_cat(FILE *fp) { int ch, gobble, line, prev; + wint_t wch; /* Reset EOF condition on stdin. */ if (fp == stdin && feof(stdin)) @@ -239,18 +242,40 @@ cook_cat(FILE *fp) continue; } } else if (vflag) { - if (!isascii(ch) && !isprint(ch)) { + (void)ungetc(ch, fp); + /* + * Our getwc(3) doesn't change file position + * on error. + */ + if ((wch = getwc(fp)) == WEOF) { + if (ferror(fp) && errno == EILSEQ) { + clearerr(fp); + /* Resync attempt. */ + memset(&fp->_mbstate, 0, sizeof(mbstate_t)); + if ((ch = getc(fp)) == EOF) + break; + wch = ch; + goto ilseq; + } else + break; + } + if (!iswascii(wch) && !iswprint(wch)) { +ilseq: if (putchar('M') == EOF || putchar('-') == EOF) break; - ch = toascii(ch); + wch = toascii(wch); } - if (iscntrl(ch)) { - if (putchar('^') == EOF || - putchar(ch == '\177' ? '?' : - ch | 0100) == EOF) + if (iswcntrl(wch)) { + ch = toascii(wch); + ch = (ch == '\177') ? '?' : (ch | 0100); + if (putchar('^') == EOF || putchar(ch) == EOF) break; continue; } + if (putwchar(wch) == WEOF) + break; + ch = -1; + continue; } if (putchar(ch) == EOF) break; From owner-svn-src-all@freebsd.org Thu Sep 22 17:58:39 2016 Return-Path: Delivered-To: svn-src-all@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 D7734BE5A3B for ; Thu, 22 Sep 2016 17:58:39 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (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 6DD6BFBA for ; Thu, 22 Sep 2016 17:58:39 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x235.google.com with SMTP id l132so342146125wmf.0 for ; Thu, 22 Sep 2016 10:58:39 -0700 (PDT) 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=akkFvU7huBkXZZ/TcjtV0tAVp1BtIVvQvI5wjw8NhTs=; b=gZho2qlCC38/to5aVUm4EYoEISdSRUe9l/B4X34eNV4sXHx7J543VW2657hkTvMcwJ LrBF3eH6zWBBZ+2UUlNdUaqKuH7u37dj5LsFMsP7A90jJz5RyTZdL3d1HdMyDzMHBpNy GlVqPD/Z+CXUFGpKyKbXJRGJNIll7M3m4pMJ1QXwyZHEp/lUcZZ7PTfQA5I3ATZFpwK1 /igrIp2WA7FNOOv0UZFjlOk7FqeBgTcGYsWHx57MMUnoPpKOZgheUujeAVsy/osqQTaK HktRpSIfHJBrcIakIGBfHQe1xvESzXLLZvdtaeYuxf4JfGrR5osext7523rR2kCznt7u UmIg== 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=akkFvU7huBkXZZ/TcjtV0tAVp1BtIVvQvI5wjw8NhTs=; b=cbn7EFOrhjjU4gwS/ye9cgiGgoEPSLmIfYLHfJGSU3ohReY1RgFRk3Y8MNBut2BZh3 5gZE8px3kxrnInrhHvdjuoQsks6q9fThCkWHwyYwZKy0NvPN4gv3fQ6xkmud5RSzPBQ+ h6UG+n1Y2CIJvpVlqp5USDdK9EQlvcQXAYtx8aHx0zo6PtZw4zVSA2hXJILoNp8PGZkR SGoVAlLT0NqzdADiA/HQB50F1Vu+5yLp3PTKCMjwF7VqLIdv1E5W/fH+qTVqirGhEb5K dkyMUe4NxfO2PmsVIT2vsFi0kWp940NWCu3DJ2FCHPJgaMl+4HwCDP+5pzywwhCznrR7 Y1mw== X-Gm-Message-State: AE9vXwNz1jUL5WqrDw78j5I2jI5RYGbKAZbgb9XN6IYwBv65KUFruOqKMVtYhcEvUqfWC+Pqq3dRQMovRxpIcWzM X-Received: by 10.194.103.3 with SMTP id fs3mr3105694wjb.115.1474567117528; Thu, 22 Sep 2016 10:58:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.139.208 with HTTP; Thu, 22 Sep 2016 10:58:37 -0700 (PDT) In-Reply-To: <201608041755.u74HtNc6040224@repo.freebsd.org> References: <201608041755.u74HtNc6040224@repo.freebsd.org> From: Oliver Pinter Date: Thu, 22 Sep 2016 19:58:37 +0200 Message-ID: Subject: Re: svn commit: r303753 - head/sys/amd64/amd64 To: John Baldwin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 17:58:39 -0000 Hi! Do you plan to MFC this change to 10-STABLE? On Thu, Aug 4, 2016 at 7:55 PM, John Baldwin wrote: > Author: jhb > Date: Thu Aug 4 17:55:23 2016 > New Revision: 303753 > URL: https://svnweb.freebsd.org/changeset/base/303753 > > Log: > Don't permit mappings of invalid physical addresses on amd64 via /dev/mem. > > Discussed with: kib > > Modified: > head/sys/amd64/amd64/mem.c > > Modified: head/sys/amd64/amd64/mem.c > ============================================================================== > --- head/sys/amd64/amd64/mem.c Thu Aug 4 17:46:07 2016 (r303752) > +++ head/sys/amd64/amd64/mem.c Thu Aug 4 17:55:23 2016 (r303753) > @@ -168,9 +168,11 @@ int > memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, > int prot __unused, vm_memattr_t *memattr __unused) > { > - if (dev2unit(dev) == CDEV_MINOR_MEM) > + if (dev2unit(dev) == CDEV_MINOR_MEM) { > + if (offset >= (1ULL << cpu_maxphyaddr)) > + return (-1); > *paddr = offset; > - else if (dev2unit(dev) == CDEV_MINOR_KMEM) > + } else if (dev2unit(dev) == CDEV_MINOR_KMEM) > *paddr = vtophys(offset); > /* else panic! */ > return (0); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Thu Sep 22 18:13:00 2016 Return-Path: Delivered-To: svn-src-all@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 A1116BE6725; Thu, 22 Sep 2016 18:13:00 +0000 (UTC) (envelope-from gjb@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 712FAF8F; Thu, 22 Sep 2016 18:13:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MICxxI029571; Thu, 22 Sep 2016 18:12:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MICxXW029570; Thu, 22 Sep 2016 18:12:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609221812.u8MICxXW029570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Sep 2016 18:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306202 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 18:13:00 -0000 Author: gjb Date: Thu Sep 22 18:12:59 2016 New Revision: 306202 URL: https://svnweb.freebsd.org/changeset/base/306202 Log: Document r306198, OpenSSL 1.0.2i. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 22 16:49:53 2016 (r306201) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 22 18:12:59 2016 (r306202) @@ -619,9 +619,6 @@ The &man.svnlite.1; utility has been updated to version 1.9.4. - OpenSSL has - been updated to version 1.0.2h. - ACPICA has been updated to version 20160527. @@ -661,6 +658,9 @@ Support for DSA is disabled by default in OpenSSH. + + OpenSSL has + been updated to version 1.0.2i. From owner-svn-src-all@freebsd.org Thu Sep 22 18:19:13 2016 Return-Path: Delivered-To: svn-src-all@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 60C35BE6B8B; Thu, 22 Sep 2016 18:19:13 +0000 (UTC) (envelope-from gjb@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 302FE31C; Thu, 22 Sep 2016 18:19:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MIJCLJ029807; Thu, 22 Sep 2016 18:19:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MIJC0q029806; Thu, 22 Sep 2016 18:19:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609221819.u8MIJC0q029806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Sep 2016 18:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306203 - releng/11.0/release/doc/share/xml X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 18:19:13 -0000 Author: gjb Date: Thu Sep 22 18:19:12 2016 New Revision: 306203 URL: https://svnweb.freebsd.org/changeset/base/306203 Log: Change the entity for arm64 from 'aarch64' to 'arm64'. Submitted by: emaste Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/share/xml/release.ent Modified: releng/11.0/release/doc/share/xml/release.ent ============================================================================== --- releng/11.0/release/doc/share/xml/release.ent Thu Sep 22 18:12:59 2016 (r306202) +++ releng/11.0/release/doc/share/xml/release.ent Thu Sep 22 18:19:12 2016 (r306203) @@ -70,7 +70,7 @@ - + From owner-svn-src-all@freebsd.org Thu Sep 22 18:31:51 2016 Return-Path: Delivered-To: svn-src-all@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 34545BE6F7E; Thu, 22 Sep 2016 18:31:51 +0000 (UTC) (envelope-from gjb@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 071D5D5F; Thu, 22 Sep 2016 18:31:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MIVoxi033792; Thu, 22 Sep 2016 18:31:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MIVojC033791; Thu, 22 Sep 2016 18:31:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609221831.u8MIVojC033791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Sep 2016 18:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306204 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 18:31:51 -0000 Author: gjb Date: Thu Sep 22 18:31:50 2016 New Revision: 306204 URL: https://svnweb.freebsd.org/changeset/base/306204 Log: Add a link to the 'installation.html' section for freebsd-update(8) usage information. Suggested by: theraven Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 22 18:19:12 2016 (r306203) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 22 18:31:50 2016 (r306204) @@ -9,6 +9,7 @@ %vendor; + ]>
@@ -144,6 +145,11 @@ supported, using the instructions in /usr/src/UPDATING. + For information on upgrading via &man.freebsd-update.8;, + please see the binary + upgrading section in the Installation page. + Upgrading &os; should only be attempted after backing up all data and configuration files. From owner-svn-src-all@freebsd.org Thu Sep 22 18:35:52 2016 Return-Path: Delivered-To: svn-src-all@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 C9DCFBE5168 for ; Thu, 22 Sep 2016 18:35:52 +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 556418D for ; Thu, 22 Sep 2016 18:35:52 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x233.google.com with SMTP id b130so163866388wmc.0 for ; Thu, 22 Sep 2016 11:35:52 -0700 (PDT) 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=v117lXugRsKfJHXgbpX6yFwgqkd74Z4/pogGYqfZuiI=; b=114SYW0ERR1CN2tE0WTlFhDmKKH9A/4AmB2CyOWP+M69H2hv1KMK3jZH42QkaWltbM xk3PhccORJzgxBTnOdp/I/dl56iRE73rsHGorCj4zoYaN4gA7B1LUm9Eifo0UVbSqL+0 0wqHVZvgko3MTD3QGZkv7cKyXJV9426iB6q1FuHYfzntiCovRjm//I06QYkyrxZTlVAd cuEvoPBigs5cvyNhEk+j67EnM1wRDmie/B/GzKnCBxf5/Hd2+vbOgSPPdJ/oWOy4VZFf IdWZqAVx0finKeD6lsOaZZYa5hWrtFrl95HJN7bxHfA0K+xwN9kO0BcGat17qjQx2VCE 0a9g== 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=v117lXugRsKfJHXgbpX6yFwgqkd74Z4/pogGYqfZuiI=; b=VSGy69wVe5vVAqhKGLuiCxUrLW64AtCz4rAW1odUZ5ysH0HpXgAdnWbkjyR5PS8/0h aqUC3lwt0YihtG4InYdSxFBU3/Aly90J36HHCsnDg+WY6RyLxetOInsOxki05t+7y4cS 3USZW0GZUKZXjCnPnr2RSA5ZtfWvNQef9vhk1Ez6sbJ2i2kpv5C5GAnnjg2OdDSdpyNt UdE2vC1iFQyQi41llpEDUjBDjRI/QlNadfJMfPGkKrv5/QqV3PLTCPZkYyshvbXC9Whn 6tRq9p3yUzbjyitVgIFbAjdKqvBXNVtqc+CaM5dkiceE6VKkrPNwJgu6z7SXqeR5rDuo vENA== X-Gm-Message-State: AE9vXwP+lLUdaTK4U4UvEV3tmTAT/MSY4l+GSjSTN+Pwo30bOrux3K/HQJFtmvwQh3JMTb2zuquHynuM4xUyy5Hs X-Received: by 10.194.103.3 with SMTP id fs3mr3232423wjb.115.1474569350529; Thu, 22 Sep 2016 11:35:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.139.208 with HTTP; Thu, 22 Sep 2016 11:35:50 -0700 (PDT) In-Reply-To: <201607302221.u6UMLn4E035551@repo.freebsd.org> References: <201607302221.u6UMLn4E035551@repo.freebsd.org> From: Oliver Pinter Date: Thu, 22 Sep 2016 20:35:50 +0200 Message-ID: Subject: Re: svn commit: r303562 - head/sys/kern To: Mateusz Guzik Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 18:35:52 -0000 Hi! On Sun, Jul 31, 2016 at 12:21 AM, Mateusz Guzik wrote: > Author: mjg > Date: Sat Jul 30 22:21:48 2016 > New Revision: 303562 > URL: https://svnweb.freebsd.org/changeset/base/303562 > > Log: > rwlock: s/READER/WRITER/ in wlock lockstat annotation > > Modified: > head/sys/kern/kern_rwlock.c > > Modified: head/sys/kern/kern_rwlock.c Do you plan to MFC this to 10-STABLE? Seems like, it's "affected" too. > ============================================================================== > --- head/sys/kern/kern_rwlock.c Sat Jul 30 21:06:59 2016 (r303561) > +++ head/sys/kern/kern_rwlock.c Sat Jul 30 22:21:48 2016 (r303562) > @@ -920,7 +920,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u > /* Record only the loops spinning and not sleeping. */ > if (spin_cnt > sleep_cnt) > LOCKSTAT_RECORD4(rw__spin, rw, all_time - sleep_time, > - LOCKSTAT_READER, (state & RW_LOCK_READ) == 0, > + LOCKSTAT_WRITER, (state & RW_LOCK_READ) == 0, > (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); > #endif > LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, contested, > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Thu Sep 22 18:45:27 2016 Return-Path: Delivered-To: svn-src-all@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 06D68BE53DC; Thu, 22 Sep 2016 18:45:27 +0000 (UTC) (envelope-from loos@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 CCF6B7EE; Thu, 22 Sep 2016 18:45:26 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MIjQcs041218; Thu, 22 Sep 2016 18:45:26 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MIjPq6041216; Thu, 22 Sep 2016 18:45:25 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609221845.u8MIjPq6041216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 22 Sep 2016 18:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306205 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 18:45:27 -0000 Author: loos Date: Thu Sep 22 18:45:25 2016 New Revision: 306205 URL: https://svnweb.freebsd.org/changeset/base/306205 Log: Add the ID for the Huawei ME909S LTE modem. Submitted by: svenauhagen at github MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Thu Sep 22 18:31:50 2016 (r306204) +++ head/sys/dev/usb/serial/u3g.c Thu Sep 22 18:45:25 2016 (r306205) @@ -312,6 +312,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E392, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, ME909U, U3GINIT_HUAWEISCSI2), + U3G_DEV(HUAWEI, ME909S, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Sep 22 18:31:50 2016 (r306204) +++ head/sys/dev/usb/usbdevs Thu Sep 22 18:45:25 2016 (r306205) @@ -2431,6 +2431,7 @@ product HUAWEI E3272_INIT 0x155b LTE mod product HUAWEI ME909U 0x1573 LTE modem product HUAWEI R215_INIT 0x1582 LTE modem initial product HUAWEI R215 0x1588 LTE modem +product HUAWEI ME909S 0x15c1 LTE modem product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E173 0x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial From owner-svn-src-all@freebsd.org Thu Sep 22 18:47:08 2016 Return-Path: Delivered-To: svn-src-all@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 7155ABE5455; Thu, 22 Sep 2016 18:47:08 +0000 (UTC) (envelope-from np@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 41BC19A4; Thu, 22 Sep 2016 18:47:08 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MIl7LM041316; Thu, 22 Sep 2016 18:47:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MIl7Tb041315; Thu, 22 Sep 2016 18:47:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609221847.u8MIl7Tb041315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 22 Sep 2016 18:47:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306206 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 18:47:08 -0000 Author: np Date: Thu Sep 22 18:47:07 2016 New Revision: 306206 URL: https://svnweb.freebsd.org/changeset/base/306206 Log: cxgbe(4): Catch up with the different layout of WHOAMI in T6. Note that the code moved below t4_prep_adapter() as part of this change because now it needs a working chip_id(). Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Sep 22 18:45:25 2016 (r306205) +++ head/sys/dev/cxgbe/t4_main.c Thu Sep 22 18:47:07 2016 (r306206) @@ -812,15 +812,6 @@ t4_attach(device_t dev) if (rc != 0) goto done; /* error message displayed already */ - /* - * This is the real PF# to which we're attaching. Works from within PCI - * passthrough environments too, where pci_get_function() could return a - * different PF# depending on the passthrough configuration. We need to - * use the real PF# in all our communication with the firmware. - */ - sc->pf = G_SOURCEPF(t4_read_reg(sc, A_PL_WHOAMI)); - sc->mbox = sc->pf; - memset(sc->chan_map, 0xff, sizeof(sc->chan_map)); /* Prepare the adapter for operation. */ @@ -832,6 +823,16 @@ t4_attach(device_t dev) goto done; } + /* + * This is the real PF# to which we're attaching. Works from within PCI + * passthrough environments too, where pci_get_function() could return a + * different PF# depending on the passthrough configuration. We need to + * use the real PF# in all our communication with the firmware. + */ + j = t4_read_reg(sc, A_PL_WHOAMI); + sc->pf = chip_id(sc) <= CHELSIO_T5 ? G_SOURCEPF(j) : G_T6_SOURCEPF(j); + sc->mbox = sc->pf; + t4_init_devnames(sc); if (sc->names == NULL) { rc = ENOTSUP; From owner-svn-src-all@freebsd.org Thu Sep 22 18:51:38 2016 Return-Path: Delivered-To: svn-src-all@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 A79B5BE5814; Thu, 22 Sep 2016 18:51:38 +0000 (UTC) (envelope-from gjb@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 58DF4D61; Thu, 22 Sep 2016 18:51:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MIpbjw041518; Thu, 22 Sep 2016 18:51:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MIpbXw041517; Thu, 22 Sep 2016 18:51:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609221851.u8MIpbXw041517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Sep 2016 18:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306207 - releng/11.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 18:51:38 -0000 Author: gjb Date: Thu Sep 22 18:51:37 2016 New Revision: 306207 URL: https://svnweb.freebsd.org/changeset/base/306207 Log: Remove dual-revision entries, and prefer the latter, unbreaking URLs to svnweb. Submitted by: jkim Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 22 18:47:07 2016 (r306206) +++ releng/11.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 22 18:51:37 2016 (r306207) @@ -799,11 +799,10 @@ features %U and %W. - The &man.dl.iterate.phdr.3; library has been - changed to always return the path name of the - ELF object in the - dlpi_name structure member. + The + &man.dl.iterate.phdr.3; library has been changed to always + return the path name of the ELF object in + the dlpi_name structure member. The &man.libxo.3; library has been @@ -1124,10 +1123,10 @@ and kern.osreldate are now configurable &man.jail.8; parameters. - The &man.devfs.5; device filesystem has - been changed to update timestamps for read/write operations - using seconds precision. A new &man.sysctl.8;, + The &man.devfs.5; device filesystem has been changed to + update timestamps for read/write operations using seconds + precision. A new &man.sysctl.8;, vfs.devfs.dotimes has been added, which when set to a non-zero value, enables default precision timestamps for these operations. @@ -1411,7 +1410,7 @@ certain PowerPC hardware, such as aluminum PowerBook ®. - The &man.hwpmc.4; driver has been + The &man.hwpmc.4; driver has been updated to correct performance counter sampling on PowerPC G4 (MPC74xxx) and G5 class processors. From owner-svn-src-all@freebsd.org Thu Sep 22 19:04:09 2016 Return-Path: Delivered-To: svn-src-all@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 B5694BE5AB5; Thu, 22 Sep 2016 19:04:09 +0000 (UTC) (envelope-from gjb@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 87D1976D; Thu, 22 Sep 2016 19:04:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MJ48oq048605; Thu, 22 Sep 2016 19:04:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MJ48kL048604; Thu, 22 Sep 2016 19:04:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609221904.u8MJ48kL048604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Sep 2016 19:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306208 - releng/11.0/lib/csu/common X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 19:04:09 -0000 Author: gjb Date: Thu Sep 22 19:04:08 2016 New Revision: 306208 URL: https://svnweb.freebsd.org/changeset/base/306208 Log: Statically set __FreeBSD_version for 11.0-RELEASE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/lib/csu/common/crtbrand.c Modified: releng/11.0/lib/csu/common/crtbrand.c ============================================================================== --- releng/11.0/lib/csu/common/crtbrand.c Thu Sep 22 18:51:37 2016 (r306207) +++ releng/11.0/lib/csu/common/crtbrand.c Thu Sep 22 19:04:08 2016 (r306208) @@ -62,5 +62,5 @@ static const struct { .descsz = sizeof(int32_t), .type = ABI_NOTETYPE, .name = NOTE_FREEBSD_VENDOR, - .desc = __FreeBSD_version + .desc = 1100122 }; From owner-svn-src-all@freebsd.org Thu Sep 22 19:04:52 2016 Return-Path: Delivered-To: svn-src-all@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 4C2ECBE5B0A; Thu, 22 Sep 2016 19:04:52 +0000 (UTC) (envelope-from imp@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 1C8968E2; Thu, 22 Sep 2016 19:04:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MJ4psa048674; Thu, 22 Sep 2016 19:04:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MJ4pXv048672; Thu, 22 Sep 2016 19:04:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609221904.u8MJ4pXv048672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 22 Sep 2016 19:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306209 - in head/sys/amd64: amd64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 19:04:52 -0000 Author: imp Date: Thu Sep 22 19:04:51 2016 New Revision: 306209 URL: https://svnweb.freebsd.org/changeset/base/306209 Log: Change the efi_get_table interface to a void ** so we can return the pointer by dereferencing the pointer. Reviewed by: kib@ MFC After: 2 weeks Sponsored by: Netflix, Inc Modified: head/sys/amd64/amd64/efirt.c head/sys/amd64/include/efi.h Modified: head/sys/amd64/amd64/efirt.c ============================================================================== --- head/sys/amd64/amd64/efirt.c Thu Sep 22 19:04:08 2016 (r306208) +++ head/sys/amd64/amd64/efirt.c Thu Sep 22 19:04:51 2016 (r306209) @@ -405,7 +405,7 @@ efi_uninit(void) } int -efi_get_table(struct uuid *uuid, void *ptr) +efi_get_table(struct uuid *uuid, void **ptr) { struct efi_cfgtbl *ct; u_long count; @@ -416,7 +416,7 @@ efi_get_table(struct uuid *uuid, void *p ct = efi_cfgtbl; while (count--) { if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { - ptr = (void *)PHYS_TO_DMAP(ct->ct_data); + *ptr = (void *)PHYS_TO_DMAP(ct->ct_data); return (0); } ct++; Modified: head/sys/amd64/include/efi.h ============================================================================== --- head/sys/amd64/include/efi.h Thu Sep 22 19:04:08 2016 (r306208) +++ head/sys/amd64/include/efi.h Thu Sep 22 19:04:51 2016 (r306209) @@ -43,7 +43,7 @@ struct uuid; struct efi_tm; -int efi_get_table(struct uuid *uuid, void *ptr); +int efi_get_table(struct uuid *uuid, void **ptr); int efi_get_time(struct efi_tm *tm); int efi_get_time_locked(struct efi_tm *tm); int efi_reset_system(void); From owner-svn-src-all@freebsd.org Thu Sep 22 19:05:42 2016 Return-Path: Delivered-To: svn-src-all@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 914EDBE5B74; Thu, 22 Sep 2016 19:05:42 +0000 (UTC) (envelope-from gjb@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 61C9CA6A; Thu, 22 Sep 2016 19:05:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MJ5fXt048750; Thu, 22 Sep 2016 19:05:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MJ5fVc048749; Thu, 22 Sep 2016 19:05:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609221905.u8MJ5fVc048749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Sep 2016 19:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306210 - releng/11.0 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 19:05:42 -0000 Author: gjb Date: Thu Sep 22 19:05:41 2016 New Revision: 306210 URL: https://svnweb.freebsd.org/changeset/base/306210 Log: Anticipate when we will be ready to announce 11.0-RELEASE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/UPDATING Modified: releng/11.0/UPDATING ============================================================================== --- releng/11.0/UPDATING Thu Sep 22 19:04:51 2016 (r306209) +++ releng/11.0/UPDATING Thu Sep 22 19:05:41 2016 (r306210) @@ -16,6 +16,9 @@ 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. +20160928: + 11.0-RELEASE. + 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) From owner-svn-src-all@freebsd.org Thu Sep 22 19:16:09 2016 Return-Path: Delivered-To: svn-src-all@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 42587BE5185; Thu, 22 Sep 2016 19:16:09 +0000 (UTC) (envelope-from gjb@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 1588EFE; Thu, 22 Sep 2016 19:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MJG8BX052434; Thu, 22 Sep 2016 19:16:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MJG80E052433; Thu, 22 Sep 2016 19:16:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609221916.u8MJG80E052433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Sep 2016 19:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306211 - releng/11.0/sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 19:16:09 -0000 Author: gjb Date: Thu Sep 22 19:16:08 2016 New Revision: 306211 URL: https://svnweb.freebsd.org/changeset/base/306211 Log: Prepare for 11.0-RELEASE builds. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/sys/conf/newvers.sh Modified: releng/11.0/sys/conf/newvers.sh ============================================================================== --- releng/11.0/sys/conf/newvers.sh Thu Sep 22 19:05:41 2016 (r306210) +++ releng/11.0/sys/conf/newvers.sh Thu Sep 22 19:16:08 2016 (r306211) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="RC3" +BRANCH="RELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Thu Sep 22 19:27:19 2016 Return-Path: Delivered-To: svn-src-all@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 45902BE58BE; Thu, 22 Sep 2016 19:27:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 DC922AA3; Thu, 22 Sep 2016 19:27:18 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id l132so165895279wmf.1; Thu, 22 Sep 2016 12:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=c71SA/kXVUeIm40+yJkpYr7f3M4TP/RuxuJxl3CGcwo=; b=uzWH+wbJ2vSldqQG6pAlEAA2B8RcdI/EvURbWjn9frdguVuEgKsq6zFyrUZsWJ72J7 wJMZM388fld1Pxu43LYiYzXorTOKL2ptMcb62aXiFiXrbuQ8tNSbNo8PTyaNWiSJKvyL p0TWqkwzt7Rwzx3h/rD7ksnURXov+jaP9vLip3663rUaqcrcuGKIQI34qdupytrWePG7 hs7pPxi+SBV9n8qrbCnLu0GkYMC9SoVf7zoKuYSt/YhAXNIwgEYEIhujn1aMNM96vb/I JomA5HO9ObPK2qsVR8u9JzuXvGhE9zyuoUpZfY+yBVhHBY7F25tPQ+Hg62MTq3eR1Hpj FFYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=c71SA/kXVUeIm40+yJkpYr7f3M4TP/RuxuJxl3CGcwo=; b=JG6WmGXv2Z5DKp/EiUyaGOAvIaJYXh1l6iPNd6TdcVjBQFh5JrOaN2ptxidNaLLy9I C3vETHeaPzbIfVwT2A+ywzW13euIGKckNeBVWV+qBotRQujLeJKklOMZJkWSXeaWyB9f 1PB4oVQVxCmzZrvxWxkgjm/1unmWP9gGluzB2SDQEv0cuBu3EWi5wGQzZA+HjZMAE720 yaIK/NwAT4jlkDBhStEjtJQE/QMdbvXgCjvgib6+ghO5xA5GaDJcAvtJrxhfL3rKkh3p pdRiDQbYUoA5/M4PBdLxpEhFKet+YZQFfFqG1PyC0CvVXYDEeAANzNQUsMNHd/oYRWHx KTZQ== X-Gm-Message-State: AE9vXwNI7uUEWAiwwu3M33uJwbkjuvzgaOqQ++ugksFXNZwOeFASGI1i4o8fkj+lOUHKBQ== X-Received: by 10.28.57.69 with SMTP id g66mr9293240wma.49.1474572436370; Thu, 22 Sep 2016 12:27:16 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id jn7sm3556112wjb.5.2016.09.22.12.27.15 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 22 Sep 2016 12:27:15 -0700 (PDT) Date: Thu, 22 Sep 2016 21:27:13 +0200 From: Mateusz Guzik To: Oliver Pinter Cc: Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r303562 - head/sys/kern Message-ID: <20160922192713.GD9643@dft-labs.eu> References: <201607302221.u6UMLn4E035551@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 19:27:19 -0000 On Thu, Sep 22, 2016 at 08:35:50PM +0200, Oliver Pinter wrote: > Hi! > > On Sun, Jul 31, 2016 at 12:21 AM, Mateusz Guzik wrote: > > Author: mjg > > Date: Sat Jul 30 22:21:48 2016 > > New Revision: 303562 > > URL: https://svnweb.freebsd.org/changeset/base/303562 > > > > Log: > > rwlock: s/READER/WRITER/ in wlock lockstat annotation > > > > Modified: > > head/sys/kern/kern_rwlock.c > > > > Modified: head/sys/kern/kern_rwlock.c > > Do you plan to MFC this to 10-STABLE? Seems like, it's "affected" too. I have no intentions in merging this in isolation. It is largely cosmetic anyway. However, I have various changes (including pending ones) which I may end up merging if that happens, this will also get in. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Thu Sep 22 20:34:46 2016 Return-Path: Delivered-To: svn-src-all@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 0B0BDBE5B0B; Thu, 22 Sep 2016 20:34:46 +0000 (UTC) (envelope-from glebius@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 CCA5994D; Thu, 22 Sep 2016 20:34:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MKYiKQ082655; Thu, 22 Sep 2016 20:34:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MKYiSM082654; Thu, 22 Sep 2016 20:34:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201609222034.u8MKYiSM082654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 22 Sep 2016 20:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306212 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 20:34:46 -0000 Author: glebius Date: Thu Sep 22 20:34:44 2016 New Revision: 306212 URL: https://svnweb.freebsd.org/changeset/base/306212 Log: Fix regression from r297400, which truncates headers in case of low socket buffer and put a small optimization for low socket buffer case: - Do not hack uio_resid, and let m_uiotombuf() properly take care of it. This fixes truncation of headers at low buffer. - If headers ate all the space, jump right to the end of the cycle, to avoid doing single page I/O and allocating zero length mbuf. - Clear hdr_uio only if space is positive, which indicates that all uio was copied in. Reviewed by: pluknet, jtl, emax, rrs, lstewart, emax, gallatin, scottl Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Thu Sep 22 19:16:08 2016 (r306211) +++ head/sys/kern/kern_sendfile.c Thu Sep 22 20:34:44 2016 (r306212) @@ -656,10 +656,18 @@ retry_space: if (hdr_uio != NULL && hdr_uio->uio_resid > 0) { hdr_uio->uio_td = td; hdr_uio->uio_rw = UIO_WRITE; - hdr_uio->uio_resid = min(hdr_uio->uio_resid, space); - mh = m_uiotombuf(hdr_uio, M_WAITOK, 0, 0, 0); + mh = m_uiotombuf(hdr_uio, M_WAITOK, space, 0, 0); hdrlen = m_length(mh, &mhtail); space -= hdrlen; + /* + * If header consumed all the socket buffer space, + * don't waste CPU cycles and jump to the end. + */ + if (space == 0) { + sfio = NULL; + nios = 0; + goto prepend_header; + } hdr_uio = NULL; } @@ -806,6 +814,7 @@ retry_space: /* Prepend header, if any. */ if (hdrlen) { +prepend_header: mhtail->m_next = m; m = mh; mh = NULL; From owner-svn-src-all@freebsd.org Thu Sep 22 21:05:22 2016 Return-Path: Delivered-To: svn-src-all@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 C4654BE471F; Thu, 22 Sep 2016 21:05:22 +0000 (UTC) (envelope-from emaste@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 86D961D14; Thu, 22 Sep 2016 21:05:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ML5LBg093826; Thu, 22 Sep 2016 21:05:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ML5LLe093825; Thu, 22 Sep 2016 21:05:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609222105.u8ML5LLe093825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Sep 2016 21:05: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: r306213 - stable/11/usr.bin/bsdiff/bspatch X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 21:05:22 -0000 Author: emaste Date: Thu Sep 22 21:05:21 2016 New Revision: 306213 URL: https://svnweb.freebsd.org/changeset/base/306213 Log: MFC bspatch Capsicumization, sanity checks, and other improvements r304691: bspatch: apply style(9) Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. r304807 (allanjude): Capsicumize bspatch Move all of the fopen() and open() calls to the top of main() Restrict each FD to least privilege (read/seek only, write only, etc) cap_enter(), and make all except the output FD read/seek only. r304821: bspatch: remove output file in the case of error r305486: bspatch: add sanity checks on sizes to avoid integer overflow Note that this introduces an explicit 2GB limit, but this was already implicit in variable and function argument types. This is based on the "non-cryptanalytic attacks against freebsd update components" anonymous gist. Further refinement is planned. r305737: bspatch: remove superfluous newlines from errx strings r305822: bspatch: use #define for header size instead of magic number r306026: bspatch: Remove backwards-compatibility sys/capability.h support bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic. Modified: stable/11/usr.bin/bsdiff/bspatch/bspatch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/11/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 20:34:44 2016 (r306212) +++ stable/11/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 21:05:21 2016 (r306213) @@ -27,34 +27,60 @@ #include __FBSDID("$FreeBSD$"); +#if defined(__FreeBSD__) +#include +#if __FreeBSD_version >= 1001511 +#include +#define HAVE_CAPSICUM +#endif +#endif + #include -#include +#include +#include +#include +#include +#include +#include #include +#include #include -#include #include -#include #ifndef O_BINARY #define O_BINARY 0 #endif +#define HEADER_SIZE 32 + +static char *newfile; +static int dirfd = -1; + +static void +exit_cleanup(void) +{ + + if (dirfd != -1 && newfile != NULL) + if (unlinkat(dirfd, newfile, 0)) + warn("unlinkat"); +} static off_t offtin(u_char *buf) { off_t y; - y=buf[7]&0x7F; - y=y*256;y+=buf[6]; - y=y*256;y+=buf[5]; - y=y*256;y+=buf[4]; - y=y*256;y+=buf[3]; - y=y*256;y+=buf[2]; - y=y*256;y+=buf[1]; - y=y*256;y+=buf[0]; + y = buf[7] & 0x7F; + y = y * 256; y += buf[6]; + y = y * 256; y += buf[5]; + y = y * 256; y += buf[4]; + y = y * 256; y += buf[3]; + y = y * 256; y += buf[2]; + y = y * 256; y += buf[1]; + y = y * 256; y += buf[0]; - if(buf[7]&0x80) y=-y; + if (buf[7] & 0x80) + y = -y; - return y; + return (y); } static void @@ -65,20 +91,23 @@ usage(void) exit(1); } -int main(int argc,char * argv[]) +int main(int argc, char *argv[]) { - FILE * f, * cpf, * dpf, * epf; - BZFILE * cpfbz2, * dpfbz2, * epfbz2; + FILE *f, *cpf, *dpf, *epf; + BZFILE *cpfbz2, *dpfbz2, *epfbz2; + char *directory, *namebuf; int cbz2err, dbz2err, ebz2err; - int fd; - ssize_t oldsize,newsize; - ssize_t bzctrllen,bzdatalen; - u_char header[32],buf[8]; + int newfd, oldfd; + off_t oldsize, newsize; + off_t bzctrllen, bzdatalen; + u_char header[HEADER_SIZE], buf[8]; u_char *old, *new; - off_t oldpos,newpos; + off_t oldpos, newpos; off_t ctrl[3]; - off_t lenread; - off_t i; + off_t i, lenread, offset; +#ifdef HAVE_CAPSICUM + cap_rights_t rights_dir, rights_ro, rights_wr; +#endif if (argc != 4) usage(); @@ -86,6 +115,54 @@ int main(int argc,char * argv[]) /* Open patch file */ if ((f = fopen(argv[3], "rb")) == NULL) err(1, "fopen(%s)", argv[3]); + /* Open patch file for control block */ + if ((cpf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open patch file for diff block */ + if ((dpf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open patch file for extra block */ + if ((epf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open oldfile */ + if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) + err(1, "open(%s)", argv[1]); + /* open directory where we'll write newfile */ + if ((namebuf = strdup(argv[2])) == NULL || + (directory = dirname(namebuf)) == NULL || + (dirfd = open(directory, O_DIRECTORY)) < 0) + err(1, "open %s", argv[2]); + free(namebuf); + if ((newfile = basename(argv[2])) == NULL) + err(1, "basename"); + /* open newfile */ + if ((newfd = openat(dirfd, newfile, + O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666)) < 0) + err(1, "open(%s)", argv[2]); + atexit(exit_cleanup); + +#ifdef HAVE_CAPSICUM + if (cap_enter() < 0) { + /* Failed to sandbox, fatal if CAPABILITY_MODE enabled */ + if (errno != ENOSYS) + err(1, "failed to enter security sandbox"); + } else { + /* Capsicum Available */ + cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT, CAP_SEEK); + cap_rights_init(&rights_wr, CAP_WRITE); + cap_rights_init(&rights_dir, CAP_UNLINKAT); + + if (cap_rights_limit(fileno(f), &rights_ro) < 0 || + cap_rights_limit(fileno(cpf), &rights_ro) < 0 || + cap_rights_limit(fileno(dpf), &rights_ro) < 0 || + cap_rights_limit(fileno(epf), &rights_ro) < 0 || + cap_rights_limit(oldfd, &rights_ro) < 0 || + cap_rights_limit(newfd, &rights_wr) < 0 || + cap_rights_limit(dirfd, &rights_dir) < 0) + err(1, "cap_rights_limit() failed, could not restrict" + " capabilities"); + } +#endif /* File format: @@ -102,99 +179,99 @@ int main(int argc,char * argv[]) */ /* Read header */ - if (fread(header, 1, 32, f) < 32) { + if (fread(header, 1, HEADER_SIZE, f) < HEADER_SIZE) { if (feof(f)) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); err(1, "fread(%s)", argv[3]); } /* Check for appropriate magic */ if (memcmp(header, "BSDIFF40", 8) != 0) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Read lengths from header */ - bzctrllen=offtin(header+8); - bzdatalen=offtin(header+16); - newsize=offtin(header+24); - if((bzctrllen<0) || (bzdatalen<0) || (newsize<0)) - errx(1,"Corrupt patch\n"); + bzctrllen = offtin(header + 8); + bzdatalen = offtin(header + 16); + newsize = offtin(header + 24); + if (bzctrllen < 0 || bzctrllen > OFF_MAX - HEADER_SIZE || + bzdatalen < 0 || bzctrllen + HEADER_SIZE > OFF_MAX - bzdatalen || + newsize < 0 || newsize > SSIZE_MAX) + errx(1, "Corrupt patch"); /* Close patch file and re-open it via libbzip2 at the right places */ if (fclose(f)) err(1, "fclose(%s)", argv[3]); - if ((cpf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(cpf, 32, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)32); + offset = HEADER_SIZE; + if (fseeko(cpf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((cpfbz2 = BZ2_bzReadOpen(&cbz2err, cpf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", cbz2err); - if ((dpf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(dpf, 32 + bzctrllen, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)(32 + bzctrllen)); + offset += bzctrllen; + if (fseeko(dpf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((dpfbz2 = BZ2_bzReadOpen(&dbz2err, dpf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", dbz2err); - if ((epf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(epf, 32 + bzctrllen + bzdatalen, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)(32 + bzctrllen + bzdatalen)); + offset += bzdatalen; + if (fseeko(epf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((epfbz2 = BZ2_bzReadOpen(&ebz2err, epf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", ebz2err); - if(((fd=open(argv[1],O_RDONLY|O_BINARY,0))<0) || - ((oldsize=lseek(fd,0,SEEK_END))==-1) || - ((old=malloc(oldsize+1))==NULL) || - (lseek(fd,0,SEEK_SET)!=0) || - (read(fd,old,oldsize)!=oldsize) || - (close(fd)==-1)) err(1,"%s",argv[1]); - if((new=malloc(newsize+1))==NULL) err(1,NULL); - - oldpos=0;newpos=0; - while(newpos SSIZE_MAX || + (old = malloc(oldsize)) == NULL || + lseek(oldfd, 0, SEEK_SET) != 0 || + read(oldfd, old, oldsize) != oldsize || + close(oldfd) == -1) + err(1, "%s", argv[1]); + if ((new = malloc(newsize)) == NULL) + err(1, NULL); + + oldpos = 0; + newpos = 0; + while (newpos < newsize) { /* Read control data */ - for(i=0;i<=2;i++) { + for (i = 0; i <= 2; i++) { lenread = BZ2_bzRead(&cbz2err, cpfbz2, buf, 8); if ((lenread < 8) || ((cbz2err != BZ_OK) && (cbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); - ctrl[i]=offtin(buf); + errx(1, "Corrupt patch"); + ctrl[i] = offtin(buf); } /* Sanity-check */ - if ((ctrl[0] < 0) || (ctrl[1] < 0)) - errx(1,"Corrupt patch\n"); + if (ctrl[0] < 0 || ctrl[0] > INT_MAX || + ctrl[1] < 0 || ctrl[1] > INT_MAX) + errx(1, "Corrupt patch"); /* Sanity-check */ - if(newpos+ctrl[0]>newsize) - errx(1,"Corrupt patch\n"); + if (newpos + ctrl[0] > newsize) + errx(1, "Corrupt patch"); /* Read diff string */ lenread = BZ2_bzRead(&dbz2err, dpfbz2, new + newpos, ctrl[0]); if ((lenread < ctrl[0]) || ((dbz2err != BZ_OK) && (dbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Add old data to diff string */ - for(i=0;i=0) && (oldpos+i= 0) && (oldpos + i < oldsize)) + new[newpos + i] += old[oldpos + i]; /* Adjust pointers */ - newpos+=ctrl[0]; - oldpos+=ctrl[0]; + newpos += ctrl[0]; + oldpos += ctrl[0]; /* Sanity-check */ - if(newpos+ctrl[1]>newsize) - errx(1,"Corrupt patch\n"); + if (newpos + ctrl[1] > newsize) + errx(1, "Corrupt patch"); /* Read extra string */ lenread = BZ2_bzRead(&ebz2err, epfbz2, new + newpos, ctrl[1]); if ((lenread < ctrl[1]) || ((ebz2err != BZ_OK) && (ebz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Adjust pointers */ newpos+=ctrl[1]; @@ -209,12 +286,13 @@ int main(int argc,char * argv[]) err(1, "fclose(%s)", argv[3]); /* Write the new file */ - if(((fd=open(argv[2],O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))<0) || - (write(fd,new,newsize)!=newsize) || (close(fd)==-1)) - err(1,"%s",argv[2]); + if (write(newfd, new, newsize) != newsize || close(newfd) == -1) + err(1, "%s", argv[2]); + /* Disable atexit cleanup */ + newfile = NULL; free(new); free(old); - return 0; + return (0); } From owner-svn-src-all@freebsd.org Thu Sep 22 21:14:01 2016 Return-Path: Delivered-To: svn-src-all@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 A7B74BE4C75; Thu, 22 Sep 2016 21:14:01 +0000 (UTC) (envelope-from emaste@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 5A1933B5; Thu, 22 Sep 2016 21:14:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MLE0Xn097872; Thu, 22 Sep 2016 21:14:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MLE0e5097870; Thu, 22 Sep 2016 21:14:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609222114.u8MLE0e5097870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Sep 2016 21:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306214 - in stable/10/usr.bin/bsdiff: bsdiff bspatch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 21:14:01 -0000 Author: emaste Date: Thu Sep 22 21:14:00 2016 New Revision: 306214 URL: https://svnweb.freebsd.org/changeset/base/306214 Log: MFC r264823 (ed): Make usage printing more consistent with other tools. - Introduce a separate usage() function. - Don't use argv[0]. Directly name the application, as we do elsewhere. - Don't prepend the application name. - Don't print two newlines. Also apply the unnecessary semicolon cleanup from r298089 Modified: stable/10/usr.bin/bsdiff/bsdiff/bsdiff.c stable/10/usr.bin/bsdiff/bspatch/bspatch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- stable/10/usr.bin/bsdiff/bsdiff/bsdiff.c Thu Sep 22 21:05:21 2016 (r306213) +++ stable/10/usr.bin/bsdiff/bsdiff/bsdiff.c Thu Sep 22 21:14:00 2016 (r306214) @@ -199,6 +199,14 @@ static void offtout(off_t x,u_char *buf) if(x<0) buf[7]|=0x80; } +static void +usage(void) +{ + + fprintf(stderr, "usage: bsdiff oldfile newfile patchfile\n"); + exit(1); +} + int main(int argc,char *argv[]) { int fd; @@ -219,7 +227,8 @@ int main(int argc,char *argv[]) BZFILE * pfbz2; int bz2err; - if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]); + if (argc != 4) + usage(); /* Allocate oldsize+1 bytes instead of oldsize bytes to ensure that we never try to malloc(0) and get a NULL pointer */ Modified: stable/10/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/10/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 21:05:21 2016 (r306213) +++ stable/10/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 21:14:00 2016 (r306214) @@ -57,6 +57,14 @@ static off_t offtin(u_char *buf) return y; } +static void +usage(void) +{ + + fprintf(stderr, "usage: bspatch oldfile newfile patchfile\n"); + exit(1); +} + int main(int argc,char * argv[]) { FILE * f, * cpf, * dpf, * epf; @@ -72,7 +80,8 @@ int main(int argc,char * argv[]) off_t lenread; off_t i; - if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]); + if (argc != 4) + usage(); /* Open patch file */ if ((f = fopen(argv[3], "rb")) == NULL) @@ -152,7 +161,7 @@ int main(int argc,char * argv[]) (cbz2err != BZ_STREAM_END))) errx(1, "Corrupt patch\n"); ctrl[i]=offtin(buf); - }; + } /* Sanity-check */ if ((ctrl[0] < 0) || (ctrl[1] < 0)) @@ -190,7 +199,7 @@ int main(int argc,char * argv[]) /* Adjust pointers */ newpos+=ctrl[1]; oldpos+=ctrl[2]; - }; + } /* Clean up the bzip2 reads */ BZ2_bzReadClose(&cbz2err, cpfbz2); From owner-svn-src-all@freebsd.org Thu Sep 22 21:16:56 2016 Return-Path: Delivered-To: svn-src-all@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 24604BE4D89; Thu, 22 Sep 2016 21:16:56 +0000 (UTC) (envelope-from emaste@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 DA2CF7FD; Thu, 22 Sep 2016 21:16:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MLGtxW098066; Thu, 22 Sep 2016 21:16:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MLGtFC098065; Thu, 22 Sep 2016 21:16:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609222116.u8MLGtFC098065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Sep 2016 21:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306215 - stable/10/usr.bin/bsdiff/bspatch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 21:16:56 -0000 Author: emaste Date: Thu Sep 22 21:16:54 2016 New Revision: 306215 URL: https://svnweb.freebsd.org/changeset/base/306215 Log: MFC bspatch Capsicumization and improvements r304691: bspatch: apply style(9) Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. r304807 (allanjude): Capsicumize bspatch Move all of the fopen() and open() calls to the top of main() Restrict each FD to least privilege (read/seek only, write only, etc) cap_enter(), and make all except the output FD read/seek only. r304821: bspatch: remove output file in the case of error r305486: bspatch: add sanity checks on sizes to avoid integer overflow Note that this introduces an explicit 2GB limit, but this was already implicit in variable and function argument types. This is based on the "non-cryptanalytic attacks against freebsd update components" anonymous gist. Further refinement is planned. r305737: bspatch: remove superfluous newlines from errx strings r305822: bspatch: use #define for header size instead of magic number r306026: bspatch: Remove backwards-compatibility sys/capability.h support bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic. Modified: stable/10/usr.bin/bsdiff/bspatch/bspatch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/10/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 21:14:00 2016 (r306214) +++ stable/10/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 21:16:54 2016 (r306215) @@ -27,34 +27,60 @@ #include __FBSDID("$FreeBSD$"); +#if defined(__FreeBSD__) +#include +#if __FreeBSD_version >= 1001511 +#include +#define HAVE_CAPSICUM +#endif +#endif + #include -#include +#include +#include +#include +#include +#include +#include #include +#include #include -#include #include -#include #ifndef O_BINARY #define O_BINARY 0 #endif +#define HEADER_SIZE 32 + +static char *newfile; +static int dirfd = -1; + +static void +exit_cleanup(void) +{ + + if (dirfd != -1 && newfile != NULL) + if (unlinkat(dirfd, newfile, 0)) + warn("unlinkat"); +} static off_t offtin(u_char *buf) { off_t y; - y=buf[7]&0x7F; - y=y*256;y+=buf[6]; - y=y*256;y+=buf[5]; - y=y*256;y+=buf[4]; - y=y*256;y+=buf[3]; - y=y*256;y+=buf[2]; - y=y*256;y+=buf[1]; - y=y*256;y+=buf[0]; + y = buf[7] & 0x7F; + y = y * 256; y += buf[6]; + y = y * 256; y += buf[5]; + y = y * 256; y += buf[4]; + y = y * 256; y += buf[3]; + y = y * 256; y += buf[2]; + y = y * 256; y += buf[1]; + y = y * 256; y += buf[0]; - if(buf[7]&0x80) y=-y; + if (buf[7] & 0x80) + y = -y; - return y; + return (y); } static void @@ -65,20 +91,23 @@ usage(void) exit(1); } -int main(int argc,char * argv[]) +int main(int argc, char *argv[]) { - FILE * f, * cpf, * dpf, * epf; - BZFILE * cpfbz2, * dpfbz2, * epfbz2; + FILE *f, *cpf, *dpf, *epf; + BZFILE *cpfbz2, *dpfbz2, *epfbz2; + char *directory, *namebuf; int cbz2err, dbz2err, ebz2err; - int fd; - ssize_t oldsize,newsize; - ssize_t bzctrllen,bzdatalen; - u_char header[32],buf[8]; + int newfd, oldfd; + off_t oldsize, newsize; + off_t bzctrllen, bzdatalen; + u_char header[HEADER_SIZE], buf[8]; u_char *old, *new; - off_t oldpos,newpos; + off_t oldpos, newpos; off_t ctrl[3]; - off_t lenread; - off_t i; + off_t i, lenread, offset; +#ifdef HAVE_CAPSICUM + cap_rights_t rights_dir, rights_ro, rights_wr; +#endif if (argc != 4) usage(); @@ -86,6 +115,54 @@ int main(int argc,char * argv[]) /* Open patch file */ if ((f = fopen(argv[3], "rb")) == NULL) err(1, "fopen(%s)", argv[3]); + /* Open patch file for control block */ + if ((cpf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open patch file for diff block */ + if ((dpf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open patch file for extra block */ + if ((epf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open oldfile */ + if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) + err(1, "open(%s)", argv[1]); + /* open directory where we'll write newfile */ + if ((namebuf = strdup(argv[2])) == NULL || + (directory = dirname(namebuf)) == NULL || + (dirfd = open(directory, O_DIRECTORY)) < 0) + err(1, "open %s", argv[2]); + free(namebuf); + if ((newfile = basename(argv[2])) == NULL) + err(1, "basename"); + /* open newfile */ + if ((newfd = openat(dirfd, newfile, + O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666)) < 0) + err(1, "open(%s)", argv[2]); + atexit(exit_cleanup); + +#ifdef HAVE_CAPSICUM + if (cap_enter() < 0) { + /* Failed to sandbox, fatal if CAPABILITY_MODE enabled */ + if (errno != ENOSYS) + err(1, "failed to enter security sandbox"); + } else { + /* Capsicum Available */ + cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT, CAP_SEEK); + cap_rights_init(&rights_wr, CAP_WRITE); + cap_rights_init(&rights_dir, CAP_UNLINKAT); + + if (cap_rights_limit(fileno(f), &rights_ro) < 0 || + cap_rights_limit(fileno(cpf), &rights_ro) < 0 || + cap_rights_limit(fileno(dpf), &rights_ro) < 0 || + cap_rights_limit(fileno(epf), &rights_ro) < 0 || + cap_rights_limit(oldfd, &rights_ro) < 0 || + cap_rights_limit(newfd, &rights_wr) < 0 || + cap_rights_limit(dirfd, &rights_dir) < 0) + err(1, "cap_rights_limit() failed, could not restrict" + " capabilities"); + } +#endif /* File format: @@ -102,99 +179,99 @@ int main(int argc,char * argv[]) */ /* Read header */ - if (fread(header, 1, 32, f) < 32) { + if (fread(header, 1, HEADER_SIZE, f) < HEADER_SIZE) { if (feof(f)) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); err(1, "fread(%s)", argv[3]); } /* Check for appropriate magic */ if (memcmp(header, "BSDIFF40", 8) != 0) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Read lengths from header */ - bzctrllen=offtin(header+8); - bzdatalen=offtin(header+16); - newsize=offtin(header+24); - if((bzctrllen<0) || (bzdatalen<0) || (newsize<0)) - errx(1,"Corrupt patch\n"); + bzctrllen = offtin(header + 8); + bzdatalen = offtin(header + 16); + newsize = offtin(header + 24); + if (bzctrllen < 0 || bzctrllen > OFF_MAX - HEADER_SIZE || + bzdatalen < 0 || bzctrllen + HEADER_SIZE > OFF_MAX - bzdatalen || + newsize < 0 || newsize > SSIZE_MAX) + errx(1, "Corrupt patch"); /* Close patch file and re-open it via libbzip2 at the right places */ if (fclose(f)) err(1, "fclose(%s)", argv[3]); - if ((cpf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(cpf, 32, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)32); + offset = HEADER_SIZE; + if (fseeko(cpf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((cpfbz2 = BZ2_bzReadOpen(&cbz2err, cpf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", cbz2err); - if ((dpf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(dpf, 32 + bzctrllen, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)(32 + bzctrllen)); + offset += bzctrllen; + if (fseeko(dpf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((dpfbz2 = BZ2_bzReadOpen(&dbz2err, dpf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", dbz2err); - if ((epf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(epf, 32 + bzctrllen + bzdatalen, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)(32 + bzctrllen + bzdatalen)); + offset += bzdatalen; + if (fseeko(epf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((epfbz2 = BZ2_bzReadOpen(&ebz2err, epf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", ebz2err); - if(((fd=open(argv[1],O_RDONLY|O_BINARY,0))<0) || - ((oldsize=lseek(fd,0,SEEK_END))==-1) || - ((old=malloc(oldsize+1))==NULL) || - (lseek(fd,0,SEEK_SET)!=0) || - (read(fd,old,oldsize)!=oldsize) || - (close(fd)==-1)) err(1,"%s",argv[1]); - if((new=malloc(newsize+1))==NULL) err(1,NULL); - - oldpos=0;newpos=0; - while(newpos SSIZE_MAX || + (old = malloc(oldsize)) == NULL || + lseek(oldfd, 0, SEEK_SET) != 0 || + read(oldfd, old, oldsize) != oldsize || + close(oldfd) == -1) + err(1, "%s", argv[1]); + if ((new = malloc(newsize)) == NULL) + err(1, NULL); + + oldpos = 0; + newpos = 0; + while (newpos < newsize) { /* Read control data */ - for(i=0;i<=2;i++) { + for (i = 0; i <= 2; i++) { lenread = BZ2_bzRead(&cbz2err, cpfbz2, buf, 8); if ((lenread < 8) || ((cbz2err != BZ_OK) && (cbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); - ctrl[i]=offtin(buf); + errx(1, "Corrupt patch"); + ctrl[i] = offtin(buf); } /* Sanity-check */ - if ((ctrl[0] < 0) || (ctrl[1] < 0)) - errx(1,"Corrupt patch\n"); + if (ctrl[0] < 0 || ctrl[0] > INT_MAX || + ctrl[1] < 0 || ctrl[1] > INT_MAX) + errx(1, "Corrupt patch"); /* Sanity-check */ - if(newpos+ctrl[0]>newsize) - errx(1,"Corrupt patch\n"); + if (newpos + ctrl[0] > newsize) + errx(1, "Corrupt patch"); /* Read diff string */ lenread = BZ2_bzRead(&dbz2err, dpfbz2, new + newpos, ctrl[0]); if ((lenread < ctrl[0]) || ((dbz2err != BZ_OK) && (dbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Add old data to diff string */ - for(i=0;i=0) && (oldpos+i= 0) && (oldpos + i < oldsize)) + new[newpos + i] += old[oldpos + i]; /* Adjust pointers */ - newpos+=ctrl[0]; - oldpos+=ctrl[0]; + newpos += ctrl[0]; + oldpos += ctrl[0]; /* Sanity-check */ - if(newpos+ctrl[1]>newsize) - errx(1,"Corrupt patch\n"); + if (newpos + ctrl[1] > newsize) + errx(1, "Corrupt patch"); /* Read extra string */ lenread = BZ2_bzRead(&ebz2err, epfbz2, new + newpos, ctrl[1]); if ((lenread < ctrl[1]) || ((ebz2err != BZ_OK) && (ebz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Adjust pointers */ newpos+=ctrl[1]; @@ -209,12 +286,13 @@ int main(int argc,char * argv[]) err(1, "fclose(%s)", argv[3]); /* Write the new file */ - if(((fd=open(argv[2],O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))<0) || - (write(fd,new,newsize)!=newsize) || (close(fd)==-1)) - err(1,"%s",argv[2]); + if (write(newfd, new, newsize) != newsize || close(newfd) == -1) + err(1, "%s", argv[2]); + /* Disable atexit cleanup */ + newfile = NULL; free(new); free(old); - return 0; + return (0); } From owner-svn-src-all@freebsd.org Thu Sep 22 21:19:26 2016 Return-Path: Delivered-To: svn-src-all@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 E2410BE4F08; Thu, 22 Sep 2016 21:19:26 +0000 (UTC) (envelope-from np@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 B21759CD; Thu, 22 Sep 2016 21:19:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MLJP1N098184; Thu, 22 Sep 2016 21:19:25 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MLJPGb098183; Thu, 22 Sep 2016 21:19:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609222119.u8MLJPGb098183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 22 Sep 2016 21:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306216 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 21:19:27 -0000 Author: np Date: Thu Sep 22 21:19:25 2016 New Revision: 306216 URL: https://svnweb.freebsd.org/changeset/base/306216 Log: cxgbe(4): Fix the output of the "tids" sysctl on T6. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Sep 22 21:16:54 2016 (r306215) +++ head/sys/dev/cxgbe/t4_main.c Thu Sep 22 21:19:25 2016 (r306216) @@ -7237,7 +7237,12 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) if (t->ntids) { if (t4_read_reg(sc, A_LE_DB_CONFIG) & F_HASHEN) { - uint32_t b = t4_read_reg(sc, A_LE_DB_SERVER_INDEX) / 4; + uint32_t b; + + if (chip_id(sc) <= CHELSIO_T5) + b = t4_read_reg(sc, A_LE_DB_SERVER_INDEX) / 4; + else + b = t4_read_reg(sc, A_LE_DB_SRVR_START_INDEX); if (b) { sbuf_printf(sb, "TID range: 0-%u, %u-%u", b - 1, From owner-svn-src-all@freebsd.org Thu Sep 22 21:23:29 2016 Return-Path: Delivered-To: svn-src-all@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 7F520BE51E1; Thu, 22 Sep 2016 21:23:29 +0000 (UTC) (envelope-from emaste@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 37AE7DDB; Thu, 22 Sep 2016 21:23:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MLNSof001815; Thu, 22 Sep 2016 21:23:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MLNS6K001813; Thu, 22 Sep 2016 21:23:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609222123.u8MLNS6K001813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Sep 2016 21:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306217 - in stable/9/usr.bin/bsdiff: bsdiff bspatch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 21:23:29 -0000 Author: emaste Date: Thu Sep 22 21:23:28 2016 New Revision: 306217 URL: https://svnweb.freebsd.org/changeset/base/306217 Log: MFC r264823 (ed): Make usage printing more consistent with other tools. - Introduce a separate usage() function. - Don't use argv[0]. Directly name the application, as we do elsewhere. - Don't prepend the application name. - Don't print two newlines. Also apply the unnecessary semicolon cleanup from r298089 Modified: stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c stable/9/usr.bin/bsdiff/bspatch/bspatch.c Directory Properties: stable/9/usr.bin/bsdiff/ (props changed) Modified: stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c Thu Sep 22 21:19:25 2016 (r306216) +++ stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c Thu Sep 22 21:23:28 2016 (r306217) @@ -196,6 +196,14 @@ static void offtout(off_t x,u_char *buf) if(x<0) buf[7]|=0x80; } +static void +usage(void) +{ + + fprintf(stderr, "usage: bsdiff oldfile newfile patchfile\n"); + exit(1); +} + int main(int argc,char *argv[]) { int fd; @@ -216,7 +224,8 @@ int main(int argc,char *argv[]) BZFILE * pfbz2; int bz2err; - if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]); + if (argc != 4) + usage(); /* Allocate oldsize+1 bytes instead of oldsize bytes to ensure that we never try to malloc(0) and get a NULL pointer */ Modified: stable/9/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/9/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 21:19:25 2016 (r306216) +++ stable/9/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 21:23:28 2016 (r306217) @@ -57,6 +57,14 @@ static off_t offtin(u_char *buf) return y; } +static void +usage(void) +{ + + fprintf(stderr, "usage: bspatch oldfile newfile patchfile\n"); + exit(1); +} + int main(int argc,char * argv[]) { FILE * f, * cpf, * dpf, * epf; @@ -72,7 +80,8 @@ int main(int argc,char * argv[]) off_t lenread; off_t i; - if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]); + if (argc != 4) + usage(); /* Open patch file */ if ((f = fopen(argv[3], "rb")) == NULL) @@ -152,7 +161,7 @@ int main(int argc,char * argv[]) (cbz2err != BZ_STREAM_END))) errx(1, "Corrupt patch\n"); ctrl[i]=offtin(buf); - }; + } /* Sanity-check */ if ((ctrl[0] < 0) || (ctrl[1] < 0)) @@ -190,7 +199,7 @@ int main(int argc,char * argv[]) /* Adjust pointers */ newpos+=ctrl[1]; oldpos+=ctrl[2]; - }; + } /* Clean up the bzip2 reads */ BZ2_bzReadClose(&cbz2err, cpfbz2); From owner-svn-src-all@freebsd.org Thu Sep 22 21:34:37 2016 Return-Path: Delivered-To: svn-src-all@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 5D701BE5688; Thu, 22 Sep 2016 21:34:37 +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 2856E338; Thu, 22 Sep 2016 21:34:37 +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 u8MLYahe005636; Thu, 22 Sep 2016 21:34:36 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MLYaxU005632; Thu, 22 Sep 2016 21:34:36 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609222134.u8MLYaxU005632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 22 Sep 2016 21:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306218 - in head: share/man/man4 sys/dev/amdsbwd sys/dev/intpm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 21:34:37 -0000 Author: avg Date: Thu Sep 22 21:34:35 2016 New Revision: 306218 URL: https://svnweb.freebsd.org/changeset/base/306218 Log: amdsbwd, intpm: unify bits specific to AMD chipsets (FCHs, southbridges) AMD chipsets have proprietary mechanisms for dicovering resources. Those resources are not discoverable via plug-and-play mechanisms like PCI configuration registers or ACPI. For this reason a chipset-specific knowledge of proprietary registers is required. At present there are two FreeBSD drivers that require the proprietary resource discovery. One is amdsbwd which is a driver for the watchdog timer in the AMD chipsets. The other is intpm SMBus driver when it attaches to the newer AMD chipsets where the resources of the SMBus HBA are not described in the regular PCI way. In both cases the resources are discovered by accessing AMD PMIO space. Thus, many definitions are shared between the two drivers. This change puts those defintions into a common header file. As an added benefit, intpm driver now supports newest FCHs built into AMD processors of Family 15h, models 70h-7Fh and Family 16h, models 30h-3Fh. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8004 Added: head/sys/dev/amdsbwd/amd_chipset.h (contents, props changed) Modified: head/share/man/man4/intpm.4 head/sys/dev/amdsbwd/amdsbwd.c head/sys/dev/intpm/intpm.c Modified: head/share/man/man4/intpm.4 ============================================================================== --- head/share/man/man4/intpm.4 Thu Sep 22 21:23:28 2016 (r306217) +++ head/share/man/man4/intpm.4 Thu Sep 22 21:34:35 2016 (r306218) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2016 +.Dd September 22, 2016 .Dt INTPM 4 .Os .Sh NAME @@ -59,7 +59,9 @@ AMD SB600/7x0/8x0/9x0 southbridges .It AMD Axx/Hudson/Bolton FCHs .It -AMD FCH integrated into Family 16h Models 00h-0Fh Processors +AMD FCH integrated into Family 15h Models 60h-6Fh, 70h-7Fh Processors +.It +AMD FCH integrated into Family 16h Models 00h-0Fh, 30h-3Fh Processors .El .Sh SEE ALSO .Xr amdpm 4 , Added: head/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/amdsbwd/amd_chipset.h Thu Sep 22 21:34:35 2016 (r306218) @@ -0,0 +1,139 @@ +/*- + * 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$ + */ + +/* + * The following registers, bits and magic values are defined in Register + * Reference Guide documents for SB600, SB7x0, SB8x0, SB9x0 southbridges and + * various versions of Fusion Controller Hubs (FCHs). FCHs integrated into + * CPUs are documented in BIOS and Kernel Development Guide documents for + * the corresponding processor families. + * + * At present there are three classes of supported chipsets: + * - SB600 and S7x0 southbridges where the SMBus controller device has + * a PCI Device ID of 0x43851002 and a revision less than 0x40 + * - SB8x0, SB9x0 southbridges and FCHs where the SMBus controller device has + * a PCI Device ID of 0x43851002 and a revision greater than or equal to 0x40 + * or the controller has an ID of 0x780b1022 and a revision less than 0x41 + * - FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 + * and a revision greater than or equal to 0x41 + * The register definitions are compatible within the classes and may be + * incompatible accross them. + * So far there is no public documentation for "KERNCZ" FCH where the SMBus + * controller has a PCI ID of 0x790b1022. Based on some code in Linux it is + * assumed that revisions less than 0x49 are compatible with the SB8x0 class + * and revisions greater than or equal to 0x49 are compatible with the class + * of FCHs with 0x41+ revisions. + */ + +/* + * IO registers for accessing the PMIO space. + * See SB7xx RRG 2.3.3.1.1, for instance. + */ +#define AMDSB_PMIO_INDEX 0xcd6 +#define AMDSB_PMIO_DATA (PMIO_INDEX + 1) +#define AMDSB_PMIO_WIDTH 2 + +/* + * SB7x0 and compatible registers in the PMIO space. + * See SB7xx RRG 2.3.3.2. + */ +#define AMDSB_PM_RESET_STATUS0 0x44 +#define AMDSB_PM_RESET_STATUS1 0x45 +#define AMDSB_WD_RST_STS 0x02 +#define AMDSB_PM_WDT_CTRL 0x69 +#define AMDSB_WDT_DISABLE 0x01 +#define AMDSB_WDT_RES_MASK (0x02 | 0x04) +#define AMDSB_WDT_RES_32US 0x00 +#define AMDSB_WDT_RES_10MS 0x02 +#define AMDSB_WDT_RES_100MS 0x04 +#define AMDSB_WDT_RES_1S 0x06 +#define AMDSB_PM_WDT_BASE_LSB 0x6c +#define AMDSB_PM_WDT_BASE_MSB 0x6f + +/* + * SB8x0 and compatible registers in the PMIO space. + * See SB8xx RRG 2.3.3, for instance. + */ +#define AMDSB8_PM_SMBUS_EN 0x2c +#define AMDSB8_SMBUS_EN 0x01 +#define AMDSB8_SMBUS_ADDR_MASK 0xffe0u +#define AMDSB8_PM_WDT_EN 0x48 +#define AMDSB8_WDT_DEC_EN 0x01 +#define AMDSB8_WDT_DISABLE 0x02 +#define AMDSB8_PM_WDT_CTRL 0x4c +#define AMDSB8_WDT_32KHZ 0x00 +#define AMDSB8_WDT_1HZ 0x03 +#define AMDSB8_WDT_RES_MASK 0x03 +#define AMDSB8_PM_RESET_STATUS0 0xc0 +#define AMDSB8_PM_RESET_STATUS1 0xc1 +#define AMDSB8_WD_RST_STS 0x20 + +/* + * Newer FCH registers in the PMIO space. + * See BKDG for Family 16h Models 30h-3Fh 3.26.13 PMx00 and PMx04. + */ +#define AMDFCH41_PM_DECODE_EN0 0x00 +#define AMDFCH41_SMBUS_EN 0x10 +#define AMDFCH41_WDT_EN 0x80 +#define AMDFCH41_PM_DECODE_EN1 0x01 +#define AMDFCH41_PM_DECODE_EN3 0x03 +#define AMDFCH41_WDT_RES_MASK 0x03 +#define AMDFCH41_WDT_RES_32US 0x00 +#define AMDFCH41_WDT_RES_10MS 0x01 +#define AMDFCH41_WDT_RES_100MS 0x02 +#define AMDFCH41_WDT_RES_1S 0x03 +#define AMDFCH41_WDT_EN_MASK 0x0c +#define AMDFCH41_WDT_ENABLE 0x00 +#define AMDFCH41_PM_ISA_CTRL 0x04 +#define AMDFCH41_MMIO_EN 0x02 + +/* + * Fixed MMIO addresses for accessing Watchdog and SMBus registers. + * See BKDG for Family 16h Models 30h-3Fh 3.26.13 PMx00 and PMx04. + */ +#define AMDFCH41_WDT_FIXED_ADDR 0xfeb00000u +#define AMDFCH41_MMIO_ADDR 0xfed80000u +#define AMDFCH41_MMIO_SMBUS_OFF 0x0a00 +#define AMDFCH41_MMIO_WDT_OFF 0x0b00 + +/* + * PCI Device IDs and revisions. + * SB600 RRG 2.3.1.1, + * SB7xx RRG 2.3.1.1, + * SB8xx RRG 2.3.1, + * BKDG for Family 16h Models 00h-0Fh 3.26.7.1, + * BKDG for Family 16h Models 30h-3Fh 3.26.7.1. + * Also, see i2c-piix4 aka piix4_smbus Linux driver. + */ +#define AMDSB_SMBUS_DEVID 0x43851002 +#define AMDSB8_SMBUS_REVID 0x40 +#define AMDFCH_SMBUS_DEVID 0x780b1022 +#define AMDFCH41_SMBUS_REVID 0x41 +#define AMDCZ_SMBUS_DEVID 0x790b1022 +#define AMDCZ49_SMBUS_REVID 0x49 + Modified: head/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- head/sys/dev/amdsbwd/amdsbwd.c Thu Sep 22 21:23:28 2016 (r306217) +++ head/sys/dev/amdsbwd/amdsbwd.c Thu Sep 22 21:34:35 2016 (r306218) @@ -59,38 +59,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include -/* SB7xx RRG 2.3.3.1.1. */ -#define AMDSB_PMIO_INDEX 0xcd6 -#define AMDSB_PMIO_DATA (PMIO_INDEX + 1) -#define AMDSB_PMIO_WIDTH 2 -/* SB7xx RRG 2.3.3.2. */ -#define AMDSB_PM_RESET_STATUS0 0x44 -#define AMDSB_PM_RESET_STATUS1 0x45 -#define AMDSB_WD_RST_STS 0x02 -/* SB7xx RRG 2.3.3.2, RPR 2.36. */ -#define AMDSB_PM_WDT_CTRL 0x69 -#define AMDSB_WDT_DISABLE 0x01 -#define AMDSB_WDT_RES_MASK (0x02 | 0x04) -#define AMDSB_WDT_RES_32US 0x00 -#define AMDSB_WDT_RES_10MS 0x02 -#define AMDSB_WDT_RES_100MS 0x04 -#define AMDSB_WDT_RES_1S 0x06 -#define AMDSB_PM_WDT_BASE_LSB 0x6c -#define AMDSB_PM_WDT_BASE_MSB 0x6f -/* SB8xx RRG 2.3.3. */ -#define AMDSB8_PM_WDT_EN 0x48 -#define AMDSB8_WDT_DEC_EN 0x01 -#define AMDSB8_WDT_DISABLE 0x02 -#define AMDSB8_PM_WDT_CTRL 0x4c -#define AMDSB8_WDT_32KHZ 0x00 -#define AMDSB8_WDT_1HZ 0x03 -#define AMDSB8_WDT_RES_MASK 0x03 -#define AMDSB8_PM_RESET_STATUS0 0xC0 -#define AMDSB8_PM_RESET_STATUS1 0xC1 -#define AMDSB8_WD_RST_STS 0x20 -/* SB7xx RRG 2.3.4, WDRT. */ +/* + * Registers in the Watchdog IO space. + * See SB7xx RRG 2.3.4, WDRT. + */ #define AMDSB_WD_CTRL 0x00 #define AMDSB_WD_RUN 0x01 #define AMDSB_WD_FIRED 0x02 @@ -101,28 +76,6 @@ __FBSDID("$FreeBSD$"); #define AMDSB_WD_COUNT 0x04 #define AMDSB_WD_COUNT_MASK 0xffff #define AMDSB_WDIO_REG_WIDTH 4 -/* WDRT */ -#define MAXCOUNT_MIN_VALUE 511 -/* SB7xx RRG 2.3.1.1, SB600 RRG 2.3.1.1, SB8xx RRG 2.3.1. */ -#define AMDSB_SMBUS_DEVID 0x43851002 -#define AMDSB8_SMBUS_REVID 0x40 -#define AMDHUDSON_SMBUS_DEVID 0x780b1022 -#define AMDKERNCZ_SMBUS_DEVID 0x790b1022 -/* BKDG Family 16h Models 30h - 3Fh */ -#define AMDFCH16H3XH_PM_WDT_EN 0x00 -#define AMDFCH_WDT_DEC_EN 0x80 -#define AMDFCH16H3XH_PM_WDT_CTRL 0x03 -#define AMDFCH_WDT_RES_MASK 0x03 -#define AMDFCH_WDT_RES_32US 0x00 -#define AMDFCH_WDT_RES_10MS 0x01 -#define AMDFCH_WDT_RES_100MS 0x02 -#define AMDFCH_WDT_RES_1S 0x03 -#define AMDFCH_WDT_ENABLE_MASK 0x0c -#define AMDFCH_WDT_ENABLE 0x00 -#define AMDFCH16H3XH_PM_MMIO_CTRL 0x04 -#define AMDFCH_WDT_MMIO_EN 0x02 -#define AMDFCH16H3XH_WDT_ADDR1 0xfed80b00u -#define AMDFCH16H3XH_WDT_ADDR2 0xfeb00000u #define amdsbwd_verbose_printf(dev, ...) \ do { \ @@ -297,8 +250,8 @@ amdsbwd_identify(driver_t *driver, devic if (smb_dev == NULL) return; if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDHUDSON_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDKERNCZ_SMBUS_DEVID) + pci_get_devid(smb_dev) != AMDFCH_SMBUS_DEVID && + pci_get_devid(smb_dev) != AMDCZ_SMBUS_DEVID) return; child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1); @@ -397,48 +350,48 @@ amdsbwd_probe_sb8xx(device_t dev, struct } static void -amdsbwd_probe_fch_16h_3xh(device_t dev, struct resource *pmres, uint32_t *addr) +amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) { uint8_t val; - val = pmio_read(pmres, AMDFCH16H3XH_PM_MMIO_CTRL); - if ((val & AMDFCH_WDT_MMIO_EN) != 0) { + val = pmio_read(pmres, AMDFCH41_PM_ISA_CTRL); + if ((val & AMDFCH41_MMIO_EN) != 0) { /* Fixed offset for the watchdog within ACPI MMIO range. */ amdsbwd_verbose_printf(dev, "ACPI MMIO range is enabled\n"); - *addr = AMDFCH16H3XH_WDT_ADDR1; + *addr = AMDFCH41_MMIO_ADDR + AMDFCH41_MMIO_WDT_OFF; } else { /* * Enable decoding of watchdog MMIO address. */ - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); - val |= AMDFCH_WDT_DEC_EN; - pmio_write(pmres, AMDFCH16H3XH_PM_WDT_EN, val); + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN0); + val |= AMDFCH41_WDT_EN; + pmio_write(pmres, AMDFCH41_PM_DECODE_EN0, val); #ifdef AMDSBWD_DEBUG - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); - device_printf(dev, "AMDFCH16H3XH_PM_WDT_EN value = %#04x\n", + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN0); + device_printf(dev, "AMDFCH41_PM_DECODE_EN0 value = %#04x\n", val); #endif /* Special fixed MMIO range for the watchdog. */ - *addr = AMDFCH16H3XH_WDT_ADDR2; + *addr = AMDFCH41_WDT_FIXED_ADDR; } /* * Set watchdog timer tick to 1s and * enable the watchdog device (in stopped state). */ - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); - val &= ~AMDFCH_WDT_RES_MASK; - val |= AMDFCH_WDT_RES_1S; - val &= ~AMDFCH_WDT_ENABLE_MASK; - val |= AMDFCH_WDT_ENABLE; - pmio_write(pmres, AMDFCH16H3XH_PM_WDT_CTRL, val); + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN3); + val &= ~AMDFCH41_WDT_RES_MASK; + val |= AMDFCH41_WDT_RES_1S; + val &= ~AMDFCH41_WDT_EN_MASK; + val |= AMDFCH41_WDT_ENABLE; + pmio_write(pmres, AMDFCH41_PM_DECODE_EN3, val); #ifdef AMDSBWD_DEBUG - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); - amdsbwd_verbose_printf(dev, "AMDFCH16H3XH_PM_WDT_CTRL value = %#04x\n", + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN3); + amdsbwd_verbose_printf(dev, "AMDFCH41_PM_DECODE_EN3 value = %#04x\n", val); #endif - device_set_desc(dev, "AMD FCH Rev 42h+ Watchdog Timer"); + device_set_desc(dev, "AMD FCH Rev 41h+ Watchdog Timer"); } static int @@ -476,11 +429,12 @@ amdsbwd_probe(device_t dev) revid = pci_get_revid(smb_dev); if (devid == AMDSB_SMBUS_DEVID && revid < AMDSB8_SMBUS_REVID) amdsbwd_probe_sb7xx(dev, res, &addr); - else if (devid == AMDSB_SMBUS_DEVID || devid == AMDKERNCZ_SMBUS_DEVID || - (devid == AMDHUDSON_SMBUS_DEVID && revid < 0x42)) + else if (devid == AMDSB_SMBUS_DEVID || + (devid == AMDFCH_SMBUS_DEVID && revid < AMDFCH41_SMBUS_REVID) || + (devid == AMDCZ_SMBUS_DEVID && revid < AMDCZ49_SMBUS_REVID)) amdsbwd_probe_sb8xx(dev, res, &addr); else - amdsbwd_probe_fch_16h_3xh(dev, res, &addr); + amdsbwd_probe_fch41(dev, res, &addr); bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Thu Sep 22 21:23:28 2016 (r306217) +++ head/sys/dev/intpm/intpm.c Thu Sep 22 21:34:35 2016 (r306218) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "opt_intpm.h" @@ -103,12 +104,11 @@ intsmb_probe(device_t dev) case 0x43721002: device_set_desc(dev, "ATI IXP400 SMBus Controller"); break; - case 0x43851002: + case AMDSB_SMBUS_DEVID: device_set_desc(dev, "AMD SB600/7xx/8xx/9xx SMBus Controller"); break; - case 0x780b1022: /* AMD FCH */ - if (pci_get_revid(dev) < 0x40) - return (ENXIO); + case AMDFCH_SMBUS_DEVID: /* AMD FCH */ + case AMDCZ_SMBUS_DEVID: /* AMD Carizzo FCH */ device_set_desc(dev, "AMD FCH SMBus Controller"); break; default: @@ -119,7 +119,7 @@ intsmb_probe(device_t dev) } static uint8_t -sb8xx_pmio_read(struct resource *res, uint8_t reg) +amd_pmio_read(struct resource *res, uint8_t reg) { bus_write_1(res, 0, reg); /* Index */ return (bus_read_1(res, 1)); /* Data */ @@ -128,27 +128,18 @@ sb8xx_pmio_read(struct resource *res, ui static int sb8xx_attach(device_t dev) { - static const int AMDSB_PMIO_INDEX = 0xcd6; - static const int AMDSB_PMIO_WIDTH = 2; - static const int AMDSB8_SMBUS_ADDR = 0x2c; - static const int AMDSB8_SMBUS_EN = 0x01; - static const int AMDSB8_SMBUS_ADDR_MASK = ~0x1fu; static const int AMDSB_SMBIO_WIDTH = 0x14; - static const int AMDSB_SMBUS_CFG = 0x10; - static const int AMDSB_SMBUS_IRQ = 0x01; - static const int AMDSB_SMBUS_REV_MASK = ~0x0fu; - static const int AMDSB_SMBUS_REV_SHIFT = 4; - static const int AMDSB_IO_RID = 0; - struct intsmb_softc *sc; struct resource *res; + uint32_t devid; + uint8_t revid; uint16_t addr; - uint8_t cfg; int rid; int rc; + bool enabled; sc = device_get_softc(dev); - rid = AMDSB_IO_RID; + rid = 0; rc = bus_set_resource(dev, SYS_RES_IOPORT, rid, AMDSB_PMIO_INDEX, AMDSB_PMIO_WIDTH); if (rc != 0) { @@ -156,26 +147,38 @@ sb8xx_attach(device_t dev) return (ENXIO); } res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, - RF_ACTIVE | RF_SHAREABLE); + RF_ACTIVE); if (res == NULL) { device_printf(dev, "bus_alloc_resource for PM IO failed\n"); return (ENXIO); } - addr = sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR + 1); - addr <<= 8; - addr |= sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR); + devid = pci_get_devid(dev); + revid = pci_get_revid(dev); + if (devid == AMDSB_SMBUS_DEVID || + (devid == AMDFCH_SMBUS_DEVID && revid < AMDFCH41_SMBUS_REVID) || + (devid == AMDCZ_SMBUS_DEVID && revid < AMDCZ49_SMBUS_REVID)) { + addr = amd_pmio_read(res, AMDSB8_PM_SMBUS_EN + 1); + addr <<= 8; + addr |= amd_pmio_read(res, AMDSB8_PM_SMBUS_EN); + enabled = (addr & AMDSB8_SMBUS_EN) != 0; + addr &= AMDSB8_SMBUS_ADDR_MASK; + } else { + addr = amd_pmio_read(res, AMDFCH41_PM_DECODE_EN0); + enabled = (addr & AMDFCH41_SMBUS_EN) != 0; + addr = amd_pmio_read(res, AMDFCH41_PM_DECODE_EN1); + addr <<= 8; + } bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); - if ((addr & AMDSB8_SMBUS_EN) == 0) { - device_printf(dev, "SB8xx SMBus not enabled\n"); + if (!enabled) { + device_printf(dev, "SB8xx/SB9xx/FCH SMBus not enabled\n"); return (ENXIO); } - addr &= AMDSB8_SMBUS_ADDR_MASK; - sc->io_rid = AMDSB_IO_RID; + sc->io_rid = 0; rc = bus_set_resource(dev, SYS_RES_IOPORT, sc->io_rid, addr, AMDSB_SMBIO_WIDTH); if (rc != 0) { @@ -187,15 +190,8 @@ sb8xx_attach(device_t dev) return (ENXIO); } sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->io_rid, - RF_ACTIVE | RF_SHAREABLE); - cfg = bus_read_1(sc->io_res, AMDSB_SMBUS_CFG); - + RF_ACTIVE); sc->poll = 1; - device_printf(dev, "intr %s disabled ", - (cfg & AMDSB_SMBUS_IRQ) != 0 ? "IRQ" : "SMI"); - printf("revision %d\n", - (cfg & AMDSB_SMBUS_REV_MASK) >> AMDSB_SMBUS_REV_SHIFT); - return (0); } @@ -237,11 +233,12 @@ intsmb_attach(device_t dev) sc->cfg_irq9 = 1; break; #endif - case 0x43851002: - if (pci_get_revid(dev) >= 0x40) + case AMDSB_SMBUS_DEVID: + if (pci_get_revid(dev) >= AMDSB8_SMBUS_REVID) sc->sb8xx = 1; break; - case 0x780b1022: + case AMDFCH_SMBUS_DEVID: + case AMDCZ_SMBUS_DEVID: sc->sb8xx = 1; break; } From owner-svn-src-all@freebsd.org Thu Sep 22 22:34:45 2016 Return-Path: Delivered-To: svn-src-all@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 4F73ABE6D7F; Thu, 22 Sep 2016 22:34:45 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 BAF5D275; Thu, 22 Sep 2016 22:34:44 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id b130so173426393wmc.0; Thu, 22 Sep 2016 15:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=HDMskWIpHmJe+7CBKsxr9cE4LNgyPqmrTEN8Ip1gIWA=; b=flalFxy5yiCtd38zDv2NqsGxGyU47dCv4pncv6KKvuQtT7sYeTHu9wlq0+ZIeLYC2j v5RZ3YZoRJjhtwfwX9DWAxviWC9/J9sl1LGqMlj58y398yAvAt4S9Uq9JX11WbUoo3rA bfL96k1KXRENHFLCkpTgpk25NosQ+MAuA+9n6yRVXNHcB+LspEzO2qQ9pofKxzE0KZ06 ukkYX8hZ7HSQDucdoyB5+wGyTfbtEJwWrenCMH3YrGLvaY6V9ikSX5rY8agobGXJC8/r 2q6v7ozFzTV7AKyqbmFX08Ji1oMfBMYSZcfNoi4eTtdgwyYcIhe3Hi5qA5mMqSL5S67g G+tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=HDMskWIpHmJe+7CBKsxr9cE4LNgyPqmrTEN8Ip1gIWA=; b=BD3zRxLbJp3sHIGxSSf27P6ii7Rlk+tdIT3vZ48jiZ9XYSFhLQK82biTaeyvn4QpXx D+R/E8g86+uNbyPAMTax+x5Cg6p8TU2sPEcN5CpkCUz6cRjq4QlStxgKHuaFSMCrd8cs pRXIsCmVMxZIAwInMBiA9XD/5qTcJkQCpQEegnuNGKuLLU7NzW7lu5P5DRTSFYhWNKqI m46b8R3F8PoLQKL/ZaedmfIzjvcpRGn+NUxwl/Rd7oolSJk26q/26798zd2ZtaH5ywtP MxKLb0MLyS1ojrqylOlxwDfK8PBbTEz6Oae4/wL0v/jTw0Y5cvfC1tC0xDW6NQ5cRsg6 QTHw== X-Gm-Message-State: AA6/9RmuAZAlkh+oFejj5Gv9AIYf0SJQuasyLFIxDfY8SBwkdifulB7eiHYzfD59kuofrz0JjbT+1w7BcSbbcA== X-Received: by 10.28.87.16 with SMTP id l16mr115482wmb.75.1474583683196; Thu, 22 Sep 2016 15:34:43 -0700 (PDT) MIME-Version: 1.0 Sender: oshogbo.vx@gmail.com Received: by 10.28.158.197 with HTTP; Thu, 22 Sep 2016 15:34:40 -0700 (PDT) In-Reply-To: <20160922161102.GA71374@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> <20160922143412.GA69951@bsdpad.com> <20160922145625.GA70214@bsdpad.com> <20160922152153.GA70762@bsdpad.com> <20160922161102.GA71374@bsdpad.com> From: Mariusz Zaborski Date: Fri, 23 Sep 2016 00:34:40 +0200 X-Google-Sender-Auth: xiorRzRkGr9RfSpsU1p8nYeKojE Message-ID: Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys To: Ruslan Bukin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: multipart/mixed; boundary=001a1144375aa10e4c053d20446c X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 22:34:45 -0000 --001a1144375aa10e4c053d20446c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks, I was able to reproduce that :) I attached the patch. Could you please confirm that it fix the problem? Thank you and sorry for inconveniences, Mariusz On 22 September 2016 at 18:11, Ruslan Bukin wro= te: > I have just tested this with MIPS64EL and the result is the same. > So you can try both EL or EB > > e.g. make -j16 TARGET=3Dmips TARGET_ARCH=3Dmips64el KERNCONF=3DMALTA64 bu= ildkernel > > Ruslan > > On Thu, Sep 22, 2016 at 03:21:53PM +0000, Ruslan Bukin wrote: >> Hi >> >> It reports nothing. Yes I use qemu: >> /home/rb743/dev/qemu/qemu/build1/mips64-softmmu/qemu-system-mips64 -M ma= lta -kernel ~/obj/mips.mips64/home/rb743/dev/freebsd-mips/sys/MALTA64/kerne= l -hda /home/rb743/world-mips64eb/mips64eb.img -nographic -smp 1 -cpu 5kf -= net nic -net user -m 2048M -redir tcp:4022::22 >> >> Ruslan >> >> On Thu, Sep 22, 2016 at 05:11:07PM +0200, Mariusz Zaborski wrote: >> > I tested it on the mips for Malta kernel and it's works fine. I will >> > try to do it on mips64, are you using qemu to test it? >> > What is ctrl + t reporting you? >> > >> > >> > On 22 September 2016 at 16:56, Ruslan Bukin wrote: >> > > May be. The next line should be >> > > /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). >> > > >> > > but it hangs before this line >> > > >> > > Ruslan >> > > >> > > On Thu, Sep 22, 2016 at 04:39:16PM +0200, Mariusz Zaborski wrote: >> > >> Hi Ruslan, >> > >> >> > >> Does it hang on some network script? >> > >> >> > >> Thanks, >> > >> Mariusz >> > >> >> > >> >> > >> On 22 September 2016 at 16:34, Ruslan Bukin wrote: >> > >> > Hi Mariusz >> > >> > >> > >> > my MIPS64EB kernel stops booting with this >> > >> > >> > >> > somewhere here: >> > >> > [...] >> > >> > Starting file system checks: >> > >> > /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946= 580 blocks, 0.0% fragmentation) >> > >> > Mounting local filesystems:. >> > >> > ELF ldconfig path: /lib /usr/lib /usr/lib/compat >> > >> > random: unblocking device. >> > >> > >> > >> > any idea ? (should I rebuild something?) >> > >> > >> > >> > thanks! >> > >> > >> > >> > Ruslan >> > >> > >> > >> > On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: >> > >> >> Author: oshogbo >> > >> >> Date: Thu Sep 22 09:58:46 2016 >> > >> >> New Revision: 306174 >> > >> >> URL: https://svnweb.freebsd.org/changeset/base/306174 >> > >> >> >> > >> >> Log: >> > >> >> capsicum: propagate rights on accept(2) >> > >> >> >> > >> >> Descriptor returned by accept(2) should inherits capabilities = rights from >> > >> >> the listening socket. >> > >> >> >> > >> >> PR: 201052 >> > >> >> Reviewed by: emaste, jonathan >> > >> >> Discussed with: many >> > >> >> Differential Revision: https://reviews.freebsd.org/D7724 >> > >> >> >> > >> >> Modified: >> > >> >> head/sys/compat/cloudabi/cloudabi_sock.c >> > >> >> head/sys/compat/linux/linux_socket.c >> > >> >> head/sys/kern/kern_sendfile.c >> > >> >> head/sys/kern/uipc_syscalls.c >> > >> >> head/sys/netinet/sctp_syscalls.c >> > >> >> head/sys/sys/socketvar.h >> > >> >> >> > >> >> Modified: head/sys/compat/cloudabi/cloudabi_sock.c >> > >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> > >> >> --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:2= 2 2016 (r306173) >> > >> >> +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:4= 6 2016 (r306174) >> > >> >> @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread >> > >> >> int error; >> > >> >> >> > >> >> error =3D getsock_cap(td, uap->sock, cap_rights_init(&righ= ts, >> > >> >> - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp= , NULL); >> > >> >> + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp= , NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> so =3D fp->f_data; >> > >> >> >> > >> >> Modified: head/sys/compat/linux/linux_socket.c >> > >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> > >> >> --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:2= 2 2016 (r306173) >> > >> >> +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:4= 6 2016 (r306174) >> > >> >> @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i >> > >> >> if (error =3D=3D EFAULT && namelen !=3D sizeof(str= uct sockaddr_in)) >> > >> >> return (EINVAL); >> > >> >> if (error =3D=3D EINVAL) { >> > >> >> - error1 =3D getsock_cap(td, s, &rights, &fp= , NULL); >> > >> >> + error1 =3D getsock_cap(td, s, &rights, &fp= , NULL, NULL); >> > >> >> if (error1 !=3D 0) >> > >> >> return (error1); >> > >> >> so =3D fp->f_data; >> > >> >> >> > >> >> Modified: head/sys/kern/kern_sendfile.c >> > >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> > >> >> --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 = (r306173) >> > >> >> +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 = (r306174) >> > >> >> @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int >> > >> >> * The socket must be a stream socket and connected. >> > >> >> */ >> > >> >> error =3D getsock_cap(td, s, cap_rights_init(&rights, CAP_= SEND), >> > >> >> - sock_fp, NULL); >> > >> >> + sock_fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> *so =3D (*sock_fp)->f_data; >> > >> >> >> > >> >> Modified: head/sys/kern/uipc_syscalls.c >> > >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> > >> >> --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 = (r306173) >> > >> >> +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 = (r306174) >> > >> >> @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char >> > >> >> /* >> > >> >> * Convert a user file descriptor to a kernel file entry and ch= eck if required >> > >> >> * capability rights are present. >> > >> >> + * If required copy of current set of capability rights is retu= rned. >> > >> >> * A reference on the file entry is held upon returning. >> > >> >> */ >> > >> >> int >> > >> >> getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, >> > >> >> - struct file **fpp, u_int *fflagp) >> > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecaps= p) >> > >> >> { >> > >> >> struct file *fp; >> > >> >> int error; >> > >> >> >> > >> >> - error =3D fget_unlocked(td->td_proc->p_fd, fd, rightsp, &f= p, NULL); >> > >> >> + error =3D fget_cap(td, fd, rightsp, &fp, havecapsp); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> if (fp->f_type !=3D DTYPE_SOCKET) { >> > >> >> fdrop(fp, td); >> > >> >> + if (havecapsp !=3D NULL) >> > >> >> + filecaps_free(havecapsp); >> > >> >> return (ENOTSOCK); >> > >> >> } >> > >> >> if (fflagp !=3D NULL) >> > >> >> @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd >> > >> >> AUDIT_ARG_FD(fd); >> > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); >> > >> >> error =3D getsock_cap(td, fd, cap_rights_init(&rights, CAP= _BIND), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> so =3D fp->f_data; >> > >> >> @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis >> > >> >> >> > >> >> AUDIT_ARG_FD(uap->s); >> > >> >> error =3D getsock_cap(td, uap->s, cap_rights_init(&rights,= CAP_LISTEN), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error =3D=3D 0) { >> > >> >> so =3D fp->f_data; >> > >> >> #ifdef MAC >> > >> >> @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s >> > >> >> struct file *headfp, *nfp =3D NULL; >> > >> >> struct sockaddr *sa =3D NULL; >> > >> >> struct socket *head, *so; >> > >> >> + struct filecaps fcaps; >> > >> >> cap_rights_t rights; >> > >> >> u_int fflag; >> > >> >> pid_t pgid; >> > >> >> @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s >> > >> >> >> > >> >> AUDIT_ARG_FD(s); >> > >> >> error =3D getsock_cap(td, s, cap_rights_init(&rights, CAP_= ACCEPT), >> > >> >> - &headfp, &fflag); >> > >> >> + &headfp, &fflag, &fcaps); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> head =3D headfp->f_data; >> > >> >> @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s >> > >> >> if (error !=3D 0) >> > >> >> goto done; >> > >> >> #endif >> > >> >> - error =3D falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O= _CLOEXEC : 0); >> > >> >> + error =3D falloc_caps(td, &nfp, &fd, >> > >> >> + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); >> > >> >> if (error !=3D 0) >> > >> >> goto done; >> > >> >> ACCEPT_LOCK(); >> > >> >> @@ -440,6 +445,8 @@ noconnection: >> > >> >> * a reference on nfp to the caller on success if they req= uest it. >> > >> >> */ >> > >> >> done: >> > >> >> + if (nfp =3D=3D NULL) >> > >> >> + filecaps_free(&fcaps); >> > >> >> if (fp !=3D NULL) { >> > >> >> if (error =3D=3D 0) { >> > >> >> *fp =3D nfp; >> > >> >> @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di >> > >> >> AUDIT_ARG_FD(fd); >> > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); >> > >> >> error =3D getsock_cap(td, fd, cap_rights_init(&rights, CAP= _CONNECT), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> so =3D fp->f_data; >> > >> >> @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st >> > >> >> AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); >> > >> >> cap_rights_set(&rights, CAP_CONNECT); >> > >> >> } >> > >> >> - error =3D getsock_cap(td, s, &rights, &fp, NULL); >> > >> >> + error =3D getsock_cap(td, s, &rights, &fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> so =3D (struct socket *)fp->f_data; >> > >> >> @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st >> > >> >> >> > >> >> AUDIT_ARG_FD(s); >> > >> >> error =3D getsock_cap(td, s, cap_rights_init(&rights, CAP_= RECV), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> so =3D fp->f_data; >> > >> >> @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s >> > >> >> >> > >> >> AUDIT_ARG_FD(uap->s); >> > >> >> error =3D getsock_cap(td, uap->s, cap_rights_init(&rights,= CAP_SHUTDOWN), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error =3D=3D 0) { >> > >> >> so =3D fp->f_data; >> > >> >> error =3D soshutdown(so, uap->how); >> > >> >> @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s >> > >> >> >> > >> >> AUDIT_ARG_FD(s); >> > >> >> error =3D getsock_cap(td, s, cap_rights_init(&rights, CAP_= SETSOCKOPT), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error =3D=3D 0) { >> > >> >> so =3D fp->f_data; >> > >> >> error =3D sosetopt(so, &sopt); >> > >> >> @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s >> > >> >> >> > >> >> AUDIT_ARG_FD(s); >> > >> >> error =3D getsock_cap(td, s, cap_rights_init(&rights, CAP_= GETSOCKOPT), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error =3D=3D 0) { >> > >> >> so =3D fp->f_data; >> > >> >> error =3D sogetopt(so, &sopt); >> > >> >> @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int >> > >> >> >> > >> >> AUDIT_ARG_FD(fd); >> > >> >> error =3D getsock_cap(td, fd, cap_rights_init(&rights, CAP= _GETSOCKNAME), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> so =3D fp->f_data; >> > >> >> @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int >> > >> >> >> > >> >> AUDIT_ARG_FD(fd); >> > >> >> error =3D getsock_cap(td, fd, cap_rights_init(&rights, CAP= _GETPEERNAME), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> so =3D fp->f_data; >> > >> >> >> > >> >> Modified: head/sys/netinet/sctp_syscalls.c >> > >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> > >> >> --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 = (r306173) >> > >> >> +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 = (r306174) >> > >> >> @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) >> > >> >> } >> > >> >> >> > >> >> AUDIT_ARG_FD(uap->sd); >> > >> >> - error =3D getsock_cap(td, uap->sd, &rights, &fp, NULL); >> > >> >> + error =3D getsock_cap(td, uap->sd, &rights, &fp, NULL, NUL= L); >> > >> >> if (error !=3D 0) >> > >> >> goto sctp_bad; >> > >> >> #ifdef KTRACE >> > >> >> @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) >> > >> >> } >> > >> >> >> > >> >> AUDIT_ARG_FD(uap->sd); >> > >> >> - error =3D getsock_cap(td, uap->sd, &rights, &fp, NULL); >> > >> >> + error =3D getsock_cap(td, uap->sd, &rights, &fp, NULL, NUL= L); >> > >> >> if (error !=3D 0) >> > >> >> goto sctp_bad1; >> > >> >> >> > >> >> @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) >> > >> >> >> > >> >> AUDIT_ARG_FD(uap->sd); >> > >> >> error =3D getsock_cap(td, uap->sd, cap_rights_init(&rights= , CAP_RECV), >> > >> >> - &fp, NULL); >> > >> >> + &fp, NULL, NULL); >> > >> >> if (error !=3D 0) >> > >> >> return (error); >> > >> >> #ifdef COMPAT_FREEBSD32 >> > >> >> >> > >> >> Modified: head/sys/sys/socketvar.h >> > >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> > >> >> --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r= 306173) >> > >> >> +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r= 306174) >> > >> >> @@ -321,6 +321,7 @@ extern u_long sb_max; >> > >> >> extern so_gen_t so_gencnt; >> > >> >> >> > >> >> struct file; >> > >> >> +struct filecaps; >> > >> >> struct filedesc; >> > >> >> struct mbuf; >> > >> >> struct sockaddr; >> > >> >> @@ -340,7 +341,7 @@ struct uio; >> > >> >> */ >> > >> >> int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t = len); >> > >> >> int getsock_cap(struct thread *td, int fd, cap_rights_t *right= sp, >> > >> >> - struct file **fpp, u_int *fflagp); >> > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *hav= ecaps); >> > >> >> void soabort(struct socket *so); >> > >> >> int soaccept(struct socket *so, struct sockaddr **nam); >> > >> >> void soaio_enqueue(struct task *task); >> > >> >> >> > >> --001a1144375aa10e4c053d20446c Content-Type: text/x-patch; charset=US-ASCII; name="fget_cap.patch" Content-Disposition: attachment; filename="fget_cap.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_itex0rw30 ZGlmZiAtLWdpdCBhL3N5cy9rZXJuL2tlcm5fZGVzY3JpcC5jIGIvc3lzL2tlcm4va2Vybl9kZXNj cmlwLmMKaW5kZXggMzEwNzJmMS4uNDcyNDVlNyAxMDA2NDQKLS0tIGEvc3lzL2tlcm4va2Vybl9k ZXNjcmlwLmMKKysrIGIvc3lzL2tlcm4va2Vybl9kZXNjcmlwLmMKQEAgLTI0ODEsMTIgKzI0ODEs MTYgQEAgaW50CiBmZ2V0X2NhcChzdHJ1Y3QgdGhyZWFkICp0ZCwgaW50IGZkLCBjYXBfcmlnaHRz X3QgKm5lZWRyaWdodHNwLAogICAgIHN0cnVjdCBmaWxlICoqZnBwLCBzdHJ1Y3QgZmlsZWNhcHMg KmhhdmVjYXBzcCkKIHsKLQlzdHJ1Y3QgZmlsZWRlc2MgKmZkcDsKLQlzdHJ1Y3QgZmlsZSAqZnA7 CisJc3RydWN0IGZpbGVkZXNjICpmZHAgPSB0ZC0+dGRfcHJvYy0+cF9mZDsKIAlpbnQgZXJyb3I7 CisjaWZuZGVmIENBUEFCSUxJVElFUworCWVycm9yID0gZmdldF91bmxvY2tlZChmZHAsIGZkLCBu ZWVkcmlnaHRzcCwgZnBwLCBOVUxMKTsKKwlpZiAoZXJyb3IgPT0gMCAmJiBoYXZlY2Fwc3AgIT0g TlVMTCkKKwkJZmlsZWNhcHNfZmlsbChoYXZlY2Fwc3ApOworI2Vsc2UKKwlzdHJ1Y3QgZmlsZSAq ZnA7CiAJc2VxX3Qgc2VxOwogCi0JZmRwID0gdGQtPnRkX3Byb2MtPnBfZmQ7CiAJZm9yICg7Oykg ewogCQllcnJvciA9IGZnZXRfdW5sb2NrZWQoZmRwLCBmZCwgbmVlZHJpZ2h0c3AsICZmcCwgJnNl cSk7CiAJCWlmIChlcnJvciAhPSAwKQpAQCAtMjUxMiw3ICsyNTE2LDcgQEAgZ2V0X2xvY2tlZDoK IAlGSUxFREVTQ19TTE9DSyhmZHApOwogCWVycm9yID0gZmdldF9jYXBfbG9ja2VkKGZkcCwgZmQs IG5lZWRyaWdodHNwLCBmcHAsIGhhdmVjYXBzcCk7CiAJRklMRURFU0NfU1VOTE9DSyhmZHApOwot CisjZW5kaWYKIAlyZXR1cm4gKGVycm9yKTsKIH0KIAo= --001a1144375aa10e4c053d20446c-- From owner-svn-src-all@freebsd.org Thu Sep 22 22:51:13 2016 Return-Path: Delivered-To: svn-src-all@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 2734BBE5412; Thu, 22 Sep 2016 22:51:13 +0000 (UTC) (envelope-from jpaetzel@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 E4321C48; Thu, 22 Sep 2016 22:51:12 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MMpCKf034724; Thu, 22 Sep 2016 22:51:12 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MMpBKW034720; Thu, 22 Sep 2016 22:51:11 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201609222251.u8MMpBKW034720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Thu, 22 Sep 2016 22:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306219 - head/sys/dev/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 22:51:13 -0000 Author: jpaetzel Date: Thu Sep 22 22:51:11 2016 New Revision: 306219 URL: https://svnweb.freebsd.org/changeset/base/306219 Log: Update oce to version 11.0.50.0 Submitted by: Venkat Duvvuru Added: head/sys/dev/oce/oce_user.h (contents, props changed) Modified: head/sys/dev/oce/oce_hw.c head/sys/dev/oce/oce_hw.h head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/oce/oce_mbox.c head/sys/dev/oce/oce_queue.c head/sys/dev/oce/oce_sysctl.c Modified: head/sys/dev/oce/oce_hw.c ============================================================================== --- head/sys/dev/oce/oce_hw.c Thu Sep 22 21:34:35 2016 (r306218) +++ head/sys/dev/oce/oce_hw.c Thu Sep 22 22:51:11 2016 (r306219) @@ -393,6 +393,11 @@ oce_create_nw_interface(POCE_SOFTC sc) if (IS_SH(sc) || IS_XE201(sc)) capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; + if (sc->enable_hwlro) { + capab_flags |= MBX_RX_IFACE_FLAGS_LRO; + capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO; + } + /* enable capabilities controlled via driver startup parameters */ if (is_rss_enabled(sc)) capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; Modified: head/sys/dev/oce/oce_hw.h ============================================================================== --- head/sys/dev/oce/oce_hw.h Thu Sep 22 21:34:35 2016 (r306218) +++ head/sys/dev/oce/oce_hw.h Thu Sep 22 22:51:11 2016 (r306219) @@ -111,6 +111,9 @@ #define PD_MPU_MBOX_DB 0x0160 #define PD_MQ_DB 0x0140 +#define DB_OFFSET 0xc0 +#define DB_LRO_RQ_ID_MASK 0x7FF + /* EQE completion types */ #define EQ_MINOR_CODE_COMPLETION 0x00 #define EQ_MINOR_CODE_OTHER 0x01 @@ -180,6 +183,7 @@ #define ASYNC_EVENT_GRP5 0x5 #define ASYNC_EVENT_CODE_DEBUG 0x6 #define ASYNC_EVENT_PVID_STATE 0x3 +#define ASYNC_EVENT_OS2BMC 0x5 #define ASYNC_EVENT_DEBUG_QNQ 0x1 #define ASYNC_EVENT_CODE_SLIPORT 0x11 #define VLAN_VID_MASK 0x0FFF @@ -722,6 +726,34 @@ struct oce_async_cqe_link_state { } u0; }; +/* OS2BMC async event */ +struct oce_async_evt_grp5_os2bmc { + union { + struct { + uint32_t lrn_enable:1; + uint32_t lrn_disable:1; + uint32_t mgmt_enable:1; + uint32_t mgmt_disable:1; + uint32_t rsvd0:12; + uint32_t vlan_tag:16; + uint32_t arp_filter:1; + uint32_t dhcp_client_filt:1; + uint32_t dhcp_server_filt:1; + uint32_t net_bios_filt:1; + uint32_t rsvd1:3; + uint32_t bcast_filt:1; + uint32_t ipv6_nbr_filt:1; + uint32_t ipv6_ra_filt:1; + uint32_t ipv6_ras_filt:1; + uint32_t rsvd2[4]; + uint32_t mcast_filt:1; + uint32_t rsvd3:16; + uint32_t evt_tag; + uint32_t dword3; + } s; + uint32_t dword[4]; + } u; +}; /* PVID aync event */ struct oce_async_event_grp5_pvid_state { @@ -1396,7 +1428,7 @@ typedef union oce_cq_ctx_u { uint32_t dw5rsvd3:1; uint32_t eventable:1; /* dw6 */ - uint32_t eq_id:8; + uint32_t eq_id:16; uint32_t dw6rsvd1:15; uint32_t armed:1; /* dw7 */ @@ -2403,8 +2435,8 @@ struct oce_nic_hdr_wqe { uint32_t tcpcs:1; uint32_t udpcs:1; uint32_t ipcs:1; - uint32_t rsvd3:1; - uint32_t rsvd2:1; + uint32_t mgmt:1; + uint32_t lso6:1; uint32_t forward:1; uint32_t crc:1; uint32_t event:1; @@ -2426,8 +2458,8 @@ struct oce_nic_hdr_wqe { uint32_t event:1; uint32_t crc:1; uint32_t forward:1; - uint32_t rsvd2:1; - uint32_t rsvd3:1; + uint32_t lso6:1; + uint32_t mgmt:1; uint32_t ipcs:1; uint32_t udpcs:1; uint32_t tcpcs:1; @@ -3010,6 +3042,53 @@ struct oce_rxf_stats_v0 { uint32_t rsvd1[6]; }; +struct oce_port_rxf_stats_v2 { + uint32_t rsvd0[10]; + uint32_t roce_bytes_received_lsd; + uint32_t roce_bytes_received_msd; + uint32_t rsvd1[5]; + uint32_t roce_frames_received; + uint32_t rx_crc_errors; + uint32_t rx_alignment_symbol_errors; + uint32_t rx_pause_frames; + uint32_t rx_priority_pause_frames; + uint32_t rx_control_frames; + uint32_t rx_in_range_errors; + uint32_t rx_out_range_errors; + uint32_t rx_frame_too_long; + uint32_t rx_address_match_errors; + uint32_t rx_dropped_too_small; + uint32_t rx_dropped_too_short; + uint32_t rx_dropped_header_too_small; + uint32_t rx_dropped_tcp_length; + uint32_t rx_dropped_runt; + uint32_t rsvd2[10]; + uint32_t rx_ip_checksum_errs; + uint32_t rx_tcp_checksum_errs; + uint32_t rx_udp_checksum_errs; + uint32_t rsvd3[7]; + uint32_t rx_switched_unicast_packets; + uint32_t rx_switched_multicast_packets; + uint32_t rx_switched_broadcast_packets; + uint32_t rsvd4[3]; + uint32_t tx_pauseframes; + uint32_t tx_priority_pauseframes; + uint32_t tx_controlframes; + uint32_t rsvd5[10]; + uint32_t rxpp_fifo_overflow_drop; + uint32_t rx_input_fifo_overflow_drop; + uint32_t pmem_fifo_overflow_drop; + uint32_t jabber_events; + uint32_t rsvd6[3]; + uint32_t rx_drops_payload_size; + uint32_t rx_drops_clipped_header; + uint32_t rx_drops_crc; + uint32_t roce_drops_payload_len; + uint32_t roce_drops_crc; + uint32_t rsvd7[19]; +}; + + struct oce_port_rxf_stats_v1 { uint32_t rsvd0[12]; uint32_t rx_crc_errors; @@ -3046,6 +3125,20 @@ struct oce_port_rxf_stats_v1 { uint32_t rsvd5[3]; }; +struct oce_rxf_stats_v2 { + struct oce_port_rxf_stats_v2 port[4]; + uint32_t rsvd0[2]; + uint32_t rx_drops_no_pbuf; + uint32_t rx_drops_no_txpb; + uint32_t rx_drops_no_erx_descr; + uint32_t rx_drops_no_tpre_descr; + uint32_t rsvd1[6]; + uint32_t rx_drops_too_many_frags; + uint32_t rx_drops_invalid_ring; + uint32_t forwarded_packets; + uint32_t rx_drops_mtu; + uint32_t rsvd2[35]; +}; struct oce_rxf_stats_v1 { struct oce_port_rxf_stats_v1 port[4]; @@ -3062,6 +3155,11 @@ struct oce_rxf_stats_v1 { uint32_t rsvd2[14]; }; +struct oce_erx_stats_v2 { + uint32_t rx_drops_no_fragments[136]; + uint32_t rsvd[3]; +}; + struct oce_erx_stats_v1 { uint32_t rx_drops_no_fragments[68]; uint32_t rsvd[4]; @@ -3078,6 +3176,15 @@ struct oce_pmem_stats { uint32_t rsvd[5]; }; +struct oce_hw_stats_v2 { + struct oce_rxf_stats_v2 rxf; + uint32_t rsvd0[OCE_TXP_SW_SZ]; + struct oce_erx_stats_v2 erx; + struct oce_pmem_stats pmem; + uint32_t rsvd1[18]; +}; + + struct oce_hw_stats_v1 { struct oce_rxf_stats_v1 rxf; uint32_t rsvd0[OCE_TXP_SW_SZ]; @@ -3093,32 +3200,22 @@ struct oce_hw_stats_v0 { struct oce_pmem_stats pmem; }; -struct mbx_get_nic_stats_v0 { - struct mbx_hdr hdr; - union { - struct { - uint32_t rsvd0; - } req; - - union { - struct oce_hw_stats_v0 stats; - } rsp; - } params; -}; - -struct mbx_get_nic_stats { - struct mbx_hdr hdr; - union { - struct { - uint32_t rsvd0; - } req; - - struct { - struct oce_hw_stats_v1 stats; - } rsp; - } params; -}; - +#define MBX_GET_NIC_STATS(version) \ + struct mbx_get_nic_stats_v##version { \ + struct mbx_hdr hdr; \ + union { \ + struct { \ + uint32_t rsvd0; \ + } req; \ + union { \ + struct oce_hw_stats_v##version stats; \ + } rsp; \ + } params; \ +} + +MBX_GET_NIC_STATS(0); +MBX_GET_NIC_STATS(1); +MBX_GET_NIC_STATS(2); /* [18(0x12)] NIC_GET_PPORT_STATS */ struct pport_stats { @@ -3728,3 +3825,373 @@ enum OCE_QUEUE_RX_STATS { QUEUE_RX_BUFFER_ERRORS = 8, QUEUE_RX_N_WORDS = 10 }; + +/* HW LRO structures */ +struct mbx_nic_query_lro_capabilities { + struct mbx_hdr hdr; + union { + struct { + uint32_t rsvd[6]; + } req; + struct { +#ifdef _BIG_ENDIAN + uint32_t lro_flags; + uint16_t lro_rq_cnt; + uint16_t plro_max_offload; + uint32_t rsvd[4]; +#else + uint32_t lro_flags; + uint16_t plro_max_offload; + uint16_t lro_rq_cnt; + uint32_t rsvd[4]; +#endif + } rsp; + } params; +}; + +struct mbx_nic_set_iface_lro_config { + struct mbx_hdr hdr; + union { + struct { +#ifdef _BIG_ENDIAN + uint32_t lro_flags; + uint32_t iface_id; + uint32_t max_clsc_byte_cnt; + uint32_t max_clsc_seg_cnt; + uint32_t max_clsc_usec_delay; + uint32_t min_clsc_frame_byte_cnt; + uint32_t rsvd[2]; +#else + uint32_t lro_flags; + uint32_t iface_id; + uint32_t max_clsc_byte_cnt; + uint32_t max_clsc_seg_cnt; + uint32_t max_clsc_usec_delay; + uint32_t min_clsc_frame_byte_cnt; + uint32_t rsvd[2]; +#endif + } req; + struct { +#ifdef _BIG_ENDIAN + uint32_t lro_flags; + uint32_t rsvd[7]; +#else + uint32_t lro_flags; + uint32_t rsvd[7]; +#endif + } rsp; + } params; +}; + + +struct mbx_create_nic_rq_v2 { + struct mbx_hdr hdr; + union { + struct { +#ifdef _BIG_ENDIAN + uint8_t num_pages; + uint8_t frag_size; + uint16_t cq_id; + + uint32_t if_id; + + uint16_t page_size; + uint16_t max_frame_size; + + uint16_t rsvd; + uint16_t pd_id; + + uint16_t rsvd1; + uint16_t rq_flags; + + uint16_t hds_fixed_offset; + uint8_t hds_start; + uint8_t hds_frag; + + uint16_t hds_backfill_size; + uint16_t hds_frag_size; + + uint32_t rbq_id; + + uint32_t rsvd2[8]; + + struct phys_addr pages[2]; +#else + uint16_t cq_id; + uint8_t frag_size; + uint8_t num_pages; + + uint32_t if_id; + + uint16_t max_frame_size; + uint16_t page_size; + + uint16_t pd_id; + uint16_t rsvd; + + uint16_t rq_flags; + uint16_t rsvd1; + + uint8_t hds_frag; + uint8_t hds_start; + uint16_t hds_fixed_offset; + + uint16_t hds_frag_size; + uint16_t hds_backfill_size; + + uint32_t rbq_id; + + uint32_t rsvd2[8]; + + struct phys_addr pages[2]; +#endif + } req; + struct { +#ifdef _BIG_ENDIAN + uint8_t rsvd0; + uint8_t rss_cpuid; + uint16_t rq_id; + + uint8_t db_format; + uint8_t db_reg_set; + uint16_t rsvd1; + + uint32_t db_offset; + + uint32_t rsvd2; + + uint16_t rsvd3; + uint16_t rq_flags; + +#else + uint16_t rq_id; + uint8_t rss_cpuid; + uint8_t rsvd0; + + uint16_t rsvd1; + uint8_t db_reg_set; + uint8_t db_format; + + uint32_t db_offset; + + uint32_t rsvd2; + + uint16_t rq_flags; + uint16_t rsvd3; +#endif + } rsp; + + } params; +}; + +struct mbx_delete_nic_rq_v1 { + struct mbx_hdr hdr; + union { + struct { +#ifdef _BIG_ENDIAN + uint16_t bypass_flush; + uint16_t rq_id; + uint16_t rsvd; + uint16_t rq_flags; +#else + uint16_t rq_id; + uint16_t bypass_flush; + uint16_t rq_flags; + uint16_t rsvd; +#endif + } req; + struct { + uint32_t rsvd[2]; + } rsp; + } params; +}; + +struct nic_hwlro_singleton_cqe { +#ifdef _BIG_ENDIAN + /* dw 0 */ + uint32_t ip_opt:1; + uint32_t vtp:1; + uint32_t pkt_size:14; + uint32_t vlan_tag:16; + + /* dw 1 */ + uint32_t num_frags:3; + uint32_t rsvd1:3; + uint32_t frag_index:10; + uint32_t rsvd:8; + uint32_t ipv6_frame:1; + uint32_t l4_cksum_pass:1; + uint32_t ip_cksum_pass:1; + uint32_t udpframe:1; + uint32_t tcpframe:1; + uint32_t ipframe:1; + uint32_t rss_hp:1; + uint32_t error:1; + + /* dw 2 */ + uint32_t valid:1; + uint32_t cqe_type:2; + uint32_t debug:7; + uint32_t rsvd4:6; + uint32_t data_offset:8; + uint32_t rsvd3:3; + uint32_t rss_bank:1; + uint32_t qnq:1; + uint32_t rsvd2:3; + + /* dw 3 */ + uint32_t rss_hash_value; +#else + /* dw 0 */ + uint32_t vlan_tag:16; + uint32_t pkt_size:14; + uint32_t vtp:1; + uint32_t ip_opt:1; + + /* dw 1 */ + uint32_t error:1; + uint32_t rss_hp:1; + uint32_t ipframe:1; + uint32_t tcpframe:1; + uint32_t udpframe:1; + uint32_t ip_cksum_pass:1; + uint32_t l4_cksum_pass:1; + uint32_t ipv6_frame:1; + uint32_t rsvd:8; + uint32_t frag_index:10; + uint32_t rsvd1:3; + uint32_t num_frags:3; + + /* dw 2 */ + uint32_t rsvd2:3; + uint32_t qnq:1; + uint32_t rss_bank:1; + uint32_t rsvd3:3; + uint32_t data_offset:8; + uint32_t rsvd4:6; + uint32_t debug:7; + uint32_t cqe_type:2; + uint32_t valid:1; + + /* dw 3 */ + uint32_t rss_hash_value; +#endif +}; + +struct nic_hwlro_cqe_part1 { +#ifdef _BIG_ENDIAN + /* dw 0 */ + uint32_t tcp_timestamp_val; + + /* dw 1 */ + uint32_t tcp_timestamp_ecr; + + /* dw 2 */ + uint32_t valid:1; + uint32_t cqe_type:2; + uint32_t rsvd3:7; + uint32_t rss_policy:4; + uint32_t rsvd2:2; + uint32_t data_offset:8; + uint32_t rsvd1:1; + uint32_t lro_desc:1; + uint32_t lro_timer_pop:1; + uint32_t rss_bank:1; + uint32_t qnq:1; + uint32_t rsvd:2; + uint32_t rss_flush:1; + + /* dw 3 */ + uint32_t rss_hash_value; +#else + /* dw 0 */ + uint32_t tcp_timestamp_val; + + /* dw 1 */ + uint32_t tcp_timestamp_ecr; + + /* dw 2 */ + uint32_t rss_flush:1; + uint32_t rsvd:2; + uint32_t qnq:1; + uint32_t rss_bank:1; + uint32_t lro_timer_pop:1; + uint32_t lro_desc:1; + uint32_t rsvd1:1; + uint32_t data_offset:8; + uint32_t rsvd2:2; + uint32_t rss_policy:4; + uint32_t rsvd3:7; + uint32_t cqe_type:2; + uint32_t valid:1; + + /* dw 3 */ + uint32_t rss_hash_value; +#endif +}; + +struct nic_hwlro_cqe_part2 { +#ifdef _BIG_ENDIAN + /* dw 0 */ + uint32_t ip_opt:1; + uint32_t vtp:1; + uint32_t pkt_size:14; + uint32_t vlan_tag:16; + + /* dw 1 */ + uint32_t tcp_window:16; + uint32_t coalesced_size:16; + + /* dw 2 */ + uint32_t valid:1; + uint32_t cqe_type:2; + uint32_t rsvd:2; + uint32_t push:1; + uint32_t ts_opt:1; + uint32_t threshold:1; + uint32_t seg_cnt:8; + uint32_t frame_lifespan:8; + uint32_t ipv6_frame:1; + uint32_t l4_cksum_pass:1; + uint32_t ip_cksum_pass:1; + uint32_t udpframe:1; + uint32_t tcpframe:1; + uint32_t ipframe:1; + uint32_t rss_hp:1; + uint32_t error:1; + + /* dw 3 */ + uint32_t tcp_ack_num; +#else + /* dw 0 */ + uint32_t vlan_tag:16; + uint32_t pkt_size:14; + uint32_t vtp:1; + uint32_t ip_opt:1; + + /* dw 1 */ + uint32_t coalesced_size:16; + uint32_t tcp_window:16; + + /* dw 2 */ + uint32_t error:1; + uint32_t rss_hp:1; + uint32_t ipframe:1; + uint32_t tcpframe:1; + uint32_t udpframe:1; + uint32_t ip_cksum_pass:1; + uint32_t l4_cksum_pass:1; + uint32_t ipv6_frame:1; + uint32_t frame_lifespan:8; + uint32_t seg_cnt:8; + uint32_t threshold:1; + uint32_t ts_opt:1; + uint32_t push:1; + uint32_t rsvd:2; + uint32_t cqe_type:2; + uint32_t valid:1; + + /* dw 3 */ + uint32_t tcp_ack_num; +#endif +}; Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Thu Sep 22 21:34:35 2016 (r306218) +++ head/sys/dev/oce/oce_if.c Thu Sep 22 22:51:11 2016 (r306219) @@ -42,77 +42,92 @@ #include "opt_inet.h" #include "oce_if.h" +#include "oce_user.h" + +#define is_tso_pkt(m) (m->m_pkthdr.csum_flags & CSUM_TSO) /* UE Status Low CSR */ static char *ue_status_low_desc[] = { - "CEV", - "CTX", - "DBUF", - "ERX", - "Host", - "MPU", - "NDMA", - "PTC ", - "RDMA ", - "RXF ", - "RXIPS ", - "RXULP0 ", - "RXULP1 ", - "RXULP2 ", - "TIM ", - "TPOST ", - "TPRE ", - "TXIPS ", - "TXULP0 ", - "TXULP1 ", - "UC ", - "WDMA ", - "TXULP2 ", - "HOST1 ", - "P0_OB_LINK ", - "P1_OB_LINK ", - "HOST_GPIO ", - "MBOX ", - "AXGMAC0", - "AXGMAC1", - "JTAG", - "MPU_INTPEND" + "CEV", + "CTX", + "DBUF", + "ERX", + "Host", + "MPU", + "NDMA", + "PTC ", + "RDMA ", + "RXF ", + "RXIPS ", + "RXULP0 ", + "RXULP1 ", + "RXULP2 ", + "TIM ", + "TPOST ", + "TPRE ", + "TXIPS ", + "TXULP0 ", + "TXULP1 ", + "UC ", + "WDMA ", + "TXULP2 ", + "HOST1 ", + "P0_OB_LINK ", + "P1_OB_LINK ", + "HOST_GPIO ", + "MBOX ", + "AXGMAC0", + "AXGMAC1", + "JTAG", + "MPU_INTPEND" }; /* UE Status High CSR */ static char *ue_status_hi_desc[] = { - "LPCMEMHOST", - "MGMT_MAC", - "PCS0ONLINE", - "MPU_IRAM", - "PCS1ONLINE", - "PCTL0", - "PCTL1", - "PMEM", - "RR", - "TXPB", - "RXPP", - "XAUI", - "TXP", - "ARM", - "IPC", - "HOST2", - "HOST3", - "HOST4", - "HOST5", - "HOST6", - "HOST7", - "HOST8", - "HOST9", - "NETC", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown", - "Unknown" + "LPCMEMHOST", + "MGMT_MAC", + "PCS0ONLINE", + "MPU_IRAM", + "PCS1ONLINE", + "PCTL0", + "PCTL1", + "PMEM", + "RR", + "TXPB", + "RXPP", + "XAUI", + "TXP", + "ARM", + "IPC", + "HOST2", + "HOST3", + "HOST4", + "HOST5", + "HOST6", + "HOST7", + "HOST8", + "HOST9", + "NETC", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown" +}; + +struct oce_common_cqe_info{ + uint8_t vtp:1; + uint8_t l4_cksum_pass:1; + uint8_t ip_cksum_pass:1; + uint8_t ipv6_frame:1; + uint8_t qnq:1; + uint8_t rsvd:3; + uint8_t num_frags; + uint16_t pkt_size; + uint16_t vtag; }; @@ -140,17 +155,19 @@ static int oce_media_change(struct ifne /* Transmit routines prototypes */ static int oce_tx(POCE_SOFTC sc, struct mbuf **mpp, int wq_index); static void oce_tx_restart(POCE_SOFTC sc, struct oce_wq *wq); -static void oce_tx_complete(struct oce_wq *wq, uint32_t wqe_idx, - uint32_t status); +static void oce_process_tx_completion(struct oce_wq *wq); static int oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq); /* Receive routines prototypes */ -static void oce_discard_rx_comp(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); static int oce_cqe_vtp_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); static int oce_cqe_portid_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe); -static void oce_rx(struct oce_rq *rq, uint32_t rqe_idx, - struct oce_nic_rx_cqe *cqe); +static void oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe); +static void oce_check_rx_bufs(POCE_SOFTC sc, uint32_t num_cqes, struct oce_rq *rq); +static uint16_t oce_rq_handler_lro(void *arg); +static void oce_correct_header(struct mbuf *m, struct nic_hwlro_cqe_part1 *cqe1, struct nic_hwlro_cqe_part2 *cqe2); +static void oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singleton_cqe *cqe, struct nic_hwlro_cqe_part2 *cqe2); +static void oce_rx_mbuf_chain(struct oce_rq *rq, struct oce_common_cqe_info *cqe_info, struct mbuf **m); /* Helper function prototypes in this file */ static int oce_attach_ifp(POCE_SOFTC sc); @@ -169,11 +186,12 @@ static void process_link_state(POCE_SOFT static int oce_tx_asic_stall_verify(POCE_SOFTC sc, struct mbuf *m); static void oce_get_config(POCE_SOFTC sc); static struct mbuf *oce_insert_vlan_tag(POCE_SOFTC sc, struct mbuf *m, boolean_t *complete); +static void oce_read_env_variables(POCE_SOFTC sc); + /* IP specific */ #if defined(INET6) || defined(INET) static int oce_init_lro(POCE_SOFTC sc); -static void oce_rx_flush_lro(struct oce_rq *rq); static struct mbuf * oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp); #endif @@ -206,7 +224,7 @@ const char component_revision[32] = {"// /* Module capabilites and parameters */ uint32_t oce_max_rsp_handled = OCE_MAX_RSP_HANDLED; uint32_t oce_enable_rss = OCE_MODCAP_RSS; - +uint32_t oce_rq_buf_size = 2048; TUNABLE_INT("hw.oce.max_rsp_handled", &oce_max_rsp_handled); TUNABLE_INT("hw.oce.enable_rss", &oce_enable_rss); @@ -222,8 +240,10 @@ static uint32_t supportedDevices[] = { (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_SH }; +POCE_SOFTC softc_head = NULL; +POCE_SOFTC softc_tail = NULL; - +struct oce_rdma_if *oce_rdma_if = NULL; /***************************************************************************** * Driver entry points functions * @@ -292,7 +312,8 @@ oce_attach(device_t dev) sc->tx_ring_size = OCE_TX_RING_SIZE; sc->rx_ring_size = OCE_RX_RING_SIZE; - sc->rq_frag_size = OCE_RQ_BUF_SIZE; + /* receive fragment size should be multiple of 2K */ + sc->rq_frag_size = ((oce_rq_buf_size / 2048) * 2048); sc->flow_control = OCE_DEFAULT_FLOW_CONTROL; sc->promisc = OCE_DEFAULT_PROMISCUOUS; @@ -304,6 +325,8 @@ oce_attach(device_t dev) if (rc) goto pci_res_free; + oce_read_env_variables(sc); + oce_get_config(sc); setup_max_queues_want(sc); @@ -341,11 +364,19 @@ oce_attach(device_t dev) oce_add_sysctls(sc); - callout_init(&sc->timer, 1); + callout_init(&sc->timer, CALLOUT_MPSAFE); rc = callout_reset(&sc->timer, 2 * hz, oce_local_timer, sc); if (rc) goto stats_free; + sc->next =NULL; + if (softc_tail != NULL) { + softc_tail->next = sc; + } else { + softc_head = sc; + } + softc_tail = sc; + return 0; stats_free: @@ -383,6 +414,22 @@ static int oce_detach(device_t dev) { POCE_SOFTC sc = device_get_softc(dev); + POCE_SOFTC poce_sc_tmp, *ppoce_sc_tmp1, poce_sc_tmp2 = NULL; + + poce_sc_tmp = softc_head; + ppoce_sc_tmp1 = &softc_head; + while (poce_sc_tmp != NULL) { + if (poce_sc_tmp == sc) { + *ppoce_sc_tmp1 = sc->next; + if (sc->next == NULL) { + softc_tail = poce_sc_tmp2; + } + break; + } + poce_sc_tmp2 = poce_sc_tmp; + ppoce_sc_tmp1 = &poce_sc_tmp->next; + poce_sc_tmp = poce_sc_tmp->next; + } LOCK(&sc->dev_lock); oce_if_deactivate(sc); @@ -520,8 +567,16 @@ oce_ioctl(struct ifnet *ifp, u_long comm oce_vid_config(sc); } #if defined(INET6) || defined(INET) - if (u & IFCAP_LRO) + if (u & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; + if(sc->enable_hwlro) { + if(ifp->if_capenable & IFCAP_LRO) { + rc = oce_mbox_nic_set_iface_lro_config(sc, 1); + }else { + rc = oce_mbox_nic_set_iface_lro_config(sc, 0); + } + } + } #endif break; @@ -563,6 +618,9 @@ oce_multiq_start(struct ifnet *ifp, stru int queue_index = 0; int status = 0; + if (!sc->link_status) + return ENXIO; + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) queue_index = m->m_pkthdr.flowid % sc->nwqs; @@ -653,20 +711,41 @@ oce_setup_intr(POCE_SOFTC sc) { int rc = 0, use_intx = 0; int vector = 0, req_vectors = 0; + int tot_req_vectors, tot_vectors; if (is_rss_enabled(sc)) req_vectors = MAX((sc->nrqs - 1), sc->nwqs); else req_vectors = 1; - if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { + tot_req_vectors = req_vectors; + if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { + if (req_vectors > 1) { + tot_req_vectors += OCE_RDMA_VECTORS; + sc->roce_intr_count = OCE_RDMA_VECTORS; + } + } + + if (sc->flags & OCE_FLAGS_MSIX_CAPABLE) { sc->intr_count = req_vectors; - rc = pci_alloc_msix(sc->dev, &sc->intr_count); + tot_vectors = tot_req_vectors; + rc = pci_alloc_msix(sc->dev, &tot_vectors); if (rc != 0) { use_intx = 1; pci_release_msi(sc->dev); - } else - sc->flags |= OCE_FLAGS_USING_MSIX; + } else { + if (sc->rdma_flags & OCE_RDMA_FLAG_SUPPORTED) { + if (tot_vectors < tot_req_vectors) { + if (sc->intr_count < (2 * OCE_RDMA_VECTORS)) { + sc->roce_intr_count = (tot_vectors / 2); + } + sc->intr_count = tot_vectors - sc->roce_intr_count; + } + } else { + sc->intr_count = tot_vectors; + } + sc->flags |= OCE_FLAGS_USING_MSIX; + } } else use_intx = 1; @@ -854,6 +933,79 @@ oce_media_change(struct ifnet *ifp) } +static void oce_is_pkt_dest_bmc(POCE_SOFTC sc, + struct mbuf *m, boolean_t *os2bmc, + struct mbuf **m_new) +{ + struct ether_header *eh = NULL; + + eh = mtod(m, struct ether_header *); + + if (!is_os2bmc_enabled(sc) || *os2bmc) { + *os2bmc = FALSE; + goto done; + } + if (!ETHER_IS_MULTICAST(eh->ether_dhost)) + goto done; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 22 23:22:55 2016 Return-Path: Delivered-To: svn-src-all@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 011D3BE614B; Thu, 22 Sep 2016 23:22:55 +0000 (UTC) (envelope-from markj@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 C2DA9AFE; Thu, 22 Sep 2016 23:22:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MNMr5O046368; Thu, 22 Sep 2016 23:22:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MNMrxG046367; Thu, 22 Sep 2016 23:22:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609222322.u8MNMrxG046367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 22 Sep 2016 23:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306220 - head/sys/cddl/dev/systrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 23:22:55 -0000 Author: markj Date: Thu Sep 22 23:22:53 2016 New Revision: 306220 URL: https://svnweb.freebsd.org/changeset/base/306220 Log: Re-check the systrace probe ID before calling dtrace_probe(). Otherwise there exists a narrow window during which a syscall probe can be disabled and cause a concurrently-running thread to call dtrace_probe() with an invalid probe ID. Reported by: ngie MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/cddl/dev/systrace/systrace.c Modified: head/sys/cddl/dev/systrace/systrace.c ============================================================================== --- head/sys/cddl/dev/systrace/systrace.c Thu Sep 22 22:51:11 2016 (r306219) +++ head/sys/cddl/dev/systrace/systrace.c Thu Sep 22 23:22:53 2016 (r306220) @@ -193,7 +193,8 @@ systrace_probe(struct syscall_args *sa, memset(uargs, 0, sizeof(uargs)); if (type == SYSTRACE_ENTRY) { - id = sa->callp->sy_entry; + if ((id = sa->callp->sy_entry) == DTRACE_IDNONE) + return; if (sa->callp->sy_systrace_args_func != NULL) /* @@ -215,7 +216,8 @@ systrace_probe(struct syscall_args *sa, */ curthread->t_dtrace_systrace_args = uargs; } else { - id = sa->callp->sy_return; + if ((id = sa->callp->sy_return) == DTRACE_IDNONE) + return; curthread->t_dtrace_systrace_args = NULL; /* Set arg0 and arg1 as the return value of this syscall. */ From owner-svn-src-all@freebsd.org Fri Sep 23 01:50:54 2016 Return-Path: Delivered-To: svn-src-all@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 48A2FBE5E3F; Fri, 23 Sep 2016 01:50:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) (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 0469F914; Fri, 23 Sep 2016 01:50:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x235.google.com with SMTP id l91so46368666qte.3; Thu, 22 Sep 2016 18:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CtFqpgovbPg8r+eomiMB4YSRTUKYG5Ysn3q6AhinNHM=; b=KnGRvnJNOAw46AUfB3kCIRxI6Pb6Up80BvU8FVKNq+goMQMzYnAgpAu9f6+MW3o1VN izhmNeQ7Wzg6OAK7lPyKUvA/344ECYRtJr00JdRIbvM/weEgZcGftkYcAKgCZgNSDJ7i xHvtIjgvuy7V7GhJHJ2PAcCQqOD7IDoRANadyGKEd+K3KiQSjxZgfloTdbDPXt2WfP/3 Fnh2LGMVn5RnYKIbtwO0FdYDs3ghAL2VXCnQ3x+O0jWDMpWcGglZbzCJx1uo41y6MWO/ vmIKaGB4K0/4/U0I4cxehgLbrfol9Vo8N2/SwGZa1q944UDUapXu2MU/j/TMRRnrNpc0 /d2A== 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=CtFqpgovbPg8r+eomiMB4YSRTUKYG5Ysn3q6AhinNHM=; b=Bnzipib7cI8k7X1OuFj1b5gUtq7yhuk5XMYe6IUAZJuZZrIIyj9zI6ZCIglVLwWRf5 FLyZ3Lrk5ftjm38byEttY0HwiuXO1ZQmImmMda9gkDmHUeB+Jc9ICaLkPYgeO8NlbQki S+xFdiwUSg7t2yZPi8ezCSGDGPeGKYKwn95+bNpWys27OU9PxmHsITHKa6B6wI7hvHhW 1rebeRVqMXDDZYfWZsgVDQS79l/Wl7iiKzW6C9XAqWJ93N3ZeQ15F7W7GSZ/03qtKS+i 9qv9GSesoUMzTKXjxY9tj39TkT48m5VlZZRgmjvEdGrUQk6lrrpA0GaTvxYUFgnB4vKF 4N/w== X-Gm-Message-State: AA6/9RmxfATi0KnGN+Zavjml2Py9q0xisgTfGZfousV/zEuuJTG6PYOtyYCXmTnrSFRazFb4pnd8iXG/NbBZNw== X-Received: by 10.200.33.183 with SMTP id 52mr5330085qty.128.1474595452922; Thu, 22 Sep 2016 18:50:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.88.198 with HTTP; Thu, 22 Sep 2016 18:50:52 -0700 (PDT) In-Reply-To: <201609222322.u8MNMrxG046367@repo.freebsd.org> References: <201609222322.u8MNMrxG046367@repo.freebsd.org> From: Ngie Cooper Date: Thu, 22 Sep 2016 18:50:52 -0700 Message-ID: Subject: Re: svn commit: r306220 - head/sys/cddl/dev/systrace To: Mark Johnston Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 01:50:54 -0000 On Thu, Sep 22, 2016 at 4:22 PM, Mark Johnston wrote: > Author: markj > Date: Thu Sep 22 23:22:53 2016 > New Revision: 306220 > URL: https://svnweb.freebsd.org/changeset/base/306220 > > Log: > Re-check the systrace probe ID before calling dtrace_probe(). > > Otherwise there exists a narrow window during which a syscall probe can be > disabled and cause a concurrently-running thread to call dtrace_probe() > with an invalid probe ID. > > Reported by: ngie > MFC after: 1 week > Sponsored by: Dell EMC Isilon Thanks Mark :)! From owner-svn-src-all@freebsd.org Fri Sep 23 01:52:07 2016 Return-Path: Delivered-To: svn-src-all@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 BE775BE5F25; Fri, 23 Sep 2016 01:52:07 +0000 (UTC) (envelope-from emaste@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 7E24CC2A; Fri, 23 Sep 2016 01:52:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N1q6ox001864; Fri, 23 Sep 2016 01:52:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N1q6D6001863; Fri, 23 Sep 2016 01:52:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609230152.u8N1q6D6001863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Sep 2016 01:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306222 - stable/9/usr.bin/bsdiff/bspatch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 01:52:07 -0000 Author: emaste Date: Fri Sep 23 01:52:06 2016 New Revision: 306222 URL: https://svnweb.freebsd.org/changeset/base/306222 Log: MFC bspatch Capsicumization and improvements r304691: bspatch: apply style(9) Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. r304807 (allanjude): Capsicumize bspatch Move all of the fopen() and open() calls to the top of main() Restrict each FD to least privilege (read/seek only, write only, etc) cap_enter(), and make all except the output FD read/seek only. r304821: bspatch: remove output file in the case of error r305486: bspatch: add sanity checks on sizes to avoid integer overflow Note that this introduces an explicit 2GB limit, but this was already implicit in variable and function argument types. This is based on the "non-cryptanalytic attacks against freebsd update components" anonymous gist. Further refinement is planned. r305737: bspatch: remove superfluous newlines from errx strings r305822: bspatch: use #define for header size instead of magic number r306026: bspatch: Remove backwards-compatibility sys/capability.h support bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic. Modified: stable/9/usr.bin/bsdiff/bspatch/bspatch.c Directory Properties: stable/9/usr.bin/bsdiff/ (props changed) Modified: stable/9/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/9/usr.bin/bsdiff/bspatch/bspatch.c Thu Sep 22 23:54:58 2016 (r306221) +++ stable/9/usr.bin/bsdiff/bspatch/bspatch.c Fri Sep 23 01:52:06 2016 (r306222) @@ -27,34 +27,60 @@ #include __FBSDID("$FreeBSD$"); +#if defined(__FreeBSD__) +#include +#if __FreeBSD_version >= 1001511 +#include +#define HAVE_CAPSICUM +#endif +#endif + #include -#include +#include +#include +#include +#include +#include +#include #include +#include #include -#include #include -#include #ifndef O_BINARY #define O_BINARY 0 #endif +#define HEADER_SIZE 32 + +static char *newfile; +static int dirfd = -1; + +static void +exit_cleanup(void) +{ + + if (dirfd != -1 && newfile != NULL) + if (unlinkat(dirfd, newfile, 0)) + warn("unlinkat"); +} static off_t offtin(u_char *buf) { off_t y; - y=buf[7]&0x7F; - y=y*256;y+=buf[6]; - y=y*256;y+=buf[5]; - y=y*256;y+=buf[4]; - y=y*256;y+=buf[3]; - y=y*256;y+=buf[2]; - y=y*256;y+=buf[1]; - y=y*256;y+=buf[0]; + y = buf[7] & 0x7F; + y = y * 256; y += buf[6]; + y = y * 256; y += buf[5]; + y = y * 256; y += buf[4]; + y = y * 256; y += buf[3]; + y = y * 256; y += buf[2]; + y = y * 256; y += buf[1]; + y = y * 256; y += buf[0]; - if(buf[7]&0x80) y=-y; + if (buf[7] & 0x80) + y = -y; - return y; + return (y); } static void @@ -65,20 +91,23 @@ usage(void) exit(1); } -int main(int argc,char * argv[]) +int main(int argc, char *argv[]) { - FILE * f, * cpf, * dpf, * epf; - BZFILE * cpfbz2, * dpfbz2, * epfbz2; + FILE *f, *cpf, *dpf, *epf; + BZFILE *cpfbz2, *dpfbz2, *epfbz2; + char *directory, *namebuf; int cbz2err, dbz2err, ebz2err; - int fd; - ssize_t oldsize,newsize; - ssize_t bzctrllen,bzdatalen; - u_char header[32],buf[8]; + int newfd, oldfd; + off_t oldsize, newsize; + off_t bzctrllen, bzdatalen; + u_char header[HEADER_SIZE], buf[8]; u_char *old, *new; - off_t oldpos,newpos; + off_t oldpos, newpos; off_t ctrl[3]; - off_t lenread; - off_t i; + off_t i, lenread, offset; +#ifdef HAVE_CAPSICUM + cap_rights_t rights_dir, rights_ro, rights_wr; +#endif if (argc != 4) usage(); @@ -86,6 +115,54 @@ int main(int argc,char * argv[]) /* Open patch file */ if ((f = fopen(argv[3], "rb")) == NULL) err(1, "fopen(%s)", argv[3]); + /* Open patch file for control block */ + if ((cpf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open patch file for diff block */ + if ((dpf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open patch file for extra block */ + if ((epf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); + /* open oldfile */ + if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) + err(1, "open(%s)", argv[1]); + /* open directory where we'll write newfile */ + if ((namebuf = strdup(argv[2])) == NULL || + (directory = dirname(namebuf)) == NULL || + (dirfd = open(directory, O_DIRECTORY)) < 0) + err(1, "open %s", argv[2]); + free(namebuf); + if ((newfile = basename(argv[2])) == NULL) + err(1, "basename"); + /* open newfile */ + if ((newfd = openat(dirfd, newfile, + O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666)) < 0) + err(1, "open(%s)", argv[2]); + atexit(exit_cleanup); + +#ifdef HAVE_CAPSICUM + if (cap_enter() < 0) { + /* Failed to sandbox, fatal if CAPABILITY_MODE enabled */ + if (errno != ENOSYS) + err(1, "failed to enter security sandbox"); + } else { + /* Capsicum Available */ + cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT, CAP_SEEK); + cap_rights_init(&rights_wr, CAP_WRITE); + cap_rights_init(&rights_dir, CAP_UNLINKAT); + + if (cap_rights_limit(fileno(f), &rights_ro) < 0 || + cap_rights_limit(fileno(cpf), &rights_ro) < 0 || + cap_rights_limit(fileno(dpf), &rights_ro) < 0 || + cap_rights_limit(fileno(epf), &rights_ro) < 0 || + cap_rights_limit(oldfd, &rights_ro) < 0 || + cap_rights_limit(newfd, &rights_wr) < 0 || + cap_rights_limit(dirfd, &rights_dir) < 0) + err(1, "cap_rights_limit() failed, could not restrict" + " capabilities"); + } +#endif /* File format: @@ -102,99 +179,99 @@ int main(int argc,char * argv[]) */ /* Read header */ - if (fread(header, 1, 32, f) < 32) { + if (fread(header, 1, HEADER_SIZE, f) < HEADER_SIZE) { if (feof(f)) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); err(1, "fread(%s)", argv[3]); } /* Check for appropriate magic */ if (memcmp(header, "BSDIFF40", 8) != 0) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Read lengths from header */ - bzctrllen=offtin(header+8); - bzdatalen=offtin(header+16); - newsize=offtin(header+24); - if((bzctrllen<0) || (bzdatalen<0) || (newsize<0)) - errx(1,"Corrupt patch\n"); + bzctrllen = offtin(header + 8); + bzdatalen = offtin(header + 16); + newsize = offtin(header + 24); + if (bzctrllen < 0 || bzctrllen > OFF_MAX - HEADER_SIZE || + bzdatalen < 0 || bzctrllen + HEADER_SIZE > OFF_MAX - bzdatalen || + newsize < 0 || newsize > SSIZE_MAX) + errx(1, "Corrupt patch"); /* Close patch file and re-open it via libbzip2 at the right places */ if (fclose(f)) err(1, "fclose(%s)", argv[3]); - if ((cpf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(cpf, 32, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)32); + offset = HEADER_SIZE; + if (fseeko(cpf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((cpfbz2 = BZ2_bzReadOpen(&cbz2err, cpf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", cbz2err); - if ((dpf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(dpf, 32 + bzctrllen, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)(32 + bzctrllen)); + offset += bzctrllen; + if (fseeko(dpf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((dpfbz2 = BZ2_bzReadOpen(&dbz2err, dpf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", dbz2err); - if ((epf = fopen(argv[3], "rb")) == NULL) - err(1, "fopen(%s)", argv[3]); - if (fseeko(epf, 32 + bzctrllen + bzdatalen, SEEK_SET)) - err(1, "fseeko(%s, %lld)", argv[3], - (long long)(32 + bzctrllen + bzdatalen)); + offset += bzdatalen; + if (fseeko(epf, offset, SEEK_SET)) + err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); if ((epfbz2 = BZ2_bzReadOpen(&ebz2err, epf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", ebz2err); - if(((fd=open(argv[1],O_RDONLY|O_BINARY,0))<0) || - ((oldsize=lseek(fd,0,SEEK_END))==-1) || - ((old=malloc(oldsize+1))==NULL) || - (lseek(fd,0,SEEK_SET)!=0) || - (read(fd,old,oldsize)!=oldsize) || - (close(fd)==-1)) err(1,"%s",argv[1]); - if((new=malloc(newsize+1))==NULL) err(1,NULL); - - oldpos=0;newpos=0; - while(newpos SSIZE_MAX || + (old = malloc(oldsize)) == NULL || + lseek(oldfd, 0, SEEK_SET) != 0 || + read(oldfd, old, oldsize) != oldsize || + close(oldfd) == -1) + err(1, "%s", argv[1]); + if ((new = malloc(newsize)) == NULL) + err(1, NULL); + + oldpos = 0; + newpos = 0; + while (newpos < newsize) { /* Read control data */ - for(i=0;i<=2;i++) { + for (i = 0; i <= 2; i++) { lenread = BZ2_bzRead(&cbz2err, cpfbz2, buf, 8); if ((lenread < 8) || ((cbz2err != BZ_OK) && (cbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); - ctrl[i]=offtin(buf); + errx(1, "Corrupt patch"); + ctrl[i] = offtin(buf); } /* Sanity-check */ - if ((ctrl[0] < 0) || (ctrl[1] < 0)) - errx(1,"Corrupt patch\n"); + if (ctrl[0] < 0 || ctrl[0] > INT_MAX || + ctrl[1] < 0 || ctrl[1] > INT_MAX) + errx(1, "Corrupt patch"); /* Sanity-check */ - if(newpos+ctrl[0]>newsize) - errx(1,"Corrupt patch\n"); + if (newpos + ctrl[0] > newsize) + errx(1, "Corrupt patch"); /* Read diff string */ lenread = BZ2_bzRead(&dbz2err, dpfbz2, new + newpos, ctrl[0]); if ((lenread < ctrl[0]) || ((dbz2err != BZ_OK) && (dbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Add old data to diff string */ - for(i=0;i=0) && (oldpos+i= 0) && (oldpos + i < oldsize)) + new[newpos + i] += old[oldpos + i]; /* Adjust pointers */ - newpos+=ctrl[0]; - oldpos+=ctrl[0]; + newpos += ctrl[0]; + oldpos += ctrl[0]; /* Sanity-check */ - if(newpos+ctrl[1]>newsize) - errx(1,"Corrupt patch\n"); + if (newpos + ctrl[1] > newsize) + errx(1, "Corrupt patch"); /* Read extra string */ lenread = BZ2_bzRead(&ebz2err, epfbz2, new + newpos, ctrl[1]); if ((lenread < ctrl[1]) || ((ebz2err != BZ_OK) && (ebz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Adjust pointers */ newpos+=ctrl[1]; @@ -209,12 +286,13 @@ int main(int argc,char * argv[]) err(1, "fclose(%s)", argv[3]); /* Write the new file */ - if(((fd=open(argv[2],O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))<0) || - (write(fd,new,newsize)!=newsize) || (close(fd)==-1)) - err(1,"%s",argv[2]); + if (write(newfd, new, newsize) != newsize || close(newfd) == -1) + err(1, "%s", argv[2]); + /* Disable atexit cleanup */ + newfile = NULL; free(new); free(old); - return 0; + return (0); } From owner-svn-src-all@freebsd.org Fri Sep 23 03:21:41 2016 Return-Path: Delivered-To: svn-src-all@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 9C87DBE5D42; Fri, 23 Sep 2016 03:21:41 +0000 (UTC) (envelope-from sephe@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 6BED0EDB; Fri, 23 Sep 2016 03:21:41 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N3Lemm035987; Fri, 23 Sep 2016 03:21:40 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N3Leqh035986; Fri, 23 Sep 2016 03:21:40 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609230321.u8N3Leqh035986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 23 Sep 2016 03:21:40 +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: r306223 - stable/11/sys/dev/hyperv/storvsc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 03:21:41 -0000 Author: sephe Date: Fri Sep 23 03:21:40 2016 New Revision: 306223 URL: https://svnweb.freebsd.org/changeset/base/306223 Log: MFC 306015 hyperv/storvsc: Fix SRB length setting. This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued us since 10.2-release. Reported by: many Sponsored by: Microsoft Modified: stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Sep 23 01:52:06 2016 (r306222) +++ stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Sep 23 03:21:40 2016 (r306223) @@ -751,7 +751,8 @@ hv_storvsc_io_request(struct hv_device * vstor_packet->flags |= REQUEST_COMPLETION_FLAG; - vstor_packet->u.vm_srb.length = VSTOR_PKT_SIZE; + vstor_packet->u.vm_srb.length = + sizeof(struct vmscsi_req) - vmscsi_size_delta; vstor_packet->u.vm_srb.sense_info_len = sense_buffer_size; From owner-svn-src-all@freebsd.org Fri Sep 23 04:45:13 2016 Return-Path: Delivered-To: svn-src-all@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 0E2C6BE5848; Fri, 23 Sep 2016 04:45:13 +0000 (UTC) (envelope-from mjg@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 D4A57EC8; Fri, 23 Sep 2016 04:45:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N4jCo1066603; Fri, 23 Sep 2016 04:45:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N4jCtK066601; Fri, 23 Sep 2016 04:45:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609230445.u8N4jCtK066601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 23 Sep 2016 04:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306224 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 04:45:13 -0000 Author: mjg Date: Fri Sep 23 04:45:11 2016 New Revision: 306224 URL: https://svnweb.freebsd.org/changeset/base/306224 Log: cache: get rid of the global lock Add a table of vnode locks and use them along with bucketlocks to provide concurrent modification support. The approach taken is to preserve the current behaviour of the namecache and just lock all relevant parts before any changes are made. Lookups still require the relevant bucket to be locked. Discussed with: kib Tested by: pho Modified: head/sys/kern/subr_witness.c head/sys/kern/vfs_cache.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Fri Sep 23 03:21:40 2016 (r306223) +++ head/sys/kern/subr_witness.c Fri Sep 23 04:45:11 2016 (r306224) @@ -625,7 +625,7 @@ static struct witness_order_list_entry o /* * VFS namecache */ - { "ncglobal", &lock_class_rw }, + { "ncvn", &lock_class_mtx_sleep }, { "ncbuc", &lock_class_rw }, { "vnode interlock", &lock_class_mtx_sleep }, { "ncneg", &lock_class_mtx_sleep }, Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Sep 23 03:21:40 2016 (r306223) +++ head/sys/kern/vfs_cache.c Fri Sep 23 04:45:11 2016 (r306224) @@ -151,21 +151,35 @@ struct namecache_ts { * name is located in the cache, it will be dropped. * * These locks are used (in the order in which they can be taken): - * NAME TYPE ROLE - * cache_lock rwlock global, needed for all modifications - * bucketlock rwlock for access to given hash bucket - * ncneg_mtx mtx negative entry LRU management + * NAME TYPE ROLE + * vnodelock mtx vnode lists and v_cache_dd field protection + * bucketlock rwlock for access to given set of hash buckets + * ncneg_mtx mtx negative entry LRU management * - * A name -> vnode lookup can be safely performed by either locking cache_lock - * or the relevant hash bucket. + * Additionally, ncneg_shrink_lock mtx is used to have at most one thread + * shrinking the LRU list. * - * ".." and vnode -> name lookups require cache_lock. + * It is legal to take multiple vnodelock and bucketlock locks. The locking + * order is lower address first. Both are recursive. * - * Modifications require both cache_lock and relevant bucketlock taken for - * writing. + * "." lookups are lockless. * - * Negative entry LRU management requires ncneg_mtx taken on top of either - * cache_lock or bucketlock. + * ".." and vnode -> name lookups require vnodelock. + * + * name -> vnode lookup requires the relevant bucketlock to be held for reading. + * + * Insertions and removals of entries require involved vnodes and bucketlocks + * to be write-locked to prevent other threads from seeing the entry. + * + * Some lookups result in removal of the found entry (e.g. getting rid of a + * negative entry with the intent to create a positive one), which poses a + * problem when multiple threads reach the state. Similarly, two different + * threads can purge two different vnodes and try to remove the same name. + * + * If the already held vnode lock is lower than the second required lock, we + * can just take the other lock. However, in the opposite case, this could + * deadlock. As such, this is resolved by trylocking and if that fails unlocking + * the first node, locking everything in order and revalidating the state. */ /* @@ -196,15 +210,9 @@ SYSCTL_UINT(_vfs, OID_AUTO, ncsizefactor struct nchstats nchstats; /* cache effectiveness statistics */ -static struct rwlock cache_lock; -RW_SYSINIT(vfscache, &cache_lock, "ncglobal"); - -#define CACHE_TRY_WLOCK() rw_try_wlock(&cache_lock) -#define CACHE_UPGRADE_LOCK() rw_try_upgrade(&cache_lock) -#define CACHE_RLOCK() rw_rlock(&cache_lock) -#define CACHE_RUNLOCK() rw_runlock(&cache_lock) -#define CACHE_WLOCK() rw_wlock(&cache_lock) -#define CACHE_WUNLOCK() rw_wunlock(&cache_lock) +static struct mtx ncneg_shrink_lock; +MTX_SYSINIT(vfscache_shrink_neg, &ncneg_shrink_lock, "Name Cache shrink neg", + MTX_DEF); static struct mtx_padalign ncneg_mtx; MTX_SYSINIT(vfscache_neg, &ncneg_mtx, "ncneg", MTX_DEF); @@ -214,6 +222,19 @@ static struct rwlock_padalign *bucketlo #define HASH2BUCKETLOCK(hash) \ ((struct rwlock *)(&bucketlocks[((hash) % numbucketlocks)])) +static u_int numvnodelocks; +static struct mtx *vnodelocks; +static inline struct mtx * +VP2VNODELOCK(struct vnode *vp) +{ + struct mtx *vlp; + + if (vp == NULL) + return (NULL); + vlp = &vnodelocks[(((uintptr_t)(vp) >> 8) % numvnodelocks)]; + return (vlp); +} + /* * UMA zones for the VFS cache. * @@ -329,19 +350,49 @@ STATNODE_COUNTER(numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE_COUNTER(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); STATNODE_COUNTER(numfullpathfound, "Number of successful fullpath calls"); -static long numupgrades; STATNODE_ULONG(numupgrades, - "Number of updates of the cache after lookup (write lock + retry)"); static long zap_and_exit_bucket_fail; STATNODE_ULONG(zap_and_exit_bucket_fail, - "Number of times bucketlocked zap_and_exit case failed to writelock"); + "Number of times zap_and_exit failed to lock"); +static long cache_lock_vnodes_cel_3_failures; +STATNODE_ULONG(cache_lock_vnodes_cel_3_failures, + "Number of times 3-way vnode locking failed"); -static void cache_zap(struct namecache *ncp); -static int vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf, - u_int *buflen); +static void cache_zap_locked(struct namecache *ncp, bool neg_locked); static int vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, u_int buflen); static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); +static int cache_yield; +SYSCTL_INT(_vfs_cache, OID_AUTO, yield, CTLFLAG_RD, &cache_yield, 0, + "Number of times cache called yield"); + +static void +cache_maybe_yield(void) +{ + + if (should_yield()) { + cache_yield++; + kern_yield(PRI_USER); + } +} + +static inline void +cache_assert_vlp_locked(struct mtx *vlp) +{ + + if (vlp != NULL) + mtx_assert(vlp, MA_OWNED); +} + +static inline void +cache_assert_vnode_locked(struct vnode *vp) +{ + struct mtx *vlp; + + vlp = VP2VNODELOCK(vp); + cache_assert_vlp_locked(vlp); +} + static uint32_t cache_get_hash(char *name, u_char len, struct vnode *dvp) { @@ -352,21 +403,41 @@ cache_get_hash(char *name, u_char len, s return (hash); } +static inline struct rwlock * +NCP2BUCKETLOCK(struct namecache *ncp) +{ + uint32_t hash; + + hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen, ncp->nc_dvp); + return (HASH2BUCKETLOCK(hash)); +} + #ifdef INVARIANTS static void cache_assert_bucket_locked(struct namecache *ncp, int mode) { - struct rwlock *bucketlock; - uint32_t hash; + struct rwlock *blp; - hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen, ncp->nc_dvp); - bucketlock = HASH2BUCKETLOCK(hash); - rw_assert(bucketlock, mode); + blp = NCP2BUCKETLOCK(ncp); + rw_assert(blp, mode); } #else #define cache_assert_bucket_locked(x, y) do { } while (0) #endif +#define cache_sort(x, y) _cache_sort((void **)(x), (void **)(y)) +static void +_cache_sort(void **p1, void **p2) +{ + void *tmp; + + if (*p1 > *p2) { + tmp = *p2; + *p2 = *p1; + *p1 = tmp; + } +} + static void cache_lock_all_buckets(void) { @@ -385,6 +456,56 @@ cache_unlock_all_buckets(void) rw_wunlock(&bucketlocks[i]); } +static void +cache_lock_all_vnodes(void) +{ + u_int i; + + for (i = 0; i < numvnodelocks; i++) + mtx_lock(&vnodelocks[i]); +} + +static void +cache_unlock_all_vnodes(void) +{ + u_int i; + + for (i = 0; i < numvnodelocks; i++) + mtx_unlock(&vnodelocks[i]); +} + +static int +cache_trylock_vnodes(struct mtx *vlp1, struct mtx *vlp2) +{ + + cache_sort(&vlp1, &vlp2); + MPASS(vlp2 != NULL); + + if (vlp1 != NULL) { + if (!mtx_trylock(vlp1)) + return (EAGAIN); + } + if (!mtx_trylock(vlp2)) { + if (vlp1 != NULL) + mtx_unlock(vlp1); + return (EAGAIN); + } + + return (0); +} + +static void +cache_unlock_vnodes(struct mtx *vlp1, struct mtx *vlp2) +{ + + MPASS(vlp1 != NULL || vlp2 != NULL); + + if (vlp1 != NULL) + mtx_unlock(vlp1); + if (vlp2 != NULL) + mtx_unlock(vlp2); +} + static int sysctl_nchstats(SYSCTL_HANDLER_ARGS) { @@ -426,9 +547,9 @@ retry: if (req->oldptr == NULL) return SYSCTL_OUT(req, 0, n_nchash * sizeof(int)); cntbuf = malloc(n_nchash * sizeof(int), M_TEMP, M_ZERO | M_WAITOK); - CACHE_RLOCK(); + cache_lock_all_buckets(); if (n_nchash != nchash + 1) { - CACHE_RUNLOCK(); + cache_unlock_all_buckets(); free(cntbuf, M_TEMP); goto retry; } @@ -436,7 +557,7 @@ retry: for (ncpp = nchashtbl, i = 0; i < n_nchash; ncpp++, i++) LIST_FOREACH(ncp, ncpp, nc_hash) cntbuf[i]++; - CACHE_RUNLOCK(); + cache_unlock_all_buckets(); for (error = 0, i = 0; i < n_nchash; i++) if ((error = SYSCTL_OUT(req, &cntbuf[i], sizeof(int))) != 0) break; @@ -459,7 +580,7 @@ sysctl_debug_hashstat_nchash(SYSCTL_HAND if (!req->oldptr) return SYSCTL_OUT(req, 0, 4 * sizeof(int)); - CACHE_RLOCK(); + cache_lock_all_buckets(); n_nchash = nchash + 1; /* nchash is max index, not count */ used = 0; maxlength = 0; @@ -476,7 +597,7 @@ sysctl_debug_hashstat_nchash(SYSCTL_HAND maxlength = count; } n_nchash = nchash + 1; - CACHE_RUNLOCK(); + cache_unlock_all_buckets(); pct = (used * 100) / (n_nchash / 100); error = SYSCTL_OUT(req, &n_nchash, sizeof(n_nchash)); if (error) @@ -504,6 +625,7 @@ static void cache_negative_hit(struct namecache *ncp) { + MPASS(ncp->nc_vp == NULL); mtx_lock(&ncneg_mtx); TAILQ_REMOVE(&ncneg, ncp, nc_dst); TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst); @@ -514,9 +636,8 @@ static void cache_negative_insert(struct namecache *ncp) { - rw_assert(&cache_lock, RA_WLOCKED); - cache_assert_bucket_locked(ncp, RA_WLOCKED); MPASS(ncp->nc_vp == NULL); + cache_assert_bucket_locked(ncp, RA_WLOCKED); mtx_lock(&ncneg_mtx); TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst); numneg++; @@ -524,43 +645,74 @@ cache_negative_insert(struct namecache * } static void -cache_negative_remove(struct namecache *ncp) +cache_negative_remove(struct namecache *ncp, bool neg_locked) { - rw_assert(&cache_lock, RA_WLOCKED); - cache_assert_bucket_locked(ncp, RA_WLOCKED); MPASS(ncp->nc_vp == NULL); - mtx_lock(&ncneg_mtx); + cache_assert_bucket_locked(ncp, RA_WLOCKED); + if (!neg_locked) + mtx_lock(&ncneg_mtx); + else + mtx_assert(&ncneg_mtx, MA_OWNED); TAILQ_REMOVE(&ncneg, ncp, nc_dst); numneg--; - mtx_unlock(&ncneg_mtx); + if (!neg_locked) + mtx_unlock(&ncneg_mtx); } -static struct namecache * +static void cache_negative_zap_one(void) { - struct namecache *ncp; + struct namecache *ncp, *ncp2; + struct mtx *dvlp; + struct rwlock *blp; + + if (!mtx_trylock(&ncneg_shrink_lock)) + return; - rw_assert(&cache_lock, RA_WLOCKED); + mtx_lock(&ncneg_mtx); ncp = TAILQ_FIRST(&ncneg); - KASSERT(ncp->nc_vp == NULL, ("ncp %p vp %p on ncneg", - ncp, ncp->nc_vp)); - cache_zap(ncp); - return (ncp); + if (ncp == NULL) { + mtx_unlock(&ncneg_mtx); + goto out; + } + MPASS(ncp->nc_vp == NULL); + dvlp = VP2VNODELOCK(ncp->nc_dvp); + blp = NCP2BUCKETLOCK(ncp); + mtx_unlock(&ncneg_mtx); + mtx_lock(dvlp); + rw_wlock(blp); + mtx_lock(&ncneg_mtx); + ncp2 = TAILQ_FIRST(&ncneg); + if (ncp != ncp2 || dvlp != VP2VNODELOCK(ncp2->nc_dvp) || + blp != NCP2BUCKETLOCK(ncp2) || ncp2->nc_vp != NULL) { + ncp = NULL; + goto out_unlock_all; + } + cache_zap_locked(ncp, true); +out_unlock_all: + mtx_unlock(&ncneg_mtx); + rw_wunlock(blp); + mtx_unlock(dvlp); +out: + mtx_unlock(&ncneg_shrink_lock); + cache_free(ncp); } /* - * cache_zap(): + * cache_zap_locked(): * * Removes a namecache entry from cache, whether it contains an actual * pointer to a vnode or if it is just a negative cache entry. */ static void -cache_zap_locked(struct namecache *ncp) +cache_zap_locked(struct namecache *ncp, bool neg_locked) { - rw_assert(&cache_lock, RA_WLOCKED); + cache_assert_vnode_locked(ncp->nc_vp); + cache_assert_vnode_locked(ncp->nc_dvp); cache_assert_bucket_locked(ncp, RA_WLOCKED); + CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp); if (ncp->nc_vp != NULL) { SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp, @@ -577,7 +729,7 @@ cache_zap_locked(struct namecache *ncp) LIST_REMOVE(ncp, nc_src); if (LIST_EMPTY(&ncp->nc_dvp->v_cache_src)) { ncp->nc_flag |= NCF_DVDROP; - numcachehv--; + atomic_subtract_rel_long(&numcachehv, 1); } } if (ncp->nc_vp) { @@ -585,24 +737,198 @@ cache_zap_locked(struct namecache *ncp) if (ncp == ncp->nc_vp->v_cache_dd) ncp->nc_vp->v_cache_dd = NULL; } else { - cache_negative_remove(ncp); + cache_negative_remove(ncp, neg_locked); } - numcache--; + atomic_subtract_rel_long(&numcache, 1); } static void -cache_zap(struct namecache *ncp) +cache_zap_negative_locked_vnode_kl(struct namecache *ncp, struct vnode *vp) { - struct rwlock *bucketlock; - uint32_t hash; + struct rwlock *blp; - rw_assert(&cache_lock, RA_WLOCKED); + MPASS(ncp->nc_dvp == vp); + MPASS(ncp->nc_vp == NULL); + cache_assert_vnode_locked(vp); - hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen, ncp->nc_dvp); - bucketlock = HASH2BUCKETLOCK(hash); - rw_wlock(bucketlock); - cache_zap_locked(ncp); - rw_wunlock(bucketlock); + blp = NCP2BUCKETLOCK(ncp); + rw_wlock(blp); + cache_zap_locked(ncp, false); + rw_wunlock(blp); +} + +static bool +cache_zap_locked_vnode_kl2(struct namecache *ncp, struct vnode *vp, + struct mtx **vlpp) +{ + struct mtx *pvlp, *vlp1, *vlp2, *to_unlock; + struct rwlock *blp; + + MPASS(vp == ncp->nc_dvp || vp == ncp->nc_vp); + cache_assert_vnode_locked(vp); + + if (ncp->nc_vp == NULL) { + if (*vlpp != NULL) { + mtx_unlock(*vlpp); + *vlpp = NULL; + } + cache_zap_negative_locked_vnode_kl(ncp, vp); + return (true); + } + + pvlp = VP2VNODELOCK(vp); + blp = NCP2BUCKETLOCK(ncp); + vlp1 = VP2VNODELOCK(ncp->nc_dvp); + vlp2 = VP2VNODELOCK(ncp->nc_vp); + + if (*vlpp == vlp1 || *vlpp == vlp2) { + to_unlock = *vlpp; + *vlpp = NULL; + } else { + if (*vlpp != NULL) { + mtx_unlock(*vlpp); + *vlpp = NULL; + } + cache_sort(&vlp1, &vlp2); + if (vlp1 == pvlp) { + mtx_lock(vlp2); + to_unlock = vlp2; + } else { + if (!mtx_trylock(vlp1)) + goto out_relock; + to_unlock = vlp1; + } + } + rw_wlock(blp); + cache_zap_locked(ncp, false); + rw_wunlock(blp); + if (to_unlock != NULL) + mtx_unlock(to_unlock); + return (true); + +out_relock: + mtx_unlock(vlp2); + mtx_lock(vlp1); + mtx_lock(vlp2); + MPASS(*vlpp == NULL); + *vlpp = vlp1; + return (false); +} + +static int +cache_zap_locked_vnode(struct namecache *ncp, struct vnode *vp) +{ + struct mtx *pvlp, *vlp1, *vlp2, *to_unlock; + struct rwlock *blp; + int error = 0; + + MPASS(vp == ncp->nc_dvp || vp == ncp->nc_vp); + cache_assert_vnode_locked(vp); + + pvlp = VP2VNODELOCK(vp); + if (ncp->nc_vp == NULL) { + cache_zap_negative_locked_vnode_kl(ncp, vp); + goto out; + } + + blp = NCP2BUCKETLOCK(ncp); + vlp1 = VP2VNODELOCK(ncp->nc_dvp); + vlp2 = VP2VNODELOCK(ncp->nc_vp); + cache_sort(&vlp1, &vlp2); + if (vlp1 == pvlp) { + mtx_lock(vlp2); + to_unlock = vlp2; + } else { + if (!mtx_trylock(vlp1)) { + error = EAGAIN; + goto out; + } + to_unlock = vlp1; + } + rw_wlock(blp); + cache_zap_locked(ncp, false); + rw_wunlock(blp); + mtx_unlock(to_unlock); +out: + mtx_unlock(pvlp); + return (error); +} + +static int +cache_zap_rlocked_bucket(struct namecache *ncp, struct rwlock *blp) +{ + struct mtx *dvlp, *vlp; + + cache_assert_bucket_locked(ncp, RA_RLOCKED); + + dvlp = VP2VNODELOCK(ncp->nc_dvp); + vlp = VP2VNODELOCK(ncp->nc_vp); + if (cache_trylock_vnodes(dvlp, vlp) == 0) { + rw_runlock(blp); + rw_wlock(blp); + cache_zap_locked(ncp, false); + rw_wunlock(blp); + cache_unlock_vnodes(dvlp, vlp); + return (0); + } + + rw_runlock(blp); + return (EAGAIN); +} + +static int +cache_zap_wlocked_bucket_kl(struct namecache *ncp, struct rwlock *blp, + struct mtx **vlpp1, struct mtx **vlpp2) +{ + struct mtx *dvlp, *vlp; + + cache_assert_bucket_locked(ncp, RA_WLOCKED); + + dvlp = VP2VNODELOCK(ncp->nc_dvp); + vlp = VP2VNODELOCK(ncp->nc_vp); + cache_sort(&dvlp, &vlp); + + if (*vlpp1 == dvlp && *vlpp2 == vlp) { + cache_zap_locked(ncp, false); + cache_unlock_vnodes(dvlp, vlp); + *vlpp1 = NULL; + *vlpp2 = NULL; + return (0); + } + + if (*vlpp1 != NULL) + mtx_unlock(*vlpp1); + if (*vlpp2 != NULL) + mtx_unlock(*vlpp2); + *vlpp1 = NULL; + *vlpp2 = NULL; + + if (cache_trylock_vnodes(dvlp, vlp) == 0) { + cache_zap_locked(ncp, false); + cache_unlock_vnodes(dvlp, vlp); + return (0); + } + + rw_wunlock(blp); + *vlpp1 = dvlp; + *vlpp2 = vlp; + if (*vlpp1 != NULL) + mtx_lock(*vlpp1); + mtx_lock(*vlpp2); + rw_wlock(blp); + return (EAGAIN); +} + +static void +cache_lookup_unlock(struct rwlock *blp, struct mtx *vlp) +{ + + if (blp != NULL) { + rw_runlock(blp); + mtx_assert(vlp, MA_NOTOWNED); + } else { + mtx_unlock(vlp); + } } /* @@ -622,44 +948,26 @@ cache_zap(struct namecache *ncp) * not recursively acquired. */ -enum { UNLOCKED, WLOCKED, RLOCKED }; - -static void -cache_unlock(int cache_locked) -{ - - switch (cache_locked) { - case UNLOCKED: - break; - case WLOCKED: - CACHE_WUNLOCK(); - break; - case RLOCKED: - CACHE_RUNLOCK(); - break; - } -} - int cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) { - struct rwlock *bucketlock; struct namecache *ncp; + struct rwlock *blp; + struct mtx *dvlp, *dvlp2; uint32_t hash; - int error, ltype, cache_locked; + int error, ltype; if (!doingcache) { cnp->cn_flags &= ~MAKEENTRY; return (0); } retry: - bucketlock = NULL; - cache_locked = UNLOCKED; + blp = NULL; + dvlp = VP2VNODELOCK(dvp); error = 0; counter_u64_add(numcalls, 1); -retry_wlocked: if (cnp->cn_nameptr[0] == '.') { if (cnp->cn_namelen == 1) { *vpp = dvp; @@ -693,32 +1001,37 @@ retry_wlocked: } if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { counter_u64_add(dotdothits, 1); - if (cache_locked == UNLOCKED) { - CACHE_RLOCK(); - cache_locked = RLOCKED; - } - - if (dvp->v_cache_dd == NULL) { + dvlp2 = NULL; + mtx_lock(dvlp); +retry_dotdot: + ncp = dvp->v_cache_dd; + if (ncp == NULL) { SDT_PROBE3(vfs, namecache, lookup, miss, dvp, "..", NULL); - goto unlock; + mtx_unlock(dvlp); + return (0); } if ((cnp->cn_flags & MAKEENTRY) == 0) { - if (cache_locked != WLOCKED && - !CACHE_UPGRADE_LOCK()) - goto wlock; - ncp = NULL; - if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) { - ncp = dvp->v_cache_dd; - cache_zap(ncp); + if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { + if (ncp->nc_dvp != dvp) + panic("dvp %p v_cache_dd %p\n", dvp, ncp); + if (!cache_zap_locked_vnode_kl2(ncp, + dvp, &dvlp2)) + goto retry_dotdot; + MPASS(dvp->v_cache_dd == NULL); + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); + cache_free(ncp); + } else { + dvp->v_cache_dd = NULL; + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); } - dvp->v_cache_dd = NULL; - CACHE_WUNLOCK(); - cache_free(ncp); return (0); } - ncp = dvp->v_cache_dd; - if (ncp->nc_flag & NCF_ISDOTDOT) + if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) *vpp = ncp->nc_vp; else *vpp = ncp->nc_dvp; @@ -739,10 +1052,8 @@ retry_wlocked: } hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); - if (cache_locked == UNLOCKED) { - bucketlock = HASH2BUCKETLOCK(hash); - rw_rlock(bucketlock); - } + blp = HASH2BUCKETLOCK(hash); + rw_rlock(blp); LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { counter_u64_add(numchecks, 1); @@ -795,24 +1106,9 @@ negative_success: SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp)); cache_out_ts(ncp, tsp, ticksp); - MPASS(bucketlock != NULL || cache_locked != UNLOCKED); - if (bucketlock != NULL) - rw_runlock(bucketlock); - cache_unlock(cache_locked); + cache_lookup_unlock(blp, dvlp); return (ENOENT); -wlock: - /* - * We need to update the cache after our lookup, so upgrade to - * a write lock and retry the operation. - */ - CACHE_RUNLOCK(); -wlock_unlocked: - CACHE_WLOCK(); - numupgrades++; - cache_locked = WLOCKED; - goto retry_wlocked; - success: /* * On success we return a locked and ref'd vnode as per the lookup @@ -825,10 +1121,7 @@ success: VOP_UNLOCK(dvp, 0); } vhold(*vpp); - MPASS(bucketlock != NULL || cache_locked != UNLOCKED); - if (bucketlock != NULL) - rw_runlock(bucketlock); - cache_unlock(cache_locked); + cache_lookup_unlock(blp, dvlp); error = vget(*vpp, cnp->cn_lkflags | LK_VNHELD, cnp->cn_thread); if (cnp->cn_flags & ISDOTDOT) { vn_lock(dvp, ltype | LK_RETRY); @@ -850,32 +1143,232 @@ success: return (-1); unlock: - MPASS(bucketlock != NULL || cache_locked != UNLOCKED); - if (bucketlock != NULL) - rw_runlock(bucketlock); - cache_unlock(cache_locked); + cache_lookup_unlock(blp, dvlp); return (0); zap_and_exit: - if (bucketlock != NULL) { - rw_assert(&cache_lock, RA_UNLOCKED); - if (!CACHE_TRY_WLOCK()) { - rw_runlock(bucketlock); - bucketlock = NULL; - zap_and_exit_bucket_fail++; - goto wlock_unlocked; - } - cache_locked = WLOCKED; - rw_runlock(bucketlock); - bucketlock = NULL; - } else if (cache_locked != WLOCKED && !CACHE_UPGRADE_LOCK()) - goto wlock; - cache_zap(ncp); - CACHE_WUNLOCK(); + if (blp != NULL) + error = cache_zap_rlocked_bucket(ncp, blp); + else + error = cache_zap_locked_vnode(ncp, dvp); + if (error != 0) { + zap_and_exit_bucket_fail++; + cache_maybe_yield(); + goto retry; + } cache_free(ncp); return (0); } +struct celockstate { + struct mtx *vlp[3]; + struct rwlock *blp[2]; +}; +CTASSERT((nitems(((struct celockstate *)0)->vlp) == 3)); +CTASSERT((nitems(((struct celockstate *)0)->blp) == 2)); + +static inline void +cache_celockstate_init(struct celockstate *cel) +{ + + bzero(cel, sizeof(*cel)); +} + +static void +cache_lock_vnodes_cel(struct celockstate *cel, struct vnode *vp, + struct vnode *dvp) +{ + struct mtx *vlp1, *vlp2; + + MPASS(cel->vlp[0] == NULL); + MPASS(cel->vlp[1] == NULL); + MPASS(cel->vlp[2] == NULL); + + MPASS(vp != NULL || dvp != NULL); + + vlp1 = VP2VNODELOCK(vp); + vlp2 = VP2VNODELOCK(dvp); + cache_sort(&vlp1, &vlp2); + + if (vlp1 != NULL) { + mtx_lock(vlp1); + cel->vlp[0] = vlp1; + } + mtx_lock(vlp2); + cel->vlp[1] = vlp2; +} + +static void +cache_unlock_vnodes_cel(struct celockstate *cel) +{ + + MPASS(cel->vlp[0] != NULL || cel->vlp[1] != NULL); + + if (cel->vlp[0] != NULL) + mtx_unlock(cel->vlp[0]); + if (cel->vlp[1] != NULL) + mtx_unlock(cel->vlp[1]); + if (cel->vlp[2] != NULL) + mtx_unlock(cel->vlp[2]); +} + +static bool +cache_lock_vnodes_cel_3(struct celockstate *cel, struct vnode *vp) +{ + struct mtx *vlp; + bool ret; + + cache_assert_vlp_locked(cel->vlp[0]); + cache_assert_vlp_locked(cel->vlp[1]); + MPASS(cel->vlp[2] == NULL); + + vlp = VP2VNODELOCK(vp); + if (vlp == NULL) + return (true); + + ret = true; + if (vlp >= cel->vlp[1]) { + mtx_lock(vlp); + } else { + if (mtx_trylock(vlp)) + goto out; + cache_lock_vnodes_cel_3_failures++; + cache_unlock_vnodes_cel(cel); + if (vlp < cel->vlp[0]) { + mtx_lock(vlp); + mtx_lock(cel->vlp[0]); + mtx_lock(cel->vlp[1]); + } else { + if (cel->vlp[0] != NULL) + mtx_lock(cel->vlp[0]); + mtx_lock(vlp); + mtx_lock(cel->vlp[1]); + } + ret = false; + } +out: + cel->vlp[2] = vlp; + return (ret); +} + +static void +cache_lock_buckets_cel(struct celockstate *cel, struct rwlock *blp1, + struct rwlock *blp2) +{ + + MPASS(cel->blp[0] == NULL); + MPASS(cel->blp[1] == NULL); + + cache_sort(&blp1, &blp2); + + if (blp1 != NULL) { + rw_wlock(blp1); + cel->blp[0] = blp1; + } + rw_wlock(blp2); + cel->blp[1] = blp2; +} + +static void +cache_unlock_buckets_cel(struct celockstate *cel) +{ + + if (cel->blp[0] != NULL) + rw_wunlock(cel->blp[0]); + rw_wunlock(cel->blp[1]); +} + +/* + * Lock part of the cache affected by the insertion. + * + * This means vnodelocks for dvp, vp and the relevant bucketlock. + * However, insertion can result in removal of an old entry. In this + * case we have an additional vnode and bucketlock pair to lock. If the + * entry is negative, ncelock is locked instead of the vnode. + * + * That is, in the worst case we have to lock 3 vnodes and 2 bucketlocks, while + * preserving the locking order (smaller address first). + */ +static void +cache_enter_lock(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, + uint32_t hash) +{ + struct namecache *ncp; + struct rwlock *blps[2]; + + blps[0] = HASH2BUCKETLOCK(hash); + for (;;) { + blps[1] = NULL; + cache_lock_vnodes_cel(cel, dvp, vp); + if (vp == NULL || vp->v_type != VDIR) + break; + ncp = vp->v_cache_dd; + if (ncp == NULL) + break; + if ((ncp->nc_flag & NCF_ISDOTDOT) == 0) + break; + MPASS(ncp->nc_dvp == vp); + blps[1] = NCP2BUCKETLOCK(ncp); + if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) + break; + /* + * All vnodes got re-locked. Re-validate the state and if + * nothing changed we are done. Otherwise restart. + */ + if (ncp == vp->v_cache_dd && + (ncp->nc_flag & NCF_ISDOTDOT) != 0 && + blps[1] == NCP2BUCKETLOCK(ncp) && + VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) + break; + cache_unlock_vnodes_cel(cel); + cel->vlp[0] = NULL; + cel->vlp[1] = NULL; + cel->vlp[2] = NULL; + } + cache_lock_buckets_cel(cel, blps[0], blps[1]); +} + +static void +cache_enter_lock_dd(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, + uint32_t hash) +{ + struct namecache *ncp; + struct rwlock *blps[2]; + + blps[0] = HASH2BUCKETLOCK(hash); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Sep 23 04:53:48 2016 Return-Path: Delivered-To: svn-src-all@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 CB685BE5B91; Fri, 23 Sep 2016 04:53:48 +0000 (UTC) (envelope-from sephe@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 9BED738C; Fri, 23 Sep 2016 04:53:48 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N4rlkQ070376; Fri, 23 Sep 2016 04:53:47 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N4rlTM070375; Fri, 23 Sep 2016 04:53:47 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609230453.u8N4rlTM070375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 23 Sep 2016 04:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306225 - stable/10/sys/dev/hyperv/storvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 04:53:48 -0000 Author: sephe Date: Fri Sep 23 04:53:47 2016 New Revision: 306225 URL: https://svnweb.freebsd.org/changeset/base/306225 Log: MFC 306015 hyperv/storvsc: Fix SRB length setting. This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued us since 10.2-release. Reported by: many Sponsored by: Microsoft Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Sep 23 04:45:11 2016 (r306224) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Sep 23 04:53:47 2016 (r306225) @@ -751,7 +751,8 @@ hv_storvsc_io_request(struct hv_device * vstor_packet->flags |= REQUEST_COMPLETION_FLAG; - vstor_packet->u.vm_srb.length = VSTOR_PKT_SIZE; + vstor_packet->u.vm_srb.length = + sizeof(struct vmscsi_req) - vmscsi_size_delta; vstor_packet->u.vm_srb.sense_info_len = sense_buffer_size; From owner-svn-src-all@freebsd.org Fri Sep 23 06:51:48 2016 Return-Path: Delivered-To: svn-src-all@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 10C95BE5B87; Fri, 23 Sep 2016 06:51:48 +0000 (UTC) (envelope-from mjg@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 D663EC39; Fri, 23 Sep 2016 06:51:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N6plhB015487; Fri, 23 Sep 2016 06:51:47 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N6pllK015486; Fri, 23 Sep 2016 06:51:47 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609230651.u8N6pllK015486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 23 Sep 2016 06:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306226 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 06:51:48 -0000 Author: mjg Date: Fri Sep 23 06:51:46 2016 New Revision: 306226 URL: https://svnweb.freebsd.org/changeset/base/306226 Log: fd: fix up fgetvp_rights after r306184 fget_cap_locked returns a referenced file, but the fgetvp_rights does not need it. Instead, due to the filedesc lock being held, it can ref the vnode after the file was looked up. Fix up fget_cap_locked to be consistent with other _locked helpers and not ref the file. This plugs a leak introduced in r306184. Pointy hat to: mjg, oshogbo Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Sep 23 04:53:47 2016 (r306225) +++ head/sys/kern/kern_descrip.c Fri Sep 23 06:51:46 2016 (r306226) @@ -2469,7 +2469,6 @@ fget_cap_locked(struct filedesc *fdp, in if (havecapsp != NULL) filecaps_copy(&fde->fde_caps, havecapsp, true); - fhold(fde->fde_file); *fpp = fde->fde_file; error = 0; @@ -2511,6 +2510,8 @@ fget_cap(struct thread *td, int fd, cap_ get_locked: FILEDESC_SLOCK(fdp); error = fget_cap_locked(fdp, fd, needrightsp, fpp, havecapsp); + if (error == 0) + fhold(*fpp); FILEDESC_SUNLOCK(fdp); return (error); From owner-svn-src-all@freebsd.org Fri Sep 23 07:06:40 2016 Return-Path: Delivered-To: svn-src-all@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 D82A9BE5F64; Fri, 23 Sep 2016 07:06:40 +0000 (UTC) (envelope-from matthew@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 A8D91216; Fri, 23 Sep 2016 07:06:40 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N76dSU019318; Fri, 23 Sep 2016 07:06:39 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N76d68019317; Fri, 23 Sep 2016 07:06:39 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201609230706.u8N76d68019317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Fri, 23 Sep 2016 07:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r306227 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 07:06:40 -0000 Author: matthew (ports committer) Date: Fri Sep 23 07:06:39 2016 New Revision: 306227 URL: https://svnweb.freebsd.org/changeset/base/306227 Log: Take in erwin's commit bit at his own request Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri Sep 23 06:51:46 2016 (r306226) +++ svnadmin/conf/access Fri Sep 23 07:06:39 2016 (r306227) @@ -81,7 +81,6 @@ emaste emax eri erj -erwin fabient fanf fjoe From owner-svn-src-all@freebsd.org Fri Sep 23 07:41:25 2016 Return-Path: Delivered-To: svn-src-all@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 0A640BE6CFD; Fri, 23 Sep 2016 07:41:25 +0000 (UTC) (envelope-from hselasky@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 D137916A0; Fri, 23 Sep 2016 07:41:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N7fOpY031154; Fri, 23 Sep 2016 07:41:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N7fOsM031153; Fri, 23 Sep 2016 07:41:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230741.u8N7fOsM031153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 07:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306228 - head/sys/fs/cuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 07:41:25 -0000 Author: hselasky Date: Fri Sep 23 07:41:23 2016 New Revision: 306228 URL: https://svnweb.freebsd.org/changeset/base/306228 Log: Prevent cuse4bsd.ko and cuse.ko from loading at the same time by declaring support for the cuse4bsd interface in cuse.ko. Found by: Sergey V. Dyatko MFC after: 1 week Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Fri Sep 23 07:06:39 2016 (r306227) +++ head/sys/fs/cuse/cuse.c Fri Sep 23 07:41:23 2016 (r306228) @@ -63,6 +63,12 @@ MODULE_VERSION(cuse, 1); +/* + * Prevent cuse4bsd.ko and cuse.ko from loading at the same time by + * declaring support for the cuse4bsd interface in cuse.ko: + */ +MODULE_VERSION(cuse4bsd, 1); + #define NBUSY ((uint8_t *)1) #ifdef FEATURE From owner-svn-src-all@freebsd.org Fri Sep 23 07:44:10 2016 Return-Path: Delivered-To: svn-src-all@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 2636BBE6FD8; Fri, 23 Sep 2016 07:44:10 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-31.csi.cam.ac.uk (ppsw-31.csi.cam.ac.uk [131.111.8.131]) (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 D25741BA4; Fri, 23 Sep 2016 07:44:09 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sc1.bsdpad.com ([163.172.212.18]:16361) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bnL9S-000QBR-LU (Exim 4.86_36-e07b163) (return-path ); Fri, 23 Sep 2016 08:44:06 +0100 Date: Fri, 23 Sep 2016 07:44:09 +0000 From: Ruslan Bukin To: Mariusz Zaborski Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306174 - in head/sys: compat/cloudabi compat/linux kern netinet sys Message-ID: <20160923074409.GA78520@bsdpad.com> References: <201609220958.u8M9wkfh034759@repo.freebsd.org> <20160922143412.GA69951@bsdpad.com> <20160922145625.GA70214@bsdpad.com> <20160922152153.GA70762@bsdpad.com> <20160922161102.GA71374@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 07:44:10 -0000 Hi It is booting fine with patch. Thanks! Ruslan On Fri, Sep 23, 2016 at 12:34:40AM +0200, Mariusz Zaborski wrote: > Thanks, I was able to reproduce that :) > I attached the patch. Could you please confirm that it fix the problem? > > Thank you and sorry for inconveniences, > Mariusz > > On 22 September 2016 at 18:11, Ruslan Bukin wrote: > > I have just tested this with MIPS64EL and the result is the same. > > So you can try both EL or EB > > > > e.g. make -j16 TARGET=mips TARGET_ARCH=mips64el KERNCONF=MALTA64 buildkernel > > > > Ruslan > > > > On Thu, Sep 22, 2016 at 03:21:53PM +0000, Ruslan Bukin wrote: > >> Hi > >> > >> It reports nothing. Yes I use qemu: > >> /home/rb743/dev/qemu/qemu/build1/mips64-softmmu/qemu-system-mips64 -M malta -kernel ~/obj/mips.mips64/home/rb743/dev/freebsd-mips/sys/MALTA64/kernel -hda /home/rb743/world-mips64eb/mips64eb.img -nographic -smp 1 -cpu 5kf -net nic -net user -m 2048M -redir tcp:4022::22 > >> > >> Ruslan > >> > >> On Thu, Sep 22, 2016 at 05:11:07PM +0200, Mariusz Zaborski wrote: > >> > I tested it on the mips for Malta kernel and it's works fine. I will > >> > try to do it on mips64, are you using qemu to test it? > >> > What is ctrl + t reporting you? > >> > > >> > > >> > On 22 September 2016 at 16:56, Ruslan Bukin wrote: > >> > > May be. The next line should be > >> > > /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). > >> > > > >> > > but it hangs before this line > >> > > > >> > > Ruslan > >> > > > >> > > On Thu, Sep 22, 2016 at 04:39:16PM +0200, Mariusz Zaborski wrote: > >> > >> Hi Ruslan, > >> > >> > >> > >> Does it hang on some network script? > >> > >> > >> > >> Thanks, > >> > >> Mariusz > >> > >> > >> > >> > >> > >> On 22 September 2016 at 16:34, Ruslan Bukin wrote: > >> > >> > Hi Mariusz > >> > >> > > >> > >> > my MIPS64EB kernel stops booting with this > >> > >> > > >> > >> > somewhere here: > >> > >> > [...] > >> > >> > Starting file system checks: > >> > >> > /dev/ada0: 20369 files, 794696 used, 7573573 free (933 frags, 946580 blocks, 0.0% fragmentation) > >> > >> > Mounting local filesystems:. > >> > >> > ELF ldconfig path: /lib /usr/lib /usr/lib/compat > >> > >> > random: unblocking device. > >> > >> > > >> > >> > any idea ? (should I rebuild something?) > >> > >> > > >> > >> > thanks! > >> > >> > > >> > >> > Ruslan > >> > >> > > >> > >> > On Thu, Sep 22, 2016 at 09:58:46AM +0000, Mariusz Zaborski wrote: > >> > >> >> Author: oshogbo > >> > >> >> Date: Thu Sep 22 09:58:46 2016 > >> > >> >> New Revision: 306174 > >> > >> >> URL: https://svnweb.freebsd.org/changeset/base/306174 > >> > >> >> > >> > >> >> Log: > >> > >> >> capsicum: propagate rights on accept(2) > >> > >> >> > >> > >> >> Descriptor returned by accept(2) should inherits capabilities rights from > >> > >> >> the listening socket. > >> > >> >> > >> > >> >> PR: 201052 > >> > >> >> Reviewed by: emaste, jonathan > >> > >> >> Discussed with: many > >> > >> >> Differential Revision: https://reviews.freebsd.org/D7724 > >> > >> >> > >> > >> >> Modified: > >> > >> >> head/sys/compat/cloudabi/cloudabi_sock.c > >> > >> >> head/sys/compat/linux/linux_socket.c > >> > >> >> head/sys/kern/kern_sendfile.c > >> > >> >> head/sys/kern/uipc_syscalls.c > >> > >> >> head/sys/netinet/sctp_syscalls.c > >> > >> >> head/sys/sys/socketvar.h > >> > >> >> > >> > >> >> Modified: head/sys/compat/cloudabi/cloudabi_sock.c > >> > >> >> ============================================================================== > >> > >> >> --- head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:33:22 2016 (r306173) > >> > >> >> +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Sep 22 09:58:46 2016 (r306174) > >> > >> >> @@ -210,7 +210,7 @@ cloudabi_sys_sock_stat_get(struct thread > >> > >> >> int error; > >> > >> >> > >> > >> >> error = getsock_cap(td, uap->sock, cap_rights_init(&rights, > >> > >> >> - CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); > >> > >> >> + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> so = fp->f_data; > >> > >> >> > >> > >> >> Modified: head/sys/compat/linux/linux_socket.c > >> > >> >> ============================================================================== > >> > >> >> --- head/sys/compat/linux/linux_socket.c Thu Sep 22 09:33:22 2016 (r306173) > >> > >> >> +++ head/sys/compat/linux/linux_socket.c Thu Sep 22 09:58:46 2016 (r306174) > >> > >> >> @@ -855,7 +855,7 @@ linux_accept_common(struct thread *td, i > >> > >> >> if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) > >> > >> >> return (EINVAL); > >> > >> >> if (error == EINVAL) { > >> > >> >> - error1 = getsock_cap(td, s, &rights, &fp, NULL); > >> > >> >> + error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL); > >> > >> >> if (error1 != 0) > >> > >> >> return (error1); > >> > >> >> so = fp->f_data; > >> > >> >> > >> > >> >> Modified: head/sys/kern/kern_sendfile.c > >> > >> >> ============================================================================== > >> > >> >> --- head/sys/kern/kern_sendfile.c Thu Sep 22 09:33:22 2016 (r306173) > >> > >> >> +++ head/sys/kern/kern_sendfile.c Thu Sep 22 09:58:46 2016 (r306174) > >> > >> >> @@ -502,7 +502,7 @@ sendfile_getsock(struct thread *td, int > >> > >> >> * The socket must be a stream socket and connected. > >> > >> >> */ > >> > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), > >> > >> >> - sock_fp, NULL); > >> > >> >> + sock_fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> *so = (*sock_fp)->f_data; > >> > >> >> > >> > >> >> Modified: head/sys/kern/uipc_syscalls.c > >> > >> >> ============================================================================== > >> > >> >> --- head/sys/kern/uipc_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > >> > >> >> +++ head/sys/kern/uipc_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > >> > >> >> @@ -89,20 +89,23 @@ static int sockargs(struct mbuf **, char > >> > >> >> /* > >> > >> >> * Convert a user file descriptor to a kernel file entry and check if required > >> > >> >> * capability rights are present. > >> > >> >> + * If required copy of current set of capability rights is returned. > >> > >> >> * A reference on the file entry is held upon returning. > >> > >> >> */ > >> > >> >> int > >> > >> >> getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > >> > >> >> - struct file **fpp, u_int *fflagp) > >> > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) > >> > >> >> { > >> > >> >> struct file *fp; > >> > >> >> int error; > >> > >> >> > >> > >> >> - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); > >> > >> >> + error = fget_cap(td, fd, rightsp, &fp, havecapsp); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> if (fp->f_type != DTYPE_SOCKET) { > >> > >> >> fdrop(fp, td); > >> > >> >> + if (havecapsp != NULL) > >> > >> >> + filecaps_free(havecapsp); > >> > >> >> return (ENOTSOCK); > >> > >> >> } > >> > >> >> if (fflagp != NULL) > >> > >> >> @@ -188,7 +191,7 @@ kern_bindat(struct thread *td, int dirfd > >> > >> >> AUDIT_ARG_FD(fd); > >> > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > >> > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> so = fp->f_data; > >> > >> >> @@ -235,7 +238,7 @@ sys_listen(struct thread *td, struct lis > >> > >> >> > >> > >> >> AUDIT_ARG_FD(uap->s); > >> > >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error == 0) { > >> > >> >> so = fp->f_data; > >> > >> >> #ifdef MAC > >> > >> >> @@ -308,6 +311,7 @@ kern_accept4(struct thread *td, int s, s > >> > >> >> struct file *headfp, *nfp = NULL; > >> > >> >> struct sockaddr *sa = NULL; > >> > >> >> struct socket *head, *so; > >> > >> >> + struct filecaps fcaps; > >> > >> >> cap_rights_t rights; > >> > >> >> u_int fflag; > >> > >> >> pid_t pgid; > >> > >> >> @@ -318,7 +322,7 @@ kern_accept4(struct thread *td, int s, s > >> > >> >> > >> > >> >> AUDIT_ARG_FD(s); > >> > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), > >> > >> >> - &headfp, &fflag); > >> > >> >> + &headfp, &fflag, &fcaps); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> head = headfp->f_data; > >> > >> >> @@ -331,7 +335,8 @@ kern_accept4(struct thread *td, int s, s > >> > >> >> if (error != 0) > >> > >> >> goto done; > >> > >> >> #endif > >> > >> >> - error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); > >> > >> >> + error = falloc_caps(td, &nfp, &fd, > >> > >> >> + (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0, &fcaps); > >> > >> >> if (error != 0) > >> > >> >> goto done; > >> > >> >> ACCEPT_LOCK(); > >> > >> >> @@ -440,6 +445,8 @@ noconnection: > >> > >> >> * a reference on nfp to the caller on success if they request it. > >> > >> >> */ > >> > >> >> done: > >> > >> >> + if (nfp == NULL) > >> > >> >> + filecaps_free(&fcaps); > >> > >> >> if (fp != NULL) { > >> > >> >> if (error == 0) { > >> > >> >> *fp = nfp; > >> > >> >> @@ -511,7 +518,7 @@ kern_connectat(struct thread *td, int di > >> > >> >> AUDIT_ARG_FD(fd); > >> > >> >> AUDIT_ARG_SOCKADDR(td, dirfd, sa); > >> > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> so = fp->f_data; > >> > >> >> @@ -754,7 +761,7 @@ kern_sendit(struct thread *td, int s, st > >> > >> >> AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); > >> > >> >> cap_rights_set(&rights, CAP_CONNECT); > >> > >> >> } > >> > >> >> - error = getsock_cap(td, s, &rights, &fp, NULL); > >> > >> >> + error = getsock_cap(td, s, &rights, &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> so = (struct socket *)fp->f_data; > >> > >> >> @@ -923,7 +930,7 @@ kern_recvit(struct thread *td, int s, st > >> > >> >> > >> > >> >> AUDIT_ARG_FD(s); > >> > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> so = fp->f_data; > >> > >> >> @@ -1198,7 +1205,7 @@ sys_shutdown(struct thread *td, struct s > >> > >> >> > >> > >> >> AUDIT_ARG_FD(uap->s); > >> > >> >> error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error == 0) { > >> > >> >> so = fp->f_data; > >> > >> >> error = soshutdown(so, uap->how); > >> > >> >> @@ -1257,7 +1264,7 @@ kern_setsockopt(struct thread *td, int s > >> > >> >> > >> > >> >> AUDIT_ARG_FD(s); > >> > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error == 0) { > >> > >> >> so = fp->f_data; > >> > >> >> error = sosetopt(so, &sopt); > >> > >> >> @@ -1323,7 +1330,7 @@ kern_getsockopt(struct thread *td, int s > >> > >> >> > >> > >> >> AUDIT_ARG_FD(s); > >> > >> >> error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error == 0) { > >> > >> >> so = fp->f_data; > >> > >> >> error = sogetopt(so, &sopt); > >> > >> >> @@ -1376,7 +1383,7 @@ kern_getsockname(struct thread *td, int > >> > >> >> > >> > >> >> AUDIT_ARG_FD(fd); > >> > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> so = fp->f_data; > >> > >> >> @@ -1463,7 +1470,7 @@ kern_getpeername(struct thread *td, int > >> > >> >> > >> > >> >> AUDIT_ARG_FD(fd); > >> > >> >> error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> so = fp->f_data; > >> > >> >> > >> > >> >> Modified: head/sys/netinet/sctp_syscalls.c > >> > >> >> ============================================================================== > >> > >> >> --- head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:33:22 2016 (r306173) > >> > >> >> +++ head/sys/netinet/sctp_syscalls.c Thu Sep 22 09:58:46 2016 (r306174) > >> > >> >> @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) > >> > >> >> } > >> > >> >> > >> > >> >> AUDIT_ARG_FD(uap->sd); > >> > >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > >> > >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> goto sctp_bad; > >> > >> >> #ifdef KTRACE > >> > >> >> @@ -361,7 +361,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) > >> > >> >> } > >> > >> >> > >> > >> >> AUDIT_ARG_FD(uap->sd); > >> > >> >> - error = getsock_cap(td, uap->sd, &rights, &fp, NULL); > >> > >> >> + error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> goto sctp_bad1; > >> > >> >> > >> > >> >> @@ -477,7 +477,7 @@ sys_sctp_generic_recvmsg(td, uap) > >> > >> >> > >> > >> >> AUDIT_ARG_FD(uap->sd); > >> > >> >> error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), > >> > >> >> - &fp, NULL); > >> > >> >> + &fp, NULL, NULL); > >> > >> >> if (error != 0) > >> > >> >> return (error); > >> > >> >> #ifdef COMPAT_FREEBSD32 > >> > >> >> > >> > >> >> Modified: head/sys/sys/socketvar.h > >> > >> >> ============================================================================== > >> > >> >> --- head/sys/sys/socketvar.h Thu Sep 22 09:33:22 2016 (r306173) > >> > >> >> +++ head/sys/sys/socketvar.h Thu Sep 22 09:58:46 2016 (r306174) > >> > >> >> @@ -321,6 +321,7 @@ extern u_long sb_max; > >> > >> >> extern so_gen_t so_gencnt; > >> > >> >> > >> > >> >> struct file; > >> > >> >> +struct filecaps; > >> > >> >> struct filedesc; > >> > >> >> struct mbuf; > >> > >> >> struct sockaddr; > >> > >> >> @@ -340,7 +341,7 @@ struct uio; > >> > >> >> */ > >> > >> >> int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); > >> > >> >> int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, > >> > >> >> - struct file **fpp, u_int *fflagp); > >> > >> >> + struct file **fpp, u_int *fflagp, struct filecaps *havecaps); > >> > >> >> void soabort(struct socket *so); > >> > >> >> int soaccept(struct socket *so, struct sockaddr **nam); > >> > >> >> void soaio_enqueue(struct task *task); > >> > >> >> > >> > > >> > diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c > index 31072f1..47245e7 100644 > --- a/sys/kern/kern_descrip.c > +++ b/sys/kern/kern_descrip.c > @@ -2481,12 +2481,16 @@ int > fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, > struct file **fpp, struct filecaps *havecapsp) > { > - struct filedesc *fdp; > - struct file *fp; > + struct filedesc *fdp = td->td_proc->p_fd; > int error; > +#ifndef CAPABILITIES > + error = fget_unlocked(fdp, fd, needrightsp, fpp, NULL); > + if (error == 0 && havecapsp != NULL) > + filecaps_fill(havecapsp); > +#else > + struct file *fp; > seq_t seq; > > - fdp = td->td_proc->p_fd; > for (;;) { > error = fget_unlocked(fdp, fd, needrightsp, &fp, &seq); > if (error != 0) > @@ -2512,7 +2516,7 @@ get_locked: > FILEDESC_SLOCK(fdp); > error = fget_cap_locked(fdp, fd, needrightsp, fpp, havecapsp); > FILEDESC_SUNLOCK(fdp); > - > +#endif > return (error); > } > From owner-svn-src-all@freebsd.org Fri Sep 23 07:44:13 2016 Return-Path: Delivered-To: svn-src-all@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 AEC9ABE6FF2; Fri, 23 Sep 2016 07:44:13 +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 4B2AC1BAC; Fri, 23 Sep 2016 07:44:13 +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 u8N7iCtL034582; Fri, 23 Sep 2016 07:44:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N7iBoG034567; Fri, 23 Sep 2016 07:44:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609230744.u8N7iBoG034567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Sep 2016 07:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306229 - in stable/9/crypto/openssl: crypto/bn crypto/dsa crypto/mdc2 ssl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 07:44:13 -0000 Author: delphij Date: Fri Sep 23 07:44:10 2016 New Revision: 306229 URL: https://svnweb.freebsd.org/changeset/base/306229 Log: Fix multiple OpenSSL vulnerabilities. Security: FreeBSD-SA-16:26.openssl Modified: stable/9/crypto/openssl/crypto/bn/bn_print.c stable/9/crypto/openssl/crypto/dsa/dsa_ossl.c stable/9/crypto/openssl/crypto/mdc2/mdc2dgst.c stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/d1_clnt.c stable/9/crypto/openssl/ssl/d1_lib.c stable/9/crypto/openssl/ssl/d1_pkt.c stable/9/crypto/openssl/ssl/d1_srvr.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl.h stable/9/crypto/openssl/ssl/ssl_err.c stable/9/crypto/openssl/ssl/ssl_locl.h stable/9/crypto/openssl/ssl/ssl_sess.c stable/9/crypto/openssl/ssl/t1_lib.c Modified: stable/9/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_print.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/crypto/bn/bn_print.c Fri Sep 23 07:44:10 2016 (r306229) @@ -111,6 +111,7 @@ char *BN_bn2dec(const BIGNUM *a) char *p; BIGNUM *t = NULL; BN_ULONG *bn_data = NULL, *lp; + int bn_data_num; /*- * get an upper bound for the length of the decimal integer @@ -120,8 +121,8 @@ char *BN_bn2dec(const BIGNUM *a) */ i = BN_num_bits(a) * 3; num = (i / 10 + i / 1000 + 1) + 1; - bn_data = - (BN_ULONG *)OPENSSL_malloc((num / BN_DEC_NUM + 1) * sizeof(BN_ULONG)); + bn_data_num = num / BN_DEC_NUM + 1; + bn_data = OPENSSL_malloc(bn_data_num * sizeof(BN_ULONG)); buf = (char *)OPENSSL_malloc(num + 3); if ((buf == NULL) || (bn_data == NULL)) { BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); @@ -143,7 +144,11 @@ char *BN_bn2dec(const BIGNUM *a) i = 0; while (!BN_is_zero(t)) { *lp = BN_div_word(t, BN_DEC_CONV); + if (*lp == (BN_ULONG)-1) + goto err; lp++; + if (lp - bn_data >= bn_data_num) + goto err; } lp--; /* Modified: stable/9/crypto/openssl/crypto/dsa/dsa_ossl.c ============================================================================== --- stable/9/crypto/openssl/crypto/dsa/dsa_ossl.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/crypto/dsa/dsa_ossl.c Fri Sep 23 07:44:10 2016 (r306229) @@ -235,11 +235,13 @@ static int dsa_sign_setup(DSA *dsa, BN_C do if (!BN_rand_range(&k, dsa->q)) goto err; - while (BN_is_zero(&k)) ; + while (BN_is_zero(&k)); + if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0) { BN_set_flags(&k, BN_FLG_CONSTTIME); } + if (dsa->flags & DSA_FLAG_CACHE_MONT_P) { if (!BN_MONT_CTX_set_locked(&dsa->method_mont_p, CRYPTO_LOCK_DSA, dsa->p, ctx)) @@ -252,6 +254,8 @@ static int dsa_sign_setup(DSA *dsa, BN_C if (!BN_copy(&kq, &k)) goto err; + BN_set_flags(&kq, BN_FLG_CONSTTIME); + /* * We do not want timing information to leak the length of k, so we * compute g^k using an equivalent exponent of fixed length. (This @@ -270,6 +274,7 @@ static int dsa_sign_setup(DSA *dsa, BN_C } else { K = &k; } + DSA_BN_MOD_EXP(goto err, dsa, r, dsa->g, K, dsa->p, ctx, dsa->method_mont_p); if (!BN_mod(r, r, dsa->q, ctx)) Modified: stable/9/crypto/openssl/crypto/mdc2/mdc2dgst.c ============================================================================== --- stable/9/crypto/openssl/crypto/mdc2/mdc2dgst.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/crypto/mdc2/mdc2dgst.c Fri Sep 23 07:44:10 2016 (r306229) @@ -94,7 +94,7 @@ int MDC2_Update(MDC2_CTX *c, const unsig i = c->num; if (i != 0) { - if (i + len < MDC2_BLOCK) { + if (len < MDC2_BLOCK - i) { /* partial block */ memcpy(&(c->data[i]), in, len); c->num += (int)len; Modified: stable/9/crypto/openssl/ssl/d1_both.c ============================================================================== --- stable/9/crypto/openssl/ssl/d1_both.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/d1_both.c Fri Sep 23 07:44:10 2016 (r306229) @@ -543,11 +543,23 @@ static int dtls1_retrieve_buffered_fragm int al; *ok = 0; - item = pqueue_peek(s->d1->buffered_messages); - if (item == NULL) - return 0; + do { + item = pqueue_peek(s->d1->buffered_messages); + if (item == NULL) + return 0; + + frag = (hm_fragment *)item->data; + + if (frag->msg_header.seq < s->d1->handshake_read_seq) { + /* This is a stale message that has been buffered so clear it */ + pqueue_pop(s->d1->buffered_messages); + dtls1_hm_fragment_free(frag); + pitem_free(item); + item = NULL; + frag = NULL; + } + } while (item == NULL); - frag = (hm_fragment *)item->data; /* Don't return if reassembly still in progress */ if (frag->reassembly != NULL) @@ -1335,18 +1347,6 @@ dtls1_retransmit_message(SSL *s, unsigne return ret; } -/* call this function when the buffered messages are no longer needed */ -void dtls1_clear_record_buffer(SSL *s) -{ - pitem *item; - - for (item = pqueue_pop(s->d1->sent_messages); - item != NULL; item = pqueue_pop(s->d1->sent_messages)) { - dtls1_hm_fragment_free((hm_fragment *)item->data); - pitem_free(item); - } -} - unsigned char *dtls1_set_message_header(SSL *s, unsigned char *p, unsigned char mt, unsigned long len, unsigned long frag_off, Modified: stable/9/crypto/openssl/ssl/d1_clnt.c ============================================================================== --- stable/9/crypto/openssl/ssl/d1_clnt.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/d1_clnt.c Fri Sep 23 07:44:10 2016 (r306229) @@ -564,6 +564,7 @@ int dtls1_connect(SSL *s) /* done with handshaking */ s->d1->handshake_read_seq = 0; s->d1->next_handshake_write_seq = 0; + dtls1_clear_received_buffer(s); goto end; /* break; */ Modified: stable/9/crypto/openssl/ssl/d1_lib.c ============================================================================== --- stable/9/crypto/openssl/ssl/d1_lib.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/d1_lib.c Fri Sep 23 07:44:10 2016 (r306229) @@ -155,7 +155,6 @@ int dtls1_new(SSL *s) static void dtls1_clear_queues(SSL *s) { pitem *item = NULL; - hm_fragment *frag = NULL; DTLS1_RECORD_DATA *rdata; while ((item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL) { @@ -176,12 +175,36 @@ static void dtls1_clear_queues(SSL *s) pitem_free(item); } + while ((item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { + rdata = (DTLS1_RECORD_DATA *)item->data; + if (rdata->rbuf.buf) { + OPENSSL_free(rdata->rbuf.buf); + } + OPENSSL_free(item->data); + pitem_free(item); + } + + dtls1_clear_received_buffer(s); + dtls1_clear_sent_buffer(s); +} + +void dtls1_clear_received_buffer(SSL *s) +{ + pitem *item = NULL; + hm_fragment *frag = NULL; + while ((item = pqueue_pop(s->d1->buffered_messages)) != NULL) { frag = (hm_fragment *)item->data; OPENSSL_free(frag->fragment); OPENSSL_free(frag); pitem_free(item); } +} + +void dtls1_clear_sent_buffer(SSL *s) +{ + pitem *item = NULL; + hm_fragment *frag = NULL; while ((item = pqueue_pop(s->d1->sent_messages)) != NULL) { frag = (hm_fragment *)item->data; @@ -189,17 +212,9 @@ static void dtls1_clear_queues(SSL *s) OPENSSL_free(frag); pitem_free(item); } - - while ((item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { - rdata = (DTLS1_RECORD_DATA *)item->data; - if (rdata->rbuf.buf) { - OPENSSL_free(rdata->rbuf.buf); - } - OPENSSL_free(item->data); - pitem_free(item); - } } + void dtls1_free(SSL *s) { ssl3_free(s); @@ -431,7 +446,7 @@ void dtls1_stop_timer(SSL *s) BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout)); /* Clear retransmission buffer */ - dtls1_clear_record_buffer(s); + dtls1_clear_sent_buffer(s); } int dtls1_check_timeout_num(SSL *s) Modified: stable/9/crypto/openssl/ssl/d1_pkt.c ============================================================================== --- stable/9/crypto/openssl/ssl/d1_pkt.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/d1_pkt.c Fri Sep 23 07:44:10 2016 (r306229) @@ -124,8 +124,7 @@ static int have_handshake_fragment(SSL *s, int type, unsigned char *buf, int len, int peek); -static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap, - PQ_64BIT * seq_num); +static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap); static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); static DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, unsigned int *is_next_epoch); @@ -135,7 +134,7 @@ static int dtls1_record_needs_buffering( unsigned long *offset); #endif static int dtls1_buffer_record(SSL *s, record_pqueue *q, PQ_64BIT * priority); -static int dtls1_process_record(SSL *s); +static int dtls1_process_record(SSL *s, DTLS1_BITMAP *bitmap); #if PQ_64BIT_IS_INTEGER static PQ_64BIT bytes_to_long_long(unsigned char *bytes, PQ_64BIT * num); #endif @@ -248,20 +247,66 @@ static int dtls1_retrieve_buffered_recor static int dtls1_process_buffered_records(SSL *s) { pitem *item; + SSL3_BUFFER *rb; + SSL3_RECORD *rr; + DTLS1_BITMAP *bitmap; + unsigned int is_next_epoch; + int replayok = 1; item = pqueue_peek(s->d1->unprocessed_rcds.q); if (item) { /* Check if epoch is current. */ if (s->d1->unprocessed_rcds.epoch != s->d1->r_epoch) - return (1); /* Nothing to do. */ + return 1; /* Nothing to do. */ + + rr = &s->s3->rrec; + rb = &s->s3->rbuf; + + if (rb->left > 0) { + /* + * We've still got data from the current packet to read. There could + * be a record from the new epoch in it - so don't overwrite it + * with the unprocessed records yet (we'll do it when we've + * finished reading the current packet). + */ + return 1; + } + /* Process all the records. */ while (pqueue_peek(s->d1->unprocessed_rcds.q)) { dtls1_get_unprocessed_record(s); - if (!dtls1_process_record(s)) - return (0); - dtls1_buffer_record(s, &(s->d1->processed_rcds), - &s->s3->rrec.seq_num); + bitmap = dtls1_get_bitmap(s, rr, &is_next_epoch); + if (bitmap == NULL) { + /* + * Should not happen. This will only ever be NULL when the + * current record is from a different epoch. But that cannot + * be the case because we already checked the epoch above + */ + SSLerr(SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS, + ERR_R_INTERNAL_ERROR); + return 0; + } + { + /* + * Check whether this is a repeat, or aged record. We did this + * check once already when we first received the record - but + * we might have updated the window since then due to + * records we subsequently processed. + */ + replayok = dtls1_record_replay_check(s, bitmap); + } + + if (!replayok || !dtls1_process_record(s, bitmap)) { + /* dump this record */ + rr->length = 0; + s->packet_length = 0; + continue; + } + + if (dtls1_buffer_record(s, &(s->d1->processed_rcds), + &s->s3->rrec.seq_num) < 0) + return 0; } } @@ -272,7 +317,7 @@ static int dtls1_process_buffered_record s->d1->processed_rcds.epoch = s->d1->r_epoch; s->d1->unprocessed_rcds.epoch = s->d1->r_epoch + 1; - return (1); + return 1; } #if 0 @@ -319,7 +364,7 @@ static int dtls1_get_buffered_record(SSL #endif -static int dtls1_process_record(SSL *s) +static int dtls1_process_record(SSL *s, DTLS1_BITMAP *bitmap) { int i, al; int enc_err; @@ -478,8 +523,10 @@ static int dtls1_process_record(SSL *s) /* we have pulled in a full packet so zero things */ s->packet_length = 0; - dtls1_record_bitmap_update(s, &(s->d1->bitmap)); /* Mark receipt of - * record. */ + + /* Mark receipt of record. */ + dtls1_record_bitmap_update(s, bitmap); + return (1); f_err: @@ -510,6 +557,7 @@ int dtls1_get_record(SSL *s) rr = &(s->s3->rrec); + again: /* * The epoch may have changed. If so, process all the pending records. * This is a non-blocking operation. @@ -521,7 +569,6 @@ int dtls1_get_record(SSL *s) return 1; /* get something from the wire */ - again: /* check if we have the header */ if ((s->rstate != SSL_ST_READ_BODY) || (s->packet_length < DTLS1_RT_HEADER_LENGTH)) { @@ -620,7 +667,7 @@ int dtls1_get_record(SSL *s) if (!(s->d1->listen && rr->type == SSL3_RT_HANDSHAKE && s->packet_length > DTLS1_RT_HEADER_LENGTH && s->packet[DTLS1_RT_HEADER_LENGTH] == SSL3_MT_CLIENT_HELLO) && - !dtls1_record_replay_check(s, bitmap, &(rr->seq_num))) { + !dtls1_record_replay_check(s, bitmap)) { rr->length = 0; s->packet_length = 0; /* dump this record */ goto again; /* get another record */ @@ -638,14 +685,16 @@ int dtls1_get_record(SSL *s) */ if (is_next_epoch) { if ((SSL_in_init(s) || s->in_handshake) && !s->d1->listen) { - dtls1_buffer_record(s, &(s->d1->unprocessed_rcds), &rr->seq_num); + if (dtls1_buffer_record + (s, &(s->d1->unprocessed_rcds), &rr->seq_num) < 0) + return -1; } rr->length = 0; s->packet_length = 0; goto again; } - if (!dtls1_process_record(s)) { + if (!dtls1_process_record(s, bitmap)) { rr->length = 0; s->packet_length = 0; /* dump this record */ goto again; /* get another record */ @@ -1514,8 +1563,7 @@ int do_dtls1_write(SSL *s, int type, con return -1; } -static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap, - PQ_64BIT * seq_num) +static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap) { #if PQ_64BIT_IS_INTEGER PQ_64BIT mask = 0x0000000000000001L; @@ -1530,7 +1578,7 @@ static int dtls1_record_replay_check(SSL if (pq_64bit_gt(&rcd_num, &(bitmap->max_seq_num)) || pq_64bit_eq(&rcd_num, &(bitmap->max_seq_num))) { - pq_64bit_assign(seq_num, &rcd_num); + pq_64bit_assign(&s->s3->rrec.seq_num, &rcd_num); pq_64bit_free(&rcd_num); pq_64bit_free(&tmp); return 1; /* this record is new */ @@ -1561,7 +1609,7 @@ static int dtls1_record_replay_check(SSL return 0; /* record previously received */ #endif - pq_64bit_assign(seq_num, &rcd_num); + pq_64bit_assign(&s->s3->rrec.seq_num, &rcd_num); pq_64bit_free(&rcd_num); pq_64bit_free(&tmp); return 1; @@ -1687,8 +1735,13 @@ static DTLS1_BITMAP *dtls1_get_bitmap(SS if (rr->epoch == s->d1->r_epoch) return &s->d1->bitmap; - /* Only HM and ALERT messages can be from the next epoch */ + /* + * Only HM and ALERT messages can be from the next epoch and only if we + * have already processed all of the unprocessed records from the last + * epoch + */ else if (rr->epoch == (unsigned long)(s->d1->r_epoch + 1) && + s->d1->unprocessed_rcds.epoch != s->d1->r_epoch && (rr->type == SSL3_RT_HANDSHAKE || rr->type == SSL3_RT_ALERT)) { *is_next_epoch = 1; return &s->d1->next_bitmap; @@ -1776,6 +1829,12 @@ void dtls1_reset_seq_numbers(SSL *s, int memset(&(s->d1->next_bitmap), 0x00, sizeof(DTLS1_BITMAP)); pq_64bit_init(&(s->d1->next_bitmap.map)); pq_64bit_init(&(s->d1->next_bitmap.max_seq_num)); + + /* + * We must not use any buffered messages received from the previous + * epoch + */ + dtls1_clear_received_buffer(s); } else { seq = s->s3->write_sequence; memcpy(s->d1->last_write_sequence, seq, Modified: stable/9/crypto/openssl/ssl/d1_srvr.c ============================================================================== --- stable/9/crypto/openssl/ssl/d1_srvr.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/d1_srvr.c Fri Sep 23 07:44:10 2016 (r306229) @@ -242,7 +242,7 @@ int dtls1_accept(SSL *s) case SSL3_ST_SW_HELLO_REQ_B: s->shutdown = 0; - dtls1_clear_record_buffer(s); + dtls1_clear_sent_buffer(s); dtls1_start_timer(s); ret = dtls1_send_hello_request(s); if (ret <= 0) @@ -648,6 +648,7 @@ int dtls1_accept(SSL *s) /* next message is server hello */ s->d1->handshake_write_seq = 0; s->d1->next_handshake_write_seq = 0; + dtls1_clear_received_buffer(s); goto end; /* break; */ Modified: stable/9/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/9/crypto/openssl/ssl/s3_clnt.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/s3_clnt.c Fri Sep 23 07:44:10 2016 (r306229) @@ -931,6 +931,12 @@ int ssl3_get_server_certificate(SSL *s) goto f_err; } for (nc = 0; nc < llen;) { + if (nc + 3 > llen) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE, + SSL_R_CERT_LENGTH_MISMATCH); + goto f_err; + } n2l3(p, l); if ((l + nc + 3) > llen) { al = SSL_AD_DECODE_ERROR; @@ -1627,6 +1633,11 @@ int ssl3_get_certificate_request(SSL *s) } for (nc = 0; nc < llen;) { + if (nc + 2 > llen) { + ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR); + SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST, SSL_R_CA_DN_TOO_LONG); + goto err; + } n2s(p, l); if ((l + nc + 2) > llen) { if ((s->options & SSL_OP_NETSCAPE_CA_DN_BUG)) Modified: stable/9/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/9/crypto/openssl/ssl/s3_srvr.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/s3_srvr.c Fri Sep 23 07:44:10 2016 (r306229) @@ -819,7 +819,7 @@ int ssl3_get_client_hello(SSL *s) session_length = *(p + SSL3_RANDOM_SIZE); - if (p + SSL3_RANDOM_SIZE + session_length + 1 >= d + n) { + if (SSL3_RANDOM_SIZE + session_length + 1 >= (d + n) - p) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -837,7 +837,7 @@ int ssl3_get_client_hello(SSL *s) /* get the session-id */ j = *(p++); - if (p + j > d + n) { + if ((d + n) - p < j) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -874,14 +874,14 @@ int ssl3_get_client_hello(SSL *s) if (s->version == DTLS1_VERSION || s->version == DTLS1_BAD_VER) { /* cookie stuff */ - if (p + 1 > d + n) { + if ((d + n) - p < 1) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; } cookie_len = *(p++); - if (p + cookie_len > d + n) { + if ((d + n ) - p < cookie_len) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -927,7 +927,7 @@ int ssl3_get_client_hello(SSL *s) p += cookie_len; } - if (p + 2 > d + n) { + if ((d + n ) - p < 2) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -941,7 +941,7 @@ int ssl3_get_client_hello(SSL *s) } /* i bytes of cipher data + 1 byte for compression length later */ - if ((p + i + 1) > (d + n)) { + if ((d + n) - p < i + 1) { /* not enough data */ al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); @@ -1007,7 +1007,7 @@ int ssl3_get_client_hello(SSL *s) /* compression */ i = *(p++); - if ((p + i) > (d + n)) { + if ((d + n) - p < i) { /* not enough data */ al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); @@ -1029,7 +1029,7 @@ int ssl3_get_client_hello(SSL *s) #ifndef OPENSSL_NO_TLSEXT /* TLS extensions */ if (s->version >= SSL3_VERSION) { - if (!ssl_parse_clienthello_tlsext(s, &p, d, n, &al)) { + if (!ssl_parse_clienthello_tlsext(s, &p, d + n, &al)) { /* 'al' set by ssl_parse_clienthello_tlsext */ SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_PARSE_TLSEXT); goto f_err; @@ -2526,6 +2526,12 @@ int ssl3_get_client_certificate(SSL *s) goto f_err; } for (nc = 0; nc < llen;) { + if (nc + 3 > llen) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE, + SSL_R_CERT_LENGTH_MISMATCH); + goto f_err; + } n2l3(p, l); if ((l + nc + 3) > llen) { al = SSL_AD_DECODE_ERROR; Modified: stable/9/crypto/openssl/ssl/ssl.h ============================================================================== --- stable/9/crypto/openssl/ssl/ssl.h Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/ssl.h Fri Sep 23 07:44:10 2016 (r306229) @@ -1803,6 +1803,7 @@ void ERR_load_SSL_strings(void); # define SSL_F_DTLS1_HANDLE_TIMEOUT 282 # define SSL_F_DTLS1_OUTPUT_CERT_CHAIN 255 # define SSL_F_DTLS1_PREPROCESS_FRAGMENT 277 +# define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 # define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE 256 # define SSL_F_DTLS1_PROCESS_RECORD 257 # define SSL_F_DTLS1_READ_BYTES 258 Modified: stable/9/crypto/openssl/ssl/ssl_err.c ============================================================================== --- stable/9/crypto/openssl/ssl/ssl_err.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/ssl_err.c Fri Sep 23 07:44:10 2016 (r306229) @@ -1,6 +1,6 @@ /* ssl/ssl_err.c */ /* ==================================================================== - * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2016 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -92,6 +92,8 @@ static ERR_STRING_DATA SSL_str_functs[] {ERR_FUNC(SSL_F_DTLS1_HANDLE_TIMEOUT), "DTLS1_HANDLE_TIMEOUT"}, {ERR_FUNC(SSL_F_DTLS1_OUTPUT_CERT_CHAIN), "DTLS1_OUTPUT_CERT_CHAIN"}, {ERR_FUNC(SSL_F_DTLS1_PREPROCESS_FRAGMENT), "DTLS1_PREPROCESS_FRAGMENT"}, + {ERR_FUNC(SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS), + "DTLS1_PROCESS_BUFFERED_RECORDS"}, {ERR_FUNC(SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE), "DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE"}, {ERR_FUNC(SSL_F_DTLS1_PROCESS_RECORD), "DTLS1_PROCESS_RECORD"}, Modified: stable/9/crypto/openssl/ssl/ssl_locl.h ============================================================================== --- stable/9/crypto/openssl/ssl/ssl_locl.h Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/ssl_locl.h Fri Sep 23 07:44:10 2016 (r306229) @@ -910,7 +910,8 @@ int dtls1_retransmit_message(SSL *s, uns unsigned long frag_off, int *found); int dtls1_get_queue_priority(unsigned short seq, int is_ccs); int dtls1_retransmit_buffered_messages(SSL *s); -void dtls1_clear_record_buffer(SSL *s); +void dtls1_clear_received_buffer(SSL *s); +void dtls1_clear_sent_buffer(SSL *s); void dtls1_get_message_header(unsigned char *data, struct hm_header_st *msg_hdr); void dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr); @@ -1022,7 +1023,7 @@ unsigned char *ssl_add_clienthello_tlsex unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit); int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **data, - unsigned char *d, int n, int *al); + unsigned char *limit, int *al); int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **data, unsigned char *d, int n, int *al); int ssl_prepare_clienthello_tlsext(SSL *s); Modified: stable/9/crypto/openssl/ssl/ssl_sess.c ============================================================================== --- stable/9/crypto/openssl/ssl/ssl_sess.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/ssl_sess.c Fri Sep 23 07:44:10 2016 (r306229) @@ -384,7 +384,7 @@ int ssl_get_prev_session(SSL *s, unsigne if (len > SSL_MAX_SSL_SESSION_ID_LENGTH) goto err; - if (session_id + len > limit) { + if (limit - session_id < len) { fatal = 1; goto err; } Modified: stable/9/crypto/openssl/ssl/t1_lib.c ============================================================================== --- stable/9/crypto/openssl/ssl/t1_lib.c Fri Sep 23 07:41:23 2016 (r306228) +++ stable/9/crypto/openssl/ssl/t1_lib.c Fri Sep 23 07:44:10 2016 (r306229) @@ -357,7 +357,7 @@ unsigned char *ssl_add_serverhello_tlsex * 10.8..10.8.3 (which don't work). */ static void ssl_check_for_safari(SSL *s, const unsigned char *data, - const unsigned char *d, int n) + const unsigned char *limit) { unsigned short type, size; static const unsigned char kSafariExtensionsBlock[] = { @@ -386,11 +386,11 @@ static void ssl_check_for_safari(SSL *s, 0x02, 0x03, /* SHA-1/ECDSA */ }; - if (data >= (d + n - 2)) + if (limit - data <= 2) return; data += 2; - if (data > (d + n - 4)) + if (limit - data < 4) return; n2s(data, type); n2s(data, size); @@ -398,7 +398,7 @@ static void ssl_check_for_safari(SSL *s, if (type != TLSEXT_TYPE_server_name) return; - if (data + size > d + n) + if (limit - data < size) return; data += size; @@ -406,7 +406,7 @@ static void ssl_check_for_safari(SSL *s, const size_t len1 = sizeof(kSafariExtensionsBlock); const size_t len2 = sizeof(kSafariTLS12ExtensionsBlock); - if (data + len1 + len2 != d + n) + if (limit - data != (int)(len1 + len2)) return; if (memcmp(data, kSafariExtensionsBlock, len1) != 0) return; @@ -415,7 +415,7 @@ static void ssl_check_for_safari(SSL *s, } else { const size_t len = sizeof(kSafariExtensionsBlock); - if (data + len != d + n) + if (limit - data != (int)(len)) return; if (memcmp(data, kSafariExtensionsBlock, len) != 0) return; @@ -425,8 +425,8 @@ static void ssl_check_for_safari(SSL *s, } # endif /* !OPENSSL_NO_EC */ -int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, - int n, int *al) +int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, + unsigned char *limit, int *al) { unsigned short type; unsigned short size; @@ -439,24 +439,26 @@ int ssl_parse_clienthello_tlsext(SSL *s, # ifndef OPENSSL_NO_EC if (s->options & SSL_OP_SAFARI_ECDHE_ECDSA_BUG) - ssl_check_for_safari(s, data, d, n); + ssl_check_for_safari(s, data, limit); # endif /* !OPENSSL_NO_EC */ - if (data >= (d + n - 2)) + if (data == limit) goto ri_check; + if (limit - data < 2) + goto err; + n2s(data, len); - if (data > (d + n - len)) - goto ri_check; + if (limit - data != len) + goto err; - while (data <= (d + n - 4)) { + while (limit - data >= 4) { n2s(data, type); n2s(data, size); - if (data + size > (d + n)) - goto ri_check; - + if (limit - data < size) + goto err; if (s->tlsext_debug_cb) s->tlsext_debug_cb(s, 0, type, data, size, s->tlsext_debug_arg); /*- @@ -580,6 +582,23 @@ int ssl_parse_clienthello_tlsext(SSL *s, *al = SSL_AD_DECODE_ERROR; return 0; } + + /* + * We remove any OCSP_RESPIDs from a previous handshake + * to prevent unbounded memory growth - CVE-2016-6304 + */ + sk_OCSP_RESPID_pop_free(s->tlsext_ocsp_ids, + OCSP_RESPID_free); + if (dsize > 0) { + s->tlsext_ocsp_ids = sk_OCSP_RESPID_new_null(); + if (s->tlsext_ocsp_ids == NULL) { + *al = SSL_AD_INTERNAL_ERROR; + return 0; + } + } else { + s->tlsext_ocsp_ids = NULL; + } + while (dsize > 0) { OCSP_RESPID *id; int idsize; @@ -606,13 +625,6 @@ int ssl_parse_clienthello_tlsext(SSL *s, *al = SSL_AD_DECODE_ERROR; return 0; } - if (!s->tlsext_ocsp_ids - && !(s->tlsext_ocsp_ids = - sk_OCSP_RESPID_new_null())) { - OCSP_RESPID_free(id); - *al = SSL_AD_INTERNAL_ERROR; - return 0; - } if (!sk_OCSP_RESPID_push(s->tlsext_ocsp_ids, id)) { OCSP_RESPID_free(id); *al = SSL_AD_INTERNAL_ERROR; @@ -672,6 +684,10 @@ int ssl_parse_clienthello_tlsext(SSL *s, } return 1; + +err: + *al = SSL_AD_DECODE_ERROR; + return 0; } int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, @@ -684,20 +700,20 @@ int ssl_parse_serverhello_tlsext(SSL *s, int tlsext_servername = 0; int renegotiate_seen = 0; - if (data >= (d + n - 2)) + if ((d + n) - data <= 2) goto ri_check; n2s(data, length); - if (data + length != d + n) { + if ((d + n) - data != length) { *al = SSL_AD_DECODE_ERROR; return 0; } - while (data <= (d + n - 4)) { + while ((d + n) - data >= 4) { n2s(data, type); n2s(data, size); - if (data + size > (d + n)) + if ((d + n) - data < size) goto ri_check; if (s->tlsext_debug_cb) @@ -960,29 +976,33 @@ int tls1_process_ticket(SSL *s, unsigned /* Skip past DTLS cookie */ if (s->version == DTLS1_VERSION || s->version == DTLS1_BAD_VER) { i = *(p++); - p += i; - if (p >= limit) + + if (limit - p <= i) return -1; + + p += i; } /* Skip past cipher list */ n2s(p, i); - p += i; - if (p >= limit) + if (limit - p <= i) return -1; + p += i; + /* Skip past compression algorithm list */ i = *(p++); - p += i; - if (p > limit) + if (limit - p < i) return -1; + p += i; + /* Now at start of extensions */ - if ((p + 2) >= limit) + if (limit - p <= 2) return 1; n2s(p, i); - while ((p + 4) <= limit) { + while (limit - p >= 4) { unsigned short type, size; n2s(p, type); n2s(p, size); - if (p + size > limit) + if (limit - p < size) return 1; if (type == TLSEXT_TYPE_session_ticket) { /* @@ -1012,9 +1032,7 @@ static int tls_decrypt_ticket(SSL *s, co HMAC_CTX hctx; EVP_CIPHER_CTX ctx; SSL_CTX *tctx = s->initial_ctx; - /* Need at least keyname + iv + some encrypted data */ - if (eticklen < 48) - goto tickerr; + /* Initialize session ticket encryption and HMAC contexts */ HMAC_CTX_init(&hctx); EVP_CIPHER_CTX_init(&ctx); @@ -1042,6 +1060,13 @@ static int tls_decrypt_ticket(SSL *s, co * checks on ticket. */ mlen = HMAC_size(&hctx); + /* Sanity check ticket length: must exceed keyname + IV + HMAC */ + if (eticklen <= 16 + EVP_CIPHER_CTX_iv_length(&ctx) + mlen) { + HMAC_CTX_cleanup(&hctx); + EVP_CIPHER_CTX_cleanup(&ctx); + return 2; + } + eticklen -= mlen; /* Check HMAC of encrypted ticket */ HMAC_Update(&hctx, etick, eticklen); From owner-svn-src-all@freebsd.org Fri Sep 23 07:48:38 2016 Return-Path: Delivered-To: svn-src-all@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 ECB01BE51B6; Fri, 23 Sep 2016 07:48:37 +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 857961EEA; Fri, 23 Sep 2016 07:48:37 +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 u8N7makI034790; Fri, 23 Sep 2016 07:48:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N7mYqe034765; Fri, 23 Sep 2016 07:48:34 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609230748.u8N7mYqe034765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Sep 2016 07:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306230 - in releng: 10.1 10.1/crypto/openssl/crypto/bn 10.1/crypto/openssl/crypto/dsa 10.1/crypto/openssl/crypto/mdc2 10.1/crypto/openssl/crypto/ts 10.1/crypto/openssl/ssl 10.1/sys/con... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 07:48:38 -0000 Author: delphij Date: Fri Sep 23 07:48:34 2016 New Revision: 306230 URL: https://svnweb.freebsd.org/changeset/base/306230 Log: Fix multiple OpenSSL vulnerabilitites. Approved by: so Security: FreeBSD-SA-16:26.openssl Modified: releng/10.1/UPDATING releng/10.1/crypto/openssl/crypto/bn/bn_print.c releng/10.1/crypto/openssl/crypto/dsa/dsa_ossl.c releng/10.1/crypto/openssl/crypto/mdc2/mdc2dgst.c releng/10.1/crypto/openssl/crypto/ts/ts_lib.c releng/10.1/crypto/openssl/ssl/d1_both.c releng/10.1/crypto/openssl/ssl/d1_clnt.c releng/10.1/crypto/openssl/ssl/d1_lib.c releng/10.1/crypto/openssl/ssl/d1_pkt.c releng/10.1/crypto/openssl/ssl/d1_srvr.c releng/10.1/crypto/openssl/ssl/s3_clnt.c releng/10.1/crypto/openssl/ssl/s3_srvr.c releng/10.1/crypto/openssl/ssl/ssl.h releng/10.1/crypto/openssl/ssl/ssl_err.c releng/10.1/crypto/openssl/ssl/ssl_locl.h releng/10.1/crypto/openssl/ssl/ssl_sess.c releng/10.1/crypto/openssl/ssl/t1_lib.c releng/10.1/sys/conf/newvers.sh releng/10.2/UPDATING releng/10.2/crypto/openssl/crypto/bn/bn_print.c releng/10.2/crypto/openssl/crypto/dsa/dsa_ossl.c releng/10.2/crypto/openssl/crypto/mdc2/mdc2dgst.c releng/10.2/crypto/openssl/crypto/ts/ts_lib.c releng/10.2/crypto/openssl/ssl/d1_both.c releng/10.2/crypto/openssl/ssl/d1_clnt.c releng/10.2/crypto/openssl/ssl/d1_lib.c releng/10.2/crypto/openssl/ssl/d1_pkt.c releng/10.2/crypto/openssl/ssl/d1_srvr.c releng/10.2/crypto/openssl/ssl/s3_clnt.c releng/10.2/crypto/openssl/ssl/s3_srvr.c releng/10.2/crypto/openssl/ssl/ssl.h releng/10.2/crypto/openssl/ssl/ssl_err.c releng/10.2/crypto/openssl/ssl/ssl_locl.h releng/10.2/crypto/openssl/ssl/ssl_sess.c releng/10.2/crypto/openssl/ssl/t1_lib.c releng/10.2/sys/conf/newvers.sh releng/10.3/UPDATING releng/10.3/crypto/openssl/crypto/bn/bn_print.c releng/10.3/crypto/openssl/crypto/dsa/dsa_ossl.c releng/10.3/crypto/openssl/crypto/mdc2/mdc2dgst.c releng/10.3/crypto/openssl/crypto/ts/ts_lib.c releng/10.3/crypto/openssl/ssl/d1_both.c releng/10.3/crypto/openssl/ssl/d1_clnt.c releng/10.3/crypto/openssl/ssl/d1_lib.c releng/10.3/crypto/openssl/ssl/d1_pkt.c releng/10.3/crypto/openssl/ssl/d1_srvr.c releng/10.3/crypto/openssl/ssl/s3_clnt.c releng/10.3/crypto/openssl/ssl/s3_srvr.c releng/10.3/crypto/openssl/ssl/ssl.h releng/10.3/crypto/openssl/ssl/ssl_err.c releng/10.3/crypto/openssl/ssl/ssl_locl.h releng/10.3/crypto/openssl/ssl/ssl_sess.c releng/10.3/crypto/openssl/ssl/t1_lib.c releng/10.3/sys/conf/newvers.sh releng/9.3/UPDATING releng/9.3/crypto/openssl/crypto/bn/bn_print.c releng/9.3/crypto/openssl/crypto/dsa/dsa_ossl.c releng/9.3/crypto/openssl/crypto/mdc2/mdc2dgst.c releng/9.3/crypto/openssl/ssl/d1_both.c releng/9.3/crypto/openssl/ssl/d1_clnt.c releng/9.3/crypto/openssl/ssl/d1_lib.c releng/9.3/crypto/openssl/ssl/d1_pkt.c releng/9.3/crypto/openssl/ssl/d1_srvr.c releng/9.3/crypto/openssl/ssl/s3_clnt.c releng/9.3/crypto/openssl/ssl/s3_srvr.c releng/9.3/crypto/openssl/ssl/ssl.h releng/9.3/crypto/openssl/ssl/ssl_err.c releng/9.3/crypto/openssl/ssl/ssl_locl.h releng/9.3/crypto/openssl/ssl/ssl_sess.c releng/9.3/crypto/openssl/ssl/t1_lib.c releng/9.3/sys/conf/newvers.sh Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/UPDATING Fri Sep 23 07:48:34 2016 (r306230) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160923 p38 FreeBSD-SA-16:26.openssl + + Fix multiple OpenSSL vulnerabilitites. + 20160725 p37 FreeBSD-SA-16:25.bspatch FreeBSD-EN-16:09.freebsd-update Modified: releng/10.1/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- releng/10.1/crypto/openssl/crypto/bn/bn_print.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/crypto/bn/bn_print.c Fri Sep 23 07:48:34 2016 (r306230) @@ -111,6 +111,7 @@ char *BN_bn2dec(const BIGNUM *a) char *p; BIGNUM *t = NULL; BN_ULONG *bn_data = NULL, *lp; + int bn_data_num; /*- * get an upper bound for the length of the decimal integer @@ -120,8 +121,8 @@ char *BN_bn2dec(const BIGNUM *a) */ i = BN_num_bits(a) * 3; num = (i / 10 + i / 1000 + 1) + 1; - bn_data = - (BN_ULONG *)OPENSSL_malloc((num / BN_DEC_NUM + 1) * sizeof(BN_ULONG)); + bn_data_num = num / BN_DEC_NUM + 1; + bn_data = OPENSSL_malloc(bn_data_num * sizeof(BN_ULONG)); buf = (char *)OPENSSL_malloc(num + 3); if ((buf == NULL) || (bn_data == NULL)) { BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); @@ -143,7 +144,11 @@ char *BN_bn2dec(const BIGNUM *a) i = 0; while (!BN_is_zero(t)) { *lp = BN_div_word(t, BN_DEC_CONV); + if (*lp == (BN_ULONG)-1) + goto err; lp++; + if (lp - bn_data >= bn_data_num) + goto err; } lp--; /* Modified: releng/10.1/crypto/openssl/crypto/dsa/dsa_ossl.c ============================================================================== --- releng/10.1/crypto/openssl/crypto/dsa/dsa_ossl.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/crypto/dsa/dsa_ossl.c Fri Sep 23 07:48:34 2016 (r306230) @@ -247,11 +247,13 @@ static int dsa_sign_setup(DSA *dsa, BN_C do if (!BN_rand_range(&k, dsa->q)) goto err; - while (BN_is_zero(&k)) ; + while (BN_is_zero(&k)); + if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0) { BN_set_flags(&k, BN_FLG_CONSTTIME); } + if (dsa->flags & DSA_FLAG_CACHE_MONT_P) { if (!BN_MONT_CTX_set_locked(&dsa->method_mont_p, CRYPTO_LOCK_DSA, dsa->p, ctx)) @@ -264,6 +266,8 @@ static int dsa_sign_setup(DSA *dsa, BN_C if (!BN_copy(&kq, &k)) goto err; + BN_set_flags(&kq, BN_FLG_CONSTTIME); + /* * We do not want timing information to leak the length of k, so we * compute g^k using an equivalent exponent of fixed length. (This @@ -282,6 +286,7 @@ static int dsa_sign_setup(DSA *dsa, BN_C } else { K = &k; } + DSA_BN_MOD_EXP(goto err, dsa, r, dsa->g, K, dsa->p, ctx, dsa->method_mont_p); if (!BN_mod(r, r, dsa->q, ctx)) Modified: releng/10.1/crypto/openssl/crypto/mdc2/mdc2dgst.c ============================================================================== --- releng/10.1/crypto/openssl/crypto/mdc2/mdc2dgst.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/crypto/mdc2/mdc2dgst.c Fri Sep 23 07:48:34 2016 (r306230) @@ -91,7 +91,7 @@ int MDC2_Update(MDC2_CTX *c, const unsig i = c->num; if (i != 0) { - if (i + len < MDC2_BLOCK) { + if (len < MDC2_BLOCK - i) { /* partial block */ memcpy(&(c->data[i]), in, len); c->num += (int)len; Modified: releng/10.1/crypto/openssl/crypto/ts/ts_lib.c ============================================================================== --- releng/10.1/crypto/openssl/crypto/ts/ts_lib.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/crypto/ts/ts_lib.c Fri Sep 23 07:48:34 2016 (r306230) @@ -90,9 +90,8 @@ int TS_OBJ_print_bio(BIO *bio, const ASN { char obj_txt[128]; - int len = OBJ_obj2txt(obj_txt, sizeof(obj_txt), obj, 0); - BIO_write(bio, obj_txt, len); - BIO_write(bio, "\n", 1); + OBJ_obj2txt(obj_txt, sizeof(obj_txt), obj, 0); + BIO_printf(bio, "%s\n", obj_txt); return 1; } Modified: releng/10.1/crypto/openssl/ssl/d1_both.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/d1_both.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/d1_both.c Fri Sep 23 07:48:34 2016 (r306230) @@ -586,11 +586,23 @@ static int dtls1_retrieve_buffered_fragm int al; *ok = 0; - item = pqueue_peek(s->d1->buffered_messages); - if (item == NULL) - return 0; + do { + item = pqueue_peek(s->d1->buffered_messages); + if (item == NULL) + return 0; + + frag = (hm_fragment *)item->data; + + if (frag->msg_header.seq < s->d1->handshake_read_seq) { + /* This is a stale message that has been buffered so clear it */ + pqueue_pop(s->d1->buffered_messages); + dtls1_hm_fragment_free(frag); + pitem_free(item); + item = NULL; + frag = NULL; + } + } while (item == NULL); - frag = (hm_fragment *)item->data; /* Don't return if reassembly still in progress */ if (frag->reassembly != NULL) @@ -1388,18 +1400,6 @@ dtls1_retransmit_message(SSL *s, unsigne return ret; } -/* call this function when the buffered messages are no longer needed */ -void dtls1_clear_record_buffer(SSL *s) -{ - pitem *item; - - for (item = pqueue_pop(s->d1->sent_messages); - item != NULL; item = pqueue_pop(s->d1->sent_messages)) { - dtls1_hm_fragment_free((hm_fragment *)item->data); - pitem_free(item); - } -} - unsigned char *dtls1_set_message_header(SSL *s, unsigned char *p, unsigned char mt, unsigned long len, unsigned long frag_off, Modified: releng/10.1/crypto/openssl/ssl/d1_clnt.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/d1_clnt.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/d1_clnt.c Fri Sep 23 07:48:34 2016 (r306230) @@ -740,6 +740,7 @@ int dtls1_connect(SSL *s) /* done with handshaking */ s->d1->handshake_read_seq = 0; s->d1->next_handshake_write_seq = 0; + dtls1_clear_received_buffer(s); goto end; /* break; */ Modified: releng/10.1/crypto/openssl/ssl/d1_lib.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/d1_lib.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/d1_lib.c Fri Sep 23 07:48:34 2016 (r306230) @@ -144,7 +144,6 @@ int dtls1_new(SSL *s) static void dtls1_clear_queues(SSL *s) { pitem *item = NULL; - hm_fragment *frag = NULL; DTLS1_RECORD_DATA *rdata; while ((item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL) { @@ -165,28 +164,44 @@ static void dtls1_clear_queues(SSL *s) pitem_free(item); } + while ((item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { + rdata = (DTLS1_RECORD_DATA *)item->data; + if (rdata->rbuf.buf) { + OPENSSL_free(rdata->rbuf.buf); + } + OPENSSL_free(item->data); + pitem_free(item); + } + + dtls1_clear_received_buffer(s); + dtls1_clear_sent_buffer(s); +} + +void dtls1_clear_received_buffer(SSL *s) +{ + pitem *item = NULL; + hm_fragment *frag = NULL; + while ((item = pqueue_pop(s->d1->buffered_messages)) != NULL) { frag = (hm_fragment *)item->data; dtls1_hm_fragment_free(frag); pitem_free(item); } +} + +void dtls1_clear_sent_buffer(SSL *s) +{ + pitem *item = NULL; + hm_fragment *frag = NULL; while ((item = pqueue_pop(s->d1->sent_messages)) != NULL) { frag = (hm_fragment *)item->data; dtls1_hm_fragment_free(frag); pitem_free(item); } - - while ((item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { - rdata = (DTLS1_RECORD_DATA *)item->data; - if (rdata->rbuf.buf) { - OPENSSL_free(rdata->rbuf.buf); - } - OPENSSL_free(item->data); - pitem_free(item); - } } + void dtls1_free(SSL *s) { ssl3_free(s); @@ -420,7 +435,7 @@ void dtls1_stop_timer(SSL *s) BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout)); /* Clear retransmission buffer */ - dtls1_clear_record_buffer(s); + dtls1_clear_sent_buffer(s); } int dtls1_check_timeout_num(SSL *s) Modified: releng/10.1/crypto/openssl/ssl/d1_pkt.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/d1_pkt.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/d1_pkt.c Fri Sep 23 07:48:34 2016 (r306230) @@ -194,7 +194,7 @@ static int dtls1_record_needs_buffering( #endif static int dtls1_buffer_record(SSL *s, record_pqueue *q, unsigned char *priority); -static int dtls1_process_record(SSL *s); +static int dtls1_process_record(SSL *s, DTLS1_BITMAP *bitmap); /* copy buffered record into SSL structure */ static int dtls1_copy_record(SSL *s, pitem *item) @@ -319,21 +319,70 @@ static int dtls1_retrieve_buffered_recor static int dtls1_process_buffered_records(SSL *s) { pitem *item; + SSL3_BUFFER *rb; + SSL3_RECORD *rr; + DTLS1_BITMAP *bitmap; + unsigned int is_next_epoch; + int replayok = 1; item = pqueue_peek(s->d1->unprocessed_rcds.q); if (item) { /* Check if epoch is current. */ if (s->d1->unprocessed_rcds.epoch != s->d1->r_epoch) - return (1); /* Nothing to do. */ + return 1; /* Nothing to do. */ + + rr = &s->s3->rrec; + rb = &s->s3->rbuf; + + if (rb->left > 0) { + /* + * We've still got data from the current packet to read. There could + * be a record from the new epoch in it - so don't overwrite it + * with the unprocessed records yet (we'll do it when we've + * finished reading the current packet). + */ + return 1; + } + /* Process all the records. */ while (pqueue_peek(s->d1->unprocessed_rcds.q)) { dtls1_get_unprocessed_record(s); - if (!dtls1_process_record(s)) - return (0); + bitmap = dtls1_get_bitmap(s, rr, &is_next_epoch); + if (bitmap == NULL) { + /* + * Should not happen. This will only ever be NULL when the + * current record is from a different epoch. But that cannot + * be the case because we already checked the epoch above + */ + SSLerr(SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS, + ERR_R_INTERNAL_ERROR); + return 0; + } +#ifndef OPENSSL_NO_SCTP + /* Only do replay check if no SCTP bio */ + if (!BIO_dgram_is_sctp(SSL_get_rbio(s))) +#endif + { + /* + * Check whether this is a repeat, or aged record. We did this + * check once already when we first received the record - but + * we might have updated the window since then due to + * records we subsequently processed. + */ + replayok = dtls1_record_replay_check(s, bitmap); + } + + if (!replayok || !dtls1_process_record(s, bitmap)) { + /* dump this record */ + rr->length = 0; + s->packet_length = 0; + continue; + } + if (dtls1_buffer_record(s, &(s->d1->processed_rcds), s->s3->rrec.seq_num) < 0) - return -1; + return 0; } } @@ -344,7 +393,7 @@ static int dtls1_process_buffered_record s->d1->processed_rcds.epoch = s->d1->r_epoch; s->d1->unprocessed_rcds.epoch = s->d1->r_epoch + 1; - return (1); + return 1; } #if 0 @@ -391,7 +440,7 @@ static int dtls1_get_buffered_record(SSL #endif -static int dtls1_process_record(SSL *s) +static int dtls1_process_record(SSL *s, DTLS1_BITMAP *bitmap) { int i, al; int enc_err; @@ -551,6 +600,10 @@ static int dtls1_process_record(SSL *s) /* we have pulled in a full packet so zero things */ s->packet_length = 0; + + /* Mark receipt of record. */ + dtls1_record_bitmap_update(s, bitmap); + return (1); f_err: @@ -581,11 +634,12 @@ int dtls1_get_record(SSL *s) rr = &(s->s3->rrec); + again: /* * The epoch may have changed. If so, process all the pending records. * This is a non-blocking operation. */ - if (dtls1_process_buffered_records(s) < 0) + if (!dtls1_process_buffered_records(s)) return -1; /* if we're renegotiating, then there may be buffered records */ @@ -593,7 +647,6 @@ int dtls1_get_record(SSL *s) return 1; /* get something from the wire */ - again: /* check if we have the header */ if ((s->rstate != SSL_ST_READ_BODY) || (s->packet_length < DTLS1_RT_HEADER_LENGTH)) { @@ -717,20 +770,17 @@ int dtls1_get_record(SSL *s) if (dtls1_buffer_record (s, &(s->d1->unprocessed_rcds), rr->seq_num) < 0) return -1; - /* Mark receipt of record. */ - dtls1_record_bitmap_update(s, bitmap); } rr->length = 0; s->packet_length = 0; goto again; } - if (!dtls1_process_record(s)) { + if (!dtls1_process_record(s, bitmap)) { rr->length = 0; s->packet_length = 0; /* dump this record */ goto again; /* get another record */ } - dtls1_record_bitmap_update(s, bitmap); /* Mark receipt of record. */ return (1); @@ -1814,8 +1864,13 @@ static DTLS1_BITMAP *dtls1_get_bitmap(SS if (rr->epoch == s->d1->r_epoch) return &s->d1->bitmap; - /* Only HM and ALERT messages can be from the next epoch */ + /* + * Only HM and ALERT messages can be from the next epoch and only if we + * have already processed all of the unprocessed records from the last + * epoch + */ else if (rr->epoch == (unsigned long)(s->d1->r_epoch + 1) && + s->d1->unprocessed_rcds.epoch != s->d1->r_epoch && (rr->type == SSL3_RT_HANDSHAKE || rr->type == SSL3_RT_ALERT)) { *is_next_epoch = 1; return &s->d1->next_bitmap; @@ -1894,6 +1949,12 @@ void dtls1_reset_seq_numbers(SSL *s, int s->d1->r_epoch++; memcpy(&(s->d1->bitmap), &(s->d1->next_bitmap), sizeof(DTLS1_BITMAP)); memset(&(s->d1->next_bitmap), 0x00, sizeof(DTLS1_BITMAP)); + + /* + * We must not use any buffered messages received from the previous + * epoch + */ + dtls1_clear_received_buffer(s); } else { seq = s->s3->write_sequence; memcpy(s->d1->last_write_sequence, seq, Modified: releng/10.1/crypto/openssl/ssl/d1_srvr.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/d1_srvr.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/d1_srvr.c Fri Sep 23 07:48:34 2016 (r306230) @@ -282,7 +282,7 @@ int dtls1_accept(SSL *s) case SSL3_ST_SW_HELLO_REQ_B: s->shutdown = 0; - dtls1_clear_record_buffer(s); + dtls1_clear_sent_buffer(s); dtls1_start_timer(s); ret = dtls1_send_hello_request(s); if (ret <= 0) @@ -845,6 +845,7 @@ int dtls1_accept(SSL *s) /* next message is server hello */ s->d1->handshake_write_seq = 0; s->d1->next_handshake_write_seq = 0; + dtls1_clear_received_buffer(s); goto end; /* break; */ Modified: releng/10.1/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/s3_clnt.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/s3_clnt.c Fri Sep 23 07:48:34 2016 (r306230) @@ -1143,6 +1143,12 @@ int ssl3_get_server_certificate(SSL *s) goto f_err; } for (nc = 0; nc < llen;) { + if (nc + 3 > llen) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE, + SSL_R_CERT_LENGTH_MISMATCH); + goto f_err; + } n2l3(p, l); if ((l + nc + 3) > llen) { al = SSL_AD_DECODE_ERROR; @@ -2046,6 +2052,11 @@ int ssl3_get_certificate_request(SSL *s) } for (nc = 0; nc < llen;) { + if (nc + 2 > llen) { + ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR); + SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST, SSL_R_CA_DN_TOO_LONG); + goto err; + } n2s(p, l); if ((l + nc + 2) > llen) { if ((s->options & SSL_OP_NETSCAPE_CA_DN_BUG)) Modified: releng/10.1/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/s3_srvr.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/s3_srvr.c Fri Sep 23 07:48:34 2016 (r306230) @@ -1041,7 +1041,7 @@ int ssl3_get_client_hello(SSL *s) session_length = *(p + SSL3_RANDOM_SIZE); - if (p + SSL3_RANDOM_SIZE + session_length + 1 >= d + n) { + if (SSL3_RANDOM_SIZE + session_length + 1 >= (d + n) - p) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -1059,7 +1059,7 @@ int ssl3_get_client_hello(SSL *s) /* get the session-id */ j = *(p++); - if (p + j > d + n) { + if ((d + n) - p < j) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -1109,14 +1109,14 @@ int ssl3_get_client_hello(SSL *s) if (s->version == DTLS1_VERSION || s->version == DTLS1_BAD_VER) { /* cookie stuff */ - if (p + 1 > d + n) { + if ((d + n) - p < 1) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; } cookie_len = *(p++); - if (p + cookie_len > d + n) { + if ((d + n ) - p < cookie_len) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -1162,7 +1162,7 @@ int ssl3_get_client_hello(SSL *s) p += cookie_len; } - if (p + 2 > d + n) { + if ((d + n ) - p < 2) { al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); goto f_err; @@ -1176,7 +1176,7 @@ int ssl3_get_client_hello(SSL *s) } /* i bytes of cipher data + 1 byte for compression length later */ - if ((p + i + 1) > (d + n)) { + if ((d + n) - p < i + 1) { /* not enough data */ al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); @@ -1242,7 +1242,7 @@ int ssl3_get_client_hello(SSL *s) /* compression */ i = *(p++); - if ((p + i) > (d + n)) { + if ((d + n) - p < i) { /* not enough data */ al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); @@ -1264,7 +1264,7 @@ int ssl3_get_client_hello(SSL *s) #ifndef OPENSSL_NO_TLSEXT /* TLS extensions */ if (s->version >= SSL3_VERSION) { - if (!ssl_parse_clienthello_tlsext(s, &p, d, n, &al)) { + if (!ssl_parse_clienthello_tlsext(s, &p, d + n, &al)) { /* 'al' set by ssl_parse_clienthello_tlsext */ SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_PARSE_TLSEXT); goto f_err; @@ -3218,6 +3218,12 @@ int ssl3_get_client_certificate(SSL *s) goto f_err; } for (nc = 0; nc < llen;) { + if (nc + 3 > llen) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE, + SSL_R_CERT_LENGTH_MISMATCH); + goto f_err; + } n2l3(p, l); if ((l + nc + 3) > llen) { al = SSL_AD_DECODE_ERROR; Modified: releng/10.1/crypto/openssl/ssl/ssl.h ============================================================================== --- releng/10.1/crypto/openssl/ssl/ssl.h Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/ssl.h Fri Sep 23 07:48:34 2016 (r306230) @@ -2256,6 +2256,7 @@ void ERR_load_SSL_strings(void); # define SSL_F_DTLS1_HEARTBEAT 305 # define SSL_F_DTLS1_OUTPUT_CERT_CHAIN 255 # define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288 +# define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 # define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE 256 # define SSL_F_DTLS1_PROCESS_RECORD 257 # define SSL_F_DTLS1_READ_BYTES 258 Modified: releng/10.1/crypto/openssl/ssl/ssl_err.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/ssl_err.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/ssl_err.c Fri Sep 23 07:48:34 2016 (r306230) @@ -1,6 +1,6 @@ /* ssl/ssl_err.c */ /* ==================================================================== - * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2016 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -93,6 +93,8 @@ static ERR_STRING_DATA SSL_str_functs[] {ERR_FUNC(SSL_F_DTLS1_HEARTBEAT), "DTLS1_HEARTBEAT"}, {ERR_FUNC(SSL_F_DTLS1_OUTPUT_CERT_CHAIN), "DTLS1_OUTPUT_CERT_CHAIN"}, {ERR_FUNC(SSL_F_DTLS1_PREPROCESS_FRAGMENT), "DTLS1_PREPROCESS_FRAGMENT"}, + {ERR_FUNC(SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS), + "DTLS1_PROCESS_BUFFERED_RECORDS"}, {ERR_FUNC(SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE), "DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE"}, {ERR_FUNC(SSL_F_DTLS1_PROCESS_RECORD), "DTLS1_PROCESS_RECORD"}, Modified: releng/10.1/crypto/openssl/ssl/ssl_locl.h ============================================================================== --- releng/10.1/crypto/openssl/ssl/ssl_locl.h Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/ssl_locl.h Fri Sep 23 07:48:34 2016 (r306230) @@ -1025,7 +1025,8 @@ int dtls1_retransmit_message(SSL *s, uns unsigned long frag_off, int *found); int dtls1_get_queue_priority(unsigned short seq, int is_ccs); int dtls1_retransmit_buffered_messages(SSL *s); -void dtls1_clear_record_buffer(SSL *s); +void dtls1_clear_received_buffer(SSL *s); +void dtls1_clear_sent_buffer(SSL *s); void dtls1_get_message_header(unsigned char *data, struct hm_header_st *msg_hdr); void dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr); @@ -1154,7 +1155,7 @@ unsigned char *ssl_add_clienthello_tlsex unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *buf, unsigned char *limit); int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **data, - unsigned char *d, int n, int *al); + unsigned char *limit, int *al); int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **data, unsigned char *d, int n, int *al); int ssl_prepare_clienthello_tlsext(SSL *s); Modified: releng/10.1/crypto/openssl/ssl/ssl_sess.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/ssl_sess.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/ssl_sess.c Fri Sep 23 07:48:34 2016 (r306230) @@ -605,7 +605,7 @@ int ssl_get_prev_session(SSL *s, unsigne if (len < 0 || len > SSL_MAX_SSL_SESSION_ID_LENGTH) goto err; - if (session_id + len > limit) { + if (limit - session_id < len) { fatal = 1; goto err; } Modified: releng/10.1/crypto/openssl/ssl/t1_lib.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/t1_lib.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/crypto/openssl/ssl/t1_lib.c Fri Sep 23 07:48:34 2016 (r306230) @@ -913,7 +913,7 @@ unsigned char *ssl_add_serverhello_tlsex * 10.8..10.8.3 (which don't work). */ static void ssl_check_for_safari(SSL *s, const unsigned char *data, - const unsigned char *d, int n) + const unsigned char *limit) { unsigned short type, size; static const unsigned char kSafariExtensionsBlock[] = { @@ -942,11 +942,11 @@ static void ssl_check_for_safari(SSL *s, 0x02, 0x03, /* SHA-1/ECDSA */ }; - if (data >= (d + n - 2)) + if (limit - data <= 2) return; data += 2; - if (data > (d + n - 4)) + if (limit - data < 4) return; n2s(data, type); n2s(data, size); @@ -954,7 +954,7 @@ static void ssl_check_for_safari(SSL *s, if (type != TLSEXT_TYPE_server_name) return; - if (data + size > d + n) + if (limit - data < size) return; data += size; @@ -962,7 +962,7 @@ static void ssl_check_for_safari(SSL *s, const size_t len1 = sizeof(kSafariExtensionsBlock); const size_t len2 = sizeof(kSafariTLS12ExtensionsBlock); - if (data + len1 + len2 != d + n) + if (limit - data != (int)(len1 + len2)) return; if (memcmp(data, kSafariExtensionsBlock, len1) != 0) return; @@ -971,7 +971,7 @@ static void ssl_check_for_safari(SSL *s, } else { const size_t len = sizeof(kSafariExtensionsBlock); - if (data + len != d + n) + if (limit - data != (int)(len)) return; if (memcmp(data, kSafariExtensionsBlock, len) != 0) return; @@ -981,8 +981,8 @@ static void ssl_check_for_safari(SSL *s, } # endif /* !OPENSSL_NO_EC */ -int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, - int n, int *al) +int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, + unsigned char *limit, int *al) { unsigned short type; unsigned short size; @@ -1004,7 +1004,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, # ifndef OPENSSL_NO_EC if (s->options & SSL_OP_SAFARI_ECDHE_ECDSA_BUG) - ssl_check_for_safari(s, data, d, n); + ssl_check_for_safari(s, data, limit); # endif /* !OPENSSL_NO_EC */ # ifndef OPENSSL_NO_SRP @@ -1016,22 +1016,22 @@ int ssl_parse_clienthello_tlsext(SSL *s, s->srtp_profile = NULL; - if (data == d + n) + if (data == limit) goto ri_check; - if (data > (d + n - 2)) + if (limit - data < 2) goto err; n2s(data, len); - if (data > (d + n - len)) + if (limit - data != len) goto err; - while (data <= (d + n - 4)) { + while (limit - data >= 4) { n2s(data, type); n2s(data, size); - if (data + size > (d + n)) + if (limit - data < size) goto err; # if 0 fprintf(stderr, "Received extension type %d size %d\n", type, size); @@ -1284,6 +1284,23 @@ int ssl_parse_clienthello_tlsext(SSL *s, size -= 2; if (dsize > size) goto err; + + /* + * We remove any OCSP_RESPIDs from a previous handshake + * to prevent unbounded memory growth - CVE-2016-6304 + */ + sk_OCSP_RESPID_pop_free(s->tlsext_ocsp_ids, + OCSP_RESPID_free); + if (dsize > 0) { + s->tlsext_ocsp_ids = sk_OCSP_RESPID_new_null(); + if (s->tlsext_ocsp_ids == NULL) { + *al = SSL_AD_INTERNAL_ERROR; + return 0; + } + } else { + s->tlsext_ocsp_ids = NULL; + } + while (dsize > 0) { OCSP_RESPID *id; int idsize; @@ -1303,13 +1320,6 @@ int ssl_parse_clienthello_tlsext(SSL *s, OCSP_RESPID_free(id); goto err; } - if (!s->tlsext_ocsp_ids - && !(s->tlsext_ocsp_ids = - sk_OCSP_RESPID_new_null())) { - OCSP_RESPID_free(id); - *al = SSL_AD_INTERNAL_ERROR; - return 0; - } if (!sk_OCSP_RESPID_push(s->tlsext_ocsp_ids, id)) { OCSP_RESPID_free(id); *al = SSL_AD_INTERNAL_ERROR; @@ -1396,7 +1406,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, } /* Spurious data on the end */ - if (data != d + n) + if (data != limit) goto err; *p = data; @@ -1460,20 +1470,20 @@ int ssl_parse_serverhello_tlsext(SSL *s, SSL_TLSEXT_HB_DONT_SEND_REQUESTS); # endif - if (data >= (d + n - 2)) + if ((d + n) - data <= 2) goto ri_check; n2s(data, length); - if (data + length != d + n) { + if ((d + n) - data != length) { *al = SSL_AD_DECODE_ERROR; return 0; } - while (data <= (d + n - 4)) { + while ((d + n) - data >= 4) { n2s(data, type); n2s(data, size); - if (data + size > (d + n)) + if ((d + n) - data < size) goto ri_check; if (s->tlsext_debug_cb) @@ -2181,29 +2191,33 @@ int tls1_process_ticket(SSL *s, unsigned /* Skip past DTLS cookie */ if (s->version == DTLS1_VERSION || s->version == DTLS1_BAD_VER) { i = *(p++); - p += i; - if (p >= limit) + + if (limit - p <= i) return -1; + + p += i; } /* Skip past cipher list */ n2s(p, i); - p += i; - if (p >= limit) + if (limit - p <= i) return -1; + p += i; + /* Skip past compression algorithm list */ i = *(p++); - p += i; - if (p > limit) + if (limit - p < i) return -1; + p += i; + /* Now at start of extensions */ - if ((p + 2) >= limit) + if (limit - p <= 2) return 0; n2s(p, i); - while ((p + 4) <= limit) { + while (limit - p >= 4) { unsigned short type, size; n2s(p, type); n2s(p, size); - if (p + size > limit) + if (limit - p < size) return 0; if (type == TLSEXT_TYPE_session_ticket) { int r; @@ -2271,9 +2285,7 @@ static int tls_decrypt_ticket(SSL *s, co HMAC_CTX hctx; EVP_CIPHER_CTX ctx; SSL_CTX *tctx = s->initial_ctx; - /* Need at least keyname + iv + some encrypted data */ - if (eticklen < 48) - return 2; + /* Initialize session ticket encryption and HMAC contexts */ HMAC_CTX_init(&hctx); EVP_CIPHER_CTX_init(&ctx); @@ -2305,6 +2317,13 @@ static int tls_decrypt_ticket(SSL *s, co EVP_CIPHER_CTX_cleanup(&ctx); return -1; } + /* Sanity check ticket length: must exceed keyname + IV + HMAC */ + if (eticklen <= 16 + EVP_CIPHER_CTX_iv_length(&ctx) + mlen) { + HMAC_CTX_cleanup(&hctx); + EVP_CIPHER_CTX_cleanup(&ctx); + return 2; + } + eticklen -= mlen; /* Check HMAC of encrypted ticket */ HMAC_Update(&hctx, etick, eticklen); Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.1/sys/conf/newvers.sh Fri Sep 23 07:48:34 2016 (r306230) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p37" +BRANCH="RELEASE-p38" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.2/UPDATING ============================================================================== --- releng/10.2/UPDATING Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.2/UPDATING Fri Sep 23 07:48:34 2016 (r306230) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160923 p21 FreeBSD-SA-16:26.openssl + + Fix multiple OpenSSL vulnerabilitites. + 20160725 p20 FreeBSD-SA-16:25.bspatch FreeBSD-EN-16:09.freebsd-update Modified: releng/10.2/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- releng/10.2/crypto/openssl/crypto/bn/bn_print.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.2/crypto/openssl/crypto/bn/bn_print.c Fri Sep 23 07:48:34 2016 (r306230) @@ -111,6 +111,7 @@ char *BN_bn2dec(const BIGNUM *a) char *p; BIGNUM *t = NULL; BN_ULONG *bn_data = NULL, *lp; + int bn_data_num; /*- * get an upper bound for the length of the decimal integer @@ -120,8 +121,8 @@ char *BN_bn2dec(const BIGNUM *a) */ i = BN_num_bits(a) * 3; num = (i / 10 + i / 1000 + 1) + 1; - bn_data = - (BN_ULONG *)OPENSSL_malloc((num / BN_DEC_NUM + 1) * sizeof(BN_ULONG)); + bn_data_num = num / BN_DEC_NUM + 1; + bn_data = OPENSSL_malloc(bn_data_num * sizeof(BN_ULONG)); buf = (char *)OPENSSL_malloc(num + 3); if ((buf == NULL) || (bn_data == NULL)) { BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); @@ -143,7 +144,11 @@ char *BN_bn2dec(const BIGNUM *a) i = 0; while (!BN_is_zero(t)) { *lp = BN_div_word(t, BN_DEC_CONV); + if (*lp == (BN_ULONG)-1) + goto err; lp++; + if (lp - bn_data >= bn_data_num) + goto err; } lp--; /* Modified: releng/10.2/crypto/openssl/crypto/dsa/dsa_ossl.c ============================================================================== --- releng/10.2/crypto/openssl/crypto/dsa/dsa_ossl.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.2/crypto/openssl/crypto/dsa/dsa_ossl.c Fri Sep 23 07:48:34 2016 (r306230) @@ -247,11 +247,13 @@ static int dsa_sign_setup(DSA *dsa, BN_C do if (!BN_rand_range(&k, dsa->q)) goto err; - while (BN_is_zero(&k)) ; + while (BN_is_zero(&k)); + if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0) { BN_set_flags(&k, BN_FLG_CONSTTIME); } + if (dsa->flags & DSA_FLAG_CACHE_MONT_P) { if (!BN_MONT_CTX_set_locked(&dsa->method_mont_p, CRYPTO_LOCK_DSA, dsa->p, ctx)) @@ -264,6 +266,8 @@ static int dsa_sign_setup(DSA *dsa, BN_C if (!BN_copy(&kq, &k)) goto err; + BN_set_flags(&kq, BN_FLG_CONSTTIME); + /* * We do not want timing information to leak the length of k, so we * compute g^k using an equivalent exponent of fixed length. (This @@ -282,6 +286,7 @@ static int dsa_sign_setup(DSA *dsa, BN_C } else { K = &k; } + DSA_BN_MOD_EXP(goto err, dsa, r, dsa->g, K, dsa->p, ctx, dsa->method_mont_p); if (!BN_mod(r, r, dsa->q, ctx)) Modified: releng/10.2/crypto/openssl/crypto/mdc2/mdc2dgst.c ============================================================================== --- releng/10.2/crypto/openssl/crypto/mdc2/mdc2dgst.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.2/crypto/openssl/crypto/mdc2/mdc2dgst.c Fri Sep 23 07:48:34 2016 (r306230) @@ -91,7 +91,7 @@ int MDC2_Update(MDC2_CTX *c, const unsig i = c->num; if (i != 0) { - if (i + len < MDC2_BLOCK) { + if (len < MDC2_BLOCK - i) { /* partial block */ memcpy(&(c->data[i]), in, len); c->num += (int)len; Modified: releng/10.2/crypto/openssl/crypto/ts/ts_lib.c ============================================================================== --- releng/10.2/crypto/openssl/crypto/ts/ts_lib.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.2/crypto/openssl/crypto/ts/ts_lib.c Fri Sep 23 07:48:34 2016 (r306230) @@ -90,9 +90,8 @@ int TS_OBJ_print_bio(BIO *bio, const ASN { char obj_txt[128]; - int len = OBJ_obj2txt(obj_txt, sizeof(obj_txt), obj, 0); - BIO_write(bio, obj_txt, len); - BIO_write(bio, "\n", 1); + OBJ_obj2txt(obj_txt, sizeof(obj_txt), obj, 0); + BIO_printf(bio, "%s\n", obj_txt); return 1; } Modified: releng/10.2/crypto/openssl/ssl/d1_both.c ============================================================================== --- releng/10.2/crypto/openssl/ssl/d1_both.c Fri Sep 23 07:44:10 2016 (r306229) +++ releng/10.2/crypto/openssl/ssl/d1_both.c Fri Sep 23 07:48:34 2016 (r306230) @@ -586,11 +586,23 @@ static int dtls1_retrieve_buffered_fragm int al; *ok = 0; - item = pqueue_peek(s->d1->buffered_messages); - if (item == NULL) - return 0; + do { + item = pqueue_peek(s->d1->buffered_messages); + if (item == NULL) + return 0; + + frag = (hm_fragment *)item->data; + + if (frag->msg_header.seq < s->d1->handshake_read_seq) { + /* This is a stale message that has been buffered so clear it */ + pqueue_pop(s->d1->buffered_messages); + dtls1_hm_fragment_free(frag); + pitem_free(item); + item = NULL; + frag = NULL; + } + } while (item == NULL); - frag = (hm_fragment *)item->data; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Sep 23 07:51:03 2016 Return-Path: Delivered-To: svn-src-all@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 13C54BE52E1; Fri, 23 Sep 2016 07:51:03 +0000 (UTC) (envelope-from br@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 CB8DD154; Fri, 23 Sep 2016 07:51:02 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N7p1Kf035544; Fri, 23 Sep 2016 07:51:01 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N7p1Mh035543; Fri, 23 Sep 2016 07:51:01 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609230751.u8N7p1Mh035543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 23 Sep 2016 07:51:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306231 - head/tests/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 07:51:03 -0000 Author: br Date: Fri Sep 23 07:51:01 2016 New Revision: 306231 URL: https://svnweb.freebsd.org/changeset/base/306231 Log: Check if IPv6 supported before running the test, skip otherwise. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/tests/etc/rc.d/routing_test.sh Modified: head/tests/etc/rc.d/routing_test.sh ============================================================================== --- head/tests/etc/rc.d/routing_test.sh Fri Sep 23 07:48:34 2016 (r306230) +++ head/tests/etc/rc.d/routing_test.sh Fri Sep 23 07:51:01 2016 (r306231) @@ -58,6 +58,10 @@ static_ipv6_loopback_route_for_each_fib_ local nfibs fib nfibs=`sysctl -n net.fibs` + if [ "`sysctl -in kern.features.inet6`" != "1" ]; then + atf_skip "This test requires IPv6 support" + fi + # Check for an IPv6 loopback route for fib in `seq 0 $((${nfibs} - 1))`; do atf_check -o match:"interface: lo0" -s exit:0 \ From owner-svn-src-all@freebsd.org Fri Sep 23 08:13:47 2016 Return-Path: Delivered-To: svn-src-all@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 71431BE6C83; Fri, 23 Sep 2016 08:13:47 +0000 (UTC) (envelope-from oshogbo@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 423F1D91; Fri, 23 Sep 2016 08:13:47 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8Dk5G045713; Fri, 23 Sep 2016 08:13:46 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8DkjF045712; Fri, 23 Sep 2016 08:13:46 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201609230813.u8N8DkjF045712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 23 Sep 2016 08:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306232 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:13:47 -0000 Author: oshogbo Date: Fri Sep 23 08:13:46 2016 New Revision: 306232 URL: https://svnweb.freebsd.org/changeset/base/306232 Log: fd: fix up fget_cap If the kernel is not compiled with the CAPABILITIES kernel options fget_unlocked doesn't return the sequence number so fd_modify will always report modification, in that case we got infinity loop. Reported by: br Reviewed by: mjg Tested by: br, def Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Sep 23 07:51:01 2016 (r306231) +++ head/sys/kern/kern_descrip.c Fri Sep 23 08:13:46 2016 (r306232) @@ -2480,12 +2480,16 @@ int fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp) { - struct filedesc *fdp; - struct file *fp; + struct filedesc *fdp = td->td_proc->p_fd; int error; +#ifndef CAPABILITIES + error = fget_unlocked(fdp, fd, needrightsp, fpp, NULL); + if (error == 0 && havecapsp != NULL) + filecaps_fill(havecapsp); +#else + struct file *fp; seq_t seq; - fdp = td->td_proc->p_fd; for (;;) { error = fget_unlocked(fdp, fd, needrightsp, &fp, &seq); if (error != 0) @@ -2513,7 +2517,7 @@ get_locked: if (error == 0) fhold(*fpp); FILEDESC_SUNLOCK(fdp); - +#endif return (error); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:17:54 2016 Return-Path: Delivered-To: svn-src-all@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 E7B78BE6ECB; Fri, 23 Sep 2016 08:17:53 +0000 (UTC) (envelope-from hselasky@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 B4DC711F; Fri, 23 Sep 2016 08:17:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8Hrmk046041; Fri, 23 Sep 2016 08:17:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8HqWK046028; Fri, 23 Sep 2016 08:17:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230817.u8N8HqWK046028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:17: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: r306233 - in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:17:54 -0000 Author: hselasky Date: Fri Sep 23 08:17:51 2016 New Revision: 306233 URL: https://svnweb.freebsd.org/changeset/base/306233 Log: MFC r305867: Update the MLX5 core module: - Add new firmware commands and update existing ones. - Add more firmware related structures and update existing ones. - Some minor fixes, like adding missing \n to some prints. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/cq.h stable/11/sys/dev/mlx5/device.h stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/flow_table.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_cq.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_fw.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_mr.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_qp.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_srq.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_transobj.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_uar.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c stable/11/sys/dev/mlx5/mlx5_core/transobj.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_ifc.h stable/11/sys/dev/mlx5/qp.h stable/11/sys/dev/mlx5/vport.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/cq.h ============================================================================== --- stable/11/sys/dev/mlx5/cq.h Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/cq.h Fri Sep 23 08:17:51 2016 (r306233) @@ -49,6 +49,8 @@ struct mlx5_core_cq { unsigned arm_sn; struct mlx5_rsc_debug *dbg; int pid; + int reset_notify_added; + struct list_head reset_notify; }; Modified: stable/11/sys/dev/mlx5/device.h ============================================================================== --- stable/11/sys/dev/mlx5/device.h Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/device.h Fri Sep 23 08:17:51 2016 (r306233) @@ -57,6 +57,7 @@ #define MLX5_FLD_SZ_BYTES(typ, fld) (__mlx5_bit_sz(typ, fld) / 8) #define MLX5_ST_SZ_BYTES(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 8) #define MLX5_ST_SZ_DW(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 32) +#define MLX5_ST_SZ_QW(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 64) #define MLX5_UN_SZ_BYTES(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 8) #define MLX5_UN_SZ_DW(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 32) #define MLX5_BYTE_OFF(typ, fld) (__mlx5_bit_off(typ, fld) / 8) @@ -112,6 +113,10 @@ enum { }; enum { + MLX5_CQ_FLAGS_OI = 2, +}; + +enum { MLX5_STAT_RATE_OFFSET = 5, }; @@ -129,6 +134,10 @@ enum { }; enum { + MLX5_MKEY_INBOX_PG_ACCESS = 1 << 31 +}; + +enum { MLX5_PERM_LOCAL_READ = 1 << 2, MLX5_PERM_LOCAL_WRITE = 1 << 3, MLX5_PERM_REMOTE_READ = 1 << 4, @@ -184,6 +193,25 @@ enum { }; enum { + MLX5_UMR_TRANSLATION_OFFSET_EN = (1 << 4), + + MLX5_UMR_CHECK_NOT_FREE = (1 << 5), + MLX5_UMR_CHECK_FREE = (2 << 5), + + MLX5_UMR_INLINE = (1 << 7), +}; + +#define MLX5_UMR_MTT_ALIGNMENT 0x40 +#define MLX5_UMR_MTT_MASK (MLX5_UMR_MTT_ALIGNMENT - 1) +#define MLX5_UMR_MTT_MIN_CHUNK_SIZE MLX5_UMR_MTT_ALIGNMENT + +enum { + MLX5_EVENT_QUEUE_TYPE_QP = 0, + MLX5_EVENT_QUEUE_TYPE_RQ = 1, + MLX5_EVENT_QUEUE_TYPE_SQ = 2, +}; + +enum { MLX5_PORT_CHANGE_SUBTYPE_DOWN = 1, MLX5_PORT_CHANGE_SUBTYPE_ACTIVE = 4, MLX5_PORT_CHANGE_SUBTYPE_INITIALIZED = 5, @@ -194,19 +222,28 @@ enum { }; enum { + MLX5_DCBX_EVENT_SUBTYPE_ERROR_STATE_DCBX = 1, + MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_CHANGE, + MLX5_DCBX_EVENT_SUBTYPE_LOCAL_OPER_CHANGE, + MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_APP_PRIORITY_CHANGE, + MLX5_MAX_INLINE_RECEIVE_SIZE = 64 +}; + +enum { MLX5_DEV_CAP_FLAG_XRC = 1LL << 3, MLX5_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1LL << 8, MLX5_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9, MLX5_DEV_CAP_FLAG_APM = 1LL << 17, - MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18, MLX5_DEV_CAP_FLAG_SCQE_BRK_MOD = 1LL << 21, MLX5_DEV_CAP_FLAG_BLOCK_MCAST = 1LL << 23, MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29, MLX5_DEV_CAP_FLAG_RESIZE_CQ = 1LL << 30, + MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 33, MLX5_DEV_CAP_FLAG_ROCE = 1LL << 34, MLX5_DEV_CAP_FLAG_DCT = 1LL << 37, MLX5_DEV_CAP_FLAG_SIG_HAND_OVER = 1LL << 40, MLX5_DEV_CAP_FLAG_CMDIF_CSUM = 3LL << 46, + MLX5_DEV_CAP_FLAG_DRAIN_SIGERR = 1LL << 48, }; enum { @@ -263,6 +300,7 @@ enum { MLX5_OPCODE_UMR = 0x25, + MLX5_OPCODE_SIGNATURE_CANCELED = (1 << 15), }; enum { @@ -299,6 +337,18 @@ struct mlx5_outbox_hdr { __be32 syndrome; }; +struct mlx5_cmd_set_dc_cnak_mbox_in { + struct mlx5_inbox_hdr hdr; + u8 enable; + u8 reserved[47]; + __be64 pa; +}; + +struct mlx5_cmd_set_dc_cnak_mbox_out { + struct mlx5_outbox_hdr hdr; + u8 rsvd[8]; +}; + struct mlx5_cmd_layout { u8 type; u8 rsvd0[3]; @@ -339,9 +389,12 @@ struct mlx5_init_seg { __be32 rsvd1[120]; __be32 initializing; struct mlx5_health_buffer health; - __be32 rsvd2[884]; + __be32 rsvd2[880]; + __be32 internal_timer_h; + __be32 internal_timer_l; + __be32 rsvd3[2]; __be32 health_counter; - __be32 rsvd3[1019]; + __be32 rsvd4[1019]; __be64 ieee1588_clk; __be32 ieee1588_clk_type; __be32 clr_intx; @@ -420,6 +473,7 @@ enum { MLX5_MODULE_EVENT_ERROR_ENFORCE_PART_NUMBER_LIST = 0x4, MLX5_MODULE_EVENT_ERROR_UNKNOWN_IDENTIFIER = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, + MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, }; struct mlx5_eqe_port_module_event { @@ -832,6 +886,10 @@ struct mlx5_query_eq_mbox_out { struct mlx5_eq_context ctx; }; +enum { + MLX5_MKEY_STATUS_FREE = 1 << 6, +}; + struct mlx5_mkey_seg { /* This is a two bit field occupying bits 31-30. * bit 31 is always 0, @@ -868,7 +926,7 @@ struct mlx5_query_special_ctxs_mbox_out struct mlx5_create_mkey_mbox_in { struct mlx5_inbox_hdr hdr; __be32 input_mkey_index; - u8 rsvd0[4]; + __be32 flags; struct mlx5_mkey_seg seg; u8 rsvd1[16]; __be32 xlat_oct_act_size; @@ -971,6 +1029,17 @@ struct mlx5_destroy_psv_out { u8 rsvd[8]; }; +static inline int mlx5_host_is_le(void) +{ +#if defined(__LITTLE_ENDIAN) + return 1; +#elif defined(__BIG_ENDIAN) + return 0; +#else +#error Host endianness not defined +#endif +} + #define MLX5_CMD_OP_MAX 0x939 enum { @@ -1008,6 +1077,8 @@ enum { MLX5_FLOW_TABLE_TYPE_EGRESS_ACL = 2, MLX5_FLOW_TABLE_TYPE_INGRESS_ACL = 3, MLX5_FLOW_TABLE_TYPE_ESWITCH = 4, + MLX5_FLOW_TABLE_TYPE_SNIFFER_RX = 5, + MLX5_FLOW_TABLE_TYPE_SNIFFER_TX = 6, }; enum { @@ -1062,6 +1133,10 @@ enum mlx5_cap_type { MLX5_CAP_FLOW_TABLE, MLX5_CAP_ESWITCH_FLOW_TABLE, MLX5_CAP_ESWITCH, + MLX5_CAP_SNAPSHOT, + MLX5_CAP_VECTOR_CALC, + MLX5_CAP_QOS, + MLX5_CAP_DEBUG, /* NUM OF CAP Types */ MLX5_CAP_NUM }; @@ -1107,21 +1182,23 @@ enum mlx5_cap_type { MLX5_GET(flow_table_eswitch_cap, \ mdev->hca_caps_max[MLX5_CAP_ESWITCH_FLOW_TABLE], cap) -#define MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE(dev, \ - flow_table_properties_esw_acl_egress.cap) - -#define MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL_MAX(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE_MAX(dev, \ - flow_table_properties_esw_acl_egress.cap) - -#define MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE(dev, \ - flow_table_properties_esw_acl_ingress.cap) - -#define MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL_MAX(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE_MAX(dev, \ - flow_table_properties_esw_acl_ingress.cap) +#define MLX5_CAP_ESW_FLOWTABLE_FDB(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE(mdev, flow_table_properties_nic_esw_fdb.cap) + +#define MLX5_CAP_ESW_FLOWTABLE_FDB_MAX(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, flow_table_properties_nic_esw_fdb.cap) + +#define MLX5_CAP_ESW_EGRESS_ACL(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE(mdev, flow_table_properties_esw_acl_egress.cap) + +#define MLX5_CAP_ESW_EGRESS_ACL_MAX(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, flow_table_properties_esw_acl_egress.cap) + +#define MLX5_CAP_ESW_INGRESS_ACL(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE(mdev, flow_table_properties_esw_acl_ingress.cap) + +#define MLX5_CAP_ESW_INGRESS_ACL_MAX(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, flow_table_properties_esw_acl_ingress.cap) #define MLX5_CAP_ESW(mdev, cap) \ MLX5_GET(e_switch_cap, \ @@ -1137,6 +1214,38 @@ enum mlx5_cap_type { #define MLX5_CAP_ODP_MAX(mdev, cap)\ MLX5_GET(odp_cap, mdev->hca_caps_max[MLX5_CAP_ODP], cap) +#define MLX5_CAP_SNAPSHOT(mdev, cap) \ + MLX5_GET(snapshot_cap, \ + mdev->hca_caps_cur[MLX5_CAP_SNAPSHOT], cap) + +#define MLX5_CAP_SNAPSHOT_MAX(mdev, cap) \ + MLX5_GET(snapshot_cap, \ + mdev->hca_caps_max[MLX5_CAP_SNAPSHOT], cap) + +#define MLX5_CAP_EOIB_OFFLOADS(mdev, cap) \ + MLX5_GET(per_protocol_networking_offload_caps,\ + mdev->hca_caps_cur[MLX5_CAP_EOIB_OFFLOADS], cap) + +#define MLX5_CAP_EOIB_OFFLOADS_MAX(mdev, cap) \ + MLX5_GET(per_protocol_networking_offload_caps,\ + mdev->hca_caps_max[MLX5_CAP_EOIB_OFFLOADS], cap) + +#define MLX5_CAP_DEBUG(mdev, cap) \ + MLX5_GET(debug_cap, \ + mdev->hca_caps_cur[MLX5_CAP_DEBUG], cap) + +#define MLX5_CAP_DEBUG_MAX(mdev, cap) \ + MLX5_GET(debug_cap, \ + mdev->hca_caps_max[MLX5_CAP_DEBUG], cap) + +#define MLX5_CAP_QOS(mdev, cap) \ + MLX5_GET(qos_cap,\ + mdev->hca_caps_cur[MLX5_CAP_QOS], cap) + +#define MLX5_CAP_QOS_MAX(mdev, cap) \ + MLX5_GET(qos_cap,\ + mdev->hca_caps_max[MLX5_CAP_QOS], cap) + enum { MLX5_CMD_STAT_OK = 0x0, MLX5_CMD_STAT_INT_ERR = 0x1, @@ -1168,6 +1277,22 @@ enum { }; enum { + MLX5_PCIE_PERFORMANCE_COUNTERS_GROUP = 0x0, + MLX5_PCIE_LANE_COUNTERS_GROUP = 0x1, + MLX5_PCIE_TIMERS_AND_STATES_COUNTERS_GROUP = 0x2, +}; + +enum { + MLX5_NUM_UUARS_PER_PAGE = MLX5_NON_FP_BF_REGS_PER_PAGE, + MLX5_DEF_TOT_UUARS = 8 * MLX5_NUM_UUARS_PER_PAGE, +}; + +enum { + NUM_DRIVER_UARS = 4, + NUM_LOW_LAT_UUARS = 4, +}; + +enum { MLX5_CAP_PORT_TYPE_IB = 0x0, MLX5_CAP_PORT_TYPE_ETH = 0x1, }; @@ -1252,4 +1377,7 @@ static inline int mlx5_get_cqe_format(co return (cqe->op_own & MLX5E_CQE_FORMAT_MASK) >> 2; } +/* 8 regular priorities + 1 for multicast */ +#define MLX5_NUM_BYPASS_FTS 9 + #endif /* MLX5_DEVICE_H */ Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/driver.h Fri Sep 23 08:17:51 2016 (r306233) @@ -42,16 +42,15 @@ #include #include +#define MLX5_QCOUNTER_SETS_NETDEV 64 + enum { MLX5_BOARD_ID_LEN = 64, MLX5_MAX_NAME_LEN = 16, }; enum { - /* one minute for the sake of bringup. Generally, commands must always - * complete and we may need to increase this timeout value - */ - MLX5_CMD_TIMEOUT_MSEC = 7200 * 1000, + MLX5_CMD_TIMEOUT_MSEC = 8 * 60 * 1000, MLX5_CMD_WQ_MAX_NAME = 32, }; @@ -85,20 +84,44 @@ enum { }; enum { - MLX5_ATOMIC_MODE_IB_COMP = 1 << 16, - MLX5_ATOMIC_MODE_CX = 2 << 16, - MLX5_ATOMIC_MODE_8B = 3 << 16, - MLX5_ATOMIC_MODE_16B = 4 << 16, - MLX5_ATOMIC_MODE_32B = 5 << 16, - MLX5_ATOMIC_MODE_64B = 6 << 16, - MLX5_ATOMIC_MODE_128B = 7 << 16, - MLX5_ATOMIC_MODE_256B = 8 << 16, + MLX5_ATOMIC_MODE_OFF = 16, + MLX5_ATOMIC_MODE_NONE = 0 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_IB_COMP = 1 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_CX = 2 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_8B = 3 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_16B = 4 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_32B = 5 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_64B = 6 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_128B = 7 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_256B = 8 << MLX5_ATOMIC_MODE_OFF, +}; + +enum { + MLX5_ATOMIC_MODE_DCT_OFF = 20, + MLX5_ATOMIC_MODE_DCT_NONE = 0 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_IB_COMP = 1 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_CX = 2 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_8B = 3 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_16B = 4 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_32B = 5 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_64B = 6 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_128B = 7 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_256B = 8 << MLX5_ATOMIC_MODE_DCT_OFF, +}; + +enum { + MLX5_ATOMIC_OPS_CMP_SWAP = 1 << 0, + MLX5_ATOMIC_OPS_FETCH_ADD = 1 << 1, + MLX5_ATOMIC_OPS_MASKED_CMP_SWAP = 1 << 2, + MLX5_ATOMIC_OPS_MASKED_FETCH_ADD = 1 << 3, }; enum { MLX5_REG_QETCR = 0x4005, MLX5_REG_QPDP = 0x4007, MLX5_REG_QTCT = 0x400A, + MLX5_REG_DCBX_PARAM = 0x4020, + MLX5_REG_DCBX_APP = 0x4021, MLX5_REG_PCAP = 0x5001, MLX5_REG_PMTU = 0x5003, MLX5_REG_PTYS = 0x5004, @@ -116,6 +139,7 @@ enum { MLX5_REG_NODE_DESC = 0x6001, MLX5_REG_HOST_ENDIANNESS = 0x7004, MLX5_REG_MCIA = 0x9014, + MLX5_REG_MPCNT = 0x9051, }; enum dbg_rsc_type { @@ -124,6 +148,12 @@ enum dbg_rsc_type { MLX5_DBG_RSC_CQ, }; +enum { + MLX5_INTERFACE_PROTOCOL_IB = 0, + MLX5_INTERFACE_PROTOCOL_ETH = 1, + MLX5_INTERFACE_NUMBER = 2, +}; + struct mlx5_field_desc { struct dentry *dent; int i; @@ -147,6 +177,10 @@ enum mlx5_dev_event { MLX5_DEV_EVENT_GUID_CHANGE, MLX5_DEV_EVENT_CLIENT_REREG, MLX5_DEV_EVENT_VPORT_CHANGE, + MLX5_DEV_EVENT_ERROR_STATE_DCBX, + MLX5_DEV_EVENT_REMOTE_CONFIG_CHANGE, + MLX5_DEV_EVENT_LOCAL_OPER_CHANGE, + MLX5_DEV_EVENT_REMOTE_CONFIG_APPLICATION_PRIORITY_CHANGE, }; enum mlx5_port_status { @@ -375,9 +409,12 @@ struct mlx5_core_mr { }; enum mlx5_res_type { - MLX5_RES_QP, - MLX5_RES_SRQ, - MLX5_RES_XSRQ, + MLX5_RES_QP = MLX5_EVENT_QUEUE_TYPE_QP, + MLX5_RES_RQ = MLX5_EVENT_QUEUE_TYPE_RQ, + MLX5_RES_SQ = MLX5_EVENT_QUEUE_TYPE_SQ, + MLX5_RES_SRQ = 3, + MLX5_RES_XSRQ = 4, + MLX5_RES_DCT = 5, }; struct mlx5_core_rsc_common { @@ -413,8 +450,6 @@ struct mlx5_eq_table { struct mlx5_uar { u32 index; - struct list_head bf_list; - unsigned free_bf_bmap; void __iomem *bf_map; void __iomem *map; }; @@ -461,7 +496,7 @@ struct mlx5_srq_table { struct mlx5_mr_table { /* protect radix tree */ - rwlock_t lock; + spinlock_t lock; struct radix_tree_root tree; }; @@ -483,7 +518,7 @@ struct mlx5_priv { struct workqueue_struct *pg_wq; struct rb_root page_root; int fw_pages; - int reg_pages; + atomic_t reg_pages; struct list_head free_list; struct mlx5_core_health health; @@ -521,6 +556,12 @@ struct mlx5_priv { struct list_head dev_list; struct list_head ctx_list; spinlock_t ctx_lock; + unsigned long pci_dev_data; +}; + +enum mlx5_device_state { + MLX5_DEVICE_STATE_UP, + MLX5_DEVICE_STATE_INTERNAL_ERROR, }; struct mlx5_special_contexts { @@ -535,6 +576,7 @@ struct mlx5_core_dev { u32 hca_caps_cur[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; u32 hca_caps_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; struct mlx5_init_seg __iomem *iseg; + enum mlx5_device_state state; void (*event) (struct mlx5_core_dev *dev, enum mlx5_dev_event event, unsigned long param); @@ -544,6 +586,7 @@ struct mlx5_core_dev { u32 issi; struct mlx5_special_contexts special_contexts; unsigned int module_status[MLX5_MAX_PORTS]; + u32 num_q_counter_allocated[MLX5_INTERFACE_NUMBER]; }; enum { @@ -573,6 +616,8 @@ struct mlx5_net_counters { }; struct mlx5_ptys_reg { + u8 an_dis_admin; + u8 an_dis_ap; u8 local_port; u8 proto_mask; u32 eth_proto_cap; @@ -620,6 +665,15 @@ enum { MLX5_DB_PER_PAGE = PAGE_SIZE / L1_CACHE_BYTES, }; +struct mlx5_core_dct { + struct mlx5_core_rsc_common common; /* must be first */ + void (*event)(struct mlx5_core_dct *, int); + int dctn; + struct completion drained; + struct mlx5_rsc_debug *dbg; + int pid; +}; + enum { MLX5_COMP_EQ_SIZE = 1024, }; @@ -725,9 +779,14 @@ static inline void *mlx5_vzalloc(unsigne return rtn; } -static inline u32 mlx5_base_mkey(const u32 key) +static inline void *mlx5_vmalloc(unsigned long size) { - return key & 0xffffff00u; + void *rtn; + + rtn = kmalloc(size, GFP_KERNEL | __GFP_NOWARN); + if (!rtn) + rtn = vmalloc(size); + return rtn; } int mlx5_cmd_init(struct mlx5_core_dev *dev); @@ -809,6 +868,8 @@ int mlx5_stop_eqs(struct mlx5_core_dev * int mlx5_vector2eqn(struct mlx5_core_dev *dev, int vector, int *eqn, int *irqn); int mlx5_core_attach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn); int mlx5_core_detach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn); +int mlx5_core_set_dc_cnak_trace(struct mlx5_core_dev *dev, int enable, + u64 addr); int mlx5_qp_debugfs_init(struct mlx5_core_dev *dev); void mlx5_qp_debugfs_cleanup(struct mlx5_core_dev *dev); @@ -816,11 +877,16 @@ int mlx5_core_access_reg(struct mlx5_cor int size_in, void *data_out, int size_out, u16 reg_num, int arg, int write); +void mlx5_toggle_port_link(struct mlx5_core_dev *dev); int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, int ptys_size, int proto_mask); int mlx5_query_port_proto_cap(struct mlx5_core_dev *dev, u32 *proto_cap, int proto_mask); +int mlx5_query_port_autoneg(struct mlx5_core_dev *dev, int proto_mask, + u8 *an_disable_cap, u8 *an_disable_status); +int mlx5_set_port_autoneg(struct mlx5_core_dev *dev, bool disable, + u32 eth_proto_admin, int proto_mask); int mlx5_query_port_proto_admin(struct mlx5_core_dev *dev, u32 *proto_admin, int proto_mask); int mlx5_set_port_proto(struct mlx5_core_dev *dev, u32 proto_admin, @@ -828,10 +894,14 @@ int mlx5_set_port_proto(struct mlx5_core int mlx5_set_port_status(struct mlx5_core_dev *dev, enum mlx5_port_status status); int mlx5_query_port_status(struct mlx5_core_dev *dev, u8 *status); +int mlx5_query_port_admin_status(struct mlx5_core_dev *dev, + enum mlx5_port_status *status); int mlx5_set_port_pause(struct mlx5_core_dev *dev, u32 port, u32 rx_pause, u32 tx_pause); int mlx5_query_port_pause(struct mlx5_core_dev *dev, u32 port, u32 *rx_pause, u32 *tx_pause); +int mlx5_set_port_pfc(struct mlx5_core_dev *dev, u8 pfc_en_tx, u8 pfc_en_rx); +int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 *pfc_en_tx, u8 *pfc_en_rx); int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu); int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu); @@ -884,6 +954,9 @@ int mlx5_modify_port_cong_params(struct void *in, int in_size); int mlx5_query_port_cong_statistics(struct mlx5_core_dev *mdev, int clear, void *out, int out_size); +int mlx5_set_diagnostics(struct mlx5_core_dev *mdev, void *in, int in_size); +int mlx5_query_diagnostics(struct mlx5_core_dev *mdev, u8 num_of_samples, + u16 sample_index, void *out, int out_size); static inline u32 mlx5_mkey_to_idx(u32 mkey) { return mkey >> 8; @@ -905,12 +978,7 @@ enum { }; enum { - MAX_MR_CACHE_ENTRIES = 16, -}; - -enum { - MLX5_INTERFACE_PROTOCOL_IB = 0, - MLX5_INTERFACE_PROTOCOL_ETH = 1, + MAX_MR_CACHE_ENTRIES = 15, }; struct mlx5_interface { @@ -936,6 +1004,14 @@ struct mlx5_profile { } mr_cache[MAX_MR_CACHE_ENTRIES]; }; +enum { + MLX5_PCI_DEV_IS_VF = 1 << 0, +}; + +static inline int mlx5_core_is_pf(struct mlx5_core_dev *dev) +{ + return !(dev->priv.pci_dev_data & MLX5_PCI_DEV_IS_VF); +} #define MLX5_EEPROM_MAX_BYTES 32 #define MLX5_EEPROM_IDENTIFIER_BYTE_MASK 0x000000ff Modified: stable/11/sys/dev/mlx5/flow_table.h ============================================================================== --- stable/11/sys/dev/mlx5/flow_table.h Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/flow_table.h Fri Sep 23 08:17:51 2016 (r306233) @@ -30,6 +30,9 @@ #include +#define MLX5_SET_FLOW_TABLE_ROOT_OPMOD_SET 0x0 +#define MLX5_SET_FLOW_TABLE_ROOT_OPMOD_RESET 0x1 + struct mlx5_flow_table_group { u8 log_sz; u8 match_criteria_enable; @@ -44,7 +47,10 @@ void mlx5_destroy_flow_table(void *flow_ int mlx5_add_flow_table_entry(void *flow_table, u8 match_criteria_enable, void *match_criteria, void *flow_context, u32 *flow_index); -void mlx5_del_flow_table_entry(void *flow_table, u32 flow_index); +int mlx5_del_flow_table_entry(void *flow_table, u32 flow_index); u32 mlx5_get_flow_table_id(void *flow_table); +int mlx5_set_flow_table_root(struct mlx5_core_dev *mdev, u16 op_mod, + u8 vport_num, u8 table_type, u32 table_id, + u32 underlay_qpn); #endif /* MLX5_FLOW_TABLE_H */ Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Fri Sep 23 08:17:51 2016 (r306233) @@ -121,7 +121,7 @@ static int alloc_ent(struct mlx5_cmd *cm clear_bit(ret, &cmd->bitmask); spin_unlock_irqrestore(&cmd->alloc_lock, flags); - return ret < cmd->max_reg_cmds ? ret : -ENOMEM; + return ret < cmd->max_reg_cmds ? ret : -1; } static void free_ent(struct mlx5_cmd *cmd, int idx) @@ -396,6 +396,9 @@ const char *mlx5_command_str(int command case MLX5_CMD_OP_CREATE_DCT: return "CREATE_DCT"; + case MLX5_CMD_OP_SET_DC_CNAK_TRACE: + return "SET_DC_CNAK_TRACE"; + case MLX5_CMD_OP_DESTROY_DCT: return "DESTROY_DCT"; @@ -639,6 +642,12 @@ const char *mlx5_command_str(int command case MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY: return "DELETE_FLOW_TABLE_ENTRY"; + case MLX5_CMD_OP_SET_DIAGNOSTICS: + return "MLX5_CMD_OP_SET_DIAGNOSTICS"; + + case MLX5_CMD_OP_QUERY_DIAGNOSTICS: + return "MLX5_CMD_OP_QUERY_DIAGNOSTICS"; + default: return "unknown command opcode"; } } Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Fri Sep 23 08:17:51 2016 (r306233) @@ -64,6 +64,8 @@ enum { MLX5_CMD_TIME, /* print command execution time */ }; +struct mlx5_core_dev; + int mlx5_query_hca_caps(struct mlx5_core_dev *dev); int mlx5_query_board_id(struct mlx5_core_dev *dev); int mlx5_cmd_init_hca(struct mlx5_core_dev *dev); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_cq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_cq.c Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_cq.c Fri Sep 23 08:17:51 2016 (r306233) @@ -187,10 +187,12 @@ int mlx5_core_destroy_cq(struct mlx5_cor in.cqn = cpu_to_be32(cq->cqn); err = mlx5_cmd_exec(dev, &in, sizeof(in), &out, sizeof(out)); if (err) - return err; + goto out; - if (out.hdr.status) - return mlx5_cmd_status_to_err(&out.hdr); + if (out.hdr.status) { + err = mlx5_cmd_status_to_err(&out.hdr); + goto out; + } synchronize_irq(cq->irqn); @@ -198,7 +200,9 @@ int mlx5_core_destroy_cq(struct mlx5_cor complete(&cq->free); wait_for_completion(&cq->free); - return 0; +out: + + return err; } EXPORT_SYMBOL(mlx5_core_destroy_cq); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Fri Sep 23 08:17:51 2016 (r306233) @@ -155,6 +155,8 @@ static const char *eqe_type_str(u8 type) return "MLX5_EVENT_TYPE_PAGE_REQUEST"; case MLX5_EVENT_TYPE_NIC_VPORT_CHANGE: return "MLX5_EVENT_TYPE_NIC_VPORT_CHANGE"; + case MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT: + return "MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT"; default: return "Unrecognized event"; } @@ -181,6 +183,21 @@ static enum mlx5_dev_event port_subtype_ return -1; } +static enum mlx5_dev_event dcbx_subevent(u8 subtype) +{ + switch (subtype) { + case MLX5_DCBX_EVENT_SUBTYPE_ERROR_STATE_DCBX: + return MLX5_DEV_EVENT_ERROR_STATE_DCBX; + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_CHANGE: + return MLX5_DEV_EVENT_REMOTE_CONFIG_CHANGE; + case MLX5_DCBX_EVENT_SUBTYPE_LOCAL_OPER_CHANGE: + return MLX5_DEV_EVENT_LOCAL_OPER_CHANGE; + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_APP_PRIORITY_CHANGE: + return MLX5_DEV_EVENT_REMOTE_CONFIG_APPLICATION_PRIORITY_CHANGE; + } + return -1; +} + static void eq_update_ci(struct mlx5_eq *eq, int arm) { __be32 __iomem *addr = eq->doorbell + (arm ? 0 : 2); @@ -259,6 +276,26 @@ static int mlx5_eq_int(struct mlx5_core_ port, eqe->sub_type); } break; + + case MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT: + port = (eqe->data.port.port >> 4) & 0xf; + switch (eqe->sub_type) { + case MLX5_DCBX_EVENT_SUBTYPE_ERROR_STATE_DCBX: + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_CHANGE: + case MLX5_DCBX_EVENT_SUBTYPE_LOCAL_OPER_CHANGE: + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_APP_PRIORITY_CHANGE: + if (dev->event) + dev->event(dev, + dcbx_subevent(eqe->sub_type), + 0); + break; + default: + mlx5_core_warn(dev, + "dcbx event with unrecognized subtype: port %d, sub_type %d\n", + port, eqe->sub_type); + } + break; + case MLX5_EVENT_TYPE_CQ_ERROR: cqn = be32_to_cpu(eqe->data.cq_err.cqn) & 0xffffff; mlx5_core_warn(dev, "CQ error on CQN 0x%x, syndrom 0x%x\n", @@ -476,6 +513,10 @@ int mlx5_start_eqs(struct mlx5_core_dev async_event_mask |= (1ull << MLX5_EVENT_TYPE_NIC_VPORT_CHANGE); + if (MLX5_CAP_GEN(dev, dcbx)) + async_event_mask |= (1ull << + MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT); + err = mlx5_create_map_eq(dev, &table->cmd_eq, MLX5_EQ_VEC_CMD, MLX5_NUM_CMD_EQE, 1ull << MLX5_EVENT_TYPE_CMD, "mlx5_cmd_eq", &dev->priv.uuari.uars[0]); @@ -573,6 +614,8 @@ static const char *mlx5_port_module_even return "Unknown identifier"; case MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE: return "High Temperature"; + case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: + return "Cable is shorted"; default: return "Unknown error type"; @@ -605,19 +648,19 @@ static void mlx5_port_module_event(struc switch (module_status) { case MLX5_MODULE_STATUS_PLUGGED: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: plugged", module_num); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: plugged\n", module_num); break; case MLX5_MODULE_STATUS_UNPLUGGED: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: unplugged", module_num); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: unplugged\n", module_num); break; case MLX5_MODULE_STATUS_ERROR: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: error, %s", module_num, mlx5_port_module_event_error_type_to_string(error_type)); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: error, %s\n", module_num, mlx5_port_module_event_error_type_to_string(error_type)); break; default: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, unknown status", module_num); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, unknown status\n", module_num); } /* store module status */ if (module_num < MLX5_MAX_PORTS) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c Fri Sep 23 08:17:51 2016 (r306233) @@ -96,10 +96,10 @@ static int mlx5_vacl_table_allow_vlan(vo MLX5_SET(flow_context, flow_context, action, MLX5_FLOW_CONTEXT_ACTION_ALLOW); in_match_value = MLX5_ADDR_OF(flow_context, flow_context, match_value); - MLX5_SET(fte_match_param, in_match_value, outer_headers.vlan_tag, 1); + MLX5_SET(fte_match_param, in_match_value, outer_headers.cvlan_tag, 1); MLX5_SET(fte_match_param, in_match_value, outer_headers.first_vid, vlan); - MLX5_SET(fte_match_param, in_match_criteria, outer_headers.vlan_tag, 1); + MLX5_SET(fte_match_param, in_match_criteria, outer_headers.cvlan_tag, 1); MLX5_SET(fte_match_param, in_match_criteria, outer_headers.first_vid, 0xfff); if (acl_table->spoofchk_enabled) { @@ -255,8 +255,8 @@ static int mlx5_vacl_table_apply_untagge /* Apply new untagged rule */ MLX5_SET(flow_context, flow_context, action, new_action); in_match_value = MLX5_ADDR_OF(flow_context, flow_context, match_value); - MLX5_SET(fte_match_param, in_match_value, outer_headers.vlan_tag, 0); - MLX5_SET(fte_match_param, in_match_criteria, outer_headers.vlan_tag, 1); + MLX5_SET(fte_match_param, in_match_value, outer_headers.cvlan_tag, 0); + MLX5_SET(fte_match_param, in_match_criteria, outer_headers.cvlan_tag, 1); if (acl_table->spoofchk_enabled) { smac = MLX5_ADDR_OF(fte_match_param, in_match_value, @@ -549,7 +549,7 @@ static int mlx5_vacl_table_create_ft(voi MLX5_MATCH_OUTER_HEADERS; MLX5_SET(fte_match_param, g[MLX5_ACL_UNTAGGED_GROUP_IDX - shift_idx].match_criteria, - outer_headers.vlan_tag, 1); + outer_headers.cvlan_tag, 1); if (spoofchk) { smac = MLX5_ADDR_OF(fte_match_param, g[MLX5_ACL_UNTAGGED_GROUP_IDX - shift_idx] @@ -564,7 +564,7 @@ static int mlx5_vacl_table_create_ft(voi MLX5_MATCH_OUTER_HEADERS; MLX5_SET(fte_match_param, g[MLX5_ACL_VLAN_GROUP_IDX - shift_idx].match_criteria, - outer_headers.vlan_tag, 1); + outer_headers.cvlan_tag, 1); MLX5_SET(fte_match_param, g[MLX5_ACL_VLAN_GROUP_IDX - shift_idx].match_criteria, outer_headers.first_vid, 0xfff); @@ -627,10 +627,10 @@ void *mlx5_vacl_table_create(struct mlx5 struct mlx5_vacl_table *acl_table; int err = 0; - if (is_egress && !MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL(dev, ft_support)) + if (is_egress && !MLX5_CAP_ESW_EGRESS_ACL(dev, ft_support)) return NULL; - if (!is_egress && !MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL(dev, ft_support)) + if (!is_egress && !MLX5_CAP_ESW_INGRESS_ACL(dev, ft_support)) return NULL; acl_table = kzalloc(sizeof(*acl_table), GFP_KERNEL); @@ -640,9 +640,9 @@ void *mlx5_vacl_table_create(struct mlx5 acl_table->acl_type = is_egress ? MLX5_FLOW_TABLE_TYPE_EGRESS_ACL : MLX5_FLOW_TABLE_TYPE_INGRESS_ACL; acl_table->max_ft_size = (is_egress ? - MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL(dev, + MLX5_CAP_ESW_EGRESS_ACL(dev, log_max_ft_size) : - MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL(dev, + MLX5_CAP_ESW_INGRESS_ACL(dev, log_max_ft_size)); acl_table->dev = dev; acl_table->vport = vport; Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c Fri Sep 23 08:17:51 2016 (r306233) @@ -87,7 +87,7 @@ static int mlx5_set_flow_entry_cmd(struc return err; } -static void mlx5_del_flow_entry_cmd(struct mlx5_flow_table *ft, u32 flow_index) +static int mlx5_del_flow_entry_cmd(struct mlx5_flow_table *ft, u32 flow_index) { u32 in[MLX5_ST_SZ_DW(delete_fte_in)]; u32 out[MLX5_ST_SZ_DW(delete_fte_out)]; @@ -103,7 +103,8 @@ static void mlx5_del_flow_entry_cmd(stru MLX5_SET_DFTEI(in, flow_index, flow_index); MLX5_SET_DFTEI(in, opcode, MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY); - mlx5_cmd_exec_check_status(ft->dev, in, sizeof(in), out, sizeof(out)); + return mlx5_cmd_exec_check_status(ft->dev, in, sizeof(in), out, + sizeof(out)); } static void mlx5_destroy_flow_group_cmd(struct mlx5_flow_table *ft, int i) @@ -343,12 +344,15 @@ int mlx5_add_flow_table_entry(void *flow } EXPORT_SYMBOL(mlx5_add_flow_table_entry); -void mlx5_del_flow_table_entry(void *flow_table, u32 flow_index) +int mlx5_del_flow_table_entry(void *flow_table, u32 flow_index) { struct mlx5_flow_table *ft = flow_table; + int ret; - mlx5_del_flow_entry_cmd(ft, flow_index); - mlx5_free_flow_index(ft, flow_index); + ret = mlx5_del_flow_entry_cmd(ft, flow_index); + if (!ret) + mlx5_free_flow_index(ft, flow_index); + return ret; } EXPORT_SYMBOL(mlx5_del_flow_table_entry); @@ -430,3 +434,46 @@ u32 mlx5_get_flow_table_id(void *flow_ta return ft->id; } EXPORT_SYMBOL(mlx5_get_flow_table_id); + +int mlx5_set_flow_table_root(struct mlx5_core_dev *mdev, u16 op_mod, + u8 vport_num, u8 table_type, u32 table_id, + u32 underlay_qpn) +{ + u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)]; + u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)]; + int err; + int is_group_manager; + + is_group_manager = MLX5_CAP_GEN(mdev, vport_group_manager); + + memset(in, 0, sizeof(in)); + + MLX5_SET(set_flow_table_root_in, in, op_mod, op_mod); + MLX5_SET(set_flow_table_root_in, in, table_type, table_type); + MLX5_SET(set_flow_table_root_in, in, underlay_qpn, underlay_qpn); + if (op_mod == MLX5_SET_FLOW_TABLE_ROOT_OPMOD_SET) + MLX5_SET(set_flow_table_root_in, in, table_id, table_id); + + MLX5_SET(set_flow_table_root_in, in, opcode, + MLX5_CMD_OP_SET_FLOW_TABLE_ROOT); + + if (vport_num) { + if (is_group_manager) { + MLX5_SET(set_flow_table_root_in, in, other_vport, + 1); + MLX5_SET(set_flow_table_root_in, in, vport_number, + vport_num); + } else { + return -EPERM; + } + } + + memset(out, 0, sizeof(out)); + err = mlx5_cmd_exec_check_status(mdev, in, sizeof(in), out, + sizeof(out)); + if (err) + return err; + + return 0; +} +EXPORT_SYMBOL(mlx5_set_flow_table_root); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_fw.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_fw.c Fri Sep 23 08:13:46 2016 (r306232) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_fw.c Fri Sep 23 08:17:51 2016 (r306233) @@ -201,6 +201,50 @@ int mlx5_query_hca_caps(struct mlx5_core return err; } + if (MLX5_CAP_GEN(dev, snapshot)) { + err = mlx5_core_get_caps(dev, MLX5_CAP_SNAPSHOT, + HCA_CAP_OPMOD_GET_CUR); + if (err) + return err; + err = mlx5_core_get_caps(dev, MLX5_CAP_SNAPSHOT, + HCA_CAP_OPMOD_GET_MAX); + if (err) + return err; + } + + if (MLX5_CAP_GEN(dev, ipoib_enhanced_offloads)) { + err = mlx5_core_get_caps(dev, MLX5_CAP_EOIB_OFFLOADS, + HCA_CAP_OPMOD_GET_CUR); + if (err) + return err; + err = mlx5_core_get_caps(dev, MLX5_CAP_EOIB_OFFLOADS, + HCA_CAP_OPMOD_GET_MAX); + if (err) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Sep 23 08:19:24 2016 Return-Path: Delivered-To: svn-src-all@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 21ECBBE6FF1; Fri, 23 Sep 2016 08:19:24 +0000 (UTC) (envelope-from hselasky@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 D79222D1; Fri, 23 Sep 2016 08:19:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8JN9P046150; Fri, 23 Sep 2016 08:19:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8JMpq046146; Fri, 23 Sep 2016 08:19:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230819.u8N8JMpq046146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:19: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: r306234 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:19:24 -0000 Author: hselasky Date: Fri Sep 23 08:19:22 2016 New Revision: 306234 URL: https://svnweb.freebsd.org/changeset/base/306234 Log: MFC r305868: mlx5en: Separate the sendqueue from using the mlx5e_channel structure. This change allows for reusing the transmit path for so called rate limited senqueues. While at it optimise some pointer lookups in the fast path. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:17:51 2016 (r306233) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:19:22 2016 (r306234) @@ -433,9 +433,9 @@ struct mlx5e_cq { /* data path - accessed per HW polling */ struct mlx5_core_cq mcq; - struct mlx5e_channel *channel; /* control */ + struct mlx5e_priv *priv; struct mlx5_wq_ctrl wq_ctrl; } __aligned(MLX5E_CACHELINE_SIZE); @@ -515,6 +515,7 @@ struct mlx5e_sq { struct mlx5_wq_cyc wq; void __iomem *uar_map; void __iomem *uar_bf_map; + struct ifnet *ifp; u32 sqn; u32 bf_buf_size; struct device *pdev; @@ -523,7 +524,7 @@ struct mlx5e_sq { /* control path */ struct mlx5_wq_ctrl wq_ctrl; struct mlx5_uar uar; - struct mlx5e_channel *channel; + struct mlx5e_priv *priv; int tc; unsigned int queue_state; } __aligned(MLX5E_CACHELINE_SIZE); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:17:51 2016 (r306233) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:19:22 2016 (r306234) @@ -982,7 +982,8 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->pdev = c->pdev; sq->mkey_be = c->mkey_be; - sq->channel = c; + sq->ifp = priv->ifp; + sq->priv = priv; sq->tc = tc; sq->br = buf_ring_alloc(MLX5E_SQ_TX_QUEUE_SIZE, M_MLX5EN, @@ -1039,15 +1040,12 @@ done: static void mlx5e_destroy_sq(struct mlx5e_sq *sq) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - /* destroy all sysctl nodes */ sysctl_ctx_free(&sq->stats.ctx); mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); - mlx5_unmap_free_uar(priv->mdev, &sq->uar); + mlx5_unmap_free_uar(sq->priv->mdev, &sq->uar); taskqueue_drain(sq->sq_tq, &sq->sq_task); taskqueue_free(sq->sq_tq); buf_ring_free(sq->br, M_MLX5EN); @@ -1056,10 +1054,6 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) static int mlx5e_enable_sq(struct mlx5e_sq *sq, struct mlx5e_sq_param *param) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - void *in; void *sqc; void *wq; @@ -1077,8 +1071,8 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str memcpy(sqc, param->sqc, sizeof(param->sqc)); - MLX5_SET(sqc, sqc, tis_num_0, priv->tisn[sq->tc]); - MLX5_SET(sqc, sqc, cqn, c->sq[sq->tc].cq.mcq.cqn); + MLX5_SET(sqc, sqc, tis_num_0, sq->priv->tisn[sq->tc]); + MLX5_SET(sqc, sqc, cqn, sq->cq.mcq.cqn); MLX5_SET(sqc, sqc, state, MLX5_SQC_STATE_RST); MLX5_SET(sqc, sqc, tis_lst_sz, 1); MLX5_SET(sqc, sqc, flush_in_error_en, 1); @@ -1092,7 +1086,7 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str mlx5_fill_page_array(&sq->wq_ctrl.buf, (__be64 *) MLX5_ADDR_OF(wq, wq, pas)); - err = mlx5_core_create_sq(mdev, in, inlen, &sq->sqn); + err = mlx5_core_create_sq(sq->priv->mdev, in, inlen, &sq->sqn); kvfree(in); @@ -1102,10 +1096,6 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str static int mlx5e_modify_sq(struct mlx5e_sq *sq, int curr_state, int next_state) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - void *in; void *sqc; int inlen; @@ -1122,7 +1112,7 @@ mlx5e_modify_sq(struct mlx5e_sq *sq, int MLX5_SET(modify_sq_in, in, sq_state, curr_state); MLX5_SET(sqc, sqc, state, next_state); - err = mlx5_core_modify_sq(mdev, in, inlen); + err = mlx5_core_modify_sq(sq->priv->mdev, in, inlen); kvfree(in); @@ -1132,11 +1122,8 @@ mlx5e_modify_sq(struct mlx5e_sq *sq, int static void mlx5e_disable_sq(struct mlx5e_sq *sq) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - mlx5_core_destroy_sq(mdev, sq->sqn); + mlx5_core_destroy_sq(sq->priv->mdev, sq->sqn); } static int @@ -1302,7 +1289,7 @@ mlx5e_create_cq(struct mlx5e_channel *c, cqe->op_own = 0xf1; } - cq->channel = c; + cq->priv = priv; return (0); } @@ -1317,9 +1304,6 @@ static int mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_param *param, u8 moderation_mode) { - struct mlx5e_channel *c = cq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; struct mlx5_core_cq *mcq = &cq->mcq; void *in; void *cqc; @@ -1341,7 +1325,7 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str mlx5_fill_page_array(&cq->wq_ctrl.buf, (__be64 *) MLX5_ADDR_OF(create_cq_in, in, pas)); - mlx5_vector2eqn(mdev, param->eq_ix, &eqn, &irqn_not_used); + mlx5_vector2eqn(cq->priv->mdev, param->eq_ix, &eqn, &irqn_not_used); MLX5_SET(cqc, cqc, cq_period_mode, moderation_mode); MLX5_SET(cqc, cqc, c_eqn, eqn); @@ -1350,7 +1334,7 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str PAGE_SHIFT); MLX5_SET64(cqc, cqc, dbr_addr, cq->wq_ctrl.db.dma); - err = mlx5_core_create_cq(mdev, mcq, in, inlen); + err = mlx5_core_create_cq(cq->priv->mdev, mcq, in, inlen); kvfree(in); @@ -1365,11 +1349,8 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str static void mlx5e_disable_cq(struct mlx5e_cq *cq) { - struct mlx5e_channel *c = cq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - mlx5_core_destroy_cq(mdev, &cq->mcq); + mlx5_core_destroy_cq(cq->priv->mdev, &cq->mcq); } static int Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:17:51 2016 (r306233) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:19:22 2016 (r306234) @@ -233,7 +233,7 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struc /* Setup local variables */ pi = sq->pc & sq->wq.sz_m1; wqe = mlx5_wq_cyc_get_wqe(&sq->wq, pi); - ifp = sq->channel->ifp; + ifp = sq->ifp; memset(wqe, 0, sizeof(*wqe)); @@ -534,7 +534,7 @@ void mlx5e_tx_que(void *context, int pending) { struct mlx5e_sq *sq = context; - struct ifnet *ifp = sq->channel->ifp; + struct ifnet *ifp = sq->ifp; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { mtx_lock(&sq->lock); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Fri Sep 23 08:17:51 2016 (r306233) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Fri Sep 23 08:19:22 2016 (r306234) @@ -47,10 +47,7 @@ void mlx5e_cq_error_event(struct mlx5_core_cq *mcq, int event) { struct mlx5e_cq *cq = container_of(mcq, struct mlx5e_cq, mcq); - struct mlx5e_channel *c = cq->channel; - struct mlx5e_priv *priv = c->priv; - struct ifnet *ifp = priv->ifp; - if_printf(ifp, "%s: cqn=0x%.6x event=0x%.2x\n", + if_printf(cq->priv->ifp, "%s: cqn=0x%.6x event=0x%.2x\n", __func__, mcq->cqn, event); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:20:17 2016 Return-Path: Delivered-To: svn-src-all@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 53BF9BE608C; Fri, 23 Sep 2016 08:20:17 +0000 (UTC) (envelope-from hselasky@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 2C84C65B; Fri, 23 Sep 2016 08:20:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8KGPZ046265; Fri, 23 Sep 2016 08:20:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8KGmX046264; Fri, 23 Sep 2016 08:20:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230820.u8N8KGmX046264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:20:16 +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: r306235 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:20:17 -0000 Author: hselasky Date: Fri Sep 23 08:20:16 2016 New Revision: 306235 URL: https://svnweb.freebsd.org/changeset/base/306235 Log: MFC r305869: mlx5en: Minor completion queue control path code refactor. Move setting of CQ moderation mode together with the other CQ moderation parameters. Pass completion event vector as a separate argument to mlx5e_open_cq(), because its value is different for each call. Pass mlx5e_priv pointer instead of mlx5e_channel pointer so that code can be used by rate limiting sendqueues. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:19:22 2016 (r306234) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:20:16 2016 (r306235) @@ -47,7 +47,6 @@ struct mlx5e_sq_param { struct mlx5e_cq_param { u32 cqc [MLX5_ST_SZ_DW(cqc)]; struct mlx5_wq_param wq; - u16 eq_ix; }; struct mlx5e_channel_param { @@ -1248,12 +1247,12 @@ mlx5e_close_sq_wait(struct mlx5e_sq *sq) } static int -mlx5e_create_cq(struct mlx5e_channel *c, +mlx5e_create_cq(struct mlx5e_priv *priv, struct mlx5e_cq_param *param, struct mlx5e_cq *cq, - mlx5e_cq_comp_t *comp) + mlx5e_cq_comp_t *comp, + int eq_ix) { - struct mlx5e_priv *priv = c->priv; struct mlx5_core_dev *mdev = priv->mdev; struct mlx5_core_cq *mcq = &cq->mcq; int eqn_not_used; @@ -1263,21 +1262,20 @@ mlx5e_create_cq(struct mlx5e_channel *c, param->wq.buf_numa_node = 0; param->wq.db_numa_node = 0; - param->eq_ix = c->ix; err = mlx5_cqwq_create(mdev, ¶m->wq, param->cqc, &cq->wq, &cq->wq_ctrl); if (err) return (err); - mlx5_vector2eqn(mdev, param->eq_ix, &eqn_not_used, &irqn); + mlx5_vector2eqn(mdev, eq_ix, &eqn_not_used, &irqn); mcq->cqe_sz = 64; mcq->set_ci_db = cq->wq_ctrl.db.db; mcq->arm_db = cq->wq_ctrl.db.db + 1; *mcq->set_ci_db = 0; *mcq->arm_db = 0; - mcq->vector = param->eq_ix; + mcq->vector = eq_ix; mcq->comp = comp; mcq->event = mlx5e_cq_error_event; mcq->irqn = irqn; @@ -1301,8 +1299,7 @@ mlx5e_destroy_cq(struct mlx5e_cq *cq) } static int -mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_param *param, - u8 moderation_mode) +mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_param *param, int eq_ix) { struct mlx5_core_cq *mcq = &cq->mcq; void *in; @@ -1325,9 +1322,8 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str mlx5_fill_page_array(&cq->wq_ctrl.buf, (__be64 *) MLX5_ADDR_OF(create_cq_in, in, pas)); - mlx5_vector2eqn(cq->priv->mdev, param->eq_ix, &eqn, &irqn_not_used); + mlx5_vector2eqn(cq->priv->mdev, eq_ix, &eqn, &irqn_not_used); - MLX5_SET(cqc, cqc, cq_period_mode, moderation_mode); MLX5_SET(cqc, cqc, c_eqn, eqn); MLX5_SET(cqc, cqc, uar_page, mcq->uar->index); MLX5_SET(cqc, cqc, log_page_size, cq->wq_ctrl.buf.page_shift - @@ -1354,19 +1350,19 @@ mlx5e_disable_cq(struct mlx5e_cq *cq) } static int -mlx5e_open_cq(struct mlx5e_channel *c, +mlx5e_open_cq(struct mlx5e_priv *priv, struct mlx5e_cq_param *param, struct mlx5e_cq *cq, mlx5e_cq_comp_t *comp, - u8 moderation_mode) + int eq_ix) { int err; - err = mlx5e_create_cq(c, param, cq, comp); + err = mlx5e_create_cq(priv, param, cq, comp, eq_ix); if (err) return (err); - err = mlx5e_enable_cq(cq, param, moderation_mode); + err = mlx5e_enable_cq(cq, param, eq_ix); if (err) goto err_destroy_cq; @@ -1389,25 +1385,13 @@ static int mlx5e_open_tx_cqs(struct mlx5e_channel *c, struct mlx5e_channel_param *cparam) { - u8 tx_moderation_mode; int err; int tc; - switch (c->priv->params.tx_cq_moderation_mode) { - case 0: - tx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - default: - if (MLX5_CAP_GEN(c->priv->mdev, cq_period_start_from_cqe)) - tx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_CQE; - else - tx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - } for (tc = 0; tc < c->num_tc; tc++) { /* open completion queue */ - err = mlx5e_open_cq(c, &cparam->tx_cq, &c->sq[tc].cq, - &mlx5e_tx_cq_comp, tx_moderation_mode); + err = mlx5e_open_cq(c->priv, &cparam->tx_cq, &c->sq[tc].cq, + &mlx5e_tx_cq_comp, c->ix); if (err) goto err_close_tx_cqs; } @@ -1503,7 +1487,6 @@ mlx5e_open_channel(struct mlx5e_priv *pr struct mlx5e_channel *volatile *cp) { struct mlx5e_channel *c; - u8 rx_moderation_mode; int err; c = malloc(sizeof(*c), M_MLX5EN, M_WAITOK | M_ZERO); @@ -1526,21 +1509,9 @@ mlx5e_open_channel(struct mlx5e_priv *pr if (err) goto err_free; - switch (priv->params.rx_cq_moderation_mode) { - case 0: - rx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - default: - if (MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe)) - rx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_CQE; - else - rx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - } - /* open receive completion queue */ - err = mlx5e_open_cq(c, &cparam->rx_cq, &c->rq.cq, - &mlx5e_rx_cq_comp, rx_moderation_mode); + err = mlx5e_open_cq(c->priv, &cparam->rx_cq, &c->rq.cq, + &mlx5e_rx_cq_comp, c->ix); if (err) goto err_close_tx_cqs; @@ -1670,6 +1641,18 @@ mlx5e_build_rx_cq_param(struct mlx5e_pri MLX5_SET(cqc, cqc, cq_period, priv->params.rx_cq_moderation_usec); MLX5_SET(cqc, cqc, cq_max_count, priv->params.rx_cq_moderation_pkts); + switch (priv->params.rx_cq_moderation_mode) { + case 0: + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + default: + if (MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe)) + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_CQE); + else + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + } + mlx5e_build_common_cq_param(priv, param); } @@ -1683,6 +1666,18 @@ mlx5e_build_tx_cq_param(struct mlx5e_pri MLX5_SET(cqc, cqc, cq_period, priv->params.tx_cq_moderation_usec); MLX5_SET(cqc, cqc, cq_max_count, priv->params.tx_cq_moderation_pkts); + switch (priv->params.tx_cq_moderation_mode) { + case 0: + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + default: + if (MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe)) + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_CQE); + else + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + } + mlx5e_build_common_cq_param(priv, param); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:21:46 2016 Return-Path: Delivered-To: svn-src-all@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 E5EF0BE6154; Fri, 23 Sep 2016 08:21:46 +0000 (UTC) (envelope-from hselasky@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 AA6C4906; Fri, 23 Sep 2016 08:21:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8LjvE048970; Fri, 23 Sep 2016 08:21:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8LjGP048968; Fri, 23 Sep 2016 08:21:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230821.u8N8LjGP048968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:21: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: r306236 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:21:47 -0000 Author: hselasky Date: Fri Sep 23 08:21:45 2016 New Revision: 306236 URL: https://svnweb.freebsd.org/changeset/base/306236 Log: MFC r305870: mlx5en: Make the mlx5e_open_cq() and mlx5e_close_cq() functions global. Make some functions and structures global to allow for code reuse when creating rate limiting sendqueues. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:20:16 2016 (r306235) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:21:45 2016 (r306236) @@ -352,6 +352,21 @@ struct mlx5e_stats { struct mlx5e_port_stats_debug port_stats_debug; }; +struct mlx5e_rq_param { + u32 rqc [MLX5_ST_SZ_DW(rqc)]; + struct mlx5_wq_param wq; +}; + +struct mlx5e_sq_param { + u32 sqc [MLX5_ST_SZ_DW(sqc)]; + struct mlx5_wq_param wq; +}; + +struct mlx5e_cq_param { + u32 cqc [MLX5_ST_SZ_DW(cqc)]; + struct mlx5_wq_param wq; +}; + struct mlx5e_params { u8 log_sq_size; u8 log_rq_size; @@ -794,5 +809,8 @@ void mlx5e_create_stats(struct sysctl_ct void mlx5e_send_nop(struct mlx5e_sq *, u32); void mlx5e_sq_cev_timeout(void *); int mlx5e_refresh_channel_params(struct mlx5e_priv *); +int mlx5e_open_cq(struct mlx5e_priv *, struct mlx5e_cq_param *, + struct mlx5e_cq *, mlx5e_cq_comp_t *, int eq_ix); +void mlx5e_close_cq(struct mlx5e_cq *); #endif /* _MLX5_EN_H_ */ Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:20:16 2016 (r306235) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:21:45 2016 (r306236) @@ -34,21 +34,6 @@ char mlx5e_version[] = "Mellanox Ethernet driver" " (" ETH_DRIVER_VERSION ")"; -struct mlx5e_rq_param { - u32 rqc [MLX5_ST_SZ_DW(rqc)]; - struct mlx5_wq_param wq; -}; - -struct mlx5e_sq_param { - u32 sqc [MLX5_ST_SZ_DW(sqc)]; - struct mlx5_wq_param wq; -}; - -struct mlx5e_cq_param { - u32 cqc [MLX5_ST_SZ_DW(cqc)]; - struct mlx5_wq_param wq; -}; - struct mlx5e_channel_param { struct mlx5e_rq_param rq; struct mlx5e_sq_param sq; @@ -1349,7 +1334,7 @@ mlx5e_disable_cq(struct mlx5e_cq *cq) mlx5_core_destroy_cq(cq->priv->mdev, &cq->mcq); } -static int +int mlx5e_open_cq(struct mlx5e_priv *priv, struct mlx5e_cq_param *param, struct mlx5e_cq *cq, @@ -1374,7 +1359,7 @@ err_destroy_cq: return (err); } -static void +void mlx5e_close_cq(struct mlx5e_cq *cq) { mlx5e_disable_cq(cq); From owner-svn-src-all@freebsd.org Fri Sep 23 08:22:31 2016 Return-Path: Delivered-To: svn-src-all@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 81289BE62A9; Fri, 23 Sep 2016 08:22:31 +0000 (UTC) (envelope-from hselasky@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 37C8FBB4; Fri, 23 Sep 2016 08:22:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8MUpd049844; Fri, 23 Sep 2016 08:22:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8MUmf049842; Fri, 23 Sep 2016 08:22:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230822.u8N8MUmf049842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:22:30 +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: r306237 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:22:31 -0000 Author: hselasky Date: Fri Sep 23 08:22:30 2016 New Revision: 306237 URL: https://svnweb.freebsd.org/changeset/base/306237 Log: MFC r305871: mlx5en: Optimise away duplicate UAR pointers. This change also reduces the size of the mlx5e_sq structure so that the last queue_state element will fit into the previous cacheline and then the mlx5e_sq structure becomes one cacheline less for amd64. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:21:45 2016 (r306236) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:22:30 2016 (r306237) @@ -528,8 +528,7 @@ struct mlx5e_sq { /* read only */ struct mlx5_wq_cyc wq; - void __iomem *uar_map; - void __iomem *uar_bf_map; + struct mlx5_uar uar; struct ifnet *ifp; u32 sqn; u32 bf_buf_size; @@ -538,7 +537,6 @@ struct mlx5e_sq { /* control path */ struct mlx5_wq_ctrl wq_ctrl; - struct mlx5_uar uar; struct mlx5e_priv *priv; int tc; unsigned int queue_state; @@ -780,13 +778,13 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, wmb(); if (bf_sz) { - __iowrite64_copy(sq->uar_bf_map + ofst, wqe, bf_sz); + __iowrite64_copy(sq->uar.bf_map + ofst, wqe, bf_sz); /* flush the write-combining mapped buffer */ wmb(); } else { - mlx5_write64(wqe, sq->uar_map + ofst, NULL); + mlx5_write64(wqe, sq->uar.map + ofst, NULL); } sq->bf_offset ^= sq->bf_buf_size; Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:21:45 2016 (r306236) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:22:30 2016 (r306237) @@ -956,8 +956,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, goto err_unmap_free_uar; sq->wq.db = &sq->wq.db[MLX5_SND_DBR]; - sq->uar_map = sq->uar.map; - sq->uar_bf_map = sq->uar.bf_map; sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2; err = mlx5e_alloc_sq_db(sq); From owner-svn-src-all@freebsd.org Fri Sep 23 08:23:12 2016 Return-Path: Delivered-To: svn-src-all@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 5BA27BE6341; Fri, 23 Sep 2016 08:23:12 +0000 (UTC) (envelope-from hselasky@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 2B9D4D2F; Fri, 23 Sep 2016 08:23:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8NBTj049932; Fri, 23 Sep 2016 08:23:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8NBfu049930; Fri, 23 Sep 2016 08:23:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230823.u8N8NBfu049930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:23: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: r306238 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:23:12 -0000 Author: hselasky Date: Fri Sep 23 08:23:11 2016 New Revision: 306238 URL: https://svnweb.freebsd.org/changeset/base/306238 Log: MFC r305872: mlx5en: Properly declare doorbell lock for 32-bit CPUs. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:22:30 2016 (r306237) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:23:11 2016 (r306238) @@ -662,6 +662,7 @@ struct mlx5e_priv { struct work_struct update_stats_work; struct work_struct update_carrier_work; struct work_struct set_rx_mode_work; + MLX5_DECLARE_DOORBELL_LOCK(doorbell_lock) struct mlx5_core_dev *mdev; struct ifnet *ifp; @@ -784,7 +785,8 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, wmb(); } else { - mlx5_write64(wqe, sq->uar.map + ofst, NULL); + mlx5_write64(wqe, sq->uar.map + ofst, + MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock)); } sq->bf_offset ^= sq->bf_buf_size; Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:22:30 2016 (r306237) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:23:11 2016 (r306238) @@ -2753,6 +2753,7 @@ mlx5e_priv_mtx_init(struct mlx5e_priv *p mtx_init(&priv->async_events_mtx, "mlx5async", MTX_NETWORK_LOCK, MTX_DEF); sx_init(&priv->state_lock, "mlx5state"); callout_init_mtx(&priv->watchdog, &priv->async_events_mtx, 0); + MLX5_INIT_DOORBELL_LOCK(&priv->doorbell_lock); } static void From owner-svn-src-all@freebsd.org Fri Sep 23 08:23:58 2016 Return-Path: Delivered-To: svn-src-all@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 C1B67BE6403; Fri, 23 Sep 2016 08:23:58 +0000 (UTC) (envelope-from hselasky@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 9D2DBEE4; Fri, 23 Sep 2016 08:23:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8NvgN050014; Fri, 23 Sep 2016 08:23:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8NvFK050012; Fri, 23 Sep 2016 08:23:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230823.u8N8NvFK050012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:23: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: r306239 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:23:58 -0000 Author: hselasky Date: Fri Sep 23 08:23:57 2016 New Revision: 306239 URL: https://svnweb.freebsd.org/changeset/base/306239 Log: MFC r305873: mlx5en: Factor out common sendqueue code for use with rate limiting SQs. Try to reuse code to setup sendqueues when possible by making some static functions global. Further split the mlx5e_close_sq_wait() function to separate out reusable parts. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:23:11 2016 (r306238) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:23:57 2016 (r306239) @@ -812,5 +812,11 @@ int mlx5e_refresh_channel_params(struct int mlx5e_open_cq(struct mlx5e_priv *, struct mlx5e_cq_param *, struct mlx5e_cq *, mlx5e_cq_comp_t *, int eq_ix); void mlx5e_close_cq(struct mlx5e_cq *); +void mlx5e_free_sq_db(struct mlx5e_sq *); +int mlx5e_alloc_sq_db(struct mlx5e_sq *); +int mlx5e_enable_sq(struct mlx5e_sq *, struct mlx5e_sq_param *, int tis_num); +int mlx5e_modify_sq(struct mlx5e_sq *, int curr_state, int next_state); +void mlx5e_disable_sq(struct mlx5e_sq *); +void mlx5e_drain_sq(struct mlx5e_sq *); #endif /* _MLX5_EN_H_ */ Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:23:11 2016 (r306238) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:23:57 2016 (r306239) @@ -873,7 +873,7 @@ mlx5e_close_rq_wait(struct mlx5e_rq *rq) mlx5e_destroy_rq(rq); } -static void +void mlx5e_free_sq_db(struct mlx5e_sq *sq) { int wq_sz = mlx5_wq_cyc_get_size(&sq->wq); @@ -884,7 +884,7 @@ mlx5e_free_sq_db(struct mlx5e_sq *sq) free(sq->mbuf, M_MLX5EN); } -static int +int mlx5e_alloc_sq_db(struct mlx5e_sq *sq) { int wq_sz = mlx5_wq_cyc_get_size(&sq->wq); @@ -1033,8 +1033,9 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) buf_ring_free(sq->br, M_MLX5EN); } -static int -mlx5e_enable_sq(struct mlx5e_sq *sq, struct mlx5e_sq_param *param) +int +mlx5e_enable_sq(struct mlx5e_sq *sq, struct mlx5e_sq_param *param, + int tis_num) { void *in; void *sqc; @@ -1053,7 +1054,7 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str memcpy(sqc, param->sqc, sizeof(param->sqc)); - MLX5_SET(sqc, sqc, tis_num_0, sq->priv->tisn[sq->tc]); + MLX5_SET(sqc, sqc, tis_num_0, tis_num); MLX5_SET(sqc, sqc, cqn, sq->cq.mcq.cqn); MLX5_SET(sqc, sqc, state, MLX5_SQC_STATE_RST); MLX5_SET(sqc, sqc, tis_lst_sz, 1); @@ -1075,7 +1076,7 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str return (err); } -static int +int mlx5e_modify_sq(struct mlx5e_sq *sq, int curr_state, int next_state) { void *in; @@ -1101,7 +1102,7 @@ mlx5e_modify_sq(struct mlx5e_sq *sq, int return (err); } -static void +void mlx5e_disable_sq(struct mlx5e_sq *sq) { @@ -1120,7 +1121,7 @@ mlx5e_open_sq(struct mlx5e_channel *c, if (err) return (err); - err = mlx5e_enable_sq(sq, param); + err = mlx5e_enable_sq(sq, param, c->priv->tisn[tc]); if (err) goto err_destroy_sq; @@ -1196,8 +1197,8 @@ mlx5e_sq_cev_timeout(void *arg) callout_reset_curcpu(&sq->cev_callout, hz, mlx5e_sq_cev_timeout, sq); } -static void -mlx5e_close_sq_wait(struct mlx5e_sq *sq) +void +mlx5e_drain_sq(struct mlx5e_sq *sq) { mtx_lock(&sq->lock); @@ -1224,7 +1225,13 @@ mlx5e_close_sq_wait(struct mlx5e_sq *sq) mtx_lock(&sq->lock); } mtx_unlock(&sq->lock); +} + +static void +mlx5e_close_sq_wait(struct mlx5e_sq *sq) +{ + mlx5e_drain_sq(sq); mlx5e_disable_sq(sq); mlx5e_destroy_sq(sq); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:24:42 2016 Return-Path: Delivered-To: svn-src-all@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 4ABECBE64AF; Fri, 23 Sep 2016 08:24:42 +0000 (UTC) (envelope-from hselasky@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 03025105E; Fri, 23 Sep 2016 08:24:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8OfiP050101; Fri, 23 Sep 2016 08:24:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8OfEJ050100; Fri, 23 Sep 2016 08:24:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230824.u8N8OfEJ050100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:24:41 +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: r306240 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:24:42 -0000 Author: hselasky Date: Fri Sep 23 08:24:41 2016 New Revision: 306240 URL: https://svnweb.freebsd.org/changeset/base/306240 Log: MFC r305874: mlx5en: Allow setting the software MTU size below 1500 bytes The hardware MTU size can't be set to a value less than 1500 bytes due to side-band management support. Allow setting the software MTU size below 1500 bytes, thus creating a mismatch between hardware and software MTU sizes. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:23:57 2016 (r306239) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:24:41 2016 (r306240) @@ -2173,7 +2173,6 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp int hw_mtu; int err; - err = mlx5_set_port_mtu(mdev, MLX5E_SW2HW_MTU(sw_mtu)); if (err) { if_printf(ifp, "%s: mlx5_set_port_mtu failed setting %d, err=%d\n", @@ -2181,19 +2180,20 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp return (err); } err = mlx5_query_port_oper_mtu(mdev, &hw_mtu); - if (!err) { - ifp->if_mtu = MLX5E_HW2SW_MTU(hw_mtu); - - if (ifp->if_mtu != sw_mtu) { - if_printf(ifp, "Port MTU %d is different than " - "ifp mtu %d\n", sw_mtu, (int)ifp->if_mtu); - } - } else { + if (err) { if_printf(ifp, "Query port MTU, after setting new " "MTU value, failed\n"); - ifp->if_mtu = sw_mtu; + } else if (MLX5E_HW2SW_MTU(hw_mtu) < sw_mtu) { + err = -E2BIG, + if_printf(ifp, "Port MTU %d is smaller than " + "ifp mtu %d\n", hw_mtu, sw_mtu); + } else if (MLX5E_HW2SW_MTU(hw_mtu) > sw_mtu) { + err = -EINVAL; + if_printf(ifp, "Port MTU %d is bigger than " + "ifp mtu %d\n", hw_mtu, sw_mtu); } - return (0); + ifp->if_mtu = sw_mtu; + return (err); } int From owner-svn-src-all@freebsd.org Fri Sep 23 08:25:24 2016 Return-Path: Delivered-To: svn-src-all@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 68AC7BE6525; Fri, 23 Sep 2016 08:25:24 +0000 (UTC) (envelope-from hselasky@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 384E011D3; Fri, 23 Sep 2016 08:25:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8PNFs050193; Fri, 23 Sep 2016 08:25:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8PNU9050192; Fri, 23 Sep 2016 08:25:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230825.u8N8PNU9050192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:25:23 +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: r306241 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:25:24 -0000 Author: hselasky Date: Fri Sep 23 08:25:23 2016 New Revision: 306241 URL: https://svnweb.freebsd.org/changeset/base/306241 Log: MFC r305875: mlx5en: Verify port type is ethernet before creating network device Else the mlx5en driver might attach to infiniband ports. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:24:41 2016 (r306240) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:25:23 2016 (r306241) @@ -2654,6 +2654,9 @@ mlx5e_check_required_hca_cap(struct mlx5 /* TODO: add more must-to-have features */ + if (MLX5_CAP_GEN(mdev, port_type) != MLX5_CAP_PORT_TYPE_ETH) + return (-ENODEV); + return (0); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:26:04 2016 Return-Path: Delivered-To: svn-src-all@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 1ECBDBE6591; Fri, 23 Sep 2016 08:26:04 +0000 (UTC) (envelope-from hselasky@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 CB239138C; Fri, 23 Sep 2016 08:26:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8Q3PZ050282; Fri, 23 Sep 2016 08:26:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8Q2rn050280; Fri, 23 Sep 2016 08:26:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230826.u8N8Q2rn050280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:26: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: r306242 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:26:04 -0000 Author: hselasky Date: Fri Sep 23 08:26:02 2016 New Revision: 306242 URL: https://svnweb.freebsd.org/changeset/base/306242 Log: MFC r305876: mlx5en: Remove unused pdev pointer. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:25:23 2016 (r306241) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:26:02 2016 (r306242) @@ -467,7 +467,6 @@ struct mlx5e_rq { bus_dma_tag_t dma_tag; u32 wqe_sz; struct mlx5e_rq_mbuf *mbuf; - struct device *pdev; struct ifnet *ifp; struct mlx5e_rq_stats stats; struct mlx5e_cq cq; @@ -532,7 +531,6 @@ struct mlx5e_sq { struct ifnet *ifp; u32 sqn; u32 bf_buf_size; - struct device *pdev; u32 mkey_be; /* control path */ @@ -553,7 +551,6 @@ struct mlx5e_channel { /* data path */ struct mlx5e_rq rq; struct mlx5e_sq sq[MLX5E_MAX_TX_NUM_TC]; - struct device *pdev; struct ifnet *ifp; u32 mkey_be; u8 num_tc; Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:25:23 2016 (r306241) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:26:02 2016 (r306242) @@ -674,7 +674,6 @@ mlx5e_create_rq(struct mlx5e_channel *c, wqe->data.byte_count = cpu_to_be32(byte_count | MLX5_HW_START_PADDING); } - rq->pdev = c->pdev; rq->ifp = c->ifp; rq->channel = c; rq->ix = c->ix; @@ -962,7 +961,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, if (err) goto err_sq_wq_destroy; - sq->pdev = c->pdev; sq->mkey_be = c->mkey_be; sq->ifp = priv->ifp; sq->priv = priv; @@ -1486,7 +1484,6 @@ mlx5e_open_channel(struct mlx5e_priv *pr c->priv = priv; c->ix = ix; c->cpu = 0; - c->pdev = &priv->mdev->pdev->dev; c->ifp = priv->ifp; c->mkey_be = cpu_to_be32(priv->mr.key); c->num_tc = priv->num_tc; From owner-svn-src-all@freebsd.org Fri Sep 23 08:26:46 2016 Return-Path: Delivered-To: svn-src-all@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 80350BE6620; Fri, 23 Sep 2016 08:26:46 +0000 (UTC) (envelope-from hselasky@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 507D71571; Fri, 23 Sep 2016 08:26:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8QjQ0051793; Fri, 23 Sep 2016 08:26:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8QjSR051792; Fri, 23 Sep 2016 08:26:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230826.u8N8QjSR051792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:26: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: r306243 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:26:46 -0000 Author: hselasky Date: Fri Sep 23 08:26:45 2016 New Revision: 306243 URL: https://svnweb.freebsd.org/changeset/base/306243 Log: MFC r305877: mlx5en: Fix duplicate mbuf free-by-code. When mlx5e_sq_xmit() returns an error code and the mbuf pointer is set, we should not free the mbuf, because the caller will keep the mbuf in the drbr. Make sure the mbuf pointer is correctly set upon function exit. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:26:02 2016 (r306242) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:26:45 2016 (r306243) @@ -224,10 +224,8 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struc /* Send one multi NOP message instead of many */ mlx5e_send_nop(sq, (pi + 1) * MLX5_SEND_WQEBB_NUM_DS); pi = ((~sq->pc) & sq->wq.sz_m1); - if (pi < (MLX5_SEND_WQE_MAX_WQEBBS - 1)) { - m_freem(mb); + if (pi < (MLX5_SEND_WQE_MAX_WQEBBS - 1)) return (ENOMEM); - } } /* Setup local variables */ @@ -338,10 +336,8 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struc mb, segs, &nsegs, BUS_DMA_NOWAIT); } /* Catch errors */ - if (err != 0) { + if (err != 0) goto tx_drop; - } - *mbp = mb; for (x = 0; x != nsegs; x++) { if (segs[x].ds_len == 0) @@ -374,6 +370,7 @@ skip_dma: bus_dmamap_sync(sq->dma_tag, sq->mbuf[pi].dma_map, BUS_DMASYNC_PREWRITE); sq->stats.packets++; + *mbp = NULL; /* safety clear */ return (0); tx_drop: From owner-svn-src-all@freebsd.org Fri Sep 23 08:28:46 2016 Return-Path: Delivered-To: svn-src-all@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 6F2BEBE67CE; Fri, 23 Sep 2016 08:28:46 +0000 (UTC) (envelope-from hselasky@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 38A5819CB; Fri, 23 Sep 2016 08:28:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8Sjxk052225; Fri, 23 Sep 2016 08:28:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8SiOk052212; Fri, 23 Sep 2016 08:28:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230828.u8N8SiOk052212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306244 - in stable/10/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:28:46 -0000 Author: hselasky Date: Fri Sep 23 08:28:44 2016 New Revision: 306244 URL: https://svnweb.freebsd.org/changeset/base/306244 Log: MFC r305867: Update the MLX5 core module: - Add new firmware commands and update existing ones. - Add more firmware related structures and update existing ones. - Some minor fixes, like adding missing \n to some prints. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/cq.h stable/10/sys/dev/mlx5/device.h stable/10/sys/dev/mlx5/driver.h stable/10/sys/dev/mlx5/flow_table.h stable/10/sys/dev/mlx5/mlx5_core/mlx5_cmd.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/10/sys/dev/mlx5/mlx5_core/mlx5_cq.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_fw.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_main.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_mr.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_port.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_qp.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_srq.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_transobj.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_uar.c stable/10/sys/dev/mlx5/mlx5_core/mlx5_vport.c stable/10/sys/dev/mlx5/mlx5_core/transobj.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/10/sys/dev/mlx5/mlx5_ifc.h stable/10/sys/dev/mlx5/qp.h stable/10/sys/dev/mlx5/vport.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/cq.h ============================================================================== --- stable/10/sys/dev/mlx5/cq.h Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/cq.h Fri Sep 23 08:28:44 2016 (r306244) @@ -49,6 +49,8 @@ struct mlx5_core_cq { unsigned arm_sn; struct mlx5_rsc_debug *dbg; int pid; + int reset_notify_added; + struct list_head reset_notify; }; Modified: stable/10/sys/dev/mlx5/device.h ============================================================================== --- stable/10/sys/dev/mlx5/device.h Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/device.h Fri Sep 23 08:28:44 2016 (r306244) @@ -57,6 +57,7 @@ #define MLX5_FLD_SZ_BYTES(typ, fld) (__mlx5_bit_sz(typ, fld) / 8) #define MLX5_ST_SZ_BYTES(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 8) #define MLX5_ST_SZ_DW(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 32) +#define MLX5_ST_SZ_QW(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 64) #define MLX5_UN_SZ_BYTES(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 8) #define MLX5_UN_SZ_DW(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 32) #define MLX5_BYTE_OFF(typ, fld) (__mlx5_bit_off(typ, fld) / 8) @@ -112,6 +113,10 @@ enum { }; enum { + MLX5_CQ_FLAGS_OI = 2, +}; + +enum { MLX5_STAT_RATE_OFFSET = 5, }; @@ -129,6 +134,10 @@ enum { }; enum { + MLX5_MKEY_INBOX_PG_ACCESS = 1 << 31 +}; + +enum { MLX5_PERM_LOCAL_READ = 1 << 2, MLX5_PERM_LOCAL_WRITE = 1 << 3, MLX5_PERM_REMOTE_READ = 1 << 4, @@ -184,6 +193,25 @@ enum { }; enum { + MLX5_UMR_TRANSLATION_OFFSET_EN = (1 << 4), + + MLX5_UMR_CHECK_NOT_FREE = (1 << 5), + MLX5_UMR_CHECK_FREE = (2 << 5), + + MLX5_UMR_INLINE = (1 << 7), +}; + +#define MLX5_UMR_MTT_ALIGNMENT 0x40 +#define MLX5_UMR_MTT_MASK (MLX5_UMR_MTT_ALIGNMENT - 1) +#define MLX5_UMR_MTT_MIN_CHUNK_SIZE MLX5_UMR_MTT_ALIGNMENT + +enum { + MLX5_EVENT_QUEUE_TYPE_QP = 0, + MLX5_EVENT_QUEUE_TYPE_RQ = 1, + MLX5_EVENT_QUEUE_TYPE_SQ = 2, +}; + +enum { MLX5_PORT_CHANGE_SUBTYPE_DOWN = 1, MLX5_PORT_CHANGE_SUBTYPE_ACTIVE = 4, MLX5_PORT_CHANGE_SUBTYPE_INITIALIZED = 5, @@ -194,19 +222,28 @@ enum { }; enum { + MLX5_DCBX_EVENT_SUBTYPE_ERROR_STATE_DCBX = 1, + MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_CHANGE, + MLX5_DCBX_EVENT_SUBTYPE_LOCAL_OPER_CHANGE, + MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_APP_PRIORITY_CHANGE, + MLX5_MAX_INLINE_RECEIVE_SIZE = 64 +}; + +enum { MLX5_DEV_CAP_FLAG_XRC = 1LL << 3, MLX5_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1LL << 8, MLX5_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9, MLX5_DEV_CAP_FLAG_APM = 1LL << 17, - MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18, MLX5_DEV_CAP_FLAG_SCQE_BRK_MOD = 1LL << 21, MLX5_DEV_CAP_FLAG_BLOCK_MCAST = 1LL << 23, MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29, MLX5_DEV_CAP_FLAG_RESIZE_CQ = 1LL << 30, + MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 33, MLX5_DEV_CAP_FLAG_ROCE = 1LL << 34, MLX5_DEV_CAP_FLAG_DCT = 1LL << 37, MLX5_DEV_CAP_FLAG_SIG_HAND_OVER = 1LL << 40, MLX5_DEV_CAP_FLAG_CMDIF_CSUM = 3LL << 46, + MLX5_DEV_CAP_FLAG_DRAIN_SIGERR = 1LL << 48, }; enum { @@ -263,6 +300,7 @@ enum { MLX5_OPCODE_UMR = 0x25, + MLX5_OPCODE_SIGNATURE_CANCELED = (1 << 15), }; enum { @@ -299,6 +337,18 @@ struct mlx5_outbox_hdr { __be32 syndrome; }; +struct mlx5_cmd_set_dc_cnak_mbox_in { + struct mlx5_inbox_hdr hdr; + u8 enable; + u8 reserved[47]; + __be64 pa; +}; + +struct mlx5_cmd_set_dc_cnak_mbox_out { + struct mlx5_outbox_hdr hdr; + u8 rsvd[8]; +}; + struct mlx5_cmd_layout { u8 type; u8 rsvd0[3]; @@ -339,9 +389,12 @@ struct mlx5_init_seg { __be32 rsvd1[120]; __be32 initializing; struct mlx5_health_buffer health; - __be32 rsvd2[884]; + __be32 rsvd2[880]; + __be32 internal_timer_h; + __be32 internal_timer_l; + __be32 rsvd3[2]; __be32 health_counter; - __be32 rsvd3[1019]; + __be32 rsvd4[1019]; __be64 ieee1588_clk; __be32 ieee1588_clk_type; __be32 clr_intx; @@ -420,6 +473,7 @@ enum { MLX5_MODULE_EVENT_ERROR_ENFORCE_PART_NUMBER_LIST = 0x4, MLX5_MODULE_EVENT_ERROR_UNKNOWN_IDENTIFIER = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, + MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, }; struct mlx5_eqe_port_module_event { @@ -832,6 +886,10 @@ struct mlx5_query_eq_mbox_out { struct mlx5_eq_context ctx; }; +enum { + MLX5_MKEY_STATUS_FREE = 1 << 6, +}; + struct mlx5_mkey_seg { /* This is a two bit field occupying bits 31-30. * bit 31 is always 0, @@ -868,7 +926,7 @@ struct mlx5_query_special_ctxs_mbox_out struct mlx5_create_mkey_mbox_in { struct mlx5_inbox_hdr hdr; __be32 input_mkey_index; - u8 rsvd0[4]; + __be32 flags; struct mlx5_mkey_seg seg; u8 rsvd1[16]; __be32 xlat_oct_act_size; @@ -971,6 +1029,17 @@ struct mlx5_destroy_psv_out { u8 rsvd[8]; }; +static inline int mlx5_host_is_le(void) +{ +#if defined(__LITTLE_ENDIAN) + return 1; +#elif defined(__BIG_ENDIAN) + return 0; +#else +#error Host endianness not defined +#endif +} + #define MLX5_CMD_OP_MAX 0x939 enum { @@ -1008,6 +1077,8 @@ enum { MLX5_FLOW_TABLE_TYPE_EGRESS_ACL = 2, MLX5_FLOW_TABLE_TYPE_INGRESS_ACL = 3, MLX5_FLOW_TABLE_TYPE_ESWITCH = 4, + MLX5_FLOW_TABLE_TYPE_SNIFFER_RX = 5, + MLX5_FLOW_TABLE_TYPE_SNIFFER_TX = 6, }; enum { @@ -1062,6 +1133,10 @@ enum mlx5_cap_type { MLX5_CAP_FLOW_TABLE, MLX5_CAP_ESWITCH_FLOW_TABLE, MLX5_CAP_ESWITCH, + MLX5_CAP_SNAPSHOT, + MLX5_CAP_VECTOR_CALC, + MLX5_CAP_QOS, + MLX5_CAP_DEBUG, /* NUM OF CAP Types */ MLX5_CAP_NUM }; @@ -1107,21 +1182,23 @@ enum mlx5_cap_type { MLX5_GET(flow_table_eswitch_cap, \ mdev->hca_caps_max[MLX5_CAP_ESWITCH_FLOW_TABLE], cap) -#define MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE(dev, \ - flow_table_properties_esw_acl_egress.cap) - -#define MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL_MAX(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE_MAX(dev, \ - flow_table_properties_esw_acl_egress.cap) - -#define MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE(dev, \ - flow_table_properties_esw_acl_ingress.cap) - -#define MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL_MAX(mdev, cap) \ - MLX5_CAP_ESW_FLOWTABLE_MAX(dev, \ - flow_table_properties_esw_acl_ingress.cap) +#define MLX5_CAP_ESW_FLOWTABLE_FDB(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE(mdev, flow_table_properties_nic_esw_fdb.cap) + +#define MLX5_CAP_ESW_FLOWTABLE_FDB_MAX(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, flow_table_properties_nic_esw_fdb.cap) + +#define MLX5_CAP_ESW_EGRESS_ACL(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE(mdev, flow_table_properties_esw_acl_egress.cap) + +#define MLX5_CAP_ESW_EGRESS_ACL_MAX(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, flow_table_properties_esw_acl_egress.cap) + +#define MLX5_CAP_ESW_INGRESS_ACL(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE(mdev, flow_table_properties_esw_acl_ingress.cap) + +#define MLX5_CAP_ESW_INGRESS_ACL_MAX(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, flow_table_properties_esw_acl_ingress.cap) #define MLX5_CAP_ESW(mdev, cap) \ MLX5_GET(e_switch_cap, \ @@ -1137,6 +1214,38 @@ enum mlx5_cap_type { #define MLX5_CAP_ODP_MAX(mdev, cap)\ MLX5_GET(odp_cap, mdev->hca_caps_max[MLX5_CAP_ODP], cap) +#define MLX5_CAP_SNAPSHOT(mdev, cap) \ + MLX5_GET(snapshot_cap, \ + mdev->hca_caps_cur[MLX5_CAP_SNAPSHOT], cap) + +#define MLX5_CAP_SNAPSHOT_MAX(mdev, cap) \ + MLX5_GET(snapshot_cap, \ + mdev->hca_caps_max[MLX5_CAP_SNAPSHOT], cap) + +#define MLX5_CAP_EOIB_OFFLOADS(mdev, cap) \ + MLX5_GET(per_protocol_networking_offload_caps,\ + mdev->hca_caps_cur[MLX5_CAP_EOIB_OFFLOADS], cap) + +#define MLX5_CAP_EOIB_OFFLOADS_MAX(mdev, cap) \ + MLX5_GET(per_protocol_networking_offload_caps,\ + mdev->hca_caps_max[MLX5_CAP_EOIB_OFFLOADS], cap) + +#define MLX5_CAP_DEBUG(mdev, cap) \ + MLX5_GET(debug_cap, \ + mdev->hca_caps_cur[MLX5_CAP_DEBUG], cap) + +#define MLX5_CAP_DEBUG_MAX(mdev, cap) \ + MLX5_GET(debug_cap, \ + mdev->hca_caps_max[MLX5_CAP_DEBUG], cap) + +#define MLX5_CAP_QOS(mdev, cap) \ + MLX5_GET(qos_cap,\ + mdev->hca_caps_cur[MLX5_CAP_QOS], cap) + +#define MLX5_CAP_QOS_MAX(mdev, cap) \ + MLX5_GET(qos_cap,\ + mdev->hca_caps_max[MLX5_CAP_QOS], cap) + enum { MLX5_CMD_STAT_OK = 0x0, MLX5_CMD_STAT_INT_ERR = 0x1, @@ -1168,6 +1277,22 @@ enum { }; enum { + MLX5_PCIE_PERFORMANCE_COUNTERS_GROUP = 0x0, + MLX5_PCIE_LANE_COUNTERS_GROUP = 0x1, + MLX5_PCIE_TIMERS_AND_STATES_COUNTERS_GROUP = 0x2, +}; + +enum { + MLX5_NUM_UUARS_PER_PAGE = MLX5_NON_FP_BF_REGS_PER_PAGE, + MLX5_DEF_TOT_UUARS = 8 * MLX5_NUM_UUARS_PER_PAGE, +}; + +enum { + NUM_DRIVER_UARS = 4, + NUM_LOW_LAT_UUARS = 4, +}; + +enum { MLX5_CAP_PORT_TYPE_IB = 0x0, MLX5_CAP_PORT_TYPE_ETH = 0x1, }; @@ -1252,4 +1377,7 @@ static inline int mlx5_get_cqe_format(co return (cqe->op_own & MLX5E_CQE_FORMAT_MASK) >> 2; } +/* 8 regular priorities + 1 for multicast */ +#define MLX5_NUM_BYPASS_FTS 9 + #endif /* MLX5_DEVICE_H */ Modified: stable/10/sys/dev/mlx5/driver.h ============================================================================== --- stable/10/sys/dev/mlx5/driver.h Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/driver.h Fri Sep 23 08:28:44 2016 (r306244) @@ -42,16 +42,15 @@ #include #include +#define MLX5_QCOUNTER_SETS_NETDEV 64 + enum { MLX5_BOARD_ID_LEN = 64, MLX5_MAX_NAME_LEN = 16, }; enum { - /* one minute for the sake of bringup. Generally, commands must always - * complete and we may need to increase this timeout value - */ - MLX5_CMD_TIMEOUT_MSEC = 7200 * 1000, + MLX5_CMD_TIMEOUT_MSEC = 8 * 60 * 1000, MLX5_CMD_WQ_MAX_NAME = 32, }; @@ -85,20 +84,44 @@ enum { }; enum { - MLX5_ATOMIC_MODE_IB_COMP = 1 << 16, - MLX5_ATOMIC_MODE_CX = 2 << 16, - MLX5_ATOMIC_MODE_8B = 3 << 16, - MLX5_ATOMIC_MODE_16B = 4 << 16, - MLX5_ATOMIC_MODE_32B = 5 << 16, - MLX5_ATOMIC_MODE_64B = 6 << 16, - MLX5_ATOMIC_MODE_128B = 7 << 16, - MLX5_ATOMIC_MODE_256B = 8 << 16, + MLX5_ATOMIC_MODE_OFF = 16, + MLX5_ATOMIC_MODE_NONE = 0 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_IB_COMP = 1 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_CX = 2 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_8B = 3 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_16B = 4 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_32B = 5 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_64B = 6 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_128B = 7 << MLX5_ATOMIC_MODE_OFF, + MLX5_ATOMIC_MODE_256B = 8 << MLX5_ATOMIC_MODE_OFF, +}; + +enum { + MLX5_ATOMIC_MODE_DCT_OFF = 20, + MLX5_ATOMIC_MODE_DCT_NONE = 0 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_IB_COMP = 1 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_CX = 2 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_8B = 3 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_16B = 4 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_32B = 5 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_64B = 6 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_128B = 7 << MLX5_ATOMIC_MODE_DCT_OFF, + MLX5_ATOMIC_MODE_DCT_256B = 8 << MLX5_ATOMIC_MODE_DCT_OFF, +}; + +enum { + MLX5_ATOMIC_OPS_CMP_SWAP = 1 << 0, + MLX5_ATOMIC_OPS_FETCH_ADD = 1 << 1, + MLX5_ATOMIC_OPS_MASKED_CMP_SWAP = 1 << 2, + MLX5_ATOMIC_OPS_MASKED_FETCH_ADD = 1 << 3, }; enum { MLX5_REG_QETCR = 0x4005, MLX5_REG_QPDP = 0x4007, MLX5_REG_QTCT = 0x400A, + MLX5_REG_DCBX_PARAM = 0x4020, + MLX5_REG_DCBX_APP = 0x4021, MLX5_REG_PCAP = 0x5001, MLX5_REG_PMTU = 0x5003, MLX5_REG_PTYS = 0x5004, @@ -116,6 +139,7 @@ enum { MLX5_REG_NODE_DESC = 0x6001, MLX5_REG_HOST_ENDIANNESS = 0x7004, MLX5_REG_MCIA = 0x9014, + MLX5_REG_MPCNT = 0x9051, }; enum dbg_rsc_type { @@ -124,6 +148,12 @@ enum dbg_rsc_type { MLX5_DBG_RSC_CQ, }; +enum { + MLX5_INTERFACE_PROTOCOL_IB = 0, + MLX5_INTERFACE_PROTOCOL_ETH = 1, + MLX5_INTERFACE_NUMBER = 2, +}; + struct mlx5_field_desc { struct dentry *dent; int i; @@ -147,6 +177,10 @@ enum mlx5_dev_event { MLX5_DEV_EVENT_GUID_CHANGE, MLX5_DEV_EVENT_CLIENT_REREG, MLX5_DEV_EVENT_VPORT_CHANGE, + MLX5_DEV_EVENT_ERROR_STATE_DCBX, + MLX5_DEV_EVENT_REMOTE_CONFIG_CHANGE, + MLX5_DEV_EVENT_LOCAL_OPER_CHANGE, + MLX5_DEV_EVENT_REMOTE_CONFIG_APPLICATION_PRIORITY_CHANGE, }; enum mlx5_port_status { @@ -375,9 +409,12 @@ struct mlx5_core_mr { }; enum mlx5_res_type { - MLX5_RES_QP, - MLX5_RES_SRQ, - MLX5_RES_XSRQ, + MLX5_RES_QP = MLX5_EVENT_QUEUE_TYPE_QP, + MLX5_RES_RQ = MLX5_EVENT_QUEUE_TYPE_RQ, + MLX5_RES_SQ = MLX5_EVENT_QUEUE_TYPE_SQ, + MLX5_RES_SRQ = 3, + MLX5_RES_XSRQ = 4, + MLX5_RES_DCT = 5, }; struct mlx5_core_rsc_common { @@ -413,8 +450,6 @@ struct mlx5_eq_table { struct mlx5_uar { u32 index; - struct list_head bf_list; - unsigned free_bf_bmap; void __iomem *bf_map; void __iomem *map; }; @@ -461,7 +496,7 @@ struct mlx5_srq_table { struct mlx5_mr_table { /* protect radix tree */ - rwlock_t lock; + spinlock_t lock; struct radix_tree_root tree; }; @@ -483,7 +518,7 @@ struct mlx5_priv { struct workqueue_struct *pg_wq; struct rb_root page_root; int fw_pages; - int reg_pages; + atomic_t reg_pages; struct list_head free_list; struct mlx5_core_health health; @@ -521,6 +556,12 @@ struct mlx5_priv { struct list_head dev_list; struct list_head ctx_list; spinlock_t ctx_lock; + unsigned long pci_dev_data; +}; + +enum mlx5_device_state { + MLX5_DEVICE_STATE_UP, + MLX5_DEVICE_STATE_INTERNAL_ERROR, }; struct mlx5_special_contexts { @@ -535,6 +576,7 @@ struct mlx5_core_dev { u32 hca_caps_cur[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; u32 hca_caps_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; struct mlx5_init_seg __iomem *iseg; + enum mlx5_device_state state; void (*event) (struct mlx5_core_dev *dev, enum mlx5_dev_event event, unsigned long param); @@ -544,6 +586,7 @@ struct mlx5_core_dev { u32 issi; struct mlx5_special_contexts special_contexts; unsigned int module_status[MLX5_MAX_PORTS]; + u32 num_q_counter_allocated[MLX5_INTERFACE_NUMBER]; }; enum { @@ -573,6 +616,8 @@ struct mlx5_net_counters { }; struct mlx5_ptys_reg { + u8 an_dis_admin; + u8 an_dis_ap; u8 local_port; u8 proto_mask; u32 eth_proto_cap; @@ -620,6 +665,15 @@ enum { MLX5_DB_PER_PAGE = PAGE_SIZE / L1_CACHE_BYTES, }; +struct mlx5_core_dct { + struct mlx5_core_rsc_common common; /* must be first */ + void (*event)(struct mlx5_core_dct *, int); + int dctn; + struct completion drained; + struct mlx5_rsc_debug *dbg; + int pid; +}; + enum { MLX5_COMP_EQ_SIZE = 1024, }; @@ -725,9 +779,14 @@ static inline void *mlx5_vzalloc(unsigne return rtn; } -static inline u32 mlx5_base_mkey(const u32 key) +static inline void *mlx5_vmalloc(unsigned long size) { - return key & 0xffffff00u; + void *rtn; + + rtn = kmalloc(size, GFP_KERNEL | __GFP_NOWARN); + if (!rtn) + rtn = vmalloc(size); + return rtn; } int mlx5_cmd_init(struct mlx5_core_dev *dev); @@ -809,6 +868,8 @@ int mlx5_stop_eqs(struct mlx5_core_dev * int mlx5_vector2eqn(struct mlx5_core_dev *dev, int vector, int *eqn, int *irqn); int mlx5_core_attach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn); int mlx5_core_detach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn); +int mlx5_core_set_dc_cnak_trace(struct mlx5_core_dev *dev, int enable, + u64 addr); int mlx5_qp_debugfs_init(struct mlx5_core_dev *dev); void mlx5_qp_debugfs_cleanup(struct mlx5_core_dev *dev); @@ -816,11 +877,16 @@ int mlx5_core_access_reg(struct mlx5_cor int size_in, void *data_out, int size_out, u16 reg_num, int arg, int write); +void mlx5_toggle_port_link(struct mlx5_core_dev *dev); int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, int ptys_size, int proto_mask); int mlx5_query_port_proto_cap(struct mlx5_core_dev *dev, u32 *proto_cap, int proto_mask); +int mlx5_query_port_autoneg(struct mlx5_core_dev *dev, int proto_mask, + u8 *an_disable_cap, u8 *an_disable_status); +int mlx5_set_port_autoneg(struct mlx5_core_dev *dev, bool disable, + u32 eth_proto_admin, int proto_mask); int mlx5_query_port_proto_admin(struct mlx5_core_dev *dev, u32 *proto_admin, int proto_mask); int mlx5_set_port_proto(struct mlx5_core_dev *dev, u32 proto_admin, @@ -828,10 +894,14 @@ int mlx5_set_port_proto(struct mlx5_core int mlx5_set_port_status(struct mlx5_core_dev *dev, enum mlx5_port_status status); int mlx5_query_port_status(struct mlx5_core_dev *dev, u8 *status); +int mlx5_query_port_admin_status(struct mlx5_core_dev *dev, + enum mlx5_port_status *status); int mlx5_set_port_pause(struct mlx5_core_dev *dev, u32 port, u32 rx_pause, u32 tx_pause); int mlx5_query_port_pause(struct mlx5_core_dev *dev, u32 port, u32 *rx_pause, u32 *tx_pause); +int mlx5_set_port_pfc(struct mlx5_core_dev *dev, u8 pfc_en_tx, u8 pfc_en_rx); +int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 *pfc_en_tx, u8 *pfc_en_rx); int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu); int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu); @@ -884,6 +954,9 @@ int mlx5_modify_port_cong_params(struct void *in, int in_size); int mlx5_query_port_cong_statistics(struct mlx5_core_dev *mdev, int clear, void *out, int out_size); +int mlx5_set_diagnostics(struct mlx5_core_dev *mdev, void *in, int in_size); +int mlx5_query_diagnostics(struct mlx5_core_dev *mdev, u8 num_of_samples, + u16 sample_index, void *out, int out_size); static inline u32 mlx5_mkey_to_idx(u32 mkey) { return mkey >> 8; @@ -905,12 +978,7 @@ enum { }; enum { - MAX_MR_CACHE_ENTRIES = 16, -}; - -enum { - MLX5_INTERFACE_PROTOCOL_IB = 0, - MLX5_INTERFACE_PROTOCOL_ETH = 1, + MAX_MR_CACHE_ENTRIES = 15, }; struct mlx5_interface { @@ -936,6 +1004,14 @@ struct mlx5_profile { } mr_cache[MAX_MR_CACHE_ENTRIES]; }; +enum { + MLX5_PCI_DEV_IS_VF = 1 << 0, +}; + +static inline int mlx5_core_is_pf(struct mlx5_core_dev *dev) +{ + return !(dev->priv.pci_dev_data & MLX5_PCI_DEV_IS_VF); +} #define MLX5_EEPROM_MAX_BYTES 32 #define MLX5_EEPROM_IDENTIFIER_BYTE_MASK 0x000000ff Modified: stable/10/sys/dev/mlx5/flow_table.h ============================================================================== --- stable/10/sys/dev/mlx5/flow_table.h Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/flow_table.h Fri Sep 23 08:28:44 2016 (r306244) @@ -30,6 +30,9 @@ #include +#define MLX5_SET_FLOW_TABLE_ROOT_OPMOD_SET 0x0 +#define MLX5_SET_FLOW_TABLE_ROOT_OPMOD_RESET 0x1 + struct mlx5_flow_table_group { u8 log_sz; u8 match_criteria_enable; @@ -44,7 +47,10 @@ void mlx5_destroy_flow_table(void *flow_ int mlx5_add_flow_table_entry(void *flow_table, u8 match_criteria_enable, void *match_criteria, void *flow_context, u32 *flow_index); -void mlx5_del_flow_table_entry(void *flow_table, u32 flow_index); +int mlx5_del_flow_table_entry(void *flow_table, u32 flow_index); u32 mlx5_get_flow_table_id(void *flow_table); +int mlx5_set_flow_table_root(struct mlx5_core_dev *mdev, u16 op_mod, + u8 vport_num, u8 table_type, u32 table_id, + u32 underlay_qpn); #endif /* MLX5_FLOW_TABLE_H */ Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Fri Sep 23 08:28:44 2016 (r306244) @@ -121,7 +121,7 @@ static int alloc_ent(struct mlx5_cmd *cm clear_bit(ret, &cmd->bitmask); spin_unlock_irqrestore(&cmd->alloc_lock, flags); - return ret < cmd->max_reg_cmds ? ret : -ENOMEM; + return ret < cmd->max_reg_cmds ? ret : -1; } static void free_ent(struct mlx5_cmd *cmd, int idx) @@ -396,6 +396,9 @@ const char *mlx5_command_str(int command case MLX5_CMD_OP_CREATE_DCT: return "CREATE_DCT"; + case MLX5_CMD_OP_SET_DC_CNAK_TRACE: + return "SET_DC_CNAK_TRACE"; + case MLX5_CMD_OP_DESTROY_DCT: return "DESTROY_DCT"; @@ -639,6 +642,12 @@ const char *mlx5_command_str(int command case MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY: return "DELETE_FLOW_TABLE_ENTRY"; + case MLX5_CMD_OP_SET_DIAGNOSTICS: + return "MLX5_CMD_OP_SET_DIAGNOSTICS"; + + case MLX5_CMD_OP_QUERY_DIAGNOSTICS: + return "MLX5_CMD_OP_QUERY_DIAGNOSTICS"; + default: return "unknown command opcode"; } } Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h Fri Sep 23 08:28:44 2016 (r306244) @@ -64,6 +64,8 @@ enum { MLX5_CMD_TIME, /* print command execution time */ }; +struct mlx5_core_dev; + int mlx5_query_hca_caps(struct mlx5_core_dev *dev); int mlx5_query_board_id(struct mlx5_core_dev *dev); int mlx5_cmd_init_hca(struct mlx5_core_dev *dev); Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_cq.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_cq.c Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_cq.c Fri Sep 23 08:28:44 2016 (r306244) @@ -187,10 +187,12 @@ int mlx5_core_destroy_cq(struct mlx5_cor in.cqn = cpu_to_be32(cq->cqn); err = mlx5_cmd_exec(dev, &in, sizeof(in), &out, sizeof(out)); if (err) - return err; + goto out; - if (out.hdr.status) - return mlx5_cmd_status_to_err(&out.hdr); + if (out.hdr.status) { + err = mlx5_cmd_status_to_err(&out.hdr); + goto out; + } synchronize_irq(cq->irqn); @@ -198,7 +200,9 @@ int mlx5_core_destroy_cq(struct mlx5_cor complete(&cq->free); wait_for_completion(&cq->free); - return 0; +out: + + return err; } EXPORT_SYMBOL(mlx5_core_destroy_cq); Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Fri Sep 23 08:28:44 2016 (r306244) @@ -157,6 +157,8 @@ static const char *eqe_type_str(u8 type) return "MLX5_EVENT_TYPE_PAGE_REQUEST"; case MLX5_EVENT_TYPE_NIC_VPORT_CHANGE: return "MLX5_EVENT_TYPE_NIC_VPORT_CHANGE"; + case MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT: + return "MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT"; default: return "Unrecognized event"; } @@ -183,6 +185,21 @@ static enum mlx5_dev_event port_subtype_ return -1; } +static enum mlx5_dev_event dcbx_subevent(u8 subtype) +{ + switch (subtype) { + case MLX5_DCBX_EVENT_SUBTYPE_ERROR_STATE_DCBX: + return MLX5_DEV_EVENT_ERROR_STATE_DCBX; + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_CHANGE: + return MLX5_DEV_EVENT_REMOTE_CONFIG_CHANGE; + case MLX5_DCBX_EVENT_SUBTYPE_LOCAL_OPER_CHANGE: + return MLX5_DEV_EVENT_LOCAL_OPER_CHANGE; + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_APP_PRIORITY_CHANGE: + return MLX5_DEV_EVENT_REMOTE_CONFIG_APPLICATION_PRIORITY_CHANGE; + } + return -1; +} + static void eq_update_ci(struct mlx5_eq *eq, int arm) { __be32 __iomem *addr = eq->doorbell + (arm ? 0 : 2); @@ -261,6 +278,26 @@ static int mlx5_eq_int(struct mlx5_core_ port, eqe->sub_type); } break; + + case MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT: + port = (eqe->data.port.port >> 4) & 0xf; + switch (eqe->sub_type) { + case MLX5_DCBX_EVENT_SUBTYPE_ERROR_STATE_DCBX: + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_CHANGE: + case MLX5_DCBX_EVENT_SUBTYPE_LOCAL_OPER_CHANGE: + case MLX5_DCBX_EVENT_SUBTYPE_REMOTE_CONFIG_APP_PRIORITY_CHANGE: + if (dev->event) + dev->event(dev, + dcbx_subevent(eqe->sub_type), + 0); + break; + default: + mlx5_core_warn(dev, + "dcbx event with unrecognized subtype: port %d, sub_type %d\n", + port, eqe->sub_type); + } + break; + case MLX5_EVENT_TYPE_CQ_ERROR: cqn = be32_to_cpu(eqe->data.cq_err.cqn) & 0xffffff; mlx5_core_warn(dev, "CQ error on CQN 0x%x, syndrom 0x%x\n", @@ -478,6 +515,10 @@ int mlx5_start_eqs(struct mlx5_core_dev async_event_mask |= (1ull << MLX5_EVENT_TYPE_NIC_VPORT_CHANGE); + if (MLX5_CAP_GEN(dev, dcbx)) + async_event_mask |= (1ull << + MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT); + err = mlx5_create_map_eq(dev, &table->cmd_eq, MLX5_EQ_VEC_CMD, MLX5_NUM_CMD_EQE, 1ull << MLX5_EVENT_TYPE_CMD, "mlx5_cmd_eq", &dev->priv.uuari.uars[0]); @@ -575,6 +616,8 @@ static const char *mlx5_port_module_even return "Unknown identifier"; case MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE: return "High Temperature"; + case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: + return "Cable is shorted"; default: return "Unknown error type"; @@ -607,19 +650,19 @@ static void mlx5_port_module_event(struc switch (module_status) { case MLX5_MODULE_STATUS_PLUGGED: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: plugged", module_num); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: plugged\n", module_num); break; case MLX5_MODULE_STATUS_UNPLUGGED: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: unplugged", module_num); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: unplugged\n", module_num); break; case MLX5_MODULE_STATUS_ERROR: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: error, %s", module_num, mlx5_port_module_event_error_type_to_string(error_type)); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: error, %s\n", module_num, mlx5_port_module_event_error_type_to_string(error_type)); break; default: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, unknown status", module_num); + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, unknown status\n", module_num); } /* store module status */ if (module_num < MLX5_MAX_PORTS) Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c Fri Sep 23 08:28:44 2016 (r306244) @@ -97,10 +97,10 @@ static int mlx5_vacl_table_allow_vlan(vo MLX5_SET(flow_context, flow_context, action, MLX5_FLOW_CONTEXT_ACTION_ALLOW); in_match_value = MLX5_ADDR_OF(flow_context, flow_context, match_value); - MLX5_SET(fte_match_param, in_match_value, outer_headers.vlan_tag, 1); + MLX5_SET(fte_match_param, in_match_value, outer_headers.cvlan_tag, 1); MLX5_SET(fte_match_param, in_match_value, outer_headers.first_vid, vlan); - MLX5_SET(fte_match_param, in_match_criteria, outer_headers.vlan_tag, 1); + MLX5_SET(fte_match_param, in_match_criteria, outer_headers.cvlan_tag, 1); MLX5_SET(fte_match_param, in_match_criteria, outer_headers.first_vid, 0xfff); if (acl_table->spoofchk_enabled) { @@ -256,8 +256,8 @@ static int mlx5_vacl_table_apply_untagge /* Apply new untagged rule */ MLX5_SET(flow_context, flow_context, action, new_action); in_match_value = MLX5_ADDR_OF(flow_context, flow_context, match_value); - MLX5_SET(fte_match_param, in_match_value, outer_headers.vlan_tag, 0); - MLX5_SET(fte_match_param, in_match_criteria, outer_headers.vlan_tag, 1); + MLX5_SET(fte_match_param, in_match_value, outer_headers.cvlan_tag, 0); + MLX5_SET(fte_match_param, in_match_criteria, outer_headers.cvlan_tag, 1); if (acl_table->spoofchk_enabled) { smac = MLX5_ADDR_OF(fte_match_param, in_match_value, @@ -550,7 +550,7 @@ static int mlx5_vacl_table_create_ft(voi MLX5_MATCH_OUTER_HEADERS; MLX5_SET(fte_match_param, g[MLX5_ACL_UNTAGGED_GROUP_IDX - shift_idx].match_criteria, - outer_headers.vlan_tag, 1); + outer_headers.cvlan_tag, 1); if (spoofchk) { smac = MLX5_ADDR_OF(fte_match_param, g[MLX5_ACL_UNTAGGED_GROUP_IDX - shift_idx] @@ -565,7 +565,7 @@ static int mlx5_vacl_table_create_ft(voi MLX5_MATCH_OUTER_HEADERS; MLX5_SET(fte_match_param, g[MLX5_ACL_VLAN_GROUP_IDX - shift_idx].match_criteria, - outer_headers.vlan_tag, 1); + outer_headers.cvlan_tag, 1); MLX5_SET(fte_match_param, g[MLX5_ACL_VLAN_GROUP_IDX - shift_idx].match_criteria, outer_headers.first_vid, 0xfff); @@ -628,10 +628,10 @@ void *mlx5_vacl_table_create(struct mlx5 struct mlx5_vacl_table *acl_table; int err = 0; - if (is_egress && !MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL(dev, ft_support)) + if (is_egress && !MLX5_CAP_ESW_EGRESS_ACL(dev, ft_support)) return NULL; - if (!is_egress && !MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL(dev, ft_support)) + if (!is_egress && !MLX5_CAP_ESW_INGRESS_ACL(dev, ft_support)) return NULL; acl_table = kzalloc(sizeof(*acl_table), GFP_KERNEL); @@ -641,9 +641,9 @@ void *mlx5_vacl_table_create(struct mlx5 acl_table->acl_type = is_egress ? MLX5_FLOW_TABLE_TYPE_EGRESS_ACL : MLX5_FLOW_TABLE_TYPE_INGRESS_ACL; acl_table->max_ft_size = (is_egress ? - MLX5_CAP_ESW_FLOWTABLE_EGRESS_ACL(dev, + MLX5_CAP_ESW_EGRESS_ACL(dev, log_max_ft_size) : - MLX5_CAP_ESW_FLOWTABLE_INGRESS_ACL(dev, + MLX5_CAP_ESW_INGRESS_ACL(dev, log_max_ft_size)); acl_table->dev = dev; acl_table->vport = vport; Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c Fri Sep 23 08:28:44 2016 (r306244) @@ -87,7 +87,7 @@ static int mlx5_set_flow_entry_cmd(struc return err; } -static void mlx5_del_flow_entry_cmd(struct mlx5_flow_table *ft, u32 flow_index) +static int mlx5_del_flow_entry_cmd(struct mlx5_flow_table *ft, u32 flow_index) { u32 in[MLX5_ST_SZ_DW(delete_fte_in)]; u32 out[MLX5_ST_SZ_DW(delete_fte_out)]; @@ -103,7 +103,8 @@ static void mlx5_del_flow_entry_cmd(stru MLX5_SET_DFTEI(in, flow_index, flow_index); MLX5_SET_DFTEI(in, opcode, MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY); - mlx5_cmd_exec_check_status(ft->dev, in, sizeof(in), out, sizeof(out)); + return mlx5_cmd_exec_check_status(ft->dev, in, sizeof(in), out, + sizeof(out)); } static void mlx5_destroy_flow_group_cmd(struct mlx5_flow_table *ft, int i) @@ -343,12 +344,15 @@ int mlx5_add_flow_table_entry(void *flow } EXPORT_SYMBOL(mlx5_add_flow_table_entry); -void mlx5_del_flow_table_entry(void *flow_table, u32 flow_index) +int mlx5_del_flow_table_entry(void *flow_table, u32 flow_index) { struct mlx5_flow_table *ft = flow_table; + int ret; - mlx5_del_flow_entry_cmd(ft, flow_index); - mlx5_free_flow_index(ft, flow_index); + ret = mlx5_del_flow_entry_cmd(ft, flow_index); + if (!ret) + mlx5_free_flow_index(ft, flow_index); + return ret; } EXPORT_SYMBOL(mlx5_del_flow_table_entry); @@ -430,3 +434,46 @@ u32 mlx5_get_flow_table_id(void *flow_ta return ft->id; } EXPORT_SYMBOL(mlx5_get_flow_table_id); + +int mlx5_set_flow_table_root(struct mlx5_core_dev *mdev, u16 op_mod, + u8 vport_num, u8 table_type, u32 table_id, + u32 underlay_qpn) +{ + u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)]; + u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)]; + int err; + int is_group_manager; + + is_group_manager = MLX5_CAP_GEN(mdev, vport_group_manager); + + memset(in, 0, sizeof(in)); + + MLX5_SET(set_flow_table_root_in, in, op_mod, op_mod); + MLX5_SET(set_flow_table_root_in, in, table_type, table_type); + MLX5_SET(set_flow_table_root_in, in, underlay_qpn, underlay_qpn); + if (op_mod == MLX5_SET_FLOW_TABLE_ROOT_OPMOD_SET) + MLX5_SET(set_flow_table_root_in, in, table_id, table_id); + + MLX5_SET(set_flow_table_root_in, in, opcode, + MLX5_CMD_OP_SET_FLOW_TABLE_ROOT); + + if (vport_num) { + if (is_group_manager) { + MLX5_SET(set_flow_table_root_in, in, other_vport, + 1); + MLX5_SET(set_flow_table_root_in, in, vport_number, + vport_num); + } else { + return -EPERM; + } + } + + memset(out, 0, sizeof(out)); + err = mlx5_cmd_exec_check_status(mdev, in, sizeof(in), out, + sizeof(out)); + if (err) + return err; + + return 0; +} +EXPORT_SYMBOL(mlx5_set_flow_table_root); Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_fw.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_fw.c Fri Sep 23 08:26:45 2016 (r306243) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_fw.c Fri Sep 23 08:28:44 2016 (r306244) @@ -201,6 +201,50 @@ int mlx5_query_hca_caps(struct mlx5_core return err; } + if (MLX5_CAP_GEN(dev, snapshot)) { + err = mlx5_core_get_caps(dev, MLX5_CAP_SNAPSHOT, + HCA_CAP_OPMOD_GET_CUR); + if (err) + return err; + err = mlx5_core_get_caps(dev, MLX5_CAP_SNAPSHOT, + HCA_CAP_OPMOD_GET_MAX); + if (err) + return err; + } + + if (MLX5_CAP_GEN(dev, ipoib_enhanced_offloads)) { + err = mlx5_core_get_caps(dev, MLX5_CAP_EOIB_OFFLOADS, + HCA_CAP_OPMOD_GET_CUR); + if (err) + return err; + err = mlx5_core_get_caps(dev, MLX5_CAP_EOIB_OFFLOADS, + HCA_CAP_OPMOD_GET_MAX); + if (err) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Sep 23 08:29:29 2016 Return-Path: Delivered-To: svn-src-all@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 7A758BE68F1; Fri, 23 Sep 2016 08:29:29 +0000 (UTC) (envelope-from hselasky@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 393881B5D; Fri, 23 Sep 2016 08:29:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8TS1q052314; Fri, 23 Sep 2016 08:29:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8TSD4052310; Fri, 23 Sep 2016 08:29:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230829.u8N8TSD4052310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306245 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:29:29 -0000 Author: hselasky Date: Fri Sep 23 08:29:27 2016 New Revision: 306245 URL: https://svnweb.freebsd.org/changeset/base/306245 Log: MFC r305868: mlx5en: Separate the sendqueue from using the mlx5e_channel structure. This change allows for reusing the transmit path for so called rate limited senqueues. While at it optimise some pointer lookups in the fast path. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:28:44 2016 (r306244) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:29:27 2016 (r306245) @@ -439,9 +439,9 @@ struct mlx5e_cq { /* data path - accessed per HW polling */ struct mlx5_core_cq mcq; - struct mlx5e_channel *channel; /* control */ + struct mlx5e_priv *priv; struct mlx5_wq_ctrl wq_ctrl; } __aligned(MLX5E_CACHELINE_SIZE); @@ -525,6 +525,7 @@ struct mlx5e_sq { struct mlx5_wq_cyc wq; void __iomem *uar_map; void __iomem *uar_bf_map; + struct ifnet *ifp; u32 sqn; u32 bf_buf_size; struct device *pdev; @@ -533,7 +534,7 @@ struct mlx5e_sq { /* control path */ struct mlx5_wq_ctrl wq_ctrl; struct mlx5_uar uar; - struct mlx5e_channel *channel; + struct mlx5e_priv *priv; int tc; unsigned int queue_state; } __aligned(MLX5E_CACHELINE_SIZE); Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:28:44 2016 (r306244) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:29:27 2016 (r306245) @@ -988,7 +988,8 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->pdev = c->pdev; sq->mkey_be = c->mkey_be; - sq->channel = c; + sq->ifp = priv->ifp; + sq->priv = priv; sq->tc = tc; sq->br = buf_ring_alloc(MLX5E_SQ_TX_QUEUE_SIZE, M_MLX5EN, @@ -1045,15 +1046,12 @@ done: static void mlx5e_destroy_sq(struct mlx5e_sq *sq) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - /* destroy all sysctl nodes */ sysctl_ctx_free(&sq->stats.ctx); mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); - mlx5_unmap_free_uar(priv->mdev, &sq->uar); + mlx5_unmap_free_uar(sq->priv->mdev, &sq->uar); taskqueue_drain(sq->sq_tq, &sq->sq_task); taskqueue_free(sq->sq_tq); buf_ring_free(sq->br, M_MLX5EN); @@ -1062,10 +1060,6 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) static int mlx5e_enable_sq(struct mlx5e_sq *sq, struct mlx5e_sq_param *param) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - void *in; void *sqc; void *wq; @@ -1083,8 +1077,8 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str memcpy(sqc, param->sqc, sizeof(param->sqc)); - MLX5_SET(sqc, sqc, tis_num_0, priv->tisn[sq->tc]); - MLX5_SET(sqc, sqc, cqn, c->sq[sq->tc].cq.mcq.cqn); + MLX5_SET(sqc, sqc, tis_num_0, sq->priv->tisn[sq->tc]); + MLX5_SET(sqc, sqc, cqn, sq->cq.mcq.cqn); MLX5_SET(sqc, sqc, state, MLX5_SQC_STATE_RST); MLX5_SET(sqc, sqc, tis_lst_sz, 1); MLX5_SET(sqc, sqc, flush_in_error_en, 1); @@ -1098,7 +1092,7 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str mlx5_fill_page_array(&sq->wq_ctrl.buf, (__be64 *) MLX5_ADDR_OF(wq, wq, pas)); - err = mlx5_core_create_sq(mdev, in, inlen, &sq->sqn); + err = mlx5_core_create_sq(sq->priv->mdev, in, inlen, &sq->sqn); kvfree(in); @@ -1108,10 +1102,6 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str static int mlx5e_modify_sq(struct mlx5e_sq *sq, int curr_state, int next_state) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - void *in; void *sqc; int inlen; @@ -1128,7 +1118,7 @@ mlx5e_modify_sq(struct mlx5e_sq *sq, int MLX5_SET(modify_sq_in, in, sq_state, curr_state); MLX5_SET(sqc, sqc, state, next_state); - err = mlx5_core_modify_sq(mdev, in, inlen); + err = mlx5_core_modify_sq(sq->priv->mdev, in, inlen); kvfree(in); @@ -1138,11 +1128,8 @@ mlx5e_modify_sq(struct mlx5e_sq *sq, int static void mlx5e_disable_sq(struct mlx5e_sq *sq) { - struct mlx5e_channel *c = sq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - mlx5_core_destroy_sq(mdev, sq->sqn); + mlx5_core_destroy_sq(sq->priv->mdev, sq->sqn); } static int @@ -1308,7 +1295,7 @@ mlx5e_create_cq(struct mlx5e_channel *c, cqe->op_own = 0xf1; } - cq->channel = c; + cq->priv = priv; return (0); } @@ -1323,9 +1310,6 @@ static int mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_param *param, u8 moderation_mode) { - struct mlx5e_channel *c = cq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; struct mlx5_core_cq *mcq = &cq->mcq; void *in; void *cqc; @@ -1347,7 +1331,7 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str mlx5_fill_page_array(&cq->wq_ctrl.buf, (__be64 *) MLX5_ADDR_OF(create_cq_in, in, pas)); - mlx5_vector2eqn(mdev, param->eq_ix, &eqn, &irqn_not_used); + mlx5_vector2eqn(cq->priv->mdev, param->eq_ix, &eqn, &irqn_not_used); MLX5_SET(cqc, cqc, cq_period_mode, moderation_mode); MLX5_SET(cqc, cqc, c_eqn, eqn); @@ -1356,7 +1340,7 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str PAGE_SHIFT); MLX5_SET64(cqc, cqc, dbr_addr, cq->wq_ctrl.db.dma); - err = mlx5_core_create_cq(mdev, mcq, in, inlen); + err = mlx5_core_create_cq(cq->priv->mdev, mcq, in, inlen); kvfree(in); @@ -1371,11 +1355,8 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str static void mlx5e_disable_cq(struct mlx5e_cq *cq) { - struct mlx5e_channel *c = cq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_core_dev *mdev = priv->mdev; - mlx5_core_destroy_cq(mdev, &cq->mcq); + mlx5_core_destroy_cq(cq->priv->mdev, &cq->mcq); } static int Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:28:44 2016 (r306244) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:29:27 2016 (r306245) @@ -233,7 +233,7 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struc /* Setup local variables */ pi = sq->pc & sq->wq.sz_m1; wqe = mlx5_wq_cyc_get_wqe(&sq->wq, pi); - ifp = sq->channel->ifp; + ifp = sq->ifp; memset(wqe, 0, sizeof(*wqe)); @@ -534,7 +534,7 @@ void mlx5e_tx_que(void *context, int pending) { struct mlx5e_sq *sq = context; - struct ifnet *ifp = sq->channel->ifp; + struct ifnet *ifp = sq->ifp; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { mtx_lock(&sq->lock); Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Fri Sep 23 08:28:44 2016 (r306244) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Fri Sep 23 08:29:27 2016 (r306245) @@ -47,10 +47,7 @@ void mlx5e_cq_error_event(struct mlx5_core_cq *mcq, int event) { struct mlx5e_cq *cq = container_of(mcq, struct mlx5e_cq, mcq); - struct mlx5e_channel *c = cq->channel; - struct mlx5e_priv *priv = c->priv; - struct ifnet *ifp = priv->ifp; - if_printf(ifp, "%s: cqn=0x%.6x event=0x%.2x\n", + if_printf(cq->priv->ifp, "%s: cqn=0x%.6x event=0x%.2x\n", __func__, mcq->cqn, event); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:30:10 2016 Return-Path: Delivered-To: svn-src-all@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 9B7F4BE69A5; Fri, 23 Sep 2016 08:30:10 +0000 (UTC) (envelope-from hselasky@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 75EC61CE1; Fri, 23 Sep 2016 08:30:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8U9vb052427; Fri, 23 Sep 2016 08:30:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8U9h2052425; Fri, 23 Sep 2016 08:30:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230830.u8N8U9h2052425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306246 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:30:10 -0000 Author: hselasky Date: Fri Sep 23 08:30:09 2016 New Revision: 306246 URL: https://svnweb.freebsd.org/changeset/base/306246 Log: MFC r305869: mlx5en: Minor completion queue control path code refactor. Move setting of CQ moderation mode together with the other CQ moderation parameters. Pass completion event vector as a separate argument to mlx5e_open_cq(), because its value is different for each call. Pass mlx5e_priv pointer instead of mlx5e_channel pointer so that code can be used by rate limiting sendqueues. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:29:27 2016 (r306245) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:30:09 2016 (r306246) @@ -47,7 +47,6 @@ struct mlx5e_sq_param { struct mlx5e_cq_param { u32 cqc [MLX5_ST_SZ_DW(cqc)]; struct mlx5_wq_param wq; - u16 eq_ix; }; struct mlx5e_channel_param { @@ -1254,12 +1253,12 @@ mlx5e_close_sq_wait(struct mlx5e_sq *sq) } static int -mlx5e_create_cq(struct mlx5e_channel *c, +mlx5e_create_cq(struct mlx5e_priv *priv, struct mlx5e_cq_param *param, struct mlx5e_cq *cq, - mlx5e_cq_comp_t *comp) + mlx5e_cq_comp_t *comp, + int eq_ix) { - struct mlx5e_priv *priv = c->priv; struct mlx5_core_dev *mdev = priv->mdev; struct mlx5_core_cq *mcq = &cq->mcq; int eqn_not_used; @@ -1269,21 +1268,20 @@ mlx5e_create_cq(struct mlx5e_channel *c, param->wq.buf_numa_node = 0; param->wq.db_numa_node = 0; - param->eq_ix = c->ix; err = mlx5_cqwq_create(mdev, ¶m->wq, param->cqc, &cq->wq, &cq->wq_ctrl); if (err) return (err); - mlx5_vector2eqn(mdev, param->eq_ix, &eqn_not_used, &irqn); + mlx5_vector2eqn(mdev, eq_ix, &eqn_not_used, &irqn); mcq->cqe_sz = 64; mcq->set_ci_db = cq->wq_ctrl.db.db; mcq->arm_db = cq->wq_ctrl.db.db + 1; *mcq->set_ci_db = 0; *mcq->arm_db = 0; - mcq->vector = param->eq_ix; + mcq->vector = eq_ix; mcq->comp = comp; mcq->event = mlx5e_cq_error_event; mcq->irqn = irqn; @@ -1307,8 +1305,7 @@ mlx5e_destroy_cq(struct mlx5e_cq *cq) } static int -mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_param *param, - u8 moderation_mode) +mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_param *param, int eq_ix) { struct mlx5_core_cq *mcq = &cq->mcq; void *in; @@ -1331,9 +1328,8 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, str mlx5_fill_page_array(&cq->wq_ctrl.buf, (__be64 *) MLX5_ADDR_OF(create_cq_in, in, pas)); - mlx5_vector2eqn(cq->priv->mdev, param->eq_ix, &eqn, &irqn_not_used); + mlx5_vector2eqn(cq->priv->mdev, eq_ix, &eqn, &irqn_not_used); - MLX5_SET(cqc, cqc, cq_period_mode, moderation_mode); MLX5_SET(cqc, cqc, c_eqn, eqn); MLX5_SET(cqc, cqc, uar_page, mcq->uar->index); MLX5_SET(cqc, cqc, log_page_size, cq->wq_ctrl.buf.page_shift - @@ -1360,19 +1356,19 @@ mlx5e_disable_cq(struct mlx5e_cq *cq) } static int -mlx5e_open_cq(struct mlx5e_channel *c, +mlx5e_open_cq(struct mlx5e_priv *priv, struct mlx5e_cq_param *param, struct mlx5e_cq *cq, mlx5e_cq_comp_t *comp, - u8 moderation_mode) + int eq_ix) { int err; - err = mlx5e_create_cq(c, param, cq, comp); + err = mlx5e_create_cq(priv, param, cq, comp, eq_ix); if (err) return (err); - err = mlx5e_enable_cq(cq, param, moderation_mode); + err = mlx5e_enable_cq(cq, param, eq_ix); if (err) goto err_destroy_cq; @@ -1395,25 +1391,13 @@ static int mlx5e_open_tx_cqs(struct mlx5e_channel *c, struct mlx5e_channel_param *cparam) { - u8 tx_moderation_mode; int err; int tc; - switch (c->priv->params.tx_cq_moderation_mode) { - case 0: - tx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - default: - if (MLX5_CAP_GEN(c->priv->mdev, cq_period_start_from_cqe)) - tx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_CQE; - else - tx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - } for (tc = 0; tc < c->num_tc; tc++) { /* open completion queue */ - err = mlx5e_open_cq(c, &cparam->tx_cq, &c->sq[tc].cq, - &mlx5e_tx_cq_comp, tx_moderation_mode); + err = mlx5e_open_cq(c->priv, &cparam->tx_cq, &c->sq[tc].cq, + &mlx5e_tx_cq_comp, c->ix); if (err) goto err_close_tx_cqs; } @@ -1509,7 +1493,6 @@ mlx5e_open_channel(struct mlx5e_priv *pr struct mlx5e_channel *volatile *cp) { struct mlx5e_channel *c; - u8 rx_moderation_mode; int err; c = malloc(sizeof(*c), M_MLX5EN, M_WAITOK | M_ZERO); @@ -1532,21 +1515,9 @@ mlx5e_open_channel(struct mlx5e_priv *pr if (err) goto err_free; - switch (priv->params.rx_cq_moderation_mode) { - case 0: - rx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - default: - if (MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe)) - rx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_CQE; - else - rx_moderation_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; - break; - } - /* open receive completion queue */ - err = mlx5e_open_cq(c, &cparam->rx_cq, &c->rq.cq, - &mlx5e_rx_cq_comp, rx_moderation_mode); + err = mlx5e_open_cq(c->priv, &cparam->rx_cq, &c->rq.cq, + &mlx5e_rx_cq_comp, c->ix); if (err) goto err_close_tx_cqs; @@ -1676,6 +1647,18 @@ mlx5e_build_rx_cq_param(struct mlx5e_pri MLX5_SET(cqc, cqc, cq_period, priv->params.rx_cq_moderation_usec); MLX5_SET(cqc, cqc, cq_max_count, priv->params.rx_cq_moderation_pkts); + switch (priv->params.rx_cq_moderation_mode) { + case 0: + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + default: + if (MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe)) + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_CQE); + else + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + } + mlx5e_build_common_cq_param(priv, param); } @@ -1689,6 +1672,18 @@ mlx5e_build_tx_cq_param(struct mlx5e_pri MLX5_SET(cqc, cqc, cq_period, priv->params.tx_cq_moderation_usec); MLX5_SET(cqc, cqc, cq_max_count, priv->params.tx_cq_moderation_pkts); + switch (priv->params.tx_cq_moderation_mode) { + case 0: + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + default: + if (MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe)) + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_CQE); + else + MLX5_SET(cqc, cqc, cq_period_mode, MLX5_CQ_PERIOD_MODE_START_FROM_EQE); + break; + } + mlx5e_build_common_cq_param(priv, param); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:30:54 2016 Return-Path: Delivered-To: svn-src-all@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 C66B7BE6A52; Fri, 23 Sep 2016 08:30:54 +0000 (UTC) (envelope-from hselasky@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 885831F45; Fri, 23 Sep 2016 08:30:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8UrvD053211; Fri, 23 Sep 2016 08:30:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8UrHe053209; Fri, 23 Sep 2016 08:30:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230830.u8N8UrHe053209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306247 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:30:54 -0000 Author: hselasky Date: Fri Sep 23 08:30:53 2016 New Revision: 306247 URL: https://svnweb.freebsd.org/changeset/base/306247 Log: MFC r305870: mlx5en: Make the mlx5e_open_cq() and mlx5e_close_cq() functions global. Make some functions and structures global to allow for code reuse when creating rate limiting sendqueues. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:30:09 2016 (r306246) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:30:53 2016 (r306247) @@ -358,6 +358,21 @@ struct mlx5e_stats { struct mlx5e_port_stats_debug port_stats_debug; }; +struct mlx5e_rq_param { + u32 rqc [MLX5_ST_SZ_DW(rqc)]; + struct mlx5_wq_param wq; +}; + +struct mlx5e_sq_param { + u32 sqc [MLX5_ST_SZ_DW(sqc)]; + struct mlx5_wq_param wq; +}; + +struct mlx5e_cq_param { + u32 cqc [MLX5_ST_SZ_DW(cqc)]; + struct mlx5_wq_param wq; +}; + struct mlx5e_params { u8 log_sq_size; u8 log_rq_size; @@ -804,5 +819,8 @@ void mlx5e_create_stats(struct sysctl_ct void mlx5e_send_nop(struct mlx5e_sq *, u32); void mlx5e_sq_cev_timeout(void *); int mlx5e_refresh_channel_params(struct mlx5e_priv *); +int mlx5e_open_cq(struct mlx5e_priv *, struct mlx5e_cq_param *, + struct mlx5e_cq *, mlx5e_cq_comp_t *, int eq_ix); +void mlx5e_close_cq(struct mlx5e_cq *); #endif /* _MLX5_EN_H_ */ Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:30:09 2016 (r306246) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:30:53 2016 (r306247) @@ -34,21 +34,6 @@ char mlx5e_version[] = "Mellanox Ethernet driver" " (" ETH_DRIVER_VERSION ")"; -struct mlx5e_rq_param { - u32 rqc [MLX5_ST_SZ_DW(rqc)]; - struct mlx5_wq_param wq; -}; - -struct mlx5e_sq_param { - u32 sqc [MLX5_ST_SZ_DW(sqc)]; - struct mlx5_wq_param wq; -}; - -struct mlx5e_cq_param { - u32 cqc [MLX5_ST_SZ_DW(cqc)]; - struct mlx5_wq_param wq; -}; - struct mlx5e_channel_param { struct mlx5e_rq_param rq; struct mlx5e_sq_param sq; @@ -1355,7 +1340,7 @@ mlx5e_disable_cq(struct mlx5e_cq *cq) mlx5_core_destroy_cq(cq->priv->mdev, &cq->mcq); } -static int +int mlx5e_open_cq(struct mlx5e_priv *priv, struct mlx5e_cq_param *param, struct mlx5e_cq *cq, @@ -1380,7 +1365,7 @@ err_destroy_cq: return (err); } -static void +void mlx5e_close_cq(struct mlx5e_cq *cq) { mlx5e_disable_cq(cq); From owner-svn-src-all@freebsd.org Fri Sep 23 08:31:39 2016 Return-Path: Delivered-To: svn-src-all@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 F02B5BE6B0A; Fri, 23 Sep 2016 08:31:39 +0000 (UTC) (envelope-from hselasky@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 A4BCA6A0; Fri, 23 Sep 2016 08:31:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8VcTl053964; Fri, 23 Sep 2016 08:31:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8VcBp053962; Fri, 23 Sep 2016 08:31:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230831.u8N8VcBp053962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306248 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:31:40 -0000 Author: hselasky Date: Fri Sep 23 08:31:38 2016 New Revision: 306248 URL: https://svnweb.freebsd.org/changeset/base/306248 Log: MFC r305871: mlx5en: Optimise away duplicate UAR pointers. This change also reduces the size of the mlx5e_sq structure so that the last queue_state element will fit into the previous cacheline and then the mlx5e_sq structure becomes one cacheline less for amd64. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:30:53 2016 (r306247) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:31:38 2016 (r306248) @@ -538,8 +538,7 @@ struct mlx5e_sq { /* read only */ struct mlx5_wq_cyc wq; - void __iomem *uar_map; - void __iomem *uar_bf_map; + struct mlx5_uar uar; struct ifnet *ifp; u32 sqn; u32 bf_buf_size; @@ -548,7 +547,6 @@ struct mlx5e_sq { /* control path */ struct mlx5_wq_ctrl wq_ctrl; - struct mlx5_uar uar; struct mlx5e_priv *priv; int tc; unsigned int queue_state; @@ -790,13 +788,13 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, wmb(); if (bf_sz) { - __iowrite64_copy(sq->uar_bf_map + ofst, wqe, bf_sz); + __iowrite64_copy(sq->uar.bf_map + ofst, wqe, bf_sz); /* flush the write-combining mapped buffer */ wmb(); } else { - mlx5_write64(wqe, sq->uar_map + ofst, NULL); + mlx5_write64(wqe, sq->uar.map + ofst, NULL); } sq->bf_offset ^= sq->bf_buf_size; Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:30:53 2016 (r306247) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:31:38 2016 (r306248) @@ -962,8 +962,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, goto err_unmap_free_uar; sq->wq.db = &sq->wq.db[MLX5_SND_DBR]; - sq->uar_map = sq->uar.map; - sq->uar_bf_map = sq->uar.bf_map; sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2; err = mlx5e_alloc_sq_db(sq); From owner-svn-src-all@freebsd.org Fri Sep 23 08:32:19 2016 Return-Path: Delivered-To: svn-src-all@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 7E06ABE6C83; Fri, 23 Sep 2016 08:32:19 +0000 (UTC) (envelope-from hselasky@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 4F71E98B; Fri, 23 Sep 2016 08:32:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8WIP9056241; Fri, 23 Sep 2016 08:32:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8WIns056239; Fri, 23 Sep 2016 08:32:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230832.u8N8WIns056239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306249 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:32:19 -0000 Author: hselasky Date: Fri Sep 23 08:32:18 2016 New Revision: 306249 URL: https://svnweb.freebsd.org/changeset/base/306249 Log: MFC r305872: mlx5en: Properly declare doorbell lock for 32-bit CPUs. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:31:38 2016 (r306248) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:32:18 2016 (r306249) @@ -672,6 +672,7 @@ struct mlx5e_priv { struct work_struct update_stats_work; struct work_struct update_carrier_work; struct work_struct set_rx_mode_work; + MLX5_DECLARE_DOORBELL_LOCK(doorbell_lock) struct mlx5_core_dev *mdev; struct ifnet *ifp; @@ -794,7 +795,8 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, wmb(); } else { - mlx5_write64(wqe, sq->uar.map + ofst, NULL); + mlx5_write64(wqe, sq->uar.map + ofst, + MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock)); } sq->bf_offset ^= sq->bf_buf_size; Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:31:38 2016 (r306248) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:32:18 2016 (r306249) @@ -2759,6 +2759,7 @@ mlx5e_priv_mtx_init(struct mlx5e_priv *p mtx_init(&priv->async_events_mtx, "mlx5async", MTX_NETWORK_LOCK, MTX_DEF); sx_init(&priv->state_lock, "mlx5state"); callout_init_mtx(&priv->watchdog, &priv->async_events_mtx, 0); + MLX5_INIT_DOORBELL_LOCK(&priv->doorbell_lock); } static void From owner-svn-src-all@freebsd.org Fri Sep 23 08:33:05 2016 Return-Path: Delivered-To: svn-src-all@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 0560BBE6D24; Fri, 23 Sep 2016 08:33:05 +0000 (UTC) (envelope-from hselasky@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 D4D54B25; Fri, 23 Sep 2016 08:33:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8X4U5056345; Fri, 23 Sep 2016 08:33:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8X3hL056343; Fri, 23 Sep 2016 08:33:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230833.u8N8X3hL056343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306250 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:33:05 -0000 Author: hselasky Date: Fri Sep 23 08:33:03 2016 New Revision: 306250 URL: https://svnweb.freebsd.org/changeset/base/306250 Log: MFC r305873: mlx5en: Factor out common sendqueue code for use with rate limiting SQs. Try to reuse code to setup sendqueues when possible by making some static functions global. Further split the mlx5e_close_sq_wait() function to separate out reusable parts. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:32:18 2016 (r306249) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:33:03 2016 (r306250) @@ -822,5 +822,11 @@ int mlx5e_refresh_channel_params(struct int mlx5e_open_cq(struct mlx5e_priv *, struct mlx5e_cq_param *, struct mlx5e_cq *, mlx5e_cq_comp_t *, int eq_ix); void mlx5e_close_cq(struct mlx5e_cq *); +void mlx5e_free_sq_db(struct mlx5e_sq *); +int mlx5e_alloc_sq_db(struct mlx5e_sq *); +int mlx5e_enable_sq(struct mlx5e_sq *, struct mlx5e_sq_param *, int tis_num); +int mlx5e_modify_sq(struct mlx5e_sq *, int curr_state, int next_state); +void mlx5e_disable_sq(struct mlx5e_sq *); +void mlx5e_drain_sq(struct mlx5e_sq *); #endif /* _MLX5_EN_H_ */ Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:32:18 2016 (r306249) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:33:03 2016 (r306250) @@ -879,7 +879,7 @@ mlx5e_close_rq_wait(struct mlx5e_rq *rq) mlx5e_destroy_rq(rq); } -static void +void mlx5e_free_sq_db(struct mlx5e_sq *sq) { int wq_sz = mlx5_wq_cyc_get_size(&sq->wq); @@ -890,7 +890,7 @@ mlx5e_free_sq_db(struct mlx5e_sq *sq) free(sq->mbuf, M_MLX5EN); } -static int +int mlx5e_alloc_sq_db(struct mlx5e_sq *sq) { int wq_sz = mlx5_wq_cyc_get_size(&sq->wq); @@ -1039,8 +1039,9 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) buf_ring_free(sq->br, M_MLX5EN); } -static int -mlx5e_enable_sq(struct mlx5e_sq *sq, struct mlx5e_sq_param *param) +int +mlx5e_enable_sq(struct mlx5e_sq *sq, struct mlx5e_sq_param *param, + int tis_num) { void *in; void *sqc; @@ -1059,7 +1060,7 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str memcpy(sqc, param->sqc, sizeof(param->sqc)); - MLX5_SET(sqc, sqc, tis_num_0, sq->priv->tisn[sq->tc]); + MLX5_SET(sqc, sqc, tis_num_0, tis_num); MLX5_SET(sqc, sqc, cqn, sq->cq.mcq.cqn); MLX5_SET(sqc, sqc, state, MLX5_SQC_STATE_RST); MLX5_SET(sqc, sqc, tis_lst_sz, 1); @@ -1081,7 +1082,7 @@ mlx5e_enable_sq(struct mlx5e_sq *sq, str return (err); } -static int +int mlx5e_modify_sq(struct mlx5e_sq *sq, int curr_state, int next_state) { void *in; @@ -1107,7 +1108,7 @@ mlx5e_modify_sq(struct mlx5e_sq *sq, int return (err); } -static void +void mlx5e_disable_sq(struct mlx5e_sq *sq) { @@ -1126,7 +1127,7 @@ mlx5e_open_sq(struct mlx5e_channel *c, if (err) return (err); - err = mlx5e_enable_sq(sq, param); + err = mlx5e_enable_sq(sq, param, c->priv->tisn[tc]); if (err) goto err_destroy_sq; @@ -1202,8 +1203,8 @@ mlx5e_sq_cev_timeout(void *arg) callout_reset_curcpu(&sq->cev_callout, hz, mlx5e_sq_cev_timeout, sq); } -static void -mlx5e_close_sq_wait(struct mlx5e_sq *sq) +void +mlx5e_drain_sq(struct mlx5e_sq *sq) { mtx_lock(&sq->lock); @@ -1230,7 +1231,13 @@ mlx5e_close_sq_wait(struct mlx5e_sq *sq) mtx_lock(&sq->lock); } mtx_unlock(&sq->lock); +} + +static void +mlx5e_close_sq_wait(struct mlx5e_sq *sq) +{ + mlx5e_drain_sq(sq); mlx5e_disable_sq(sq); mlx5e_destroy_sq(sq); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:33:49 2016 Return-Path: Delivered-To: svn-src-all@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 02196BE6E37; Fri, 23 Sep 2016 08:33:49 +0000 (UTC) (envelope-from hselasky@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 ACC3CCAE; Fri, 23 Sep 2016 08:33:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8XlLG056425; Fri, 23 Sep 2016 08:33:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8Xldw056424; Fri, 23 Sep 2016 08:33:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230833.u8N8Xldw056424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306251 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:33:49 -0000 Author: hselasky Date: Fri Sep 23 08:33:47 2016 New Revision: 306251 URL: https://svnweb.freebsd.org/changeset/base/306251 Log: MFC r305874: mlx5en: Allow setting the software MTU size below 1500 bytes The hardware MTU size can't be set to a value less than 1500 bytes due to side-band management support. Allow setting the software MTU size below 1500 bytes, thus creating a mismatch between hardware and software MTU sizes. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:33:03 2016 (r306250) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:33:47 2016 (r306251) @@ -2179,7 +2179,6 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp int hw_mtu; int err; - err = mlx5_set_port_mtu(mdev, MLX5E_SW2HW_MTU(sw_mtu)); if (err) { if_printf(ifp, "%s: mlx5_set_port_mtu failed setting %d, err=%d\n", @@ -2187,19 +2186,20 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp return (err); } err = mlx5_query_port_oper_mtu(mdev, &hw_mtu); - if (!err) { - ifp->if_mtu = MLX5E_HW2SW_MTU(hw_mtu); - - if (ifp->if_mtu != sw_mtu) { - if_printf(ifp, "Port MTU %d is different than " - "ifp mtu %d\n", sw_mtu, (int)ifp->if_mtu); - } - } else { + if (err) { if_printf(ifp, "Query port MTU, after setting new " "MTU value, failed\n"); - ifp->if_mtu = sw_mtu; + } else if (MLX5E_HW2SW_MTU(hw_mtu) < sw_mtu) { + err = -E2BIG, + if_printf(ifp, "Port MTU %d is smaller than " + "ifp mtu %d\n", hw_mtu, sw_mtu); + } else if (MLX5E_HW2SW_MTU(hw_mtu) > sw_mtu) { + err = -EINVAL; + if_printf(ifp, "Port MTU %d is bigger than " + "ifp mtu %d\n", hw_mtu, sw_mtu); } - return (0); + ifp->if_mtu = sw_mtu; + return (err); } int From owner-svn-src-all@freebsd.org Fri Sep 23 08:34:30 2016 Return-Path: Delivered-To: svn-src-all@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 1B5DEBE6E9A; Fri, 23 Sep 2016 08:34:30 +0000 (UTC) (envelope-from hselasky@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 E1A23E36; Fri, 23 Sep 2016 08:34:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8YTGk056510; Fri, 23 Sep 2016 08:34:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8YT1U056509; Fri, 23 Sep 2016 08:34:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230834.u8N8YT1U056509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306252 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:34:30 -0000 Author: hselasky Date: Fri Sep 23 08:34:28 2016 New Revision: 306252 URL: https://svnweb.freebsd.org/changeset/base/306252 Log: MFC r305875: mlx5en: Verify port type is ethernet before creating network device Else the mlx5en driver might attach to infiniband ports. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:33:47 2016 (r306251) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:34:28 2016 (r306252) @@ -2660,6 +2660,9 @@ mlx5e_check_required_hca_cap(struct mlx5 /* TODO: add more must-to-have features */ + if (MLX5_CAP_GEN(mdev, port_type) != MLX5_CAP_PORT_TYPE_ETH) + return (-ENODEV); + return (0); } From owner-svn-src-all@freebsd.org Fri Sep 23 08:35:12 2016 Return-Path: Delivered-To: svn-src-all@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 8E231BE6F45; Fri, 23 Sep 2016 08:35:12 +0000 (UTC) (envelope-from hselasky@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 45735FAB; Fri, 23 Sep 2016 08:35:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8ZBLE056604; Fri, 23 Sep 2016 08:35:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8ZBu0056602; Fri, 23 Sep 2016 08:35:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230835.u8N8ZBu0056602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:35:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306253 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:35:12 -0000 Author: hselasky Date: Fri Sep 23 08:35:11 2016 New Revision: 306253 URL: https://svnweb.freebsd.org/changeset/base/306253 Log: MFC r305876: mlx5en: Remove unused pdev pointer. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:34:28 2016 (r306252) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:35:11 2016 (r306253) @@ -473,7 +473,6 @@ struct mlx5e_rq { bus_dma_tag_t dma_tag; u32 wqe_sz; struct mlx5e_rq_mbuf *mbuf; - struct device *pdev; struct ifnet *ifp; struct mlx5e_rq_stats stats; struct mlx5e_cq cq; @@ -542,7 +541,6 @@ struct mlx5e_sq { struct ifnet *ifp; u32 sqn; u32 bf_buf_size; - struct device *pdev; u32 mkey_be; /* control path */ @@ -563,7 +561,6 @@ struct mlx5e_channel { /* data path */ struct mlx5e_rq rq; struct mlx5e_sq sq[MLX5E_MAX_TX_NUM_TC]; - struct device *pdev; struct ifnet *ifp; u32 mkey_be; u8 num_tc; Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:34:28 2016 (r306252) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:35:11 2016 (r306253) @@ -669,7 +669,6 @@ mlx5e_create_rq(struct mlx5e_channel *c, wqe->data.byte_count = cpu_to_be32(byte_count | MLX5_HW_START_PADDING); } - rq->pdev = c->pdev; rq->ifp = c->ifp; rq->channel = c; rq->ix = c->ix; @@ -968,7 +967,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, if (err) goto err_sq_wq_destroy; - sq->pdev = c->pdev; sq->mkey_be = c->mkey_be; sq->ifp = priv->ifp; sq->priv = priv; @@ -1492,7 +1490,6 @@ mlx5e_open_channel(struct mlx5e_priv *pr c->priv = priv; c->ix = ix; c->cpu = 0; - c->pdev = &priv->mdev->pdev->dev; c->ifp = priv->ifp; c->mkey_be = cpu_to_be32(priv->mr.key); c->num_tc = priv->num_tc; From owner-svn-src-all@freebsd.org Fri Sep 23 08:35:57 2016 Return-Path: Delivered-To: svn-src-all@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 BAACDBE6037; Fri, 23 Sep 2016 08:35:57 +0000 (UTC) (envelope-from hselasky@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 8A6E91A4; Fri, 23 Sep 2016 08:35:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8Zu6J056686; Fri, 23 Sep 2016 08:35:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8ZuSg056685; Fri, 23 Sep 2016 08:35:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230835.u8N8ZuSg056685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306254 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:35:57 -0000 Author: hselasky Date: Fri Sep 23 08:35:56 2016 New Revision: 306254 URL: https://svnweb.freebsd.org/changeset/base/306254 Log: MFC r305877: mlx5en: Fix duplicate mbuf free-by-code. When mlx5e_sq_xmit() returns an error code and the mbuf pointer is set, we should not free the mbuf, because the caller will keep the mbuf in the drbr. Make sure the mbuf pointer is correctly set upon function exit. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:35:11 2016 (r306253) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Sep 23 08:35:56 2016 (r306254) @@ -224,10 +224,8 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struc /* Send one multi NOP message instead of many */ mlx5e_send_nop(sq, (pi + 1) * MLX5_SEND_WQEBB_NUM_DS); pi = ((~sq->pc) & sq->wq.sz_m1); - if (pi < (MLX5_SEND_WQE_MAX_WQEBBS - 1)) { - m_freem(mb); + if (pi < (MLX5_SEND_WQE_MAX_WQEBBS - 1)) return (ENOMEM); - } } /* Setup local variables */ @@ -338,10 +336,8 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struc mb, segs, &nsegs, BUS_DMA_NOWAIT); } /* Catch errors */ - if (err != 0) { + if (err != 0) goto tx_drop; - } - *mbp = mb; for (x = 0; x != nsegs; x++) { if (segs[x].ds_len == 0) @@ -374,6 +370,7 @@ skip_dma: bus_dmamap_sync(sq->dma_tag, sq->mbuf[pi].dma_map, BUS_DMASYNC_PREWRITE); sq->stats.packets++; + *mbp = NULL; /* safety clear */ return (0); tx_drop: From owner-svn-src-all@freebsd.org Fri Sep 23 08:41:19 2016 Return-Path: Delivered-To: svn-src-all@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 C8022BE63A4; Fri, 23 Sep 2016 08:41:19 +0000 (UTC) (envelope-from hselasky@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 96A78676; Fri, 23 Sep 2016 08:41:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8N8fIA0060222; Fri, 23 Sep 2016 08:41:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N8fIRv060220; Fri, 23 Sep 2016 08:41:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609230841.u8N8fIRv060220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Sep 2016 08:41:18 +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: r306255 - stable/11/sys/boot/kshim X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 08:41:19 -0000 Author: hselasky Date: Fri Sep 23 08:41:18 2016 New Revision: 306255 URL: https://svnweb.freebsd.org/changeset/base/306255 Log: MFC r305804: Make the callout structure in the boot loader's kernel shim more similar to the kernel one. Modified: stable/11/sys/boot/kshim/bsd_kernel.c stable/11/sys/boot/kshim/bsd_kernel.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/kshim/bsd_kernel.c ============================================================================== --- stable/11/sys/boot/kshim/bsd_kernel.c Fri Sep 23 08:35:56 2016 (r306254) +++ stable/11/sys/boot/kshim/bsd_kernel.c Fri Sep 23 08:41:18 2016 (r306255) @@ -432,8 +432,8 @@ callout_callback(struct callout *c) } mtx_unlock(&mtx_callout); - if (c->func) - (c->func) (c->arg); + if (c->c_func != NULL) + (c->c_func) (c->c_arg); if (!(c->flags & CALLOUT_RETURNUNLOCKED)) mtx_unlock(c->mtx); @@ -487,8 +487,8 @@ callout_reset(struct callout *c, int to_ { callout_stop(c); - c->func = func; - c->arg = arg; + c->c_func = func; + c->c_arg = arg; c->timeout = ticks + to_ticks; mtx_lock(&mtx_callout); @@ -507,8 +507,8 @@ callout_stop(struct callout *c) } mtx_unlock(&mtx_callout); - c->func = NULL; - c->arg = NULL; + c->c_func = NULL; + c->c_arg = NULL; } void Modified: stable/11/sys/boot/kshim/bsd_kernel.h ============================================================================== --- stable/11/sys/boot/kshim/bsd_kernel.h Fri Sep 23 08:35:56 2016 (r306254) +++ stable/11/sys/boot/kshim/bsd_kernel.h Fri Sep 23 08:41:18 2016 (r306255) @@ -299,8 +299,8 @@ extern volatile int ticks; struct callout { LIST_ENTRY(callout) entry; - callout_fn_t *func; - void *arg; + callout_fn_t *c_func; + void *c_arg; struct mtx *mtx; int flags; int timeout; From owner-svn-src-all@freebsd.org Fri Sep 23 09:26:41 2016 Return-Path: Delivered-To: svn-src-all@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 8B913BE47AC; Fri, 23 Sep 2016 09:26:41 +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 5111D21E; Fri, 23 Sep 2016 09:26:41 +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 u8N9QeC9076298; Fri, 23 Sep 2016 09:26:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8N9QeKW076296; Fri, 23 Sep 2016 09:26:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609230926.u8N9QeKW076296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Sep 2016 09:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306257 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 09:26:41 -0000 Author: kib Date: Fri Sep 23 09:26:40 2016 New Revision: 306257 URL: https://svnweb.freebsd.org/changeset/base/306257 Log: Document r306081, i.e. procctl(PROC_TRAPCAP) and sysctl kern.trap_enocap. Reviewed by: cem Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8003 Modified: head/lib/libc/sys/cap_enter.2 head/lib/libc/sys/procctl.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Fri Sep 23 09:20:42 2016 (r306256) +++ head/lib/libc/sys/cap_enter.2 Fri Sep 23 09:26:40 2016 (r306257) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2016 +.Dd September 22, 2016 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -69,6 +69,34 @@ appropriately-crafted applications or ap .Fn cap_getmode returns a flag indicating whether or not the process is in a capability mode sandbox. +.Sh RUN-TIME SETTINGS +If the +.Dv kern.trap_enocap +sysctl MIB is set to non-zero value, then for any process executing in a +capability mode sandbox, any syscall which results in either +.Er ENOTCAPABLE +or +.Er ECAPMODE +error, also generates the synchronous +.Dv SIGTRAP +signal to the thread on the syscall return. +On the signal delivery, the +.Va si_errno +member of the +.Fa siginfo +signal handler parameter is set to the syscall error value, +and the +.Va si_code +member is set to +.Dv TRAP_CAP . +.Pp +See also the +.Dv PROC_TRAPCAP_CTL +and +.Dv PROC_TRAPCAP_STATUS +operations of the +.Xr procctl 2 +function for similar per-process functionality. .Sh CAVEAT Creating effective process sandboxes is a tricky process that involves identifying the least possible rights required by the process and then @@ -116,6 +144,8 @@ points outside the process's allocated a .Xr cap_fcntls_limit 2 , .Xr cap_ioctls_limit 2 , .Xr cap_rights_limit 2 , +.Xr procctl 2 , +.Xr sysctl 2 , .Xr fexecve 2 , .Xr cap_sandboxed 3 , .Xr capsicum 4 Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Fri Sep 23 09:20:42 2016 (r306256) +++ head/lib/libc/sys/procctl.2 Fri Sep 23 09:26:40 2016 (r306257) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2015 +.Dd September 22, 2016 .Dt PROCCTL 2 .Os .Sh NAME @@ -71,7 +71,7 @@ The control request to perform is specif .Fa cmd argument. The following commands are supported: -.Bl -tag -width "PROC_REAP_GETPIDS" +.Bl -tag -width "Dv PROC_TRAPCAP_STATUS" .It Dv PROC_SPROTECT Set process protection state. This is used to mark a process as protected from being killed if the system @@ -327,6 +327,63 @@ is set to 0. If a debugger is attached, .Fa data is set to the pid of the debugger process. +.It Dv PROC_TRAPCAP_CTL +Enable or disable, for the specified processes which are executing in a +capability mode sandbox, the synchronous +.Dv SIGTRAP +signal on return from any syscall which gives either +.Er ENOTCAPABLE +or +.Er ECAPMODE +error. +.Pp +Possible values for the +.Fa data +argument are: +.Bl -tag -width "Dv PROC_TRAPCAP_CTL_DISABLE" +.It Dv PROC_TRAPCAP_CTL_ENABLE +Enable the +.Dv SIGTRAP +signal delivery on capability mode access violations. +The enabled mode is inherited by the children of the process, +and is kept after +.Xr fexecve 2 +calls. +.It Dv PROC_TRAPCAP_CTL_DISABLE +Disable the signal delivery on capability mode access violations. +Note that the global sysctl +.Dv kern.trap_enocap +might still cause the signal to be delivered; see +.Xr capsicum 4 . +.El +.Pp +On signal delivery, the +.Va si_errno +member of the +.Fa siginfo +signal handler parameter is set to the syscall error value, +and the +.Va si_code +member is set to +.Dv TRAP_CAP . +.Pp +See +.Xr capsicum 4 +for more information about the capability mode. +.It Dv PROC_TRAPCAP_STATUS +Returns the current status of signalling capability mode access +violations for the specified process. +The integer value pointed to by the +.Fa data +argument is set to the +.Dv PROC_TRAPCAP_CTL_ENABLE +value if the process control enables signal delivery, and to +.Dv PROC_TRAPCAP_CTL_DISABLE +otherwise. +.Pp +See the note about sysctl +.Dv kern.trap_enocap +above, which gives independent global control of signal delivery. .El .Sh NOTES Disabling tracing on a process should not be considered a security @@ -420,14 +477,18 @@ The value of the integer .Fa data parameter for the .Dv PROC_TRACE_CTL +or +.Dv PROC_TRAPCAP_CTL request is invalid. .El .Sh SEE ALSO .Xr dtrace 1 , +.Xr cap_enter 2, .Xr kill 2 , .Xr ktrace 2 , .Xr ptrace 2 , .Xr wait 2 , +.Xr capsicum 4 , .Xr hwpmc 4 , .Xr init 8 .Sh HISTORY From owner-svn-src-all@freebsd.org Fri Sep 23 12:32:21 2016 Return-Path: Delivered-To: svn-src-all@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 504BABE6C8D; Fri, 23 Sep 2016 12:32:21 +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 22FBF3E3; Fri, 23 Sep 2016 12:32:21 +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 u8NCWKKb047979; Fri, 23 Sep 2016 12:32:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NCWKcc047977; Fri, 23 Sep 2016 12:32:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609231232.u8NCWKcc047977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Sep 2016 12:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306260 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 12:32:21 -0000 Author: kib Date: Fri Sep 23 12:32:20 2016 New Revision: 306260 URL: https://svnweb.freebsd.org/changeset/base/306260 Log: Add the foundation copyrights to procctl kernel sources. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_procctl.c head/sys/sys/procctl.h Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Fri Sep 23 12:13:06 2016 (r306259) +++ head/sys/kern/kern_procctl.c Fri Sep 23 12:32:20 2016 (r306260) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2014 John Baldwin - * Copyright (c) 2014 The FreeBSD Foundation + * Copyright (c) 2014, 2016 The FreeBSD Foundation * * Portions of this software were developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Fri Sep 23 12:13:06 2016 (r306259) +++ head/sys/sys/procctl.h Fri Sep 23 12:32:20 2016 (r306260) @@ -1,8 +1,12 @@ /*- * Copyright (c) 2013 Hudson River Trading LLC + * Copyright (c) 2014, 2016 The FreeBSD Foundation * Written by: John H. Baldwin * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: From owner-svn-src-all@freebsd.org Fri Sep 23 12:34:56 2016 Return-Path: Delivered-To: svn-src-all@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 459E9BE6DCE; Fri, 23 Sep 2016 12:34:56 +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 017908E4; Fri, 23 Sep 2016 12:34:55 +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 u8NCYtCp048117; Fri, 23 Sep 2016 12:34:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NCYsxs048114; Fri, 23 Sep 2016 12:34:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609231234.u8NCYsxs048114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Sep 2016 12:34:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306261 - in head/usr.bin: . proccontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 12:34:56 -0000 Author: kib Date: Fri Sep 23 12:34:54 2016 New Revision: 306261 URL: https://svnweb.freebsd.org/changeset/base/306261 Log: Provide proccontrol(1), an utility to control processes behaviour, related to procctl(2). Sponsored by: The FreeBSD Foundation MFC after: 1 week Added: head/usr.bin/proccontrol/ head/usr.bin/proccontrol/Makefile (contents, props changed) head/usr.bin/proccontrol/proccontrol.c (contents, props changed) Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri Sep 23 12:32:20 2016 (r306260) +++ head/usr.bin/Makefile Fri Sep 23 12:34:54 2016 (r306261) @@ -122,6 +122,7 @@ SUBDIR= alias \ pr \ printenv \ printf \ + proccontrol \ procstat \ protect \ rctl \ Added: head/usr.bin/proccontrol/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/proccontrol/Makefile Fri Sep 23 12:34:54 2016 (r306261) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PROG= proccontrol +WARNS?= 6 +MK_MAN=no + +.include Added: head/usr.bin/proccontrol/proccontrol.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/proccontrol/proccontrol.c Fri Sep 23 12:34:54 2016 (r306261) @@ -0,0 +1,180 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +enum { + MODE_INVALID, + MODE_TRACE, + MODE_TRAPCAP, +}; + +static pid_t +str2pid(const char *str) +{ + pid_t res; + char *tail; + + res = strtol(str, &tail, 0); + if (*tail != '\0') { + warnx("non-numeric pid"); + return (-1); + } + return (res); +} + +static void __dead2 +usage(void) +{ + + fprintf(stderr, "Usage: proccontrol -m (trace|trapcap) [-q] " + "[-s (enable|disable)] [-p pid | command]\n"); + exit(1); +} + +int +main(int argc, char *argv[]) +{ + int arg, ch, error, mode; + pid_t pid; + bool enable, do_command, query; + + mode = MODE_INVALID; + enable = true; + pid = -1; + query = false; + while ((ch = getopt(argc, argv, "m:qs:p:")) != -1) { + switch (ch) { + case 'm': + if (strcmp(optarg, "trace") == 0) + mode = MODE_TRACE; + else if (strcmp(optarg, "trapcap") == 0) + mode = MODE_TRAPCAP; + else + usage(); + break; + case 's': + if (strcmp(optarg, "enable") == 0) + enable = true; + else if (strcmp(optarg, "disable") == 0) + enable = false; + else + usage(); + break; + case 'p': + pid = str2pid(optarg); + break; + case 'q': + query = true; + break; + case '?': + default: + usage(); + break; + } + } + argc -= optind; + argv += optind; + do_command = argc != 0; + if (do_command) { + if (pid != -1 || query) + usage(); + pid = getpid(); + } else if (pid == -1) { + pid = getpid(); + } + + if (query) { + switch (mode) { + case MODE_TRACE: + error = procctl(P_PID, pid, PROC_TRACE_STATUS, &arg); + break; + case MODE_TRAPCAP: + error = procctl(P_PID, pid, PROC_TRAPCAP_STATUS, &arg); + break; + default: + usage(); + break; + } + if (error != 0) + err(1, "procctl status"); + switch (mode) { + case MODE_TRACE: + if (arg == -1) + printf("disabled\n"); + else if (arg == 0) + printf("enabled, no debugger\n"); + else + printf("enabled, traced by %d\n", arg); + break; + case MODE_TRAPCAP: + switch (arg) { + case PROC_TRAPCAP_CTL_ENABLE: + printf("enabled\n"); + break; + case PROC_TRAPCAP_CTL_DISABLE: + printf("disabled\n"); + break; + } + break; + } + } else { + switch (mode) { + case MODE_TRACE: + arg = enable ? PROC_TRACE_CTL_ENABLE : + PROC_TRACE_CTL_DISABLE; + error = procctl(P_PID, pid, PROC_TRACE_CTL, &arg); + break; + case MODE_TRAPCAP: + arg = enable ? PROC_TRAPCAP_CTL_ENABLE : + PROC_TRAPCAP_CTL_DISABLE; + error = procctl(P_PID, pid, PROC_TRAPCAP_CTL, &arg); + break; + default: + usage(); + break; + } + if (error != 0) + err(1, "procctl ctl"); + if (do_command) { + error = execvp(argv[0], argv); + err(1, "exec"); + } + } + exit(0); +} From owner-svn-src-all@freebsd.org Fri Sep 23 12:38:08 2016 Return-Path: Delivered-To: svn-src-all@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 31069BE6EE9; Fri, 23 Sep 2016 12:38:08 +0000 (UTC) (envelope-from andrew@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 01822AA6; Fri, 23 Sep 2016 12:38:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NCc7c5048293; Fri, 23 Sep 2016 12:38:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NCc5gk048275; Fri, 23 Sep 2016 12:38:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609231238.u8NCc5gk048275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 23 Sep 2016 12:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306262 - in head/sys/arm: allwinner altera/socfpga amlogic/aml8726 annapurna/alpine arm broadcom/bcm2835 freescale/imx freescale/vybrid include mv nvidia/tegra124 qemu rockchip samsung... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 12:38:08 -0000 Author: andrew Date: Fri Sep 23 12:38:05 2016 New Revision: 306262 URL: https://svnweb.freebsd.org/changeset/base/306262 Log: Remove bus_dma_get_range and bus_dma_get_range_nb on armv6. We only need this on a few earlier arm SoCs. Reviewed by: manu (earlier version) Sponsored by: ABT Systems Ltd Modified: head/sys/arm/allwinner/aw_machdep.c head/sys/arm/altera/socfpga/socfpga_machdep.c head/sys/arm/amlogic/aml8726/aml8726_machdep.c head/sys/arm/annapurna/alpine/alpine_machdep.c head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/platform.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/freescale/imx/imx_machdep.c head/sys/arm/freescale/vybrid/vf_machdep.c head/sys/arm/include/bus_dma.h head/sys/arm/mv/mv_machdep.c head/sys/arm/nvidia/tegra124/tegra124_machdep.c head/sys/arm/qemu/virt_machdep.c head/sys/arm/rockchip/rk30xx_machdep.c head/sys/arm/samsung/exynos/exynos5_machdep.c head/sys/arm/ti/ti_machdep.c head/sys/arm/versatile/versatile_machdep.c head/sys/arm/xilinx/zy7_machdep.c Modified: head/sys/arm/allwinner/aw_machdep.c ============================================================================== --- head/sys/arm/allwinner/aw_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/allwinner/aw_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -36,7 +36,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -147,18 +146,6 @@ allwinner_devmap_init(platform_t plat) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - return (0); -} - void cpu_reset() { Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/altera/socfpga/socfpga_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -34,7 +34,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -100,17 +99,3 @@ platform_devmap_init(void) return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -166,20 +165,6 @@ platform_devmap_init(void) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - struct fdt_fixup_entry fdt_fixup_table[] = { { NULL, NULL } }; Modified: head/sys/arm/annapurna/alpine/alpine_machdep.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/annapurna/alpine/alpine_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -29,7 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -92,17 +91,3 @@ platform_devmap_init(void) devmap_add_entry(al_devmap_pa, al_devmap_size); return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/arm/busdma_machdep-v6.c Fri Sep 23 12:38:05 2016 (r306262) @@ -33,7 +33,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -95,14 +94,6 @@ struct bus_dma_tag { bus_dma_lock_t *lockfunc; void *lockfuncarg; struct bounce_zone *bounce_zone; - /* - * DMA range for this tag. If the page doesn't fall within - * one of these ranges, an error is returned. The caller - * may then decide what to do with the transfer. If the - * range pointer is NULL, it is ignored. - */ - struct arm32_dma_range *ranges; - int _nranges; }; struct bounce_page { @@ -407,22 +398,6 @@ must_bounce(bus_dma_tag_t dmat, bus_dmam return (0); } -static __inline struct arm32_dma_range * -_bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, - bus_addr_t curaddr) -{ - struct arm32_dma_range *dr; - int i; - - for (i = 0, dr = ranges; i < nranges; i++, dr++) { - if (curaddr >= dr->dr_sysbase && - round_page(curaddr) <= (dr->dr_sysbase + dr->dr_len)) - return (dr); - } - - return (NULL); -} - /* * Convenience function for manipulating driver locks from busdma (during * busdma_swi, for example). Drivers that don't provide their own locks @@ -507,8 +482,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->flags = flags; newtag->ref_count = 1; /* Count ourself */ newtag->map_count = 0; - newtag->ranges = bus_dma_get_range(); - newtag->_nranges = bus_dma_get_range_nb(); if (lockfunc != NULL) { newtag->lockfunc = lockfunc; newtag->lockfuncarg = lockfuncarg; @@ -992,22 +965,6 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, b sgsize = (baddr - curaddr); } - if (dmat->ranges) { - struct arm32_dma_range *dr; - - dr = _bus_dma_inrange(dmat->ranges, dmat->_nranges, - curaddr); - if (dr == NULL) { - _bus_dmamap_unload(dmat, map); - return (0); - } - /* - * In a valid DMA range. Translate the physical - * memory address to an address in the DMA window. - */ - curaddr = (curaddr - dr->dr_sysbase) + dr->dr_busbase; - } - /* * Insert chunk into a segment, coalescing with * previous segment if possible. Modified: head/sys/arm/arm/platform.c ============================================================================== --- head/sys/arm/arm/platform.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/arm/platform.c Fri Sep 23 12:38:05 2016 (r306262) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); * through a previously registered kernel object. */ -#define _ARM32_BUS_DMA_PRIVATE #include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -42,7 +42,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -113,19 +112,7 @@ bcm2836_devmap_init(platform_t plat) } #endif -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} -int -bus_dma_get_range_nb(void) -{ - - return (0); -} void cpu_reset() Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/freescale/imx/imx_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -29,7 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -54,20 +53,6 @@ SYSCTL_UINT(_hw_imx, OID_AUTO, last_rese SYSCTL_STRING(_hw_imx, OID_AUTO, last_reset_reason, CTLFLAG_RD, "unknown", 0, "Last reset reason"); -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - /* * This code which manipulates the watchdog hardware is here to implement * cpu_reset() because the watchdog is the only way for software to reset the Modified: head/sys/arm/freescale/vybrid/vf_machdep.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/freescale/vybrid/vf_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -78,17 +77,3 @@ platform_devmap_init(void) return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/include/bus_dma.h ============================================================================== --- head/sys/arm/include/bus_dma.h Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/include/bus_dma.h Fri Sep 23 12:38:05 2016 (r306262) @@ -72,7 +72,7 @@ #define BUS_DMA_TAG_VALID(t) ((t) != (bus_dma_tag_t)0) -#ifdef _ARM32_BUS_DMA_PRIVATE +#if defined(_ARM32_BUS_DMA_PRIVATE) && __ARM_ARCH < 6 /* * arm32_dma_range * Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/mv/mv_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -432,6 +432,7 @@ platform_devmap_init(void) return (0); } +#if __ARM_ARCH < 6 struct arm32_dma_range * bus_dma_get_range(void) { @@ -445,6 +446,7 @@ bus_dma_get_range_nb(void) return (0); } +#endif #if defined(CPU_MV_PJ4B) #ifdef DDB Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#define _ARM32_BUS_DMA_PRIVATE #include "opt_platform.h" #include @@ -66,20 +65,6 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - static vm_offset_t tegra124_lastaddr(platform_t plat) { Modified: head/sys/arm/qemu/virt_machdep.c ============================================================================== --- head/sys/arm/qemu/virt_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/qemu/virt_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -45,20 +44,6 @@ __FBSDID("$FreeBSD$"); #include "platform_if.h" -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset(void) { Modified: head/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/rockchip/rk30xx_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -34,7 +34,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -92,20 +91,6 @@ platform_devmap_init(void) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() { Modified: head/sys/arm/samsung/exynos/exynos5_machdep.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/samsung/exynos/exynos5_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -83,17 +82,3 @@ platform_devmap_init(void) return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/ti/ti_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -40,7 +40,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -96,20 +95,6 @@ ti_am335x_devmap_init(platform_t plat) } #endif -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() { Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/versatile/versatile_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -39,7 +39,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -102,20 +101,6 @@ platform_devmap_init(void) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() { Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/xilinx/zy7_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -36,7 +36,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -120,20 +119,6 @@ fdt_pic_decode_t fdt_pic_table[] = { }; #endif -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() { From owner-svn-src-all@freebsd.org Fri Sep 23 13:08:17 2016 Return-Path: Delivered-To: svn-src-all@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 9CF8DBE6D44; Fri, 23 Sep 2016 13:08:17 +0000 (UTC) (envelope-from andrew@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 5BC29FAB; Fri, 23 Sep 2016 13:08:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ND8GJA060316; Fri, 23 Sep 2016 13:08:16 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ND8Ftr060306; Fri, 23 Sep 2016 13:08:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609231308.u8ND8Ftr060306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 23 Sep 2016 13:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306263 - in head/sys/arm: allwinner arm broadcom/bcm2835 freescale/imx nvidia/tegra124 qemu ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 13:08:17 -0000 Author: andrew Date: Fri Sep 23 13:08:15 2016 New Revision: 306263 URL: https://svnweb.freebsd.org/changeset/base/306263 Log: Move cpu_reset to be a platform method to allow multiple implementations. Reviewed by: mmel Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D8010 Modified: head/sys/arm/allwinner/aw_machdep.c head/sys/arm/arm/platform.c head/sys/arm/arm/platform_if.m head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/freescale/imx/imx51_machdep.c head/sys/arm/freescale/imx/imx53_machdep.c head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/nvidia/tegra124/tegra124_machdep.c head/sys/arm/qemu/virt_machdep.c head/sys/arm/ti/ti_machdep.c Modified: head/sys/arm/allwinner/aw_machdep.c ============================================================================== --- head/sys/arm/allwinner/aw_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/allwinner/aw_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -146,8 +146,8 @@ allwinner_devmap_init(platform_t plat) return (0); } -void -cpu_reset() +static void +allwinner_cpu_reset(platform_t plat) { aw_wdog_watchdog_reset(); printf("Reset failed!\n"); @@ -159,6 +159,7 @@ static platform_method_t a10_methods[] = PLATFORMMETHOD(platform_attach, a10_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), PLATFORMMETHOD_END, }; @@ -170,6 +171,7 @@ static platform_method_t a13_methods[] = PLATFORMMETHOD(platform_attach, a13_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), PLATFORMMETHOD_END, }; @@ -181,6 +183,7 @@ static platform_method_t a20_methods[] = PLATFORMMETHOD(platform_attach, a20_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap), @@ -196,6 +199,7 @@ static platform_method_t a31_methods[] = PLATFORMMETHOD(platform_attach, a31_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap), @@ -211,6 +215,7 @@ static platform_method_t a31s_methods[] PLATFORMMETHOD(platform_attach, a31s_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap), @@ -226,6 +231,7 @@ static platform_method_t a83t_methods[] PLATFORMMETHOD(platform_attach, a83t_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, a83t_mp_start_ap), @@ -241,6 +247,7 @@ static platform_method_t h3_methods[] = PLATFORMMETHOD(platform_attach, h3_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap), Modified: head/sys/arm/arm/platform.c ============================================================================== --- head/sys/arm/arm/platform.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/arm/platform.c Fri Sep 23 13:08:15 2016 (r306263) @@ -188,6 +188,20 @@ platform_late_init(void) PLATFORM_LATE_INIT(plat_obj); } +void +cpu_reset(void) +{ + + PLATFORM_CPU_RESET(plat_obj); + + printf("cpu_reset failed"); + + intr_disable(); + while(1) { + cpu_sleep(0); + } +} + #ifdef MULTIDELAY static void platform_delay(int usec, void *arg __unused) Modified: head/sys/arm/arm/platform_if.m ============================================================================== --- head/sys/arm/arm/platform_if.m Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/arm/platform_if.m Fri Sep 23 13:08:15 2016 (r306263) @@ -133,3 +133,10 @@ METHOD void mp_setmaxid { METHOD void mp_start_ap { platform_t _plat; }; + +/** + * @brief Called by cpu_reset to reboot. + */ +METHOD void cpu_reset { + platform_t _plat; +}; Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -114,11 +114,10 @@ bcm2836_devmap_init(platform_t plat) -void -cpu_reset() +static void +bcm2835_cpu_reset(platform_t plat) { bcmwd_watchdog_reset(); - while (1); } #ifdef SOC_BCM2835 @@ -126,6 +125,7 @@ static platform_method_t bcm2835_methods PLATFORMMETHOD(platform_devmap_init, bcm2835_devmap_init), PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr), PLATFORMMETHOD(platform_late_init, bcm2835_late_init), + PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), PLATFORMMETHOD_END, }; Modified: head/sys/arm/freescale/imx/imx51_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/freescale/imx/imx51_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -81,8 +81,8 @@ imx51_devmap_init(platform_t plat) return (0); } -void -cpu_reset(void) +static void +imx51_cpu_reset(platform_t plat) { imx_wdog_cpu_reset(0x73F98000); @@ -97,6 +97,7 @@ static platform_method_t imx51_methods[] PLATFORMMETHOD(platform_attach, imx51_attach), PLATFORMMETHOD(platform_devmap_init, imx51_devmap_init), PLATFORMMETHOD(platform_lastaddr, imx51_lastaddr), + PLATFORMMETHOD(platform_cpu_reset, imx51_cpu_reset), PLATFORMMETHOD_END, }; Modified: head/sys/arm/freescale/imx/imx53_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx53_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/freescale/imx/imx53_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -81,8 +81,8 @@ imx53_devmap_init(platform_t plat) return (0); } -void -cpu_reset(void) +static void +imx53_cpu_reset(platform_t plat) { imx_wdog_cpu_reset(0x53F98000); @@ -97,6 +97,7 @@ static platform_method_t imx53_methods[] PLATFORMMETHOD(platform_attach, imx53_attach), PLATFORMMETHOD(platform_devmap_init, imx53_devmap_init), PLATFORMMETHOD(platform_lastaddr, imx53_lastaddr), + PLATFORMMETHOD(platform_cpu_reset, imx53_cpu_reset), PLATFORMMETHOD_END, }; Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/freescale/imx/imx6_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -227,8 +227,8 @@ imx6_devmap_init(platform_t plat) return (0); } -void -cpu_reset(void) +static void +imx6_cpu_reset(platform_t plat) { const uint32_t IMX6_WDOG_CR_PHYS = 0x020bc000; @@ -350,6 +350,7 @@ static platform_method_t imx6_methods[] PLATFORMMETHOD(platform_lastaddr, imx6_lastaddr), PLATFORMMETHOD(platform_devmap_init, imx6_devmap_init), PLATFORMMETHOD(platform_late_init, imx6_late_init), + PLATFORMMETHOD(platform_cpu_reset, imx6_cpu_reset), PLATFORMMETHOD_END, }; Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -97,8 +97,8 @@ tegra124_devmap_init(platform_t plat) return (0); } -void -cpu_reset(void) +static void +tegra124_cpu_reset(platform_t plat) { bus_space_handle_t pmc; uint32_t reg; @@ -148,6 +148,8 @@ static platform_method_t tegra124_method PLATFORMMETHOD(platform_lastaddr, tegra124_lastaddr), PLATFORMMETHOD(platform_devmap_init, tegra124_devmap_init), PLATFORMMETHOD(platform_late_init, tegra124_late_init), + PLATFORMMETHOD(platform_cpu_reset, tegra124_cpu_reset), + #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, tegra124_mp_start_ap), PLATFORMMETHOD(platform_mp_setmaxid, tegra124_mp_setmaxid), Modified: head/sys/arm/qemu/virt_machdep.c ============================================================================== --- head/sys/arm/qemu/virt_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/qemu/virt_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -44,13 +44,6 @@ __FBSDID("$FreeBSD$"); #include "platform_if.h" -void -cpu_reset(void) -{ - - while (1); -} - static vm_offset_t virt_lastaddr(platform_t plat) { Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Fri Sep 23 12:38:05 2016 (r306262) +++ head/sys/arm/ti/ti_machdep.c Fri Sep 23 13:08:15 2016 (r306263) @@ -95,21 +95,20 @@ ti_am335x_devmap_init(platform_t plat) } #endif -void -cpu_reset() +static void +ti_plat_cpu_reset(platform_t plat) { if (ti_cpu_reset) (*ti_cpu_reset)(); else printf("no cpu_reset implementation\n"); - printf("Reset failed!\n"); - while (1); } #if defined(SOC_OMAP4) static platform_method_t omap4_methods[] = { PLATFORMMETHOD(platform_devmap_init, ti_omap4_devmap_init), PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), + PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), PLATFORMMETHOD_END, }; @@ -120,6 +119,7 @@ FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti, static platform_method_t am335x_methods[] = { PLATFORMMETHOD(platform_devmap_init, ti_am335x_devmap_init), PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), + PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), PLATFORMMETHOD_END, }; From owner-svn-src-all@freebsd.org Fri Sep 23 13:19:01 2016 Return-Path: Delivered-To: svn-src-all@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 24DBBBE72F9; Fri, 23 Sep 2016 13:19:01 +0000 (UTC) (envelope-from emaste@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 E9B9FDF8; Fri, 23 Sep 2016 13:19:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NDJ0JM065222; Fri, 23 Sep 2016 13:19:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NDJ0Hw065220; Fri, 23 Sep 2016 13:19:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609231319.u8NDJ0Hw065220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Sep 2016 13:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306264 - in head/sys/boot/efi/loader/arch: amd64 i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 13:19:01 -0000 Author: emaste Date: Fri Sep 23 13:18:59 2016 New Revision: 306264 URL: https://svnweb.freebsd.org/changeset/base/306264 Log: Use 32-bit value for .text padding, for linker portability GNU ld interprets the padding value as a variable-length byte string, while GNU gold and LLVM lld interpret it as a 32-bit value. Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 head/sys/boot/efi/loader/arch/i386/ldscript.i386 Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Fri Sep 23 13:08:15 2016 (r306263) +++ head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Fri Sep 23 13:18:59 2016 (r306264) @@ -19,7 +19,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCC + } =0xCCCCCCCC . = ALIGN(4096); .data : { *(.rodata .rodata.* .gnu.linkonce.r.*) Modified: head/sys/boot/efi/loader/arch/i386/ldscript.i386 ============================================================================== --- head/sys/boot/efi/loader/arch/i386/ldscript.i386 Fri Sep 23 13:08:15 2016 (r306263) +++ head/sys/boot/efi/loader/arch/i386/ldscript.i386 Fri Sep 23 13:18:59 2016 (r306264) @@ -14,7 +14,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCC + } =0xCCCCCCCC . = ALIGN(4096); .data : { *(.rodata .rodata.* .gnu.linkonce.r.*) From owner-svn-src-all@freebsd.org Fri Sep 23 13:21:30 2016 Return-Path: Delivered-To: svn-src-all@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 78E7ABE73EE; Fri, 23 Sep 2016 13:21:30 +0000 (UTC) (envelope-from emaste@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 4A0F917A; Fri, 23 Sep 2016 13:21:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NDLTjm065957; Fri, 23 Sep 2016 13:21:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NDLT9M065956; Fri, 23 Sep 2016 13:21:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609231321.u8NDLT9M065956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Sep 2016 13:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306265 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 13:21:30 -0000 Author: emaste Date: Fri Sep 23 13:21:29 2016 New Revision: 306265 URL: https://svnweb.freebsd.org/changeset/base/306265 Log: Force LLVM_LIBUNWIND off if we don't have a C++11 compiler Tested by: bde Differential Revision: https://reviews.freebsd.org/D7746 Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Sep 23 13:18:59 2016 (r306264) +++ head/share/mk/src.opts.mk Fri Sep 23 13:21:29 2016 (r306265) @@ -289,6 +289,10 @@ MK_${var}:= no # Force some options off if their dependencies are off. # Order is somewhat important. # +.if !${COMPILER_FEATURES:Mc++11} +MK_LLVM_LIBUNWIND:= no +.endif + .if ${MK_LIBPTHREAD} == "no" MK_LIBTHR:= no .endif From owner-svn-src-all@freebsd.org Fri Sep 23 13:23:53 2016 Return-Path: Delivered-To: svn-src-all@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 CBC09BE75D5; Fri, 23 Sep 2016 13:23:53 +0000 (UTC) (envelope-from emaste@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 9BFF7650; Fri, 23 Sep 2016 13:23:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NDNqY1068782; Fri, 23 Sep 2016 13:23:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NDNqpi068781; Fri, 23 Sep 2016 13:23:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609231323.u8NDNqpi068781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Sep 2016 13:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306266 - head/lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 13:23:53 -0000 Author: emaste Date: Fri Sep 23 13:23:52 2016 New Revision: 306266 URL: https://svnweb.freebsd.org/changeset/base/306266 Log: libcompiler_rt: use ${SRCTOP} for the top of the FreeBSD tree Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Fri Sep 23 13:21:29 2016 (r306265) +++ head/lib/libcompiler_rt/Makefile Fri Sep 23 13:23:52 2016 (r306266) @@ -8,7 +8,7 @@ NO_PIC= WARNS?= 2 CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN -CFLAGS+=-I${.CURDIR}/../../contrib/libcxxrt +CFLAGS+=-I${SRCTOP}/contrib/libcxxrt .if ${MACHINE_CPUARCH} == "amd64" CRTARCH=x86_64 @@ -16,7 +16,7 @@ CRTARCH=x86_64 CRTARCH=${MACHINE_CPUARCH} .endif -CRTSRC=${.CURDIR}/../../contrib/compiler-rt/lib/builtins +CRTSRC=${SRCTOP}/contrib/compiler-rt/lib/builtins .PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC} From owner-svn-src-all@freebsd.org Fri Sep 23 14:11:26 2016 Return-Path: Delivered-To: svn-src-all@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 881A7BDCC05; Fri, 23 Sep 2016 14:11:26 +0000 (UTC) (envelope-from andrew@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 4C69B769; Fri, 23 Sep 2016 14:11:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NEBPE2087586; Fri, 23 Sep 2016 14:11:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NEBN6m087568; Fri, 23 Sep 2016 14:11:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609231411.u8NEBN6m087568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 23 Sep 2016 14:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306267 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/lpc arm/nvidia/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 14:11:26 -0000 Author: andrew Date: Fri Sep 23 14:11:23 2016 New Revision: 306267 URL: https://svnweb.freebsd.org/changeset/base/306267 Log: Restrict where we need to define fdt_fixup_table to just PowerPC and Marvell. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/allwinner/a10_common.c head/sys/arm/altera/socfpga/socfpga_common.c head/sys/arm/amlogic/aml8726/aml8726_machdep.c head/sys/arm/annapurna/alpine/common.c head/sys/arm/at91/at91_common.c head/sys/arm/broadcom/bcm2835/bcm2835_common.c head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_common.c head/sys/arm/freescale/vybrid/vf_common.c head/sys/arm/lpc/lpc_intc.c head/sys/arm/nvidia/tegra124/tegra124_machdep.c head/sys/arm/qemu/virt_common.c head/sys/arm/rockchip/rk30xx_common.c head/sys/arm/samsung/exynos/exynos5_common.c head/sys/arm/ti/ti_common.c head/sys/arm/versatile/versatile_common.c head/sys/arm/xilinx/zy7_machdep.c head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/arm/allwinner/a10_common.c ============================================================================== --- head/sys/arm/allwinner/a10_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/allwinner/a10_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -38,10 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int Modified: head/sys/arm/altera/socfpga/socfpga_common.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/altera/socfpga/socfpga_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -70,10 +70,6 @@ end: while (1); } -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Sep 23 14:11:23 2016 (r306267) @@ -165,10 +165,6 @@ platform_devmap_init(void) return (0); } -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG #ifndef DEV_GIC static int Modified: head/sys/arm/annapurna/alpine/common.c ============================================================================== --- head/sys/arm/annapurna/alpine/common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/annapurna/alpine/common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -56,9 +56,6 @@ __FBSDID("$FreeBSD$"); #define LOCK 0x00000001 extern bus_addr_t al_devmap_pa; -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; static int alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize); static int alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, Modified: head/sys/arm/at91/at91_common.c ============================================================================== --- head/sys/arm/at91/at91_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/at91/at91_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -49,10 +49,6 @@ __FBSDID("$FreeBSD$"); extern const struct devmap_entry at91_devmap[]; -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_aic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/broadcom/bcm2835/bcm2835_common.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/broadcom/bcm2835/bcm2835_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -46,10 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/freescale/imx/imx6_machdep.c Fri Sep 23 14:11:23 2016 (r306267) @@ -52,10 +52,6 @@ __FBSDID("$FreeBSD$"); #include "platform_if.h" -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - static uint32_t gpio1_node; #ifndef INTRNG Modified: head/sys/arm/freescale/imx/imx_common.c ============================================================================== --- head/sys/arm/freescale/imx/imx_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/freescale/imx/imx_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -50,10 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/freescale/vybrid/vf_common.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/freescale/vybrid/vf_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -62,10 +62,6 @@ end: while (1); } -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/lpc/lpc_intc.c ============================================================================== --- head/sys/arm/lpc/lpc_intc.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/lpc/lpc_intc.c Fri Sep 23 14:11:23 2016 (r306267) @@ -227,10 +227,6 @@ lpc_intc_eoi(void *data) } -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 14:11:23 2016 (r306267) @@ -61,10 +61,6 @@ __FBSDID("$FreeBSD$"); PMC_SCRATCH0_MODE_BOOTLOADER | \ PMC_SCRATCH0_MODE_RCM) -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - static vm_offset_t tegra124_lastaddr(platform_t plat) { Modified: head/sys/arm/qemu/virt_common.c ============================================================================== --- head/sys/arm/qemu/virt_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/qemu/virt_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -37,10 +37,6 @@ __FBSDID("$FreeBSD$"); #include -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG fdt_pic_decode_t fdt_pic_table[] = { &gic_decode_fdt, Modified: head/sys/arm/rockchip/rk30xx_common.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/rockchip/rk30xx_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -38,10 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/samsung/exynos/exynos5_common.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/samsung/exynos/exynos5_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -49,10 +49,6 @@ cpu_reset(void) while (1); } -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/ti/ti_common.c ============================================================================== --- head/sys/arm/ti/ti_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/ti/ti_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -49,10 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG #ifdef SOC_TI_AM335X static int Modified: head/sys/arm/versatile/versatile_common.c ============================================================================== --- head/sys/arm/versatile/versatile_common.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/versatile/versatile_common.c Fri Sep 23 14:11:23 2016 (r306267) @@ -46,10 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/arm/xilinx/zy7_machdep.c Fri Sep 23 14:11:23 2016 (r306267) @@ -93,10 +93,6 @@ platform_devmap_init(void) } -struct fdt_fixup_entry fdt_fixup_table[] = { - { NULL, NULL } -}; - #ifndef INTRNG static int fdt_gic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Fri Sep 23 13:23:52 2016 (r306266) +++ head/sys/dev/ofw/ofw_fdt.c Fri Sep 23 14:11:23 2016 (r306267) @@ -52,6 +52,15 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif +#if defined(__arm__) +#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) || \ + defined(SOC_MV_DISCOVERY) || defined(SOC_MV_DOVE) || \ + defined(SOC_MV_FREY) || defined(SOC_MV_KIRKWOOD) || \ + defined(SOC_MV_LOKIPLUS) || defined(SOC_MV_ORION) +#define FDT_MARVELL +#endif +#endif + static int ofw_fdt_init(ofw_t, void *); static phandle_t ofw_fdt_peer(ofw_t, phandle_t); static phandle_t ofw_fdt_child(ofw_t, phandle_t); @@ -415,7 +424,7 @@ ofw_fdt_package_to_path(ofw_t ofw, phand return (-1); } -#if defined(__arm__) || defined(__powerpc__) +#if defined(FDT_MARVELL) || defined(__powerpc__) static int ofw_fdt_fixup(ofw_t ofw) { @@ -454,7 +463,7 @@ ofw_fdt_fixup(ofw_t ofw) static int ofw_fdt_interpret(ofw_t ofw, const char *cmd, int nret, cell_t *retvals) { -#if defined(__arm__) || defined(__powerpc__) +#if defined(FDT_MARVELL) || defined(__powerpc__) int rv; /* From owner-svn-src-all@freebsd.org Fri Sep 23 15:28:16 2016 Return-Path: Delivered-To: svn-src-all@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 7A767BE5ED9; Fri, 23 Sep 2016 15:28:16 +0000 (UTC) (envelope-from andrew@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 49B24322; Fri, 23 Sep 2016 15:28:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NFSFmS015626; Fri, 23 Sep 2016 15:28:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NFSFhv015625; Fri, 23 Sep 2016 15:28:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609231528.u8NFSFhv015625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 23 Sep 2016 15:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306268 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 15:28:16 -0000 Author: andrew Date: Fri Sep 23 15:28:15 2016 New Revision: 306268 URL: https://svnweb.freebsd.org/changeset/base/306268 Log: Also implement platform_cpu_reset on bcm2836 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 14:11:23 2016 (r306267) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 15:28:15 2016 (r306268) @@ -137,6 +137,7 @@ static platform_method_t bcm2836_methods PLATFORMMETHOD(platform_devmap_init, bcm2836_devmap_init), PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr), PLATFORMMETHOD(platform_late_init, bcm2835_late_init), + PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), PLATFORMMETHOD_END, }; From owner-svn-src-all@freebsd.org Fri Sep 23 16:47:13 2016 Return-Path: Delivered-To: svn-src-all@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 D9229BE7EDB; Fri, 23 Sep 2016 16:47:13 +0000 (UTC) (envelope-from mjg@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 AC4D2FC9; Fri, 23 Sep 2016 16:47:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NGlCMd045235; Fri, 23 Sep 2016 16:47:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NGlCYF045234; Fri, 23 Sep 2016 16:47:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609231647.u8NGlCYF045234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 23 Sep 2016 16:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306272 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 16:47:13 -0000 Author: mjg Date: Fri Sep 23 16:47:12 2016 New Revision: 306272 URL: https://svnweb.freebsd.org/changeset/base/306272 Log: fd: hide fd_modified under CAPABILITIES It has no use without it and is now less error prone. Modified: head/sys/sys/filedesc.h Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Fri Sep 23 16:22:03 2016 (r306271) +++ head/sys/sys/filedesc.h Fri Sep 23 16:47:12 2016 (r306272) @@ -229,12 +229,14 @@ fdeget_locked(struct filedesc *fdp, int return (fde); } +#ifdef CAPABILITIES static __inline bool fd_modified(struct filedesc *fdp, int fd, seq_t seq) { return (!seq_consistent(fd_seq(fdp->fd_files, fd), seq)); } +#endif /* cdir/rdir/jdir manipulation functions. */ void pwd_chdir(struct thread *td, struct vnode *vp); From owner-svn-src-all@freebsd.org Fri Sep 23 17:24:08 2016 Return-Path: Delivered-To: svn-src-all@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 5501EBE822A; Fri, 23 Sep 2016 17:24:08 +0000 (UTC) (envelope-from np@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 08CB4DDE; Fri, 23 Sep 2016 17:24:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NHO7wV060454; Fri, 23 Sep 2016 17:24:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NHO72b060453; Fri, 23 Sep 2016 17:24:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609231724.u8NHO72b060453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 23 Sep 2016 17:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306273 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 17:24:08 -0000 Author: np Date: Fri Sep 23 17:24:06 2016 New Revision: 306273 URL: https://svnweb.freebsd.org/changeset/base/306273 Log: cxgbe(4): Fix netmap with T6, which doesn't encapsulate SGE_EGR_UPDATE message inside a FW_MSG. The base NIC already deals with updates in either form. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_netmap.c Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Fri Sep 23 16:47:12 2016 (r306272) +++ head/sys/dev/cxgbe/t4_netmap.c Fri Sep 23 17:24:06 2016 (r306273) @@ -883,19 +883,23 @@ cxgbe_nm_detach(struct vi_info *vi) netmap_detach(vi->ifp); } +static inline const void * +unwrap_nm_fw6_msg(const struct cpl_fw6_msg *cpl) +{ + + MPASS(cpl->type == FW_TYPE_RSSCPL || cpl->type == FW6_TYPE_RSSCPL); + + /* data[0] is RSS header */ + return (&cpl->data[1]); +} + static void -handle_nm_fw6_msg(struct adapter *sc, struct ifnet *ifp, - const struct cpl_fw6_msg *cpl) +handle_nm_sge_egr_update(struct adapter *sc, struct ifnet *ifp, + const struct cpl_sge_egr_update *egr) { - const struct cpl_sge_egr_update *egr; uint32_t oq; struct sge_nm_txq *nm_txq; - if (cpl->type != FW_TYPE_RSSCPL && cpl->type != FW6_TYPE_RSSCPL) - panic("%s: FW_TYPE 0x%x on nm_rxq.", __func__, cpl->type); - - /* data[0] is RSS header */ - egr = (const void *)&cpl->data[1]; oq = be32toh(egr->opcode_qid); MPASS(G_CPL_OPCODE(oq) == CPL_SGE_EGR_UPDATE); nm_txq = (void *)sc->sge.eqmap[G_EGR_QID(oq) - sc->sge.eq_start]; @@ -914,6 +918,7 @@ t4_nm_intr(void *arg) struct netmap_kring *kring = &na->rx_rings[nm_rxq->nid]; struct netmap_ring *ring = kring->ring; struct iq_desc *d = &nm_rxq->iq_desc[nm_rxq->iq_cidx]; + const void *cpl; uint32_t lq; u_int n = 0, work = 0; uint8_t opcode; @@ -926,6 +931,7 @@ t4_nm_intr(void *arg) lq = be32toh(d->rsp.pldbuflen_qid); opcode = d->rss.opcode; + cpl = &d->cpl[0]; switch (G_RSPD_TYPE(d->rsp.u.type_gen)) { case X_RSPD_TYPE_FLBUF: @@ -942,8 +948,10 @@ t4_nm_intr(void *arg) switch (opcode) { case CPL_FW4_MSG: case CPL_FW6_MSG: - handle_nm_fw6_msg(sc, ifp, - (const void *)&d->cpl[0]); + cpl = unwrap_nm_fw6_msg(cpl); + /* fall through */ + case CPL_SGE_EGR_UPDATE: + handle_nm_sge_egr_update(sc, ifp, cpl); break; case CPL_RX_PKT: ring->slot[fl_cidx].len = G_RSPD_LEN(lq) - From owner-svn-src-all@freebsd.org Fri Sep 23 18:54:09 2016 Return-Path: Delivered-To: svn-src-all@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 7B004BE7AE5; Fri, 23 Sep 2016 18:54:09 +0000 (UTC) (envelope-from gonzo@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 4B5C89A8; Fri, 23 Sep 2016 18:54:09 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NIs8lG091864; Fri, 23 Sep 2016 18:54:08 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NIs8gM091863; Fri, 23 Sep 2016 18:54:08 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609231854.u8NIs8gM091863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 23 Sep 2016 18:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306274 - head/sys/dev/evdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 18:54:09 -0000 Author: gonzo Date: Fri Sep 23 18:54:08 2016 New Revision: 306274 URL: https://svnweb.freebsd.org/changeset/base/306274 Log: Handle NULL argument in evdev_free Add check for evdev argument of evdev_free being NULL. This is valid value and should not cause crash. In this case evdev_free does nothing Submitted by: Vladimir Kondratiev Modified: head/sys/dev/evdev/evdev.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Fri Sep 23 17:24:06 2016 (r306273) +++ head/sys/dev/evdev/evdev.c Fri Sep 23 18:54:08 2016 (r306274) @@ -92,7 +92,8 @@ void evdev_free(struct evdev_dev *evdev) { - if (evdev->ev_cdev != NULL && evdev->ev_cdev->si_drv1 != NULL) + if (evdev != NULL && evdev->ev_cdev != NULL && + evdev->ev_cdev->si_drv1 != NULL) evdev_unregister(evdev); free(evdev, M_EVDEV); From owner-svn-src-all@freebsd.org Fri Sep 23 18:55:33 2016 Return-Path: Delivered-To: svn-src-all@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 CB4B2BE7B87; Fri, 23 Sep 2016 18:55:33 +0000 (UTC) (envelope-from gonzo@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 95BCEB85; Fri, 23 Sep 2016 18:55:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NItW1K091972; Fri, 23 Sep 2016 18:55:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NItWhh091971; Fri, 23 Sep 2016 18:55:32 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609231855.u8NItWhh091971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 23 Sep 2016 18:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306275 - head/sys/dev/usb/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 18:55:33 -0000 Author: gonzo Date: Fri Sep 23 18:55:32 2016 New Revision: 306275 URL: https://svnweb.freebsd.org/changeset/base/306275 Log: Do not perform extra check for NULL, evdev_free can handle NULL value Submitted by: Vladimir Kondratiev Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Fri Sep 23 18:54:08 2016 (r306274) +++ head/sys/dev/usb/input/ukbd.c Fri Sep 23 18:55:32 2016 (r306275) @@ -1432,8 +1432,7 @@ ukbd_detach(device_t dev) #endif #ifdef EVDEV - if (sc->sc_evdev != NULL) - evdev_free(sc->sc_evdev); + evdev_free(sc->sc_evdev); #endif if (KBD_IS_CONFIGURED(&sc->sc_kbd)) { From owner-svn-src-all@freebsd.org Fri Sep 23 19:05:09 2016 Return-Path: Delivered-To: svn-src-all@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 2030EBE7E46; Fri, 23 Sep 2016 19:05:09 +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 D87211B2; Fri, 23 Sep 2016 19:05:08 +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 u8NJ58d9094740; Fri, 23 Sep 2016 19:05:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NJ57oT094735; Fri, 23 Sep 2016 19:05:07 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201609231905.u8NJ57oT094735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 23 Sep 2016 19:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306276 - in head: sbin/mount_msdosfs sys/fs/msdosfs sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 19:05:09 -0000 Author: asomers Date: Fri Sep 23 19:05:07 2016 New Revision: 306276 URL: https://svnweb.freebsd.org/changeset/base/306276 Log: Mount msdosfs with longnames support by default. The old behavior depended on the FAT version and on what files were in the root directory. "mount_msdosfs -o shortnames" is still supported. Reviewed by: wblock, cem Discussed with: trasz, adrian, imp MFC after: 4 weeks X-MFC-Notes: Don't MFC the removal of findwin95 Differential Revision: https://reviews.freebsd.org/D8018 Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 head/sys/fs/msdosfs/denode.h head/sys/fs/msdosfs/msdosfs_lookup.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/sys/param.h Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 ============================================================================== --- head/sbin/mount_msdosfs/mount_msdosfs.8 Fri Sep 23 18:55:32 2016 (r306275) +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Fri Sep 23 19:05:07 2016 (r306276) @@ -142,15 +142,8 @@ If neither nor .Fl l are given, -.Nm -searches the root directory of the file system to -be mounted for any existing Win'95 long filenames. -If no such entries are found, but short DOS filenames are found, -.Fl s -is the default. -Otherwise .Fl l -is assumed. +is the default. .It Fl 9 Ignore the special Win'95 directory entries even if deleting or renaming a file. Modified: head/sys/fs/msdosfs/denode.h ============================================================================== --- head/sys/fs/msdosfs/denode.h Fri Sep 23 18:55:32 2016 (r306275) +++ head/sys/fs/msdosfs/denode.h Fri Sep 23 19:05:07 2016 (r306276) @@ -265,7 +265,6 @@ int msdosfs_reclaim(struct vop_reclaim_a */ int deget(struct msdosfsmount *, u_long, u_long, struct denode **); int uniqdosname(struct denode *, struct componentname *, u_char *); -int findwin95(struct denode *); int readep(struct msdosfsmount *pmp, u_long dirclu, u_long dirofs, struct buf **bpp, struct direntry **epp); int readde(struct denode *dep, struct buf **bpp, struct direntry **epp); Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Fri Sep 23 18:55:32 2016 (r306275) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Fri Sep 23 19:05:07 2016 (r306276) @@ -1062,55 +1062,3 @@ uniqdosname(struct denode *dep, struct c } } } - -/* - * Find any Win'95 long filename entry in directory dep - */ -int -findwin95(struct denode *dep) -{ - struct msdosfsmount *pmp = dep->de_pmp; - struct direntry *dentp; - int blsize, win95; - u_long cn; - daddr_t bn; - struct buf *bp; - - win95 = 1; - /* - * Read through the directory looking for Win'95 entries - * Note: Error currently handled just as EOF XXX - */ - for (cn = 0;; cn++) { - if (pcbmap(dep, cn, &bn, 0, &blsize)) - return (win95); - if (bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp)) { - brelse(bp); - return (win95); - } - for (dentp = (struct direntry *)bp->b_data; - (char *)dentp < bp->b_data + blsize; - dentp++) { - if (dentp->deName[0] == SLOT_EMPTY) { - /* - * Last used entry and not found - */ - brelse(bp); - return (win95); - } - if (dentp->deName[0] == SLOT_DELETED) { - /* - * Ignore deleted files - * Note: might be an indication of Win'95 anyway XXX - */ - continue; - } - if (dentp->deAttributes == ATTR_WIN95) { - brelse(bp); - return 1; - } - win95 = 0; - } - brelse(bp); - } -} Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Sep 23 18:55:32 2016 (r306275) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Sep 23 19:05:07 2016 (r306276) @@ -175,24 +175,8 @@ update_mp(struct mount *mp, struct threa if (pmp->pm_flags & MSDOSFSMNT_NOWIN95) pmp->pm_flags |= MSDOSFSMNT_SHORTNAME; - else if (!(pmp->pm_flags & - (MSDOSFSMNT_SHORTNAME | MSDOSFSMNT_LONGNAME))) { - struct vnode *rootvp; - - /* - * Try to divine whether to support Win'95 long filenames - */ - if (FAT32(pmp)) - pmp->pm_flags |= MSDOSFSMNT_LONGNAME; - else { - if ((error = - msdosfs_root(mp, LK_EXCLUSIVE, &rootvp)) != 0) - return error; - pmp->pm_flags |= findwin95(VTODE(rootvp)) ? - MSDOSFSMNT_LONGNAME : MSDOSFSMNT_SHORTNAME; - vput(rootvp); - } - } + else + pmp->pm_flags |= MSDOSFSMNT_LONGNAME; return 0; } Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Sep 23 18:55:32 2016 (r306275) +++ head/sys/sys/param.h Fri Sep 23 19:05:07 2016 (r306276) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200009 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200010 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Sep 23 19:59:36 2016 Return-Path: Delivered-To: svn-src-all@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 8A1BFBE8433; Fri, 23 Sep 2016 19:59:36 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:198]) (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 4F170C5F; Fri, 23 Sep 2016 19:59:36 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id B19C3164583; Fri, 23 Sep 2016 21:59:32 +0200 (CEST) Subject: Re: svn commit: r306272 - head/sys/sys To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609231647.u8NGlCYF045234@repo.freebsd.org> From: Andreas Tobler Message-ID: Date: Fri, 23 Sep 2016 21:59:32 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609231647.u8NGlCYF045234@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: Obelix Submit on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 19:59:36 -0000 On 23.09.16 18:47, Mateusz Guzik wrote: > Author: mjg > Date: Fri Sep 23 16:47:12 2016 > New Revision: 306272 > URL: https://svnweb.freebsd.org/changeset/base/306272 > > Log: > fd: hide fd_modified under CAPABILITIES > > It has no use without it and is now less error prone. > > Modified: > head/sys/sys/filedesc.h > > Modified: head/sys/sys/filedesc.h > ============================================================================== > --- head/sys/sys/filedesc.h Fri Sep 23 16:22:03 2016 (r306271) > +++ head/sys/sys/filedesc.h Fri Sep 23 16:47:12 2016 (r306272) > @@ -229,12 +229,14 @@ fdeget_locked(struct filedesc *fdp, int > return (fde); > } > > +#ifdef CAPABILITIES > static __inline bool > fd_modified(struct filedesc *fdp, int fd, seq_t seq) > { > > return (!seq_consistent(fd_seq(fdp->fd_files, fd), seq)); > } > +#endif > > /* cdir/rdir/jdir manipulation functions. */ > void pwd_chdir(struct thread *td, struct vnode *vp); I think this breaks kernel builds: /usr/src/sys/modules/cloudabi/../../compat/cloudabi/cloudabi_fd.c:482:14: error: implicit declaration of function 'fd_modified' is invalid in C99 [-Werror,-Wimplicit-function-declaration] modified = fd_modified(fdp, uap->fd, seq); ^ 1 error generated. *** [cloudabi_fd.o] Error code 1 Andreas From owner-svn-src-all@freebsd.org Fri Sep 23 20:03:14 2016 Return-Path: Delivered-To: svn-src-all@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 37A5CBE8630; Fri, 23 Sep 2016 20:03:14 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 C97BB10E4; Fri, 23 Sep 2016 20:03:13 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id 133so4350859wmq.2; Fri, 23 Sep 2016 13:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=cOkybFQWujD2r4eKS+Ajcfhr0YkVaiaLVvrChZVvM3g=; b=AsuTwDXI5Mr3S4T/ZmKIr6VR1fIYH7iCweJ1rvzVUpzPaIO9kgG3nxxl/pskdh8tkO ClzpLwCS6fqINM/ZDMoaw1Lc4q5WQvOrhJS1RGB0/FvTYhsGvKn8BO3sqUODPIBQIllZ yAOBmwJF5udpBU9xOFbbc8dEgelqN6JesljnfA4OQXqTjax96+wjZ3qpLW/6w3g7EKxE EWzBlGQ7oCthPXvFrs/orsh6LpXeGb29vRsI2bqcqHu2L+nJukGrLbh79RrDbZ075ezf /B+s8MvVT8VuSX4+4R3Rj0WGsDtp2kdzbRF40j0cSNCJ+MSDg4PtUS9ccnUc93Kklt+/ 4CCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=cOkybFQWujD2r4eKS+Ajcfhr0YkVaiaLVvrChZVvM3g=; b=JhCIiE5iNv1xIJ8KM43jqDNqCPQRcIsVwlmFiRTlOhV1K0jd2VLpsFG6LXd/QCbWHk 4WuGOQsJ2Xt4bSJj0JPrM+8djWQHW/o1CmO/BoOEMcDivhJKavQNHXIDdonlb3+Ny8Hr +jUWUtrkDDk7VYcVZo05YWoRi1L3vqMWt/B6BKzx69ZZLQRbzRjC+EHyY7dJMHUNAj/w wQhTAGd1IjOpnvWtVTshAiBPW2QWpjLL8dKfZjJDoE8p168nJhlA8guCgb1eppoVPjV4 vIiht89FrWrt3c3NVJGjkKXGvD7lvP+9L03T4Sqik0EfuMWHAsBD/jUNxiJd7eFIqeVT 4uvw== X-Gm-Message-State: AA6/9RknLB7rycmWUWfHOjTMH+p4AbyDdP+6Jtiyie88NWsBcLgcuHmiY3y42DVt1P0EcQ== X-Received: by 10.28.39.133 with SMTP id n127mr4781777wmn.6.1474660990865; Fri, 23 Sep 2016 13:03:10 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id d64sm5582467wmh.0.2016.09.23.13.03.09 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 23 Sep 2016 13:03:10 -0700 (PDT) Date: Fri, 23 Sep 2016 22:03:08 +0200 From: Mateusz Guzik To: Andreas Tobler Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306272 - head/sys/sys Message-ID: <20160923200308.GB25423@dft-labs.eu> References: <201609231647.u8NGlCYF045234@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 20:03:14 -0000 On Fri, Sep 23, 2016 at 09:59:32PM +0200, Andreas Tobler wrote: > On 23.09.16 18:47, Mateusz Guzik wrote: > >Author: mjg > >Date: Fri Sep 23 16:47:12 2016 > >New Revision: 306272 > >URL: https://svnweb.freebsd.org/changeset/base/306272 > > > >Log: > > fd: hide fd_modified under CAPABILITIES > > > > It has no use without it and is now less error prone. > > > >Modified: > > head/sys/sys/filedesc.h > > > >Modified: head/sys/sys/filedesc.h > >============================================================================== > >--- head/sys/sys/filedesc.h Fri Sep 23 16:22:03 2016 (r306271) > >+++ head/sys/sys/filedesc.h Fri Sep 23 16:47:12 2016 (r306272) > >@@ -229,12 +229,14 @@ fdeget_locked(struct filedesc *fdp, int > > return (fde); > > } > > > >+#ifdef CAPABILITIES > > static __inline bool > > fd_modified(struct filedesc *fdp, int fd, seq_t seq) > > { > > > > return (!seq_consistent(fd_seq(fdp->fd_files, fd), seq)); > > } > >+#endif > > > > /* cdir/rdir/jdir manipulation functions. */ > > void pwd_chdir(struct thread *td, struct vnode *vp); > > I think this breaks kernel builds: > > /usr/src/sys/modules/cloudabi/../../compat/cloudabi/cloudabi_fd.c:482:14: > error: implicit declaration of function 'fd_modified' is invalid in > C99 [-Werror,-Wimplicit-function-declaration] > modified = fd_modified(fdp, uap->fd, seq); > ^ > 1 error generated. > *** [cloudabi_fd.o] Error code 1 > Ye indeed, I hacked up a fix: https://people.freebsd.org/~mjg/patches/cloudabi-fd_modified.diff if ed@ does not respond soon acking the patch, I'll temporarily reviert this change. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Sep 23 20:03:29 2016 Return-Path: Delivered-To: svn-src-all@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 62FD9BE8658; Fri, 23 Sep 2016 20:03:29 +0000 (UTC) (envelope-from np@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 3CD8F1239; Fri, 23 Sep 2016 20:03:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NK3Sg6009796; Fri, 23 Sep 2016 20:03:28 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NK3SsU009795; Fri, 23 Sep 2016 20:03:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609232003.u8NK3SsU009795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 23 Sep 2016 20:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306277 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 20:03:29 -0000 Author: np Date: Fri Sep 23 20:03:28 2016 New Revision: 306277 URL: https://svnweb.freebsd.org/changeset/base/306277 Log: cxgbe(4): Make the location/length of all descriptor rings available in the sysctl MIB. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Sep 23 19:05:07 2016 (r306276) +++ head/sys/dev/cxgbe/t4_sge.c Fri Sep 23 20:03:28 2016 (r306277) @@ -177,8 +177,8 @@ static int free_ring(struct adapter *, b static int alloc_iq_fl(struct vi_info *, struct sge_iq *, struct sge_fl *, int, int); static int free_iq_fl(struct vi_info *, struct sge_iq *, struct sge_fl *); -static void add_fl_sysctls(struct sysctl_ctx_list *, struct sysctl_oid *, - struct sge_fl *); +static void add_fl_sysctls(struct adapter *, struct sysctl_ctx_list *, + struct sysctl_oid *, struct sge_fl *); static int alloc_fwq(struct adapter *); static int free_fwq(struct adapter *); static int alloc_mgmtq(struct adapter *); @@ -2878,8 +2878,8 @@ free_iq_fl(struct vi_info *vi, struct sg } static void -add_fl_sysctls(struct sysctl_ctx_list *ctx, struct sysctl_oid *oid, - struct sge_fl *fl) +add_fl_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, + struct sysctl_oid *oid, struct sge_fl *fl) { struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); @@ -2887,6 +2887,11 @@ add_fl_sysctls(struct sysctl_ctx_list *c "freelist"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_UAUTO(ctx, children, OID_AUTO, "ba", CTLFLAG_RD, + &fl->ba, "bus address of descriptor ring"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "dmalen", CTLFLAG_RD, NULL, + fl->sidx * EQ_ESIZE + sc->params.sge.spg_len, + "desc ring size in bytes"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cntxt_id", CTLTYPE_INT | CTLFLAG_RD, &fl->cntxt_id, 0, sysctl_uint16, "I", "SGE context id of the freelist"); @@ -2942,6 +2947,10 @@ alloc_fwq(struct adapter *sc) NULL, "firmware event queue"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_UAUTO(&sc->ctx, children, OID_AUTO, "ba", CTLFLAG_RD, + &fwq->ba, "bus address of descriptor ring"); + SYSCTL_ADD_INT(&sc->ctx, children, OID_AUTO, "dmalen", CTLFLAG_RD, NULL, + fwq->qsize * IQ_ESIZE, "descriptor ring size in bytes"); SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "abs_id", CTLTYPE_INT | CTLFLAG_RD, &fwq->abs_id, 0, sysctl_uint16, "I", "absolute id of the queue"); @@ -3053,6 +3062,10 @@ alloc_rxq(struct vi_info *vi, struct sge NULL, "rx queue"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_UAUTO(&vi->ctx, children, OID_AUTO, "ba", CTLFLAG_RD, + &rxq->iq.ba, "bus address of descriptor ring"); + SYSCTL_ADD_INT(&vi->ctx, children, OID_AUTO, "dmalen", CTLFLAG_RD, NULL, + rxq->iq.qsize * IQ_ESIZE, "descriptor ring size in bytes"); SYSCTL_ADD_PROC(&vi->ctx, children, OID_AUTO, "abs_id", CTLTYPE_INT | CTLFLAG_RD, &rxq->iq.abs_id, 0, sysctl_uint16, "I", "absolute id of the queue"); @@ -3074,7 +3087,7 @@ alloc_rxq(struct vi_info *vi, struct sge CTLFLAG_RD, &rxq->vlan_extraction, "# of times hardware extracted 802.1Q tag"); - add_fl_sysctls(&vi->ctx, oid, &rxq->fl); + add_fl_sysctls(sc, &vi->ctx, oid, &rxq->fl); return (rc); } @@ -3103,12 +3116,13 @@ static int alloc_ofld_rxq(struct vi_info *vi, struct sge_ofld_rxq *ofld_rxq, int intr_idx, int idx, struct sysctl_oid *oid) { + struct port_info *pi = vi->pi; int rc; struct sysctl_oid_list *children; char name[16]; rc = alloc_iq_fl(vi, &ofld_rxq->iq, &ofld_rxq->fl, intr_idx, - vi->pi->rx_chan_map); + pi->rx_chan_map); if (rc != 0) return (rc); @@ -3119,6 +3133,10 @@ alloc_ofld_rxq(struct vi_info *vi, struc NULL, "rx queue"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_UAUTO(&vi->ctx, children, OID_AUTO, "ba", CTLFLAG_RD, + &ofld_rxq->iq.ba, "bus address of descriptor ring"); + SYSCTL_ADD_INT(&vi->ctx, children, OID_AUTO, "dmalen", CTLFLAG_RD, NULL, + ofld_rxq->iq.qsize * IQ_ESIZE, "descriptor ring size in bytes"); SYSCTL_ADD_PROC(&vi->ctx, children, OID_AUTO, "abs_id", CTLTYPE_INT | CTLFLAG_RD, &ofld_rxq->iq.abs_id, 0, sysctl_uint16, "I", "absolute id of the queue"); @@ -3129,7 +3147,7 @@ alloc_ofld_rxq(struct vi_info *vi, struc CTLTYPE_INT | CTLFLAG_RD, &ofld_rxq->iq.cidx, 0, sysctl_uint16, "I", "consumer index"); - add_fl_sysctls(&vi->ctx, oid, &ofld_rxq->fl); + add_fl_sysctls(pi->adapter, &vi->ctx, oid, &ofld_rxq->fl); return (rc); } @@ -3550,6 +3568,11 @@ alloc_wrq(struct adapter *sc, struct vi_ wrq->nwr_pending = 0; wrq->ndesc_needed = 0; + SYSCTL_ADD_UAUTO(ctx, children, OID_AUTO, "ba", CTLFLAG_RD, + &wrq->eq.ba, "bus address of descriptor ring"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "dmalen", CTLFLAG_RD, NULL, + wrq->eq.sidx * EQ_ESIZE + sc->params.sge.spg_len, + "desc ring size in bytes"); SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "cntxt_id", CTLFLAG_RD, &wrq->eq.cntxt_id, 0, "SGE context id of the queue"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cidx", @@ -3558,6 +3581,8 @@ alloc_wrq(struct adapter *sc, struct vi_ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "pidx", CTLTYPE_INT | CTLFLAG_RD, &wrq->eq.pidx, 0, sysctl_uint16, "I", "producer index"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "sidx", CTLFLAG_RD, NULL, + wrq->eq.sidx, "status page index"); SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tx_wrs_direct", CTLFLAG_RD, &wrq->tx_wrs_direct, "# of work requests (direct)"); SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tx_wrs_copied", CTLFLAG_RD, @@ -3637,6 +3662,11 @@ alloc_txq(struct vi_info *vi, struct sge NULL, "tx queue"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_UAUTO(&vi->ctx, children, OID_AUTO, "ba", CTLFLAG_RD, + &eq->ba, "bus address of descriptor ring"); + SYSCTL_ADD_INT(&vi->ctx, children, OID_AUTO, "dmalen", CTLFLAG_RD, NULL, + eq->sidx * EQ_ESIZE + sc->params.sge.spg_len, + "desc ring size in bytes"); SYSCTL_ADD_UINT(&vi->ctx, children, OID_AUTO, "abs_id", CTLFLAG_RD, &eq->abs_id, 0, "absolute id of the queue"); SYSCTL_ADD_UINT(&vi->ctx, children, OID_AUTO, "cntxt_id", CTLFLAG_RD, @@ -3647,6 +3677,8 @@ alloc_txq(struct vi_info *vi, struct sge SYSCTL_ADD_PROC(&vi->ctx, children, OID_AUTO, "pidx", CTLTYPE_INT | CTLFLAG_RD, &eq->pidx, 0, sysctl_uint16, "I", "producer index"); + SYSCTL_ADD_INT(&vi->ctx, children, OID_AUTO, "sidx", CTLFLAG_RD, NULL, + eq->sidx, "status page index"); SYSCTL_ADD_PROC(&vi->ctx, children, OID_AUTO, "tc", CTLTYPE_INT | CTLFLAG_RW, vi, idx, sysctl_tc, "I", From owner-svn-src-all@freebsd.org Fri Sep 23 20:38:08 2016 Return-Path: Delivered-To: svn-src-all@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 431DBBE6330; Fri, 23 Sep 2016 20:38:08 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:197]) (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 0A72AC20; Fri, 23 Sep 2016 20:38:08 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 94D341467E1; Fri, 23 Sep 2016 22:38:05 +0200 (CEST) Subject: Re: svn commit: r306272 - head/sys/sys To: Mateusz Guzik References: <201609231647.u8NGlCYF045234@repo.freebsd.org> <20160923200308.GB25423@dft-labs.eu> Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andreas Tobler Message-ID: Date: Fri, 23 Sep 2016 22:38:05 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160923200308.GB25423@dft-labs.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: Idefix Submit on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 20:38:08 -0000 On 23.09.16 22:03, Mateusz Guzik wrote: > On Fri, Sep 23, 2016 at 09:59:32PM +0200, Andreas Tobler wrote: >> On 23.09.16 18:47, Mateusz Guzik wrote: >>> Author: mjg >>> Date: Fri Sep 23 16:47:12 2016 >>> New Revision: 306272 >>> URL: https://svnweb.freebsd.org/changeset/base/306272 >>> >>> Log: >>> fd: hide fd_modified under CAPABILITIES >>> >>> It has no use without it and is now less error prone. >>> >>> Modified: >>> head/sys/sys/filedesc.h >>> >>> Modified: head/sys/sys/filedesc.h >>> ============================================================================== >>> --- head/sys/sys/filedesc.h Fri Sep 23 16:22:03 2016 (r306271) >>> +++ head/sys/sys/filedesc.h Fri Sep 23 16:47:12 2016 (r306272) >>> @@ -229,12 +229,14 @@ fdeget_locked(struct filedesc *fdp, int >>> return (fde); >>> } >>> >>> +#ifdef CAPABILITIES >>> static __inline bool >>> fd_modified(struct filedesc *fdp, int fd, seq_t seq) >>> { >>> >>> return (!seq_consistent(fd_seq(fdp->fd_files, fd), seq)); >>> } >>> +#endif >>> >>> /* cdir/rdir/jdir manipulation functions. */ >>> void pwd_chdir(struct thread *td, struct vnode *vp); >> >> I think this breaks kernel builds: >> >> /usr/src/sys/modules/cloudabi/../../compat/cloudabi/cloudabi_fd.c:482:14: >> error: implicit declaration of function 'fd_modified' is invalid in >> C99 [-Werror,-Wimplicit-function-declaration] >> modified = fd_modified(fdp, uap->fd, seq); >> ^ >> 1 error generated. >> *** [cloudabi_fd.o] Error code 1 >> > > Ye indeed, I hacked up a fix: > https://people.freebsd.org/~mjg/patches/cloudabi-fd_modified.diff > > if ed@ does not respond soon acking the patch, I'll temporarily reviert > this change. > Thanks, I reverted locally to continue my work. So no hurry. Andreas From owner-svn-src-all@freebsd.org Fri Sep 23 21:29:42 2016 Return-Path: Delivered-To: svn-src-all@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 653B1BE7891; Fri, 23 Sep 2016 21:29:42 +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 2940A3B8; Fri, 23 Sep 2016 21:29:42 +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 u8NLTfvk030482; Fri, 23 Sep 2016 21:29:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NLTecT030469; Fri, 23 Sep 2016 21:29:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609232129.u8NLTecT030469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Sep 2016 21:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306279 - in head/sys/geom: bde concat gate journal linux_lvm mirror mountver raid3 shsec stripe vinum virstor X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 21:29:42 -0000 Author: mav Date: Fri Sep 23 21:29:40 2016 New Revision: 306279 URL: https://svnweb.freebsd.org/changeset/base/306279 Log: Use g_wither_provider() where applicable. It is just a helper function combining G_PF_WITHER setting with g_orphan_provider(). Modified: head/sys/geom/bde/g_bde.c head/sys/geom/concat/g_concat.c head/sys/geom/gate/g_gate.c head/sys/geom/journal/g_journal.c head/sys/geom/linux_lvm/g_linux_lvm.c head/sys/geom/mirror/g_mirror.c head/sys/geom/mountver/g_mountver.c head/sys/geom/raid3/g_raid3.c head/sys/geom/shsec/g_shsec.c head/sys/geom/stripe/g_stripe.c head/sys/geom/vinum/geom_vinum_rm.c head/sys/geom/virstor/g_virstor.c Modified: head/sys/geom/bde/g_bde.c ============================================================================== --- head/sys/geom/bde/g_bde.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/bde/g_bde.c Fri Sep 23 21:29:40 2016 (r306279) @@ -85,7 +85,7 @@ g_bde_orphan(struct g_consumer *cp) sc = gp->softc; gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, &gp->provider, provider) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: head/sys/geom/concat/g_concat.c ============================================================================== --- head/sys/geom/concat/g_concat.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/concat/g_concat.c Fri Sep 23 21:29:40 2016 (r306279) @@ -129,10 +129,9 @@ g_concat_remove_disk(struct g_concat_dis } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_CONCAT_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/gate/g_gate.c Fri Sep 23 21:29:40 2016 (r306279) @@ -109,8 +109,7 @@ g_gate_destroy(struct g_gate_softc *sc, wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); gp = pp->geom; - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); callout_drain(&sc->sc_callout); bioq_init(&queue); mtx_lock(&sc->sc_queue_mtx); Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/journal/g_journal.c Fri Sep 23 21:29:40 2016 (r306279) @@ -2462,8 +2462,7 @@ g_journal_destroy(struct g_journal_softc GJ_DEBUG(1, "Marking %s as clean.", sc->sc_name); g_journal_metadata_update(sc); g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); } else { g_topology_lock(); } Modified: head/sys/geom/linux_lvm/g_linux_lvm.c ============================================================================== --- head/sys/geom/linux_lvm/g_linux_lvm.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/linux_lvm/g_linux_lvm.c Fri Sep 23 21:29:40 2016 (r306279) @@ -333,7 +333,7 @@ g_llvm_remove_disk(struct g_llvm_vg *vg, if (found) { G_LLVM_DEBUG(0, "Device %s removed.", lv->lv_gprov->name); - g_orphan_provider(lv->lv_gprov, ENXIO); + g_wither_provider(lv->lv_gprov, ENXIO); lv->lv_gprov = NULL; } } Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/mirror/g_mirror.c Fri Sep 23 21:29:40 2016 (r306279) @@ -2154,10 +2154,9 @@ g_mirror_destroy_provider(struct g_mirro mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); - g_topology_unlock(); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; + g_topology_unlock(); LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) g_mirror_sync_stop(disk, 1); Modified: head/sys/geom/mountver/g_mountver.c ============================================================================== --- head/sys/geom/mountver/g_mountver.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/mountver/g_mountver.c Fri Sep 23 21:29:40 2016 (r306279) @@ -327,7 +327,7 @@ g_mountver_destroy(struct g_geom *gp, bo G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); } if (pp != NULL) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_mountver_discard_queued(gp); g_free(sc->sc_provider_name); g_free(gp->softc); Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/raid3/g_raid3.c Fri Sep 23 21:29:40 2016 (r306279) @@ -2368,8 +2368,7 @@ g_raid3_destroy_provider(struct g_raid3_ mtx_unlock(&sc->sc_queue_mtx); G_RAID3_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); g_topology_unlock(); sc->sc_provider = NULL; if (sc->sc_syncdisk != NULL) Modified: head/sys/geom/shsec/g_shsec.c ============================================================================== --- head/sys/geom/shsec/g_shsec.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/shsec/g_shsec.c Fri Sep 23 21:29:40 2016 (r306279) @@ -156,7 +156,7 @@ g_shsec_remove_disk(struct g_consumer *c sc->sc_disks[no] = NULL; if (sc->sc_provider != NULL) { - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; G_SHSEC_DEBUG(0, "Device %s removed.", sc->sc_name); } Modified: head/sys/geom/stripe/g_stripe.c ============================================================================== --- head/sys/geom/stripe/g_stripe.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/stripe/g_stripe.c Fri Sep 23 21:29:40 2016 (r306279) @@ -171,10 +171,9 @@ g_stripe_remove_disk(struct g_consumer * } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_STRIPE_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: head/sys/geom/vinum/geom_vinum_rm.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_rm.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/vinum/geom_vinum_rm.c Fri Sep 23 21:29:40 2016 (r306279) @@ -223,8 +223,7 @@ gv_rm_vol(struct gv_softc *sc, struct gv /* Get rid of the volume's provider. */ if (pp != NULL) { g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_topology_unlock(); } } Modified: head/sys/geom/virstor/g_virstor.c ============================================================================== --- head/sys/geom/virstor/g_virstor.c Fri Sep 23 20:20:50 2016 (r306278) +++ head/sys/geom/virstor/g_virstor.c Fri Sep 23 21:29:40 2016 (r306279) @@ -900,11 +900,9 @@ remove_component(struct g_virstor_softc LOG_MSG(LVL_DEBUG, "Component %s removed from %s", c->provider->name, sc->geom->name); if (sc->provider != NULL) { - /* Whither, GEOM? */ - sc->provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->provider, ENXIO); + LOG_MSG(LVL_INFO, "Removing provider %s", sc->provider->name); + g_wither_provider(sc->provider, ENXIO); sc->provider = NULL; - LOG_MSG(LVL_INFO, "Removing provider %s", sc->geom->name); } if (c->acr > 0 || c->acw > 0 || c->ace > 0) From owner-svn-src-all@freebsd.org Fri Sep 23 22:17:59 2016 Return-Path: Delivered-To: svn-src-all@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 8D97EBE8111; Fri, 23 Sep 2016 22:17:59 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 6F7F293B; Fri, 23 Sep 2016 22:17:58 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from T530-Allan.ScaleEngine.net (unknown [109.111.229.194]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 5296C1E74; Fri, 23 Sep 2016 22:17:50 +0000 (UTC) Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, emaste@freebsd.org References: <201609031526.u83FQSCZ017350@repo.freebsd.org> From: Allan Jude Message-ID: <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> Date: Fri, 23 Sep 2016 18:17:48 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609031526.u83FQSCZ017350@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 22:17:59 -0000 On 09/03/16 11:26 AM, Warner Losh wrote: > Author: imp > Date: Sat Sep 3 15:26:28 2016 > New Revision: 305353 > URL: https://svnweb.freebsd.org/changeset/base/305353 > > Log: > Don't use -N to set the OMAGIC with data and text writeable and data > not page aligned. To do this, use the ld script gnu ld installs on my > system. > > This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different > things. The loader script could be better named and take into account > other architectures. And having two different mechanisms to do > basically the same thing needs study. However, it's blocking forward > progress on lld, so I'll work in parallel to sort these out. > > Differential Revision: https://reviews.freebsd.org/D7409 > Reviewed by: emaste > This breaks booting on my Lenovo laptop. The BTX client crashes and dumps the registers. Reverting this commit solved it. Is there something I can do to help investigate this? -- Allan Jude From owner-svn-src-all@freebsd.org Fri Sep 23 22:37:06 2016 Return-Path: Delivered-To: svn-src-all@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 E8F03BE86DA; Fri, 23 Sep 2016 22:37:06 +0000 (UTC) (envelope-from gjb@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 A064C23B; Fri, 23 Sep 2016 22:37:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NMb5ow056467; Fri, 23 Sep 2016 22:37:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NMb5OT056466; Fri, 23 Sep 2016 22:37:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609232237.u8NMb5OT056466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Sep 2016 22:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-release@freebsd.org Subject: svn commit: r306280 - release/11.0.0 X-SVN-Group: release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 22:37:07 -0000 Author: gjb Date: Fri Sep 23 22:37:05 2016 New Revision: 306280 URL: https://svnweb.freebsd.org/changeset/base/306280 Log: Tag releng/11.0@r306211 as release/11.0.0. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: release/11.0.0/ - copied from r306211, releng/11.0/ From owner-svn-src-all@freebsd.org Fri Sep 23 22:46:20 2016 Return-Path: Delivered-To: svn-src-all@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 C4A44BE89F8; Fri, 23 Sep 2016 22:46:20 +0000 (UTC) (envelope-from bdrewery@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 919EEA0A; Fri, 23 Sep 2016 22:46:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NMkJYQ060490; Fri, 23 Sep 2016 22:46:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NMkJIF060488; Fri, 23 Sep 2016 22:46:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201609232246.u8NMkJIF060488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Sep 2016 22:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306281 - in head: targets/pseudo/userland usr.bin/proccontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 22:46:20 -0000 Author: bdrewery Date: Fri Sep 23 22:46:19 2016 New Revision: 306281 URL: https://svnweb.freebsd.org/changeset/base/306281 Log: DIRDEPS_BUILD: Connect new directories. Sponsored by: Dell EMC Isilon Added: head/usr.bin/proccontrol/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Fri Sep 23 22:37:05 2016 (r306280) +++ head/targets/pseudo/userland/Makefile.depend Fri Sep 23 22:46:19 2016 (r306281) @@ -325,6 +325,7 @@ DIRDEPS+= \ usr.bin/pr \ usr.bin/printenv \ usr.bin/printf \ + usr.bin/proccontrol \ usr.bin/procstat \ usr.bin/protect \ usr.bin/quota \ Added: head/usr.bin/proccontrol/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/proccontrol/Makefile.depend Fri Sep 23 22:46:19 2016 (r306281) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-all@freebsd.org Fri Sep 23 23:08:25 2016 Return-Path: Delivered-To: svn-src-all@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 1DA17BE64F0; Fri, 23 Sep 2016 23:08:25 +0000 (UTC) (envelope-from mjg@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 CAD8717E2; Fri, 23 Sep 2016 23:08:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NN8O2L067833; Fri, 23 Sep 2016 23:08:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NN8OTR067832; Fri, 23 Sep 2016 23:08:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609232308.u8NN8OTR067832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 23 Sep 2016 23:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306282 - head/sys/compat/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 23:08:25 -0000 Author: mjg Date: Fri Sep 23 23:08:23 2016 New Revision: 306282 URL: https://svnweb.freebsd.org/changeset/base/306282 Log: cloudabi: use fget_cap instead of hand-rolling capability read This has a side effect of unbreaking the build after r306272. Discussed with: ed Modified: head/sys/compat/cloudabi/cloudabi_fd.c Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Fri Sep 23 22:46:19 2016 (r306281) +++ head/sys/compat/cloudabi/cloudabi_fd.c Fri Sep 23 23:08:23 2016 (r306282) @@ -456,32 +456,19 @@ cloudabi_sys_fd_stat_get(struct thread * struct cloudabi_sys_fd_stat_get_args *uap) { cloudabi_fdstat_t fsb = {}; - struct filedesc *fdp; struct file *fp; - seq_t seq; cap_rights_t rights; + struct filecaps fcaps; int error, oflags; - bool modified; /* Obtain file descriptor properties. */ - fdp = td->td_proc->p_fd; - do { - error = fget_unlocked(fdp, uap->fd, cap_rights_init(&rights), - &fp, &seq); - if (error != 0) - return (error); - if (fp->f_ops == &badfileops) { - fdrop(fp, td); - return (EBADF); - } - - rights = *cap_rights(fdp, uap->fd); - oflags = OFLAGS(fp->f_flag); - fsb.fs_filetype = cloudabi_convert_filetype(fp); - - modified = fd_modified(fdp, uap->fd, seq); - fdrop(fp, td); - } while (modified); + error = fget_cap(td, uap->fd, cap_rights_init(&rights), &fp, + &fcaps); + if (error != 0) + return (error); + oflags = OFLAGS(fp->f_flag); + fsb.fs_filetype = cloudabi_convert_filetype(fp); + fdrop(fp, td); /* Convert file descriptor flags. */ if (oflags & O_APPEND) @@ -492,8 +479,9 @@ cloudabi_sys_fd_stat_get(struct thread * fsb.fs_flags |= CLOUDABI_FDFLAG_SYNC; /* Convert capabilities to CloudABI rights. */ - convert_capabilities(&rights, fsb.fs_filetype, + convert_capabilities(&fcaps.fc_rights, fsb.fs_filetype, &fsb.fs_rights_base, &fsb.fs_rights_inheriting); + filecaps_free(&fcaps); return (copyout(&fsb, (void *)uap->buf, sizeof(fsb))); } From owner-svn-src-all@freebsd.org Fri Sep 23 23:09:10 2016 Return-Path: Delivered-To: svn-src-all@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 18E8FBE65BA; Fri, 23 Sep 2016 23:09:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 B1A091972; Fri, 23 Sep 2016 23:09:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id b184so4845244wma.3; Fri, 23 Sep 2016 16:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RD1XVFE9CJmYH8i5PCeLcYz1gh4TTQS9+0GXye3DHjo=; b=VE4PFPguYZaTiTLBAgSmgxFVNKaxzS3cw21X0p0LkXtOaPsl/wc9u4Z7FFVJUSC7sq 9XxH2LH+EModgPBtl3HXcw/UIo50gZ8t+leQxo6M29yASkcNd675ETTJ5BJV+gMaQaJo jTu4sTVAqdJ0cG2Mr97eixM4X5spQN4diAkNAPv0vlF9Ud56WgCI9v0pk40A27glxB4L RBJpr6uyB7/65GaPPH6CsuoN9fb0mCEdnJXOPttjZQNz739l/5WDMCVhzavn8mi6eF2N 7albz3Mi0jVZl0Zs8rlZna9HC9PYbzWuwt5bWkUfrAkQXgRQNOextsJtyR51m5HxNZo8 XGGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RD1XVFE9CJmYH8i5PCeLcYz1gh4TTQS9+0GXye3DHjo=; b=LSY59q5W+nF5Ddit9w2bbROm9ywUCmO4b3EM3epmAyrO4Y9aRy5zqNxQJJMEDYdwva 1nh2S7l85WzhJbPusfQqUiH6l1MF5N4kjJ47jG1SO2pDprtbGEnULXaeBWq0Hdx8b6lU k+w+p/uirBblSCAP+jgfsXT3dXQhutBi0AItaAVFr7C3/KWsv7nlFu+1aDou3QVApP6A kDKkDHE/oOHlL/MfGT+WrpW03mAecg69Mh/s5sz9tBtS0Eo+8UW2KA47FW37NUpyRzzp b93IwBGjG+7ZNvpLIgF1NGQ7bk26RzpHB9AwRJeUMJL5y/ULZFYKVhLeApUlDLlCBV5h FH2Q== X-Gm-Message-State: AE9vXwOTI2Mhz58VyJhp+YzwNoGJKSil/K2A+oeuvI40kORsudh7m8AOUmRiQg+356YtSQ== X-Received: by 10.194.81.106 with SMTP id z10mr8748488wjx.140.1474672147079; Fri, 23 Sep 2016 16:09:07 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id ya1sm9382843wjb.23.2016.09.23.16.09.06 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 23 Sep 2016 16:09:06 -0700 (PDT) Date: Sat, 24 Sep 2016 01:09:04 +0200 From: Mateusz Guzik To: Andreas Tobler Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306272 - head/sys/sys Message-ID: <20160923230904.GC25423@dft-labs.eu> References: <201609231647.u8NGlCYF045234@repo.freebsd.org> <20160923200308.GB25423@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 23:09:10 -0000 On Fri, Sep 23, 2016 at 10:38:05PM +0200, Andreas Tobler wrote: > On 23.09.16 22:03, Mateusz Guzik wrote: > >On Fri, Sep 23, 2016 at 09:59:32PM +0200, Andreas Tobler wrote: > >>On 23.09.16 18:47, Mateusz Guzik wrote: > >>>Author: mjg > >>>Date: Fri Sep 23 16:47:12 2016 > >>>New Revision: 306272 > >>>URL: https://svnweb.freebsd.org/changeset/base/306272 > >>> > >>>Log: > >>> fd: hide fd_modified under CAPABILITIES > >>> > >>> It has no use without it and is now less error prone. > >>> > >>>Modified: > >>> head/sys/sys/filedesc.h > >>> > >>>Modified: head/sys/sys/filedesc.h > >>>============================================================================== > >>>--- head/sys/sys/filedesc.h Fri Sep 23 16:22:03 2016 (r306271) > >>>+++ head/sys/sys/filedesc.h Fri Sep 23 16:47:12 2016 (r306272) > >>>@@ -229,12 +229,14 @@ fdeget_locked(struct filedesc *fdp, int > >>> return (fde); > >>>} > >>> > >>>+#ifdef CAPABILITIES > >>>static __inline bool > >>>fd_modified(struct filedesc *fdp, int fd, seq_t seq) > >>>{ > >>> > >>> return (!seq_consistent(fd_seq(fdp->fd_files, fd), seq)); > >>>} > >>>+#endif > >>> > >>>/* cdir/rdir/jdir manipulation functions. */ > >>>void pwd_chdir(struct thread *td, struct vnode *vp); > >> > >>I think this breaks kernel builds: > >> > >>/usr/src/sys/modules/cloudabi/../../compat/cloudabi/cloudabi_fd.c:482:14: > >>error: implicit declaration of function 'fd_modified' is invalid in > >>C99 [-Werror,-Wimplicit-function-declaration] > >> modified = fd_modified(fdp, uap->fd, seq); > >> ^ > >>1 error generated. > >>*** [cloudabi_fd.o] Error code 1 > >> > > > >Ye indeed, I hacked up a fix: > >https://people.freebsd.org/~mjg/patches/cloudabi-fd_modified.diff > > > >if ed@ does not respond soon acking the patch, I'll temporarily reviert > >this change. > > > > Thanks, I reverted locally to continue my work. So no hurry. > Fixed in r306282. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Sep 23 23:18:55 2016 Return-Path: Delivered-To: svn-src-all@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 DE349BE6A9F; Fri, 23 Sep 2016 23:18:55 +0000 (UTC) (envelope-from davidcs@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 BC2E51F0A; Fri, 23 Sep 2016 23:18:55 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NNItdA072049; Fri, 23 Sep 2016 23:18:55 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NNIsxj072044; Fri, 23 Sep 2016 23:18:54 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201609232318.u8NNIsxj072044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 23 Sep 2016 23:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306284 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 23:18:56 -0000 Author: davidcs Date: Fri Sep 23 23:18:54 2016 New Revision: 306284 URL: https://svnweb.freebsd.org/changeset/base/306284 Log: Fixes for issues under high workloads MFC after:5 days Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe.h head/sys/dev/bxe/bxe_stats.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Fri Sep 23 23:11:58 2016 (r306283) +++ head/sys/dev/bxe/bxe.c Fri Sep 23 23:18:54 2016 (r306284) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.81" +#define BXE_DRIVER_VERSION "1.78.89" #include "bxe.h" #include "ecore_sp.h" @@ -489,7 +489,16 @@ static const struct { { STATS_OFFSET32(mbuf_alloc_tpa), 4, STATS_FLAGS_FUNC, "mbuf_alloc_tpa"}, { STATS_OFFSET32(tx_queue_full_return), - 4, STATS_FLAGS_FUNC, "tx_queue_full_return"} + 4, STATS_FLAGS_FUNC, "tx_queue_full_return"}, + { STATS_OFFSET32(bxe_tx_mq_start_lock_failures), + 4, STATS_FLAGS_FUNC, "bxe_tx_mq_start_lock_failures"}, + { STATS_OFFSET32(tx_request_link_down_failures), + 4, STATS_FLAGS_FUNC, "tx_request_link_down_failures"}, + { STATS_OFFSET32(bd_avail_too_less_failures), + 4, STATS_FLAGS_FUNC, "bd_avail_too_less_failures"}, + { STATS_OFFSET32(tx_mq_not_empty), + 4, STATS_FLAGS_FUNC, "tx_mq_not_empty"} + }; static const struct { @@ -602,7 +611,15 @@ static const struct { { Q_STATS_OFFSET32(mbuf_alloc_tpa), 4, "mbuf_alloc_tpa"}, { Q_STATS_OFFSET32(tx_queue_full_return), - 4, "tx_queue_full_return"} + 4, "tx_queue_full_return"}, + { Q_STATS_OFFSET32(bxe_tx_mq_start_lock_failures), + 4, "bxe_tx_mq_start_lock_failures"}, + { Q_STATS_OFFSET32(tx_request_link_down_failures), + 4, "tx_request_link_down_failures"}, + { Q_STATS_OFFSET32(bd_avail_too_less_failures), + 4, "bd_avail_too_less_failures"}, + { Q_STATS_OFFSET32(tx_mq_not_empty), + 4, "tx_mq_not_empty"} }; #define BXE_NUM_ETH_STATS ARRAY_SIZE(bxe_eth_stats_arr) @@ -5621,11 +5638,18 @@ bxe_tx_mq_start_locked(struct bxe_softc return (EINVAL); } + if (m != NULL) { + rc = drbr_enqueue(ifp, tx_br, m); + if (rc != 0) { + fp->eth_q_stats.tx_soft_errors++; + goto bxe_tx_mq_start_locked_exit; + } + } + if (!sc->link_vars.link_up || (if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) { - if (m != NULL) - rc = drbr_enqueue(ifp, tx_br, m); + fp->eth_q_stats.tx_request_link_down_failures++; goto bxe_tx_mq_start_locked_exit; } @@ -5635,24 +5659,22 @@ bxe_tx_mq_start_locked(struct bxe_softc fp->eth_q_stats.tx_max_drbr_queue_depth = depth; } - if (m == NULL) { - /* no new work, check for pending frames */ - next = drbr_dequeue_drv(ifp, tx_br); - } else if (drbr_needs_enqueue_drv(ifp, tx_br)) { - /* have both new and pending work, maintain packet order */ - rc = drbr_enqueue(ifp, tx_br, m); - if (rc != 0) { - fp->eth_q_stats.tx_soft_errors++; - goto bxe_tx_mq_start_locked_exit; - } - next = drbr_dequeue_drv(ifp, tx_br); - } else { - /* new work only and nothing pending */ - next = m; - } - /* keep adding entries while there are frames to send */ - while (next != NULL) { + while ((next = drbr_peek(ifp, tx_br)) != NULL) { + /* handle any completions if we're running low */ + tx_bd_avail = bxe_tx_avail(sc, fp); + if (tx_bd_avail < BXE_TX_CLEANUP_THRESHOLD) { + /* bxe_txeof will set IFF_DRV_OACTIVE appropriately */ + bxe_txeof(sc, fp); + tx_bd_avail = bxe_tx_avail(sc, fp); + if (tx_bd_avail < (BXE_TSO_MAX_SEGMENTS + 1)) { + fp->eth_q_stats.bd_avail_too_less_failures++; + m_freem(next); + drbr_advance(ifp, tx_br); + rc = ENOBUFS; + break; + } + } /* the mbuf now belongs to us */ fp->eth_q_stats.mbuf_alloc_tx++; @@ -5667,12 +5689,12 @@ bxe_tx_mq_start_locked(struct bxe_softc fp->eth_q_stats.tx_encap_failures++; if (next != NULL) { /* mark the TX queue as full and save the frame */ - if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); - /* XXX this may reorder the frame */ - rc = drbr_enqueue(ifp, tx_br, next); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + drbr_putback(ifp, tx_br, next); fp->eth_q_stats.mbuf_alloc_tx--; fp->eth_q_stats.tx_frames_deferred++; - } + } else + drbr_advance(ifp, tx_br); /* stop looking for more work */ break; @@ -5682,20 +5704,9 @@ bxe_tx_mq_start_locked(struct bxe_softc tx_count++; /* send a copy of the frame to any BPF listeners */ - if_etherbpfmtap(ifp, next); - - tx_bd_avail = bxe_tx_avail(sc, fp); + BPF_MTAP(ifp, next); - /* handle any completions if we're running low */ - if (tx_bd_avail < BXE_TX_CLEANUP_THRESHOLD) { - /* bxe_txeof will set IFF_DRV_OACTIVE appropriately */ - bxe_txeof(sc, fp); - if (if_getdrvflags(ifp) & IFF_DRV_OACTIVE) { - break; - } - } - - next = drbr_dequeue_drv(ifp, tx_br); + drbr_advance(ifp, tx_br); } /* all TX packets were dequeued and/or the tx ring is full */ @@ -5705,10 +5716,32 @@ bxe_tx_mq_start_locked(struct bxe_softc } bxe_tx_mq_start_locked_exit: + /* If we didn't drain the drbr, enqueue a task in the future to do it. */ + if (!drbr_empty(ifp, tx_br)) { + fp->eth_q_stats.tx_mq_not_empty++; + taskqueue_enqueue_timeout(fp->tq, &fp->tx_timeout_task, 1); + } return (rc); } +static void +bxe_tx_mq_start_deferred(void *arg, + int pending) +{ + struct bxe_fastpath *fp = (struct bxe_fastpath *)arg; + struct bxe_softc *sc = fp->sc; +#if __FreeBSD_version >= 800000 + if_t ifp = sc->ifp; +#else + struct ifnet *ifp = sc->ifnet; +#endif /* #if __FreeBSD_version >= 800000 */ + + BXE_FP_TX_LOCK(fp); + bxe_tx_mq_start_locked(sc, ifp, fp, NULL); + BXE_FP_TX_UNLOCK(fp); +} + /* Multiqueue (TSS) dispatch routine. */ static int bxe_tx_mq_start(struct ifnet *ifp, @@ -5730,8 +5763,10 @@ bxe_tx_mq_start(struct ifnet *ifp, if (BXE_FP_TX_TRYLOCK(fp)) { rc = bxe_tx_mq_start_locked(sc, ifp, fp, m); BXE_FP_TX_UNLOCK(fp); - } else + } else { rc = drbr_enqueue(ifp, fp->tx_br, m); + taskqueue_enqueue(fp->tq, &fp->tx_task); + } return (rc); } @@ -6953,6 +6988,8 @@ bxe_link_attn(struct bxe_softc *sc) uint32_t pause_enabled = 0; struct host_port_stats *pstats; int cmng_fns; + struct bxe_fastpath *fp; + int i; /* Make sure that we are synced with the current statistics */ bxe_stats_handle(sc, STATS_EVENT_STOP); @@ -6984,6 +7021,12 @@ bxe_link_attn(struct bxe_softc *sc) if (sc->state == BXE_STATE_OPEN) { bxe_stats_handle(sc, STATS_EVENT_LINK_UP); } + + /* Restart tx when the link comes back. */ + FOR_EACH_ETH_QUEUE(sc, i) { + fp = &sc->fp[i]; + taskqueue_enqueue(fp->tq, &fp->tx_task); + } } if (sc->link_vars.link_up && sc->link_vars.line_speed) { @@ -8593,11 +8636,6 @@ bxe_handle_fp_tq(void *context, * we need to add a "process/continue" flag here that the driver * can use to tell the task here not to do anything. */ -#if 0 - if (!(if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING)) { - return; - } -#endif /* update the fastpath index */ bxe_update_fp_sb_idx(fp); @@ -9035,6 +9073,10 @@ bxe_interrupt_detach(struct bxe_softc *s fp = &sc->fp[i]; if (fp->tq) { taskqueue_drain(fp->tq, &fp->tq_task); + taskqueue_drain(fp->tq, &fp->tx_task); + while (taskqueue_cancel_timeout(fp->tq, &fp->tx_timeout_task, + NULL)) + taskqueue_drain_timeout(fp->tq, &fp->tx_timeout_task); taskqueue_free(fp->tq); fp->tq = NULL; } @@ -9079,9 +9121,12 @@ bxe_interrupt_attach(struct bxe_softc *s snprintf(fp->tq_name, sizeof(fp->tq_name), "bxe%d_fp%d_tq", sc->unit, i); TASK_INIT(&fp->tq_task, 0, bxe_handle_fp_tq, fp); + TASK_INIT(&fp->tx_task, 0, bxe_tx_mq_start_deferred, fp); fp->tq = taskqueue_create_fast(fp->tq_name, M_NOWAIT, taskqueue_thread_enqueue, &fp->tq); + TIMEOUT_TASK_INIT(fp->tq, &fp->tx_timeout_task, 0, + bxe_tx_mq_start_deferred, fp); taskqueue_start_threads(&fp->tq, 1, PI_NET, /* higher priority */ "%s", fp->tq_name); } @@ -12114,9 +12159,12 @@ static void bxe_periodic_callout_func(void *xsc) { struct bxe_softc *sc = (struct bxe_softc *)xsc; + int i; + +#if __FreeBSD_version < 800000 struct bxe_fastpath *fp; uint16_t tx_bd_avail; - int i; +#endif if (!BXE_CORE_TRYLOCK(sc)) { /* just bail and try again next time */ @@ -12138,28 +12186,7 @@ bxe_periodic_callout_func(void *xsc) return; } -#if __FreeBSD_version >= 800000 - - FOR_EACH_QUEUE(sc, i) { - fp = &sc->fp[i]; - - if (BXE_FP_TX_TRYLOCK(fp)) { - if_t ifp = sc->ifp; - /* - * If interface was stopped due to unavailable - * bds, try to process some tx completions - */ - (void) bxe_txeof(sc, fp); - - tx_bd_avail = bxe_tx_avail(sc, fp); - if (tx_bd_avail >= BXE_TX_CLEANUP_THRESHOLD) { - bxe_tx_mq_start_locked(sc, ifp, fp, NULL); - } - BXE_FP_TX_UNLOCK(fp); - } - } - -#else +#if __FreeBSD_version < 800000 fp = &sc->fp[0]; if (BXE_FP_TX_TRYLOCK(fp)) { @@ -12177,7 +12204,7 @@ bxe_periodic_callout_func(void *xsc) BXE_FP_TX_UNLOCK(fp); } - + #endif /* #if __FreeBSD_version >= 800000 */ /* Check for TX timeouts on any fastpath. */ Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Fri Sep 23 23:11:58 2016 (r306283) +++ head/sys/dev/bxe/bxe.h Fri Sep 23 23:18:54 2016 (r306284) @@ -644,6 +644,9 @@ struct bxe_fastpath { struct taskqueue *tq; char tq_name[32]; + struct task tx_task; + struct timeout_task tx_timeout_task; + /* ethernet client ID (each fastpath set of RX/TX/CQE is a client) */ uint8_t cl_id; #define FP_CL_ID(fp) (fp->cl_id) @@ -2300,7 +2303,7 @@ void bxe_dump_mbuf_data(struct bxe_softc extern int bxe_grc_dump(struct bxe_softc *sc); #if __FreeBSD_version >= 800000 -#if __FreeBSD_version >= 1000000 +#if (__FreeBSD_version >= 1001513 && __FreeBSD_version < 1100000) || __FreeBSD_version >= 1100048 #define BXE_SET_FLOWID(m) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE) #define BXE_VALID_FLOWID(m) (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) #else Modified: head/sys/dev/bxe/bxe_stats.h ============================================================================== --- head/sys/dev/bxe/bxe_stats.h Fri Sep 23 23:11:58 2016 (r306283) +++ head/sys/dev/bxe/bxe_stats.h Fri Sep 23 23:18:54 2016 (r306284) @@ -266,6 +266,12 @@ struct bxe_eth_stats { /* num. of times tx queue full occurred */ uint32_t tx_queue_full_return; + + /* debug stats */ + uint32_t bxe_tx_mq_start_lock_failures; + uint32_t tx_request_link_down_failures; + uint32_t bd_avail_too_less_failures; + uint32_t tx_mq_not_empty; }; @@ -372,6 +378,12 @@ struct bxe_eth_q_stats { /* num. of times tx queue full occurred */ uint32_t tx_queue_full_return; + + /* debug stats */ + uint32_t bxe_tx_mq_start_lock_failures; + uint32_t tx_request_link_down_failures; + uint32_t bd_avail_too_less_failures; + uint32_t tx_mq_not_empty; }; struct bxe_eth_stats_old { From owner-svn-src-all@freebsd.org Sat Sep 24 00:31:41 2016 Return-Path: Delivered-To: svn-src-all@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 59D6CBE59B9; Sat, 24 Sep 2016 00:31:41 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC8C764; Sat, 24 Sep 2016 00:31:37 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 0B2071778D; Fri, 23 Sep 2016 17:31:37 -0700 (PDT) Date: Fri, 23 Sep 2016 17:31:36 -0700 From: hiren panchasara To: David C Somayajulu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306284 - head/sys/dev/bxe Message-ID: <20160924003136.GB96580@strugglingcoder.info> References: <201609232318.u8NNIsxj072044@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wzJLGUyc3ArbnUjN" Content-Disposition: inline In-Reply-To: <201609232318.u8NNIsxj072044@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 00:31:41 -0000 --wzJLGUyc3ArbnUjN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 09/23/16 at 11:18P, David C Somayajulu wrote: > Author: davidcs > Date: Fri Sep 23 23:18:54 2016 > New Revision: 306284 > URL: https://svnweb.freebsd.org/changeset/base/306284 >=20 > Log: > Fixes for issues under high workloads David, It is really useful to have details about said issues in the commit-log. Can you share them here, if possible? I'd suggest you add that to your MFC commit(s). > =20 > MFC after:5 days >=20 > Modified: > head/sys/dev/bxe/bxe.c > head/sys/dev/bxe/bxe.h > head/sys/dev/bxe/bxe_stats.h Cheers, Hiren --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJX5clmXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lJ0gIAKBIX3l+J9JyOvE0OCmrAHeQ YfRl3iwfu0iyfbbczPI/26l1JwnsoFWuaERgjfDLfyY8TpIUkUZstduPfcPBQq14 XnS0bWairUVNGIjato6vB4IGZ5NGIRBuVUNxXFxi2rUOn1vBdVpdJGFebAxk1aAP y6c/9VS+96CwnlAXLrqJmiMWiNS0qvE8hWoSHW93onekVj6aSiaNtDnauGFlbaT/ yWUQJGxTKPb7cGf+N9QLPYGQmaxtoj7kPHZzqFsldeW2GuSvC9feU5xPLXQtDP8T yLQcAsIYJx4qwLV3R72bVnO2fWRw/R5lm0fTQD6/1gelKNdvKTsfbBBXlkZ3LEU= =daXN -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN-- From owner-svn-src-all@freebsd.org Sat Sep 24 01:14:26 2016 Return-Path: Delivered-To: svn-src-all@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 AEF60BE6808; Sat, 24 Sep 2016 01:14:26 +0000 (UTC) (envelope-from markj@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 8CDA4C6E; Sat, 24 Sep 2016 01:14:26 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8O1EP3T016524; Sat, 24 Sep 2016 01:14:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O1EPq6016519; Sat, 24 Sep 2016 01:14:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609240114.u8O1EPq6016519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 24 Sep 2016 01:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306285 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 01:14:26 -0000 Author: markj Date: Sat Sep 24 01:14:25 2016 New Revision: 306285 URL: https://svnweb.freebsd.org/changeset/base/306285 Log: Rename ndpr_refcnt to ndpr_addrcnt. This field counts derived addresses and is not a true refcount for prefix objects, so the previous name was misleading. MFC after: 1 week Modified: head/sys/netinet6/in6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Sep 23 23:18:54 2016 (r306284) +++ head/sys/netinet6/in6.c Sat Sep 24 01:14:25 2016 (r306285) @@ -630,7 +630,7 @@ in6_control(struct socket *so, u_long cm /* relate the address to the prefix */ if (ia->ia6_ndpr == NULL) { ia->ia6_ndpr = pr; - pr->ndpr_refcnt++; + pr->ndpr_addrcnt++; /* * If this is the first autoconf address from the @@ -638,7 +638,7 @@ in6_control(struct socket *so, u_long cm * (when required). */ if ((ia->ia6_flags & IN6_IFF_AUTOCONF) && - V_ip6_use_tempaddr && pr->ndpr_refcnt == 1) { + V_ip6_use_tempaddr && pr->ndpr_addrcnt == 1) { int e; if ((e = in6_tmpifadd(ia, 1, 0)) != 0) { log(LOG_NOTICE, "in6_control: failed " @@ -690,11 +690,11 @@ aifaddr_out: * and the prefix management. We do this, however, to provide * as much backward compatibility as possible in terms of * the ioctl operation. - * Note that in6_purgeaddr() will decrement ndpr_refcnt. + * Note that in6_purgeaddr() will decrement ndpr_addrcnt. */ pr = ia->ia6_ndpr; in6_purgeaddr(&ia->ia_ifa); - if (pr && pr->ndpr_refcnt == 0) + if (pr && pr->ndpr_addrcnt == 0) prelist_remove(pr); EVENTHANDLER_INVOKE(ifaddr_event, ifp); break; @@ -1305,9 +1305,9 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st "in6_unlink_ifa: autoconf'ed address " "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } else { - ia->ia6_ndpr->ndpr_refcnt--; + ia->ia6_ndpr->ndpr_addrcnt--; /* Do not delete lles within prefix if refcont != 0 */ - if (ia->ia6_ndpr->ndpr_refcnt == 0) + if (ia->ia6_ndpr->ndpr_addrcnt == 0) remove_lle = 1; ia->ia6_ndpr = NULL; } Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Sep 23 23:18:54 2016 (r306284) +++ head/sys/netinet6/nd6.c Sat Sep 24 01:14:25 2016 (r306285) @@ -1159,7 +1159,7 @@ nd6_purge(struct ifnet *ifp) * still be above zero. We therefore reset it to * make sure that the prefix really gets purged. */ - pr->ndpr_refcnt = 0; + pr->ndpr_addrcnt = 0; prelist_remove(pr); } @@ -2674,7 +2674,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) else p.expire = maxexpire; } - p.refcnt = pr->ndpr_refcnt; + p.refcnt = pr->ndpr_addrcnt; p.flags = pr->ndpr_stateflags; p.advrtrs = 0; LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Fri Sep 23 23:18:54 2016 (r306284) +++ head/sys/netinet6/nd6.h Sat Sep 24 01:14:25 2016 (r306285) @@ -275,7 +275,7 @@ struct nd_prefix { /* list of routers that advertise the prefix: */ LIST_HEAD(pr_rtrhead, nd_pfxrouter) ndpr_advrtrs; u_char ndpr_plen; - int ndpr_refcnt; /* reference couter from addresses */ + int ndpr_addrcnt; /* count of derived addresses */ }; #define ndpr_raf ndpr_flags Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Sep 23 23:18:54 2016 (r306284) +++ head/sys/netinet6/nd6_rtr.c Sat Sep 24 01:14:25 2016 (r306285) @@ -1053,7 +1053,7 @@ prelist_remove(struct nd_prefix *pr) /* what should we do? */ } - if (pr->ndpr_refcnt > 0) + if (pr->ndpr_addrcnt > 0) return; /* notice here? */ /* unlink ndpr_entry from nd_prefix list */ @@ -1356,7 +1356,7 @@ prelist_update(struct nd_prefixctl *new, /* * note that we should use pr (not new) for reference. */ - pr->ndpr_refcnt++; + pr->ndpr_addrcnt++; ia6->ia6_ndpr = pr; /* @@ -2114,7 +2114,7 @@ in6_tmpifadd(const struct in6_ifaddr *ia return (EINVAL); /* XXX */ } newia->ia6_ndpr = ia0->ia6_ndpr; - newia->ia6_ndpr->ndpr_refcnt++; + newia->ia6_ndpr->ndpr_addrcnt++; ifa_free(&newia->ia_ifa); /* From owner-svn-src-all@freebsd.org Sat Sep 24 01:21:43 2016 Return-Path: Delivered-To: svn-src-all@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 379F7BE6A62; Sat, 24 Sep 2016 01:21:43 +0000 (UTC) (envelope-from adrian@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 EFC211A0; Sat, 24 Sep 2016 01:21:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8O1LgHk019611; Sat, 24 Sep 2016 01:21:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O1Lgr1019610; Sat, 24 Sep 2016 01:21:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609240121.u8O1Lgr1019610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 24 Sep 2016 01:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306286 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 01:21:43 -0000 Author: adrian Date: Sat Sep 24 01:21:42 2016 New Revision: 306286 URL: https://svnweb.freebsd.org/changeset/base/306286 Log: [iwm] fix default antenna selection a bit; fix 5GHz rate control handling. * Don't do the antenna switching when setting up the rate table - we don't take into account whether it's an active antenna or not (eg shared with BT.) I'll look into this a bit more later. * The default antenna is still 1, I'll look into that a bit more later. (So no, this doesn't fix it for Larry who needs ANT_B to be active, not ANT_A.) * My changes to the rate control setup used the wrong method for finding a suitable rate, which led to 1M CCK frames being queued for 11a operation. This is .. sub-optimal. Change the rate control lookup path to use the global table instead of the per-node table, which won't be setup until the node rate table is setup (which happens way too late in this game.) Tested: * Intel 7260, 2G and 5G operation. Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Sat Sep 24 01:14:25 2016 (r306285) +++ head/sys/dev/iwm/if_iwm.c Sat Sep 24 01:21:42 2016 (r306286) @@ -2672,6 +2672,15 @@ iwm_run_init_mvm_ucode(struct iwm_softc if (error != 0) return error; + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "%s: phy_txant=0x%08x, nvm_valid_tx_ant=0x%02x, valid=0x%02x\n", + __func__, + ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) + >> IWM_FW_PHY_CFG_TX_CHAIN_POS), + sc->sc_nvm.valid_tx_ant, + iwm_fw_valid_tx_ant(sc)); + + /* Send TX valid antennas before triggering calibrations */ if ((error = iwm_send_tx_ant_cfg(sc, iwm_fw_valid_tx_ant(sc))) != 0) { device_printf(sc->sc_dev, @@ -3187,11 +3196,34 @@ iwm_tx_rateidx_lookup(struct iwm_softc * if (rate == r) return (i); } + + IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TXRATE, + "%s: couldn't find an entry for rate=%d\n", + __func__, + rate); + /* XXX Return the first */ /* XXX TODO: have it return the /lowest/ */ return (0); } +static int +iwm_tx_rateidx_global_lookup(struct iwm_softc *sc, uint8_t rate) +{ + int i; + + for (i = 0; i < nitems(iwm_rates); i++) { + if (iwm_rates[i].rate == rate) + return (i); + } + /* XXX error? */ + IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TXRATE, + "%s: couldn't find an entry for rate=%d\n", + __func__, + rate); + return (0); +} + /* * Fill in the rate related information for a transmit command. */ @@ -3204,7 +3236,7 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st const struct ieee80211_txparam *tp = ni->ni_txparms; const struct iwm_rate *rinfo; int type; - int ridx, rate_flags, i; + int ridx, rate_flags; wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; @@ -3213,19 +3245,26 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st tx->data_retry_limit = IWM_DEFAULT_TX_RETRY; if (type == IEEE80211_FC0_TYPE_MGT) { - i = iwm_tx_rateidx_lookup(sc, in, tp->mgmtrate); - ridx = in->in_ridx[i]; + ridx = iwm_tx_rateidx_global_lookup(sc, tp->mgmtrate); + IWM_DPRINTF(sc, IWM_DEBUG_TXRATE, + "%s: MGT (%d)\n", __func__, tp->mgmtrate); } else if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { - i = iwm_tx_rateidx_lookup(sc, in, tp->mcastrate); - ridx = in->in_ridx[i]; + ridx = iwm_tx_rateidx_global_lookup(sc, tp->mcastrate); + IWM_DPRINTF(sc, IWM_DEBUG_TXRATE, + "%s: MCAST (%d)\n", __func__, tp->mcastrate); } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { - i = iwm_tx_rateidx_lookup(sc, in, tp->ucastrate); - ridx = in->in_ridx[i]; + ridx = iwm_tx_rateidx_global_lookup(sc, tp->ucastrate); + IWM_DPRINTF(sc, IWM_DEBUG_TXRATE, + "%s: FIXED_RATE (%d)\n", __func__, tp->ucastrate); } else if (m->m_flags & M_EAPOL) { - i = iwm_tx_rateidx_lookup(sc, in, tp->mgmtrate); - ridx = in->in_ridx[i]; - } else { + ridx = iwm_tx_rateidx_global_lookup(sc, tp->mgmtrate); + IWM_DPRINTF(sc, IWM_DEBUG_TXRATE, + "%s: EAPOL\n", __func__); + } else if (type == IEEE80211_FC0_TYPE_DATA) { + int i; + /* for data frames, use RS table */ + IWM_DPRINTF(sc, IWM_DEBUG_TXRATE, "%s: DATA\n", __func__); /* XXX pass pktlen */ (void) ieee80211_ratectl_rate(ni, NULL, 0); i = iwm_tx_rateidx_lookup(sc, in, ni->ni_txrate); @@ -3234,11 +3273,20 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st /* This is the index into the programmed table */ tx->initial_rate_index = i; tx->tx_flags |= htole32(IWM_TX_CMD_FLG_STA_RATE); + IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TXRATE, "%s: start with i=%d, txrate %d\n", __func__, i, iwm_rates[ridx].rate); + } else { + ridx = iwm_tx_rateidx_global_lookup(sc, tp->mgmtrate); + IWM_DPRINTF(sc, IWM_DEBUG_TXRATE, "%s: DEFAULT (%d)\n", + __func__, tp->mgmtrate); } + IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TXRATE, + "%s: frame type=%d txrate %d\n", + __func__, type, iwm_rates[ridx].rate); + rinfo = &iwm_rates[ridx]; IWM_DPRINTF(sc, IWM_DEBUG_TXRATE, "%s: ridx=%d; rate=%d, CCK=%d\n", @@ -3970,7 +4018,7 @@ iwm_setrates(struct iwm_softc *sc, struc struct iwm_lq_cmd *lq = &in->in_lq; int nrates = ni->ni_rates.rs_nrates; int i, ridx, tab = 0; - int txant = 0; +// int txant = 0; if (nrates > nitems(lq->rs_table)) { device_printf(sc->sc_dev, @@ -4052,11 +4100,14 @@ iwm_setrates(struct iwm_softc *sc, struc for (i = 0; i < nrates; i++) { int nextant; +#if 0 if (txant == 0) txant = iwm_fw_valid_tx_ant(sc); nextant = 1<<(ffs(txant)-1); txant &= ~nextant; - +#else + nextant = iwm_fw_valid_tx_ant(sc); +#endif /* * Map the rate id into a rate index into * our hardware table containing the From owner-svn-src-all@freebsd.org Sat Sep 24 04:08:18 2016 Return-Path: Delivered-To: svn-src-all@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 CD7A1BDCBE1; Sat, 24 Sep 2016 04:08:18 +0000 (UTC) (envelope-from landonf@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 69A78B00; Sat, 24 Sep 2016 04:08:18 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8O48HmR081313; Sat, 24 Sep 2016 04:08:17 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O48HGn081306; Sat, 24 Sep 2016 04:08:17 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201609240408.u8O48HGn081306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Sat, 24 Sep 2016 04:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306287 - in head/sys: dev/bhnd dev/bhnd/bcma dev/bhnd/cores/pmu dev/bhnd/cores/usb dev/bhnd/siba modules/bhnd/bcma modules/bhnd/siba X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 04:08:18 -0000 Author: landonf Date: Sat Sep 24 04:08:16 2016 New Revision: 306287 URL: https://svnweb.freebsd.org/changeset/base/306287 Log: bhnd(4): Implement common API for IOST/IOCTL register access and core reset - Added bhnd(4) bus APIs for per-core ioctl/iost register access. - Updated reset/suspend bhnd(4) APIs for compatibility with ioctl/iost changes. - Implemented core reset/suspend support for both bcma(4) and siba(4). - Implemented explicit release of all outstanding PMU requests at the bus level when putting a core into reset. Approved by: adrian (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D8009 Deleted: head/sys/dev/bhnd/bhnd_core.h Modified: head/sys/dev/bhnd/bcma/bcma.c head/sys/dev/bhnd/bcma/bcma_dmp.h head/sys/dev/bhnd/bcma/bcma_subr.c head/sys/dev/bhnd/bcma/bcmavar.h head/sys/dev/bhnd/bhnd.c head/sys/dev/bhnd/bhnd.h head/sys/dev/bhnd/bhnd_bus_if.m head/sys/dev/bhnd/bhndvar.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu.c head/sys/dev/bhnd/cores/pmu/bhnd_pmu.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu_private.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c head/sys/dev/bhnd/cores/usb/bhnd_usb.c head/sys/dev/bhnd/siba/siba.c head/sys/dev/bhnd/siba/siba_subr.c head/sys/dev/bhnd/siba/sibareg.h head/sys/dev/bhnd/siba/sibavar.h head/sys/modules/bhnd/bcma/Makefile head/sys/modules/bhnd/siba/Makefile Modified: head/sys/dev/bhnd/bcma/bcma.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma.c Sat Sep 24 01:21:42 2016 (r306286) +++ head/sys/dev/bhnd/bcma/bcma.c Sat Sep 24 04:08:16 2016 (r306287) @@ -39,14 +39,14 @@ __FBSDID("$FreeBSD$"); #include -#include "bcmavar.h" +#include #include "bcma_dmp.h" #include "bcma_eromreg.h" #include "bcma_eromvar.h" -#include +#include "bcmavar.h" /* RID used when allocating EROM table */ #define BCMA_EROM_RID 0 @@ -91,6 +91,44 @@ bcma_detach(device_t dev) return (bhnd_generic_detach(dev)); } +static device_t +bcma_add_child(device_t dev, u_int order, const char *name, int unit) +{ + struct bcma_devinfo *dinfo; + device_t child; + + child = device_add_child_ordered(dev, order, name, unit); + if (child == NULL) + return (NULL); + + if ((dinfo = bcma_alloc_dinfo(dev)) == NULL) { + device_delete_child(dev, child); + return (NULL); + } + + device_set_ivars(child, dinfo); + + return (child); +} + +static void +bcma_child_deleted(device_t dev, device_t child) +{ + struct bhnd_softc *sc; + struct bcma_devinfo *dinfo; + + sc = device_get_softc(dev); + + /* Call required bhnd(4) implementation */ + bhnd_generic_child_deleted(dev, child); + + /* Free bcma device info */ + if ((dinfo = device_get_ivars(child)) != NULL) + bcma_free_dinfo(dev, dinfo); + + device_set_ivars(child, NULL); +} + static int bcma_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) { @@ -125,6 +163,9 @@ bcma_read_ivar(device_t dev, device_t ch case BHND_IVAR_CORE_UNIT: *result = ci->unit; return (0); + case BHND_IVAR_PMU_INFO: + *result = (uintptr_t) dinfo->pmu_info; + return (0); default: return (ENOENT); } @@ -133,6 +174,10 @@ bcma_read_ivar(device_t dev, device_t ch static int bcma_write_ivar(device_t dev, device_t child, int index, uintptr_t value) { + struct bcma_devinfo *dinfo; + + dinfo = device_get_ivars(child); + switch (index) { case BHND_IVAR_VENDOR: case BHND_IVAR_DEVICE: @@ -143,6 +188,9 @@ bcma_write_ivar(device_t dev, device_t c case BHND_IVAR_CORE_INDEX: case BHND_IVAR_CORE_UNIT: return (EINVAL); + case BHND_IVAR_PMU_INFO: + dinfo->pmu_info = (struct bhnd_core_pmu_info *) value; + return (0); default: return (ENOENT); } @@ -156,136 +204,262 @@ bcma_get_resource_list(device_t dev, dev } static int -bcma_reset_core(device_t dev, device_t child, uint16_t flags) +bcma_read_iost(device_t dev, device_t child, uint16_t *iost) { - struct bcma_devinfo *dinfo; + uint32_t value; + int error; + + if ((error = bhnd_read_config(child, BCMA_DMP_IOSTATUS, &value, 4))) + return (error); + + /* Return only the bottom 16 bits */ + *iost = (value & BCMA_DMP_IOST_MASK); + return (0); +} + +static int +bcma_read_ioctl(device_t dev, device_t child, uint16_t *ioctl) +{ + uint32_t value; + int error; + + if ((error = bhnd_read_config(child, BCMA_DMP_IOCTRL, &value, 4))) + return (error); + + /* Return only the bottom 16 bits */ + *ioctl = (value & BCMA_DMP_IOCTRL_MASK); + return (0); +} + +static int +bcma_write_ioctl(device_t dev, device_t child, uint16_t value, uint16_t mask) +{ + struct bcma_devinfo *dinfo; + struct bhnd_resource *r; + uint32_t ioctl; if (device_get_parent(child) != dev) - BHND_BUS_RESET_CORE(device_get_parent(dev), child, flags); + return (EINVAL); dinfo = device_get_ivars(child); - - /* Can't reset the core without access to the agent registers */ - if (dinfo->res_agent == NULL) + if ((r = dinfo->res_agent) == NULL) return (ENODEV); - /* Start reset */ - bhnd_bus_write_4(dinfo->res_agent, BHND_RESET_CF, BHND_RESET_CF_ENABLE); - bhnd_bus_read_4(dinfo->res_agent, BHND_RESET_CF); - DELAY(10); + /* Write new value */ + ioctl = bhnd_bus_read_4(r, BCMA_DMP_IOCTRL); + ioctl &= ~(BCMA_DMP_IOCTRL_MASK & mask); + ioctl |= (value & mask); - /* Disable clock */ - bhnd_bus_write_4(dinfo->res_agent, BHND_CF, flags); - bhnd_bus_read_4(dinfo->res_agent, BHND_CF); - DELAY(10); + bhnd_bus_write_4(r, BCMA_DMP_IOCTRL, ioctl); - /* Enable clocks & force clock gating */ - bhnd_bus_write_4(dinfo->res_agent, BHND_CF, BHND_CF_CLOCK_EN | - BHND_CF_FGC | flags); - bhnd_bus_read_4(dinfo->res_agent, BHND_CF); + /* Perform read-back and wait for completion */ + bhnd_bus_read_4(r, BCMA_DMP_IOCTRL); DELAY(10); - /* Complete reset */ - bhnd_bus_write_4(dinfo->res_agent, BHND_RESET_CF, 0); - bhnd_bus_read_4(dinfo->res_agent, BHND_RESET_CF); - DELAY(10); + return (0); +} - /* Release force clock gating */ - bhnd_bus_write_4(dinfo->res_agent, BHND_CF, BHND_CF_CLOCK_EN | flags); - bhnd_bus_read_4(dinfo->res_agent, BHND_CF); - DELAY(10); +static bool +bcma_is_hw_suspended(device_t dev, device_t child) +{ + uint32_t rst; + uint16_t ioctl; + int error; + + /* Is core held in RESET? */ + error = bhnd_read_config(child, BCMA_DMP_RESETCTRL, &rst, 4); + if (error) { + device_printf(child, "error reading HW reset state: %d\n", + error); + return (true); + } + + if (rst & BMCA_DMP_RC_RESET) + return (true); + + /* Is core clocked? */ + error = bhnd_read_ioctl(child, &ioctl); + if (error) { + device_printf(child, "error reading HW ioctl register: %d\n", + error); + return (true); + } + + if (!(ioctl & BHND_IOCTL_CLK_EN)) + return (true); + + return (false); +} + +static int +bcma_reset_hw(device_t dev, device_t child, uint16_t ioctl) +{ + struct bcma_devinfo *dinfo; + struct bhnd_core_pmu_info *pm; + struct bhnd_resource *r; + int error; + + if (device_get_parent(child) != dev) + return (EINVAL); + + dinfo = device_get_ivars(child); + pm = dinfo->pmu_info; + + /* We require exclusive control over BHND_IOCTL_CLK_EN and + * BHND_IOCTL_CLK_FORCE. */ + if (ioctl & (BHND_IOCTL_CLK_EN | BHND_IOCTL_CLK_FORCE)) + return (EINVAL); + + /* Can't suspend the core without access to the agent registers */ + if ((r = dinfo->res_agent) == NULL) + return (ENODEV); + + /* Place core into known RESET state */ + if ((error = BHND_BUS_SUSPEND_HW(dev, child))) + return (error); + + /* + * Leaving the core in reset: + * - Set the caller's IOCTL flags + * - Enable clocks + * - Force clock distribution to ensure propagation throughout the + * core. + */ + error = bhnd_write_ioctl(child, + ioctl | BHND_IOCTL_CLK_EN | BHND_IOCTL_CLK_FORCE, UINT16_MAX); + if (error) + return (error); + + /* Bring the core out of reset */ + if ((error = bcma_dmp_write_reset(child, dinfo, 0x0))) + return (error); + + /* Disable forced clock gating (leaving clock enabled) */ + error = bhnd_write_ioctl(child, 0x0, BHND_IOCTL_CLK_FORCE); + if (error) + return (error); return (0); } static int -bcma_suspend_core(device_t dev, device_t child) +bcma_suspend_hw(device_t dev, device_t child) { - struct bcma_devinfo *dinfo; + struct bcma_devinfo *dinfo; + struct bhnd_core_pmu_info *pm; + struct bhnd_resource *r; + uint32_t rst; + int error; if (device_get_parent(child) != dev) - BHND_BUS_SUSPEND_CORE(device_get_parent(dev), child); + return (EINVAL); dinfo = device_get_ivars(child); + pm = dinfo->pmu_info; /* Can't suspend the core without access to the agent registers */ - if (dinfo->res_agent == NULL) + if ((r = dinfo->res_agent) == NULL) return (ENODEV); - // TODO - perform suspend + /* Wait for any pending reset operations to clear */ + if ((error = bcma_dmp_wait_reset(child, dinfo))) + return (error); - return (ENXIO); + /* Already in reset? */ + rst = bhnd_bus_read_4(r, BCMA_DMP_RESETCTRL); + if (rst & BMCA_DMP_RC_RESET) + return (0); + + /* Put core into reset */ + if ((error = bcma_dmp_write_reset(child, dinfo, BMCA_DMP_RC_RESET))) + return (error); + + /* Clear core flags */ + if ((error = bhnd_write_ioctl(child, 0x0, UINT16_MAX))) + return (error); + + /* Inform PMU that all outstanding request state should be discarded */ + if (pm != NULL) { + if ((error = BHND_PMU_CORE_RELEASE(pm->pm_pmu, pm))) + return (error); + } + + return (0); } -static uint32_t -bcma_read_config(device_t dev, device_t child, bus_size_t offset, u_int width) +static int +bcma_read_config(device_t dev, device_t child, bus_size_t offset, void *value, + u_int width) { struct bcma_devinfo *dinfo; struct bhnd_resource *r; /* Must be a directly attached child core */ if (device_get_parent(child) != dev) - return (UINT32_MAX); + return (EINVAL); /* Fetch the agent registers */ dinfo = device_get_ivars(child); if ((r = dinfo->res_agent) == NULL) - return (UINT32_MAX); + return (ENODEV); /* Verify bounds */ if (offset > rman_get_size(r->res)) - return (UINT32_MAX); + return (EFAULT); if (rman_get_size(r->res) - offset < width) - return (UINT32_MAX); + return (EFAULT); switch (width) { case 1: - return (bhnd_bus_read_1(r, offset)); + *((uint8_t *)value) = bhnd_bus_read_1(r, offset); + return (0); case 2: - return (bhnd_bus_read_2(r, offset)); + *((uint16_t *)value) = bhnd_bus_read_2(r, offset); + return (0); case 4: - return (bhnd_bus_read_4(r, offset)); + *((uint32_t *)value) = bhnd_bus_read_4(r, offset); + return (0); default: - return (UINT32_MAX); + return (EINVAL); } } -static void -bcma_write_config(device_t dev, device_t child, bus_size_t offset, uint32_t val, - u_int width) +static int +bcma_write_config(device_t dev, device_t child, bus_size_t offset, + const void *value, u_int width) { struct bcma_devinfo *dinfo; struct bhnd_resource *r; /* Must be a directly attached child core */ if (device_get_parent(child) != dev) - return; + return (EINVAL); /* Fetch the agent registers */ dinfo = device_get_ivars(child); if ((r = dinfo->res_agent) == NULL) - return; + return (ENODEV); /* Verify bounds */ if (offset > rman_get_size(r->res)) - return; + return (EFAULT); if (rman_get_size(r->res) - offset < width) - return; + return (EFAULT); switch (width) { case 1: - bhnd_bus_write_1(r, offset, val); - break; + bhnd_bus_write_1(r, offset, *(const uint8_t *)value); + return (0); case 2: - bhnd_bus_write_2(r, offset, val); - break; + bhnd_bus_write_2(r, offset, *(const uint16_t *)value); + return (0); case 4: - bhnd_bus_write_4(r, offset, val); - break; + bhnd_bus_write_4(r, offset, *(const uint32_t *)value); + return (0); default: - break; + return (EINVAL); } } @@ -501,19 +675,6 @@ bcma_get_core_ivec(device_t dev, device_ return (0); } -static struct bhnd_devinfo * -bcma_alloc_bhnd_dinfo(device_t dev) -{ - struct bcma_devinfo *dinfo = bcma_alloc_dinfo(dev); - return ((struct bhnd_devinfo *)dinfo); -} - -static void -bcma_free_bhnd_dinfo(device_t dev, struct bhnd_devinfo *dinfo) -{ - bcma_free_dinfo(dev, (struct bcma_devinfo *)dinfo); -} - /** * Scan the device enumeration ROM table, adding all valid discovered cores to * the bus. @@ -607,16 +768,20 @@ static device_method_t bcma_methods[] = DEVMETHOD(device_detach, bcma_detach), /* Bus interface */ + DEVMETHOD(bus_add_child, bcma_add_child), + DEVMETHOD(bus_child_deleted, bcma_child_deleted), DEVMETHOD(bus_read_ivar, bcma_read_ivar), DEVMETHOD(bus_write_ivar, bcma_write_ivar), DEVMETHOD(bus_get_resource_list, bcma_get_resource_list), /* BHND interface */ DEVMETHOD(bhnd_bus_get_erom_class, bcma_get_erom_class), - DEVMETHOD(bhnd_bus_alloc_devinfo, bcma_alloc_bhnd_dinfo), - DEVMETHOD(bhnd_bus_free_devinfo, bcma_free_bhnd_dinfo), - DEVMETHOD(bhnd_bus_reset_core, bcma_reset_core), - DEVMETHOD(bhnd_bus_suspend_core, bcma_suspend_core), + DEVMETHOD(bhnd_bus_read_ioctl, bcma_read_ioctl), + DEVMETHOD(bhnd_bus_write_ioctl, bcma_write_ioctl), + DEVMETHOD(bhnd_bus_read_iost, bcma_read_iost), + DEVMETHOD(bhnd_bus_is_hw_suspended, bcma_is_hw_suspended), + DEVMETHOD(bhnd_bus_reset_hw, bcma_reset_hw), + DEVMETHOD(bhnd_bus_suspend_hw, bcma_suspend_hw), DEVMETHOD(bhnd_bus_read_config, bcma_read_config), DEVMETHOD(bhnd_bus_write_config, bcma_write_config), DEVMETHOD(bhnd_bus_get_port_count, bcma_get_port_count), Modified: head/sys/dev/bhnd/bcma/bcma_dmp.h ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_dmp.h Sat Sep 24 01:21:42 2016 (r306286) +++ head/sys/dev/bhnd/bcma/bcma_dmp.h Sat Sep 24 04:08:16 2016 (r306287) @@ -245,8 +245,14 @@ #define BCMA_DMP_OOBSEL_6_SHIFT BCMA_DMP_OOBSEL_2_SHIFT #define BCMA_DMP_OOBSEL_7_SHIFT BCMA_DMP_OOBSEL_3_SHIFT +/* ioctrl */ +#define BCMA_DMP_IOCTRL_MASK 0x0000FFFF + +/* iostatus */ +#define BCMA_DMP_IOST_MASK 0x0000FFFF + /* resetctrl */ -#define BMCA_DMP_RC_RESET 1 +#define BMCA_DMP_RC_RESET 0x00000001 /* config */ #define BCMA_DMP_CFG_OOB 0x00000020 Modified: head/sys/dev/bhnd/bcma/bcma_subr.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_subr.c Sat Sep 24 01:21:42 2016 (r306286) +++ head/sys/dev/bhnd/bcma/bcma_subr.c Sat Sep 24 04:08:16 2016 (r306287) @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include +#include "bcma_dmp.h" + #include "bcmavar.h" /* Return the resource ID for a device's agent register allocation */ @@ -368,3 +370,62 @@ bcma_free_sport(struct bcma_sport *sport free(sport, M_BHND); } + +/** + * Given a bcma(4) child's device info, spin waiting for the device's DMP + * resetstatus register to clear. + * + * @param child The bcma(4) child device. + * @param dinfo The @p child device info. + * + * @retval 0 success + * @retval ENODEV if @p dinfo does not map an agent register resource. + * @retval ETIMEDOUT if timeout occurs + */ +int +bcma_dmp_wait_reset(device_t child, struct bcma_devinfo *dinfo) +{ + uint32_t rst; + + if (dinfo->res_agent == NULL) + return (ENODEV); + + /* 300us should be long enough, but there are references to this + * requiring up to 10ms when performing reset of an 80211 core + * after a MAC PSM microcode watchdog event. */ + for (int i = 0; i < 10000; i += 10) { + rst = bhnd_bus_read_4(dinfo->res_agent, BCMA_DMP_RESETSTATUS); + if (rst == 0) + return (0); + + DELAY(10); + } + + device_printf(child, "BCMA_DMP_RESETSTATUS timeout\n"); + return (ETIMEDOUT); +} + +/** + * Set the bcma(4) child's DMP resetctrl register value, and then wait + * for all backplane operations to complete. + * + * @param child The bcma(4) child device. + * @param dinfo The @p child device info. + * @param value The new ioctrl value to set. + * + * @retval 0 success + * @retval ENODEV if @p dinfo does not map an agent register resource. + * @retval ETIMEDOUT if timeout occurs waiting for reset completion + */ +int +bcma_dmp_write_reset(device_t child, struct bcma_devinfo *dinfo, uint32_t value) +{ + if (dinfo->res_agent == NULL) + return (ENODEV); + + bhnd_bus_write_4(dinfo->res_agent, BCMA_DMP_RESETCTRL, value); + bhnd_bus_read_4(dinfo->res_agent, BCMA_DMP_RESETCTRL); /* read-back */ + DELAY(10); + + return (bcma_dmp_wait_reset(child, dinfo)); +} Modified: head/sys/dev/bhnd/bcma/bcmavar.h ============================================================================== --- head/sys/dev/bhnd/bcma/bcmavar.h Sat Sep 24 01:21:42 2016 (r306286) +++ head/sys/dev/bhnd/bcma/bcmavar.h Sat Sep 24 04:08:16 2016 (r306287) @@ -99,6 +99,11 @@ void bcma_free_corecfg(struct bcma_co struct bcma_sport *bcma_alloc_sport(bcma_pid_t port_num, bhnd_port_type port_type); void bcma_free_sport(struct bcma_sport *sport); +int bcma_dmp_wait_reset(device_t child, + struct bcma_devinfo *dinfo); +int bcma_dmp_write_reset(device_t child, + struct bcma_devinfo *dinfo, uint32_t value); + /** BCMA master port descriptor */ struct bcma_mport { bcma_pid_t mp_num; /**< AXI port identifier (bus-unique) */ @@ -150,14 +155,14 @@ struct bcma_corecfg { * BCMA per-device info */ struct bcma_devinfo { - struct bhnd_devinfo bhnd_dinfo; /**< superclass device info. */ + struct resource_list resources; /**< Slave port memory regions. */ + struct bcma_corecfg *corecfg; /**< IP core/block config */ - struct resource_list resources; /**< Slave port memory regions. */ - struct bcma_corecfg *corecfg; /**< IP core/block config */ + struct bhnd_resource *res_agent; /**< Agent (wrapper) resource, or NULL. Not + * all bcma(4) cores have or require an agent. */ + int rid_agent; /**< Agent resource ID, or -1 */ - struct bhnd_resource *res_agent; /**< Agent (wrapper) resource, or NULL. Not - * all bcma(4) cores have or require an agent. */ - int rid_agent; /**< Agent resource ID, or -1 */ + struct bhnd_core_pmu_info *pmu_info; /**< Bus-managed PMU state, or NULL */ }; Modified: head/sys/dev/bhnd/bhnd.c ============================================================================== --- head/sys/dev/bhnd/bhnd.c Sat Sep 24 01:21:42 2016 (r306286) +++ head/sys/dev/bhnd/bhnd.c Sat Sep 24 04:08:16 2016 (r306287) @@ -631,7 +631,6 @@ bhnd_generic_alloc_pmu(device_t dev, dev struct bhnd_softc *sc; struct bhnd_resource *br; struct chipc_caps *ccaps; - struct bhnd_devinfo *dinfo; struct bhnd_core_pmu_info *pm; struct resource_list *rl; struct resource_list_entry *rle; @@ -644,7 +643,7 @@ bhnd_generic_alloc_pmu(device_t dev, dev GIANT_REQUIRED; /* for newbus */ sc = device_get_softc(dev); - dinfo = device_get_ivars(child); + pm = bhnd_get_pmu_info(child); pmu_regs = BHND_CLK_CTL_ST; if ((ccaps = bhnd_find_chipc_caps(sc)) == NULL) { @@ -660,7 +659,7 @@ bhnd_generic_alloc_pmu(device_t dev, dev } /* already allocated? */ - if (dinfo->pmu_info != NULL) { + if (pm != NULL) { panic("duplicate PMU allocation for %s", device_get_nameunit(child)); } @@ -728,7 +727,7 @@ bhnd_generic_alloc_pmu(device_t dev, dev br->res = rle->res; br->direct = ((rman_get_flags(rle->res) & RF_ACTIVE) != 0); - pm = malloc(sizeof(*dinfo->pmu_info), M_BHND, M_NOWAIT); + pm = malloc(sizeof(*pm), M_BHND, M_NOWAIT); if (pm == NULL) { free(br, M_BHND); return (ENOMEM); @@ -738,7 +737,7 @@ bhnd_generic_alloc_pmu(device_t dev, dev pm->pm_res = br; pm->pm_regs = pmu_regs; - dinfo->pmu_info = pm; + bhnd_set_pmu_info(child, pm); return (0); } @@ -749,14 +748,13 @@ int bhnd_generic_release_pmu(device_t dev, device_t child) { struct bhnd_softc *sc; - struct bhnd_devinfo *dinfo; + struct bhnd_core_pmu_info *pm; device_t pmu; int error; GIANT_REQUIRED; /* for newbus */ sc = device_get_softc(dev); - dinfo = device_get_ivars(child); if ((pmu = bhnd_find_pmu(sc)) == NULL) { device_printf(sc->dev, @@ -765,16 +763,17 @@ bhnd_generic_release_pmu(device_t dev, d } /* dispatch release request */ - if (dinfo->pmu_info == NULL) + pm = bhnd_get_pmu_info(child); + if (pm == NULL) panic("pmu over-release for %s", device_get_nameunit(child)); - if ((error = BHND_PMU_CORE_RELEASE(pmu, dinfo->pmu_info))) + if ((error = BHND_PMU_CORE_RELEASE(pmu, pm))) return (error); /* free PMU info */ - free(dinfo->pmu_info->pm_res, M_BHND); - free(dinfo->pmu_info, M_BHND); - dinfo->pmu_info = NULL; + bhnd_set_pmu_info(child, NULL); + free(pm->pm_res, M_BHND); + free(pm, M_BHND); return (0); } @@ -786,13 +785,11 @@ int bhnd_generic_request_clock(device_t dev, device_t child, bhnd_clock clock) { struct bhnd_softc *sc; - struct bhnd_devinfo *dinfo; struct bhnd_core_pmu_info *pm; sc = device_get_softc(dev); - dinfo = device_get_ivars(child); - if ((pm = dinfo->pmu_info) == NULL) + if ((pm = bhnd_get_pmu_info(child)) == NULL) panic("no active PMU request state"); /* dispatch request to PMU */ @@ -806,13 +803,11 @@ int bhnd_generic_enable_clocks(device_t dev, device_t child, uint32_t clocks) { struct bhnd_softc *sc; - struct bhnd_devinfo *dinfo; struct bhnd_core_pmu_info *pm; sc = device_get_softc(dev); - dinfo = device_get_ivars(child); - if ((pm = dinfo->pmu_info) == NULL) + if ((pm = bhnd_get_pmu_info(child)) == NULL) panic("no active PMU request state"); /* dispatch request to PMU */ @@ -826,13 +821,11 @@ int bhnd_generic_request_ext_rsrc(device_t dev, device_t child, u_int rsrc) { struct bhnd_softc *sc; - struct bhnd_devinfo *dinfo; struct bhnd_core_pmu_info *pm; sc = device_get_softc(dev); - dinfo = device_get_ivars(child); - if ((pm = dinfo->pmu_info) == NULL) + if ((pm = bhnd_get_pmu_info(child)) == NULL) panic("no active PMU request state"); /* dispatch request to PMU */ @@ -846,13 +839,11 @@ int bhnd_generic_release_ext_rsrc(device_t dev, device_t child, u_int rsrc) { struct bhnd_softc *sc; - struct bhnd_devinfo *dinfo; struct bhnd_core_pmu_info *pm; sc = device_get_softc(dev); - dinfo = device_get_ivars(child); - if ((pm = dinfo->pmu_info) == NULL) + if ((pm = bhnd_get_pmu_info(child)) == NULL) panic("no active PMU request state"); /* dispatch request to PMU */ @@ -1035,43 +1026,6 @@ bhnd_child_location_str(device_t dev, de } /** - * Default bhnd(4) bus driver implementation of BUS_ADD_CHILD(). - * - * This implementation manages internal bhnd(4) state, and must be called - * by subclassing drivers. - */ -device_t -bhnd_generic_add_child(device_t dev, u_int order, const char *name, int unit) -{ - struct bhnd_devinfo *dinfo; - device_t child; - - child = device_add_child_ordered(dev, order, name, unit); - if (child == NULL) - return (NULL); - - if ((dinfo = BHND_BUS_ALLOC_DEVINFO(dev)) == NULL) { - device_delete_child(dev, child); - return (NULL); - } - - device_set_ivars(child, dinfo); - - return (child); -} - -/** - * Default bhnd(4) bus driver implementation of BHND_BUS_CHILD_ADDED(). - * - * This implementation manages internal bhnd(4) state, and must be called - * by subclassing drivers. - */ -void -bhnd_generic_child_added(device_t dev, device_t child) -{ -} - -/** * Default bhnd(4) bus driver implementation of BUS_CHILD_DELETED(). * * This implementation manages internal bhnd(4) state, and must be called @@ -1081,21 +1035,16 @@ void bhnd_generic_child_deleted(device_t dev, device_t child) { struct bhnd_softc *sc; - struct bhnd_devinfo *dinfo; sc = device_get_softc(dev); /* Free device info */ - if ((dinfo = device_get_ivars(child)) != NULL) { - if (dinfo->pmu_info != NULL) { - /* Releasing PMU requests automatically would be nice, - * but we can't reference per-core PMU register - * resource after driver detach */ - panic("%s leaked device pmu state\n", - device_get_nameunit(child)); - } - - BHND_BUS_FREE_DEVINFO(dev, dinfo); + if (bhnd_get_pmu_info(child) != NULL) { + /* Releasing PMU requests automatically would be nice, + * but we can't reference per-core PMU register + * resource after driver detach */ + panic("%s leaked device pmu state\n", + device_get_nameunit(child)); } /* Clean up platform device references */ @@ -1228,7 +1177,6 @@ static device_method_t bhnd_methods[] = /* Bus interface */ DEVMETHOD(bus_new_pass, bhnd_new_pass), - DEVMETHOD(bus_add_child, bhnd_generic_add_child), DEVMETHOD(bus_child_deleted, bhnd_generic_child_deleted), DEVMETHOD(bus_probe_nomatch, bhnd_generic_probe_nomatch), DEVMETHOD(bus_print_child, bhnd_generic_print_child), @@ -1269,7 +1217,6 @@ static device_method_t bhnd_methods[] = DEVMETHOD(bhnd_bus_request_ext_rsrc, bhnd_generic_request_ext_rsrc), DEVMETHOD(bhnd_bus_release_ext_rsrc, bhnd_generic_release_ext_rsrc), - DEVMETHOD(bhnd_bus_child_added, bhnd_generic_child_added), DEVMETHOD(bhnd_bus_is_region_valid, bhnd_generic_is_region_valid), DEVMETHOD(bhnd_bus_get_nvram_var, bhnd_generic_get_nvram_var), Modified: head/sys/dev/bhnd/bhnd.h ============================================================================== --- head/sys/dev/bhnd/bhnd.h Sat Sep 24 01:21:42 2016 (r306286) +++ head/sys/dev/bhnd/bhnd.h Sat Sep 24 04:08:16 2016 (r306287) @@ -46,6 +46,8 @@ #include "nvram/bhnd_nvram.h" +struct bhnd_core_pmu_info; + extern devclass_t bhnd_devclass; extern devclass_t bhnd_hostb_devclass; extern devclass_t bhnd_nvram_devclass; @@ -67,6 +69,7 @@ enum bhnd_device_vars { BHND_IVAR_CORE_UNIT, /**< Bus-assigned core unit number, assigned sequentially (starting at 0) for each vendor/device pair. */ + BHND_IVAR_PMU_INFO, /**< Internal bus-managed PMU state */ }; /** @@ -99,6 +102,39 @@ enum { }; + +/** + * Per-core IOCTL flags common to all bhnd(4) cores. + */ +enum { + BHND_IOCTL_BIST = 0x8000, /**< Initiate a built-in self-test (BIST). Must be cleared + after BIST results are read via BHND_IOST_BIST_* */ + BHND_IOCTL_PME = 0x4000, /**< Enable posting of power management events by the core. */ + BHND_IOCTL_CFLAGS = 0x3FFC, /**< Reserved for core-specific ioctl flags. */ + BHND_IOCTL_CLK_FORCE = 0x0002, /**< Force disable of clock gating, resulting in all clocks + being distributed within the core. Should be set when + asserting/deasserting reset to ensure the reset signal + fully propagates to the entire core. */ + BHND_IOCTL_CLK_EN = 0x0001, /**< If cleared, the core clock will be disabled. Should be + set during normal operation, and cleared when the core is + held in reset. */ +}; + +/** + * Per-core IOST flags common to all bhnd(4) cores. + */ +enum { + BHND_IOST_BIST_DONE = 0x8000, /**< Set upon BIST completion (see BHND_IOCTL_BIST), and cleared + if 0 is written to BHND_IOCTL_BIST. */ + BHND_IOST_BIST_FAIL = 0x4000, /**< Set upon detection of a BIST error; the value is unspecified + if BIST has not completed and BHND_IOST_BIST_DONE is not set. */ + BHND_IOST_CLK = 0x2000, /**< Set if the core has requested that gated clocks be enabled, or + cleared otherwise. The value is undefined if a core does not + support clock gating. */ + BHND_IOST_DMA64 = 0x1000, /**< Set if this core supports 64-bit DMA */ + BHND_IOST_CFLAGS = 0x0FFC, /**< Reserved for core-specific status flags. */ +}; + /* * Simplified accessors for bhnd device ivars */ @@ -113,6 +149,7 @@ BHND_ACCESSOR(vendor_name, VENDOR_NAME, BHND_ACCESSOR(device_name, DEVICE_NAME, const char *); BHND_ACCESSOR(core_index, CORE_INDEX, u_int); BHND_ACCESSOR(core_unit, CORE_UNIT, int); +BHND_ACCESSOR(pmu_info, PMU_INFO, struct bhnd_core_pmu_info *); #undef BHND_ACCESSOR @@ -451,6 +488,119 @@ bhnd_get_chipid(device_t dev) { return (BHND_BUS_GET_CHIPID(device_get_parent(dev), dev)); }; + +/** + * Read the current value of a bhnd(4) device's per-core I/O control register. + * + * @param dev The bhnd bus child device to be queried. + * @param[out] ioctl On success, the I/O control register value. + * + * @retval 0 success + * @retval EINVAL If @p child is not a direct child of @p dev. + * @retval ENODEV If agent/config space for @p child is unavailable. + * @retval non-zero If reading the IOCTL register otherwise fails, a regular + * unix error code will be returned. + */ +static inline int +bhnd_read_ioctl(device_t dev, uint16_t *ioctl) +{ + return (BHND_BUS_READ_IOCTL(device_get_parent(dev), dev, ioctl)); +} + +/** + * Write @p value and @p mask to a bhnd(4) device's per-core I/O control + * register. + * + * @param dev The bhnd bus child device for which the IOCTL register will be + * written. + * @param value The value to be written (see BHND_IOCTL_*). + * @param mask Only the bits defined by @p mask will be updated from @p value. + * + * @retval 0 success + * @retval EINVAL If @p child is not a direct child of @p dev. + * @retval ENODEV If agent/config space for @p child is unavailable. + * @retval non-zero If writing the IOCTL register otherwise fails, a regular + * unix error code will be returned. + */ +static inline int +bhnd_write_ioctl(device_t dev, uint16_t value, uint16_t mask) +{ + return (BHND_BUS_WRITE_IOCTL(device_get_parent(dev), dev, value, mask)); +} + +/** + * Read the current value of a bhnd(4) device's per-core I/O status register. + * + * @param dev The bhnd bus child device to be queried. + * @param[out] iost On success, the I/O status register value. + * + * @retval 0 success + * @retval EINVAL If @p child is not a direct child of @p dev. + * @retval ENODEV If agent/config space for @p child is unavailable. + * @retval non-zero If reading the IOST register otherwise fails, a regular + * unix error code will be returned. + */ +static inline int +bhnd_read_iost(device_t dev, uint16_t *iost) +{ + return (BHND_BUS_READ_IOST(device_get_parent(dev), dev, iost)); +} + +/** + * Return true if the given bhnd device's hardware is currently held + * in a RESET state or otherwise not clocked (BHND_IOCTL_CLK_EN). + * + * @param dev The device to query. + * + * @retval true If @p dev is held in RESET or not clocked (BHND_IOCTL_CLK_EN), + * or an error occured determining @p dev's hardware state. + * @retval false If @p dev is clocked and is not held in RESET. + */ +static inline bool +bhnd_is_hw_suspended(device_t dev) +{ + return (BHND_BUS_IS_HW_SUSPENDED(device_get_parent(dev), dev)); +} + +/** + * Place the bhnd(4) device's hardware into a reset state, and then bring the + * hardware out of reset with BHND_IOCTL_CLK_EN and @p ioctl flags set. + * + * Any clock or resource PMU requests previously made by @p dev will be + * invalidated. + * + * @param dev The device to be reset. + * @param ioctl Device-specific core ioctl flags to be supplied on reset + * (see BHND_IOCTL_*). + * + * @retval 0 success + * @retval non-zero error + */ +static inline int +bhnd_reset_hw(device_t dev, uint16_t ioctl) +{ + return (BHND_BUS_RESET_HW(device_get_parent(dev), dev, ioctl)); +} + +/** + * Suspend @p child's hardware in a low-power reset state. + * + * Any clock or resource PMU requests previously made by @p dev will be + * invalidated. + * + * The hardware may be brought out of reset via bhnd_reset_hw(). + * + * @param dev The device to be suspended. + * + * @retval 0 success + * @retval non-zero error + */ +static inline int +bhnd_suspend_hw(device_t dev) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Sep 24 05:27:14 2016 Return-Path: Delivered-To: svn-src-all@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 0B4CABE6A6A; Sat, 24 Sep 2016 05:27:14 +0000 (UTC) (envelope-from jhibbits@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 D135FD4; Sat, 24 Sep 2016 05:27:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8O5RDOd011589; Sat, 24 Sep 2016 05:27:13 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O5RDpp011588; Sat, 24 Sep 2016 05:27:13 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609240527.u8O5RDpp011588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 24 Sep 2016 05:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306288 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 05:27:14 -0000 Author: jhibbits Date: Sat Sep 24 05:27:12 2016 New Revision: 306288 URL: https://svnweb.freebsd.org/changeset/base/306288 Log: Fix ds1307 probing 'compat' can never be NULL, because the compatible check loop ends when compat->ocd_str is NULL. This causes ds1307 to attach to any unclaimed i2c device. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Sat Sep 24 04:08:16 2016 (r306287) +++ head/sys/dev/iicbus/ds1307.c Sat Sep 24 05:27:12 2016 (r306288) @@ -274,7 +274,7 @@ ds1307_probe(device_t dev) compat = ofw_bus_search_compatible(dev, ds1307_compat_data); - if (compat == NULL) + if (compat->ocd_str == NULL) return (ENXIO); device_set_desc(dev, (const char *)compat->ocd_data); From owner-svn-src-all@freebsd.org Sat Sep 24 07:09:44 2016 Return-Path: Delivered-To: svn-src-all@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 E07AFBE5B25; Sat, 24 Sep 2016 07:09:44 +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 A119D9C0; Sat, 24 Sep 2016 07:09:44 +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 u8O79h8Z048933; Sat, 24 Sep 2016 07:09:43 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O79hue048932; Sat, 24 Sep 2016 07:09:43 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201609240709.u8O79hue048932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 24 Sep 2016 07:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306289 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 07:09:45 -0000 Author: kp Date: Sat Sep 24 07:09:43 2016 New Revision: 306289 URL: https://svnweb.freebsd.org/changeset/base/306289 Log: bridge: Fix fragment handling and memory leak Fragmented UDP and ICMP packets were corrupted if a firewall with reassembling feature (like pf'scrub) is enabled on the bridge. This patch fixes corrupted packet problem and the panic (triggered easly with low RAM) as explain in PR 185633. bridge_pfil and bridge_fragment relationship: bridge_pfil() receive (IN direction) packets and sent it to the firewall The firewall can be configured for reassembling fragmented packet (like pf'scrubing) in one mbuf chain when bridge_pfil() need to send this reassembled packet to the outgoing interface, it needs to re-fragment it by using bridge_fragment() bridge_fragment() had to split this mbuf (using ip_fragment) first then had to M_PREPEND each packet in the mbuf chain for adding Ethernet header. But M_PREPEND can sometime create a new mbuf on the begining of the mbuf chain, then the "main" pointer of this mbuf chain should be updated and this case is tottaly forgotten. The original bridge_fragment code (Revision 158140, 2006 April 29) came from OpenBSD, and the call to bridge_enqueue was embedded. But on FreeBSD, bridge_enqueue() is done after bridge_fragment(), then the original OpenBSD code can't work as-it of FreeBSD. PR: 185633 Submitted by: Olivier Cochard-Labbé Differential Revision: https://reviews.freebsd.org/D7780 Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Sep 24 05:27:12 2016 (r306288) +++ head/sys/net/if_bridge.c Sat Sep 24 07:09:43 2016 (r306289) @@ -333,7 +333,7 @@ static int bridge_ip_checkbasic(struct m #ifdef INET6 static int bridge_ip6_checkbasic(struct mbuf **mp); #endif /* INET6 */ -static int bridge_fragment(struct ifnet *, struct mbuf *, +static int bridge_fragment(struct ifnet *, struct mbuf **mp, struct ether_header *, int, struct llc *); static void bridge_linkstate(struct ifnet *ifp); static void bridge_linkcheck(struct bridge_softc *sc); @@ -1917,6 +1917,7 @@ bridge_enqueue(struct bridge_softc *sc, m->m_flags &= ~M_VLANTAG; } + M_ASSERTPKTHDR(m); /* We shouldn't transmit mbuf without pkthdr */ if ((err = dst_ifp->if_transmit(dst_ifp, m))) { m_freem(m0); if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1); @@ -3234,10 +3235,12 @@ bridge_pfil(struct mbuf **mp, struct ifn break; /* check if we need to fragment the packet */ + /* bridge_fragment generates a mbuf chain of packets */ + /* that already include eth headers */ if (V_pfil_member && ifp != NULL && dir == PFIL_OUT) { i = (*mp)->m_pkthdr.len; if (i > ifp->if_mtu) { - error = bridge_fragment(ifp, *mp, &eh2, snap, + error = bridge_fragment(ifp, mp, &eh2, snap, &llc1); return (error); } @@ -3476,56 +3479,77 @@ bad: /* * bridge_fragment: * - * Return a fragmented mbuf chain. + * Fragment mbuf chain in multiple packets and prepend ethernet header. */ static int -bridge_fragment(struct ifnet *ifp, struct mbuf *m, struct ether_header *eh, +bridge_fragment(struct ifnet *ifp, struct mbuf **mp, struct ether_header *eh, int snap, struct llc *llc) { - struct mbuf *m0; + struct mbuf *m = *mp, *nextpkt = NULL, *mprev = NULL, *mcur = NULL; struct ip *ip; int error = -1; if (m->m_len < sizeof(struct ip) && (m = m_pullup(m, sizeof(struct ip))) == NULL) - goto out; + goto dropit; ip = mtod(m, struct ip *); m->m_pkthdr.csum_flags |= CSUM_IP; error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist); if (error) - goto out; + goto dropit; - /* walk the chain and re-add the Ethernet header */ - for (m0 = m; m0; m0 = m0->m_nextpkt) { - if (error == 0) { - if (snap) { - M_PREPEND(m0, sizeof(struct llc), M_NOWAIT); - if (m0 == NULL) { - error = ENOBUFS; - continue; - } - bcopy(llc, mtod(m0, caddr_t), - sizeof(struct llc)); - } - M_PREPEND(m0, ETHER_HDR_LEN, M_NOWAIT); - if (m0 == NULL) { + /* + * Walk the chain and re-add the Ethernet header for + * each mbuf packet. + */ + for (mcur = m; mcur; mcur = mcur->m_nextpkt) { + nextpkt = mcur->m_nextpkt; + mcur->m_nextpkt = NULL; + if (snap) { + M_PREPEND(mcur, sizeof(struct llc), M_NOWAIT); + if (mcur == NULL) { error = ENOBUFS; - continue; + if (mprev != NULL) + mprev->m_nextpkt = nextpkt; + goto dropit; } - bcopy(eh, mtod(m0, caddr_t), ETHER_HDR_LEN); - } else - m_freem(m); - } + bcopy(llc, mtod(mcur, caddr_t),sizeof(struct llc)); + } + + M_PREPEND(mcur, ETHER_HDR_LEN, M_NOWAIT); + if (mcur == NULL) { + error = ENOBUFS; + if (mprev != NULL) + mprev->m_nextpkt = nextpkt; + goto dropit; + } + bcopy(eh, mtod(mcur, caddr_t), ETHER_HDR_LEN); - if (error == 0) - KMOD_IPSTAT_INC(ips_fragmented); + /* + * The previous two M_PREPEND could have inserted one or two + * mbufs in front so we have to update the previous packet's + * m_nextpkt. + */ + mcur->m_nextpkt = nextpkt; + if (mprev != NULL) + mprev->m_nextpkt = mcur; + else { + /* The first mbuf in the original chain needs to be + * updated. */ + *mp = mcur; + } + mprev = mcur; + } + KMOD_IPSTAT_INC(ips_fragmented); return (error); -out: - if (m != NULL) - m_freem(m); +dropit: + for (mcur = *mp; mcur; mcur = m) { /* droping the full packet chain */ + m = mcur->m_nextpkt; + m_freem(mcur); + } return (error); } From owner-svn-src-all@freebsd.org Sat Sep 24 07:55:50 2016 Return-Path: Delivered-To: svn-src-all@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 A2C9FBE6F52; Sat, 24 Sep 2016 07:55:50 +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 5C0D3126; Sat, 24 Sep 2016 07:55:50 +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 u8O7tn2w067555; Sat, 24 Sep 2016 07:55:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O7tn3K067554; Sat, 24 Sep 2016 07:55:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609240755.u8O7tn3K067554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 24 Sep 2016 07:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306290 - head/sys/dev/amdsbwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 07:55:50 -0000 Author: avg Date: Sat Sep 24 07:55:49 2016 New Revision: 306290 URL: https://svnweb.freebsd.org/changeset/base/306290 Log: clarify description of the 0x790b1022 / "KERNCZ"/ "CZ" device MFC after: 5 days X-MFC with: r306218 Modified: head/sys/dev/amdsbwd/amd_chipset.h Modified: head/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- head/sys/dev/amdsbwd/amd_chipset.h Sat Sep 24 07:09:43 2016 (r306289) +++ head/sys/dev/amdsbwd/amd_chipset.h Sat Sep 24 07:55:49 2016 (r306290) @@ -36,18 +36,23 @@ * At present there are three classes of supported chipsets: * - SB600 and S7x0 southbridges where the SMBus controller device has * a PCI Device ID of 0x43851002 and a revision less than 0x40 - * - SB8x0, SB9x0 southbridges and FCHs where the SMBus controller device has - * a PCI Device ID of 0x43851002 and a revision greater than or equal to 0x40 - * or the controller has an ID of 0x780b1022 and a revision less than 0x41 - * - FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 - * and a revision greater than or equal to 0x41 + * - several types of southbridges and FCHs: + * o SB8x0, SB9x0 southbridges where the SMBus controller device has a PCI + * Device ID of 0x43851002 and a revision greater than or equal to 0x40 + * o FCHs where the controller has an ID of 0x780b1022 and a revision less + * than 0x41 (various revisions of "Hudson" and "Bolton") + * o FCHs where the controller has an ID of 0x790b1022 and a revision less + * than 0x49 + * - several types of southbridges and FCHs: + * o FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 + * and a revision greater than or equal to 0x41 (integrated into "Mullins" + * processors, code named "ML") + * o FCHs where the controller has an ID of 0x790b1022 and a revision greater + * than or equal to 0x49 (integrated into "Carrizo" processors, code named + * "KERNCZ" or "CZ") + * * The register definitions are compatible within the classes and may be * incompatible accross them. - * So far there is no public documentation for "KERNCZ" FCH where the SMBus - * controller has a PCI ID of 0x790b1022. Based on some code in Linux it is - * assumed that revisions less than 0x49 are compatible with the SB8x0 class - * and revisions greater than or equal to 0x49 are compatible with the class - * of FCHs with 0x41+ revisions. */ /* From owner-svn-src-all@freebsd.org Sat Sep 24 07:59:55 2016 Return-Path: Delivered-To: svn-src-all@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 A2917BE808C; Sat, 24 Sep 2016 07:59:55 +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 73EB731E; Sat, 24 Sep 2016 07:59:55 +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 u8O7xsSP067727; Sat, 24 Sep 2016 07:59:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O7xsxH067726; Sat, 24 Sep 2016 07:59:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609240759.u8O7xsxH067726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 24 Sep 2016 07:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306291 - head/sys/dev/amdsbwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 07:59:55 -0000 Author: avg Date: Sat Sep 24 07:59:54 2016 New Revision: 306291 URL: https://svnweb.freebsd.org/changeset/base/306291 Log: the rest of changes intended to be committed in r306290 MFC after: 5 days X-MFC with: r306218 Modified: head/sys/dev/amdsbwd/amd_chipset.h Modified: head/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- head/sys/dev/amdsbwd/amd_chipset.h Sat Sep 24 07:55:49 2016 (r306290) +++ head/sys/dev/amdsbwd/amd_chipset.h Sat Sep 24 07:59:54 2016 (r306291) @@ -40,10 +40,11 @@ * o SB8x0, SB9x0 southbridges where the SMBus controller device has a PCI * Device ID of 0x43851002 and a revision greater than or equal to 0x40 * o FCHs where the controller has an ID of 0x780b1022 and a revision less - * than 0x41 (various revisions of "Hudson" and "Bolton") + * than 0x41 (various variants of "Hudson" and "Bolton" as well as FCHs + * integrated into processors, e.g. "Kabini") * o FCHs where the controller has an ID of 0x790b1022 and a revision less * than 0x49 - * - several types of southbridges and FCHs: + * - several types of FCHs: * o FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 * and a revision greater than or equal to 0x41 (integrated into "Mullins" * processors, code named "ML") @@ -131,6 +132,8 @@ * SB600 RRG 2.3.1.1, * SB7xx RRG 2.3.1.1, * SB8xx RRG 2.3.1, + * BKDG for Family 15h Models 60h-6Fh 3.26.6.1, + * BKDG for Family 15h Models 70h-7Fh 3.26.6.1, * BKDG for Family 16h Models 00h-0Fh 3.26.7.1, * BKDG for Family 16h Models 30h-3Fh 3.26.7.1. * Also, see i2c-piix4 aka piix4_smbus Linux driver. From owner-svn-src-all@freebsd.org Sat Sep 24 08:13:16 2016 Return-Path: Delivered-To: svn-src-all@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 ECAC8BE88C0; Sat, 24 Sep 2016 08:13:16 +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 A28F9EA7; Sat, 24 Sep 2016 08:13:16 +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 u8O8DFD6075055; Sat, 24 Sep 2016 08:13:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8O8DF1k075054; Sat, 24 Sep 2016 08:13:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201609240813.u8O8DF1k075054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 24 Sep 2016 08:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306292 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 08:13:17 -0000 Author: avg Date: Sat Sep 24 08:13:15 2016 New Revision: 306292 URL: https://svnweb.freebsd.org/changeset/base/306292 Log: fix vnode lock assertion for extended attributes directory Background. In ZFS a file with extended attributes has a special directory associated with it where each extended attribute is a file. The attribute's name is a file name and its value is a file content. When the ownership of a file with extended attributes is changed, ZFS also changes ownership of the special directory. This is where the bug was hit. The bug was introduced in r209158. Nota bene. ZFS vnode locks are typically acquired before z_teardown_lock (i.e., before ZFS_ENTER). But this is not the case for the vnodes that represent the extended attribute directory and files. Those are always locked after ZFS_ENTER. This is confusing and fragile. PR: 212702 Reported by: Christian Fuss to FreeNAS Tested by: mav MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Sep 24 07:59:54 2016 (r306291) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Sep 24 08:13:15 2016 (r306292) @@ -3197,6 +3197,11 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (err == 0 && xattr_obj) { err = zfs_zget(zp->z_zfsvfs, xattr_obj, &attrzp); + if (err == 0) { + err = vn_lock(ZTOV(attrzp), LK_EXCLUSIVE); + if (err != 0) + vrele(ZTOV(attrzp)); + } if (err) goto out2; } @@ -3206,7 +3211,7 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (new_uid != zp->z_uid && zfs_fuid_overquota(zfsvfs, B_FALSE, new_uid)) { if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); err = SET_ERROR(EDQUOT); goto out2; } @@ -3218,7 +3223,7 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (new_gid != zp->z_gid && zfs_fuid_overquota(zfsvfs, B_TRUE, new_gid)) { if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); err = SET_ERROR(EDQUOT); goto out2; } @@ -3449,7 +3454,7 @@ out: } if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); if (aclp) zfs_acl_free(aclp); From owner-svn-src-all@freebsd.org Sat Sep 24 10:32:28 2016 Return-Path: Delivered-To: svn-src-all@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 1D103BE6D1A; Sat, 24 Sep 2016 10:32:28 +0000 (UTC) (envelope-from dchagin@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 E100E699; Sat, 24 Sep 2016 10:32:27 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OAWRgU027666; Sat, 24 Sep 2016 10:32:27 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OAWR2T027665; Sat, 24 Sep 2016 10:32:27 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201609241032.u8OAWR2T027665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 24 Sep 2016 10:32:27 +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: r306293 - stable/11/sys/compat/linux X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 10:32:28 -0000 Author: dchagin Date: Sat Sep 24 10:32:26 2016 New Revision: 306293 URL: https://svnweb.freebsd.org/changeset/base/306293 Log: MFC r305896: Implement BLKSSZGET ioctl for the Linuxulator. PR: 212700 Modified: stable/11/sys/compat/linux/linux_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/11/sys/compat/linux/linux_ioctl.c Sat Sep 24 08:13:15 2016 (r306292) +++ stable/11/sys/compat/linux/linux_ioctl.c Sat Sep 24 10:32:26 2016 (r306293) @@ -297,6 +297,15 @@ linux_ioctl_disk(struct thread *td, stru return (copyout(§orsize, (void *)args->arg, sizeof(sectorsize))); break; + case LINUX_BLKSSZGET: + error = fo_ioctl(fp, DIOCGSECTORSIZE, + (caddr_t)§orsize, td->td_ucred, td); + fdrop(fp, td); + if (error) + return (error); + return (copyout(§orsize, (void *)args->arg, + sizeof(sectorsize))); + break; } fdrop(fp, td); return (ENOIOCTL); From owner-svn-src-all@freebsd.org Sat Sep 24 10:34:36 2016 Return-Path: Delivered-To: svn-src-all@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 9865ABE6EEE; Sat, 24 Sep 2016 10:34:36 +0000 (UTC) (envelope-from dchagin@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 686128F4; Sat, 24 Sep 2016 10:34:36 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OAYZ31027817; Sat, 24 Sep 2016 10:34:35 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OAYZQ6027816; Sat, 24 Sep 2016 10:34:35 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201609241034.u8OAYZQ6027816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 24 Sep 2016 10:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306294 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 10:34:36 -0000 Author: dchagin Date: Sat Sep 24 10:34:35 2016 New Revision: 306294 URL: https://svnweb.freebsd.org/changeset/base/306294 Log: MFC r305896: Implement BLKSSZGET ioctl for the Linuxulator. PR: 212700 Modified: stable/10/sys/compat/linux/linux_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.c Sat Sep 24 10:32:26 2016 (r306293) +++ stable/10/sys/compat/linux/linux_ioctl.c Sat Sep 24 10:34:35 2016 (r306294) @@ -296,6 +296,15 @@ linux_ioctl_disk(struct thread *td, stru return (copyout(§orsize, (void *)args->arg, sizeof(sectorsize))); break; + case LINUX_BLKSSZGET: + error = fo_ioctl(fp, DIOCGSECTORSIZE, + (caddr_t)§orsize, td->td_ucred, td); + fdrop(fp, td); + if (error) + return (error); + return (copyout(§orsize, (void *)args->arg, + sizeof(sectorsize))); + break; } fdrop(fp, td); return (ENOIOCTL); From owner-svn-src-all@freebsd.org Sat Sep 24 11:09:44 2016 Return-Path: Delivered-To: svn-src-all@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 E9707BE8C81 for ; Sat, 24 Sep 2016 11:09:44 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (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 7ADE39C0 for ; Sat, 24 Sep 2016 11:09:43 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f52.google.com with SMTP id b71so83208756lfg.0 for ; Sat, 24 Sep 2016 04:09:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=2jcqV26sK/dD9XEn+lpaEkxWnPcigyU/tA2Pa96Ti/Y=; b=NKk0jnEUBsxApjc4miEM7kslM6bTKVgq2Nm/4KMjaPeAVitXiVj0sdBRYK28r5FWd8 SYBscQW1+AGbYN8hVKnvqNYsZR8qynfJ0h2jYaMl6AEh5Esv8eK1TCu4AfYxcr4lsiyc noEX84BzxcgPqqs06ybOkW9sav23E3a/j8gqB7GVXwJVL4WhDIyIGonknh3C2Db2EdBM B38CW8u+flk2yKBQYzBhZU2YWDiJC0EwSrKDWvD3Wq1GFopa/X5iXFMhPjrADdvLaKLN yD4WfWIlWEicSQwystWCuD+kunlAK6raLjszHblGN2SMu1UdQaQRd/EbwRKOAuCf70W7 tcaA== X-Gm-Message-State: AE9vXwPnWHOK6fxwRBWgR20sDd/jOU3zLRgk0mANMn/tko0n5/xbK79eVeG7OqY86l3IJQ== X-Received: by 10.46.71.69 with SMTP id u66mr4408994lja.14.1474715376038; Sat, 24 Sep 2016 04:09:36 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id h41sm1969858lji.28.2016.09.24.04.09.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Sep 2016 04:09:35 -0700 (PDT) Subject: Re: svn commit: r306294 - stable/10/sys/compat/linux To: Dmitry Chagin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org References: <201609241034.u8OAYZQ6027816@repo.freebsd.org> From: Andrey Chernov Message-ID: <6b4986dc-4b47-56cf-12cb-37f9756f4204@freebsd.org> Date: Sat, 24 Sep 2016 14:09:34 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609241034.u8OAYZQ6027816@repo.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 11:09:45 -0000 On 24.09.2016 13:34, Dmitry Chagin wrote: > Author: dchagin > Date: Sat Sep 24 10:34:35 2016 > New Revision: 306294 > URL: https://svnweb.freebsd.org/changeset/base/306294 > > Log: > MFC r305896: > > Implement BLKSSZGET ioctl for the Linuxulator. Off topic: is there any chance to get linux ALSA working, at least its PulseAudio plugin? Currently linux PulseAudio itself works nice (transfering all sounds from remote machine to local), but linux ALSA PulseAudio plugin exits with thread assert error. The same things compiled natively (i.e. ALSA + PulseAudio plugin for FreeBSD) works nice. I mean this ALSA setup: pcm.!default { type pulse hint.description "PulseAudio" } ctl.!default { type pulse } From owner-svn-src-all@freebsd.org Sat Sep 24 13:23:48 2016 Return-Path: Delivered-To: svn-src-all@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 BE523BE7BF0; Sat, 24 Sep 2016 13:23:48 +0000 (UTC) (envelope-from np@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 8EE47F6B; Sat, 24 Sep 2016 13:23:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ODNlH0093070; Sat, 24 Sep 2016 13:23:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ODNlqv093068; Sat, 24 Sep 2016 13:23:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609241323.u8ODNlqv093068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 24 Sep 2016 13:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306295 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 13:23:48 -0000 Author: np Date: Sat Sep 24 13:23:47 2016 New Revision: 306295 URL: https://svnweb.freebsd.org/changeset/base/306295 Log: cxgbe(4): Support SIOGIFXMEDIA so that ifconfig displays correct media for 25Gbps and 100Gbps ports. This should have been part of r305713, which is when the driver first started reporting extended media types. Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_tracer.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Sep 24 10:34:35 2016 (r306294) +++ head/sys/dev/cxgbe/t4_main.c Sat Sep 24 13:23:47 2016 (r306295) @@ -1737,6 +1737,7 @@ fail: case SIOCSIFMEDIA: case SIOCGIFMEDIA: + case SIOCGIFXMEDIA: ifmedia_ioctl(ifp, ifr, &vi->media, cmd); break; Modified: head/sys/dev/cxgbe/t4_tracer.c ============================================================================== --- head/sys/dev/cxgbe/t4_tracer.c Sat Sep 24 10:34:35 2016 (r306294) +++ head/sys/dev/cxgbe/t4_tracer.c Sat Sep 24 13:23:47 2016 (r306295) @@ -472,6 +472,7 @@ tracer_ioctl(struct ifnet *ifp, unsigned break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: + case SIOCGIFXMEDIA: sx_xlock(&t4_trace_lock); sc = ifp->if_softc; if (sc == NULL) From owner-svn-src-all@freebsd.org Sat Sep 24 13:44:19 2016 Return-Path: Delivered-To: svn-src-all@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 8FD8DBDE54F; Sat, 24 Sep 2016 13:44:19 +0000 (UTC) (envelope-from gnn@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 6A064C99; Sat, 24 Sep 2016 13:44:19 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ODiItP000999; Sat, 24 Sep 2016 13:44:18 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ODiIB2000998; Sat, 24 Sep 2016 13:44:18 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201609241344.u8ODiIB2000998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Sat, 24 Sep 2016 13:44:18 +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: r306296 - stable/11/tools/tools/crypto X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 13:44:19 -0000 Author: gnn Date: Sat Sep 24 13:44:18 2016 New Revision: 306296 URL: https://svnweb.freebsd.org/changeset/base/306296 Log: MFC: 305066,305304,305312 Update cryptotest for modern algorithms Clean up the usage message and remove dead code. Add cpuset support to separate forked processes. Reviewed by: cem Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/tools/tools/crypto/cryptotest.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/crypto/cryptotest.c ============================================================================== --- stable/11/tools/tools/crypto/cryptotest.c Sat Sep 24 13:23:47 2016 (r306295) +++ stable/11/tools/tools/crypto/cryptotest.c Sat Sep 24 13:44:18 2016 (r306296) @@ -84,6 +84,7 @@ */ #include +#include #include #include #include @@ -96,6 +97,7 @@ #include #include #include +#include #include #include @@ -126,12 +128,10 @@ struct alg { { "blf", 0, 8, 5, 56, CRYPTO_BLF_CBC }, { "cast", 0, 8, 5, 16, CRYPTO_CAST_CBC }, { "skj", 0, 8, 10, 10, CRYPTO_SKIPJACK_CBC }, - { "aes", 0, 16, 16, 16, CRYPTO_RIJNDAEL128_CBC}, - { "aes192", 0, 16, 24, 24, CRYPTO_RIJNDAEL128_CBC}, - { "aes256", 0, 16, 32, 32, CRYPTO_RIJNDAEL128_CBC}, -#ifdef notdef - { "arc4", 0, 8, 1, 32, CRYPTO_ARC4 }, -#endif + { "rij", 0, 16, 16, 16, CRYPTO_RIJNDAEL128_CBC}, + { "aes", 0, 16, 16, 16, CRYPTO_AES_CBC}, + { "aes192", 0, 16, 24, 24, CRYPTO_AES_CBC}, + { "aes256", 0, 16, 32, 32, CRYPTO_AES_CBC}, { "md5", 1, 8, 16, 16, CRYPTO_MD5_HMAC }, { "sha1", 1, 8, 20, 20, CRYPTO_SHA1_HMAC }, { "sha256", 1, 8, 32, 32, CRYPTO_SHA2_256_HMAC }, @@ -139,27 +139,29 @@ struct alg { { "sha512", 1, 8, 64, 64, CRYPTO_SHA2_512_HMAC }, }; -static void +void usage(const char* cmd) { printf("usage: %s [-czsbv] [-d dev] [-a algorithm] [count] [size ...]\n", cmd); printf("where algorithm is one of:\n"); - printf(" des 3des (default) blowfish cast skipjack\n"); - printf(" aes (aka rijndael) aes192 aes256 arc4\n"); + printf(" null des 3des (default) blowfish cast skipjack rij\n"); + printf(" aes aes192 aes256 md5 sha1 sha256 sha384 sha512\n"); printf("count is the number of encrypt/decrypt ops to do\n"); printf("size is the number of bytes of text to encrypt+decrypt\n"); printf("\n"); printf("-c check the results (slows timing)\n"); - printf("-d use specific device\n"); + printf("-d use specific device, specify 'soft' for testing software implementations\n"); + printf("\tNOTE: to use software you must set:\n\t sysctl kern.cryptodevallowsoft=1\n"); printf("-z run all available algorithms on a variety of sizes\n"); printf("-v be verbose\n"); printf("-b mark operations for batching\n"); printf("-p profile kernel crypto operation (must be root)\n"); + printf("-t n for n threads and run tests concurrently\n"); exit(-1); } -static struct alg* +struct alg* getalgbycode(int cipher) { int i; @@ -170,7 +172,7 @@ getalgbycode(int cipher) return NULL; } -static struct alg* +struct alg* getalgbyname(const char* name) { int i; @@ -181,10 +183,10 @@ getalgbyname(const char* name) return NULL; } -static int +int devcrypto(void) { - static int fd = -1; + int fd = -1; if (fd < 0) { fd = open(_PATH_DEV "crypto", O_RDWR, 0); @@ -196,11 +198,14 @@ devcrypto(void) return fd; } -static int +int crlookup(const char *devname) { struct crypt_find_op find; + if (strncmp(devname, "soft", 4) == 0) + return CRYPTO_FLAG_SOFTWARE; + find.crid = -1; strlcpy(find.name, devname, sizeof(find.name)); if (ioctl(devcrypto(), CIOCFINDDEV, &find) == -1) @@ -208,10 +213,10 @@ crlookup(const char *devname) return find.crid; } -static const char * +const char * crfind(int crid) { - static struct crypt_find_op find; + struct crypt_find_op find; bzero(&find, sizeof(find)); find.crid = crid; @@ -220,7 +225,7 @@ crfind(int crid) return find.name; } -static int +int crget(void) { int fd; @@ -232,7 +237,7 @@ crget(void) return fd; } -static char +char rdigit(void) { const char a[] = { @@ -242,7 +247,7 @@ rdigit(void) return 0x20+a[random()%nitems(a)]; } -static void +void runtest(struct alg *alg, int count, int size, u_long cmd, struct timeval *tv) { int i, fd = crget(); @@ -386,7 +391,7 @@ runtest(struct alg *alg, int count, int } #ifdef __FreeBSD__ -static void +void resetstats() { struct cryptostats stats; @@ -409,7 +414,7 @@ resetstats() perror("kern.cryptostats"); } -static void +void printt(const char* tag, struct cryptotstat *ts) { uint64_t avg, min, max; @@ -424,7 +429,7 @@ printt(const char* tag, struct cryptotst } #endif -static void +void runtests(struct alg *alg, int count, int size, u_long cmd, int threads, int profile) { int i, status; @@ -464,6 +469,11 @@ runtests(struct alg *alg, int count, int if (threads > 1) { for (i = 0; i < threads; i++) if (fork() == 0) { + cpuset_t mask; + CPU_ZERO(&mask); + CPU_SET(i, &mask); + cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, + -1, sizeof(mask), &mask); runtest(alg, count, size, cmd, &tvp[i]); exit(0); } @@ -478,17 +488,10 @@ runtests(struct alg *alg, int count, int if (t) { int nops = alg->ishash ? count : 2*count; -#if 0 - t /= threads; - printf("%6.3lf sec, %7d %6s crypts, %7d bytes, %8.0lf byte/sec, %7.1lf Mb/sec\n", - t, nops, alg->name, size, (double)nops*size / t, - (double)nops*size / t * 8 / 1024 / 1024); -#else nops *= threads; printf("%8.3lf sec, %7d %6s crypts, %7d bytes, %8.0lf byte/sec, %7.1lf Mb/sec\n", t, nops, alg->name, size, (double)nops*size / t, (double)nops*size / t * 8 / 1024 / 1024); -#endif } #ifdef __FreeBSD__ if (profile) { @@ -576,6 +579,9 @@ main(int argc, char **argv) } argc--, argv++; } + if (maxthreads > CPU_SETSIZE) + errx(EX_USAGE, "Too many threads, %d, choose fewer.", maxthreads); + if (nsizes == 0) { if (alg) sizes[nsizes++] = alg->blocksize; From owner-svn-src-all@freebsd.org Sat Sep 24 15:11:29 2016 Return-Path: Delivered-To: svn-src-all@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 80947BE88F0; Sat, 24 Sep 2016 15:11:29 +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 4A754B8A; Sat, 24 Sep 2016 15:11:29 +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 u8OFBSLO033913; Sat, 24 Sep 2016 15:11:28 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OFBR1o033901; Sat, 24 Sep 2016 15:11:27 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609241511.u8OFBR1o033901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 24 Sep 2016 15:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306297 - in head: gnu/lib/libgcc gnu/lib/libgcov lib/libedit lib/libprocstat lib/libthr/support share/mk sys/conf usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 15:11:29 -0000 Author: marcel Date: Sat Sep 24 15:11:27 2016 New Revision: 306297 URL: https://svnweb.freebsd.org/changeset/base/306297 Log: When MAKEOBJDIRPREFIX points to a case-insensitive file system, the build can break when different source files create the same target 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. See also r305855 MFC after: 1 month Sponsored by: Bracket Computing Differential Revision: https://reviews.freebsd.org/D7906 Modified: head/gnu/lib/libgcc/Makefile head/gnu/lib/libgcov/Makefile head/lib/libedit/Makefile head/lib/libprocstat/Makefile head/lib/libthr/support/Makefile.inc head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/meta.autodep.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Sat Sep 24 13:44:18 2016 (r306296) +++ head/gnu/lib/libgcc/Makefile Sat Sep 24 15:11:27 2016 (r306297) @@ -258,8 +258,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} @@ -274,7 +274,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 #----------------------------------------------------------------------- @@ -298,9 +298,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} \ @@ -327,7 +327,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 @@ -341,7 +341,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: head/gnu/lib/libgcov/Makefile ============================================================================== --- head/gnu/lib/libgcov/Makefile Sat Sep 24 13:44:18 2016 (r306296) +++ head/gnu/lib/libgcov/Makefile Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Sat Sep 24 13:44:18 2016 (r306296) +++ head/lib/libedit/Makefile Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/lib/libprocstat/Makefile ============================================================================== --- head/lib/libprocstat/Makefile Sat Sep 24 13:44:18 2016 (r306296) +++ head/lib/libprocstat/Makefile Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/lib/libthr/support/Makefile.inc ============================================================================== --- head/lib/libthr/support/Makefile.inc Sat Sep 24 13:44:18 2016 (r306296) +++ head/lib/libthr/support/Makefile.inc Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sat Sep 24 13:44:18 2016 (r306296) +++ head/share/mk/bsd.dep.mk Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Sat Sep 24 13:44:18 2016 (r306296) +++ head/share/mk/bsd.lib.mk Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/share/mk/meta.autodep.mk ============================================================================== --- head/share/mk/meta.autodep.mk Sat Sep 24 13:44:18 2016 (r306296) +++ head/share/mk/meta.autodep.mk Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sat Sep 24 13:44:18 2016 (r306296) +++ head/sys/conf/kern.post.mk Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat Sep 24 13:44:18 2016 (r306296) +++ head/sys/conf/kern.pre.mk Sat Sep 24 15:11:27 2016 (r306297) @@ -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: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Sep 24 13:44:18 2016 (r306296) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Sep 24 15:11:27 2016 (r306297) @@ -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-all@freebsd.org Sat Sep 24 16:46:38 2016 Return-Path: Delivered-To: svn-src-all@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 ACF19BE839B; Sat, 24 Sep 2016 16:46:38 +0000 (UTC) (envelope-from badger@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 6BE4ABE4; Sat, 24 Sep 2016 16:46:38 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OGkbRW069550; Sat, 24 Sep 2016 16:46:37 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OGkbvj069548; Sat, 24 Sep 2016 16:46:37 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201609241646.u8OGkbvj069548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Sat, 24 Sep 2016 16:46: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: r306298 - in stable: 10/lib/libc/sys 11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 16:46:38 -0000 Author: badger Date: Sat Sep 24 16:46:37 2016 New Revision: 306298 URL: https://svnweb.freebsd.org/changeset/base/306298 Log: MFC r305956: Add manpage for rctl_* system calls Approved by: kib (mentor) Sponsored by: Dell Technologies Added: stable/11/lib/libc/sys/rctl_add_rule.2 - copied unchanged from r305956, head/lib/libc/sys/rctl_add_rule.2 Modified: stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/10/lib/libc/sys/rctl_add_rule.2 - copied unchanged from r305956, head/lib/libc/sys/rctl_add_rule.2 Modified: stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/libc/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/sys/Makefile.inc Sat Sep 24 15:11:27 2016 (r306297) +++ stable/11/lib/libc/sys/Makefile.inc Sat Sep 24 16:46:37 2016 (r306298) @@ -249,6 +249,7 @@ MAN+= abort2.2 \ pselect.2 \ ptrace.2 \ quotactl.2 \ + rctl_add_rule.2 \ read.2 \ readlink.2 \ reboot.2 \ @@ -412,6 +413,10 @@ MLINKS+=pdfork.2 pdgetpid.2\ pdfork.2 pdwait4.2 MLINKS+=pipe.2 pipe2.2 MLINKS+=poll.2 ppoll.2 +MLINKS+=rctl_add_rule.2 rctl_get_limits.2 \ + rctl_add_rule.2 rctl_get_racct.2 \ + rctl_add_rule.2 rctl_get_rules.2 \ + rctl_add_rule.2 rctl_remove_rule.2 MLINKS+=read.2 pread.2 \ read.2 preadv.2 \ read.2 readv.2 Copied: stable/11/lib/libc/sys/rctl_add_rule.2 (from r305956, head/lib/libc/sys/rctl_add_rule.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/sys/rctl_add_rule.2 Sat Sep 24 16:46:37 2016 (r306298, copy of r305956, head/lib/libc/sys/rctl_add_rule.2) @@ -0,0 +1,220 @@ +.\" Copyright (c) 2016 Eric Badger +.\" 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 September 14, 2016 +.Dt RCTL_ADD_RULE 2 +.Os +.Sh NAME +.Nm rctl_add_rule, +.Nm rctl_get_limits +.Nm rctl_get_racct, +.Nm rctl_get_rules, +.Nm rctl_remove_rule +.Nd manipulate and query the resource limits database +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/rctl.h +.Ft int +.Fo rctl_add_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_limits +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_racct +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_rules +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_remove_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Sh DESCRIPTION +These system calls are used to manipulate and query the resource limits +database. +For all functions, +.Fa inbuflen +refers to the length of the buffer pointed to by +.Fa inbufp +and +.Fa outbuflen +refers to the length of the buffer pointed to by +.Fa outbufp . +.Pp +The +.Fn rctl_add_rule +function adds the rule pointed to by +.Fa inbufp +to the resource limits database. +The +.Fa outbufp +and +.Fa outbuflen +arguments are unused. +Rule format is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +.Pp +The +.Fn rctl_get_limits +function returns in +.Fa outbufp +a comma-separated list of rules that apply to the process that +matches the filter specified in +.Fa inbufp . +This includes rules with a subject of the process itself as well as rules +with a different subject (such as user or loginclass) that apply to the +process. +.Pp +The +.Fn rctl_get_racct +function returns resource usage information for a given subject. +The subject is specified by passing a filter in +.Fa inbufp . +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +A comma-separated list of resources and the amount used of each by the +specified subject is returned in +.Fa outbufp . +The resource and amount is formatted as +.Qq resource=amount . +.Pp +The +.Fn rctl_get_rules +function returns in +.Fa outbufp +a comma-separated list of rules from the resource limits database that +match the filter passed in +.Fa inbufp . +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +A filter of +.Va :: +may be passed to return all rules. +.Pp +The +.Fn rctl_remove_rule +function removes all rules matching the filter passed in +.Fa inbufp +from the resource limits database. +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +.Fa outbufp +and +.Fa outbuflen +are unused. +.Sh RULES AND FILTERS +This section explains how the rule and filter format described in +.Xr rctl 8 +differs from the format passed to the system calls themselves. +The rctl tool provides several conveniences that the system calls do not. +When using the system call: +.Bl -dash -offset indent +.It +The subject must be fully specified. +For example, abbreviating +.Ql user +to +.Ql u +is not acceptable. +.It +User and group IDs must be numeric. +For example, +.Ql root +must be expressed as +.Ql 0 . +.It +Units are not permitted on resource amounts. +For example, a quantity of 1024 bytes must be expressed as +.Ql 1024 +and not +.Ql 1k . +.El +.Sh RETURN VALUES +.Rv -std +.Sh ERRORS +The rctl system calls may fail if: +.Bl -tag -width Er +.It Bq Er ENOSYS +RACCT/RCTL support is not present in the kernel or the +.Va kern.racct.enable +sysctl is 0. +.It Bq Er EINVAL +The rule or filter passed in +.Fa inbufp +is invalid. +.It Bq Er EPERM +User has insufficient privileges to carry out the requested operation. +.It Bq Er E2BIG +.Fa inbufp +or +.Fa outbufp +are too large. +.It Bq Er ESRCH +No process matched the provided rule or filter. +.It Bq Er ENAMETOOLONG +The loginclass or jail name specified is too long. +.It Bq Er ERANGE +The rule amount is outside of the allowable range or +.Fa outbufp +is too small. +.It Bq Er EOPNOTSUPP +The requested operation is not supported for the given rule or filter. +.It Bq Er EFAULT +.Fa inbufp +or +.Fa outbufp +refer to invalid addresses. +.El +.Sh SEE ALSO +.Xr rctl 8 +.Sh HISTORY +The rctl family of system calls appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The rctl system calls were developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. +This manual page was written by +.An Eric Badger Aq Mt badger@FreeBSD.org . From owner-svn-src-all@freebsd.org Sat Sep 24 16:46:38 2016 Return-Path: Delivered-To: svn-src-all@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 DE0DBBE83A1; Sat, 24 Sep 2016 16:46:38 +0000 (UTC) (envelope-from badger@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 A392CBE5; Sat, 24 Sep 2016 16:46:38 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OGkbWK069557; Sat, 24 Sep 2016 16:46:37 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OGkbwm069555; Sat, 24 Sep 2016 16:46:37 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201609241646.u8OGkbwm069555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Sat, 24 Sep 2016 16:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306298 - in stable: 10/lib/libc/sys 11/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 16:46:39 -0000 Author: badger Date: Sat Sep 24 16:46:37 2016 New Revision: 306298 URL: https://svnweb.freebsd.org/changeset/base/306298 Log: MFC r305956: Add manpage for rctl_* system calls Approved by: kib (mentor) Sponsored by: Dell Technologies Added: stable/10/lib/libc/sys/rctl_add_rule.2 - copied unchanged from r305956, head/lib/libc/sys/rctl_add_rule.2 Modified: stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/11/lib/libc/sys/rctl_add_rule.2 - copied unchanged from r305956, head/lib/libc/sys/rctl_add_rule.2 Modified: stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Sat Sep 24 15:11:27 2016 (r306297) +++ stable/10/lib/libc/sys/Makefile.inc Sat Sep 24 16:46:37 2016 (r306298) @@ -259,6 +259,7 @@ MAN+= abort2.2 \ pselect.2 \ ptrace.2 \ quotactl.2 \ + rctl_add_rule.2 \ read.2 \ readlink.2 \ reboot.2 \ @@ -414,6 +415,10 @@ MLINKS+=pdfork.2 pdgetpid.2\ pdfork.2 pdwait4.2 MLINKS+=pipe.2 pipe2.2 MLINKS+=poll.2 ppoll.2 +MLINKS+=rctl_add_rule.2 rctl_get_limits.2 \ + rctl_add_rule.2 rctl_get_racct.2 \ + rctl_add_rule.2 rctl_get_rules.2 \ + rctl_add_rule.2 rctl_remove_rule.2 MLINKS+=read.2 pread.2 \ read.2 preadv.2 \ read.2 readv.2 Copied: stable/10/lib/libc/sys/rctl_add_rule.2 (from r305956, head/lib/libc/sys/rctl_add_rule.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/rctl_add_rule.2 Sat Sep 24 16:46:37 2016 (r306298, copy of r305956, head/lib/libc/sys/rctl_add_rule.2) @@ -0,0 +1,220 @@ +.\" Copyright (c) 2016 Eric Badger +.\" 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 September 14, 2016 +.Dt RCTL_ADD_RULE 2 +.Os +.Sh NAME +.Nm rctl_add_rule, +.Nm rctl_get_limits +.Nm rctl_get_racct, +.Nm rctl_get_rules, +.Nm rctl_remove_rule +.Nd manipulate and query the resource limits database +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/rctl.h +.Ft int +.Fo rctl_add_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_limits +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_racct +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_rules +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_remove_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Sh DESCRIPTION +These system calls are used to manipulate and query the resource limits +database. +For all functions, +.Fa inbuflen +refers to the length of the buffer pointed to by +.Fa inbufp +and +.Fa outbuflen +refers to the length of the buffer pointed to by +.Fa outbufp . +.Pp +The +.Fn rctl_add_rule +function adds the rule pointed to by +.Fa inbufp +to the resource limits database. +The +.Fa outbufp +and +.Fa outbuflen +arguments are unused. +Rule format is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +.Pp +The +.Fn rctl_get_limits +function returns in +.Fa outbufp +a comma-separated list of rules that apply to the process that +matches the filter specified in +.Fa inbufp . +This includes rules with a subject of the process itself as well as rules +with a different subject (such as user or loginclass) that apply to the +process. +.Pp +The +.Fn rctl_get_racct +function returns resource usage information for a given subject. +The subject is specified by passing a filter in +.Fa inbufp . +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +A comma-separated list of resources and the amount used of each by the +specified subject is returned in +.Fa outbufp . +The resource and amount is formatted as +.Qq resource=amount . +.Pp +The +.Fn rctl_get_rules +function returns in +.Fa outbufp +a comma-separated list of rules from the resource limits database that +match the filter passed in +.Fa inbufp . +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +A filter of +.Va :: +may be passed to return all rules. +.Pp +The +.Fn rctl_remove_rule +function removes all rules matching the filter passed in +.Fa inbufp +from the resource limits database. +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +.Fa outbufp +and +.Fa outbuflen +are unused. +.Sh RULES AND FILTERS +This section explains how the rule and filter format described in +.Xr rctl 8 +differs from the format passed to the system calls themselves. +The rctl tool provides several conveniences that the system calls do not. +When using the system call: +.Bl -dash -offset indent +.It +The subject must be fully specified. +For example, abbreviating +.Ql user +to +.Ql u +is not acceptable. +.It +User and group IDs must be numeric. +For example, +.Ql root +must be expressed as +.Ql 0 . +.It +Units are not permitted on resource amounts. +For example, a quantity of 1024 bytes must be expressed as +.Ql 1024 +and not +.Ql 1k . +.El +.Sh RETURN VALUES +.Rv -std +.Sh ERRORS +The rctl system calls may fail if: +.Bl -tag -width Er +.It Bq Er ENOSYS +RACCT/RCTL support is not present in the kernel or the +.Va kern.racct.enable +sysctl is 0. +.It Bq Er EINVAL +The rule or filter passed in +.Fa inbufp +is invalid. +.It Bq Er EPERM +User has insufficient privileges to carry out the requested operation. +.It Bq Er E2BIG +.Fa inbufp +or +.Fa outbufp +are too large. +.It Bq Er ESRCH +No process matched the provided rule or filter. +.It Bq Er ENAMETOOLONG +The loginclass or jail name specified is too long. +.It Bq Er ERANGE +The rule amount is outside of the allowable range or +.Fa outbufp +is too small. +.It Bq Er EOPNOTSUPP +The requested operation is not supported for the given rule or filter. +.It Bq Er EFAULT +.Fa inbufp +or +.Fa outbufp +refer to invalid addresses. +.El +.Sh SEE ALSO +.Xr rctl 8 +.Sh HISTORY +The rctl family of system calls appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The rctl system calls were developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. +This manual page was written by +.An Eric Badger Aq Mt badger@FreeBSD.org . From owner-svn-src-all@freebsd.org Sat Sep 24 17:29:28 2016 Return-Path: Delivered-To: svn-src-all@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 516CEBE808E; Sat, 24 Sep 2016 17:29:28 +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 1F46D35F; Sat, 24 Sep 2016 17:29:28 +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 u8OHTRdd084595; Sat, 24 Sep 2016 17:29:27 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OHTRaQ084594; Sat, 24 Sep 2016 17:29:27 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609241729.u8OHTRaQ084594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 24 Sep 2016 17:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306299 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 17:29:28 -0000 Author: marcel Date: Sat Sep 24 17:29:27 2016 New Revision: 306299 URL: https://svnweb.freebsd.org/changeset/base/306299 Log: 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. MFC after: 1 week Modified: head/usr.bin/mkimg/mkimg.c Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Sat Sep 24 16:46:37 2016 (r306298) +++ head/usr.bin/mkimg/mkimg.c Sat Sep 24 17:29:27 2016 (r306299) @@ -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-all@freebsd.org Sat Sep 24 17:50:12 2016 Return-Path: Delivered-To: svn-src-all@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 DA6F1BE85C2; Sat, 24 Sep 2016 17:50:12 +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 AB626F94; Sat, 24 Sep 2016 17:50:12 +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 u8OHoBAJ092414; Sat, 24 Sep 2016 17:50:11 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OHoBpP092413; Sat, 24 Sep 2016 17:50:11 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609241750.u8OHoBpP092413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 24 Sep 2016 17:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306300 - head/contrib/ofed/usr.lib/libsdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 17:50:13 -0000 Author: marcel Date: Sat Sep 24 17:50:11 2016 New Revision: 306300 URL: https://svnweb.freebsd.org/changeset/base/306300 Log: When MAKEOBJDIRPREFIX points to a case-insensitive file system, the build can break when different source files create the same target 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. Missed in r306297 MFC after: 1 month Sponsored by: Bracket Computing Differential Revision: https://reviews.freebsd.org/D7906 Modified: head/contrib/ofed/usr.lib/libsdp/Makefile Modified: head/contrib/ofed/usr.lib/libsdp/Makefile ============================================================================== --- head/contrib/ofed/usr.lib/libsdp/Makefile Sat Sep 24 17:29:27 2016 (r306299) +++ head/contrib/ofed/usr.lib/libsdp/Makefile Sat Sep 24 17:50:11 2016 (r306300) @@ -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 From owner-svn-src-all@freebsd.org Sat Sep 24 19:03:06 2016 Return-Path: Delivered-To: svn-src-all@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 A8ACEBE8776; Sat, 24 Sep 2016 19:03:06 +0000 (UTC) (envelope-from np@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 5EFC2EE7; Sat, 24 Sep 2016 19:03:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OJ35Gh021737; Sat, 24 Sep 2016 19:03:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OJ35Lg021735; Sat, 24 Sep 2016 19:03:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609241903.u8OJ35Lg021735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 24 Sep 2016 19:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306301 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 19:03:06 -0000 Author: np Date: Sat Sep 24 19:03:05 2016 New Revision: 306301 URL: https://svnweb.freebsd.org/changeset/base/306301 Log: cxgbe(4): Use the port's top speed to figure out whether it is "high speed" or not (for the purpose of calculating the number of queues etc.) This does the right thing for 25Gbps and 100Gbps ports. Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_vf.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Sep 24 17:50:11 2016 (r306300) +++ head/sys/dev/cxgbe/t4_main.c Sat Sep 24 19:03:05 2016 (r306301) @@ -970,7 +970,7 @@ t4_attach(device_t dev) pi->tc = malloc(sizeof(struct tx_sched_class) * sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { n10g++; } else { n1g++; @@ -1086,7 +1086,7 @@ t4_attach(device_t dev) vi->first_rxq = rqidx; vi->first_txq = tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { vi->tmr_idx = t4_tmr_idx_10g; vi->pktc_idx = t4_pktc_idx_10g; vi->flags |= iaq.intr_flags_10g & INTR_RXQ; @@ -1110,7 +1110,7 @@ t4_attach(device_t dev) #ifdef TCP_OFFLOAD vi->first_ofld_rxq = ofld_rqidx; vi->first_ofld_txq = ofld_tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { vi->flags |= iaq.intr_flags_10g & INTR_OFLD_RXQ; vi->nofldrxq = j == 0 ? iaq.nofldrxq10g : iaq.nofldrxq_vi; Modified: head/sys/dev/cxgbe/t4_vf.c ============================================================================== --- head/sys/dev/cxgbe/t4_vf.c Sat Sep 24 17:50:11 2016 (r306300) +++ head/sys/dev/cxgbe/t4_vf.c Sat Sep 24 19:03:05 2016 (r306301) @@ -662,7 +662,7 @@ t4vf_attach(device_t dev) pi->tc = malloc(sizeof(struct tx_sched_class) * sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { n10g++; } else { n1g++; @@ -729,7 +729,7 @@ t4vf_attach(device_t dev) vi->first_rxq = rqidx; vi->first_txq = tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { vi->tmr_idx = t4_tmr_idx_10g; vi->pktc_idx = t4_pktc_idx_10g; vi->flags |= iaq.intr_flags_10g & INTR_RXQ; From owner-svn-src-all@freebsd.org Sat Sep 24 20:56:07 2016 Return-Path: Delivered-To: svn-src-all@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 24D3ABE8DC2 for ; Sat, 24 Sep 2016 20:56:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (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 E8ED7AB5 for ; Sat, 24 Sep 2016 20:56:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x235.google.com with SMTP id m79so149713162ioo.3 for ; Sat, 24 Sep 2016 13:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ckzD2YGytesyDF9XlS7IESZzo+Cc7w6t5eFvooCvEro=; b=tPtNFDhJDpb62Fx/2JnlGa5jHq9t9AYg6mIQEePxmGxY2oKS+53p4Bu3sDt80xjrJ/ a+T6+KdXWnRwM2Y7elr4rE4yCFD1phSsmjD/cJ4m2VXu5XM/XlUXPnnJcqzFngS/fOuN Q9KYXrBP0LuDJ2MsafprLP5FWPtPt1frt9CKvS2EaHKx1iMkrnCQVUcgoVJgjMKNzaNW oBls+9NNLKrYhLrM5lvdVCrr+VQl+Uia4zA53L9rh7ap2pdlJNstnhOsivntHVuoEc9O S27NMC67OQm9/wZtJN0aCpSVMyCDg2BKL75qMk1N6AhjuEWmI4fHwyHalEoaKEBg5FTM yg/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ckzD2YGytesyDF9XlS7IESZzo+Cc7w6t5eFvooCvEro=; b=DGugUGgiOY1vSG04lqGVvzvyYUxd7HMGOEVpOwVvnMfVuU/ucIIn7OUv3EI0XCODDj /okm8hoLe2FcJ6x1R/q0Zxgp4x2LFhlXxayQGnGZfAotV7bpQClrPSLuKaBU6u9CKNSA fd6M559uT6XmvgRdt0B6SG8JAqhVVeQp63mCuUiA9o+5SA+UpQOxdTIs6do3be9NkgMB FhpBoauR6X3CpWg/Zg4CYU17OS/9x1qNy6M7Gq9t8D/f8c6CcCQxyYxR7T0l0Z9peN0H ZZJwf6ca1zfjfWjinPOp2aLqwx3US6JqLIgBkMcb0S30EdOiOMO0Fu5THKchDCZwYDVX Gf7Q== X-Gm-Message-State: AE9vXwP7RCxKoY0hveI0wKjYrmdRNhiy4494fzLiY+JSxfToiBZAIf4W9EqyJWp4bvJ4TzyBVrrPOZPV/Ofbmw== X-Received: by 10.107.184.131 with SMTP id i125mr17502162iof.167.1474750566115; Sat, 24 Sep 2016 13:56:06 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Sat, 24 Sep 2016 13:56:05 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> From: Warner Losh Date: Sat, 24 Sep 2016 14:56:05 -0600 X-Google-Sender-Auth: AcZQ2OGyidtyhHgAnt6AEvzF-tw Message-ID: Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: Allan Jude Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 20:56:07 -0000 On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: > On 09/03/16 11:26 AM, Warner Losh wrote: >> Author: imp >> Date: Sat Sep 3 15:26:28 2016 >> New Revision: 305353 >> URL: https://svnweb.freebsd.org/changeset/base/305353 >> >> Log: >> Don't use -N to set the OMAGIC with data and text writeable and data >> not page aligned. To do this, use the ld script gnu ld installs on my >> system. >> >> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >> things. The loader script could be better named and take into account >> other architectures. And having two different mechanisms to do >> basically the same thing needs study. However, it's blocking forward >> progress on lld, so I'll work in parallel to sort these out. >> >> Differential Revision: https://reviews.freebsd.org/D7409 >> Reviewed by: emaste >> > > This breaks booting on my Lenovo laptop. The BTX client crashes and > dumps the registers. > > Reverting this commit solved it. > > Is there something I can do to help investigate this? I assume you bisected all boot loader changes and it fails across this commit? If not, that's the first step. If so, perhaps the place to start is with the dump? Warner From owner-svn-src-all@freebsd.org Sat Sep 24 21:26:32 2016 Return-Path: Delivered-To: svn-src-all@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 9AC08BE96A7 for ; Sat, 24 Sep 2016 21:26:32 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x235.google.com (mail-yb0-x235.google.com [IPv6:2607:f8b0:4002:c09::235]) (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 644D8C2A for ; Sat, 24 Sep 2016 21:26:32 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x235.google.com with SMTP id t5so582187yba.2 for ; Sat, 24 Sep 2016 14:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OLB2Q4JliHXlhD/Oj2gzmTgRcZeETu1oKFztlF8Jcks=; b=Ibf3KinrC2IngmClpb6CkWA2lnZu9gJIY9eCOunqFOh4jFog9RlEz9LDvXSAm2kn84 wBf5z5hI3r+8PBhLeqT+o6ajRiZmRCtMaZC5fGfbXGOri27zIH2JlbHJCH+Z/23M5PiN d8/GvwPq0bDoKEGBrCng7H+qpVAXLye5+taZWOgZGxaOkMPr6/K9gpXRSh44OQJLm6Z3 vqHHMgrcFE8kEzxQMTZ4TmyrwJ6ZfeoKRQd9zBjFBHX579Uw2ayF/CQbaCdUi7gBEEnO bYn3rFY8JTJ6qeddFpWLmAjRgMIL8K8ALdJqJQZy8P8F+0/G8rhNFHjplEAM+FBTHyUZ S0DA== 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=OLB2Q4JliHXlhD/Oj2gzmTgRcZeETu1oKFztlF8Jcks=; b=Bnt/a8Ft5tRbkoM27XPE0s4Tm+oSPUOzY+pNThl92qbAnWnuHy3mVR0CcYloTB4OkQ CgfnTeaPK1ovyCOe5jZvTIdjwK9+OIOPi2NkLTOEngTeA+wthrnbqE0EMfDy3WljaH4s VrPFeVirwbt2fv06htx28B0qnLWar4Tn6OVmu9Waf73h3ZigkFjiLQ09kBSRTSXMa9Lg O8IUOtnsatnRXNH70jwZsVCogqNZSrMA5rJxKm0viTAaa72nEs4XrUQpKon92hPv+mUb HU9z/SiheJwsQxO47qFUseeazovRkPx9LionOGklYhgPROYY2gXB75yYKMJVZ00I//lX AYIQ== X-Gm-Message-State: AE9vXwOPM14Pxl/RucZsb1C8DUiGMphIqlUbFpnK8pP2/NXMrFia8aP38lirOTrBqKwxDZLSoXhS2WIe+4f7xg== X-Received: by 10.37.162.35 with SMTP id b32mr11932324ybi.92.1474752391420; Sat, 24 Sep 2016 14:26:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Sat, 24 Sep 2016 14:26:30 -0700 (PDT) In-Reply-To: <201609232308.u8NN8OTR067832@repo.freebsd.org> References: <201609232308.u8NN8OTR067832@repo.freebsd.org> From: Ed Schouten Date: Sat, 24 Sep 2016 23:26:30 +0200 Message-ID: Subject: Re: svn commit: r306282 - head/sys/compat/cloudabi To: Mateusz Guzik Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 21:26:32 -0000 2016-09-24 1:08 GMT+02:00 Mateusz Guzik : > Log: > cloudabi: use fget_cap instead of hand-rolling capability read Thank you! -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Sat Sep 24 21:40:16 2016 Return-Path: Delivered-To: svn-src-all@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 62493BE997A; Sat, 24 Sep 2016 21:40:16 +0000 (UTC) (envelope-from markj@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 3E43B1B7; Sat, 24 Sep 2016 21:40:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OLeFUa079064; Sat, 24 Sep 2016 21:40:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OLeEwv079058; Sat, 24 Sep 2016 21:40:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609242140.u8OLeEwv079058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 24 Sep 2016 21:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306304 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/intel/dtrace cddl/contrib/opensolaris/uts/powerpc/dtrace conf modules/openso... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 21:40:16 -0000 Author: markj Date: Sat Sep 24 21:40:14 2016 New Revision: 306304 URL: https://svnweb.freebsd.org/changeset/base/306304 Log: Move implementations of uread() and uwrite() to the illumos compat layer. MFC after: 1 week Added: head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c (contents, props changed) Modified: head/sys/cddl/compat/opensolaris/sys/proc.h head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c head/sys/conf/files head/sys/modules/opensolaris/Makefile Added: head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c Sat Sep 24 21:40:14 2016 (r306304) @@ -0,0 +1,57 @@ +/*- + * Copyright 2016 Mark Johnston + * + * 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 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +int +uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) +{ + ssize_t n; + + PHOLD(p); + n = proc_readmem(curthread, p, uaddr, kaddr, len); + PRELE(p); + if (n != len) + return (ENOMEM); + return (0); +} + +int +uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) +{ + ssize_t n; + + PHOLD(p); + n = proc_writemem(curthread, p, uaddr, kaddr, len); + PRELE(p); + if (n != len) + return (ENOMEM); + return (0); +} Modified: head/sys/cddl/compat/opensolaris/sys/proc.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/proc.h Sat Sep 24 20:58:59 2016 (r306303) +++ head/sys/cddl/compat/opensolaris/sys/proc.h Sat Sep 24 21:40:14 2016 (r306304) @@ -92,6 +92,9 @@ do_thread_create(caddr_t stk, size_t stk do_thread_create(stk, stksize, proc, arg, len, pp, state, pri) #define thread_exit() kthread_exit() +int uread(proc_t *, void *, size_t, uintptr_t); +int uwrite(proc_t *, void *, size_t, uintptr_t); + #endif /* _KERNEL */ #endif /* _OPENSOLARIS_SYS_PROC_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Sep 24 20:58:59 2016 (r306303) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Sep 24 21:40:14 2016 (r306304) @@ -59,34 +59,8 @@ #include #else #include - -static int -uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_readmem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n != len) - return (ENOMEM); - return (0); -} - -static int -uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_writemem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n != len) - return (ENOMEM); - return (0); -} - #endif /* illumos */ + #ifdef __i386__ #define r_rax r_eax #define r_rbx r_ebx Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sat Sep 24 20:58:59 2016 (r306303) +++ head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sat Sep 24 21:40:14 2016 (r306304) @@ -44,32 +44,6 @@ #define OP_RA(x) (((x) & 0x001F0000) >> 16) #define OP_RB(x) (((x) & 0x0000F100) >> 11) -static int -uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_readmem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n <= 0 || n < len) - return (ENOMEM); - return (0); -} - -static int -uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_writemem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n <= 0 || n < len) - return (ENOMEM); - return (0); -} - int fasttrap_tracepoint_install(proc_t *p, fasttrap_tracepoint_t *tp) { Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Sep 24 20:58:59 2016 (r306303) +++ head/sys/conf/files Sat Sep 24 21:40:14 2016 (r306304) @@ -127,6 +127,7 @@ cddl/compat/opensolaris/kern/opensolaris cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_proc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs | dtrace compile-with "${CDDL_C}" # zfs specific Modified: head/sys/modules/opensolaris/Makefile ============================================================================== --- head/sys/modules/opensolaris/Makefile Sat Sep 24 20:58:59 2016 (r306303) +++ head/sys/modules/opensolaris/Makefile Sat Sep 24 21:40:14 2016 (r306304) @@ -9,6 +9,7 @@ SRCS= opensolaris.c \ opensolaris_cmn_err.c \ opensolaris_kmem.c \ opensolaris_misc.c \ + opensolaris_proc.c \ opensolaris_sunddi.c _A=${SYSDIR}/cddl/contrib/opensolaris/common/atomic From owner-svn-src-all@freebsd.org Sat Sep 24 21:40:25 2016 Return-Path: Delivered-To: svn-src-all@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 68918BE99A5; Sat, 24 Sep 2016 21:40:25 +0000 (UTC) (envelope-from markj@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 44246334; Sat, 24 Sep 2016 21:40:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OLeOlI079118; Sat, 24 Sep 2016 21:40:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OLeOwM079117; Sat, 24 Sep 2016 21:40:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609242140.u8OLeOwM079117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 24 Sep 2016 21:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306305 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 21:40:25 -0000 Author: markj Date: Sat Sep 24 21:40:24 2016 New Revision: 306305 URL: https://svnweb.freebsd.org/changeset/base/306305 Log: Convert checks in nd6_dad_start() and nd6_dad_timer() to assertions. In particular, these functions can assume they are operating on tentative addresses. MFC after: 2 weeks Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sat Sep 24 21:40:14 2016 (r306304) +++ head/sys/netinet6/nd6_nbr.c Sat Sep 24 21:40:24 2016 (r306305) @@ -1217,40 +1217,26 @@ nd6_dad_start(struct ifaddr *ifa, int de struct dadq *dp; char ip6buf[INET6_ADDRSTRLEN]; + KASSERT((ia->ia6_flags & IN6_IFF_TENTATIVE) != 0, + ("starting DAD on non-tentative address %p", ifa)); + /* * If we don't need DAD, don't do it. * There are several cases: - * - DAD is disabled (ip6_dad_count == 0) + * - DAD is disabled globally or on the interface * - the interface address is anycast */ - if (!(ia->ia6_flags & IN6_IFF_TENTATIVE)) { - log(LOG_DEBUG, - "nd6_dad_start: called with non-tentative address " - "%s(%s)\n", - ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr), - ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); - return; - } - if (ia->ia6_flags & IN6_IFF_ANYCAST) { - ia->ia6_flags &= ~IN6_IFF_TENTATIVE; - return; - } - if (!V_ip6_dad_count) { - ia->ia6_flags &= ~IN6_IFF_TENTATIVE; - return; - } - if (ifa->ifa_ifp == NULL) - panic("nd6_dad_start: ifa->ifa_ifp == NULL"); - if (ND_IFINFO(ifa->ifa_ifp)->flags & ND6_IFF_NO_DAD) { + if ((ia->ia6_flags & IN6_IFF_ANYCAST) != 0 || + V_ip6_dad_count == 0 || + (ND_IFINFO(ifa->ifa_ifp)->flags & ND6_IFF_NO_DAD) != 0) { ia->ia6_flags &= ~IN6_IFF_TENTATIVE; return; } - if (!(ifa->ifa_ifp->if_flags & IFF_UP) || - !(ifa->ifa_ifp->if_drv_flags & IFF_DRV_RUNNING) || - (ND_IFINFO(ifa->ifa_ifp)->flags & ND6_IFF_IFDISABLED)) { - ia->ia6_flags |= IN6_IFF_TENTATIVE; + if ((ifa->ifa_ifp->if_flags & IFF_UP) == 0 || + (ifa->ifa_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + (ND_IFINFO(ifa->ifa_ifp)->flags & ND6_IFF_IFDISABLED) != 0) return; - } + if ((dp = nd6_dad_find(ifa, NULL)) != NULL) { /* * DAD is already in progress. Let the existing entry @@ -1329,11 +1315,10 @@ nd6_dad_timer(struct dadq *dp) struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa; char ip6buf[INET6_ADDRSTRLEN]; - /* Sanity check */ - if (ia == NULL) { - log(LOG_ERR, "nd6_dad_timer: called with null parameter\n"); - goto err; - } + KASSERT(ia != NULL, ("DAD entry %p with no address", dp)); + KASSERT((ia->ia6_flags & IN6_IFF_TENTATIVE) != 0, + ("DAD entry %p for non-tentative address", dp)); + if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) { /* Do not need DAD for ifdisabled interface. */ log(LOG_ERR, "nd6_dad_timer: cancel DAD on %s because of " @@ -1347,13 +1332,6 @@ nd6_dad_timer(struct dadq *dp) ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); goto err; } - if ((ia->ia6_flags & IN6_IFF_TENTATIVE) == 0) { - log(LOG_ERR, "nd6_dad_timer: called with non-tentative address " - "%s(%s)\n", - ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr), - ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); - goto err; - } /* Stop DAD if the interface is down even after dad_maxtry attempts. */ if ((dp->dad_ns_tcount > V_dad_maxtry) && From owner-svn-src-all@freebsd.org Sat Sep 24 22:56:15 2016 Return-Path: Delivered-To: svn-src-all@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 15C6DBE8DD7; Sat, 24 Sep 2016 22:56:15 +0000 (UTC) (envelope-from julian@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 DC4EC89D; Sat, 24 Sep 2016 22:56:14 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OMuEff008784; Sat, 24 Sep 2016 22:56:14 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OMuEop008783; Sat, 24 Sep 2016 22:56:14 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201609242256.u8OMuEop008783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Sat, 24 Sep 2016 22:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306306 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Sep 2016 22:56:15 -0000 Author: julian Date: Sat Sep 24 22:56:13 2016 New Revision: 306306 URL: https://svnweb.freebsd.org/changeset/base/306306 Log: Give the user a clue as to which process hit maxfiles. MFC after: 1 week Sponsored by: Panzura Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Sep 24 21:40:24 2016 (r306305) +++ head/sys/kern/kern_descrip.c Sat Sep 24 22:56:13 2016 (r306306) @@ -1761,8 +1761,8 @@ falloc_noinstall(struct thread *td, stru priv_check(td, PRIV_MAXFILES) != 0) || openfiles >= maxfiles) { if (ppsratecheck(&lastfail, &curfail, 1)) { - printf("kern.maxfiles limit exceeded by uid %i, " - "please see tuning(7).\n", td->td_ucred->cr_ruid); + printf("kern.maxfiles limit exceeded by uid %i, (%s) " + "please see tuning(7).\n", td->td_ucred->cr_ruid, td->td_proc->p_comm); } return (ENFILE); }