From owner-svn-src-stable-10@freebsd.org Sun Nov 15 07:10:03 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF26AA2F3F9; Sun, 15 Nov 2015 07:10:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9834C13F0; Sun, 15 Nov 2015 07:10:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAF7A2kV042751; Sun, 15 Nov 2015 07:10:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAF7A2El042750; Sun, 15 Nov 2015 07:10:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201511150710.tAF7A2El042750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 15 Nov 2015 07:10: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: r290853 - stable/10/usr.sbin/rtadvd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 07:10:03 -0000 Author: delphij Date: Sun Nov 15 07:10:02 2015 New Revision: 290853 URL: https://svnweb.freebsd.org/changeset/base/290853 Log: MFC r290173: Use strlcpy(). Modified: stable/10/usr.sbin/rtadvd/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rtadvd/if.c ============================================================================== --- stable/10/usr.sbin/rtadvd/if.c Sun Nov 15 06:38:38 2015 (r290852) +++ stable/10/usr.sbin/rtadvd/if.c Sun Nov 15 07:10:02 2015 (r290853) @@ -359,8 +359,7 @@ update_persist_ifinfo(struct ifilist_hea ELM_MALLOC(ifi, exit(1)); ifi->ifi_ifindex = 0; - strncpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)-1); - ifi->ifi_ifname[sizeof(ifi->ifi_ifname)-1] = '\0'; + strlcpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)); ifi->ifi_rainfo = NULL; ifi->ifi_state = IFI_STATE_UNCONFIGURED; TAILQ_INSERT_TAIL(ifi_head, ifi, ifi_next); From owner-svn-src-stable-10@freebsd.org Sun Nov 15 07:14:19 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AFD8A2F56B; Sun, 15 Nov 2015 07:14:19 +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 1BA9118DD; Sun, 15 Nov 2015 07:14:19 +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 tAF7EITj045502; Sun, 15 Nov 2015 07:14:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAF7EIEF045501; Sun, 15 Nov 2015 07:14:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201511150714.tAF7EIEF045501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 15 Nov 2015 07:14: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: r290854 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 07:14:19 -0000 Author: delphij Date: Sun Nov 15 07:14:17 2015 New Revision: 290854 URL: https://svnweb.freebsd.org/changeset/base/290854 Log: MFC r290174: In pw_userlock, set 'name' to NULL when we encounter an all number string because it is also used as an indicator of whether a name or an UID is being used and we may have undefined results as 'name' may contain uninitialized stack contents. Modified: stable/10/usr.sbin/pw/pw_user.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Sun Nov 15 07:10:02 2015 (r290853) +++ stable/10/usr.sbin/pw/pw_user.c Sun Nov 15 07:14:17 2015 (r290854) @@ -280,9 +280,10 @@ pw_userlock(char *arg1, int mode) if (arg1 == NULL) errx(EX_DATAERR, "username or id required"); - if (arg1[strspn(arg1, "0123456789")] == '\0') + if (arg1[strspn(arg1, "0123456789")] == '\0') { id = pw_checkid(arg1, UID_MAX); - else + name = NULL; + } else name = arg1; pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id); From owner-svn-src-stable-10@freebsd.org Sun Nov 15 15:37:10 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D71DA2F09C; Sun, 15 Nov 2015 15:37:10 +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 981E11852; Sun, 15 Nov 2015 15:37:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tAFFaxMw011571 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 15 Nov 2015 17:36:59 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tAFFaxMw011571 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tAFFaxUv011570; Sun, 15 Nov 2015 17:36:59 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 15 Nov 2015 17:36:59 +0200 From: Konstantin Belousov To: David Chisnall Cc: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r290014 - in stable/10: lib/libthr/arch/amd64 lib/libthr/arch/i386 libexec/rtld-elf/amd64 libexec/rtld-elf/i386 share/mk Message-ID: <20151115153659.GD5854@kib.kiev.ua> References: <201510261621.t9QGLuL2028872@repo.freebsd.org> <71109998-711D-4ECA-9B44-5A7B1F8705F3@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <71109998-711D-4ECA-9B44-5A7B1F8705F3@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 15:37:10 -0000 On Sat, Nov 14, 2015 at 06:30:13PM +0000, David Chisnall wrote: > On 26 Oct 2015, at 16:21, Eric van Gyzen wrote: > > > > One counter-argument to this change is that most applications already > > use SIMD, and the number of applications and amount of SIMD usage > > are only increasing. > > Note that SSE and SIMD are not the same thing. The x86-64 ABI uses SSE registers for floating point arguments, so even a purely scalar application that uses floating point will end up faulting in the SSE state. This is not the case on IA32, where x87 registers are used (though when compiling for i686, SSE is used by default because register allocation for x87 is a huge pain). > Is it ? If SSE is used on i686 (AKA >= Pentium Pro) by default, this is a huge bug. From owner-svn-src-stable-10@freebsd.org Sun Nov 15 16:25:08 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1360A2FEC0; Sun, 15 Nov 2015 16:25:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 73D74160E; Sun, 15 Nov 2015 16:25:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 64761425EDD; Mon, 16 Nov 2015 03:24:59 +1100 (AEDT) Date: Mon, 16 Nov 2015 03:24:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: David Chisnall , Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r290014 - in stable/10: lib/libthr/arch/amd64 lib/libthr/arch/i386 libexec/rtld-elf/amd64 libexec/rtld-elf/i386 share/mk In-Reply-To: <20151115153659.GD5854@kib.kiev.ua> Message-ID: <20151116024035.P1071@besplex.bde.org> References: <201510261621.t9QGLuL2028872@repo.freebsd.org> <71109998-711D-4ECA-9B44-5A7B1F8705F3@FreeBSD.org> <20151115153659.GD5854@kib.kiev.ua> 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=R6/+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=nY497CfnYK0rJ_1QUHgA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 16:25:08 -0000 On Sun, 15 Nov 2015, Konstantin Belousov wrote: > On Sat, Nov 14, 2015 at 06:30:13PM +0000, David Chisnall wrote: >> On 26 Oct 2015, at 16:21, Eric van Gyzen wrote: >>> >>> One counter-argument to this change is that most applications already >>> use SIMD, and the number of applications and amount of SIMD usage >>> are only increasing. >> >> Note that SSE and SIMD are not the same thing. The x86-64 ABI uses SSE registers for floating point arguments, so even a purely scalar application that uses floating point will end up faulting in the SSE state. This is not the case on IA32, where x87 registers are used (though when compiling for i686, SSE is used by default because register allocation for x87 is a huge pain). > > Is it ? If SSE is used on i686 (AKA >= Pentium Pro) by default, > this is a huge bug. clang is not as broken as that. It needs excessive setting of -march to get SSE instructions and of course a runtime arch that has SSE to execute them. I usually see it by forcing -march=core2 or -march=native on a host arch that has SSE. Using SSE instead of x87 on i386 is a usually a small pessimization except in large functions where the x87 register set is too small or non-scalar SSE can be used, since the i386 ABI requires returning results in x87 registers and the conversions between SSE and x87 for this have large latency. But clang doesn't understand the x87 very well, so it tends to be faster using SSE despite this. Strangely, it appears to understand the x87 better on amd64 than on i386 -- better than gcc on amd64, but worse than gcc on i386. I think this is mostly because to kill SSE for arithmetic on i386 on arches that support it, all use of SSE must be killed using -mno-sse or -march=lower. -mfpmath=387 to give fine control of this is still broken in clang: -march=i386 -mfpmath=387 works, but -march=core2 -mfpmath=387 fails with "'387' not supported. Similarly for any arch that supports sse, or with -mfpmath=sse on an arch where clang wants to use x87. gcc supports -mfpmath=387 even on amd64. This is just slower, and usually not more accurate, since the ABI forces conversons on function return. Bruce From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:08:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEC55A30228; Sun, 15 Nov 2015 20:08: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 B29B01161; Sun, 15 Nov 2015 20:08: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 tAFK8YmY080751; Sun, 15 Nov 2015 20:08:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFK8Ykm080746; Sun, 15 Nov 2015 20:08:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152008.tAFK8Ykm080746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:08: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: r290875 - in stable/10: lib/libc/tests/string tools/regression/lib/libc/string X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:08:36 -0000 Author: ngie Date: Sun Nov 15 20:08:34 2015 New Revision: 290875 URL: https://svnweb.freebsd.org/changeset/base/290875 Log: MFC r290539: Integrate tools/regression/lib/libc/string into the FreeBSD test suite as lib/libc/tests/string Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/string/stpncpy_test.c - copied unchanged from r290539, head/lib/libc/tests/string/stpncpy_test.c stable/10/lib/libc/tests/string/strerror_test.c - copied unchanged from r290539, head/lib/libc/tests/string/strerror_test.c stable/10/lib/libc/tests/string/wcscasecmp_test.c - copied unchanged from r290539, head/lib/libc/tests/string/wcscasecmp_test.c stable/10/lib/libc/tests/string/wcsnlen_test.c - copied unchanged from r290539, head/lib/libc/tests/string/wcsnlen_test.c Deleted: stable/10/tools/regression/lib/libc/string/ Modified: stable/10/lib/libc/tests/string/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/string/Makefile ============================================================================== --- stable/10/lib/libc/tests/string/Makefile Sun Nov 15 20:00:00 2015 (r290874) +++ stable/10/lib/libc/tests/string/Makefile Sun Nov 15 20:08:34 2015 (r290875) @@ -1,6 +1,9 @@ # $FreeBSD$ -.include +ATF_TESTS_C+= stpncpy_test +ATF_TESTS_C+= strerror2_test +ATF_TESTS_C+= wcscasecmp_test +ATF_TESTS_C+= wcsnlen_test TESTSDIR= ${TESTSBASE}/lib/libc/string @@ -22,6 +25,8 @@ NETBSD_ATF_TESTS_C+= strrchr NETBSD_ATF_TESTS_C+= strspn NETBSD_ATF_TESTS_C+= swab +SRCS.strerror2_test= strerror_test.c + .include "../Makefile.netbsd-tests" LDADD.memchr+= -lmd Copied: stable/10/lib/libc/tests/string/stpncpy_test.c (from r290539, head/lib/libc/tests/string/stpncpy_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/string/stpncpy_test.c Sun Nov 15 20:08:34 2015 (r290875, copy of r290539, head/lib/libc/tests/string/stpncpy_test.c) @@ -0,0 +1,110 @@ +/*- + * Copyright (c) 2009 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +static char * +makebuf(size_t len, int guard_at_end) +{ + char *buf; + size_t alloc_size = roundup2(len, PAGE_SIZE) + PAGE_SIZE; + + buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); + assert(buf); + if (guard_at_end) { + assert(munmap(buf + alloc_size - PAGE_SIZE, PAGE_SIZE) == 0); + return (buf + alloc_size - PAGE_SIZE - len); + } else { + assert(munmap(buf, PAGE_SIZE) == 0); + return (buf + PAGE_SIZE); + } +} + +static void +test_stpncpy(const char *s) +{ + char *src, *dst; + size_t size, len, bufsize, x; + int i, j; + + size = strlen(s) + 1; + for (i = 0; i <= 1; i++) { + for (j = 0; j <= 1; j++) { + for (bufsize = 0; bufsize <= size + 10; bufsize++) { + src = makebuf(size, i); + memcpy(src, s, size); + dst = makebuf(bufsize, j); + memset(dst, 'X', bufsize); + len = (bufsize < size) ? bufsize : size - 1; + assert(stpncpy(dst, src, bufsize) == dst+len); + assert(memcmp(src, dst, len) == 0); + for (x = len; x < bufsize; x++) + assert(dst[x] == '\0'); + } + } + } +} + +ATF_TC_WITHOUT_HEAD(nul); +ATF_TC_BODY(nul, tc) +{ + + test_stpncpy(""); +} + +ATF_TC_WITHOUT_HEAD(foo); +ATF_TC_BODY(foo, tc) +{ + + test_stpncpy("foo"); +} + +ATF_TC_WITHOUT_HEAD(glorp); +ATF_TC_BODY(glorp, tc) +{ + + test_stpncpy("glorp"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, nul); + ATF_TP_ADD_TC(tp, foo); + ATF_TP_ADD_TC(tp, glorp); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/string/strerror_test.c (from r290539, head/lib/libc/tests/string/strerror_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/string/strerror_test.c Sun Nov 15 20:08:34 2015 (r290875, copy of r290539, head/lib/libc/tests/string/strerror_test.c) @@ -0,0 +1,206 @@ +/*- + * Copyright (c) 2001 Wes Peters + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#include + +static char buf[64]; +static char *sret; +static int iret; + +ATF_TC_WITHOUT_HEAD(strerror_unknown_error); +ATF_TC_BODY(strerror_unknown_error, tc) +{ + + errno = 0; + sret = strerror(INT_MAX); + snprintf(buf, sizeof(buf), "Unknown error: %d", INT_MAX); + ATF_CHECK(strcmp(sret, buf) == 0); + ATF_CHECK(errno == EINVAL); +} + +ATF_TC_WITHOUT_HEAD(strerror_no_error); +ATF_TC_BODY(strerror_no_error, tc) +{ + + errno = 0; + sret = strerror(0); + ATF_CHECK(strcmp(sret, "No error: 0") == 0); + ATF_CHECK(errno == 0); +} + +ATF_TC_WITHOUT_HEAD(strerror_EPERM_test); +ATF_TC_BODY(strerror_EPERM_test, tc) +{ + + errno = 0; + sret = strerror(EPERM); + ATF_CHECK(strcmp(sret, "Operation not permitted") == 0); + ATF_CHECK(errno == 0); +} + +ATF_TC_WITHOUT_HEAD(strerror_EPFNOSUPPORT_test); +ATF_TC_BODY(strerror_EPFNOSUPPORT_test, tc) +{ + + errno = 0; + sret = strerror(EPFNOSUPPORT); + ATF_CHECK(strcmp(sret, "Protocol family not supported") == 0); + ATF_CHECK(errno == 0); +} + +ATF_TC_WITHOUT_HEAD(strerror_ELAST_test); +ATF_TC_BODY(strerror_ELAST_test, tc) +{ + + errno = 0; + sret = strerror(ELAST); + ATF_CHECK(errno == 0); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__unknown_error); +ATF_TC_BODY(strerror_r__unknown_error, tc) +{ + + memset(buf, '*', sizeof(buf)); + iret = strerror_r(-1, buf, sizeof(buf)); + ATF_CHECK(strcmp(buf, "Unknown error: -1") == 0); + ATF_CHECK(iret == EINVAL); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__EPERM_one_byte_short); +ATF_TC_BODY(strerror_r__EPERM_one_byte_short, tc) +{ + + memset(buf, '*', sizeof(buf)); + /* One byte too short. */ + iret = strerror_r(EPERM, buf, strlen("Operation not permitted")); + ATF_CHECK(strcmp(buf, "Operation not permitte") == 0); + ATF_CHECK(iret == ERANGE); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__EPERM_unknown_error_one_byte_short); +ATF_TC_BODY(strerror_r__EPERM_unknown_error_one_byte_short, tc) +{ + + memset(buf, '*', sizeof(buf)); + /* One byte too short. */ + iret = strerror_r(-1, buf, strlen("Unknown error: -1")); + ATF_CHECK(strcmp(buf, "Unknown error: -") == 0); + ATF_CHECK(iret == EINVAL); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__EPERM_unknown_error_two_bytes_short); +ATF_TC_BODY(strerror_r__EPERM_unknown_error_two_bytes_short, tc) +{ + + memset(buf, '*', sizeof(buf)); + /* Two bytes too short. */ + iret = strerror_r(-2, buf, strlen("Unknown error: -2") - 1); + ATF_CHECK(strcmp(buf, "Unknown error: ") == 0); + ATF_CHECK(iret == EINVAL); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__EPERM_unknown_error_three_bytes_short); +ATF_TC_BODY(strerror_r__EPERM_unknown_error_three_bytes_short, tc) +{ + + memset(buf, '*', sizeof(buf)); + /* Three bytes too short. */ + iret = strerror_r(-2, buf, strlen("Unknown error: -2") - 2); + ATF_CHECK(strcmp(buf, "Unknown error:") == 0); + ATF_CHECK(iret == EINVAL); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__EPERM_unknown_error_12345_one_byte_short); +ATF_TC_BODY(strerror_r__EPERM_unknown_error_12345_one_byte_short, tc) +{ + + memset(buf, '*', sizeof(buf)); + /* One byte too short. */ + iret = strerror_r(12345, buf, strlen("Unknown error: 12345")); + ATF_CHECK(strcmp(buf, "Unknown error: 1234") == 0); + ATF_CHECK(iret == EINVAL); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__no_error); +ATF_TC_BODY(strerror_r__no_error, tc) +{ + + memset(buf, '*', sizeof(buf)); + iret = strerror_r(0, buf, sizeof(buf)); + ATF_CHECK(strcmp(buf, "No error: 0") == 0); + ATF_CHECK(iret == 0); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__EDEADLK); +ATF_TC_BODY(strerror_r__EDEADLK, tc) +{ + + memset(buf, '*', sizeof(buf)); + iret = strerror_r(EDEADLK, buf, sizeof(buf)); + ATF_CHECK(strcmp(buf, "Resource deadlock avoided") == 0); + ATF_CHECK(iret == 0); +} + +ATF_TC_WITHOUT_HEAD(strerror_r__EPROCLIM); +ATF_TC_BODY(strerror_r__EPROCLIM, tc) +{ + + memset(buf, '*', sizeof(buf)); + iret = strerror_r(EPROCLIM, buf, sizeof(buf)); + ATF_CHECK(strcmp(buf, "Too many processes") == 0); + ATF_CHECK(iret == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, strerror_unknown_error); + ATF_TP_ADD_TC(tp, strerror_no_error); + ATF_TP_ADD_TC(tp, strerror_EPERM_test); + ATF_TP_ADD_TC(tp, strerror_EPFNOSUPPORT_test); + ATF_TP_ADD_TC(tp, strerror_ELAST_test); + ATF_TP_ADD_TC(tp, strerror_r__unknown_error); + ATF_TP_ADD_TC(tp, strerror_r__EPERM_one_byte_short); + ATF_TP_ADD_TC(tp, strerror_r__EPERM_unknown_error_one_byte_short); + ATF_TP_ADD_TC(tp, strerror_r__EPERM_unknown_error_two_bytes_short); + ATF_TP_ADD_TC(tp, strerror_r__EPERM_unknown_error_three_bytes_short); + ATF_TP_ADD_TC(tp, strerror_r__EPERM_unknown_error_12345_one_byte_short); + ATF_TP_ADD_TC(tp, strerror_r__no_error); + ATF_TP_ADD_TC(tp, strerror_r__EDEADLK); + ATF_TP_ADD_TC(tp, strerror_r__EPROCLIM); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/string/wcscasecmp_test.c (from r290539, head/lib/libc/tests/string/wcscasecmp_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/string/wcscasecmp_test.c Sun Nov 15 20:08:34 2015 (r290875, copy of r290539, head/lib/libc/tests/string/wcscasecmp_test.c) @@ -0,0 +1,128 @@ +/*- + * Copyright (c) 2009 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(nul); +ATF_TC_BODY(nul, tc) +{ + + ATF_REQUIRE(setlocale(LC_CTYPE, "C") != NULL); + + ATF_CHECK(wcscasecmp(L"", L"") == 0); + ATF_CHECK(wcsncasecmp(L"", L"", 50) == 0); + ATF_CHECK(wcsncasecmp(L"", L"", 0) == 0); +} + +ATF_TC_WITHOUT_HEAD(wcscasecmp_equal); +ATF_TC_BODY(wcscasecmp_equal, tc) +{ + + ATF_REQUIRE(setlocale(LC_CTYPE, "C") != NULL); + + ATF_CHECK(wcscasecmp(L"abc", L"abc") == 0); + ATF_CHECK(wcscasecmp(L"ABC", L"ABC") == 0); + ATF_CHECK(wcscasecmp(L"abc", L"ABC") == 0); + ATF_CHECK(wcscasecmp(L"ABC", L"abc") == 0); +} + +ATF_TC_WITHOUT_HEAD(wcscasecmp_same_len_buffers); +ATF_TC_BODY(wcscasecmp_same_len_buffers, tc) +{ + + ATF_REQUIRE(setlocale(LC_CTYPE, "C") != NULL); + + ATF_CHECK(wcscasecmp(L"abc", L"xyz") < 0); + ATF_CHECK(wcscasecmp(L"ABC", L"xyz") < 0); + ATF_CHECK(wcscasecmp(L"abc", L"XYZ") < 0); + ATF_CHECK(wcscasecmp(L"ABC", L"XYZ") < 0); + ATF_CHECK(wcscasecmp(L"xyz", L"abc") > 0); + ATF_CHECK(wcscasecmp(L"XYZ", L"abc") > 0); + ATF_CHECK(wcscasecmp(L"xyz", L"ABC") > 0); + ATF_CHECK(wcscasecmp(L"XYZ", L"ABC") > 0); +} + +ATF_TC_WITHOUT_HEAD(wcscasecmp_mismatched_len_buffers); +ATF_TC_BODY(wcscasecmp_mismatched_len_buffers, tc) +{ + + ATF_REQUIRE(setlocale(LC_CTYPE, "C") != NULL); + + ATF_CHECK(wcscasecmp(L"abc", L"ABCD") < 0); + ATF_CHECK(wcscasecmp(L"ABC", L"abcd") < 0); + ATF_CHECK(wcscasecmp(L"abcd", L"ABC") > 0); + ATF_CHECK(wcscasecmp(L"ABCD", L"abc") > 0); +} + +ATF_TC_WITHOUT_HEAD(wcsncasecmp); +ATF_TC_BODY(wcsncasecmp, tc) +{ + + ATF_REQUIRE(setlocale(LC_CTYPE, "C") != NULL); + + ATF_CHECK(wcsncasecmp(L"abc", L"ABCD", 4) < 0); + ATF_CHECK(wcsncasecmp(L"ABC", L"abcd", 4) < 0); + ATF_CHECK(wcsncasecmp(L"abcd", L"ABC", 4) > 0); + ATF_CHECK(wcsncasecmp(L"ABCD", L"abc", 4) > 0); + ATF_CHECK(wcsncasecmp(L"abc", L"ABCD", 3) == 0); + ATF_CHECK(wcsncasecmp(L"ABC", L"abcd", 3) == 0); +} + +ATF_TC_WITHOUT_HEAD(wcscasecmp_greek); +ATF_TC_BODY(wcscasecmp_greek, tc) +{ + + ATF_REQUIRE(setlocale(LC_CTYPE, "C") != NULL); + + ATF_CHECK(wcscasecmp(L"λ", L"Λ") != 0); + ATF_REQUIRE(setlocale(LC_CTYPE, "el_GR.UTF-8") != NULL); + ATF_CHECK(wcscasecmp(L"λ", L"Λ") == 0); + ATF_CHECK(wcscasecmp(L"λ", L"Ω") < 0); + ATF_CHECK(wcscasecmp(L"Ω", L"λ") > 0); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, nul); + ATF_TP_ADD_TC(tp, wcscasecmp_equal); + ATF_TP_ADD_TC(tp, wcscasecmp_same_len_buffers); + ATF_TP_ADD_TC(tp, wcscasecmp_mismatched_len_buffers); + ATF_TP_ADD_TC(tp, wcsncasecmp); + ATF_TP_ADD_TC(tp, wcscasecmp_greek); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/string/wcsnlen_test.c (from r290539, head/lib/libc/tests/string/wcsnlen_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/string/wcsnlen_test.c Sun Nov 15 20:08:34 2015 (r290875, copy of r290539, head/lib/libc/tests/string/wcsnlen_test.c) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2009 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +static void * +makebuf(size_t len, int guard_at_end) +{ + char *buf; + size_t alloc_size = roundup2(len, PAGE_SIZE) + PAGE_SIZE; + + buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); + ATF_CHECK(buf); + if (guard_at_end) { + ATF_CHECK(munmap(buf + alloc_size - PAGE_SIZE, PAGE_SIZE) == 0); + return (buf + alloc_size - PAGE_SIZE - len); + } else { + ATF_CHECK(munmap(buf, PAGE_SIZE) == 0); + return (buf + PAGE_SIZE); + } +} + +static void +test_wcsnlen(const wchar_t *s) +{ + wchar_t *s1; + size_t size, len, bufsize; + int i; + + size = wcslen(s) + 1; + for (i = 0; i <= 1; i++) { + for (bufsize = 0; bufsize <= size + 10; bufsize++) { + s1 = makebuf(bufsize * sizeof(wchar_t), i); + wmemcpy(s1, s, bufsize); + len = (size > bufsize) ? bufsize : size - 1; + ATF_CHECK(wcsnlen(s1, bufsize) == len); + } + } +} + +ATF_TC_WITHOUT_HEAD(nul); +ATF_TC_BODY(nul, tc) +{ + + test_wcsnlen(L""); +} + +ATF_TC_WITHOUT_HEAD(foo); +ATF_TC_BODY(foo, tc) +{ + + test_wcsnlen(L"foo"); +} + +ATF_TC_WITHOUT_HEAD(glorp); +ATF_TC_BODY(glorp, tc) +{ + + test_wcsnlen(L"glorp"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, nul); + ATF_TP_ADD_TC(tp, foo); + ATF_TP_ADD_TC(tp, glorp); + + return (atf_no_error()); +} From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:11:57 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA614A30345; Sun, 15 Nov 2015 20:11: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 A6CEF13DF; Sun, 15 Nov 2015 20:11: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 tAFKBt3V083488; Sun, 15 Nov 2015 20:11:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFKBtuZ083483; Sun, 15 Nov 2015 20:11:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152011.tAFKBtuZ083483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:11: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: r290876 - in stable/10: lib/libc/tests/stdlib tools/regression/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:11:57 -0000 Author: ngie Date: Sun Nov 15 20:11:55 2015 New Revision: 290876 URL: https://svnweb.freebsd.org/changeset/base/290876 Log: MFC r290538: Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite as lib/libc/tests/stdlib - Make the code a bit more style(9) compliant - Convert a sizeof(x)/sizeof(x[0]) to nitems Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/stdlib/heapsort_test.c - copied unchanged from r290538, head/lib/libc/tests/stdlib/heapsort_test.c stable/10/lib/libc/tests/stdlib/mergesort_test.c - copied unchanged from r290538, head/lib/libc/tests/stdlib/mergesort_test.c stable/10/lib/libc/tests/stdlib/qsort_test.c - copied unchanged from r290538, head/lib/libc/tests/stdlib/qsort_test.c stable/10/lib/libc/tests/stdlib/test-sort.h - copied unchanged from r290538, head/lib/libc/tests/stdlib/test-sort.h Deleted: stable/10/tools/regression/lib/libc/stdlib/ Modified: stable/10/lib/libc/tests/stdlib/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/stdlib/Makefile ============================================================================== --- stable/10/lib/libc/tests/stdlib/Makefile Sun Nov 15 20:08:34 2015 (r290875) +++ stable/10/lib/libc/tests/stdlib/Makefile Sun Nov 15 20:11:55 2015 (r290876) @@ -1,11 +1,13 @@ # $FreeBSD$ -.include +ATF_TESTS_C+= heapsort_test +ATF_TESTS_C+= mergesort_test +ATF_TESTS_C+= qsort_test TESTSDIR= ${TESTSBASE}/lib/libc/stdlib # TODO: t_getenv_thread, t_mi_vector_hash -NETBSD_ATF_TESTS_C= abs_test +NETBSD_ATF_TESTS_C+= abs_test NETBSD_ATF_TESTS_C+= atoi_test NETBSD_ATF_TESTS_C+= div_test NETBSD_ATF_TESTS_C+= getenv_test @@ -30,6 +32,8 @@ BINDIR= ${TESTSDIR} #PROGS+= h_atexit PROGS+= h_getopt h_getopt_long +CFLAGS+= -I${.CURDIR} + .for t in h_getopt h_getopt_long CFLAGS.$t+= -I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests LDFLAGS.$t+= -L${LIBNETBSD_OBJDIR} Copied: stable/10/lib/libc/tests/stdlib/heapsort_test.c (from r290538, head/lib/libc/tests/stdlib/heapsort_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdlib/heapsort_test.c Sun Nov 15 20:11:55 2015 (r290876, copy of r290538, head/lib/libc/tests/stdlib/heapsort_test.c) @@ -0,0 +1,71 @@ +/*- + * Copyright (C) 2004 Maxim Sobolev + * 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. + */ + +/* + * Test for heapsort() routine. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "test-sort.h" + +ATF_TC_WITHOUT_HEAD(heapsort_test); +ATF_TC_BODY(heapsort_test, tc) +{ + int sresvector[IVEC_LEN]; + int testvector[IVEC_LEN]; + int i, j; + + for (j = 2; j < IVEC_LEN; j++) { + /* Populate test vectors */ + for (i = 0; i < j; i++) + testvector[i] = sresvector[i] = initvector[i]; + + /* Sort using heapsort(3) */ + heapsort(testvector, j, sizeof(testvector[0]), sorthelp); + /* Sort using reference slow sorting routine */ + ssort(sresvector, j); + + /* Compare results */ + for (i = 0; i < j; i++) + ATF_CHECK_MSG(testvector[i] == sresvector[i], + "item at index %d didn't match: %d != %d", + i, testvector[i], sresvector[i]); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, heapsort_test); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/stdlib/mergesort_test.c (from r290538, head/lib/libc/tests/stdlib/mergesort_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdlib/mergesort_test.c Sun Nov 15 20:11:55 2015 (r290876, copy of r290538, head/lib/libc/tests/stdlib/mergesort_test.c) @@ -0,0 +1,71 @@ +/*- + * Copyright (C) 2004 Maxim Sobolev + * 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. + */ + +/* + * Test for mergesort() routine. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "test-sort.h" + +ATF_TC_WITHOUT_HEAD(mergesort_test); +ATF_TC_BODY(mergesort_test, tc) +{ + int sresvector[IVEC_LEN]; + int testvector[IVEC_LEN]; + int i, j; + + for (j = 2; j < IVEC_LEN; j++) { + /* Populate test vectors */ + for (i = 0; i < j; i++) + testvector[i] = sresvector[i] = initvector[i]; + + /* Sort using mergesort(3) */ + mergesort(testvector, j, sizeof(testvector[0]), sorthelp); + /* Sort using reference slow sorting routine */ + ssort(sresvector, j); + + /* Compare results */ + for (i = 0; i < j; i++) + ATF_CHECK_MSG(testvector[i] == sresvector[i], + "item at index %d didn't match: %d != %d", + i, testvector[i], sresvector[i]); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, mergesort_test); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/stdlib/qsort_test.c (from r290538, head/lib/libc/tests/stdlib/qsort_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdlib/qsort_test.c Sun Nov 15 20:11:55 2015 (r290876, copy of r290538, head/lib/libc/tests/stdlib/qsort_test.c) @@ -0,0 +1,71 @@ +/*- + * Copyright (C) 2004 Maxim Sobolev + * 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. + */ + +/* + * Test for qsort() routine. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "test-sort.h" + +ATF_TC_WITHOUT_HEAD(qsort_test); +ATF_TC_BODY(qsort_test, tc) +{ + int testvector[IVEC_LEN]; + int sresvector[IVEC_LEN]; + int i, j; + + for (j = 2; j < IVEC_LEN; j++) { + /* Populate test vectors */ + for (i = 0; i < j; i++) + testvector[i] = sresvector[i] = initvector[i]; + + /* Sort using qsort(3) */ + qsort(testvector, j, sizeof(testvector[0]), sorthelp); + /* Sort using reference slow sorting routine */ + ssort(sresvector, j); + + /* Compare results */ + for (i = 0; i < j; i++) + ATF_CHECK_MSG(testvector[i] == sresvector[i], + "item at index %d didn't match: %d != %d", + i, testvector[i], sresvector[i]); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, qsort_test); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/stdlib/test-sort.h (from r290538, head/lib/libc/tests/stdlib/test-sort.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdlib/test-sort.h Sun Nov 15 20:11:55 2015 (r290876, copy of r290538, head/lib/libc/tests/stdlib/test-sort.h) @@ -0,0 +1,273 @@ +/*- + * Copyright (C) 2004 Maxim Sobolev + * 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$ + */ + +#ifndef _TEST_SORT_H +#define _TEST_SORT_H + +#include + +#include + +static int +sorthelp(const void *a, const void *b) +{ + const int *oa, *ob; + + oa = a; + ob = b; + /* Don't use "return *oa - *ob" since it's easy to cause overflow! */ + if (*oa > *ob) + return (1); + if (*oa < *ob) + return (-1); + return (0); +} + +/* Reference sorting routine (slooow!) */ +static void +ssort(int v[], int nmemb) +{ + int i, j, k; + + for (i = 0; i < nmemb; i++) { + for (j = i + 1; j < nmemb; j++) { + if (v[j] < v[i]) { + k = v[i]; + v[i] = v[j]; + v[j] = k; + } + } + } +} + +/* Some random data */ +static int initvector[1024] = { + 599853225, 371951333, -428880425, 1450668530, 85530178, -460170550, + -270680269, 717137591, 106244401, -1138072905, -113532586, + 599690958, 464993720, 107690177, 24249019, -1151018550, 794225588, + 1494905642, -62951716, -734531757, 1197251494, 1020063925, + -634536734, -216634704, 617366508, -18840190, 481010395, + -1555785724, 128221950, -1747743676, 1119012320, -252160437, + 617137855, 1159833073, -106647920, -1570719046, -769400990, + -130308848, 1186546396, 215253591, 445832488, 160263176, 777264170, + -274636650, -696134447, 1057957088, -626175254, 188632134, + -98941793, -1602334908, -373717125, 885013862, 571258221, + -399572192, 407761463, -733249776, 12094800, -367046815, 178974501, + -452638559, -516580143, -94282073, 1411115180, -1151792797, + 1442815268, 1106583674, 515269284, -74019972, 598818901, 696848474, + -657910766, -287309335, 1538095746, 143543003, 851444033, + -947573348, 296222973, 1339592140, -947505360, 872027891, + -418844714, -583075597, -324758197, -964531573, 1016795914, + -866842580, -304084402, -286930819, 338975583, 803597943, + -452483372, 1525283506, -1185830826, -596405894, 905191340, + -1638026278, 106749913, 582771197, -730713796, 56052422, + 1498040174, 644967266, 182541575, 280483468, -1932835017, + -435546874, 940106007, 1753388509, -340355019, -231577358, + -714879035, 1051182949, 204261785, 1321346243, -895289878, + -240369893, 566608506, -350777580, -1384849829, -876816409, + 1013787299, -1408035937, -222626650, 1708168486, -645148461, + 1854654, -393012507, 179327030, -1607975548, -715202732, 730588290, + 246968517, -550975254, -101136772, -174103176, 1188941016, + 2004650834, -1501389866, -2021225998, 1219042515, -464113898, + 268565342, 126451123, -1045877126, -198918003, 310177444, + 1578314812, 1828867082, 453336898, -908485523, 749777130, + -1028565802, 61360571, 241484853, -175693399, 1816211059, + 533940889, -1496933703, 385185125, -821132413, -8923391, + -1429546239, 46190992, 449247332, -20432494, 778761611, -178782699, + -811194695, -632276211, 70196094, 890817525, -1447776908, + -323783741, -62333222, 954929503, 247668507, -1394420605, + 367913886, 1364926759, 1298781924, 357923028, -73644747, + -319744305, 61718202, -1454549286, 387493522, 2018321449, + 861026653, 289973298, 1755939093, -84772204, 43425266, -1325753781, + -679938775, 1228500370, -763816405, 548903035, 1765563727, + 425183052, 1424621863, -188287424, 554385654, 751831998, + 1377088085, 66622090, 139224450, -1305816167, 650140724, 593988868, + -444913321, 589045097, 1261428989, 101292769, -780376786, + 559307348, 1644593236, -1838606833, 53570301, -680576100, + -44969538, 268718267, -632104125, 276904628, 626299449, -11761453, + 545899086, -1027343598, -432251872, 539353494, -399575006, + -568383580, -677802882, 1296513472, 801202048, 806425805, 1983363, + 850487421, 38046173, 1535399484, 1998285544, -1301751898, + -46561973, 56545408, -1107662676, 456041145, -452923904, + -262219453, -371849200, 392524281, 1650231392, 1185585356, + 126610511, -1125389657, 1015981177, -1318481342, -213835789, + 1263484054, -654361441, 1408272041, -231555284, -1121778152, + -395512897, 332277674, -349703586, 1809474399, -223731607, + -1342224737, 736165236, 67535587, 89879082, 471445838, 423788300, + -384354470, 907475706, 154886390, -1406736539, -8558766, + -203405718, -422127884, 1048520863, 747418501, 87438975, 727668160, + -914936981, 428266976, -455742009, -949014605, 487159058, + -262526850, -309451504, -76928461, 1072951428, -1370953830, + 238231681, -1831047244, -405735199, -35941848, 469048670, + 505307987, -660553590, 876537439, -314195871, 999234339, + -1405846240, -579885695, 629067031, 863481510, -742301385, + -1723403128, -153070386, 782682839, -343111818, -877101810, + 1438467302, -319951459, -1585702508, -338381888, 484108815, + -1726935191, -749923706, 1657932127, -816151395, -566321865, + -133542331, 84961164, 598275578, 1302065347, -533098653, + -1766383037, 53169714, -464201288, 617735133, 862536123, + -141730724, -1967377125, -1023736305, -1012511106, 64484992, + -1250856831, 426409332, -355670055, -298251663, -867634978, + -776124819, 74018333, -425385214, -108004251, -1192766130, + 1294193867, -109867195, -78667637, 1164855393, -826007552, + -522528066, 1160283046, -1095276403, -1218917472, -396475366, + -77394733, -425603169, 251928357, -393559355, 1488845184, + 898455978, -773338691, -37627855, -345014717, 204298578, 209084274, + 1047080643, -414348222, 26496664, 705759824, 575149152, 604904761, + 624988690, 1446041250, 1000757225, -1354896151, 1422958189, + -1607165311, -832757521, 365074225, 1171764999, 1200795217, + -203957828, 23166236, -846818698, -547439867, -790192498, + -122123561, 914298013, 66225525, -36163174, -480698856, + -1269421818, 624641703, 254923102, 1564329013, -583609221, + -649433551, -743396069, 1182455435, 102658744, 285599336, + 692480463, -852737563, -660090184, 1374350065, 72300985, 690541659, + -1194212957, -1151816525, 157415641, 487398246, 1030153072, + 933723020, 1359181027, -1303457764, -1543773272, 774306017, + -854382652, 755485667, -864943584, -63242545, -1271480354, + 157720215, -205001173, 889984130, -581583822, -473779111, + -932136577, 735326252, 428638717, 1888884222, 561493709, + -1966427364, -1710208603, 340121869, 918894036, 927172509, + 904178436, 1476687667, 90796414, 651591731, -550913123, -42218158, + 637756529, 1091478400, 124976584, -48739309, -798898083, 393581349, + -1078624722, -789291577, 1010582542, -512317005, 1222773656, + 466454593, 1183558811, 822782663, -851624703, -850404012, + 1473672600, 852527073, 1073953362, 137635828, 936104739, -86567759, + -882563252, 1845232980, -737978404, -104703380, 149802989, + -349118325, 1479797538, 1966007488, 1254228842, 414304661, + -790805785, 31583329, -76864151, 558202855, -1447047313, 716720607, + -404224238, -54107627, 1747385914, -657407390, 202940208, + 1083067056, -532861378, 163426933, -130289277, 1301785258, + -302920320, -637947485, -644895903, -1668027530, 391890467, + -126586485, -536836984, -1154536413, -339505118, -1187229462, + -670985870, -601310813, -1350055158, -482479784, 139847714, + -253955849, 5190414, -542857077, 1175835684, -584165057, + 1132775766, -592091269, -891445655, -340995936, 736395810, + 779967964, 515095845, -1138437307, -259226729, -167820100, + -801611617, -282451622, -1313679283, -1436126694, 1258773990, + -717601098, -583559645, -1307478759, 1238647247, 1589011223, + -1029216445, -107030650, 400152690, -1349079913, 1428582247, + 21546946, 208807686, -169450574, -1086213374, -1242715198, + 669098277, 416626722, -1122525014, -1389466669, -391843085, + -56318357, 421040094, 212303518, 738666684, -1185364904, + -506192760, 646735912, -1424722633, 745226976, 1019191717, + -190891744, -310320868, -373655022, -665117060, 830760000, + 583906512, -330536027, 611092636, -321344259, -1255008904, + -777959046, -523043472, 88896910, 346062204, -163734816, 336635665, + 906060268, -128891583, 740952564, 916767203, 296514859, 198670559, + 358136672, -152253676, 12038867, -1469916749, -1020980597, + -897143313, 354240970, -97959800, 814172811, 1983363241, 264990663, + 105154676, 1060463014, 430172143, 375111946, -824526943, + -708877751, -1377442616, -236559551, 684724584, 1602131358, + -42140186, -763499840, -605167, 98575879, -376577598, 1689746083, + -777973879, -1396984691, -187780326, 281040966, 1858859521, + 158395760, 1022807978, -218458812, 811779708, 1495113833, + 1192561226, 629539535, -1365196683, -1120253162, 1091681956, + 134286445, 1172218369, -34093658, -137087343, -27869226, + -180889478, 55705436, 52362743, -1745516232, -926564477, + -513701675, -1666272054, 1457952810, 843953275, -478275722, + -1240291080, 101859661, -1606687523, 916365333, 314713310, + -22002688, 1019022641, -1171741314, -129050627, -211955813, + -1020176299, 1357865293, -609819628, 724533854, -1141449545, + 22285231, -97731145, -302329687, 191910894, -1300709885, + -644951895, 640448036, -1289009824, 1445456129, 846416471, + 1821291740, -1639640821, -712724532, -447475807, 132156847, + 258067455, 324301319, 278586969, -1544082357, 636007277, 977122066, + 127462480, 365126129, 1086276825, -432124148, 896598926, + -388550179, 273357331, -845018695, -1089465389, 384439820, + -558419772, 1476422025, 730712769, 190665059, -764968927, + -789708218, 637873581, 348429858, 1386000168, -638123594, + -842010345, -607926448, 19535163, -742771490, -18323344, 246155488, + 350409468, 1290907730, -492566468, 300358636, 501876267, 252441807, + 1233551975, -1431067042, 517177374, -1540299707, -948380761, + 1253997663, 693795998, 148707823, 152894502, 98729538, -30042824, + -563057441, 723726409, 367338961, 1395435261, 217868876, + 1220652431, 953572083, -1134905155, -734486813, -587470130, + -864647866, 1030737023, 781798521, -321076732, -460548153, + 122681678, -873728847, -1286304399, -75472885, 113390881, + -1556849198, -1070802176, 924389470, 957478910, 5974049, 709413506, + 476334647, 572869787, 776298405, -8822420, -99326499, -707855342, + -1187216303, 668038414, 262454769, -1120293198, -32011040, + 249812104, -101835410, 1082281087, -570183855, -954535179, + 1384361473, -983199686, 2017611313, 328926483, -878162849, + -1202254181, -225604951, 966898955, 247213529, -1257544612, + -197005970, -1039902730, -1947925142, 1752780907, -313410699, + -464474556, 416580338, -1063356643, -292212702, 57509168, + 1034124629, 1059212593, 468522867, 845369497, 1872717306, + -1216544764, -1419907623, 1376869956, -66585488, -1590974467, + -367070705, -1456529060, 791844031, 336217635, -1106832215, + 1476739427, -751018210, -1411671555, -1880387375, -1714242595, + 1169006474, -479442380, -892267555, -1471250266, -267888858, + 808634418, 1324777189, -585449929, 1127186951, 468768901, + -2002989138, -52352849, 186493053, 1258464606, 117157186, + 445919258, 908401949, -1112221136, 863904453, -942718649, + 796754809, -38943966, -781978872, -56814078, 1273857459, + -1781920832, 209979504, 811828269, -1150814437, 850061883, + -532968763, 252506408, -885025629, 391567580, -1295702482, + 574894420, 1462248349, 1622584325, -88443443, -1122006092, + -169758578, 456282338, -443233309, 436693483, -956563815, + -480221349, 435252860, -1114099391, 1060053979, -470893945, + -1273682879, -734596176, 639950927, -1278648701, 306274747, + -410562146, 1137869228, -1970746553, 1313830798, 1248071822, + -247297704, 1015218053, -1607348116, -261817613, -821413148, + -782942639, -628711083, 240953091, -629550668, -1584736319, + 856616893, -186759752, 197905373, 541638393, 603407919, -278480495, + 410077039, 544065371, -1509627427, 402918436, -450463799, + -131169308, 249920630, 1079548609, -927911828, 1444577689, + -353002528, -224292462, 1247795279, -790844631, -40427503, + 59829765, -332587567, 1319862109, -1261340753, 121711726, + 1342756342, -643495787, 100326201, -934436714, -69134888, + -898880561, -379524737, -577234570, -805827092, -1575493557, + -289920678, -476605057, 1235714994, -317239591, 418553949, + 410053338, -204985448, 1206503615, 202610372, -932244873, + 782207875, -288661931, -806814809, 1270953679, 2060991595, + -311412846, 327279979, 1148562672, 55239149, -610114433, + -1511688434, 87619740, -433503545, 326150519, -581293393, + -97417688, -289736140, -1543886029, -1251976119, 1585774446, + 1570011421, 432602745, 486343696, -834680922, 265004849, + -1132107706, 502627197, -815873818, 249635389, 1985714127, + -1095817653, -130743522, -645266828, -334621094, 199921747, + 1059256177, 378031303, 1519740920, 925540689, 1405957844, + 1387748290, -56138046, -770637828, -187984510, -1361735163, + 1294823206, -608941238, 451860688, -510549867, 1143516283, + -779090703, 1459305047, -600335915, -1684168049, 1516622316, + -631733335, -4360068, 499778796, 587600402, -1296000335, -37959743, + -1084203927, 1162902556, 246374600, -515103645, 341724568, + -702303954, 452229900, 485108287, 1170048553, -1510148355, + 611133912, 1997927484, -142022671, -724776653, -336090522, + 708283514, -1409637378, -2052637687, 376055110, 226628105, + -1714452033, -1776158002, 369167930, 1800807012, 710680889, + -69951947, -1223849766, -1862239787, 218536127, -656411794, + -1202269188, 609634805, -224425858, 519797951, 284223080, + 869408930, 270750206, -544967439, 2097168510, 31650971, -600985417, + -165303097, -257809088, -1043223971, 1827891621, -156827355, + 499719603 +}; + +#define IVEC_LEN (nitems(initvector)) + +#endif From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:14:55 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C33CA3039B; Sun, 15 Nov 2015 20:14:55 +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 3284517CB; Sun, 15 Nov 2015 20:14:55 +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 tAFKEsV7083644; Sun, 15 Nov 2015 20:14:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFKEsve083643; Sun, 15 Nov 2015 20:14:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152014.tAFKEsve083643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:14:54 +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: r290877 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:14:55 -0000 Author: ngie Date: Sun Nov 15 20:14:54 2015 New Revision: 290877 URL: https://svnweb.freebsd.org/changeset/base/290877 Log: MFC r289896: Make vers.c creation atomic by using a temporary file, then moving the temporary file to vers.c at the end of the script The previous logic wrote out to vers.c multiple times, so the file could be incorrectly interpreted as being completely written out after one of the echo calls with recursive make, when in reality it was only partially written. Also, in the event the build was interrupted when creating vers.c (small race window), it would have a leftover file that needed to be cleaned up before resuming the build. Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/boot/common/newvers.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/newvers.sh ============================================================================== --- stable/10/sys/boot/common/newvers.sh Sun Nov 15 20:11:55 2015 (r290876) +++ stable/10/sys/boot/common/newvers.sh Sun Nov 15 20:14:54 2015 (r290877) @@ -32,12 +32,16 @@ # # @(#)newvers.sh 8.1 (Berkeley) 4/20/94 +tempfile=$(mktemp tmp.XXXXXX) || exit +trap "rm -f $tempfile" EXIT INT TERM + LC_ALL=C; export LC_ALL u=${USER-root} h=${HOSTNAME-`hostname`} t=`date` #r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '` r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` -echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > vers.c -echo "char bootprog_rev[] = \"${r}\";" >> vers.c -echo "char bootprog_date[] = \"${t}\";" >> vers.c -echo "char bootprog_maker[] = \"${u}@${h}\";" >> vers.c +echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > $tempfile +echo "char bootprog_rev[] = \"${r}\";" >> $tempfile +echo "char bootprog_date[] = \"${t}\";" >> $tempfile +echo "char bootprog_maker[] = \"${u}@${h}\";" >> $tempfile +mv $tempfile vers.c From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:23:11 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED390A3055C; Sun, 15 Nov 2015 20:23:10 +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 AC0621DE7; Sun, 15 Nov 2015 20:23:10 +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 tAFKN9fQ086959; Sun, 15 Nov 2015 20:23:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFKN9L5086956; Sun, 15 Nov 2015 20:23:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152023.tAFKN9L5086956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:23: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: r290879 - in stable/10: share/man/man4 share/man/man5 tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:23:11 -0000 Author: ngie Date: Sun Nov 15 20:23:09 2015 New Revision: 290879 URL: https://svnweb.freebsd.org/changeset/base/290879 Log: MFC r290659,r290660: r290659: - Move ng_bluetooth.4 under MK_BLUETOOTH != no - Move all section 5 bluetooth manpages under MK_BLUETOOTH != no PR: 193260 Reported by: Philippe Michel Sponsored by: EMC / Isilon Storage Division r290660: Move the MK_BLUETOOTH block down below the architecture specific sections by the other generic options PR: 193260 Sponsored by: EMC / Isilon Storage Divisions Modified: stable/10/share/man/man4/Makefile stable/10/share/man/man5/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sun Nov 15 20:20:03 2015 (r290878) +++ stable/10/share/man/man4/Makefile Sun Nov 15 20:23:09 2015 (r290879) @@ -297,7 +297,6 @@ MAN= aac.4 \ ng_atm.4 \ ngatmbase.4 \ ng_atmllc.4 \ - ng_bluetooth.4 \ ng_bpf.4 \ ng_bridge.4 \ ng_bt3c.4 \ @@ -816,6 +815,10 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_BLUETOOTH} != "no" +MAN+= ng_bluetooth.4 +.endif + .if ${MK_CCD} != "no" _ccd.4= ccd.4 .endif Modified: stable/10/share/man/man5/Makefile ============================================================================== --- stable/10/share/man/man5/Makefile Sun Nov 15 20:20:03 2015 (r290878) +++ stable/10/share/man/man5/Makefile Sun Nov 15 20:23:09 2015 (r290879) @@ -7,9 +7,6 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ - bluetooth.device.conf.5 \ - bluetooth.hosts.5 \ - bluetooth.protocols.5 \ ${_boot.config.5} \ core.5 \ devfs.5 \ @@ -83,6 +80,12 @@ MLINKS+=resolver.5 resolv.conf.5 MAN+= autofs.5 .endif +.if ${MK_BLUETOOTH} != "no" +MAN+= bluetooth.device.conf.5 \ + bluetooth.hosts.5 \ + bluetooth.protocols.5 +.endif + .if ${MK_FREEBSD_UPDATE} != "no" MAN+= freebsd-update.conf.5 .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 15 20:20:03 2015 (r290878) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 15 20:23:09 2015 (r290879) @@ -296,6 +296,10 @@ OLD_FILES+=usr/share/man/man3/sdp_regist OLD_FILES+=usr/share/man/man3/sdp_search.3.gz OLD_FILES+=usr/share/man/man3/sdp_unregister_service.3.gz OLD_FILES+=usr/share/man/man3/sdp_uuid2desc.3.gz +OLD_FILES+=usr/share/man/man4/ng_bluetooth.4.gz +OLD_FILES+=usr/share/man/man5/bluetooth.device.conf.5.gz +OLD_FILES+=usr/share/man/man5/bluetooth.hosts.5.gz +OLD_FILES+=usr/share/man/man5/bluetooth.protocols.5.gz OLD_FILES+=usr/share/man/man5/hcsecd.conf.5.gz OLD_FILES+=usr/share/man/man8/bcmfw.8.gz OLD_FILES+=usr/share/man/man8/bt3cfw.8.gz From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:30:55 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E941A30728; Sun, 15 Nov 2015 20:30:55 +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 49E331359; Sun, 15 Nov 2015 20:30:55 +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 tAFKUsKs090022; Sun, 15 Nov 2015 20:30:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFKUsYB090021; Sun, 15 Nov 2015 20:30:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152030.tAFKUsYB090021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:30:54 +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: r290881 - stable/10/lib/libc/tests/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:30:55 -0000 Author: ngie Date: Sun Nov 15 20:30:54 2015 New Revision: 290881 URL: https://svnweb.freebsd.org/changeset/base/290881 Log: MFC r290571: Fix some TAP -> ATF conversion errors - Remove a leftover printf from when this was a TAP based testcase - Catch mmap failures properly Sponsored by: EMC / Isilon Storage Division Modified: stable/10/lib/libc/tests/gen/arc4random_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/gen/arc4random_test.c ============================================================================== --- stable/10/lib/libc/tests/gen/arc4random_test.c Sun Nov 15 20:25:26 2015 (r290880) +++ stable/10/lib/libc/tests/gen/arc4random_test.c Sun Nov 15 20:30:54 2015 (r290881) @@ -30,10 +30,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include + #include /* @@ -56,14 +58,9 @@ ATF_TC_BODY(test_arc4random, tc) pid_t pid; char c; - printf("1..1\n"); - page = mmap(NULL, sizeof(struct shared_page), PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); - if (page == MAP_FAILED) { - printf("fail 1 - mmap\n"); - exit(1); - } + ATF_REQUIRE_MSG(page != MAP_FAILED, "mmap failed; errno=%d", errno); arc4random_buf(&c, 1); From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:44:03 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BD40A30A2D; Sun, 15 Nov 2015 20:44:03 +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 17B271B5D; Sun, 15 Nov 2015 20:44: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 tAFKi2Ic093709; Sun, 15 Nov 2015 20:44:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFKi2hs093708; Sun, 15 Nov 2015 20:44:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152044.tAFKi2hs093708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:44: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: r290882 - stable/10/usr.sbin/makefs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:44:03 -0000 Author: ngie Date: Sun Nov 15 20:44:01 2015 New Revision: 290882 URL: https://svnweb.freebsd.org/changeset/base/290882 Log: MFC r290260,r290262: r290260: Document undocumented long options for -t cd9660 Note which options have been implemented and which options haven't been implemented Submitted as the following NetBSD PRs: bin/50390 and bin/50392 Sponsored by: EMC / Isilon Storage Division r290262: Fix spelling of `isolevel` cd9660 option Sponsored by: EMC / Isilon Storage Division Modified: stable/10/usr.sbin/makefs/makefs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/10/usr.sbin/makefs/makefs.8 Sun Nov 15 20:30:54 2015 (r290881) +++ stable/10/usr.sbin/makefs/makefs.8 Sun Nov 15 20:44:01 2015 (r290882) @@ -301,10 +301,10 @@ The following keywords are supported: .It Sy allow-deep-trees Allow the directory structure to exceed the maximum specified in the spec. -.\" .It Sy allow-illegal-chars -.\" Unknown -.\" .It Sy allow-lowercase -.\" Unknown +.It Sy allow-illegal-chars +Allow illegal characters in filenames. This option is not implemented. +.It Sy allow-lowercase +Allow lowercase characters in filenames. This option is not implemented. .It Sy allow-max-name Allow 37 instead of 33 characters for filenames by omitting the version id. @@ -318,6 +318,8 @@ Use the extension to encode .Tn RISC OS metadata. +.It Sy bootimagedir +Boot image directory. This option is not implemented. .It Sy chrp-boot Write an MBR partition table to the image to allow older CHRP hardware to boot. @@ -338,6 +340,16 @@ or Load a generic boot image into the first 32K of the cd9660 image. .It Sy hard-disk-boot Boot image is a hard disk image. +.It Sy isolevel +An integer representing the ISO 9660 interchange level where +.Dq level +is either +.Ql 1 +or +.Ql 2 . +.Dq level +.Ql 3 +is not implemented. .It Sy keep-bad-images Do not throw away images whose write was aborted due to an error. For debugging purposes. @@ -351,14 +363,16 @@ Boot image is a ElTorito image. .It Sy no-trailing-padding Do not pad the image (apparently Linux needs the padding). -.\" .It Sy omit-trailing-period -.\" Unknown +.It Sy omit-trailing-period +Omit trailing periods in filenames. .It Sy preparer Preparer ID of the image. .It Sy publisher Publisher ID of the image. .It Sy rockridge Use RockRidge extensions (for longer filenames, etc.). +.It Sy verbose +Turns on verbose output. .It Sy volumeid Volume set identifier of the image. .El From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:48:12 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29C2FA30B2A; Sun, 15 Nov 2015 20:48:12 +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 F1E771E3D; Sun, 15 Nov 2015 20:48:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAFKmBVo093988; Sun, 15 Nov 2015 20:48:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFKmBbE093987; Sun, 15 Nov 2015 20:48:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152048.tAFKmBbE093987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:48: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: r290884 - stable/10/usr.sbin/makefs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:48:12 -0000 Author: ngie Date: Sun Nov 15 20:48:10 2015 New Revision: 290884 URL: https://svnweb.freebsd.org/changeset/base/290884 Log: MFC r290259,r290601: r290259: Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53 Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and options have been omitted. Obtained from: NetBSD Sponsored by: EMC / Isilon Storage Division r290601: Follow up to r290259 dealing with makefs(8) - Don't use contractions (don't -> do not) - Change "throw away" to "discard" when describing the -o keep-bad-images option - Revert author e-mail split I brought over from NetBSD, effectively reverting the change bapt made in r267668 Submitted by: bjk Sponsored by: EMC / Isilon Storage Division Modified: stable/10/usr.sbin/makefs/makefs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/10/usr.sbin/makefs/makefs.8 Sun Nov 15 20:44:22 2015 (r290883) +++ stable/10/usr.sbin/makefs/makefs.8 Sun Nov 15 20:48:10 2015 (r290884) @@ -44,10 +44,10 @@ .Sh SYNOPSIS .Nm .Op Fl DxZ -.Op Fl B Ar byte-order +.Op Fl B Ar endian .Op Fl b Ar free-blocks .Op Fl d Ar debug-mask -.Op Fl F Ar specfile +.Op Fl F Ar mtree-specfile .Op Fl f Ar free-files .Op Fl M Ar minimum-size .Op Fl m Ar maximum-size @@ -69,9 +69,9 @@ from the directory tree .Ar directory or from the mtree manifest .Ar manifest . -If optional directory tree +If any optional directory trees are passed in the .Ar extra-directory -is passed, then the directory tree of each argument will be merged +arguments, then the directory tree of each argument will be merged into the .Ar directory or @@ -82,9 +82,9 @@ No special devices or privileges are req .Pp The options are as follows: .Bl -tag -width flag -.It Fl B Ar byte-order +.It Fl B Ar endian Set the byte order of the image to -.Ar byte-order . +.Ar endian . Valid byte orders are .Ql 4321 , .Ql big , @@ -114,9 +114,9 @@ Enable various levels of debugging, depe set in .Ar debug-mask . XXX: document these -.It Fl F Ar specfile +.It Fl F Ar mtree-specfile Use -.Ar specfile +.Ar mtree-specfile as an .Xr mtree 8 .Sq specfile @@ -174,13 +174,13 @@ Set the maximum size of the file system .Ar maximum-size . An error will be raised if the target file system needs to be larger than this to accommodate the provided directory tree. -.It Fl N Ar dbdir +.It Fl N Ar userdb-dir Use the user database text file .Pa master.passwd and group database text file .Pa group from -.Ar dbdir , +.Ar userdb-dir , rather than using the results from the system's .Xr getpwnam 3 and @@ -226,7 +226,9 @@ ISO 9660 file system. .It Fl x Exclude file system nodes not explicitly listed in the specfile. .It Fl Z -Create the image as a sparse file. +Create a sparse file for +.Sy ffs . +This is useful for virtual machine images. .El .Pp Where sizes are specified, a decimal number of bytes is expected. @@ -351,7 +353,7 @@ or .Ql 3 is not implemented. .It Sy keep-bad-images -Do not throw away images whose write was aborted due to an error. +Do not discard images whose write was aborted due to an error. For debugging purposes. .It Sy label Label name of the image. @@ -386,9 +388,8 @@ The utility appeared in .Nx 1.6 . .Sh AUTHORS -.An Luke Mewburn -.Aq lukem@NetBSD.org -(original program) +.An Luke Mewburn Aq Mt lukem@NetBSD.org +(original program), .An Daniel Watt , .An Walter Deignan , .An Ryan Gabrys , From owner-svn-src-stable-10@freebsd.org Sun Nov 15 20:49:04 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C80B4A30B74; Sun, 15 Nov 2015 20:49: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 925D91F9C; Sun, 15 Nov 2015 20:49:04 +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 tAFKn3Fh094058; Sun, 15 Nov 2015 20:49:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFKn3i7094057; Sun, 15 Nov 2015 20:49:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152049.tAFKn3i7094057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 20:49: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: r290885 - stable/10/usr.sbin/makefs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 20:49:04 -0000 Author: ngie Date: Sun Nov 15 20:49:03 2015 New Revision: 290885 URL: https://svnweb.freebsd.org/changeset/base/290885 Log: Bump .Dd Modified: stable/10/usr.sbin/makefs/makefs.8 Modified: stable/10/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/10/usr.sbin/makefs/makefs.8 Sun Nov 15 20:48:10 2015 (r290884) +++ stable/10/usr.sbin/makefs/makefs.8 Sun Nov 15 20:49:03 2015 (r290885) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2015 +.Dd November 15, 2015 .Dt MAKEFS 8 .Os .Sh NAME From owner-svn-src-stable-10@freebsd.org Sun Nov 15 21:56:16 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC4ABA2FBD4; Sun, 15 Nov 2015 21:56: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 9562317E9; Sun, 15 Nov 2015 21:56: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 tAFLuFQI018010; Sun, 15 Nov 2015 21:56:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFLuFdK018009; Sun, 15 Nov 2015 21:56:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152156.tAFLuFdK018009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 21:56: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: r290890 - stable/10/usr.bin/tar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 21:56:16 -0000 Author: ngie Date: Sun Nov 15 21:56:15 2015 New Revision: 290890 URL: https://svnweb.freebsd.org/changeset/base/290890 Log: MFC r283245: r283245 (by imp): Remove stray DEBUG_FLAGS=-g that snuck in with r184761. Modified: stable/10/usr.bin/tar/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/tar/Makefile ============================================================================== --- stable/10/usr.bin/tar/Makefile Sun Nov 15 21:44:10 2015 (r290889) +++ stable/10/usr.bin/tar/Makefile Sun Nov 15 21:56:15 2015 (r290890) @@ -39,7 +39,6 @@ CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBA CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 -DEBUG_FLAGS=-g .PHONY: check test clean-test check test: $(PROG) bsdtar.1.gz From owner-svn-src-stable-10@freebsd.org Sun Nov 15 22:13:43 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72440A300B1; Sun, 15 Nov 2015 22:13:43 +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 4AC2C11A1; Sun, 15 Nov 2015 22:13:43 +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 tAFMDgKR024285; Sun, 15 Nov 2015 22:13:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFMDf9W024278; Sun, 15 Nov 2015 22:13:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152213.tAFMDf9W024278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 22:13:41 +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: r290892 - in stable/10: etc/mtree lib/libarchive lib/libarchive/test lib/libarchive/tests usr.bin/cpio usr.bin/cpio/test usr.bin/cpio/tests usr.bin/tar usr.bin/tar/test usr.bin/tar/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 22:13:43 -0000 Author: ngie Date: Sun Nov 15 22:13:41 2015 New Revision: 290892 URL: https://svnweb.freebsd.org/changeset/base/290892 Log: MFC r289195: Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to the FreeBSD test suite functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided by upstream. A handful of testcases in lib/libarchive/tests have been disabled as they were failing when run with kyua test (see BROKEN_TESTS in lib/libarchive/tests/Makefile) As a sidenote: this removes the check/test targets from the Makefiles as they don't match the pattern used in the rest of the FreeBSD test suite. Sponsored by: EMC / Isilon Storage Division Conflicts: lib/libarchive/test usr.bin/cpio/test Added: stable/10/lib/libarchive/tests/ - copied from r289195, head/lib/libarchive/tests/ stable/10/usr.bin/cpio/tests/ - copied from r289195, head/usr.bin/cpio/tests/ stable/10/usr.bin/tar/tests/ - copied from r289195, head/usr.bin/tar/tests/ Deleted: stable/10/lib/libarchive/test/ stable/10/usr.bin/cpio/test/ stable/10/usr.bin/tar/test/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libarchive/Makefile stable/10/lib/libarchive/tests/Makefile stable/10/usr.bin/cpio/Makefile stable/10/usr.bin/cpio/tests/Makefile stable/10/usr.bin/tar/Makefile stable/10/usr.bin/tar/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Nov 15 21:58:04 2015 (r290891) +++ stable/10/etc/mtree/BSD.tests.dist Sun Nov 15 22:13:41 2015 (r290892) @@ -80,6 +80,8 @@ test-programs .. .. + libarchive + .. libc c063 .. @@ -348,6 +350,8 @@ .. cmp .. + cpio + .. col .. comm @@ -380,6 +384,8 @@ regress.multitest.out .. .. + tar + .. timeout .. tr Modified: stable/10/lib/libarchive/Makefile ============================================================================== --- stable/10/lib/libarchive/Makefile Sun Nov 15 21:58:04 2015 (r290891) +++ stable/10/lib/libarchive/Makefile Sun Nov 15 22:13:41 2015 (r290892) @@ -410,11 +410,8 @@ MLINKS+= archive_write_set_options.3 arc MLINKS+= archive_write_set_options.3 archive_write_set_option.3 MLINKS+= libarchive.3 archive.3 -.PHONY: check test clean-test -check test: - cd ${.CURDIR}/test && make obj && make test - -clean-test: - cd ${.CURDIR}/test && make clean +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Mon Oct 12 18:31:21 2015 (r289195) +++ stable/10/lib/libarchive/tests/Makefile Sun Nov 15 22:13:41 2015 (r290892) @@ -1,5 +1,8 @@ # $FreeBSD$ +SRCTOP= ${.CURDIR:H:H:H} +TESTSDIR= ${TESTSBASE}/lib/libarchive + LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -249,7 +252,8 @@ SRCS.libarchive_test= \ DPSRCS.libarchive_test= \ list.h -LIBADD.libarchive_test= archive +DPADD.libarchive_test= ${LIBARCHIVE} +LDADD.libarchive_test= -larchive .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.libarchive_test+= test_utils.c Modified: stable/10/usr.bin/cpio/Makefile ============================================================================== --- stable/10/usr.bin/cpio/Makefile Sun Nov 15 21:58:04 2015 (r290891) +++ stable/10/usr.bin/cpio/Makefile Sun Nov 15 22:13:41 2015 (r290892) @@ -40,12 +40,8 @@ CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.PHONY: check test clean-test - -check test: $(PROG) bsdcpio.1.gz - cd ${.CURDIR}/test && make obj && make test - -clean-test: - cd ${.CURDIR}/test && make clean +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/usr.bin/cpio/tests/Makefile ============================================================================== --- head/usr.bin/cpio/tests/Makefile Mon Oct 12 18:31:21 2015 (r289195) +++ stable/10/usr.bin/cpio/tests/Makefile Sun Nov 15 22:13:41 2015 (r290892) @@ -1,5 +1,8 @@ # $FreeBSD$ +SRCTOP= ${.CURDIR:H:H:H} +TESTSDIR= ${TESTSBASE}/usr.bin/cpio + LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -81,7 +84,8 @@ DPSRCS.bsdcpio_test= \ .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdcpio_test+= test_utils.c -LIBADD.bsdcpio_test= archive +DPADD.bsdcpio_test= ${LIBARCHIVE} +LDADD.bsdcpio_test= -larchive list.h: ${TESTS_SRCS} Makefile @(cd ${LIBARCHIVEDIR}/tar/test && \ Modified: stable/10/usr.bin/tar/Makefile ============================================================================== --- stable/10/usr.bin/tar/Makefile Sun Nov 15 21:58:04 2015 (r290891) +++ stable/10/usr.bin/tar/Makefile Sun Nov 15 22:13:41 2015 (r290892) @@ -40,11 +40,8 @@ CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_f SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 -.PHONY: check test clean-test -check test: $(PROG) bsdtar.1.gz - cd ${.CURDIR}/test && make obj && make test - -clean-test: - cd ${.CURDIR}/test && make clean +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/usr.bin/tar/tests/Makefile ============================================================================== --- head/usr.bin/tar/tests/Makefile Mon Oct 12 18:31:21 2015 (r289195) +++ stable/10/usr.bin/tar/tests/Makefile Sun Nov 15 22:13:41 2015 (r290892) @@ -1,5 +1,8 @@ # $FreeBSD$ +SRCTOP= ${.CURDIR:H:H:H} +TESTSDIR= ${TESTSBASE}/usr.bin/tar + LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -80,7 +83,8 @@ DPSRCS.bsdtar_test+= list.h .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdtar_test+= test_utils.c -LIBADD.bsdtar_test= archive +DPADD.bsdtar_test= ${LIBARCHIVE} +LDADD.bsdtar_test= -larchive list.h: ${TESTS_SRCS} Makefile @(cd ${LIBARCHIVEDIR}/tar/test && \ From owner-svn-src-stable-10@freebsd.org Sun Nov 15 23:54:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC380A302A9; Sun, 15 Nov 2015 23:54: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 62EC21AFD; Sun, 15 Nov 2015 23:54: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 tAFNsZa9053251; Sun, 15 Nov 2015 23:54:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFNsYX2053238; Sun, 15 Nov 2015 23:54:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511152354.tAFNsYX2053238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 23:54: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: r290893 - in stable/10: bin/setfacl lib/libc/posix1e share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/contrib/opensolaris/uts/common/sys sys/kern sys/sys tools/regression/acltools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 23:54:36 -0000 Author: ngie Date: Sun Nov 15 23:54:34 2015 New Revision: 290893 URL: https://svnweb.freebsd.org/changeset/base/290893 Log: MFC r289195: Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to the FreeBSD test suite functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided by upstream. A handful of testcases in lib/libarchive/tests have been disabled as they were failing when run with kyua test (see BROKEN_TESTS in lib/libarchive/tests/Makefile) As a sidenote: this removes the check/test targets from the Makefiles as they don't match the pattern used in the rest of the FreeBSD test suite. Sponsored by: EMC / Isilon Storage Division Conflicts: lib/libarchive/test usr.bin/cpio/test Modified: stable/10/bin/setfacl/setfacl.1 stable/10/lib/libc/posix1e/acl_add_flag_np.3 stable/10/lib/libc/posix1e/acl_support_nfs4.c stable/10/share/man/man9/acl.9 stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h stable/10/sys/kern/subr_acl_nfs4.c stable/10/sys/sys/acl.h stable/10/tools/regression/acltools/tools-crossfs.test stable/10/tools/regression/acltools/tools-nfs4-psarc.test stable/10/tools/regression/acltools/tools-nfs4-trivial.test stable/10/tools/regression/acltools/tools-nfs4.test Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/setfacl/setfacl.1 ============================================================================== --- stable/10/bin/setfacl/setfacl.1 Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/bin/setfacl/setfacl.1 Sun Nov 15 23:54:34 2015 (r290893) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 1, 2013 +.Dd September 4, 2015 .Dt SETFACL 1 .Os .Sh NAME @@ -378,9 +378,11 @@ dir_inherit inherit_only .It n no_propagate +.It I +inherited .El .Pp -Inheritance flags may be only set on directories. +Other than the "inherited" flag, inheritance flags may be only set on directories. .It Ar "ACL type" The ACL type field is either .Dq Li allow Modified: stable/10/lib/libc/posix1e/acl_add_flag_np.3 ============================================================================== --- stable/10/lib/libc/posix1e/acl_add_flag_np.3 Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/lib/libc/posix1e/acl_add_flag_np.3 Sun Nov 15 23:54:34 2015 (r290893) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 30, 2014 +.Dd September 4, 2015 .Dt ACL_ADD_FLAG_NP 3 .Os .Sh NAME @@ -56,6 +56,7 @@ Valid values are: .It ACL_ENTRY_DIRECTORY_INHERIT Ta "Will be inherited by directories." .It ACL_ENTRY_NO_PROPAGATE_INHERIT Ta "Will not propagate." .It ACL_ENTRY_INHERIT_ONLY Ta "Inherit-only." +.It ACL_ENTRY_INHERITED Ta "Inherited from parent" .El .Sh RETURN VALUES .Rv -std acl_add_flag_np Modified: stable/10/lib/libc/posix1e/acl_support_nfs4.c ============================================================================== --- stable/10/lib/libc/posix1e/acl_support_nfs4.c Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/lib/libc/posix1e/acl_support_nfs4.c Sun Nov 15 23:54:34 2015 (r290893) @@ -48,6 +48,7 @@ struct flagnames_struct a_flags[] = { ACL_ENTRY_NO_PROPAGATE_INHERIT, "no_propagate", 'n'}, { ACL_ENTRY_SUCCESSFUL_ACCESS, "successfull_access", 'S'}, { ACL_ENTRY_FAILED_ACCESS, "failed_access", 'F'}, + { ACL_ENTRY_INHERITED, "inherited", 'I' }, /* * There is no ACE_IDENTIFIER_GROUP here - SunOS does not show it * in the "flags" field. There is no ACE_OWNER, ACE_GROUP or Modified: stable/10/share/man/man9/acl.9 ============================================================================== --- stable/10/share/man/man9/acl.9 Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/share/man/man9/acl.9 Sun Nov 15 23:54:34 2015 (r290893) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 18, 2009 +.Dd September 4, 2015 .Dt ACL 9 .Os .Sh NAME @@ -203,7 +203,13 @@ The following values are valid: .It Dv ACL_ENTRY_DIRECTORY_INHERIT .It Dv ACL_ENTRY_NO_PROPAGATE_INHERIT .It Dv ACL_ENTRY_INHERIT_ONLY +.It Dv ACL_ENTRY_INHERITED .El +The +.Dv ACL_ENTRY_INHERITED +flag is set on an ACE that has been inherited from its parent. +It may also be set programmatically, and is valid on both files +and directories. .El .Sh SEE ALSO .Xr acl 3 , Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c Sun Nov 15 23:54:34 2015 (r290893) @@ -64,6 +64,8 @@ struct zfs2bsd flags[] = {{ACE_FILE_INHE ACL_ENTRY_NO_PROPAGATE_INHERIT}, {ACE_INHERIT_ONLY_ACE, ACL_ENTRY_INHERIT_ONLY}, + {ACE_INHERITED_ACE, + ACL_ENTRY_INHERITED}, {ACE_SUCCESSFUL_ACCESS_ACE_FLAG, ACL_ENTRY_SUCCESSFUL_ACCESS}, {ACE_FAILED_ACCESS_ACE_FLAG, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h Sun Nov 15 23:54:34 2015 (r290893) @@ -187,11 +187,12 @@ typedef struct ace_object { ACE_DIRECTORY_INHERIT_ACE | \ ACE_NO_PROPAGATE_INHERIT_ACE | \ ACE_INHERIT_ONLY_ACE | \ + ACE_INHERITED_ACE | \ ACE_IDENTIFIER_GROUP) #define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE| \ ACE_IDENTIFIER_GROUP) -#define ACE_INHERIT_FLAGS (ACE_FILE_INHERIT_ACE| \ +#define ACE_INHERIT_FLAGS (ACE_FILE_INHERIT_ACE| ACL_INHERITED_ACE| \ ACE_DIRECTORY_INHERIT_ACE|ACE_NO_PROPAGATE_INHERIT_ACE|ACE_INHERIT_ONLY_ACE) /* cmd args to acl(2) for aclent_t */ Modified: stable/10/sys/kern/subr_acl_nfs4.c ============================================================================== --- stable/10/sys/kern/subr_acl_nfs4.c Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/sys/kern/subr_acl_nfs4.c Sun Nov 15 23:54:34 2015 (r290893) @@ -1068,6 +1068,7 @@ acl_nfs4_inherit_entries(const struct ac child_aclp->acl_cnt++; entry->ae_flags &= ~ACL_ENTRY_INHERIT_ONLY; + entry->ae_flags |= ACL_ENTRY_INHERITED; /* * If the type of the ACE is neither ALLOW nor DENY, Modified: stable/10/sys/sys/acl.h ============================================================================== --- stable/10/sys/sys/acl.h Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/sys/sys/acl.h Sun Nov 15 23:54:34 2015 (r290893) @@ -249,11 +249,12 @@ typedef void *acl_t; #define ACL_ENTRY_INHERIT_ONLY 0x0008 #define ACL_ENTRY_SUCCESSFUL_ACCESS 0x0010 #define ACL_ENTRY_FAILED_ACCESS 0x0020 +#define ACL_ENTRY_INHERITED 0x0080 #define ACL_FLAGS_BITS (ACL_ENTRY_FILE_INHERIT | \ ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \ ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \ - ACL_ENTRY_FAILED_ACCESS) + ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED) /* * Undefined value in ae_id field. ae_id should be set to this value Modified: stable/10/tools/regression/acltools/tools-crossfs.test ============================================================================== --- stable/10/tools/regression/acltools/tools-crossfs.test Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/tools/regression/acltools/tools-crossfs.test Sun Nov 15 23:54:34 2015 (r290893) @@ -43,9 +43,9 @@ $ umask 022 $ touch nfs4/xxx $ getfacl -nq nfs4/xxx -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ touch posix/xxx $ getfacl -nq posix/xxx @@ -96,10 +96,10 @@ $ ls -l posix/xxx | cut -d' ' -f1 $ mv posix/yyy nfs4/xxx > mv: failed to set acl entries for nfs4/xxx: Invalid argument $ getfacl -nq nfs4/xxx -> owner@:-wxp----------:------:deny -> owner@:r-----aARWcCos:------:allow -> group@:rwxp--a-R-c--s:------:allow -> everyone@:rw-p--a-R-c--s:------:allow +> owner@:-wxp----------:-------:deny +> owner@:r-----aARWcCos:-------:allow +> group@:rwxp--a-R-c--s:-------:allow +> everyone@:rw-p--a-R-c--s:-------:allow $ ls -l nfs4/xxx | cut -d' ' -f1 > -r--rwxrw- @@ -110,11 +110,11 @@ $ touch nfs4/xxx $ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx $ mv nfs4/xxx nfs4/yyy $ getfacl -nq nfs4/yyy -> user:42:--x-----------:------:allow -> group:43:-w------------:------:allow -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> user:42:--x-----------:-------:allow +> group:43:-w------------:-------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ ls -l nfs4/yyy | cut -d' ' -f1 > -rw-r--r--+ @@ -261,14 +261,14 @@ $ chmod 543 nfs4/xxx $ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx $ cp -p nfs4/xxx nfs4/yyy $ getfacl -nq nfs4/yyy -> user:42:--x-----------:------:allow -> group:43:-w------------:------:allow -> owner@:--x-----------:------:allow -> owner@:-w-p----------:------:deny -> group@:-wxp----------:------:deny -> owner@:r-x---aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:-wxp--a-R-c--s:------:allow +> user:42:--x-----------:-------:allow +> group:43:-w------------:-------:allow +> owner@:--x-----------:-------:allow +> owner@:-w-p----------:-------:deny +> group@:-wxp----------:-------:deny +> owner@:r-x---aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:-wxp--a-R-c--s:-------:allow $ ls -l nfs4/yyy | cut -d' ' -f1 > -r-xr---wx+ Modified: stable/10/tools/regression/acltools/tools-nfs4-psarc.test ============================================================================== --- stable/10/tools/regression/acltools/tools-nfs4-psarc.test Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/tools/regression/acltools/tools-nfs4-psarc.test Sun Nov 15 23:54:34 2015 (r290893) @@ -42,14 +42,14 @@ $ getfacl xxx > # file: xxx > # owner: root > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ getfacl -q xxx -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow # Check verbose mode formatting. $ getfacl -v xxx @@ -66,11 +66,11 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Test user and group name resolving. $ rm xxx @@ -80,11 +80,11 @@ $ getfacl xxx > # file: xxx > # owner: root > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> user:root:-----------C--:------:allow -> group:daemon:----------c---:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> user:root:-----------C--:-------:allow +> group:daemon:----------c---:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Check whether ls correctly marks files with "+". $ ls -l xxx | cut -d' ' -f1 @@ -96,10 +96,10 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Test setfacl -m. $ setfacl -a0 everyone@:rwx:deny xxx @@ -110,26 +110,26 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> owner@:rw-p--aARWcCos:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:r-----a-R-c--s:------:allow +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> owner@:rw-p--aARWcCos:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Test getfacl -i. $ getfacl -i xxx > # file: xxx > # owner: root > # group: wheel -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> owner@:rw-p--aARWcCos:------:allow -> user:root:-----------C--:------:allow:0 -> group:daemon:----------c---:------:deny:1 -> everyone@:r-----a-R-c--s:------:allow +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> owner@:rw-p--aARWcCos:-------:allow +> user:root:-----------C--:-------:allow:0 +> group:daemon:----------c---:-------:deny:1 +> everyone@:r-----a-R-c--s:-------:allow # Make sure cp without any flags does not copy copy the ACL. $ cp xxx yyy @@ -143,13 +143,13 @@ $ getfacl -n yyy > # file: yyy > # owner: root > # group: wheel -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> owner@:rw-p--aARWcCos:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:r-----a-R-c--s:------:allow +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> owner@:rw-p--aARWcCos:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> everyone@:r-----a-R-c--s:-------:allow $ rm yyy @@ -159,10 +159,10 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Test setfacl -b. $ setfacl -b xxx @@ -170,9 +170,9 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ ls -l xxx | cut -d' ' -f1 > -rw-r--r-- @@ -196,23 +196,23 @@ $ ls -l nnn xxx yyy zzz | cut -d' ' -f1 $ getfacl -nq nnn xxx yyy zzz > getfacl: nnn: stat() failed: No such file or directory -> user:42:--x-----------:------:allow -> group:43:-w------------:------:allow -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> user:42:--x-----------:-------:allow +> group:43:-w------------:-------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow > -> user:42:--x-----------:------:allow -> group:43:-w------------:------:allow -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> user:42:--x-----------:-------:allow +> group:43:-w------------:-------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow > -> user:42:--x-----------:------:allow -> group:43:-w------------:------:allow -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> user:42:--x-----------:-------:allow +> group:43:-w------------:-------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ setfacl -b nnn xxx yyy zzz > setfacl: nnn: stat() failed: No such file or directory @@ -233,9 +233,9 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> group@:------a-R-c--s:------:allow -> everyone@:------a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:------a-R-c--s:-------:allow +> everyone@:------a-R-c--s:-------:allow $ ls -l xxx | cut -d' ' -f1 > -rw------- @@ -249,9 +249,9 @@ $ getfacl -n xxx > # file: xxx > # owner: 42 > # group: wheel -> owner@:rw-p--aARWcCos:------:allow -> group@:------a-R-c--s:------:allow -> everyone@:------a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:------a-R-c--s:-------:allow +> everyone@:------a-R-c--s:-------:allow $ ls -l xxx | cut -d' ' -f1 > -rw------- @@ -264,11 +264,11 @@ $ getfacl -n xxx > # file: xxx > # owner: 43 > # group: wheel -> owner@:rw-p----------:------:deny -> group@:r-------------:------:deny -> owner@:--x---aARWcCos:------:allow -> group@:-w-p--a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p----------:-------:deny +> group@:r-------------:-------:deny +> owner@:--x---aARWcCos:-------:allow +> group@:-w-p--a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ ls -l xxx | cut -d' ' -f1 > ---x-w-r-- @@ -281,11 +281,11 @@ $ getfacl -n xxx > # file: xxx > # owner: 43 > # group: wheel -> owner@:-wxp----------:------:deny -> group@:-w-p----------:------:deny -> owner@:r-----aARWcCos:------:allow -> group@:--x---a-R-c--s:------:allow -> everyone@:-w-p--a-R-c--s:------:allow +> owner@:-wxp----------:-------:deny +> group@:-w-p----------:-------:deny +> owner@:r-----aARWcCos:-------:allow +> group@:--x---a-R-c--s:-------:allow +> everyone@:-w-p--a-R-c--s:-------:allow $ ls -l xxx | cut -d' ' -f1 > -r----x-w- @@ -298,23 +298,23 @@ $ getfacl -n ddd > # file: ddd > # owner: root > # group: wheel -> user:42:r-x-----------:f-i---:allow -> group:42:-w--D---------:-d----:allow -> group:43:-w--D---------:-d----:deny -> group@:-----da-------:------:allow -> group:44:rw-p-da-------:------:allow -> owner@:rwxp--aARWcCos:------:allow -> group@:r-x---a-R-c--s:------:allow -> everyone@:-w-p--a-R-c--s:f-i---:allow +> user:42:r-x-----------:f-i----:allow +> group:42:-w--D---------:-d-----:allow +> group:43:-w--D---------:-d-----:deny +> group@:-----da-------:-------:allow +> group:44:rw-p-da-------:-------:allow +> owner@:rwxp--aARWcCos:-------:allow +> group@:r-x---a-R-c--s:-------:allow +> everyone@:-w-p--a-R-c--s:f-i----:allow $ chmod 777 ddd $ getfacl -n ddd > # file: ddd > # owner: root > # group: wheel -> owner@:rwxp--aARWcCos:------:allow -> group@:rwxp--a-R-c--s:------:allow -> everyone@:rwxp--a-R-c--s:------:allow +> owner@:rwxp--aARWcCos:-------:allow +> group@:rwxp--a-R-c--s:-------:allow +> everyone@:rwxp--a-R-c--s:-------:allow # Test applying ACL to mode. $ rmdir ddd @@ -360,104 +360,104 @@ $ setfacl -a0 user:42:write_acl/write_ow $ setfacl -a0 group:41:read_data/read_attributes:dni:allow ddd $ setfacl -a0 user:41:write_data/write_attributes:fn:allow ddd $ getfacl -qn ddd -> user:41:-w-----A------:f--n--:allow -> group:41:r-----a-------:-din--:allow -> user:42:-----------Co-:f-i---:allow -> user:42:r-x-----------:f-i---:allow -> group:42:-w--D---------:-d-n--:deny -> group:43:-w---------C--:f-in--:deny -> user:43:rwxp----------:------:allow -> owner@:rwxp--aARWcCos:------:allow -> group@:r-x---a-R-c--s:------:allow -> everyone@:r-x---a-R-c--s:------:allow +> user:41:-w-----A------:f--n---:allow +> group:41:r-----a-------:-din---:allow +> user:42:-----------Co-:f-i----:allow +> user:42:r-x-----------:f-i----:allow +> group:42:-w--D---------:-d-n---:deny +> group:43:-w---------C--:f-in---:deny +> user:43:rwxp----------:-------:allow +> owner@:rwxp--aARWcCos:-------:allow +> group@:r-x---a-R-c--s:-------:allow +> everyone@:r-x---a-R-c--s:-------:allow $ cd ddd $ touch xxx $ getfacl -qn xxx -> user:41:--------------:------:allow -> user:42:--------------:------:allow -> user:42:r-------------:------:allow -> group:43:-w---------C--:------:deny -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> user:41:--------------:------I:allow +> user:42:--------------:------I:allow +> user:42:r-------------:------I:allow +> group:43:-w---------C--:------I:deny +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ rm xxx $ umask 077 $ touch xxx $ getfacl -qn xxx -> user:41:--------------:------:allow -> user:42:--------------:------:allow -> user:42:--------------:------:allow -> group:43:-w---------C--:------:deny -> owner@:rw-p--aARWcCos:------:allow -> group@:------a-R-c--s:------:allow -> everyone@:------a-R-c--s:------:allow +> user:41:--------------:------I:allow +> user:42:--------------:------I:allow +> user:42:--------------:------I:allow +> group:43:-w---------C--:------I:deny +> owner@:rw-p--aARWcCos:-------:allow +> group@:------a-R-c--s:-------:allow +> everyone@:------a-R-c--s:-------:allow $ rm xxx $ umask 770 $ touch xxx $ getfacl -qn xxx -> owner@:rw-p----------:------:deny -> group@:rw-p----------:------:deny -> user:41:--------------:------:allow -> user:42:--------------:------:allow -> user:42:--------------:------:allow -> group:43:-w---------C--:------:deny -> owner@:------aARWcCos:------:allow -> group@:------a-R-c--s:------:allow -> everyone@:rw-p--a-R-c--s:------:allow +> owner@:rw-p----------:-------:deny +> group@:rw-p----------:-------:deny +> user:41:--------------:------I:allow +> user:42:--------------:------I:allow +> user:42:--------------:------I:allow +> group:43:-w---------C--:------I:deny +> owner@:------aARWcCos:-------:allow +> group@:------a-R-c--s:-------:allow +> everyone@:rw-p--a-R-c--s:-------:allow $ rm xxx $ umask 707 $ touch xxx $ getfacl -qn xxx -> owner@:rw-p----------:------:deny -> user:41:-w------------:------:allow -> user:42:--------------:------:allow -> user:42:r-------------:------:allow -> group:43:-w---------C--:------:deny -> owner@:------aARWcCos:------:allow -> group@:rw-p--a-R-c--s:------:allow -> everyone@:------a-R-c--s:------:allow +> owner@:rw-p----------:-------:deny +> user:41:-w------------:------I:allow +> user:42:--------------:------I:allow +> user:42:r-------------:------I:allow +> group:43:-w---------C--:------I:deny +> owner@:------aARWcCos:-------:allow +> group@:rw-p--a-R-c--s:-------:allow +> everyone@:------a-R-c--s:-------:allow $ umask 077 $ mkdir yyy $ getfacl -qn yyy -> group:41:------a-------:------:allow -> user:42:-----------Co-:f-i---:allow -> user:42:r-x-----------:f-i---:allow -> group:42:-w--D---------:------:deny -> owner@:rwxp--aARWcCos:------:allow -> group@:------a-R-c--s:------:allow -> everyone@:------a-R-c--s:------:allow +> group:41:------a-------:------I:allow +> user:42:-----------Co-:f-i---I:allow +> user:42:r-x-----------:f-i---I:allow +> group:42:-w--D---------:------I:deny +> owner@:rwxp--aARWcCos:-------:allow +> group@:------a-R-c--s:-------:allow +> everyone@:------a-R-c--s:-------:allow $ rmdir yyy $ umask 770 $ mkdir yyy $ getfacl -qn yyy -> owner@:rwxp----------:------:deny -> group@:rwxp----------:------:deny -> group:41:------a-------:------:allow -> user:42:-----------Co-:f-i---:allow -> user:42:r-x-----------:f-i---:allow -> group:42:-w--D---------:------:deny -> owner@:------aARWcCos:------:allow -> group@:------a-R-c--s:------:allow -> everyone@:rwxp--a-R-c--s:------:allow +> owner@:rwxp----------:-------:deny +> group@:rwxp----------:-------:deny +> group:41:------a-------:------I:allow +> user:42:-----------Co-:f-i---I:allow +> user:42:r-x-----------:f-i---I:allow +> group:42:-w--D---------:------I:deny +> owner@:------aARWcCos:-------:allow +> group@:------a-R-c--s:-------:allow +> everyone@:rwxp--a-R-c--s:-------:allow $ rmdir yyy $ umask 707 $ mkdir yyy $ getfacl -qn yyy -> owner@:rwxp----------:------:deny -> group:41:r-----a-------:------:allow -> user:42:-----------Co-:f-i---:allow -> user:42:r-x-----------:f-i---:allow -> group:42:-w--D---------:------:deny -> owner@:------aARWcCos:------:allow -> group@:rwxp--a-R-c--s:------:allow -> everyone@:------a-R-c--s:------:allow +> owner@:rwxp----------:-------:deny +> group:41:r-----a-------:------I:allow +> user:42:-----------Co-:f-i---I:allow +> user:42:r-x-----------:f-i---I:allow +> group:42:-w--D---------:------I:deny +> owner@:------aARWcCos:-------:allow +> group@:rwxp--a-R-c--s:-------:allow +> everyone@:------a-R-c--s:-------:allow # There is some complication regarding how write_acl and write_owner flags # get inherited. Make sure we got it right. @@ -478,34 +478,34 @@ $ umask 022 $ rm xxx $ touch xxx $ getfacl -nq xxx -> user:53:--------------:------:allow -> user:51:--------------:------:allow -> user:50:--------------:------:allow -> user:48:--------------:------:allow -> user:47:--------------:------:allow -> user:45:--------------:------:allow -> user:44:--------------:------:allow -> user:42:--------------:------:allow -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> user:53:--------------:------I:allow +> user:51:--------------:------I:allow +> user:50:--------------:------I:allow +> user:48:--------------:------I:allow +> user:47:--------------:------I:allow +> user:45:--------------:------I:allow +> user:44:--------------:------I:allow +> user:42:--------------:------I:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ rmdir yyy $ mkdir yyy $ getfacl -nq yyy -> user:53:--------------:------:allow -> user:52:--------------:------:allow -> user:50:--------------:------:allow -> user:49:--------------:------:allow -> user:47:--------------:fd----:allow -> user:46:--------------:-d----:allow -> user:45:-----------Co-:f-i---:allow -> user:44:--------------:fd----:allow -> user:43:--------------:-d----:allow -> user:42:-----------Co-:f-i---:allow -> owner@:rwxp--aARWcCos:------:allow -> group@:r-x---a-R-c--s:------:allow -> everyone@:r-x---a-R-c--s:------:allow +> user:53:--------------:------I:allow +> user:52:--------------:------I:allow +> user:50:--------------:------I:allow +> user:49:--------------:------I:allow +> user:47:--------------:fd----I:allow +> user:46:--------------:-d----I:allow +> user:45:-----------Co-:f-i---I:allow +> user:44:--------------:fd----I:allow +> user:43:--------------:-d----I:allow +> user:42:-----------Co-:f-i---I:allow +> owner@:rwxp--aARWcCos:-------:allow +> group@:r-x---a-R-c--s:-------:allow +> everyone@:r-x---a-R-c--s:-------:allow $ setfacl -b . $ setfacl -a0 u:42:Co:f:deny . @@ -524,34 +524,34 @@ $ umask 022 $ rm xxx $ touch xxx $ getfacl -nq xxx -> user:53:-----------Co-:------:deny -> user:51:-----------Co-:------:deny -> user:50:-----------Co-:------:deny -> user:48:-----------Co-:------:deny -> user:47:-----------Co-:------:deny -> user:45:-----------Co-:------:deny -> user:44:-----------Co-:------:deny -> user:42:-----------Co-:------:deny -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> user:53:-----------Co-:------I:deny +> user:51:-----------Co-:------I:deny +> user:50:-----------Co-:------I:deny +> user:48:-----------Co-:------I:deny +> user:47:-----------Co-:------I:deny +> user:45:-----------Co-:------I:deny +> user:44:-----------Co-:------I:deny +> user:42:-----------Co-:------I:deny +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow $ rmdir yyy $ mkdir yyy $ getfacl -nq yyy -> user:53:-----------Co-:------:deny -> user:52:-----------Co-:------:deny -> user:50:-----------Co-:------:deny -> user:49:-----------Co-:------:deny -> user:47:-----------Co-:fd----:deny -> user:46:-----------Co-:-d----:deny -> user:45:-----------Co-:f-i---:deny -> user:44:-----------Co-:fd----:deny -> user:43:-----------Co-:-d----:deny -> user:42:-----------Co-:f-i---:deny -> owner@:rwxp--aARWcCos:------:allow -> group@:r-x---a-R-c--s:------:allow -> everyone@:r-x---a-R-c--s:------:allow +> user:53:-----------Co-:------I:deny +> user:52:-----------Co-:------I:deny +> user:50:-----------Co-:------I:deny +> user:49:-----------Co-:------I:deny +> user:47:-----------Co-:fd----I:deny +> user:46:-----------Co-:-d----I:deny +> user:45:-----------Co-:f-i---I:deny +> user:44:-----------Co-:fd----I:deny +> user:43:-----------Co-:-d----I:deny +> user:42:-----------Co-:f-i---I:deny +> owner@:rwxp--aARWcCos:-------:allow +> group@:r-x---a-R-c--s:-------:allow +> everyone@:r-x---a-R-c--s:-------:allow $ rmdir yyy $ rm xxx Modified: stable/10/tools/regression/acltools/tools-nfs4-trivial.test ============================================================================== --- stable/10/tools/regression/acltools/tools-nfs4-trivial.test Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/tools/regression/acltools/tools-nfs4-trivial.test Sun Nov 15 23:54:34 2015 (r290893) @@ -42,9 +42,9 @@ $ ls -l xxx | cut -d' ' -f1 > -rw-r--r-- $ getfacl -q xxx -> owner@:rw-p--aARWcCos:------:allow -> group@:r-----a-R-c--s:------:allow -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p--aARWcCos:-------:allow +> group@:r-----a-R-c--s:-------:allow +> everyone@:r-----a-R-c--s:-------:allow # Check whether ls(1) correctly recognizes draft-style trivial ACLs. $ rm xxx @@ -58,12 +58,12 @@ $ ls -l xxx | cut -d' ' -f1 > -rw-r--r-- $ getfacl -q xxx -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> group@:-wxp----------:------:deny -> group@:r-------------:------:allow -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> group@:-wxp----------:-------:deny +> group@:r-------------:-------:allow +> everyone@:-wxp---A-W-Co-:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Make sure ls(1) actually can recognize something as non-trivial. $ setfacl -x0 xxx @@ -72,11 +72,11 @@ $ ls -l xxx | cut -d' ' -f1 > -rw-r--r--+ $ getfacl -q xxx -> owner@:rw-p---A-W-Co-:------:allow -> group@:-wxp----------:------:deny -> group@:r-------------:------:allow -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:rw-p---A-W-Co-:-------:allow +> group@:-wxp----------:-------:deny +> group@:r-------------:-------:allow +> everyone@:-wxp---A-W-Co-:-------:deny +> everyone@:r-----a-R-c--s:-------:allow $ rm xxx Modified: stable/10/tools/regression/acltools/tools-nfs4.test ============================================================================== --- stable/10/tools/regression/acltools/tools-nfs4.test Sun Nov 15 22:13:41 2015 (r290892) +++ stable/10/tools/regression/acltools/tools-nfs4.test Sun Nov 15 23:54:34 2015 (r290893) @@ -42,20 +42,20 @@ $ getfacl xxx > # file: xxx > # owner: root > # group: wheel -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> group@:-wxp----------:------:deny -> group@:r-------------:------:allow -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> group@:-wxp----------:-------:deny +> group@:r-------------:-------:allow +> everyone@:-wxp---A-W-Co-:-------:deny +> everyone@:r-----a-R-c--s:-------:allow $ getfacl -q xxx -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> group@:-wxp----------:------:deny -> group@:r-------------:------:allow -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> group@:-wxp----------:-------:deny +> group@:r-------------:-------:allow +> everyone@:-wxp---A-W-Co-:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Check verbose mode formatting. $ getfacl -v xxx @@ -75,14 +75,14 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> group@:-wxp----------:------:deny -> group@:r-------------:------:allow -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> group@:-wxp----------:-------:deny +> group@:r-------------:-------:allow +> everyone@:-wxp---A-W-Co-:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Test user and group name resolving. $ rm xxx @@ -92,14 +92,14 @@ $ getfacl xxx > # file: xxx > # owner: root > # group: wheel -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> user:root:-----------C--:------:allow -> group:daemon:----------c---:------:deny -> group@:-wxp----------:------:deny -> group@:r-------------:------:allow -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> user:root:-----------C--:-------:allow +> group:daemon:----------c---:-------:deny +> group@:-wxp----------:-------:deny +> group@:r-------------:-------:allow +> everyone@:-wxp---A-W-Co-:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Check whether ls correctly marks files with "+". $ ls -l xxx | cut -d' ' -f1 @@ -112,12 +112,12 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> everyone@:-wxp---A-W-Co-:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Test setfacl -m. $ setfacl -a0 everyone@:rwx:deny xxx @@ -128,30 +128,30 @@ $ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:--------------:------:deny -> everyone@:r-----a-R-c--s:------:allow +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> user:0:-----------C--:-------:allow +> group:1:----------c---:-------:deny +> everyone@:--------------:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Test getfacl -i. $ getfacl -i xxx > # file: xxx > # owner: root > # group: wheel -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> user:root:-----------C--:------:allow:0 -> group:daemon:----------c---:------:deny:1 -> everyone@:--------------:------:deny -> everyone@:r-----a-R-c--s:------:allow +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny +> owner@:--x-----------:-------:deny +> owner@:rw-p---A-W-Co-:-------:allow +> user:root:-----------C--:-------:allow:0 +> group:daemon:----------c---:-------:deny:1 +> everyone@:--------------:-------:deny +> everyone@:r-----a-R-c--s:-------:allow # Make sure cp without any flags does not copy copy the ACL. $ cp xxx yyy @@ -165,15 +165,15 @@ $ getfacl -n yyy > # file: yyy > # owner: root > # group: wheel -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> everyone@:--------------:------:deny -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> user:0:-----------C--:------:allow -> group:1:----------c---:------:deny -> everyone@:--------------:------:deny -> everyone@:r-----a-R-c--s:------:allow +> everyone@:--------------:-------:deny +> everyone@:--------------:-------:deny *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Mon Nov 16 00:37:01 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFDBDA30A22; Mon, 16 Nov 2015 00:37:01 +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 B95081922; Mon, 16 Nov 2015 00:37:01 +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 tAG0b0mM065293; Mon, 16 Nov 2015 00:37:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAG0b0rw065291; Mon, 16 Nov 2015 00:37:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511160037.tAG0b0rw065291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 16 Nov 2015 00:37: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: r290894 - in stable/10: etc/mtree tests/sys 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-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 00:37:02 -0000 Author: ngie Date: Mon Nov 16 00:37:00 2015 New Revision: 290894 URL: https://svnweb.freebsd.org/changeset/base/290894 Log: MFC r289446: Integrate tools/regression/acltools into the FreeBSD test suite as tests/sys/acl - Make the requirements more complete for the testcases - Detect prerequisites so the tests won't fail (zfs.ko is loaded, zpool(1) is available, ACL support is enabled with UFS, etc). - Work with temporary files/directories/mountpoints that work with atf/kyua - Limit the testcases to work on temporary filesystems to reduce tainting the test host Reviewed by: trasz (earlier version) Differential Revision: https://reviews.freebsd.org/D3810 Added: stable/10/tests/sys/acl/ - copied from r289446, head/tests/sys/acl/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Nov 15 23:54:34 2015 (r290893) +++ stable/10/etc/mtree/BSD.tests.dist Mon Nov 16 00:37:00 2015 (r290894) @@ -188,6 +188,8 @@ .. .. sys + acl + .. aio .. fifo Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Sun Nov 15 23:54:34 2015 (r290893) +++ stable/10/tests/sys/Makefile Mon Nov 16 00:37:00 2015 (r290894) @@ -4,6 +4,7 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file From owner-svn-src-stable-10@freebsd.org Mon Nov 16 00:37:54 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7D00A30A8B; Mon, 16 Nov 2015 00:37:54 +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 59D181A69; Mon, 16 Nov 2015 00:37:54 +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 tAG0brCG065363; Mon, 16 Nov 2015 00:37:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAG0brNH065362; Mon, 16 Nov 2015 00:37:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511160037.tAG0brNH065362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 16 Nov 2015 00:37: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: r290895 - stable/10/tools/regression/acltools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 00:37:54 -0000 Author: ngie Date: Mon Nov 16 00:37:53 2015 New Revision: 290895 URL: https://svnweb.freebsd.org/changeset/base/290895 Log: Remove tools/regression/acltools Should have been done with r290894 Sponsored by: EMC / Isilon Storage Division Deleted: stable/10/tools/regression/acltools/ From owner-svn-src-stable-10@freebsd.org Mon Nov 16 00:50:54 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68ACA30D87; Mon, 16 Nov 2015 00:50:54 +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 9B0EC1210; Mon, 16 Nov 2015 00:50:54 +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 tAG0orn4070111; Mon, 16 Nov 2015 00:50:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAG0orip070107; Mon, 16 Nov 2015 00:50:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511160050.tAG0orip070107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 16 Nov 2015 00:50: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: r290896 - in stable/10: . lib/libc/tests/c063 lib/libc/tests/setjmp lib/libc/tests/string X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 00:50:55 -0000 Author: ngie Date: Mon Nov 16 00:50:53 2015 New Revision: 290896 URL: https://svnweb.freebsd.org/changeset/base/290896 Log: MFC r290255: Add _test suffix to multiple tests in lib/libc to conform to the design noted in the FreeBSD Test Suite wiki Sponsored by: EMC / Isilon Storage Division Modified: stable/10/ObsoleteFiles.inc stable/10/lib/libc/tests/c063/Makefile stable/10/lib/libc/tests/setjmp/Makefile stable/10/lib/libc/tests/string/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon Nov 16 00:37:53 2015 (r290895) +++ stable/10/ObsoleteFiles.inc Mon Nov 16 00:50:53 2015 (r290896) @@ -38,6 +38,37 @@ # xargs -n1 | sort | uniq -d; # done +# 20151115: added missing _test suffix on multiple tests in lib/libc +OLD_FILES+=usr/tests/lib/libc/c063/faccessat +OLD_FILES+=usr/tests/lib/libc/c063/fchmodat +OLD_FILES+=usr/tests/lib/libc/c063/fchownat +OLD_FILES+=usr/tests/lib/libc/c063/fexecve +OLD_FILES+=usr/tests/lib/libc/c063/fstatat +OLD_FILES+=usr/tests/lib/libc/c063/linkat +OLD_FILES+=usr/tests/lib/libc/c063/mkdirat +OLD_FILES+=usr/tests/lib/libc/c063/mkfifoat +OLD_FILES+=usr/tests/lib/libc/c063/mknodat +OLD_FILES+=usr/tests/lib/libc/c063/openat +OLD_FILES+=usr/tests/lib/libc/c063/readlinkat +OLD_FILES+=usr/tests/lib/libc/c063/renameat +OLD_FILES+=usr/tests/lib/libc/c063/symlinkat +OLD_FILES+=usr/tests/lib/libc/c063/unlinkat +OLD_FILES+=usr/tests/lib/libc/c063/utimensat +OLD_FILES+=usr/tests/lib/libc/string/memchr +OLD_FILES+=usr/tests/lib/libc/string/memcpy +OLD_FILES+=usr/tests/lib/libc/string/memmem +OLD_FILES+=usr/tests/lib/libc/string/memset +OLD_FILES+=usr/tests/lib/libc/string/strcat +OLD_FILES+=usr/tests/lib/libc/string/strchr +OLD_FILES+=usr/tests/lib/libc/string/strcmp +OLD_FILES+=usr/tests/lib/libc/string/strcpy +OLD_FILES+=usr/tests/lib/libc/string/strcspn +OLD_FILES+=usr/tests/lib/libc/string/strerror +OLD_FILES+=usr/tests/lib/libc/string/strlen +OLD_FILES+=usr/tests/lib/libc/string/strpbrk +OLD_FILES+=usr/tests/lib/libc/string/strrchr +OLD_FILES+=usr/tests/lib/libc/string/strspn +OLD_FILES+=usr/tests/lib/libc/string/swab # 20151025: remove links to removed/unimplemented mbuf(9) macros OLD_FILES+=usr/share/man/man9/MEXT_ADD_REF.9.gz OLD_FILES+=usr/share/man/man9/MEXTFREE.9.gz Modified: stable/10/lib/libc/tests/c063/Makefile ============================================================================== --- stable/10/lib/libc/tests/c063/Makefile Mon Nov 16 00:37:53 2015 (r290895) +++ stable/10/lib/libc/tests/c063/Makefile Mon Nov 16 00:50:53 2015 (r290896) @@ -4,20 +4,20 @@ TESTSDIR= ${TESTSBASE}/lib/libc/c063 #TODO: t_o_search, t_utimensat -NETBSD_ATF_TESTS_C= faccessat -NETBSD_ATF_TESTS_C+= fchmodat -NETBSD_ATF_TESTS_C+= fchownat -NETBSD_ATF_TESTS_C+= fexecve -NETBSD_ATF_TESTS_C+= fstatat -NETBSD_ATF_TESTS_C+= linkat -NETBSD_ATF_TESTS_C+= mkdirat -NETBSD_ATF_TESTS_C+= mkfifoat -NETBSD_ATF_TESTS_C+= mknodat -NETBSD_ATF_TESTS_C+= openat -NETBSD_ATF_TESTS_C+= readlinkat -NETBSD_ATF_TESTS_C+= renameat -NETBSD_ATF_TESTS_C+= symlinkat -NETBSD_ATF_TESTS_C+= unlinkat +NETBSD_ATF_TESTS_C= faccessat_test +NETBSD_ATF_TESTS_C+= fchmodat_test +NETBSD_ATF_TESTS_C+= fchownat_test +NETBSD_ATF_TESTS_C+= fexecve_test +NETBSD_ATF_TESTS_C+= fstatat_test +NETBSD_ATF_TESTS_C+= linkat_test +NETBSD_ATF_TESTS_C+= mkdirat_test +NETBSD_ATF_TESTS_C+= mkfifoat_test +NETBSD_ATF_TESTS_C+= mknodat_test +NETBSD_ATF_TESTS_C+= openat_test +NETBSD_ATF_TESTS_C+= readlinkat_test +NETBSD_ATF_TESTS_C+= renameat_test +NETBSD_ATF_TESTS_C+= symlinkat_test +NETBSD_ATF_TESTS_C+= unlinkat_test CFLAGS+= -D_INCOMPLETE_XOPEN_C063 Modified: stable/10/lib/libc/tests/setjmp/Makefile ============================================================================== --- stable/10/lib/libc/tests/setjmp/Makefile Mon Nov 16 00:37:53 2015 (r290895) +++ stable/10/lib/libc/tests/setjmp/Makefile Mon Nov 16 00:50:53 2015 (r290896) @@ -2,11 +2,11 @@ TESTSDIR= ${TESTSBASE}/lib/libc/setjmp -NETBSD_ATF_TESTS_C= t_setjmp -NETBSD_ATF_TESTS_C+= t_threadjmp +NETBSD_ATF_TESTS_C= setjmp_test +NETBSD_ATF_TESTS_C+= threadjmp_test -DPADD.t_threadjmp+= ${LIBPTHREAD} -LDADD.t_threadjmp+= -lpthread +DPADD.threadjmp_test+= ${LIBPTHREAD} +LDADD.threadjmp_test+= -lpthread WARNS?= 4 Modified: stable/10/lib/libc/tests/string/Makefile ============================================================================== --- stable/10/lib/libc/tests/string/Makefile Mon Nov 16 00:37:53 2015 (r290895) +++ stable/10/lib/libc/tests/string/Makefile Mon Nov 16 00:50:53 2015 (r290896) @@ -9,30 +9,30 @@ TESTSDIR= ${TESTSBASE}/lib/libc/string # TODO: popcount, stresep -NETBSD_ATF_TESTS_C+= memchr -NETBSD_ATF_TESTS_C+= memcpy -NETBSD_ATF_TESTS_C+= memmem -NETBSD_ATF_TESTS_C+= memset -NETBSD_ATF_TESTS_C+= strcat -NETBSD_ATF_TESTS_C+= strchr -NETBSD_ATF_TESTS_C+= strcmp -NETBSD_ATF_TESTS_C+= strcpy -NETBSD_ATF_TESTS_C+= strcspn -NETBSD_ATF_TESTS_C+= strerror -NETBSD_ATF_TESTS_C+= strlen -NETBSD_ATF_TESTS_C+= strpbrk -NETBSD_ATF_TESTS_C+= strrchr -NETBSD_ATF_TESTS_C+= strspn -NETBSD_ATF_TESTS_C+= swab +NETBSD_ATF_TESTS_C+= memchr_test +NETBSD_ATF_TESTS_C+= memcpy_test +NETBSD_ATF_TESTS_C+= memmem_test +NETBSD_ATF_TESTS_C+= memset_test +NETBSD_ATF_TESTS_C+= strcat_test +NETBSD_ATF_TESTS_C+= strchr_test +NETBSD_ATF_TESTS_C+= strcmp_test +NETBSD_ATF_TESTS_C+= strcpy_test +NETBSD_ATF_TESTS_C+= strcspn_test +NETBSD_ATF_TESTS_C+= strerror_test +NETBSD_ATF_TESTS_C+= strlen_test +NETBSD_ATF_TESTS_C+= strpbrk_test +NETBSD_ATF_TESTS_C+= strrchr_test +NETBSD_ATF_TESTS_C+= strspn_test +NETBSD_ATF_TESTS_C+= swab_test SRCS.strerror2_test= strerror_test.c .include "../Makefile.netbsd-tests" -LDADD.memchr+= -lmd -DPADD.memchr+= ${LIBMD} +LDADD.memchr_test+= -lmd +DPADD.memchr_test+= ${LIBMD} -LDADD.memcpy+= -lmd -DPADD.memcpy+= ${LIBMD} +LDADD.memcpy_test+= -lmd +DPADD.memcpy_test+= ${LIBMD} .include From owner-svn-src-stable-10@freebsd.org Mon Nov 16 00:52:33 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08CEBA30E16; Mon, 16 Nov 2015 00:52:33 +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 C493B1771; Mon, 16 Nov 2015 00:52:32 +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 tAG0qVMA070909; Mon, 16 Nov 2015 00:52:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAG0qVpx070908; Mon, 16 Nov 2015 00:52:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511160052.tAG0qVpx070908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 16 Nov 2015 00:52: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: r290897 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 00:52:33 -0000 Author: ngie Date: Mon Nov 16 00:52:31 2015 New Revision: 290897 URL: https://svnweb.freebsd.org/changeset/base/290897 Log: Follow up to r290255 The utimensat testcase was never integrated into stable/10 because the syscall is not present on stable/10 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/ObsoleteFiles.inc Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon Nov 16 00:50:53 2015 (r290896) +++ stable/10/ObsoleteFiles.inc Mon Nov 16 00:52:31 2015 (r290897) @@ -53,7 +53,6 @@ OLD_FILES+=usr/tests/lib/libc/c063/readl OLD_FILES+=usr/tests/lib/libc/c063/renameat OLD_FILES+=usr/tests/lib/libc/c063/symlinkat OLD_FILES+=usr/tests/lib/libc/c063/unlinkat -OLD_FILES+=usr/tests/lib/libc/c063/utimensat OLD_FILES+=usr/tests/lib/libc/string/memchr OLD_FILES+=usr/tests/lib/libc/string/memcpy OLD_FILES+=usr/tests/lib/libc/string/memmem From owner-svn-src-stable-10@freebsd.org Mon Nov 16 00:58:33 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41BCEA30F2F; Mon, 16 Nov 2015 00:58:33 +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 0BE0E1AD2; Mon, 16 Nov 2015 00:58:32 +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 tAG0wWTj071896; Mon, 16 Nov 2015 00:58:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAG0wV70071893; Mon, 16 Nov 2015 00:58:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511160058.tAG0wV70071893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 16 Nov 2015 00:58: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: r290898 - in stable/10: etc/mtree usr.bin/limits usr.bin/limits/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 00:58:33 -0000 Author: ngie Date: Mon Nov 16 00:58:31 2015 New Revision: 290898 URL: https://svnweb.freebsd.org/changeset/base/290898 Log: MFC r290567: Add some basic tests that exercise cputime limits with limits(1) Sponsored by: EMC / Isilon Storage Division Added: stable/10/usr.bin/limits/tests/ - copied from r290567, head/usr.bin/limits/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/usr.bin/limits/Makefile stable/10/usr.bin/limits/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Mon Nov 16 00:52:31 2015 (r290897) +++ stable/10/etc/mtree/BSD.tests.dist Mon Nov 16 00:58:31 2015 (r290898) @@ -374,6 +374,8 @@ .. lastcomm .. + limits + .. m4 .. ncal Modified: stable/10/usr.bin/limits/Makefile ============================================================================== --- stable/10/usr.bin/limits/Makefile Mon Nov 16 00:52:31 2015 (r290897) +++ stable/10/usr.bin/limits/Makefile Mon Nov 16 00:58:31 2015 (r290898) @@ -1,7 +1,13 @@ # $FreeBSD$ +.include + PROG= limits DPADD= ${LIBUTIL} LDADD= -lutil +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/limits/tests/Makefile ============================================================================== --- head/usr.bin/limits/tests/Makefile Mon Nov 9 01:05:31 2015 (r290567) +++ stable/10/usr.bin/limits/tests/Makefile Mon Nov 16 00:58:31 2015 (r290898) @@ -1,5 +1,7 @@ # $FreeBSD$ +TESTSDIR= ${TESTSBASE}/usr.bin/limits + ATF_TESTS_SH+= limits_test .include From owner-svn-src-stable-10@freebsd.org Mon Nov 16 01:09:27 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E79CA2F0F3; Mon, 16 Nov 2015 01:09:27 +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 4A7A01EA3; Mon, 16 Nov 2015 01:09:27 +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 tAG19QEL074913; Mon, 16 Nov 2015 01:09:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAG19Pxr074903; Mon, 16 Nov 2015 01:09:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511160109.tAG19Pxr074903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 16 Nov 2015 01:09:25 +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: r290899 - stable/10/lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 01:09:27 -0000 Author: ngie Date: Mon Nov 16 01:09:25 2015 New Revision: 290899 URL: https://svnweb.freebsd.org/changeset/base/290899 Log: MFC r290253: Remove unnecessary `if (x)` tests before calling `free(x)`; free(3) already employs this check Sponsored by: EMC / Isilon Storage Division Modified: stable/10/lib/libc/rpc/clnt_bcast.c stable/10/lib/libc/rpc/clnt_vc.c stable/10/lib/libc/rpc/getnetconfig.c stable/10/lib/libc/rpc/mt_misc.c stable/10/lib/libc/rpc/rpc_soc.c stable/10/lib/libc/rpc/rpcb_clnt.c stable/10/lib/libc/rpc/svc.c stable/10/lib/libc/rpc/svc_dg.c stable/10/lib/libc/rpc/svc_simple.c stable/10/lib/libc/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/rpc/clnt_bcast.c ============================================================================== --- stable/10/lib/libc/rpc/clnt_bcast.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/clnt_bcast.c Mon Nov 16 01:09:25 2015 (r290899) @@ -631,13 +631,10 @@ rpc_broadcast_exp(prog, vers, proc, xarg } /* The giant for loop */ done_broad: - if (inbuf) - (void) free(inbuf); - if (outbuf) - (void) free(outbuf); + free(inbuf); + free(outbuf); #ifdef PORTMAP - if (outbuf_pmap) - (void) free(outbuf_pmap); + free(outbuf_pmap); #endif /* PORTMAP */ for (i = 0; i < fdlistno; i++) { (void)_close(fdlist[i].fd); Modified: stable/10/lib/libc/rpc/clnt_vc.c ============================================================================== --- stable/10/lib/libc/rpc/clnt_vc.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/clnt_vc.c Mon Nov 16 01:09:25 2015 (r290899) @@ -666,8 +666,7 @@ clnt_vc_destroy(cl) (void)_close(ct->ct_fd); } XDR_DESTROY(&(ct->ct_xdrs)); - if (ct->ct_addr.buf) - free(ct->ct_addr.buf); + free(ct->ct_addr.buf); mem_free(ct, sizeof(struct ct_data)); if (cl->cl_netid && cl->cl_netid[0]) mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); Modified: stable/10/lib/libc/rpc/getnetconfig.c ============================================================================== --- stable/10/lib/libc/rpc/getnetconfig.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/getnetconfig.c Mon Nov 16 01:09:25 2015 (r290899) @@ -164,8 +164,7 @@ __nc_error() if ((nc_addr = (int *)thr_getspecific(nc_key)) == NULL) { nc_addr = (int *)malloc(sizeof (int)); if (thr_setspecific(nc_key, (void *) nc_addr) != 0) { - if (nc_addr) - free(nc_addr); + free(nc_addr); return (&nc_error); } *nc_addr = 0; @@ -419,7 +418,7 @@ void *handlep; while (q != NULL) { p = q->next; - if (q->ncp->nc_lookups != NULL) free(q->ncp->nc_lookups); + free(q->ncp->nc_lookups); free(q->ncp); free(q->linep); free(q); @@ -541,8 +540,7 @@ freenetconfigent(netconfigp) { if (netconfigp != NULL) { free(netconfigp->nc_netid); /* holds all netconfigp's strings */ - if (netconfigp->nc_lookups != NULL) - free(netconfigp->nc_lookups); + free(netconfigp->nc_lookups); free(netconfigp); } return; @@ -631,8 +629,7 @@ struct netconfig *ncp; /* where to put r } else { char *cp; /* tmp string */ - if (ncp->nc_lookups != NULL) /* from last visit */ - free(ncp->nc_lookups); + free(ncp->nc_lookups); /* from last visit */ ncp->nc_lookups = NULL; ncp->nc_nlookups = 0; while ((cp = tokenp) != NULL) { Modified: stable/10/lib/libc/rpc/mt_misc.c ============================================================================== --- stable/10/lib/libc/rpc/mt_misc.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/mt_misc.c Mon Nov 16 01:09:25 2015 (r290899) @@ -106,8 +106,7 @@ __rpc_createerr() rce_addr = (struct rpc_createerr *) malloc(sizeof (struct rpc_createerr)); if (thr_setspecific(rce_key, (void *) rce_addr) != 0) { - if (rce_addr) - free(rce_addr); + free(rce_addr); return (&rpc_createerr); } memset(rce_addr, 0, sizeof (struct rpc_createerr)); Modified: stable/10/lib/libc/rpc/rpc_soc.c ============================================================================== --- stable/10/lib/libc/rpc/rpc_soc.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/rpc_soc.c Mon Nov 16 01:09:25 2015 (r290899) @@ -472,8 +472,7 @@ clntunix_create(raddr, prog, vers, sockp if ((raddr->sun_len == 0) || ((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) || ((svcaddr->buf = malloc(sizeof(struct sockaddr_un))) == NULL)) { - if (svcaddr != NULL) - free(svcaddr); + free(svcaddr); rpc_createerr.cf_stat = RPC_SYSTEMERROR; rpc_createerr.cf_error.re_errno = errno; return(cl); Modified: stable/10/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/10/lib/libc/rpc/rpcb_clnt.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/rpcb_clnt.c Mon Nov 16 01:09:25 2015 (r290899) @@ -183,8 +183,7 @@ delete_cache(addr) free(cptr->ac_netid); free(cptr->ac_taddr->buf); free(cptr->ac_taddr); - if (cptr->ac_uaddr) - free(cptr->ac_uaddr); + free(cptr->ac_uaddr); if (prevptr) prevptr->ac_next = cptr->ac_next; else @@ -222,14 +221,10 @@ add_cache(host, netid, taddr, uaddr) ad_cache->ac_taddr->buf = (char *) malloc(taddr->len); if (ad_cache->ac_taddr->buf == NULL) { out: - if (ad_cache->ac_host) - free(ad_cache->ac_host); - if (ad_cache->ac_netid) - free(ad_cache->ac_netid); - if (ad_cache->ac_uaddr) - free(ad_cache->ac_uaddr); - if (ad_cache->ac_taddr) - free(ad_cache->ac_taddr); + free(ad_cache->ac_host); + free(ad_cache->ac_netid); + free(ad_cache->ac_uaddr); + free(ad_cache->ac_taddr); free(ad_cache); return; } @@ -262,8 +257,7 @@ out: free(cptr->ac_netid); free(cptr->ac_taddr->buf); free(cptr->ac_taddr); - if (cptr->ac_uaddr) - free(cptr->ac_uaddr); + free(cptr->ac_uaddr); if (prevptr) { prevptr->ac_next = NULL; @@ -816,10 +810,8 @@ __rpcb_findaddr_timed(program, version, malloc(remote.len)) == NULL)) { rpc_createerr.cf_stat = RPC_SYSTEMERROR; clnt_geterr(client, &rpc_createerr.cf_error); - if (address) { - free(address); - address = NULL; - } + free(address); + address = NULL; goto error; } memcpy(address->buf, remote.buf, remote.len); Modified: stable/10/lib/libc/rpc/svc.c ============================================================================== --- stable/10/lib/libc/rpc/svc.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/svc.c Mon Nov 16 01:09:25 2015 (r290899) @@ -201,8 +201,7 @@ svc_reg(xprt, prog, vers, dispatch, ncon rwlock_wrlock(&svc_lock); if ((s = svc_find(prog, vers, &prev, netid)) != NULL) { - if (netid) - free(netid); + free(netid); if (s->sc_dispatch == dispatch) goto rpcb_it; /* he is registering another xptr */ rwlock_unlock(&svc_lock); @@ -210,8 +209,7 @@ svc_reg(xprt, prog, vers, dispatch, ncon } s = mem_alloc(sizeof (struct svc_callout)); if (s == NULL) { - if (netid) - free(netid); + free(netid); rwlock_unlock(&svc_lock); return (FALSE); } Modified: stable/10/lib/libc/rpc/svc_dg.c ============================================================================== --- stable/10/lib/libc/rpc/svc_dg.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/svc_dg.c Mon Nov 16 01:09:25 2015 (r290899) @@ -421,8 +421,7 @@ svc_dg_destroy(xprt) (void) mem_free(xprt->xp_rtaddr.buf, xprt->xp_rtaddr.maxlen); if (xprt->xp_ltaddr.buf) (void) mem_free(xprt->xp_ltaddr.buf, xprt->xp_ltaddr.maxlen); - if (xprt->xp_tp) - (void) free(xprt->xp_tp); + free(xprt->xp_tp); svc_xprt_free(xprt); } Modified: stable/10/lib/libc/rpc/svc_simple.c ============================================================================== --- stable/10/lib/libc/rpc/svc_simple.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/svc_simple.c Mon Nov 16 01:09:25 2015 (r290899) @@ -164,10 +164,8 @@ rpc_reg(prognum, versnum, procnum, progn if (((xdrbuf = malloc((unsigned)recvsz)) == NULL) || ((netid = strdup(nconf->nc_netid)) == NULL)) { warnx(rpc_reg_err, rpc_reg_msg, __no_mem_str); - if (xdrbuf != NULL) - free(xdrbuf); - if (netid != NULL) - free(netid); + free(xdrbuf); + free(netid); SVC_DESTROY(svcxprt); break; } Modified: stable/10/lib/libc/rpc/svc_vc.c ============================================================================== --- stable/10/lib/libc/rpc/svc_vc.c Mon Nov 16 00:58:31 2015 (r290898) +++ stable/10/lib/libc/rpc/svc_vc.c Mon Nov 16 01:09:25 2015 (r290899) @@ -408,10 +408,8 @@ __svc_vc_dodestroy(xprt) mem_free(xprt->xp_rtaddr.buf, xprt->xp_rtaddr.maxlen); if (xprt->xp_ltaddr.buf) mem_free(xprt->xp_ltaddr.buf, xprt->xp_ltaddr.maxlen); - if (xprt->xp_tp) - free(xprt->xp_tp); - if (xprt->xp_netid) - free(xprt->xp_netid); + free(xprt->xp_tp); + free(xprt->xp_netid); svc_xprt_free(xprt); } From owner-svn-src-stable-10@freebsd.org Mon Nov 16 19:42:42 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81B73A3051C; Mon, 16 Nov 2015 19:42:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::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 5CBED1ADD; Mon, 16 Nov 2015 19:42:42 +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 bigwig.baldwin.cx (Postfix) with ESMTPSA id 74DDAB99B; Mon, 16 Nov 2015 14:42:41 -0500 (EST) From: John Baldwin To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r290826 - stable/10/share/man/man9 Date: Mon, 16 Nov 2015 11:30:47 -0800 Message-ID: <1722584.tCpg1QuYc9@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201511141730.tAEHUqkU087704@repo.freebsd.org> References: <201511141730.tAEHUqkU087704@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.2.7 (bigwig.baldwin.cx); Mon, 16 Nov 2015 14:42:41 -0500 (EST) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 19:42:42 -0000 On Saturday, November 14, 2015 05:30:52 PM Bryan Drewery wrote: > Author: bdrewery > Date: Sat Nov 14 17:30:52 2015 > New Revision: 290826 > URL: https://svnweb.freebsd.org/changeset/base/290826 > > Log: > MFC r290428: > > remove \, it confuses things. Thanks for fixing my brain-o. -- John Baldwin From owner-svn-src-stable-10@freebsd.org Tue Nov 17 15:14:02 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 481E2A301FA; Tue, 17 Nov 2015 15:14:02 +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 128C91A60; Tue, 17 Nov 2015 15:14: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 tAHFE10c053886; Tue, 17 Nov 2015 15:14:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAHFE1CI053885; Tue, 17 Nov 2015 15:14:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201511171514.tAHFE1CI053885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 17 Nov 2015 15:14:01 +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: r290984 - stable/10/tools/tools/zfsboottest X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2015 15:14:02 -0000 Author: avg Date: Tue Nov 17 15:14:00 2015 New Revision: 290984 URL: https://svnweb.freebsd.org/changeset/base/290984 Log: MFC r290451: zfsboottest: build as a 32 bit application Modified: stable/10/tools/tools/zfsboottest/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/zfsboottest/Makefile ============================================================================== --- stable/10/tools/tools/zfsboottest/Makefile Tue Nov 17 15:10:24 2015 (r290983) +++ stable/10/tools/tools/zfsboottest/Makefile Tue Nov 17 15:14:00 2015 (r290984) @@ -16,6 +16,7 @@ CFLAGS= -O1 \ -I. \ -fdiagnostics-show-option \ -W -Wextra -Wno-sign-compare -Wno-unused-parameter +CFLAGS+=-m32 LDADD+= -lmd .if ${MACHINE_CPUARCH} == "amd64" From owner-svn-src-stable-10@freebsd.org Tue Nov 17 15:18:53 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFA5FA3035A; Tue, 17 Nov 2015 15:18: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 76E4B1E82; Tue, 17 Nov 2015 15:18:53 +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 tAHFIq1V054335; Tue, 17 Nov 2015 15:18:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAHFIqlw054334; Tue, 17 Nov 2015 15:18:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201511171518.tAHFIqlw054334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 17 Nov 2015 15:18: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: r290986 - stable/10/tools/tools/zfsboottest X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2015 15:18:53 -0000 Author: avg Date: Tue Nov 17 15:18:52 2015 New Revision: 290986 URL: https://svnweb.freebsd.org/changeset/base/290986 Log: MFC r290452: zfsboottest: catch up with r241289, call zfs_spa_init() for all found pools Modified: stable/10/tools/tools/zfsboottest/zfsboottest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- stable/10/tools/tools/zfsboottest/zfsboottest.c Tue Nov 17 15:14:16 2015 (r290985) +++ stable/10/tools/tools/zfsboottest/zfsboottest.c Tue Nov 17 15:18:52 2015 (r290986) @@ -136,19 +136,21 @@ main(int argc, char** argv) } } + STAILQ_FOREACH(spa, &zfs_pools, spa_link) { + if (zfs_spa_init(spa)) { + fprintf(stderr, "can't init pool %s\n", spa->spa_name); + exit(1); + } + } + + spa_all_status(); + spa = STAILQ_FIRST(&zfs_pools); if (spa == NULL) { fprintf(stderr, "no pools\n"); exit(1); } - if (zfs_spa_init(spa)) { - fprintf(stderr, "can't init pool\n"); - exit(1); - } - - spa_all_status(); - #if 0 uint64_t rootobj; if (zfs_get_root(spa, &rootobj)) { From owner-svn-src-stable-10@freebsd.org Tue Nov 17 15:20:13 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95EF3A3041F; Tue, 17 Nov 2015 15:20:13 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 413451157; Tue, 17 Nov 2015 15:20:13 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAHFKCN8054512; Tue, 17 Nov 2015 15:20:12 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAHFKCBJ054511; Tue, 17 Nov 2015 15:20:12 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201511171520.tAHFKCBJ054511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Tue, 17 Nov 2015 15:20:12 +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: r290988 - stable/10/sys/dev/sound/midi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2015 15:20:13 -0000 Author: avatar Date: Tue Nov 17 15:20:12 2015 New Revision: 290988 URL: https://svnweb.freebsd.org/changeset/base/290988 Log: MFC r289888: - Plugging a memory leak when malloc() failed during initialisation; - Plugging another memory leak inside the destructor. Reviewed by: matk Modified: stable/10/sys/dev/sound/midi/midi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/midi/midi.c ============================================================================== --- stable/10/sys/dev/sound/midi/midi.c Tue Nov 17 15:18:59 2015 (r290987) +++ stable/10/sys/dev/sound/midi/midi.c Tue Nov 17 15:20:12 2015 (r290988) @@ -319,6 +319,8 @@ midi_init(kobj_class_t cls, int unit, in goto err0; m->synth = malloc(sizeof(*m->synth), M_MIDI, M_NOWAIT | M_ZERO); + if (m->synth == NULL) + goto err1; kobj_init((kobj_t)m->synth, &midisynth_class); m->synth->m = m; kobj_init((kobj_t)m, cls); @@ -327,7 +329,7 @@ midi_init(kobj_class_t cls, int unit, in MIDI_DEBUG(1, printf("midiinit queues %d/%d.\n", inqsize, outqsize)); if (!inqsize && !outqsize) - goto err1; + goto err2; mtx_init(&m->lock, "raw midi", NULL, 0); mtx_init(&m->qlock, "q raw midi", NULL, 0); @@ -352,7 +354,7 @@ midi_init(kobj_class_t cls, int unit, in if ((inqsize && !MIDIQ_BUF(m->inq)) || (outqsize && !MIDIQ_BUF(m->outq))) - goto err2; + goto err3; m->busy = 0; @@ -362,7 +364,7 @@ midi_init(kobj_class_t cls, int unit, in m->cookie = cookie; if (MPU_INIT(m, cookie)) - goto err2; + goto err3; mtx_unlock(&m->lock); mtx_unlock(&m->qlock); @@ -378,13 +380,14 @@ midi_init(kobj_class_t cls, int unit, in return m; -err2: mtx_destroy(&m->qlock); +err3: mtx_destroy(&m->qlock); mtx_destroy(&m->lock); if (MIDIQ_BUF(m->inq)) free(MIDIQ_BUF(m->inq), M_MIDI); if (MIDIQ_BUF(m->outq)) free(MIDIQ_BUF(m->outq), M_MIDI); +err2: free(m->synth, M_MIDI); err1: free(m, M_MIDI); err0: mtx_unlock(&midistat_lock); MIDI_DEBUG(1, printf("midi_init ended in error\n")); @@ -1388,6 +1391,7 @@ midi_destroy(struct snd_midi *m, int mid free(MIDIQ_BUF(m->outq), M_MIDI); mtx_destroy(&m->qlock); mtx_destroy(&m->lock); + free(m->synth, M_MIDI); free(m, M_MIDI); return 0; } From owner-svn-src-stable-10@freebsd.org Tue Nov 17 18:22:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 115F7A312C4; Tue, 17 Nov 2015 18:22: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 B0A15111E; Tue, 17 Nov 2015 18:22:57 +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 tAHIMuLB015105; Tue, 17 Nov 2015 18:22:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAHIMuB8015103; Tue, 17 Nov 2015 18:22:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201511171822.tAHIMuB8015103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 17 Nov 2015 18:22: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: r290995 - in stable: 10/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2015 18:22:58 -0000 Author: gjb Date: Tue Nov 17 18:22:56 2015 New Revision: 290995 URL: https://svnweb.freebsd.org/changeset/base/290995 Log: Document EN-15:19.kqueue, EN-15:20.vm, SA-15:25.ntp Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Tue Nov 17 16:46:05 2015 (r290994) +++ stable/10/release/doc/share/xml/errata.xml Tue Nov 17 18:22:56 2015 (r290995) @@ -73,6 +73,22 @@ Implement pubkey support for &man.pkg.7; bootstrap. + + + FreeBSD-EN-15:19.kqueue + 4 November 2015 + &man.kqueue.2; write events never fire for files + larger than 2GB. + + + + FreeBSD-EN-15:20.vm + 4 November 2015 + Applications exiting due to segmentation + violation on a correct memory address. + Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Tue Nov 17 16:46:05 2015 (r290994) +++ stable/10/release/doc/share/xml/security.xml Tue Nov 17 18:22:56 2015 (r290995) @@ -39,6 +39,13 @@ 29 September 2015 Remote denial of service + + + FreeBSD-SA-15:25.ntp + 26 October 2015 + Multiple vulnerabilities + From owner-svn-src-stable-10@freebsd.org Thu Nov 19 00:14:24 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2D58A3254E; Thu, 19 Nov 2015 00:14: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 71A9D137C; Thu, 19 Nov 2015 00:14: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 tAJ0EN0Z019424; Thu, 19 Nov 2015 00:14:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJ0EN75019423; Thu, 19 Nov 2015 00:14:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511190014.tAJ0EN75019423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 19 Nov 2015 00:14: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: r291042 - stable/10/usr.sbin/bootparamd/bootparamd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 00:14:24 -0000 Author: ngie Date: Thu Nov 19 00:14:23 2015 New Revision: 291042 URL: https://svnweb.freebsd.org/changeset/base/291042 Log: MFC r290645: Fix some trivial warnings with bootparamd/main.c - Convert K&R to something a bit less ancient - Remove an incorrect, duplicate prototype for bootparamprog_1(..) PR: 71667 Submitted by: bcran Sponsored by: EMC / Isilon Storage Division Modified: stable/10/usr.sbin/bootparamd/bootparamd/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bootparamd/bootparamd/main.c ============================================================================== --- stable/10/usr.sbin/bootparamd/bootparamd/main.c Thu Nov 19 00:01:52 2015 (r291041) +++ stable/10/usr.sbin/bootparamd/bootparamd/main.c Thu Nov 19 00:14:23 2015 (r291042) @@ -36,13 +36,10 @@ in_addr_t route_addr = -1; struct sockaddr_in my_addr; char *bootpfile = "/etc/bootparams"; -extern void bootparamprog_1(); static void usage(void); int -main(argc, argv) -int argc; -char **argv; +main(int argc, char **argv) { SVCXPRT *transp; struct hostent *he; @@ -110,7 +107,7 @@ char **argv; } static void -usage() +usage(void) { fprintf(stderr, "usage: bootparamd [-d] [-s] [-r router] [-f bootparmsfile]\n"); From owner-svn-src-stable-10@freebsd.org Thu Nov 19 00:25:59 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC9DAA3285B; Thu, 19 Nov 2015 00:25:59 +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 7778C1C63; Thu, 19 Nov 2015 00:25:59 +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 tAJ0Pw5g022651; Thu, 19 Nov 2015 00:25:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJ0PwqT022649; Thu, 19 Nov 2015 00:25:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511190025.tAJ0PwqT022649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 19 Nov 2015 00:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291044 - in stable/10/contrib/netbsd-tests/lib/libc: gen regex X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 00:25:59 -0000 Author: ngie Date: Thu Nov 19 00:25:58 2015 New Revision: 291044 URL: https://svnweb.freebsd.org/changeset/base/291044 Log: MFC r290847: Fix -Wunused warnings with variables used unlit code by adding appropriate #ifdef guards around the variables Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_glob.c stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_glob.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_glob.c Thu Nov 19 00:19:09 2015 (r291043) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_glob.c Thu Nov 19 00:25:58 2015 (r291044) @@ -91,9 +91,11 @@ static struct gl_dir d[] = { { "a/b", b, __arraycount(b), 0 }, }; +#ifndef __FreeBSD__ static const char *glob_star[] = { "a/1", "a/3", "a/4", "a/b", "a/b/w", "a/b/x", "a/b/y", "a/b/z", }; +#endif static const char *glob_star_not[] = { "a/1", "a/3", "a/4", "a/b", Modified: stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c Thu Nov 19 00:19:09 2015 (r291043) +++ stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c Thu Nov 19 00:25:58 2015 (r291044) @@ -126,11 +126,15 @@ static void s_print(struct re_guts *g, FILE *d) { sop *s; +#ifdef __NetBSD__ cset *cs; +#endif int done = 0; sop opnd; int col = 0; +#ifdef __NetBSD__ ssize_t last; +#endif sopno offset = 2; # define GAP() { if (offset % 5 == 0) { \ if (col > 40) { \ From owner-svn-src-stable-10@freebsd.org Thu Nov 19 02:04:17 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAF38A2FF96; Thu, 19 Nov 2015 02:04:17 +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 884311ED0; Thu, 19 Nov 2015 02:04:17 +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 tAJ24G9d053358; Thu, 19 Nov 2015 02:04:16 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJ24GXF053357; Thu, 19 Nov 2015 02:04:16 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201511190204.tAJ24GXF053357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Thu, 19 Nov 2015 02:04:16 +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: r291050 - stable/10/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 02:04:18 -0000 Author: ache Date: Thu Nov 19 02:04:16 2015 New Revision: 291050 URL: https://svnweb.freebsd.org/changeset/base/291050 Log: MFC: r290549,r290729 r290549: Reorganize code to elimitate one _sseek() call for append modes. r290729: 1) Remove my overcomplicated error fallback and just return error immediatelly as old code does, now for append modes too. Real use case for such fallback is impossible (unless specially crafted). 2) Remove now unneded include I forgot to remove in prev. commits. Modified: stable/10/lib/libc/stdio/ftell.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/ftell.c ============================================================================== --- stable/10/lib/libc/stdio/ftell.c Thu Nov 19 01:58:12 2015 (r291049) +++ stable/10/lib/libc/stdio/ftell.c Thu Nov 19 02:04:16 2015 (r291050) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include -#include #include #include #include "un-namespace.h" @@ -98,7 +97,13 @@ _ftello(FILE *fp, fpos_t *offset) * Find offset of underlying I/O object, then * adjust for buffered bytes. */ - if (fp->_flags & __SOFF) + if (!(fp->_flags & __SRD) && (fp->_flags & __SWR) && + fp->_p != NULL && fp->_p - fp->_bf._base > 0 && + ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) { + pos = _sseek(fp, (fpos_t)0, SEEK_END); + if (pos == -1) + return (1); + } else if (fp->_flags & __SOFF) pos = fp->_offset; else { pos = _sseek(fp, (fpos_t)0, SEEK_CUR); @@ -125,26 +130,6 @@ _ftello(FILE *fp, fpos_t *offset) * position to be greater than that in the * underlying object. */ - if ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP)) { - int serrno = errno; - - errno = 0; - if ((pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) { - if (errno == ESPIPE || - (fp->_flags & __SOPT) || __sflush(fp) || - (pos = - _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1) - return (1); - else { - errno = serrno; - *offset = pos; - return (0); - } - } - errno = serrno; - /* fp->_p can be changed in _sseek(), recalculate. */ - n = fp->_p - fp->_bf._base; - } if (pos > OFF_MAX - n) { errno = EOVERFLOW; return (1); From owner-svn-src-stable-10@freebsd.org Thu Nov 19 09:52:48 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 267A2A32FA9; Thu, 19 Nov 2015 09:52:48 +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 C6C841B28; Thu, 19 Nov 2015 09:52:47 +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 tAJ9qk4Z090046; Thu, 19 Nov 2015 09:52:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJ9qkxt090044; Thu, 19 Nov 2015 09:52:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511190952.tAJ9qkxt090044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Nov 2015 09:52: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: r291062 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 09:52:48 -0000 Author: hselasky Date: Thu Nov 19 09:52:46 2015 New Revision: 291062 URL: https://svnweb.freebsd.org/changeset/base/291062 Log: MFC r290489: Add helper function to check if a USB page cache buffer is properly aligned to reduce the use of bounce buffers in PIO mode. Modified: stable/10/sys/dev/usb/usb_busdma.c stable/10/sys/dev/usb/usb_busdma.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/10/sys/dev/usb/usb_busdma.c Thu Nov 19 08:04:05 2015 (r291061) +++ stable/10/sys/dev/usb/usb_busdma.c Thu Nov 19 09:52:46 2015 (r291062) @@ -134,6 +134,35 @@ usbd_get_page(struct usb_page_cache *pc, } /*------------------------------------------------------------------------* + * usb_pc_buffer_is_aligned - verify alignment + * + * This function is used to check if a page cache buffer is properly + * aligned to reduce the use of bounce buffers in PIO mode. + *------------------------------------------------------------------------*/ +uint8_t +usb_pc_buffer_is_aligned(struct usb_page_cache *pc, usb_frlength_t offset, + usb_frlength_t len, usb_frlength_t mask) +{ + struct usb_page_search buf_res; + + while (len != 0) { + + usbd_get_page(pc, offset, &buf_res); + + if (buf_res.length > len) + buf_res.length = len; + if (USB_P2U(buf_res.buffer) & mask) + return (0); + if (buf_res.length & mask) + return (0); + + offset += buf_res.length; + len -= buf_res.length; + } + return (1); +} + +/*------------------------------------------------------------------------* * usbd_copy_in - copy directly to DMA-able memory *------------------------------------------------------------------------*/ void Modified: stable/10/sys/dev/usb/usb_busdma.h ============================================================================== --- stable/10/sys/dev/usb/usb_busdma.h Thu Nov 19 08:04:05 2015 (r291061) +++ stable/10/sys/dev/usb/usb_busdma.h Thu Nov 19 09:52:46 2015 (r291062) @@ -159,5 +159,8 @@ void usb_pc_cpu_flush(struct usb_page_ca void usb_pc_cpu_invalidate(struct usb_page_cache *pc); void usb_pc_dmamap_destroy(struct usb_page_cache *pc); void usb_pc_free_mem(struct usb_page_cache *pc); +uint8_t usb_pc_buffer_is_aligned(struct usb_page_cache *pc, + usb_frlength_t offset, usb_frlength_t len, + usb_frlength_t mask); #endif /* _USB_BUSDMA_H_ */ From owner-svn-src-stable-10@freebsd.org Thu Nov 19 09:57:42 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93BD4A33100; Thu, 19 Nov 2015 09:57: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 6C5EA1139; Thu, 19 Nov 2015 09:57:42 +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 tAJ9vfrG090596; Thu, 19 Nov 2015 09:57:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJ9vfeV090594; Thu, 19 Nov 2015 09:57:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511190957.tAJ9vfeV090594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Nov 2015 09:57:41 +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: r291064 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 09:57:42 -0000 Author: hselasky Date: Thu Nov 19 09:57:41 2015 New Revision: 291064 URL: https://svnweb.freebsd.org/changeset/base/291064 Log: MFC r290542: Avoid using the bounce buffer when the source or destination buffer is 32-bits aligned. Merge the two bounce buffers into a single one. Some rough tests showed that the DWC OTG throughput on RPI2 increased by 10% after this patch. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c stable/10/sys/dev/usb/controller/dwc_otg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Thu Nov 19 09:54:28 2015 (r291063) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Thu Nov 19 09:57:41 2015 (r291064) @@ -182,6 +182,110 @@ dwc_otg_get_hw_ep_profile(struct usb_dev } static void +dwc_otg_write_fifo(struct dwc_otg_softc *sc, struct usb_page_cache *pc, + uint32_t offset, uint32_t fifo, uint32_t count) +{ + uint32_t temp; + + /* round down length to nearest 4-bytes */ + temp = count & ~3; + + /* check if we can write the data directly */ + if (temp != 0 && usb_pc_buffer_is_aligned(pc, offset, temp, 3)) { + struct usb_page_search buf_res; + + /* pre-subtract length */ + count -= temp; + + /* iterate buffer list */ + do { + /* get current buffer pointer */ + usbd_get_page(pc, offset, &buf_res); + + if (buf_res.length > temp) + buf_res.length = temp; + + /* transfer data into FIFO */ + bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, + fifo, buf_res.buffer, buf_res.length / 4); + + offset += buf_res.length; + fifo += buf_res.length; + temp -= buf_res.length; + } while (temp != 0); + } + + /* check for remainder */ + if (count != 0) { + /* clear topmost word before copy */ + sc->sc_bounce_buffer[(count - 1) / 4] = 0; + + /* copy out data */ + usbd_copy_out(pc, offset, + sc->sc_bounce_buffer, count); + + /* transfer data into FIFO */ + bus_space_write_region_4(sc->sc_io_tag, + sc->sc_io_hdl, fifo, sc->sc_bounce_buffer, + (count + 3) / 4); + } +} + +static void +dwc_otg_read_fifo(struct dwc_otg_softc *sc, struct usb_page_cache *pc, + uint32_t offset, uint32_t count) +{ + uint32_t temp; + + /* round down length to nearest 4-bytes */ + temp = count & ~3; + + /* check if we can read the data directly */ + if (temp != 0 && usb_pc_buffer_is_aligned(pc, offset, temp, 3)) { + struct usb_page_search buf_res; + + /* pre-subtract length */ + count -= temp; + + /* iterate buffer list */ + do { + /* get current buffer pointer */ + usbd_get_page(pc, offset, &buf_res); + + if (buf_res.length > temp) + buf_res.length = temp; + + /* transfer data from FIFO */ + bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, + sc->sc_current_rx_fifo, buf_res.buffer, buf_res.length / 4); + + offset += buf_res.length; + sc->sc_current_rx_fifo += buf_res.length; + sc->sc_current_rx_bytes -= buf_res.length; + temp -= buf_res.length; + } while (temp != 0); + } + + /* check for remainder */ + if (count != 0) { + /* read data into bounce buffer */ + bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, + sc->sc_current_rx_fifo, + sc->sc_bounce_buffer, (count + 3) / 4); + + /* store data into proper buffer */ + usbd_copy_in(pc, offset, sc->sc_bounce_buffer, count); + + /* round length up to nearest 4 bytes */ + count = (count + 3) & ~3; + + /* update counters */ + sc->sc_current_rx_bytes -= count; + sc->sc_current_rx_fifo += count; + } +} + +static void dwc_otg_tx_fifo_reset(struct dwc_otg_softc *sc, uint32_t value) { uint32_t temp; @@ -580,6 +684,14 @@ dwc_otg_common_rx_ack(struct dwc_otg_sof sc->sc_irq_mask |= GINTMSK_RXFLVLMSK; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + if (sc->sc_current_rx_bytes != 0) { + /* need to dump remaining data */ + bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, + sc->sc_current_rx_fifo, sc->sc_bounce_buffer, + sc->sc_current_rx_bytes / 4); + /* clear number of active bytes to receive */ + sc->sc_current_rx_bytes = 0; + } /* clear cached status */ sc->sc_last_rx_status = 0; } @@ -762,6 +874,7 @@ dwc_otg_host_dump_rx(struct dwc_otg_soft td->channel[x] != GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status)) continue; dwc_otg_common_rx_ack(sc); + break; } } @@ -899,6 +1012,7 @@ send_pkt: td->state = DWC_CHAN_ST_WAIT_ANE; } + /* copy out control request */ usbd_copy_out(td->pc, 0, &req, sizeof(req)); DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel[0]), @@ -1025,11 +1139,11 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s goto not_complete; } - /* copy in control request */ - memcpy(&req, sc->sc_rx_bounce_buffer, sizeof(req)); + /* read FIFO */ + dwc_otg_read_fifo(sc, td->pc, 0, sizeof(req)); - /* copy data into real buffer */ - usbd_copy_in(td->pc, 0, &req, sizeof(req)); + /* copy out control request */ + usbd_copy_out(td->pc, 0, &req, sizeof(req)); td->offset = sizeof(req); td->remainder = 0; @@ -1213,8 +1327,8 @@ dwc_otg_host_data_rx_sub(struct dwc_otg_ goto complete; } - usbd_copy_in(td->pc, td->offset, - sc->sc_rx_bounce_buffer, count); + /* read data from FIFO */ + dwc_otg_read_fifo(sc, td->pc, td->offset, count); td->remainder -= count; td->offset += count; @@ -1584,7 +1698,9 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc return (0); /* we are complete */ } - usbd_copy_in(td->pc, td->offset, sc->sc_rx_bounce_buffer, count); + /* read data from FIFO */ + dwc_otg_read_fifo(sc, td->pc, td->offset, count); + td->remainder -= count; td->offset += count; @@ -1905,17 +2021,9 @@ send_pkt: DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); if (count != 0) { - /* clear topmost word before copy */ - sc->sc_tx_bounce_buffer[(count - 1) / 4] = 0; - - /* copy out data */ - usbd_copy_out(td->pc, td->offset + td->tx_bytes, - sc->sc_tx_bounce_buffer, count); - - /* transfer data into FIFO */ - bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, - DOTG_DFIFO(channel), - sc->sc_tx_bounce_buffer, (count + 3) / 4); + /* write data into FIFO */ + dwc_otg_write_fifo(sc, td->pc, td->offset + + td->tx_bytes, DOTG_DFIFO(channel), count); } /* store number of bytes transmitted */ @@ -2055,18 +2163,9 @@ repeat: count = fifo_left; if (count != 0) { - - /* clear topmost word before copy */ - sc->sc_tx_bounce_buffer[(count - 1) / 4] = 0; - - /* copy out data */ - usbd_copy_out(td->pc, td->offset, - sc->sc_tx_bounce_buffer, count); - - /* transfer data into FIFO */ - bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, - DOTG_DFIFO(td->ep_no), - sc->sc_tx_bounce_buffer, (count + 3) / 4); + /* write data into FIFO */ + dwc_otg_write_fifo(sc, td->pc, td->offset, + DOTG_DFIFO(td->ep_no), count); td->tx_bytes -= count; td->remainder -= count; @@ -2617,6 +2716,11 @@ repeat: sc->sc_chan_state[ep_no].wait_halted = 0; DPRINTFN(5, "channel halt complete ch=%u\n", ep_no); } + /* store bytes and FIFO offset */ + sc->sc_current_rx_bytes = 0; + sc->sc_current_rx_fifo = 0; + + /* acknowledge status */ dwc_otg_common_rx_ack(sc); goto repeat; } @@ -2626,13 +2730,11 @@ repeat: ep_no = GRXSTSRD_CHNUM_GET( sc->sc_last_rx_status); - /* receive data, if any */ - if (temp != 0) { - DPRINTF("Reading %d bytes from ep %d\n", temp, ep_no); - bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, - DOTG_DFIFO(ep_no), - sc->sc_rx_bounce_buffer, (temp + 3) / 4); - } + /* store bytes and FIFO offset */ + sc->sc_current_rx_bytes = (temp + 3) & ~3; + sc->sc_current_rx_fifo = DOTG_DFIFO(ep_no); + + DPRINTF("Reading %d bytes from ep %d\n", temp, ep_no); /* check if we should dump the data */ if (!(sc->sc_active_rx_ep & (1U << ep_no))) { Modified: stable/10/sys/dev/usb/controller/dwc_otg.h ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.h Thu Nov 19 09:54:28 2015 (r291063) +++ stable/10/sys/dev/usb/controller/dwc_otg.h Thu Nov 19 09:57:41 2015 (r291064) @@ -173,8 +173,7 @@ struct dwc_otg_softc { bus_space_tag_t sc_io_tag; bus_space_handle_t sc_io_hdl; - uint32_t sc_rx_bounce_buffer[1024 / 4]; - uint32_t sc_tx_bounce_buffer[MAX(512 * DWC_OTG_MAX_TXP, 1024) / 4]; + uint32_t sc_bounce_buffer[MAX(512 * DWC_OTG_MAX_TXP, 1024) / 4]; uint32_t sc_fifo_size; uint32_t sc_irq_mask; @@ -186,6 +185,9 @@ struct dwc_otg_softc { uint32_t sc_hprt_val; uint32_t sc_xfer_complete; + uint16_t sc_current_rx_bytes; + uint16_t sc_current_rx_fifo; + uint16_t sc_active_rx_ep; uint16_t sc_last_frame_num; From owner-svn-src-stable-10@freebsd.org Thu Nov 19 10:00:19 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 112A6A331D8; Thu, 19 Nov 2015 10:00: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 C9A2A14C7; Thu, 19 Nov 2015 10:00:18 +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 tAJA0HW2090763; Thu, 19 Nov 2015 10:00:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJA0H0l090761; Thu, 19 Nov 2015 10:00:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511191000.tAJA0H0l090761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Nov 2015 10:00:17 +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: r291065 - in stable/10/sys/dev/usb: . input X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 10:00:19 -0000 Author: hselasky Date: Thu Nov 19 10:00:17 2015 New Revision: 291065 URL: https://svnweb.freebsd.org/changeset/base/291065 Log: MFC r290639: Update the wsp driver to support newer touch pads, like found in MacBookPro11,4 and MacBook12,1. This update adds support for the force touch parameter. PR: 204420 Modified: stable/10/sys/dev/usb/input/wsp.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/wsp.c ============================================================================== --- stable/10/sys/dev/usb/input/wsp.c Thu Nov 19 09:57:41 2015 (r291064) +++ stable/10/sys/dev/usb/input/wsp.c Thu Nov 19 10:00:17 2015 (r291065) @@ -94,8 +94,8 @@ static struct wsp_tuning { .z_factor = 5, .pressure_touch_threshold = 50, .pressure_untouch_threshold = 10, - .pressure_tap_threshold = 100, - .scr_hor_threshold = 10, + .pressure_tap_threshold = 120, + .scr_hor_threshold = 20, }; static void @@ -122,8 +122,6 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressu SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RW, &wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold"); -#define WSP_IFACE_INDEX 1 - /* * Some tables, structures, definitions and constant values for the * touchpad protocol has been copied from Linux's @@ -155,21 +153,30 @@ struct bt_data { enum tp_type { TYPE1, /* plain trackpad */ TYPE2, /* button integrated in trackpad */ - TYPE3 /* additional header fields since June 2013 */ + TYPE3, /* additional header fields since June 2013 */ + TYPE4 /* additional header field for pressure data */ }; /* trackpad finger data offsets, le16-aligned */ #define FINGER_TYPE1 (13 * 2) #define FINGER_TYPE2 (15 * 2) #define FINGER_TYPE3 (19 * 2) +#define FINGER_TYPE4 (23 * 2) /* trackpad button data offsets */ #define BUTTON_TYPE2 15 #define BUTTON_TYPE3 23 +#define BUTTON_TYPE4 31 /* list of device capability bits */ #define HAS_INTEGRATED_BUTTON 1 +/* trackpad finger data block size */ +#define FSIZE_TYPE1 (14 * 2) +#define FSIZE_TYPE2 (14 * 2) +#define FSIZE_TYPE3 (14 * 2) +#define FSIZE_TYPE4 (15 * 2) + /* trackpad finger header - little endian */ struct tp_header { uint8_t flag; @@ -197,9 +204,10 @@ struct tp_finger { int16_t orientation; /* 16384 when point, else 15 bit angle */ int16_t touch_major; /* touch area, major axis */ int16_t touch_minor; /* touch area, minor axis */ - int16_t unused[3]; /* zeros */ + int16_t unused[2]; /* zeros */ + int16_t pressure; /* pressure on forcetouch touchpad */ int16_t multi; /* one finger: varies, more fingers: - * constant */ + * constant */ } __packed; /* trackpad finger data size, empirically at least ten fingers */ @@ -207,7 +215,7 @@ struct tp_finger { #define SIZEOF_FINGER sizeof(struct tp_finger) #define SIZEOF_ALL_FINGERS (MAX_FINGERS * SIZEOF_FINGER) -#if (WSP_BUFFER_MAX < ((MAX_FINGERS * 14 * 2) + FINGER_TYPE3)) +#if (WSP_BUFFER_MAX < ((MAX_FINGERS * FSIZE_TYPE4) + FINGER_TYPE4)) #error "WSP_BUFFER_MAX is too small" #endif @@ -224,6 +232,7 @@ enum { WSP_FLAG_WELLSPRING7, WSP_FLAG_WELLSPRING7A, WSP_FLAG_WELLSPRING8, + WSP_FLAG_WELLSPRING9, WSP_FLAG_MAX, }; @@ -231,69 +240,213 @@ enum { struct wsp_dev_params { uint8_t caps; /* device capability bitmask */ uint8_t tp_type; /* type of trackpad interface */ + uint8_t tp_button; /* offset to button data */ uint8_t tp_offset; /* offset to trackpad finger data */ + uint8_t tp_fsize; /* bytes in single finger block */ + uint8_t tp_delta; /* offset from header to finger struct */ + uint8_t iface_index; + uint8_t um_size; /* usb control message length */ + uint8_t um_req_val; /* usb control message value */ + uint8_t um_req_idx; /* usb control message index */ + uint8_t um_switch_idx; /* usb control message mode switch index */ + uint8_t um_switch_on; /* usb control message mode switch on */ + uint8_t um_switch_off; /* usb control message mode switch off */ }; static const struct wsp_dev_params wsp_dev_params[WSP_FLAG_MAX] = { [WSP_FLAG_WELLSPRING1] = { .caps = 0, .tp_type = TYPE1, + .tp_button = 0, .tp_offset = FINGER_TYPE1, + .tp_fsize = FSIZE_TYPE1, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING2] = { .caps = 0, .tp_type = TYPE1, + .tp_button = 0, .tp_offset = FINGER_TYPE1, + .tp_fsize = FSIZE_TYPE1, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING3] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING4] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING4A] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING5] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING6] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING5A] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING6A] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING7] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING7A] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE2, + .tp_button = BUTTON_TYPE2, .tp_offset = FINGER_TYPE2, + .tp_fsize = FSIZE_TYPE2, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, }, [WSP_FLAG_WELLSPRING8] = { .caps = HAS_INTEGRATED_BUTTON, .tp_type = TYPE3, + .tp_button = BUTTON_TYPE3, .tp_offset = FINGER_TYPE3, + .tp_fsize = FSIZE_TYPE3, + .tp_delta = 0, + .iface_index = 0, + .um_size = 8, + .um_req_val = 0x03, + .um_req_idx = 0x00, + .um_switch_idx = 0, + .um_switch_on = 0x01, + .um_switch_off = 0x08, + }, + [WSP_FLAG_WELLSPRING9] = { + .caps = HAS_INTEGRATED_BUTTON, + .tp_type = TYPE4, + .tp_button = BUTTON_TYPE4, + .tp_offset = FINGER_TYPE4, + .tp_fsize = FSIZE_TYPE4, + .tp_delta = 2, + .iface_index = 2, + .um_size = 2, + .um_req_val = 0x03, + .um_req_idx = 0x02, + .um_switch_idx = 1, + .um_switch_on = 0x01, + .um_switch_off = 0x00, }, }; @@ -346,7 +499,7 @@ static const STRUCT_USB_HOST_ID wsp_devs WSP_DEV(APPLE, WELLSPRING5A_JIS, WSP_FLAG_WELLSPRING5A), /* MacbookPro10,1 (unibody, June 2012) */ - /* MacbookPro11,? (unibody, June 2013) */ + /* MacbookPro11,1-3 (unibody, June 2013) */ WSP_DEV(APPLE, WELLSPRING7_ANSI, WSP_FLAG_WELLSPRING7), WSP_DEV(APPLE, WELLSPRING7_ISO, WSP_FLAG_WELLSPRING7), WSP_DEV(APPLE, WELLSPRING7_JIS, WSP_FLAG_WELLSPRING7), @@ -360,6 +513,11 @@ static const STRUCT_USB_HOST_ID wsp_devs WSP_DEV(APPLE, WELLSPRING8_ANSI, WSP_FLAG_WELLSPRING8), WSP_DEV(APPLE, WELLSPRING8_ISO, WSP_FLAG_WELLSPRING8), WSP_DEV(APPLE, WELLSPRING8_JIS, WSP_FLAG_WELLSPRING8), + + /* MacbookPro12,1 MacbookPro11,4 */ + WSP_DEV(APPLE, WELLSPRING9_ANSI, WSP_FLAG_WELLSPRING9), + WSP_DEV(APPLE, WELLSPRING9_ISO, WSP_FLAG_WELLSPRING9), + WSP_DEV(APPLE, WELLSPRING9_JIS, WSP_FLAG_WELLSPRING9), }; #define WSP_FIFO_BUF_SIZE 8 /* bytes */ @@ -421,11 +579,6 @@ struct wsp_softc { uint8_t tp_data[WSP_BUFFER_MAX] __aligned(4); /* trackpad transferred data */ }; -typedef enum interface_mode { - RAW_SENSOR_MODE = 0x01, - HID_MODE = 0x08 -} interface_mode; - /* * function prototypes */ @@ -473,14 +626,19 @@ static const struct usb_config wsp_confi }; static usb_error_t -wsp_set_device_mode(struct wsp_softc *sc, interface_mode mode) +wsp_set_device_mode(struct wsp_softc *sc, uint8_t on) { + const struct wsp_dev_params *params = sc->sc_params; uint8_t mode_bytes[8]; usb_error_t err; + /* Type 3 does not require a mode switch */ + if (params->tp_type == TYPE3) + return 0; + err = usbd_req_get_report(sc->sc_usb_device, NULL, - mode_bytes, sizeof(mode_bytes), 0, - 0x03, 0x00); + mode_bytes, params->um_size, params->iface_index, + params->um_req_val, params->um_req_idx); if (err != USB_ERR_NORMAL_COMPLETION) { DPRINTF("Failed to read device mode (%d)\n", err); @@ -495,11 +653,12 @@ wsp_set_device_mode(struct wsp_softc *sc */ pause("WHW", hz / 4); - mode_bytes[0] = mode; + mode_bytes[params->um_switch_idx] = + on ? params->um_switch_on : params->um_switch_off; return (usbd_req_set_report(sc->sc_usb_device, NULL, - mode_bytes, sizeof(mode_bytes), 0, - 0x03, 0x00)); + mode_bytes, params->um_size, params->iface_index, + params->um_req_val, params->um_req_idx)); } static int @@ -524,17 +683,29 @@ static int wsp_probe(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); + struct usb_interface_descriptor *id; + struct usb_interface *iface; + uint8_t i; if (uaa->usb_mode != USB_MODE_HOST) return (ENXIO); - if (uaa->info.bIfaceIndex != WSP_IFACE_INDEX) - return (ENXIO); - - if ((uaa->info.bInterfaceClass != UICLASS_HID) || - (uaa->info.bInterfaceProtocol != 0)) + /* figure out first interface matching */ + for (i = 1;; i++) { + iface = usbd_get_iface(uaa->device, i); + if (iface == NULL || i == 3) + return (ENXIO); + id = iface->idesc; + if ((id == NULL) || + (id->bInterfaceClass != UICLASS_HID) || + (id->bInterfaceProtocol != 0 && + id->bInterfaceProtocol != UIPROTO_MOUSE)) + continue; + break; + } + /* check if we are attaching to the first match */ + if (uaa->info.bIfaceIndex != i) return (ENXIO); - return (usbd_lookup_id_by_uaa(wsp_devs, sizeof(wsp_devs), uaa)); } @@ -569,6 +740,9 @@ wsp_attach(device_t dev) sc->sc_usb_device = uaa->device; + /* get device specific configuration */ + sc->sc_params = wsp_dev_params + USB_GET_DRIVER_INFO(uaa); + /* * By default the touchpad behaves like a HID device, sending * packets with reportID = 8. Such reports contain only @@ -584,13 +758,13 @@ wsp_attach(device_t dev) * device back into HID mode before switching it to RAW * mode. Else the device does not work like expected. */ - err = wsp_set_device_mode(sc, HID_MODE); + err = wsp_set_device_mode(sc, 0); if (err != USB_ERR_NORMAL_COMPLETION) { DPRINTF("Failed to set mode to HID MODE (%d)\n", err); return (ENXIO); } - err = wsp_set_device_mode(sc, RAW_SENSOR_MODE); + err = wsp_set_device_mode(sc, 1); if (err != USB_ERR_NORMAL_COMPLETION) { DPRINTF("failed to set mode to RAW MODE (%d)\n", err); return (ENXIO); @@ -598,9 +772,6 @@ wsp_attach(device_t dev) mtx_init(&sc->sc_mutex, "wspmtx", NULL, MTX_DEF | MTX_RECURSE); - /* get device specific configuration */ - sc->sc_params = wsp_dev_params + USB_GET_DRIVER_INFO(uaa); - err = usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, wsp_config, WSP_N_TRANSFER, sc, &sc->sc_mutex); @@ -642,7 +813,7 @@ wsp_detach(device_t dev) { struct wsp_softc *sc = device_get_softc(dev); - (void) wsp_set_device_mode(sc, HID_MODE); + (void) wsp_set_device_mode(sc, 0); mtx_lock(&sc->sc_mutex); if (sc->sc_state & WSP_ENABLED) @@ -692,6 +863,13 @@ wsp_intr_callback(struct usb_xfer *xfer, pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, sc->tp_data, len); + if ((len < params->tp_offset + params->tp_fsize) || + ((len - params->tp_offset) % params->tp_fsize) != 0) { + DPRINTFN(WSP_LLEVEL_INFO, "Invalid length: %d, %x, %x\n", + len, sc->tp_data[0], sc->tp_data[1]); + goto tr_setup; + } + if (len < sc->tp_datalen) { /* make sure we don't process old data */ memset(sc->tp_data + len, 0, sc->tp_datalen - len); @@ -699,12 +877,9 @@ wsp_intr_callback(struct usb_xfer *xfer, h = (struct tp_header *)(sc->tp_data); - if (params->tp_type == TYPE2) { - ibt = sc->tp_data[BUTTON_TYPE2]; - ntouch = sc->tp_data[BUTTON_TYPE2 - 1]; - } else if (params->tp_type == TYPE3) { - ibt = sc->tp_data[BUTTON_TYPE3]; - ntouch = sc->tp_data[BUTTON_TYPE3 - 1]; + if (params->tp_type >= TYPE2) { + ibt = sc->tp_data[params->tp_button]; + ntouch = sc->tp_data[params->tp_button - 1]; } /* range check */ if (ntouch < 0) @@ -712,33 +887,33 @@ wsp_intr_callback(struct usb_xfer *xfer, else if (ntouch > MAX_FINGERS) ntouch = MAX_FINGERS; - f = (struct tp_finger *)(sc->tp_data + params->tp_offset); - for (i = 0; i != ntouch; i++) { + f = (struct tp_finger *)(sc->tp_data + params->tp_offset + params->tp_delta + i * params->tp_fsize); /* swap endianness, if any */ if (le16toh(0x1234) != 0x1234) { - f[i].origin = le16toh((uint16_t)f[i].origin); - f[i].abs_x = le16toh((uint16_t)f[i].abs_x); - f[i].abs_y = le16toh((uint16_t)f[i].abs_y); - f[i].rel_x = le16toh((uint16_t)f[i].rel_x); - f[i].rel_y = le16toh((uint16_t)f[i].rel_y); - f[i].tool_major = le16toh((uint16_t)f[i].tool_major); - f[i].tool_minor = le16toh((uint16_t)f[i].tool_minor); - f[i].orientation = le16toh((uint16_t)f[i].orientation); - f[i].touch_major = le16toh((uint16_t)f[i].touch_major); - f[i].touch_minor = le16toh((uint16_t)f[i].touch_minor); - f[i].multi = le16toh((uint16_t)f[i].multi); + f->origin = le16toh((uint16_t)f->origin); + f->abs_x = le16toh((uint16_t)f->abs_x); + f->abs_y = le16toh((uint16_t)f->abs_y); + f->rel_x = le16toh((uint16_t)f->rel_x); + f->rel_y = le16toh((uint16_t)f->rel_y); + f->tool_major = le16toh((uint16_t)f->tool_major); + f->tool_minor = le16toh((uint16_t)f->tool_minor); + f->orientation = le16toh((uint16_t)f->orientation); + f->touch_major = le16toh((uint16_t)f->touch_major); + f->touch_minor = le16toh((uint16_t)f->touch_minor); + f->pressure = le16toh((uint16_t)f->pressure); + f->multi = le16toh((uint16_t)f->multi); } - DPRINTFN(WSP_LLEVEL_INFO, "[%d]ibt=%d, taps=%d, u=%x, o=%4d, ax=%5d, ay=%5d, " - "rx=%5d, ry=%5d, tlmaj=%4d, tlmin=%4d, ot=%5d, tchmaj=%4d, tchmin=%4d, m=%4x\n", - i, ibt, ntouch, h->q2, - f[i].origin, f[i].abs_x, f[i].abs_y, f[i].rel_x, f[i].rel_y, - f[i].tool_major, f[i].tool_minor, f[i].orientation, - f[i].touch_major, f[i].touch_minor, f[i].multi); - - sc->pos_x[i] = f[i].abs_x; - sc->pos_y[i] = -f[i].abs_y; - sc->index[i] = &f[i]; + DPRINTFN(WSP_LLEVEL_INFO, + "[%d]ibt=%d, taps=%d, o=%4d, ax=%5d, ay=%5d, " + "rx=%5d, ry=%5d, tlmaj=%4d, tlmin=%4d, ot=%4x, " + "tchmaj=%4d, tchmin=%4d, presure=%4d, m=%4x\n", + i, ibt, ntouch, f->origin, f->abs_x, f->abs_y, + f->rel_x, f->rel_y, f->tool_major, f->tool_minor, f->orientation, + f->touch_major, f->touch_minor, f->pressure, f->multi); + sc->pos_x[i] = f->abs_x; + sc->pos_y[i] = -f->abs_y; + sc->index[i] = f; } sc->sc_status.flags &= ~MOUSE_POSCHANGED; @@ -750,24 +925,24 @@ wsp_intr_callback(struct usb_xfer *xfer, sc->sc_status.button |= MOUSE_BUTTON1DOWN; sc->ibtn = 1; } - if (h->q2 == 4) - sc->intr_count++; + sc->intr_count++; if (sc->ntaps < ntouch) { switch (ntouch) { case 1: - if (f[0].touch_major > tun.pressure_tap_threshold) + if (sc->index[0]->touch_major > tun.pressure_tap_threshold && + sc->index[0]->tool_major <= 1200) sc->ntaps = 1; break; case 2: - if (f[0].touch_major > tun.pressure_tap_threshold && - f[1].touch_major > tun.pressure_tap_threshold) + if (sc->index[0]->touch_major > tun.pressure_tap_threshold-30 && + sc->index[1]->touch_major > tun.pressure_tap_threshold-30) sc->ntaps = 2; break; case 3: - if (f[0].touch_major > tun.pressure_tap_threshold && - f[1].touch_major > tun.pressure_tap_threshold && - f[2].touch_major > tun.pressure_tap_threshold) + if (sc->index[0]->touch_major > tun.pressure_tap_threshold-40 && + sc->index[1]->touch_major > tun.pressure_tap_threshold-40 && + sc->index[2]->touch_major > tun.pressure_tap_threshold-40) sc->ntaps = 3; break; default: @@ -779,7 +954,7 @@ wsp_intr_callback(struct usb_xfer *xfer, abs(sc->pos_x[0] - sc->pos_x[1]), abs(sc->pos_y[0] - sc->pos_y[1]))); } - if (f[0].touch_major < tun.pressure_untouch_threshold && + if (sc->index[0]->touch_major < tun.pressure_untouch_threshold && sc->sc_status.button == 0) { sc->sc_touch = WSP_UNTOUCH; if (sc->intr_count < WSP_TAP_MAX_COUNT && @@ -840,10 +1015,10 @@ wsp_intr_callback(struct usb_xfer *xfer, sc->rdy = 0; sc->rdz = 0; sc->scr_mode = WSP_SCR_NONE; - } else if (f[0].touch_major >= tun.pressure_touch_threshold && + } else if (sc->index[0]->touch_major >= tun.pressure_touch_threshold && sc->sc_touch == WSP_UNTOUCH) { /* ignore first touch */ sc->sc_touch = WSP_FIRST_TOUCH; - } else if (f[0].touch_major >= tun.pressure_touch_threshold && + } else if (sc->index[0]->touch_major >= tun.pressure_touch_threshold && sc->sc_touch == WSP_FIRST_TOUCH) { /* ignore second touch */ sc->sc_touch = WSP_SECOND_TOUCH; DPRINTFN(WSP_LLEVEL_INFO, "Fist pre_x=%5d, pre_y=%5d\n", @@ -853,22 +1028,26 @@ wsp_intr_callback(struct usb_xfer *xfer, sc->sc_touch = WSP_TOUCHING; if (ntouch != 0 && - h->q2 == 4 && - f[0].touch_major >= tun.pressure_touch_threshold) { + sc->index[0]->touch_major >= tun.pressure_touch_threshold) { dx = sc->pos_x[0] - sc->pre_pos_x; dy = sc->pos_y[0] - sc->pre_pos_y; - /* Ignore movement from ibt=1 to ibt=0 */ - if (sc->sc_status.obutton != 0 && - sc->sc_status.button == 0) { - dx = 0; - dy = 0; - } + /* Ignore movement during button is releasing */ + if (sc->ibtn != 0 && sc->sc_status.button == 0) + dx = dy = 0; + /* Ignore movement if ntouch changed */ - if (sc->o_ntouch != ntouch) { - dx = 0; - dy = 0; - } + if (sc->o_ntouch != ntouch) + dx = dy = 0; + + /* Ignore unexpeted movment when typing */ + if (ntouch == 1 && sc->index[0]->tool_major > 1200) + dx = dy = 0; + + if (sc->ibtn != 0 && ntouch == 1 && + sc->intr_count < WSP_TAP_MAX_COUNT && + abs(sc->dx_sum) < 1 && abs(sc->dy_sum) < 1 ) + dx = dy = 0; if (ntouch == 2 && sc->sc_status.button != 0) { dx = sc->pos_x[sc->finger] - sc->pre_pos_x; @@ -878,26 +1057,23 @@ wsp_intr_callback(struct usb_xfer *xfer, * Ignore movement of switch finger or * movement from ibt=0 to ibt=1 */ - if (f[0].origin == 0 || f[1].origin == 0 || + if (sc->index[0]->origin == 0 || sc->index[1]->origin == 0 || sc->sc_status.obutton != sc->sc_status.button) { - dx = 0; - dy = 0; + dx = dy = 0; sc->finger = 0; } - if ((abs(f[0].rel_x) + abs(f[0].rel_y)) < - (abs(f[1].rel_x) + abs(f[1].rel_y)) && + if ((abs(sc->index[0]->rel_x) + abs(sc->index[0]->rel_y)) < + (abs(sc->index[1]->rel_x) + abs(sc->index[1]->rel_y)) && sc->finger == 0) { sc->sc_touch = WSP_SECOND_TOUCH; - dx = 0; - dy = 0; + dx = dy = 0; sc->finger = 1; } - if ((abs(f[0].rel_x) + abs(f[0].rel_y)) >= - (abs(f[1].rel_x) + abs(f[1].rel_y)) && + if ((abs(sc->index[0]->rel_x) + abs(sc->index[0]->rel_y)) >= + (abs(sc->index[1]->rel_x) + abs(sc->index[1]->rel_y)) && sc->finger == 1) { sc->sc_touch = WSP_SECOND_TOUCH; - dx = 0; - dy = 0; + dx = dy = 0; sc->finger = 0; } DPRINTFN(WSP_LLEVEL_INFO, "dx=%5d, dy=%5d, mov=%5d\n", @@ -926,8 +1102,7 @@ wsp_intr_callback(struct usb_xfer *xfer, if (sc->scr_mode == WSP_SCR_NONE && abs(sc->dx_sum) + abs(sc->dy_sum) > tun.scr_hor_threshold) sc->scr_mode = abs(sc->dx_sum) > - abs(sc->dy_sum) * 3 ? WSP_SCR_HOR : - WSP_SCR_VER; + abs(sc->dy_sum) * 2 ? WSP_SCR_HOR : WSP_SCR_VER; DPRINTFN(WSP_LLEVEL_INFO, "scr_mode=%5d, count=%d, dx_sum=%d, dy_sum=%d\n", sc->scr_mode, sc->intr_count, sc->dx_sum, sc->dy_sum); if (sc->scr_mode == WSP_SCR_HOR) @@ -935,8 +1110,7 @@ wsp_intr_callback(struct usb_xfer *xfer, else sc->dt_sum = 0; - dx = 0; - dy = 0; + dx = dy = 0; if (sc->dz_count == 0) dz = sc->dz_sum / tun.z_factor; if (sc->scr_mode == WSP_SCR_HOR || @@ -944,15 +1118,12 @@ wsp_intr_callback(struct usb_xfer *xfer, abs(sc->pos_y[0] - sc->pos_y[1]) > MAX_DISTANCE) dz = 0; } - if (ntouch == 3) { - dx = 0; - dy = 0; - dz = 0; - } + if (ntouch == 3) + dx = dy = dz = 0; if (sc->intr_count < WSP_TAP_MAX_COUNT && - abs(dx) < 3 && abs(dy) < 3 && abs(dz) < 3) { + abs(dx) < 3 && abs(dy) < 3 && abs(dz) < 3) dx = dy = dz = 0; - } else + else sc->intr_count = WSP_TAP_MAX_COUNT; if (dx || dy || dz) sc->sc_status.flags |= MOUSE_POSCHANGED; Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Thu Nov 19 09:57:41 2015 (r291064) +++ stable/10/sys/dev/usb/usbdevs Thu Nov 19 10:00:17 2015 (r291065) @@ -1128,6 +1128,10 @@ product APPLE WELLSPRING7A_JIS 0x025b Ap product APPLE WELLSPRING8_ANSI 0x0290 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING8_ISO 0x0291 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING8_JIS 0x0292 Apple Internal Keyboard/Trackpad +/* MacbookPro12,1 */ +product APPLE WELLSPRING9_ANSI 0x0272 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING9_ISO 0x0273 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING9_JIS 0x0274 Apple Internal Keyboard/Trackpad product APPLE MOUSE 0x0301 Mouse M4848 product APPLE OPTMOUSE 0x0302 Optical mouse product APPLE MIGHTYMOUSE 0x0304 Mighty Mouse From owner-svn-src-stable-10@freebsd.org Thu Nov 19 16:36:22 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0A1DA33E00; Thu, 19 Nov 2015 16:36:22 +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 52E4A1332; Thu, 19 Nov 2015 16:36:22 +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 tAJGaK2t008701; Thu, 19 Nov 2015 16:36:20 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJGaKN6008700; Thu, 19 Nov 2015 16:36:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201511191636.tAJGaKN6008700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 19 Nov 2015 16:36:20 +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: r291077 - 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-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 16:36:22 -0000 Author: asomers Date: Thu Nov 19 16:36:20 2015 New Revision: 291077 URL: https://svnweb.freebsd.org/changeset/base/291077 Log: MFC r290400 Update authors' contact info and fix grammar bugs. Modified: stable/10/share/man/man4/xnb.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/xnb.4 ============================================================================== --- stable/10/share/man/man4/xnb.4 Thu Nov 19 16:28:42 2015 (r291076) +++ stable/10/share/man/man4/xnb.4 Thu Nov 19 16:36:20 2015 (r291077) @@ -57,12 +57,12 @@ will run on Domain 0 and the netfront dr However, it is also possible to run .Nm on a guest domain. -It may be bridged or routed to provide the netfront's +It may be bridged or routed to provide the netfront domain access to other guest domains or to a physical network. .Pp In most respects, the .Nm -device appears to the OS as an other Ethernet device. +device appears to the OS as any other Ethernet device. It can be configured at runtime entirely with .Xr ifconfig 8 . In particular, it supports MAC changing, arbitrary MTU sizes, checksum @@ -100,11 +100,8 @@ device driver first appeared in The .Nm driver was written by -.An Alan Somers -.Aq alans@spectralogic.com -and -.An John Suykerbuyk -.Aq johns@spectralogic.com . +.An Alan Somers Aq Mt asomers@FreeBSD.org +and John Suykerbuyk. .Sh CAVEATS Packets sent through Xennet pass over shared memory, so the protocol includes no form of link-layer checksum or CRC. From owner-svn-src-stable-10@freebsd.org Thu Nov 19 19:40:31 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E609A335AB; Thu, 19 Nov 2015 19:40:31 +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 350F7185B; Thu, 19 Nov 2015 19:40:31 +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 tAJJeU9e061348; Thu, 19 Nov 2015 19:40:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJJeUHY061347; Thu, 19 Nov 2015 19:40:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511191940.tAJJeUHY061347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 19 Nov 2015 19:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291083 - in stable: 10/sys/dev/cxgbe 9/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 19:40:31 -0000 Author: jhb Date: Thu Nov 19 19:40:30 2015 New Revision: 291083 URL: https://svnweb.freebsd.org/changeset/base/291083 Log: MFC 290416: Chelsio T5 chips do not properly echo the No Snoop and Relaxed Ordering attributes when replying to a TLP from a Root Port. As a workaround, disable No Snoop and Relaxed Ordering in the Root Port of each T5 adapter during attach so that CPU-initiated requests do not contain these flags. Note that this affects CPU-initiated requests to all devices under this root port. Sponsored by: Chelsio Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu Nov 19 18:33:20 2015 (r291082) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu Nov 19 19:40:30 2015 (r291083) @@ -570,6 +570,33 @@ t5_probe(device_t dev) return (ENXIO); } +static void +t5_attribute_workaround(device_t dev) +{ + device_t root_port; + uint32_t v; + + /* + * The T5 chips do not properly echo the No Snoop and Relaxed + * Ordering attributes when replying to a TLP from a Root + * Port. As a workaround, find the parent Root Port and + * disable No Snoop and Relaxed Ordering. Note that this + * affects all devices under this root port. + */ + root_port = pci_find_pcie_root_port(dev); + if (root_port == NULL) { + device_printf(dev, "Unable to find parent root port\n"); + return; + } + + v = pcie_adjust_config(root_port, PCIER_DEVICE_CTL, + PCIEM_CTL_RELAXED_ORD_ENABLE | PCIEM_CTL_NOSNOOP_ENABLE, 0, 2); + if ((v & (PCIEM_CTL_RELAXED_ORD_ENABLE | PCIEM_CTL_NOSNOOP_ENABLE)) != + 0) + device_printf(dev, "Disabled No Snoop/Relaxed Ordering on %s\n", + device_get_nameunit(root_port)); +} + static int t4_attach(device_t dev) { @@ -588,6 +615,8 @@ t4_attach(device_t dev) sc->dev = dev; TUNABLE_INT_FETCH("hw.cxgbe.debug_flags", &sc->debug_flags); + if ((pci_get_device(dev) & 0xff00) == 0x5400) + t5_attribute_workaround(dev); pci_enable_busmaster(dev); if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) { uint32_t v; From owner-svn-src-stable-10@freebsd.org Fri Nov 20 15:13:51 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27352A3478B; Fri, 20 Nov 2015 15:13:51 +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 C3C8917DF; Fri, 20 Nov 2015 15:13:50 +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 tAKFDnqW019350; Fri, 20 Nov 2015 15:13:49 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAKFDn92019349; Fri, 20 Nov 2015 15:13:49 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201511201513.tAKFDn92019349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Fri, 20 Nov 2015 15:13:49 +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: r291100 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 15:13:51 -0000 Author: jpaetzel Date: Fri Nov 20 15:13:49 2015 New Revision: 291100 URL: https://svnweb.freebsd.org/changeset/base/291100 Log: MFC 290662 Fix a bug in the CPU % limiting code If you attempt to set a pcpu limit that is higher than 110% using rctl (for instance, you want a jail to be able to use 2 cores on your system so you set pcpu to 200%) the thing you are trying to limit becomes unthrottled. PR: 189870 Submitted by: dustinwenz@ebureau.com Reviewed by: trasz Modified: stable/10/sys/kern/kern_racct.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_racct.c ============================================================================== --- stable/10/sys/kern/kern_racct.c Fri Nov 20 14:20:24 2015 (r291099) +++ stable/10/sys/kern/kern_racct.c Fri Nov 20 15:13:49 2015 (r291100) @@ -519,16 +519,16 @@ racct_adjust_resource(struct racct *racc /* * There are some cases where the racct %cpu resource would grow - * beyond 100%. - * For example in racct_proc_exit() we add the process %cpu usage - * to the ucred racct containers. If too many processes terminated - * in a short time span, the ucred %cpu resource could grow too much. - * Also, the 4BSD scheduler sometimes returns for a thread more than - * 100% cpu usage. So we set a boundary here to 100%. + * beyond 100% per core. For example in racct_proc_exit() we add + * the process %cpu usage to the ucred racct containers. If too + * many processes terminated in a short time span, the ucred %cpu + * resource could grow too much. Also, the 4BSD scheduler sometimes + * returns for a thread more than 100% cpu usage. So we set a sane + * boundary here to 100% * the maxumum number of CPUs. */ if ((resource == RACCT_PCTCPU) && - (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000)) - racct->r_resources[RACCT_PCTCPU] = 100 * 1000000; + (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000 * (int64_t)MAXCPU)) + racct->r_resources[RACCT_PCTCPU] = 100 * 1000000 * (int64_t)MAXCPU; } static int From owner-svn-src-stable-10@freebsd.org Fri Nov 20 16:10:59 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 949B4A31548; Fri, 20 Nov 2015 16:10:59 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A8E31BDF; Fri, 20 Nov 2015 16:10:59 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAKGAwIg035213; Fri, 20 Nov 2015 16:10:58 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAKGAw9b035212; Fri, 20 Nov 2015 16:10:58 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511201610.tAKGAw9b035212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Fri, 20 Nov 2015 16:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291101 - stable/10/usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 16:10:59 -0000 Author: ume Date: Fri Nov 20 16:10:58 2015 New Revision: 291101 URL: https://svnweb.freebsd.org/changeset/base/291101 Log: MFC r290367, r290370, r290437: Change to not truncate an interface name when -W option is specified. MFC Requested by: Jim Thompson Modified: stable/10/usr.bin/netstat/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/if.c ============================================================================== --- stable/10/usr.bin/netstat/if.c Fri Nov 20 15:13:49 2015 (r291100) +++ stable/10/usr.bin/netstat/if.c Fri Nov 20 16:10:58 2015 (r291101) @@ -37,7 +37,7 @@ static char sccsid[] = "@(#)if.c 8.3 (Be #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include @@ -231,7 +231,8 @@ intpr(int interval, void (*pfunc)(char * { struct ifaddrs *ifap, *ifa; struct ifmaddrs *ifmap, *ifma; - + u_int ifn_len_max = 5; + if (interval) return sidewaysintpr(interval); @@ -240,11 +241,19 @@ intpr(int interval, void (*pfunc)(char * if (aflag && getifmaddrs(&ifmap) != 0) err(EX_OSERR, "getifmaddrs"); + if (Wflag) { + for (ifa = ifap; ifa; ifa = ifa->ifa_next) { + if (interface != NULL && + strcmp(ifa->ifa_name, interface) != 0) + continue; + if (af != AF_UNSPEC && ifa->ifa_addr->sa_family != af) + continue; + ifn_len_max = MAX(ifn_len_max, strlen(ifa->ifa_name)); + } + } + if (!pfunc) { - if (Wflag) - printf("%-7.7s", "Name"); - else - printf("%-5.5s", "Name"); + printf("%-*.*s", ifn_len_max, ifn_len_max, "Name"); printf(" %5.5s %-13.13s %-17.17s %8.8s %5.5s %5.5s", "Mtu", "Network", "Address", "Ipkts", "Ierrs", "Idrop"); if (bflag) @@ -283,10 +292,7 @@ intpr(int interval, void (*pfunc)(char * if (af != AF_UNSPEC && ifa->ifa_addr->sa_family != af) continue; - if (Wflag) - printf("%-7.7s", ifa->ifa_name); - else - printf("%-5.5s", ifa->ifa_name); + printf("%-*.*s", ifn_len_max, ifn_len_max, ifa->ifa_name); #define IFA_MTU(ifa) (((struct if_data *)(ifa)->ifa_data)->ifi_mtu) show_stat("lu", 6, IFA_MTU(ifa), IFA_MTU(ifa), 0); From owner-svn-src-stable-10@freebsd.org Sat Nov 21 16:21:28 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5391A33247; Sat, 21 Nov 2015 16:21: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 6ED2E1FF2; Sat, 21 Nov 2015 16:21: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 tALGLRJf089845; Sat, 21 Nov 2015 16:21:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tALGLR71089843; Sat, 21 Nov 2015 16:21:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511211621.tALGLR71089843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 21 Nov 2015 16:21:27 +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: r291134 - stable/10/sys/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-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2015 16:21:28 -0000 Author: kib Date: Sat Nov 21 16:21:27 2015 New Revision: 291134 URL: https://svnweb.freebsd.org/changeset/base/291134 Log: MFC r290492: Move intmax_t and uintmax_t type declarations to sys/_stdint.h. Modified: stable/10/sys/sys/_stdint.h stable/10/sys/sys/stdint.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/_stdint.h ============================================================================== --- stable/10/sys/sys/_stdint.h Sat Nov 21 15:30:08 2015 (r291133) +++ stable/10/sys/sys/_stdint.h Sat Nov 21 16:21:27 2015 (r291134) @@ -78,5 +78,13 @@ typedef __intptr_t intptr_t; typedef __uintptr_t uintptr_t; #define _UINTPTR_T_DECLARED #endif +#ifndef _INTMAX_T_DECLARED +typedef __intmax_t intmax_t; +#define _INTMAX_T_DECLARED +#endif +#ifndef _UINTMAX_T_DECLARED +typedef __uintmax_t uintmax_t; +#define _UINTMAX_T_DECLARED +#endif #endif /* !_SYS__STDINT_H_ */ Modified: stable/10/sys/sys/stdint.h ============================================================================== --- stable/10/sys/sys/stdint.h Sat Nov 21 15:30:08 2015 (r291133) +++ stable/10/sys/sys/stdint.h Sat Nov 21 16:21:27 2015 (r291134) @@ -55,15 +55,6 @@ typedef __uint_fast16_t uint_fast16_t; typedef __uint_fast32_t uint_fast32_t; typedef __uint_fast64_t uint_fast64_t; -#ifndef _INTMAX_T_DECLARED -typedef __intmax_t intmax_t; -#define _INTMAX_T_DECLARED -#endif -#ifndef _UINTMAX_T_DECLARED -typedef __uintmax_t uintmax_t; -#define _UINTMAX_T_DECLARED -#endif - /* GNU and Darwin define this and people seem to think it's portable */ #if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) #define __WORDSIZE 64