From owner-svn-src-head@freebsd.org Sun Jan 1 00:23:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DBD5A7A3DB; Sun, 1 Jan 2017 00:23:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D44141321; Sun, 1 Jan 2017 00:23: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 v010NirM078142; Sun, 1 Jan 2017 00:23:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v010NiPr078140; Sun, 1 Jan 2017 00:23:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010023.v010NiPr078140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 00:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310989 - head/usr.sbin/bsnmpd/tools/bsnmptools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 00:23:44 -0000 Author: ngie Date: Sun Jan 1 00:23:43 2017 New Revision: 310989 URL: https://svnweb.freebsd.org/changeset/base/310989 Log: Call snmp_pdu_free on req/resp with a consistent, correct pattern - snmp_pdu_free should be called before snmp_pdu_create is called again - snmp_pdu_free should be called on the resp to snmp_dialog when successful Tested with the following bsnmp commands: % export SNMPUSER=bsnmp SNMPPASSWD=bsnmptest % SNMP_ARGS="-A proto=sha -C context='' -K -P proto=des -v 3 -r 0" % bsnmpset $SNMP_ARGS sysLocation="MyAgent" % bsnmpget $SNMP_ARGS sysLocation % bsnmpwalk $SNMP_ARGS MFC after: 12 days X-MFC with: r310729, r310892, r310894 Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Sat Dec 31 23:20:57 2016 (r310988) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Sun Jan 1 00:23:43 2017 (r310989) @@ -400,13 +400,16 @@ snmptool_get(struct snmp_toolinfo *snmpt if (snmp_parse_resp(&resp, &req) >= 0) { snmp_output_resp(snmptoolctx, &resp, NULL); + snmp_pdu_free(&resp); break; } snmp_output_err_resp(snmptoolctx, &resp); if (GET_PDUTYPE(snmptoolctx) == SNMP_PDU_GETBULK || - !ISSET_RETRY(snmptoolctx)) + !ISSET_RETRY(snmptoolctx)) { + snmp_pdu_free(&resp); break; + } /* * Loop through the object list and set object->error to the @@ -414,8 +417,10 @@ snmptool_get(struct snmp_toolinfo *snmpt */ if (snmp_object_seterror(snmptoolctx, &(resp.bindings[resp.error_index - 1]), - resp.error_status) <= 0) + resp.error_status) <= 0) { + snmp_pdu_free(&resp); break; + } fprintf(stderr, "Retrying...\n"); snmp_pdu_free(&resp); @@ -423,7 +428,6 @@ snmptool_get(struct snmp_toolinfo *snmpt } snmp_pdu_free(&req); - snmp_pdu_free(&resp); return (0); } @@ -500,8 +504,10 @@ snmptool_walk(struct snmp_toolinfo *snmp outputs += rc; - if ((u_int)rc < resp.nbindings) + if ((u_int)rc < resp.nbindings) { + snmp_pdu_free(&resp); break; + } snmpwalk_nextpdu_create(op, &(resp.bindings[resp.nbindings - 1].var), &req); @@ -515,10 +521,11 @@ snmptool_walk(struct snmp_toolinfo *snmp if (outputs == 0) { snmpwalk_nextpdu_create(SNMP_PDU_GET, &root, &req); if (snmp_dialog(&req, &resp) == SNMP_CODE_OK) { - if (snmp_parse_resp(&resp,&req) < 0) + if (snmp_parse_resp(&resp, &req) < 0) snmp_output_err_resp(snmptoolctx, &resp); else - snmp_output_resp(snmptoolctx, &(resp), NULL); + snmp_output_resp(snmptoolctx, &resp, + NULL); snmp_pdu_free(&resp); } else warn("Snmp dialog"); @@ -534,7 +541,6 @@ snmptool_walk(struct snmp_toolinfo *snmp } snmp_pdu_free(&req); - snmp_pdu_free(&resp); if (rc == 0) return (0); @@ -1094,25 +1100,29 @@ snmptool_set(struct snmp_toolinfo *snmpt if (snmp_pdu_check(&req, &resp) > 0) { if (GET_OUTPUT(snmptoolctx) != OUTPUT_QUIET) snmp_output_resp(snmptoolctx, &resp, NULL); + snmp_pdu_free(&resp); break; } snmp_output_err_resp(snmptoolctx, &resp); - if (!ISSET_RETRY(snmptoolctx)) + if (!ISSET_RETRY(snmptoolctx)) { + snmp_pdu_free(&resp); break; + } if (snmp_object_seterror(snmptoolctx, &(resp.bindings[resp.error_index - 1]), - resp.error_status) <= 0) + resp.error_status) <= 0) { + snmp_pdu_free(&resp); break; + } fprintf(stderr, "Retrying...\n"); snmp_pdu_free(&req); - snmp_pdu_free(&resp); snmp_pdu_create(&req, SNMP_PDU_SET); } - snmp_pdu_free(&resp); + snmp_pdu_free(&req); return (0); } From owner-svn-src-head@freebsd.org Sun Jan 1 04:01:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCE23C95BD7; Sun, 1 Jan 2017 04:01:28 +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 76B4D15E7; Sun, 1 Jan 2017 04:01:28 +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 v0141RQa072609; Sun, 1 Jan 2017 04:01:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0141RpZ072608; Sun, 1 Jan 2017 04:01:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010401.v0141RpZ072608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 04:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310994 - head/tests/sys/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 04:01:28 -0000 Author: ngie Date: Sun Jan 1 04:01:27 2017 New Revision: 310994 URL: https://svnweb.freebsd.org/changeset/base/310994 Log: Make sys/vfs/lookup_cap_dotdot actually work with "kyua test" The tests don't work when reading/writing to file descriptors in the sandbox after entering capability mode (and wouldn't have, regardless of the framework), so adjust the tests so they function within the framework. For tests that enter capability mode over the course of the test, the following is now done: 1. Fork child process for capability mode test. 2. In child... i. Enter capability mode. ii. Test invariants. iii. Exit after calling test function. 3. Collect status for child and determine whether or not it completed successfully. In order to test the invariants in the child process, they now use assert(3) instead of ATF_REQUIRE*, as the atf-c-api functions right to results files in the directories in order to determine where and how tests fail. While in the area, fix several -Wshadow and -Wunused warnings found when I bumped WARNS up to 6, and fix some minor style(9) issues with indentation and type alignment. PR: 215690 Modified: head/tests/sys/vfs/lookup_cap_dotdot.c Modified: head/tests/sys/vfs/lookup_cap_dotdot.c ============================================================================== --- head/tests/sys/vfs/lookup_cap_dotdot.c Sun Jan 1 00:43:20 2017 (r310993) +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sun Jan 1 04:01:27 2017 (r310994) @@ -31,23 +31,27 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include #include "freebsd_test_suite/macros.h" -static int dirfd = -1; -static char *abspath; +static char *abspath; +static int dirfd = -1; + +typedef void (*child_test_fn_t)(void); static void -touchat(int dirfd, const char *name) +touchat(int _dirfd, const char *name) { int fd; - ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, + ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, 0777)) >= 0); ATF_REQUIRE(close(fd) == 0); } @@ -78,10 +82,43 @@ prepare_dotdot_tests(void) static void check_capsicum(void) { + ATF_REQUIRE_FEATURE("security_capabilities"); ATF_REQUIRE_FEATURE("security_capability_mode"); } +static void +run_capsicum_test(child_test_fn_t test_func) +{ + int child_exit_code, child_status; + pid_t child_pid; + + check_capsicum(); + prepare_dotdot_tests(); + + ATF_REQUIRE_MSG((child_pid = fork()) != -1, + "fork failed: %s", strerror(errno)); + + if (child_pid == 0) { + test_func(); + _exit(0); + } + + ATF_REQUIRE_MSG(waitpid(child_pid, &child_status, 0) != -1, + "waitpid failed: %s", strerror(errno)); + if (WIFEXITED(child_status)) { + child_exit_code = WEXITSTATUS(child_status); + ATF_REQUIRE_MSG(child_exit_code == 0, + "child exited with non-zero exit code: %d", + child_exit_code); + } else if (WIFSIGNALED(child_status)) + atf_tc_fail("child exited with signal: %d", + WTERMSIG(child_status)); + else + atf_tc_fail("child exited with unexpected status: %d", + child_status); +} + /* * Positive tests */ @@ -93,6 +130,7 @@ ATF_TC_HEAD(openat__basic_positive, tc) ATF_TC_BODY(openat__basic_positive, tc) { + prepare_dotdot_tests(); ATF_REQUIRE(openat(dirfd, "d1/d2/d3/f3", O_RDONLY) >= 0); @@ -114,21 +152,22 @@ ATF_TC_HEAD(lookup_cap_dotdot__basic, tc "Validate cap-mode (testdir)/d1/.. lookup"); } -ATF_TC_BODY(lookup_cap_dotdot__basic, tc) +static void +lookup_cap_dotdot__basic_child(void) { cap_rights_t rights; - int fd; - - check_capsicum(); - prepare_dotdot_tests(); cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); - ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); - ATF_REQUIRE(cap_enter() >= 0); + assert(cap_rights_limit(dirfd, &rights) >= 0); + assert(cap_enter() >= 0); + assert(openat(dirfd, "d1/..", O_RDONLY) >= 0); +} + +ATF_TC_BODY(lookup_cap_dotdot__basic, tc) +{ - ATF_REQUIRE_MSG(openat(dirfd, "d1/..", O_RDONLY) >= 0, "%s", - strerror(errno)); + run_capsicum_test(lookup_cap_dotdot__basic_child); } ATF_TC(lookup_cap_dotdot__advanced); @@ -138,23 +177,26 @@ ATF_TC_HEAD(lookup_cap_dotdot__advanced, "Validate cap-mode (testdir)/d1/.. lookup"); } -ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) +static void +lookup_cap_dotdot__advanced_child(void) { cap_rights_t rights; - int fd; - - check_capsicum(); - prepare_dotdot_tests(); cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); - ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); + assert(cap_rights_limit(dirfd, &rights) >= 0); - ATF_REQUIRE(cap_enter() >= 0); + assert(cap_enter() >= 0); - ATF_REQUIRE(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0); - ATF_REQUIRE(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0); - ATF_REQUIRE(openat(dirfd, "l3/ld1", O_RDONLY) >= 0); - ATF_REQUIRE(openat(dirfd, "l3/lf1", O_RDONLY) >= 0); + assert(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0); + assert(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0); + assert(openat(dirfd, "l3/ld1", O_RDONLY) >= 0); + assert(openat(dirfd, "l3/lf1", O_RDONLY) >= 0); +} + +ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) +{ + + run_capsicum_test(lookup_cap_dotdot__advanced_child); } /* @@ -168,6 +210,7 @@ ATF_TC_HEAD(openat__basic_negative, tc) ATF_TC_BODY(openat__basic_negative, tc) { + prepare_dotdot_tests(); ATF_REQUIRE_ERRNO(ENOENT, @@ -182,32 +225,43 @@ ATF_TC_HEAD(capmode__negative, tc) atf_tc_set_md_var(tc, "descr", "Negative Capability mode testcases"); } -ATF_TC_BODY(capmode__negative, tc) +static void +capmode__negative_child(void) { int subdirfd; - check_capsicum(); - prepare_dotdot_tests(); - - ATF_REQUIRE(cap_enter() == 0); + assert(cap_enter() == 0); /* open() not permitted in capability mode */ - ATF_REQUIRE_ERRNO(ECAPMODE, open("testdir", O_RDONLY) < 0); + assert(open("testdir", O_RDONLY) < 0); + assert(errno == ECAPMODE); /* AT_FDCWD not permitted in capability mode */ - ATF_REQUIRE_ERRNO(ECAPMODE, openat(AT_FDCWD, "d1/f1", O_RDONLY) < 0); + assert(openat(AT_FDCWD, "d1/f1", O_RDONLY) < 0); + assert(errno == ECAPMODE); /* Relative path above dirfd not capable */ - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0); - ATF_REQUIRE((subdirfd = openat(dirfd, "l3", O_RDONLY)) >= 0); - ATF_REQUIRE_ERRNO(ENOTCAPABLE, - openat(subdirfd, "../../f1", O_RDONLY) < 0); + assert(openat(dirfd, "..", O_RDONLY) < 0); + assert(errno == ENOTCAPABLE); + + assert((subdirfd = openat(dirfd, "l3", O_RDONLY)) >= 0); + assert(openat(subdirfd, "../../f1", O_RDONLY) < 0); + assert(errno == ENOTCAPABLE); + (void)close(subdirfd); /* Absolute paths not capable */ - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, abspath, O_RDONLY) < 0); + assert(openat(dirfd, abspath, O_RDONLY) < 0); + assert(errno == ENOTCAPABLE); /* Symlink above dirfd */ - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "lup/f1", O_RDONLY) < 0); + assert(openat(dirfd, "lup/f1", O_RDONLY) < 0); + assert(errno == ENOTCAPABLE); +} + +ATF_TC_BODY(capmode__negative, tc) +{ + + run_capsicum_test(capmode__negative_child); } ATF_TC(lookup_cap_dotdot__negative); @@ -217,22 +271,30 @@ ATF_TC_HEAD(lookup_cap_dotdot__negative, "Validate cap-mode (testdir)/.. lookup fails"); } -ATF_TC_BODY(lookup_cap_dotdot__negative, tc) +static void +lookup_cap_dotdot__negative_child(void) { cap_rights_t rights; - int fd; - - check_capsicum(); - prepare_dotdot_tests(); cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); - ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); + assert(cap_rights_limit(dirfd, &rights) >= 0); - ATF_REQUIRE(cap_enter() >= 0); + assert(cap_enter() >= 0); + + assert(openat(dirfd, "..", O_RDONLY) < 0); + assert(errno == ENOTCAPABLE); + + assert(openat(dirfd, "d1/../..", O_RDONLY) < 0); + assert(errno == ENOTCAPABLE); + + assert(openat(dirfd, "../testdir/d1/f1", O_RDONLY) < 0); + assert(errno == ENOTCAPABLE); +} + +ATF_TC_BODY(lookup_cap_dotdot__negative, tc) +{ - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0); - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "d1/../..", O_RDONLY) < 0); - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "../testdir/d1/f1", O_RDONLY) < 0); + run_capsicum_test(lookup_cap_dotdot__negative_child); } ATF_TP_ADD_TCS(tp) From owner-svn-src-head@freebsd.org Sun Jan 1 04:02:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18C19C95D59; Sun, 1 Jan 2017 04:02:08 +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 DC62417D6; Sun, 1 Jan 2017 04:02:07 +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 v01427qJ073360; Sun, 1 Jan 2017 04:02:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v01427gT073359; Sun, 1 Jan 2017 04:02:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010402.v01427gT073359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 04:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310995 - head/tests/sys/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 04:02:08 -0000 Author: ngie Date: Sun Jan 1 04:02:06 2017 New Revision: 310995 URL: https://svnweb.freebsd.org/changeset/base/310995 Log: Bump WARNS to 6 to catch simple QA issues like some of the ones I squashed in r310994 Modified: head/tests/sys/vfs/Makefile Modified: head/tests/sys/vfs/Makefile ============================================================================== --- head/tests/sys/vfs/Makefile Sun Jan 1 04:01:27 2017 (r310994) +++ head/tests/sys/vfs/Makefile Sun Jan 1 04:02:06 2017 (r310995) @@ -9,4 +9,6 @@ CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP} PLAIN_TESTS_SH+= trailing_slash +WARNS?= 6 + .include From owner-svn-src-head@freebsd.org Sun Jan 1 04:13:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FD8AC9A106; Sun, 1 Jan 2017 04:13:26 +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 D3ABF1CF1; Sun, 1 Jan 2017 04:13:25 +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 v014DPov080575; Sun, 1 Jan 2017 04:13:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v014DPHd080574; Sun, 1 Jan 2017 04:13:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010413.v014DPHd080574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 04:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310996 - head/lib/libarchive/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 04:13:26 -0000 Author: ngie Date: Sun Jan 1 04:13:24 2017 New Revision: 310996 URL: https://svnweb.freebsd.org/changeset/base/310996 Log: Look for list.h in ${.CURDIR} to unbreak the build with a ports-based copy of llvm38 on ^/stable/11 (oh, the bugs you find when you set CC,CXX,CPP manually and it skips the bootstrap stage for the toolchain...) Modified: head/lib/libarchive/tests/Makefile Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Sun Jan 1 04:02:06 2017 (r310995) +++ head/lib/libarchive/tests/Makefile Sun Jan 1 04:13:24 2017 (r310996) @@ -12,7 +12,7 @@ BINDIR= ${TESTSDIR} PROGS+= libarchive_test -CFLAGS+= -I${.CURDIR:H} -I${.OBJDIR} +CFLAGS+= -I${.CURDIR} -I${.CURDIR:H} -I${.OBJDIR} CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive -I${_LIBARCHIVEDIR}/test_utils CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 From owner-svn-src-head@freebsd.org Sun Jan 1 05:13:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1847C9BB5C; Sun, 1 Jan 2017 05:13: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 7E4EB3993; Sun, 1 Jan 2017 05:13: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 v015DsXk005382; Sun, 1 Jan 2017 05:13:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v015DsXH005381; Sun, 1 Jan 2017 05:13:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010513.v015DsXH005381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 05:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310999 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 05:13:55 -0000 Author: ngie Date: Sun Jan 1 05:13:54 2017 New Revision: 310999 URL: https://svnweb.freebsd.org/changeset/base/310999 Log: bsnmpclient(3) also documents snmp_client_init, snmp_client_set_host, and snmp_client_set_port. Add them to the NAME section MFC after: 3 days Modified: head/contrib/bsnmp/lib/bsnmpclient.3 Modified: head/contrib/bsnmp/lib/bsnmpclient.3 ============================================================================== --- head/contrib/bsnmp/lib/bsnmpclient.3 Sun Jan 1 04:48:38 2017 (r310998) +++ head/contrib/bsnmp/lib/bsnmpclient.3 Sun Jan 1 05:13:54 2017 (r310999) @@ -36,6 +36,9 @@ .Os .Sh NAME .Nm snmp_client , +.Nm snmp_client_init , +.Nm snmp_client_set_host , +.Nm snmp_client_set_port , .Nm snmp_send_cb_f , .Nm snmp_timeout_cb_f , .Nm snmp_timeout_start_f , From owner-svn-src-head@freebsd.org Sun Jan 1 05:14:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB592C9C67A; Sun, 1 Jan 2017 05:14: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 8EC4420F3; Sun, 1 Jan 2017 05:14: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 v015Ew0i005465; Sun, 1 Jan 2017 05:14:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v015EwpR005464; Sun, 1 Jan 2017 05:14:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010514.v015EwpR005464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 05:14:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311000 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 05:15:00 -0000 Author: ngie Date: Sun Jan 1 05:14:58 2017 New Revision: 311000 URL: https://svnweb.freebsd.org/changeset/base/311000 Log: Fix spelling errors MFC after: 3 days Reported by: igor Modified: head/contrib/bsnmp/lib/bsnmpclient.3 Modified: head/contrib/bsnmp/lib/bsnmpclient.3 ============================================================================== --- head/contrib/bsnmp/lib/bsnmpclient.3 Sun Jan 1 05:13:54 2017 (r310999) +++ head/contrib/bsnmp/lib/bsnmpclient.3 Sun Jan 1 05:14:58 2017 (r311000) @@ -211,13 +211,13 @@ The community name to be used for SET re The default is .Sq private . .It Va identifier -The message indentifier value to be used with SNMPv3 PDUs. Incremented with +The message identifier value to be used with SNMPv3 PDUs. Incremented with each transmitted PDU. .It Va security_model The security model to be used with SNMPv3 PDUs. Currently only User-Based Security model specified by RFC 3414 (value 3) is supported. .It Va engine -The authorative SNMP engine parameters to be used with SNMPv3 PDUs. +The authoritive SNMP engine parameters to be used with SNMPv3 PDUs. .It Va user The USM SNMP user credentials to be used with SNMPv3 PDUs. .It Va clen @@ -416,7 +416,7 @@ response is received. When a response is received or the retransmission count is exceeded the callback .Fa func -is called with the orignal request PDU, the response PDU and the user argument +is called with the original request PDU, the response PDU and the user argument .Fa uarg . If the retransmit count is exceeded, .Fa func @@ -651,7 +651,7 @@ If a response was received 0 is returned .Pp The function .Fn snmp_discover_engine -is used to discover the authorative snmpEngineId of a remote SNMPv3 agent. +is used to discover the authoritative snmpEngineId of a remote SNMPv3 agent. A request PDU with empty USM user name is sent and the client's engine parameters are set according to the snmpEngine parameters received in the response PDU. @@ -659,10 +659,10 @@ If the client is configured to use authe snmpEngineBoots and/or snmpEngineTime in the response had zero values, an additional request (possibly encrypted) with the appropriate user credentials is sent to fetch the missing values. -Note, that the function blocks until the discovery proccess is completed. +Note, that the function blocks until the discovery process is completed. If no response could be received after all timeouts and retries, or the response contained errors the function returns -1. -If the discovery proccess was completed 0 is returned. +If the discovery process was completed 0 is returned. .Pp The function .Fn snmp_parse_server From owner-svn-src-head@freebsd.org Sun Jan 1 05:16:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1000C9A50B; Sun, 1 Jan 2017 05:16:25 +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 8EBC7263D; Sun, 1 Jan 2017 05:16:25 +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 v015GO1Z005577; Sun, 1 Jan 2017 05:16:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v015GOM5005576; Sun, 1 Jan 2017 05:16:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010516.v015GOM5005576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 05:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311001 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 05:16:25 -0000 Author: ngie Date: Sun Jan 1 05:16:24 2017 New Revision: 311001 URL: https://svnweb.freebsd.org/changeset/base/311001 Log: Bump .Dd for the spelling and .Nm updates MFC after: 3 days Modified: head/contrib/bsnmp/lib/bsnmpclient.3 Modified: head/contrib/bsnmp/lib/bsnmpclient.3 ============================================================================== --- head/contrib/bsnmp/lib/bsnmpclient.3 Sun Jan 1 05:14:58 2017 (r311000) +++ head/contrib/bsnmp/lib/bsnmpclient.3 Sun Jan 1 05:16:24 2017 (r311001) @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/lib/bsnmpclient.3,v 1.12 2005/10/04 08:46:50 brandt_h Exp $ .\" -.Dd September 9, 2010 +.Dd December 31, 2016 .Dt BSNMPCLIENT 3 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sun Jan 1 05:21:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A87BC9DCF7; Sun, 1 Jan 2017 05:21: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 CDFA72DD8; Sun, 1 Jan 2017 05:21:09 +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 v015L9OV005827; Sun, 1 Jan 2017 05:21:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v015L86L005825; Sun, 1 Jan 2017 05:21:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010521.v015L86L005825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 05:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311002 - in head: lib/libbsnmp/libbsnmp tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 05:21:10 -0000 Author: ngie Date: Sun Jan 1 05:21:08 2017 New Revision: 311002 URL: https://svnweb.freebsd.org/changeset/base/311002 Log: Install bsnmpclient(3) as snmp_client_{init,set_host,set_port}(3) MFC after: 3 days X-MFC with: r310999 Modified: head/lib/libbsnmp/libbsnmp/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile Sun Jan 1 05:16:24 2017 (r311001) +++ head/lib/libbsnmp/libbsnmp/Makefile Sun Jan 1 05:21:08 2017 (r311002) @@ -77,6 +77,9 @@ MLINKS+= bsnmpagent.3 tree_size.3 MLINKS+= bsnmpclient.3 snmp_add_binding.3 MLINKS+= bsnmpclient.3 snmp_client.3 +MLINKS+= bsnmpclient.3 snmp_client_init.3 +MLINKS+= bsnmpclient.3 snmp_client_set_host.3 +MLINKS+= bsnmpclient.3 snmp_client_set_port.3 MLINKS+= bsnmpclient.3 snmp_close.3 MLINKS+= bsnmpclient.3 snmp_dialog.3 MLINKS+= bsnmpclient.3 snmp_discover_engine.3 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 1 05:16:24 2017 (r311001) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 1 05:21:08 2017 (r311002) @@ -824,6 +824,9 @@ OLD_FILES+=usr/share/man/man3/asn_slice_ OLD_FILES+=usr/share/man/man3/snmp_add_binding.3.gz OLD_FILES+=usr/share/man/man3/snmp_calc_keychange.3.gz OLD_FILES+=usr/share/man/man3/snmp_client.3.gz +OLD_FILES+=usr/share/man/man3/snmp_client_init.3.gz +OLD_FILES+=usr/share/man/man3/snmp_client_set_host.3.gz +OLD_FILES+=usr/share/man/man3/snmp_client_set_port.3.gz OLD_FILES+=usr/share/man/man3/snmp_close.3.gz OLD_FILES+=usr/share/man/man3/snmp_debug.3.gz OLD_FILES+=usr/share/man/man3/snmp_dep_commit.3.gz From owner-svn-src-head@freebsd.org Sun Jan 1 05:23:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B41C9DFD9; Sun, 1 Jan 2017 05:23:02 +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 191F71020; Sun, 1 Jan 2017 05:23:02 +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 v015N1Ub009647; Sun, 1 Jan 2017 05:23:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v015N1is009646; Sun, 1 Jan 2017 05:23:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701010523.v015N1is009646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 1 Jan 2017 05:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311003 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 05:23:02 -0000 Author: ngie Date: Sun Jan 1 05:23:01 2017 New Revision: 311003 URL: https://svnweb.freebsd.org/changeset/base/311003 Log: Fix spelling errors; bump .Dd for the change MFC after: 3 days Modified: head/contrib/bsnmp/lib/bsnmplib.3 Modified: head/contrib/bsnmp/lib/bsnmplib.3 ============================================================================== --- head/contrib/bsnmp/lib/bsnmplib.3 Sun Jan 1 05:21:08 2017 (r311002) +++ head/contrib/bsnmp/lib/bsnmplib.3 Sun Jan 1 05:23:01 2017 (r311003) @@ -37,7 +37,7 @@ .\" .\" $Begemot: bsnmp/lib/bsnmplib.3,v 1.9 2005/10/04 08:46:51 brandt_h Exp $ .\" -.Dd December 19, 2010 +.Dd December 31, 2016 .Dt BSNMPLIB 3 .Os .Sh NAME @@ -381,7 +381,7 @@ The function verifies the authentication parameter contained in the PDU (if present) and if the PDU is encrypted, decrypts the PDU contents pointed to by .Fa buf . -If successfull, a plain text scoped PDU is stored in the buffer. +If successful, a plain text scoped PDU is stored in the buffer. .Pp The function .Fn snmp_pdu_init_secparams @@ -477,7 +477,7 @@ The requested securityLevel contained in The PDU authentication parameter received in the PDU did not match the calculated message digest. .It Bq Er SNMP_CODE_EDECRYPT -Error occured while trying to decrypt the PDU. +Error occurred while trying to decrypt the PDU. .El .Pp .Fn snmp_pdu_encode From owner-svn-src-head@freebsd.org Sun Jan 1 08:55:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2F25C9A0FC; Sun, 1 Jan 2017 08:55:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B28491E97; Sun, 1 Jan 2017 08:55:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v018tSNl093922; Sun, 1 Jan 2017 08:55:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v018tShl093921; Sun, 1 Jan 2017 08:55:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701010855.v018tShl093921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Jan 2017 08:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311004 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 08:55:30 -0000 Author: mjg Date: Sun Jan 1 08:55:28 2017 New Revision: 311004 URL: https://svnweb.freebsd.org/changeset/base/311004 Log: fd: access openfiles once in falloc_noinstall This is similar to what's done with nprocs. Note this is only a band aid. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Jan 1 05:23:01 2017 (r311003) +++ head/sys/kern/kern_descrip.c Sun Jan 1 08:55:28 2017 (r311004) @@ -1754,21 +1754,23 @@ falloc_noinstall(struct thread *td, stru { struct file *fp; int maxuserfiles = maxfiles - (maxfiles / 20); + int openfiles_new; static struct timeval lastfail; static int curfail; KASSERT(resultfp != NULL, ("%s: resultfp == NULL", __func__)); - if ((openfiles >= maxuserfiles && + openfiles_new = atomic_fetchadd_int(&openfiles, 1) + 1; + if ((openfiles_new >= maxuserfiles && priv_check(td, PRIV_MAXFILES) != 0) || - openfiles >= maxfiles) { + openfiles_new >= maxfiles) { + atomic_subtract_int(&openfiles, 1); if (ppsratecheck(&lastfail, &curfail, 1)) { printf("kern.maxfiles limit exceeded by uid %i, (%s) " "please see tuning(7).\n", td->td_ucred->cr_ruid, td->td_proc->p_comm); } return (ENFILE); } - atomic_add_int(&openfiles, 1); fp = uma_zalloc(file_zone, M_WAITOK | M_ZERO); refcount_init(&fp->f_count, 1); fp->f_cred = crhold(td->td_ucred); From owner-svn-src-head@freebsd.org Sun Jan 1 10:26:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8ED6C9A62A; Sun, 1 Jan 2017 10:26:40 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wj0-x241.google.com (mail-wj0-x241.google.com [IPv6:2a00:1450:400c:c01::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AFB11F68; Sun, 1 Jan 2017 10:26:40 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wj0-x241.google.com with SMTP id qs7so27924928wjc.1; Sun, 01 Jan 2017 02:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gje235liaGBA0vNxXNL6x+JswW/0wAU1j5J82YdvKnM=; b=D2O21aNt4Sp39GX9Kj7IKSdZXueJjX7irMradvHxGs9v6ZPHFatzy/aFwpMAg1K+9j d7s3HY7gYUvJQYvWEeYqzFk0D4bYfKTyPm+pTJFESobc6iR+1YRWp+h8/2M8gK2vYfcl jq8ilQMEDQAor8z6/YwKMz3P1Fi1m0LYj+Io5zbg1yYKmcDy+9y35keC6Gwf+6kbxybp UTpYJHEmGRKLuJjFg7GTNuYnVsrVs4TXwNSWkSRSGvLChrFyNWsmdimYdVA4WBocO3UO 4BTTLoXySLimwFvn7dIACXMD2hUyIdsPEkBDCRlu1UiM7GwG559Wd9nP54Vzz1lYnyV1 zMlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gje235liaGBA0vNxXNL6x+JswW/0wAU1j5J82YdvKnM=; b=h+zM8Svja/Xqag5Z+xnu4iyU/wbqvatm9wva1dYlo3YbkUXINTgrMnjMD/WHNIguqx C5C7dj4xYFXF7DvBPwa6TRgZsT54UOAgD8L+i260Varf4bYcuwBuUOkNUXMlvFCqvPL2 aIKDDUgjsJ5NhPjKzz8pQLIA+gKOh2KRKW2Ljj/n/LWAiuih0YcpLjrJoqp7ZuIJ3y3M ISI5oFvueAjKNIVj4RBUJsy6aqw6GsLf/9Ai3AO8kt1s9tZZ9qldPXiE9WFSyvwhJf5W DoeiTK6zTQHC+SR8QsM/6vjTfZsqNd2lEYDgNVKTWFPrrzz6PbphA0ArtXletu64ldMk RDGg== X-Gm-Message-State: AIkVDXLAMdBnrrIxIEA9wJ627jEx6QrhyzvZmwnckoPuW6XW9IbHC/F5iM0xK3XfJc3D3w== X-Received: by 10.194.123.103 with SMTP id lz7mr53035442wjb.100.1483266398312; Sun, 01 Jan 2017 02:26:38 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id c133sm79365261wme.12.2017.01.01.02.26.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 01 Jan 2017 02:26:37 -0800 (PST) Date: Sun, 1 Jan 2017 11:26:35 +0100 From: Mateusz Guzik To: Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r310180 - head/sys/net Message-ID: <20170101102635.GB24150@dft-labs.eu> References: <201612162239.uBGMdVSL027853@repo.freebsd.org> <20161216224535.GA6408@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 10:26:40 -0000 On Fri, Dec 16, 2016 at 03:55:41PM -0700, Alan Somers wrote: > On Fri, Dec 16, 2016 at 3:45 PM, Mateusz Guzik wrote: > > On Fri, Dec 16, 2016 at 10:39:31PM +0000, Alan Somers wrote: > >> Author: asomers > >> Date: Fri Dec 16 22:39:30 2016 > >> New Revision: 310180 > >> URL: https://svnweb.freebsd.org/changeset/base/310180 > >> > >> Log: > >> Fix panic during lagg destruction with simultaneous status check > >> > >> If you run "ifconfig lagg0 destroy" and "ifconfig lagg0" at the same time a > >> page fault may result. The first process will destroy ifp->if_lagg in > >> lagg_clone_destroy (called by if_clone_destroy). Then the second process > >> will observe that ifp->if_lagg is NULL at the top of lagg_port_ioctl and > >> goto fallback: where it will promptly dereference ifp->if_lagg anyway. > >> > >> The solution is to repeat the NULL check for ifp->if_lagg > >> > > > > I don't understand how this solves the problem. What prevents the object > > from getting freed after the pointer got NULLified? That is, it seems > > the patch turns a null pointer deref into a use-after-free. > > > > There seems to be a refcounting issue here. > > > > That said, I only did cursory reading. > > What object are you talking about? The problem solved by this commit > is the null-pointer dereference in the thread calling lagg_port_ioctl, > for example "ifconfig lagg0". I misread the patch, sorry for the noise. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sun Jan 1 10:37:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD1C7C9A835; Sun, 1 Jan 2017 10:37:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B83C139D; Sun, 1 Jan 2017 10:37:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v01AbAkT034055; Sun, 1 Jan 2017 10:37:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v01AbAlS034054; Sun, 1 Jan 2017 10:37:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201701011037.v01AbAlS034054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 1 Jan 2017 10:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311005 - head/usr.sbin/ntp/doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 10:37:11 -0000 Author: cy Date: Sun Jan 1 10:37:10 2017 New Revision: 311005 URL: https://svnweb.freebsd.org/changeset/base/311005 Log: Fix up grammar. MFC after: 3 days Modified: head/usr.sbin/ntp/doc/ntp.conf.5 Modified: head/usr.sbin/ntp/doc/ntp.conf.5 ============================================================================== --- head/usr.sbin/ntp/doc/ntp.conf.5 Sun Jan 1 08:55:28 2017 (r311004) +++ head/usr.sbin/ntp/doc/ntp.conf.5 Sun Jan 1 10:37:10 2017 (r311005) @@ -200,7 +200,7 @@ provided in .It Ic pool For type s addresses, this command mobilizes a persistent client mode association with a number of remote servers. -In this mode the local clock can synchronized to the +In this mode the local clock can be synchronized to the remote server, but the remote server can never be synchronized to the local clock. .It Ic server From owner-svn-src-head@freebsd.org Sun Jan 1 14:56:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1546C9AA27; Sun, 1 Jan 2017 14:56:13 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3184817F0; Sun, 1 Jan 2017 14:56:13 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id C09FD40; Sun, 1 Jan 2017 15:56:00 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id AFCD428494; Sun, 1 Jan 2017 15:56:00 +0100 (CET) Date: Sun, 1 Jan 2017 15:56:00 +0100 From: Jilles Tjoelker To: Hiroki Sato Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r310974 - head/usr.sbin/syslogd Message-ID: <20170101145600.GA80448@stack.nl> References: <201612311315.uBVDFqYl096848@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201612311315.uBVDFqYl096848@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 14:56:13 -0000 On Sat, Dec 31, 2016 at 01:15:52PM +0000, Hiroki Sato wrote: > Author: hrs > Date: Sat Dec 31 13:15:52 2016 > New Revision: 310974 > URL: https://svnweb.freebsd.org/changeset/base/310974 > Log: > - Use more descriptive names for variables. > - Set O_CLOEXEC to the signal pipe and /dev/klog. > - Use a single signal handler to catch both SIGHUP and SIGCHLD. > - Fix a bug which did FD_SET() the writer-end of the pipe. > Modified: > head/usr.sbin/syslogd/syslogd.c > Modified: head/usr.sbin/syslogd/syslogd.c > ============================================================================== > --- head/usr.sbin/syslogd/syslogd.c Sat Dec 31 13:10:08 2016 (r310973) > +++ head/usr.sbin/syslogd/syslogd.c Sat Dec 31 13:15:52 2016 (r310974) > [snip] > @@ -582,18 +581,18 @@ main(int argc, char *argv[]) > usage(); > > /* Pipe to catch a signal during select(). */ > - s = pipe2(sigp, O_NONBLOCK); > + s = pipe2(sigpipe, O_CLOEXEC); A blocking pipe will cause a deadlock if too many signals arrive before the main loop reads them out. > if (s < 0) { > err(1, "cannot open a pipe for signals"); > } else { > addsock(NULL, 0, &(struct socklist){ > - .sl_socket = sigp[1], > + .sl_socket = sigpipe[0], > .sl_recv = socklist_recv_signal > }); > } > > /* Listen by default: /dev/klog. */ > - s = open(_PATH_KLOG, O_RDONLY|O_NONBLOCK, 0); > + s = open(_PATH_KLOG, O_RDONLY | O_NONBLOCK | O_CLOEXEC, 0); > if (s < 0) { > dprintf("can't open %s (%d)\n", _PATH_KLOG, errno); > } else { > @@ -646,8 +645,8 @@ main(int argc, char *argv[]) > (void)signal(SIGTERM, dodie); > (void)signal(SIGINT, Debug ? dodie : SIG_IGN); > (void)signal(SIGQUIT, Debug ? dodie : SIG_IGN); > - (void)signal(SIGHUP, init_sh); > - (void)signal(SIGCHLD, reapchild_sh); > + (void)signal(SIGHUP, sighandler); > + (void)signal(SIGCHLD, sighandler); > (void)signal(SIGALRM, domark); > (void)signal(SIGPIPE, SIG_IGN); /* We'll catch EPIPE instead. */ > (void)alarm(TIMERINTVL); Although it is not broken to use signal() on FreeBSD, it is more portable and possibly easier to understand the exact semantics if sigaction() is used instead of signal() to set handlers. Setting SIG_DFL or SIG_IGN with signal() is acceptable. Given that you're changing things here anyway, it may be a good idea to start using sigaction() here. > @@ -717,12 +716,31 @@ static int > socklist_recv_signal(struct socklist *sl __unused) > { > ssize_t len; > - static char buf[BUFSIZ]; > - > - /* Clear an wake-up signal by reading dummy data. */ > - while ((len = read(sigp[0], buf, sizeof(buf))) > 0) > - ; > + int i, nsig, signo; > > + if (ioctl(sigpipe[0], FIONREAD, &i) != 0) { > + logerror("ioctl(FIONREAD)"); > + err(1, "signal pipe read failed"); > + } With a non-blocking pipe, this can go away and you can just read until an [EAGAIN] error. > [snip] > @@ -1512,17 +1530,6 @@ ttymsg_check(struct iovec *iov, int iovc > } > > static void > -reapchild_sh(int signo) > -{ > - static char buf[BUFSIZ]; > - > - WantReapchild = signo; I think setting a volatile sig_atomic_t variable in a signal handler is fine. This would avoid dropping different signal numbers if many signals arrive before the main loop gets around to process them. > - /* Send an wake-up signal to the select() loop. */ > - read(sigp[0], buf, sizeof(buf)); > - write(sigp[1], &signo, sizeof(signo)); > -} > - > -static void > reapchild(int signo __unused) > { > int status; The parameter can go away now. > [snip] -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Sun Jan 1 17:16:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BF4EC9AC0A; Sun, 1 Jan 2017 17:16:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 266A81276; Sun, 1 Jan 2017 17:16:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v01HGmhP095588; Sun, 1 Jan 2017 17:16:48 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v01HGmM2095585; Sun, 1 Jan 2017 17:16:48 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701011716.v01HGmM2095585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 1 Jan 2017 17:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311012 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 17:16:49 -0000 Author: pfg Date: Sun Jan 1 17:16:47 2017 New Revision: 311012 URL: https://svnweb.freebsd.org/changeset/base/311012 Log: Remove some uses of the GCC __nonnull() attribute. While the checks are considered useful, the attribute does dangerous optimizations, removing NULL checks where they can be needed. Remove the uses of this attribute introduced in r281130: the changes were inspired on Google's bionic where this attribute is not used anymore. The __nonnull() attribute will be deprecrated from our headers and replaced with the Clang _Nonnull qualifier in the future. MFC after: 3 days Modified: head/include/pthread.h head/include/signal.h head/include/stdlib.h Modified: head/include/pthread.h ============================================================================== --- head/include/pthread.h Sun Jan 1 12:35:41 2017 (r311011) +++ head/include/pthread.h Sun Jan 1 17:16:47 2017 (r311012) @@ -147,25 +147,19 @@ struct _pthread_cleanup_info { */ __BEGIN_DECLS int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); -int pthread_attr_destroy(pthread_attr_t *) __nonnull(1); +int pthread_attr_destroy(pthread_attr_t *); int pthread_attr_getstack(const pthread_attr_t * __restrict, - void ** __restrict, size_t * __restrict) - __nonnull_all; -int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) - __nonnull_all; + void ** __restrict, size_t * __restrict); +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); int pthread_attr_getstackaddr(const pthread_attr_t *, void **); -int pthread_attr_getdetachstate(const pthread_attr_t *, int *) - __nonnull_all; -int pthread_attr_init(pthread_attr_t *) __nonnull(1); -int pthread_attr_setstacksize(pthread_attr_t *, size_t) - __nonnull(1); -int pthread_attr_setguardsize(pthread_attr_t *, size_t) - __nonnull(1); -int pthread_attr_setstack(pthread_attr_t *, void *, size_t) - __nonnull(1); +int pthread_attr_getdetachstate(const pthread_attr_t *, int *); +int pthread_attr_init(pthread_attr_t *); +int pthread_attr_setstacksize(pthread_attr_t *, size_t); +int pthread_attr_setguardsize(pthread_attr_t *, size_t); +int pthread_attr_setstack(pthread_attr_t *, void *, size_t); int pthread_attr_setstackaddr(pthread_attr_t *, void *); -int pthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1); +int pthread_attr_setdetachstate(pthread_attr_t *, int); int pthread_barrier_destroy(pthread_barrier_t *); int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned); @@ -173,7 +167,7 @@ int pthread_barrier_wait(pthread_barrie int pthread_barrierattr_destroy(pthread_barrierattr_t *); int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *); -int pthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1); +int pthread_barrierattr_init(pthread_barrierattr_t *); int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); #define pthread_cleanup_push(cleanup_routine, cleanup_arg) \ @@ -189,111 +183,100 @@ int pthread_barrierattr_setpshared(pthr __pthread_cleanup_pop_imp(execute); \ } -int pthread_condattr_destroy(pthread_condattr_t *) __nonnull(1); +int pthread_condattr_destroy(pthread_condattr_t *); int pthread_condattr_getclock(const pthread_condattr_t *, - clockid_t *) __nonnull_all; -int pthread_condattr_getpshared(const pthread_condattr_t *, int *) - __nonnull_all; -int pthread_condattr_init(pthread_condattr_t *) __nonnull(1); -int pthread_condattr_setclock(pthread_condattr_t *, clockid_t) - __nonnull(1); -int pthread_condattr_setpshared(pthread_condattr_t *, int) - __nonnull(1); -int pthread_cond_broadcast(pthread_cond_t *) - __nonnull(1); -int pthread_cond_destroy(pthread_cond_t *) - __nonnull(1); + clockid_t *); +int pthread_condattr_getpshared(const pthread_condattr_t *, int *); +int pthread_condattr_init(pthread_condattr_t *); +int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); +int pthread_condattr_setpshared(pthread_condattr_t *, int); +int pthread_cond_broadcast(pthread_cond_t *); +int pthread_cond_destroy(pthread_cond_t *); int pthread_cond_init(pthread_cond_t *, - const pthread_condattr_t *) __nonnull(1); -int pthread_cond_signal(pthread_cond_t *) __nonnull(1); + const pthread_condattr_t *); +int pthread_cond_signal(pthread_cond_t *); int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *__mutex, const struct timespec *) - __nonnull_all __requires_exclusive(*__mutex); + __requires_exclusive(*__mutex); int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex) - __nonnull_all __requires_exclusive(*__mutex); + __requires_exclusive(*__mutex); int pthread_create(pthread_t *, const pthread_attr_t *, - void *(*) (void *), void *) __nonnull(1) __nonnull(3); + void *(*) (void *), void *); int pthread_detach(pthread_t); int pthread_equal(pthread_t, pthread_t); void pthread_exit(void *) __dead2; void *pthread_getspecific(pthread_key_t); -int pthread_getcpuclockid(pthread_t, clockid_t *) __nonnull(2); +int pthread_getcpuclockid(pthread_t, clockid_t *); int pthread_join(pthread_t, void **); int pthread_key_create(pthread_key_t *, - void (*) (void *)) __nonnull(1); + void (*) (void *)); int pthread_key_delete(pthread_key_t); -int pthread_mutexattr_init(pthread_mutexattr_t *) __nonnull(1); -int pthread_mutexattr_destroy(pthread_mutexattr_t *) __nonnull(1); +int pthread_mutexattr_init(pthread_mutexattr_t *); +int pthread_mutexattr_destroy(pthread_mutexattr_t *); int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, - int *) __nonnull_all; -int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *) - __nonnull_all; -int pthread_mutexattr_settype(pthread_mutexattr_t *, int) - __nonnull(1); -int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) - __nonnull(1); + int *); +int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *); +int pthread_mutexattr_settype(pthread_mutexattr_t *, int); +int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); int pthread_mutex_consistent(pthread_mutex_t *__mutex) __nonnull(1) __requires_exclusive(*__mutex); int pthread_mutex_destroy(pthread_mutex_t *__mutex) - __nonnull(1) __requires_unlocked(*__mutex); + __requires_unlocked(*__mutex); int pthread_mutex_init(pthread_mutex_t *__mutex, const pthread_mutexattr_t *) - __nonnull(1) __requires_unlocked(*__mutex); + __requires_unlocked(*__mutex); int pthread_mutex_lock(pthread_mutex_t *__mutex) - __nonnull(1) __locks_exclusive(*__mutex); + __locks_exclusive(*__mutex); int pthread_mutex_trylock(pthread_mutex_t *__mutex) - __nonnull(1) __trylocks_exclusive(0, *__mutex); + __trylocks_exclusive(0, *__mutex); int pthread_mutex_timedlock(pthread_mutex_t *__mutex, const struct timespec *) - __nonnull_all __trylocks_exclusive(0, *__mutex); + __trylocks_exclusive(0, *__mutex); int pthread_mutex_unlock(pthread_mutex_t *__mutex) - __nonnull(1) __unlocks(*__mutex); -int pthread_once(pthread_once_t *, void (*) (void)) __nonnull_all; + __unlocks(*__mutex); +int pthread_once(pthread_once_t *, void (*) (void)); int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) - __nonnull(1) __requires_unlocked(*__rwlock); + __requires_unlocked(*__rwlock); int pthread_rwlock_init(pthread_rwlock_t *__rwlock, const pthread_rwlockattr_t *) - __nonnull(1) __requires_unlocked(*__rwlock); + __requires_unlocked(*__rwlock); int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __locks_shared(*__rwlock); + __locks_shared(*__rwlock); int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __nonnull_all __trylocks_shared(0, *__rwlock); + __trylocks_shared(0, *__rwlock); int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __nonnull_all __trylocks_exclusive(0, *__rwlock); + __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __trylocks_shared(0, *__rwlock); + __trylocks_shared(0, *__rwlock); int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __trylocks_exclusive(0, *__rwlock); + __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __unlocks(*__rwlock); + __unlocks(*__rwlock); int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __locks_exclusive(*__rwlock); -int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) - __nonnull(1); + __locks_exclusive(*__rwlock); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *, int *); int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, - int *) __nonnull_all; -int pthread_rwlockattr_init(pthread_rwlockattr_t *) - __nonnull(1); + int *); +int pthread_rwlockattr_init(pthread_rwlockattr_t *); int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int); -int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) - __nonnull(1); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); pthread_t pthread_self(void); int pthread_setspecific(pthread_key_t, const void *); int pthread_spin_init(pthread_spinlock_t *__spin, int) - __requires_unlocked(*__spin); + __requires_unlocked(*__spin); int pthread_spin_destroy(pthread_spinlock_t *__spin) - __requires_unlocked(*__spin); + __requires_unlocked(*__spin); int pthread_spin_lock(pthread_spinlock_t *__spin) - __locks_exclusive(*__spin); + __locks_exclusive(*__spin); int pthread_spin_trylock(pthread_spinlock_t *__spin) - __trylocks_exclusive(0, *__spin); + __trylocks_exclusive(0, *__spin); int pthread_spin_unlock(pthread_spinlock_t *__spin) - __unlocks(*__spin); + __unlocks(*__spin); int pthread_cancel(pthread_t); int pthread_setcancelstate(int, int *); int pthread_setcanceltype(int, int *); @@ -322,20 +305,18 @@ int pthread_mutexattr_setrobust(pthread int pthread_attr_getinheritsched(const pthread_attr_t *, int *); int pthread_attr_getschedparam(const pthread_attr_t *, - struct sched_param *) __nonnull_all; -int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) - __nonnull_all; -int pthread_attr_getscope(const pthread_attr_t *, int *) - __nonnull_all; + struct sched_param *); +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); +int pthread_attr_getscope(const pthread_attr_t *, int *); int pthread_attr_setinheritsched(pthread_attr_t *, int); int pthread_attr_setschedparam(pthread_attr_t *, - const struct sched_param *) __nonnull(1) __nonnull(2); -int pthread_attr_setschedpolicy(pthread_attr_t *, int) __nonnull(1); -int pthread_attr_setscope(pthread_attr_t *, int) __nonnull(1); + const struct sched_param *); +int pthread_attr_setschedpolicy(pthread_attr_t *, int); +int pthread_attr_setscope(pthread_attr_t *, int); int pthread_getschedparam(pthread_t pthread, int *, - struct sched_param *) __nonnull(2) __nonnull(3); + struct sched_param *); int pthread_setschedparam(pthread_t, int, - const struct sched_param *) __nonnull(3); + const struct sched_param *); #if __XSI_VISIBLE int pthread_getconcurrency(void); int pthread_setconcurrency(int); Modified: head/include/signal.h ============================================================================== --- head/include/signal.h Sun Jan 1 12:35:41 2017 (r311011) +++ head/include/signal.h Sun Jan 1 17:16:47 2017 (r311012) @@ -82,10 +82,10 @@ int sigdelset(sigset_t *, int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); int sigismember(const sigset_t *, int); -int sigpending(sigset_t *) __nonnull(1); +int sigpending(sigset_t *); int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); -int sigsuspend(const sigset_t *) __nonnull(1); -int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull_all; +int sigsuspend(const sigset_t *); +int sigwait(const sigset_t * __restrict, int * __restrict); #endif #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Sun Jan 1 12:35:41 2017 (r311011) +++ head/include/stdlib.h Sun Jan 1 17:16:47 2017 (r311012) @@ -172,7 +172,7 @@ char *realpath(const char * __restrict, int rand_r(unsigned *); /* (TSF) */ #endif #if __POSIX_VISIBLE >= 200112 -int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ +int posix_memalign(void **, size_t, size_t); /* (ADV) */ int setenv(const char *, const char *, int); int unsetenv(const char *); #endif From owner-svn-src-head@freebsd.org Sun Jan 1 18:49:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB94EC9A341; Sun, 1 Jan 2017 18:49:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC5F21D1A; Sun, 1 Jan 2017 18:49:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v01Inkv7035240; Sun, 1 Jan 2017 18:49:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v01Inkro035239; Sun, 1 Jan 2017 18:49:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701011849.v01Inkro035239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 1 Jan 2017 18:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311014 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2017 18:49:48 -0000 Author: kib Date: Sun Jan 1 18:49:46 2017 New Revision: 311014 URL: https://svnweb.freebsd.org/changeset/base/311014 Log: Style fixes for vm_map_insert(). Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Jan 1 18:14:32 2017 (r311013) +++ head/sys/vm/vm_map.c Sun Jan 1 18:49:46 2017 (r311014) @@ -1180,8 +1180,8 @@ vm_map_insert(vm_map_t map, vm_object_t vm_offset_t start, vm_offset_t end, vm_prot_t prot, vm_prot_t max, int cow) { vm_map_entry_t new_entry, prev_entry, temp_entry; - vm_eflags_t protoeflags; struct ucred *cred; + vm_eflags_t protoeflags; vm_inherit_t inheritance; VM_MAP_ASSERT_LOCKED(map); @@ -1194,8 +1194,7 @@ vm_map_insert(vm_map_t map, vm_object_t /* * Check that the start and end points are not bogus. */ - if ((start < map->min_offset) || (end > map->max_offset) || - (start >= end)) + if (start < map->min_offset || end > map->max_offset || start >= end) return (KERN_INVALID_ADDRESS); /* @@ -1210,8 +1209,7 @@ vm_map_insert(vm_map_t map, vm_object_t /* * Assert that the next entry doesn't overlap the end point. */ - if ((prev_entry->next != &map->header) && - (prev_entry->next->start < end)) + if (prev_entry->next != &map->header && prev_entry->next->start < end) return (KERN_NO_SPACE); protoeflags = 0; @@ -1241,9 +1239,10 @@ vm_map_insert(vm_map_t map, vm_object_t ((protoeflags & MAP_ENTRY_NEEDS_COPY) || object == NULL))) { if (!(cow & MAP_ACC_CHARGED) && !swap_reserve(end - start)) return (KERN_RESOURCE_SHORTAGE); - KASSERT(object == NULL || (protoeflags & MAP_ENTRY_NEEDS_COPY) || + KASSERT(object == NULL || + (protoeflags & MAP_ENTRY_NEEDS_COPY) != 0 || object->cred == NULL, - ("OVERCOMMIT: vm_map_insert o %p", object)); + ("overcommit: vm_map_insert o %p", object)); cred = curthread->td_ucred; } @@ -1263,29 +1262,27 @@ charged: if (object->ref_count > 1 || object->shadow_count != 0) vm_object_clear_flag(object, OBJ_ONEMAPPING); VM_OBJECT_WUNLOCK(object); - } - else if ((prev_entry != &map->header) && - (prev_entry->eflags == protoeflags) && - (cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 && - (prev_entry->end == start) && - (prev_entry->wired_count == 0) && - (prev_entry->cred == cred || - (prev_entry->object.vm_object != NULL && - (prev_entry->object.vm_object->cred == cred))) && - vm_object_coalesce(prev_entry->object.vm_object, - prev_entry->offset, - (vm_size_t)(prev_entry->end - prev_entry->start), - (vm_size_t)(end - prev_entry->end), cred != NULL && - (protoeflags & MAP_ENTRY_NEEDS_COPY) == 0)) { + } else if (prev_entry != &map->header && + prev_entry->eflags == protoeflags && + (cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 && + prev_entry->end == start && prev_entry->wired_count == 0 && + (prev_entry->cred == cred || + (prev_entry->object.vm_object != NULL && + prev_entry->object.vm_object->cred == cred)) && + vm_object_coalesce(prev_entry->object.vm_object, + prev_entry->offset, + (vm_size_t)(prev_entry->end - prev_entry->start), + (vm_size_t)(end - prev_entry->end), cred != NULL && + (protoeflags & MAP_ENTRY_NEEDS_COPY) == 0)) { /* * We were able to extend the object. Determine if we * can extend the previous map entry to include the * new range as well. */ - if ((prev_entry->inheritance == inheritance) && - (prev_entry->protection == prot) && - (prev_entry->max_protection == max)) { - map->size += (end - prev_entry->end); + if (prev_entry->inheritance == inheritance && + prev_entry->protection == prot && + prev_entry->max_protection == max) { + map->size += end - prev_entry->end; prev_entry->end = end; vm_map_entry_resize_free(map, prev_entry); vm_map_simplify_entry(map, prev_entry); @@ -1300,7 +1297,7 @@ charged: */ object = prev_entry->object.vm_object; offset = prev_entry->offset + - (prev_entry->end - prev_entry->start); + (prev_entry->end - prev_entry->start); vm_object_reference(object); if (cred != NULL && object != NULL && object->cred != NULL && !(prev_entry->eflags & MAP_ENTRY_NEEDS_COPY)) { @@ -1333,7 +1330,7 @@ charged: new_entry->next_read = start; KASSERT(cred == NULL || !ENTRY_CHARGED(new_entry), - ("OVERCOMMIT: vm_map_insert leaks vm_map %p", new_entry)); + ("overcommit: vm_map_insert leaks vm_map %p", new_entry)); new_entry->cred = cred; /* @@ -1350,10 +1347,9 @@ charged: */ vm_map_simplify_entry(map, new_entry); - if (cow & (MAP_PREFAULT|MAP_PREFAULT_PARTIAL)) { - vm_map_pmap_enter(map, start, prot, - object, OFF_TO_IDX(offset), end - start, - cow & MAP_PREFAULT_PARTIAL); + if ((cow & (MAP_PREFAULT | MAP_PREFAULT_PARTIAL)) != 0) { + vm_map_pmap_enter(map, start, prot, object, OFF_TO_IDX(offset), + end - start, cow & MAP_PREFAULT_PARTIAL); } return (KERN_SUCCESS); From owner-svn-src-head@freebsd.org Mon Jan 2 00:56:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0896CC9BE5B; Mon, 2 Jan 2017 00:56:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B118713CF; Mon, 2 Jan 2017 00:56:34 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v020uYOE093435; Mon, 2 Jan 2017 00:56:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v020uXpN093430; Mon, 2 Jan 2017 00:56:33 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701020056.v020uXpN093430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 2 Jan 2017 00:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311039 - in head/sys: dev/bnxt kern net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 00:56:35 -0000 Author: sbruno Date: Mon Jan 2 00:56:33 2017 New Revision: 311039 URL: https://svnweb.freebsd.org/changeset/base/311039 Log: 2017 IFLIB updates in preparation for commits to e1000 and ixgbe. - iflib - add checksum in place support (mmacy) - iflib - initialize IP for TSO (going to be needed for e1000) (mmacy) - iflib - move isc_txrx from shared context to softc context (mmacy) - iflib - Normalize checks in TXQ drainage. (shurd) - iflib - Fix queue capping checks (mmacy) - iflib - Fix invalid assert, em can need 2 sentinels (mmacy) - iflib - let the driver determine what capabilities are set and what tx csum flags are used (mmacy) - add INVARIANTS debugging hooks to gtaskqueue enqueue (mmacy) - update bnxt(4) to support the changes to iflib (shurd) Some other various, sundry updates. Slightly more verbose changelog: Submitted by: mmacy@nextbsd.org Reviewed by: shurd mFC after: Sponsored by: LimeLight Networks and Dell EMC Isilon Modified: head/sys/dev/bnxt/if_bnxt.c head/sys/kern/subr_gtaskqueue.c head/sys/net/ifdi_if.m head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Sun Jan 1 22:49:15 2017 (r311038) +++ head/sys/dev/bnxt/if_bnxt.c Mon Jan 2 00:56:33 2017 (r311039) @@ -277,7 +277,6 @@ char bnxt_driver_version[] = "FreeBSD ba extern struct if_txrx bnxt_txrx; static struct if_shared_ctx bnxt_sctx_init = { .isc_magic = IFLIB_MAGIC, - .isc_txrx = &bnxt_txrx, .isc_driver = &bnxt_iflib_driver, .isc_nfl = 2, // Number of Free Lists .isc_flags = IFLIB_HAS_RXCQ | IFLIB_HAS_TXCQ, @@ -679,6 +678,20 @@ bnxt_attach_pre(if_ctx_t ctx) goto failed; iflib_set_mac(ctx, softc->func.mac_addr); + scctx->isc_txrx = &bnxt_txrx; + scctx->isc_tx_csum_flags = (CSUM_IP | CSUM_TCP | CSUM_UDP | + CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO); + scctx->isc_capenable = + /* These are translated to hwassit bits */ + IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | IFCAP_TSO4 | IFCAP_TSO6 | + /* These are checked by iflib */ + IFCAP_LRO | IFCAP_VLAN_HWFILTER | + /* These are part of the iflib mask */ + IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_VLAN_MTU | + IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | + /* These likely get lost... */ + IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU; + /* Get the queue config */ rc = bnxt_hwrm_queue_qportcfg(softc); if (rc) { @@ -793,7 +806,6 @@ bnxt_attach_post(if_ctx_t ctx) { struct bnxt_softc *softc = iflib_get_softc(ctx); if_t ifp = iflib_get_ifp(ctx); - int capabilities, enabling; int rc; bnxt_create_config_sysctls_post(softc); @@ -808,26 +820,6 @@ bnxt_attach_post(if_ctx_t ctx) bnxt_add_media_types(softc); ifmedia_set(softc->media, IFM_ETHER | IFM_AUTO); - if_sethwassist(ifp, (CSUM_TCP | CSUM_UDP | CSUM_TCP_IPV6 | - CSUM_UDP_IPV6 | CSUM_TSO)); - - capabilities = - /* These are translated to hwassit bits */ - IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | IFCAP_TSO4 | IFCAP_TSO6 | - /* These are checked by iflib */ - IFCAP_LRO | IFCAP_VLAN_HWFILTER | - /* These are part of the iflib mask */ - IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_VLAN_MTU | - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | - /* These likely get lost... */ - IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU; - - if_setcapabilities(ifp, capabilities); - - enabling = capabilities; - - if_setcapenable(ifp, enabling); - softc->scctx->isc_max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Sun Jan 1 22:49:15 2017 (r311038) +++ head/sys/kern/subr_gtaskqueue.c Mon Jan 2 00:56:33 2017 (r311039) @@ -99,6 +99,15 @@ struct gtaskqueue { } while (0) #define TQ_ASSERT_UNLOCKED(tq) mtx_assert(&(tq)->tq_mutex, MA_NOTOWNED) +#ifdef INVARIANTS +static void +gtask_dump(struct gtask *gtask) +{ + printf("gtask: %p ta_flags=%x ta_priority=%d ta_func=%p ta_context=%p\n", + gtask, gtask->ta_flags, gtask->ta_priority, gtask->ta_func, gtask->ta_context); +} +#endif + static __inline int TQ_SLEEP(struct gtaskqueue *tq, void *p, struct mtx *m, int pri, const char *wm, int t) @@ -172,6 +181,12 @@ gtaskqueue_free(struct gtaskqueue *queue int grouptaskqueue_enqueue(struct gtaskqueue *queue, struct gtask *gtask) { +#ifdef INVARIANTS + if (queue == NULL) { + gtask_dump(gtask); + panic("queue == NULL"); + } +#endif TQ_LOCK(queue); if (gtask->ta_flags & TASK_ENQUEUED) { TQ_UNLOCK(queue); Modified: head/sys/net/ifdi_if.m ============================================================================== --- head/sys/net/ifdi_if.m Sun Jan 1 22:49:15 2017 (r311038) +++ head/sys/net/ifdi_if.m Mon Jan 2 00:56:33 2017 (r311039) @@ -229,6 +229,7 @@ METHOD int promisc_set { METHOD void crcstrip_set { if_ctx_t _ctx; int _onoff; + int _strip; }; # Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sun Jan 1 22:49:15 2017 (r311038) +++ head/sys/net/iflib.c Mon Jan 2 00:56:33 2017 (r311039) @@ -355,6 +355,9 @@ struct iflib_txq { char ift_mtx_name[MTX_NAME_LEN]; char ift_db_mtx_name[MTX_NAME_LEN]; bus_dma_segment_t ift_segs[IFLIB_MAX_TX_SEGS] __aligned(CACHE_LINE_SIZE); +#ifdef IFLIB_DIAGNOSTICS + uint64_t ift_cpu_exec_count[256]; +#endif } __aligned(CACHE_LINE_SIZE); struct iflib_fl { @@ -431,6 +434,9 @@ struct iflib_rxq { iflib_dma_info_t ifr_ifdi; /* dynamically allocate if any drivers need a value substantially larger than this */ struct if_rxd_frag ifr_frags[IFLIB_MAX_RX_SEGS] __aligned(CACHE_LINE_SIZE); +#ifdef IFLIB_DIAGNOSTICS + uint64_t ifr_cpu_exec_count[256]; +#endif } __aligned(CACHE_LINE_SIZE); /* @@ -632,7 +638,7 @@ static void iflib_init_locked(if_ctx_t c static void iflib_add_device_sysctl_pre(if_ctx_t ctx); static void iflib_add_device_sysctl_post(if_ctx_t ctx); static void iflib_ifmp_purge(iflib_txq_t txq); - +static void _iflib_pre_assert(if_softc_ctx_t scctx); #ifdef DEV_NETMAP #include @@ -684,7 +690,7 @@ iflib_netmap_register(struct netmap_adap ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); if (!CTX_IS_VF(ctx)) - IFDI_CRCSTRIP_SET(ctx, onoff); + IFDI_CRCSTRIP_SET(ctx, onoff, iflib_crcstrip); /* enable or disable flags and callbacks in na and ifp */ if (onoff) { @@ -693,7 +699,7 @@ iflib_netmap_register(struct netmap_adap nm_clear_native_flags(na); } IFDI_INIT(ctx); - IFDI_CRCSTRIP_SET(ctx, onoff); // XXX why twice ? + IFDI_CRCSTRIP_SET(ctx, onoff, iflib_crcstrip); // XXX why twice ? CTX_UNLOCK(ctx); return (ifp->if_drv_flags & IFF_DRV_RUNNING ? 0 : 1); } @@ -1192,6 +1198,9 @@ iflib_fast_intr(void *arg) iflib_filter_info_t info = arg; struct grouptask *gtask = info->ifi_task; + if (!smp_started) + return (FILTER_HANDLED); + DBG_COUNTER_INC(fast_intrs); if (info->ifi_filter != NULL && info->ifi_filter(info->ifi_filter_arg) == FILTER_HANDLED) return (FILTER_HANDLED); @@ -1410,7 +1419,7 @@ iflib_txq_setup(iflib_txq_t txq) iflib_dma_info_t di; int i; - /* Set number of descriptors available */ + /* Set number of descriptors available */ txq->ift_qstatus = IFLIB_QUEUE_IDLE; /* Reset indices */ @@ -1833,22 +1842,25 @@ static void iflib_init_locked(if_ctx_t ctx) { if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; + if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; if_t ifp = ctx->ifc_ifp; iflib_fl_t fl; iflib_txq_t txq; iflib_rxq_t rxq; - int i, j; + int i, j, tx_ip_csum_flags, tx_ip6_csum_flags; if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); IFDI_INTR_DISABLE(ctx); + tx_ip_csum_flags = scctx->isc_tx_csum_flags & (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_SCTP); + tx_ip6_csum_flags = scctx->isc_tx_csum_flags & (CSUM_IP6_TCP | CSUM_IP6_UDP | CSUM_IP6_SCTP); /* Set hardware offload abilities */ if_clearhwassist(ifp); if (if_getcapenable(ifp) & IFCAP_TXCSUM) - if_sethwassistbits(ifp, CSUM_IP | CSUM_TCP | CSUM_UDP, 0); + if_sethwassistbits(ifp, tx_ip_csum_flags, 0); if (if_getcapenable(ifp) & IFCAP_TXCSUM_IPV6) - if_sethwassistbits(ifp, (CSUM_TCP_IPV6 | CSUM_UDP_IPV6), 0); + if_sethwassistbits(ifp, tx_ip6_csum_flags, 0); if (if_getcapenable(ifp) & IFCAP_TSO4) if_sethwassistbits(ifp, CSUM_IP_TSO, 0); if (if_getcapenable(ifp) & IFCAP_TSO6) @@ -2258,10 +2270,21 @@ print_pkt(if_pkt_info_t pi) static int iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, struct mbuf **mp) { + if_shared_ctx_t sctx = txq->ift_ctx->ifc_sctx; struct ether_vlan_header *eh; struct mbuf *m, *n; n = m = *mp; + if ((sctx->isc_flags & IFLIB_NEED_SCRATCH) && + M_WRITABLE(m) == 0) { + if ((m = m_dup(m, M_NOWAIT)) == NULL) { + return (ENOMEM); + } else { + m_freem(*mp); + n = *mp = m; + } + } + /* * Determine where frame payload starts. * Jump over vlan headers if already present, @@ -2345,6 +2368,10 @@ iflib_parse_header(iflib_txq_t txq, if_p th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(IPPROTO_TCP)); pi->ipi_tso_segsz = m->m_pkthdr.tso_segsz; + if (sctx->isc_flags & IFLIB_TSO_INIT_IP) { + ip->ip_sum = 0; + ip->ip_len = htons(pi->ipi_ip_hlen + pi->ipi_tcp_hlen + pi->ipi_tso_segsz); + } } break; } @@ -2396,10 +2423,10 @@ iflib_parse_header(iflib_txq_t txq, if_p break; } *mp = m; + return (0); } - static __noinline struct mbuf * collapse_pkthdr(struct mbuf *m0) { @@ -2688,6 +2715,11 @@ defrag: ndesc += txq->ift_size; txq->ift_gen = 1; } + /* + * drivers can need as many as + * two sentinels + */ + MPASS(ndesc <= pi.ipi_nsegs + 2); MPASS(pi.ipi_new_pidx != pidx); MPASS(ndesc > 0); txq->ift_in_use += ndesc; @@ -2855,7 +2887,7 @@ iflib_txq_can_drain(struct ifmp_ring *r) iflib_txq_t txq = r->cookie; if_ctx_t ctx = txq->ift_ctx; - return ((TXQ_AVAIL(txq) >= MAX_TX_DESC(ctx)) || + return ((TXQ_AVAIL(txq) > MAX_TX_DESC(ctx) + 2) || ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, txq->ift_cidx_processed, false)); } @@ -2930,13 +2962,13 @@ iflib_txq_drain(struct ifmp_ring *r, uin if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) break; - if (desc_used > TXQ_MAX_DB_CONSUMED(txq->ift_size)) + if (desc_used >= TXQ_MAX_DB_CONSUMED(txq->ift_size)) break; } if ((iflib_min_tx_latency || iflib_txq_min_occupancy(txq)) && txq->ift_db_pending) iflib_txd_db_check(ctx, txq, TRUE); - else if ((txq->ift_db_pending || TXQ_AVAIL(txq) < MAX_TX_DESC(ctx)) && + else if ((txq->ift_db_pending || TXQ_AVAIL(txq) <= MAX_TX_DESC(ctx) + 2) && (callout_pending(&txq->ift_db_check) == 0)) { txq->ift_db_pending_queued = txq->ift_db_pending; callout_reset_on(&txq->ift_db_check, 1, iflib_txd_deferred_db_check, @@ -3004,6 +3036,9 @@ _task_fn_tx(void *context) iflib_txq_t txq = context; if_ctx_t ctx = txq->ift_ctx; +#ifdef IFLIB_DIAGNOSTICS + txq->ift_cpu_exec_count[curcpu]++; +#endif if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) return; ifmp_ring_check_drainage(txq->ift_br[0], TX_BATCH_SIZE); @@ -3017,6 +3052,9 @@ _task_fn_rx(void *context) bool more; int rc; +#ifdef IFLIB_DIAGNOSTICS + rxq->ifr_cpu_exec_count[curcpu]++; +#endif DBG_COUNTER_INC(task_fn_rxs); if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; @@ -3520,7 +3558,6 @@ iflib_device_register(device_t dev, void ctx->ifc_sctx = sctx; ctx->ifc_dev = dev; - ctx->ifc_txrx = *sctx->isc_txrx; ctx->ifc_softc = sc; if ((err = iflib_register(ctx)) != 0) { @@ -3530,6 +3567,8 @@ iflib_device_register(device_t dev, void iflib_add_device_sysctl_pre(ctx); scctx = &ctx->ifc_softc_ctx; + ifp = ctx->ifc_ifp; + /* * XXX sanity check that ntxd & nrxd are a power of 2 */ @@ -3582,10 +3621,22 @@ iflib_device_register(device_t dev, void device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err); return (err); } - if (scctx->isc_ntxqsets_max) - scctx->isc_ntxqsets = min(scctx->isc_ntxqsets, scctx->isc_ntxqsets_max); - if (scctx->isc_nrxqsets_max) - scctx->isc_nrxqsets = min(scctx->isc_nrxqsets, scctx->isc_nrxqsets_max); + _iflib_pre_assert(scctx); + ctx->ifc_txrx = *scctx->isc_txrx; + +#ifdef INVARIANTS + MPASS(scctx->isc_capenable); + if (scctx->isc_capenable & IFCAP_TXCSUM) + MPASS(scctx->isc_tx_csum_flags); +#endif + + if_setcapabilities(ifp, scctx->isc_capenable); + if_setcapenable(ifp, scctx->isc_capenable); + + if (scctx->isc_ntxqsets == 0 || (scctx->isc_ntxqsets_max && scctx->isc_ntxqsets_max < scctx->isc_ntxqsets)) + scctx->isc_ntxqsets = scctx->isc_ntxqsets_max; + if (scctx->isc_nrxqsets == 0 || (scctx->isc_nrxqsets_max && scctx->isc_nrxqsets_max < scctx->isc_nrxqsets)) + scctx->isc_nrxqsets = scctx->isc_nrxqsets_max; #ifdef ACPI_DMAR if (dmar_get_dma_tag(device_get_parent(dev), dev) != NULL) @@ -3594,8 +3645,6 @@ iflib_device_register(device_t dev, void msix_bar = scctx->isc_msix_bar; - ifp = ctx->ifc_ifp; - if(sctx->isc_flags & IFLIB_HAS_TXCQ) main_txq = 1; else @@ -3679,6 +3728,7 @@ iflib_device_register(device_t dev, void goto fail_queues; } + IFDI_INTR_DISABLE(ctx); if (msix > 1 && (err = IFDI_MSIX_INTR_ASSIGN(ctx, msix)) != 0) { device_printf(dev, "IFDI_MSIX_INTR_ASSIGN failed %d\n", err); goto fail_intr_free; @@ -3948,15 +3998,6 @@ _iflib_assert(if_shared_ctx_t sctx) MPASS(sctx->isc_rx_nsegments); MPASS(sctx->isc_rx_maxsegsize); - - MPASS(sctx->isc_txrx->ift_txd_encap); - MPASS(sctx->isc_txrx->ift_txd_flush); - MPASS(sctx->isc_txrx->ift_txd_credits_update); - MPASS(sctx->isc_txrx->ift_rxd_available); - MPASS(sctx->isc_txrx->ift_rxd_pkt_get); - MPASS(sctx->isc_txrx->ift_rxd_refill); - MPASS(sctx->isc_txrx->ift_rxd_flush); - MPASS(sctx->isc_nrxd_min[0]); MPASS(sctx->isc_nrxd_max[0]); MPASS(sctx->isc_nrxd_default[0]); @@ -3965,9 +4006,18 @@ _iflib_assert(if_shared_ctx_t sctx) MPASS(sctx->isc_ntxd_default[0]); } -#define DEFAULT_CAPS (IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \ - IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTAGGING | \ - IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_HWTSO | IFCAP_HWSTATS) +static void +_iflib_pre_assert(if_softc_ctx_t scctx) +{ + + MPASS(scctx->isc_txrx->ift_txd_encap); + MPASS(scctx->isc_txrx->ift_txd_flush); + MPASS(scctx->isc_txrx->ift_txd_credits_update); + MPASS(scctx->isc_txrx->ift_rxd_available); + MPASS(scctx->isc_txrx->ift_rxd_pkt_get); + MPASS(scctx->isc_txrx->ift_rxd_refill); + MPASS(scctx->isc_txrx->ift_rxd_flush); +} static int iflib_register(if_ctx_t ctx) @@ -4003,10 +4053,6 @@ iflib_register(if_ctx_t ctx) if_setqflushfn(ifp, iflib_if_qflush); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); - /* XXX - move this in to the driver for non-default settings */ - if_setcapabilities(ifp, DEFAULT_CAPS); - if_setcapenable(ifp, DEFAULT_CAPS); - ctx->ifc_vlan_attach_event = EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx, EVENTHANDLER_PRI_FIRST); @@ -4507,6 +4553,13 @@ iflib_legacy_setup(if_ctx_t ctx, driver_ void *q; int err; + /* + * group taskqueues aren't properly set up until SMP is started + * so we disable interrupts until we can handle them post + * SI_SUB_SMP + */ + IFDI_INTR_DISABLE(ctx); + q = &ctx->ifc_rxqs[0]; info = &rxq[0].ifr_filter_info; gtask = &rxq[0].ifr_task; @@ -4527,9 +4580,6 @@ iflib_legacy_setup(if_ctx_t ctx, driver_ GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq); taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, tqrid, "tx"); - GROUPTASK_INIT(&ctx->ifc_admin_task, 0, _task_fn_admin, ctx); - taskqgroup_attach(qgroup_if_config_tqg, &ctx->ifc_admin_task, ctx, -1, "admin/link"); - return (0); } @@ -4558,6 +4608,12 @@ iflib_rx_intr_deferred(if_ctx_t ctx, int void iflib_admin_intr_deferred(if_ctx_t ctx) { +#ifdef INVARIANTS + struct grouptask *gtask; + + gtask = &ctx->ifc_admin_task; + MPASS(gtask->gt_taskqueue != NULL); +#endif GROUPTASK_ENQUEUE(&ctx->ifc_admin_task); } @@ -4598,7 +4654,6 @@ iflib_link_state_change(if_ctx_t ctx, in if_t ifp = ctx->ifc_ifp; iflib_txq_t txq = ctx->ifc_txqs; - if_setbaudrate(ifp, baudrate); /* If link down, disable watchdog */ @@ -4614,6 +4669,9 @@ static int iflib_tx_credits_update(if_ctx_t ctx, iflib_txq_t txq) { int credits; +#ifdef INVARIANTS + int credits_pre = txq->ift_cidx_processed; +#endif if (ctx->isc_txd_credits_update == NULL) return (0); @@ -4624,6 +4682,7 @@ iflib_tx_credits_update(if_ctx_t ctx, if txq->ift_processed += credits; txq->ift_cidx_processed += credits; + MPASS(credits_pre + credits == txq->ift_cidx_processed); if (txq->ift_cidx_processed >= txq->ift_size) txq->ift_cidx_processed -= txq->ift_size; return (credits); @@ -4671,6 +4730,8 @@ iflib_msix_init(if_ctx_t ctx) iflib_num_tx_queues = scctx->isc_ntxqsets; iflib_num_rx_queues = scctx->isc_nrxqsets; + device_printf(dev, "msix_init qsets capped at %d\n", iflib_num_tx_queues); + bar = ctx->ifc_softc_ctx.isc_msix_bar; admincnt = sctx->isc_admin_intrcnt; /* Override by tuneable */ Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sun Jan 1 22:49:15 2017 (r311038) +++ head/sys/net/iflib.h Mon Jan 2 00:56:33 2017 (r311039) @@ -184,6 +184,8 @@ typedef struct if_softc_ctx { int isc_tx_tso_segments_max; int isc_tx_tso_size_max; int isc_tx_tso_segsize_max; + int isc_tx_csum_flags; + int isc_capenable; int isc_rss_table_size; int isc_rss_table_mask; int isc_nrxqsets_max; @@ -192,6 +194,7 @@ typedef struct if_softc_ctx { iflib_intr_mode_t isc_intr; uint16_t isc_max_frame_size; /* set at init time by driver */ pci_vendor_info_t isc_vendor_info; /* set by iflib prior to attach_pre */ + if_txrx_t isc_txrx; } *if_softc_ctx_t; /* @@ -199,7 +202,6 @@ typedef struct if_softc_ctx { */ struct if_shared_ctx { int isc_magic; - if_txrx_t isc_txrx; driver_t *isc_driver; int isc_nfl; int isc_flags; @@ -256,20 +258,28 @@ typedef enum { /* * Interface has a separate command queue for RX */ -#define IFLIB_HAS_RXCQ 0x1 +#define IFLIB_HAS_RXCQ 0x01 /* * Driver has already allocated vectors */ -#define IFLIB_SKIP_MSIX 0x2 - +#define IFLIB_SKIP_MSIX 0x02 /* * Interface is a virtual function */ -#define IFLIB_IS_VF 0x4 +#define IFLIB_IS_VF 0x04 /* * Interface has a separate command queue for TX */ -#define IFLIB_HAS_TXCQ 0x8 +#define IFLIB_HAS_TXCQ 0x08 +/* + * Interface does checksum in place + */ +#define IFLIB_NEED_SCRATCH 0x10 +/* + * Interface doesn't expect in_pseudo for th_sum + */ +#define IFLIB_TSO_INIT_IP 0x20 + /* From owner-svn-src-head@freebsd.org Mon Jan 2 01:23:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33606C9A5C9; Mon, 2 Jan 2017 01:23:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E1CB1F57; Mon, 2 Jan 2017 01:23:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v021NLeT005393; Mon, 2 Jan 2017 01:23:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v021NLqu005392; Mon, 2 Jan 2017 01:23:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701020123.v021NLqu005392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 2 Jan 2017 01:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311040 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 01:23:22 -0000 Author: markj Date: Mon Jan 2 01:23:21 2017 New Revision: 311040 URL: https://svnweb.freebsd.org/changeset/base/311040 Log: Factor out instances of a knote detach followed by a knote_drop() call. Reviewed by: kib (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9015 Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Mon Jan 2 00:56:33 2017 (r311039) +++ head/sys/kern/kern_event.c Mon Jan 2 01:23:21 2017 (r311040) @@ -136,6 +136,7 @@ static struct fileops kqueueops = { static int knote_attach(struct knote *kn, struct kqueue *kq); static void knote_drop(struct knote *kn, struct thread *td); +static void knote_drop_detached(struct knote *kn, struct thread *td); static void knote_enqueue(struct knote *kn); static void knote_dequeue(struct knote *kn); static void knote_init(void); @@ -1343,7 +1344,7 @@ findkn: } if ((error = kn->kn_fop->f_attach(kn)) != 0) { - knote_drop(kn, td); + knote_drop_detached(kn, td); goto done; } knl = kn_list_lock(kn); @@ -1359,8 +1360,6 @@ findkn: if (kev->flags & EV_DELETE) { kn_enter_flux(kn); KQ_UNLOCK(kq); - if (!(kn->kn_status & KN_DETACHED)) - kn->kn_fop->f_detach(kn); knote_drop(kn, td); goto done; } @@ -1684,8 +1683,6 @@ retry: * We don't need to lock the list since we've * marked it as in flux. */ - if (!(kn->kn_status & KN_DETACHED)) - kn->kn_fop->f_detach(kn); knote_drop(kn, td); KQ_LOCK(kq); continue; @@ -1699,8 +1696,6 @@ retry: * marked the knote as being in flux. */ *kevp = kn->kn_kevent; - if (!(kn->kn_status & KN_DETACHED)) - kn->kn_fop->f_detach(kn); knote_drop(kn, td); KQ_LOCK(kq); kn = NULL; @@ -1902,8 +1897,6 @@ kqueue_drain(struct kqueue *kq, struct t } kn_enter_flux(kn); KQ_UNLOCK(kq); - if (!(kn->kn_status & KN_DETACHED)) - kn->kn_fop->f_detach(kn); knote_drop(kn, td); KQ_LOCK(kq); } @@ -1919,8 +1912,6 @@ kqueue_drain(struct kqueue *kq, struct t } kn_enter_flux(kn); KQ_UNLOCK(kq); - if (!(kn->kn_status & KN_DETACHED)) - kn->kn_fop->f_detach(kn); knote_drop(kn, td); KQ_LOCK(kq); } @@ -2323,10 +2314,9 @@ again: /* need to reacquire lock since } knlist_remove_kq(knl, kn, 1, 1); if (killkn) { - kn->kn_status |= KN_DETACHED; kn_enter_flux(kn); KQ_UNLOCK(kq); - knote_drop(kn, td); + knote_drop_detached(kn, td); } else { /* Make sure cleared knotes disappear soon */ kn->kn_flags |= EV_EOF | EV_ONESHOT; @@ -2392,10 +2382,8 @@ again: } kn_enter_flux(kn); KQ_UNLOCK(kq); - if (!(kn->kn_status & KN_DETACHED)) - kn->kn_fop->f_detach(kn); - knote_drop(kn, td); influx = 1; + knote_drop(kn, td); KQ_LOCK(kq); } KQ_UNLOCK_FLUX(kq); @@ -2423,20 +2411,27 @@ knote_attach(struct knote *kn, struct kq return (0); } -/* - * knote must already have been detached using the f_detach method. - * no lock need to be held, it is assumed that the influx state is set - * to prevent other removal. - */ static void knote_drop(struct knote *kn, struct thread *td) { + + if ((kn->kn_status & KN_DETACHED) == 0) + kn->kn_fop->f_detach(kn); + knote_drop_detached(kn, td); +} + +static void +knote_drop_detached(struct knote *kn, struct thread *td) +{ struct kqueue *kq; struct klist *list; kq = kn->kn_kq; + KASSERT((kn->kn_status & KN_DETACHED) != 0, + ("knote %p still attached", kn)); KQ_NOTOWNED(kq); + KQ_LOCK(kq); KASSERT(kn->kn_influx == 1, ("knote_drop called on %p with influx %d", kn, kn->kn_influx)); From owner-svn-src-head@freebsd.org Mon Jan 2 03:24:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8C63C9A24D; Mon, 2 Jan 2017 03:24:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A29FC1092; Mon, 2 Jan 2017 03:24:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id b1so29198435pgc.1; Sun, 01 Jan 2017 19:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=j4F7d/E5IELdKBZaGqcBcYVoMTaQC8A8WRZ8jVuK+tY=; b=Orfc7in5mb4indIjlnIph16BYnF3OLiVDn70bGlhYjLeolkhpyeWiTaW+vE3NAQnwz gCT+YAG1FXlN+RF6VqjV5jmB+BY8edXQLUAQX38PRwZkFi1CjlLCDNhUGgSF0t1qYTfG OoiQnHFfwstFOi1/mhEcUotvf7ZLLbiJLr3gYTBuS4G/tYVE3449jCUlmYaX/uGIDTMx FXGcb378Llmw9jDqvFEtpqplZLQsljSjx9dlLXAlIoUswKS1+VH7d2CFfsPFtVig+XMb 8Myl3NkjtOtedjHYGkxdp0enHns015yoC4gDsBO/9xxOgk+lOUoKM9q5ZuA75QTdMLYT UMmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=j4F7d/E5IELdKBZaGqcBcYVoMTaQC8A8WRZ8jVuK+tY=; b=iW4hu2hwko1mBeJxZoGh1KTw7Pp98cTXFMKYBZST3P29ZYP4J1f482e7mBYXcDWpiy G8QUcQYPyy1DBop8E/wwaBSxnrPyAZwlHBYwkdUEEBEhAAm8XGZrP0MLvWBa9PSdP+Vd hG4V8qEzhzZyPzka+OLG7YloDVF7gCnCpvb15IjQUXeLw2IQBWM2ogqK2705ECH0DR6J mYmmuuREDOSP+iMcmoP2KtlMCw9GoH1wZ//J0VPRp83+uNIs9OzqlqjvA459HsBbpPzL 696ge50tMkGIPYFarL7VJxXyCJj/z5wGYTK/g/CiKW6rXCjxvwYM2iDVRKO1J5irAzgr /+3g== X-Gm-Message-State: AIkVDXLpK6IwyJrw54BGdNtq3B9WzJHKCkU+qKZ6rf6bGc6v7cdYJWhSdWEV3Y9pDGoLuA== X-Received: by 10.98.79.75 with SMTP id d72mr51152876pfb.1.1483327494947; Sun, 01 Jan 2017 19:24:54 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t3sm85022300pfb.60.2017.01.01.19.24.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 01 Jan 2017 19:24:54 -0800 (PST) Subject: Re: svn commit: r311039 - in head/sys: dev/bnxt kern net Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7B43571F-28E0-4391-9A78-C0C092B70DAE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701020056.v020uXpN093430@repo.freebsd.org> Date: Sun, 1 Jan 2017 19:24:53 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <5CC01F56-FCCC-420F-AC14-F878776EF7CD@gmail.com> References: <201701020056.v020uXpN093430@repo.freebsd.org> To: Sean Bruno X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 03:24:56 -0000 --Apple-Mail=_7B43571F-28E0-4391-9A78-C0C092B70DAE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 1, 2017, at 16:56, Sean Bruno wrote: =E2=80=A6 > mFC after: =E2=80=9C=E2=80=A6 after:"? --Apple-Mail=_7B43571F-28E0-4391-9A78-C0C092B70DAE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYacgGAAoJEPWDqSZpMIYVC3gP/ixHIf3hCLs4rOh02BhsrnOh erR1P7T3PEe1ZWKvXSRvQ3gDmMTFS43Kg5yH0SLcolsfv5RxuKpDt3uCu/nfgpNs Ln+uU6DywsXvljbrIxWb3T1M1b+Lc6bHCu0SWOnc0PpDnCvFgpBu+SomBufLiog/ 1jJcm8q8UDKAboweIKEMztUr77j9aYLt8atrrWS8/yxjtFLKaMzAfV31Kb2+/95C 1WsbMV8Bl4zusvj5KQuMRwxPAdIykNJwwaiVq5LZ+fsKK9jUC6RHP2WyyN0gKUOl wLB05s1DDmknV+zICrIv9+GG1hMJ5D4V3pNbsbUipxj1o9EStoiu3+Ji8flKNsMv RtGerGr0MSU8lIhiNVzsWepKPMxQrBlbGM/RZb8C0txILBM9ojALL622qF9bghIp AGJUvQisqqlcMVQqc/LLKYT1R7idl0vK7gVbxsDlRoWIfw9tE9S7KOwlPAlrpJQv ofHTy/HXAGA24xYhbDSMDOtpuiWSQPnYbsKTk3momeJXa1pq7zbojAQ3gcxrimnE gMi5oX2glf02fN76rxt7Ofs44Y2+qcZfyQ4Cq3Uc3NN6VyrZ6yRx0Kl6RNb2TtBc CQ5nfnyAShN1ghowjcCTIWmweBCztfCuiVma4tcRC/6MJbIxuAOrqpBG8t9r8aug DVOGJxLY7ZBZRmekPnOC =D+LA -----END PGP SIGNATURE----- --Apple-Mail=_7B43571F-28E0-4391-9A78-C0C092B70DAE-- From owner-svn-src-head@freebsd.org Mon Jan 2 06:36:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B395C9BA7A; Mon, 2 Jan 2017 06:36:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06D731516; Mon, 2 Jan 2017 06:36:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v026aCaK030270; Mon, 2 Jan 2017 06:36:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v026aC1V030269; Mon, 2 Jan 2017 06:36:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701020636.v026aC1V030269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 2 Jan 2017 06:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311045 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 06:36:13 -0000 Author: adrian Date: Mon Jan 2 06:36:12 2017 New Revision: 311045 URL: https://svnweb.freebsd.org/changeset/base/311045 Log: [netmap] call RLOCK /and/ RUNLOCK. Reported by: olivier Modified: head/sys/dev/netmap/netmap_freebsd.c Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Mon Jan 2 03:18:54 2017 (r311044) +++ head/sys/dev/netmap/netmap_freebsd.c Mon Jan 2 06:36:12 2017 (r311045) @@ -98,7 +98,7 @@ nm_os_ifnet_lock(void) void nm_os_ifnet_unlock(void) { - IFNET_WUNLOCK(); + IFNET_RUNLOCK(); } static int netmap_use_count = 0; From owner-svn-src-head@freebsd.org Mon Jan 2 07:45:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02C46C9B907; Mon, 2 Jan 2017 07:45:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wj0-f171.google.com (mail-wj0-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79BD41E75; Mon, 2 Jan 2017 07:45:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wj0-f171.google.com with SMTP id sd9so234669724wjb.1; Sun, 01 Jan 2017 23:45:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=UD5Fu1QRMqyDmcjkB5UN5lVqAJ7IkZi80/vQXzkcp1o=; b=qGe54QoFVTe+26lhEjeSAWscJvQDC3PdCyqVZ9SmHRM4E4aModBNQUBmrVa7EmZDTW 41XqF67Ll1Q3hKto0eRQGun//VmcbKe4mPIz9aoLtNBM503S3m+3U+8Z5Sum7nK7egCw CT2AcYnDX+URWfhPyQSDz25cnQi9t/bLVJF5pvkt/RgBcsx3gTLOvam7VyyI044KYM4z 6kkxyez9c7XPeJbfDJ4qB3KSilJHkRZG9Fer4wGnhmSPUIEXXkYFSIvA4CzSPU/NxaS+ kd9KWknPmr2gng0nsFyI7/aeZclIlOBerF906rotfOlSthuwgQdxI7kJRgJfz4/AfaE/ 40Iw== X-Gm-Message-State: AIkVDXKIOFJt0Zg20UsUjJ7Q7yjSuphdwcaiz1EOoJS6hYLbovGSfBggKCDWzfwBg3XkTA== X-Received: by 10.195.14.66 with SMTP id fe2mr308529wjd.25.1483294653649; Sun, 01 Jan 2017 10:17:33 -0800 (PST) Received: from mail-wj0-f173.google.com (mail-wj0-f173.google.com. [209.85.210.173]) by smtp.gmail.com with ESMTPSA id bf2sm83590867wjc.48.2017.01.01.10.17.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jan 2017 10:17:33 -0800 (PST) Received: by mail-wj0-f173.google.com with SMTP id v7so412306894wjy.2; Sun, 01 Jan 2017 10:17:33 -0800 (PST) X-Received: by 10.194.94.132 with SMTP id dc4mr45910935wjb.231.1483294653278; Sun, 01 Jan 2017 10:17:33 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Sun, 1 Jan 2017 10:17:32 -0800 (PST) In-Reply-To: <201701011716.v01HGmM2095585@repo.freebsd.org> References: <201701011716.v01HGmM2095585@repo.freebsd.org> From: Conrad Meyer Date: Sun, 1 Jan 2017 10:17:32 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r311012 - head/include To: "Pedro F. Giffuni" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 07:45:01 -0000 Hey Pedro, Why not just remove __nonnull and replace it with _Nonnull in the same commit? Best, Conrad On Sun, Jan 1, 2017 at 9:16 AM, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Jan 1 17:16:47 2017 > New Revision: 311012 > URL: https://svnweb.freebsd.org/changeset/base/311012 > > Log: > Remove some uses of the GCC __nonnull() attribute. > > While the checks are considered useful, the attribute does dangerous > optimizations, removing NULL checks where they can be needed. Remove the > uses of this attribute introduced in r281130: the changes were inspired on > Google's bionic where this attribute is not used anymore. > > The __nonnull() attribute will be deprecrated from our headers and > replaced with the Clang _Nonnull qualifier in the future. > > MFC after: 3 days > > Modified: > head/include/pthread.h > head/include/signal.h > head/include/stdlib.h > > Modified: head/include/pthread.h > ============================================================================== > --- head/include/pthread.h Sun Jan 1 12:35:41 2017 (r311011) > +++ head/include/pthread.h Sun Jan 1 17:16:47 2017 (r311012) > @@ -147,25 +147,19 @@ struct _pthread_cleanup_info { > */ > __BEGIN_DECLS > int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); > -int pthread_attr_destroy(pthread_attr_t *) __nonnull(1); > +int pthread_attr_destroy(pthread_attr_t *); > int pthread_attr_getstack(const pthread_attr_t * __restrict, > - void ** __restrict, size_t * __restrict) > - __nonnull_all; > -int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) > - __nonnull_all; > + void ** __restrict, size_t * __restrict); > +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); > int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); > int pthread_attr_getstackaddr(const pthread_attr_t *, void **); > -int pthread_attr_getdetachstate(const pthread_attr_t *, int *) > - __nonnull_all; > -int pthread_attr_init(pthread_attr_t *) __nonnull(1); > -int pthread_attr_setstacksize(pthread_attr_t *, size_t) > - __nonnull(1); > -int pthread_attr_setguardsize(pthread_attr_t *, size_t) > - __nonnull(1); > -int pthread_attr_setstack(pthread_attr_t *, void *, size_t) > - __nonnull(1); > +int pthread_attr_getdetachstate(const pthread_attr_t *, int *); > +int pthread_attr_init(pthread_attr_t *); > +int pthread_attr_setstacksize(pthread_attr_t *, size_t); > +int pthread_attr_setguardsize(pthread_attr_t *, size_t); > +int pthread_attr_setstack(pthread_attr_t *, void *, size_t); > int pthread_attr_setstackaddr(pthread_attr_t *, void *); > -int pthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1); > +int pthread_attr_setdetachstate(pthread_attr_t *, int); > int pthread_barrier_destroy(pthread_barrier_t *); > int pthread_barrier_init(pthread_barrier_t *, > const pthread_barrierattr_t *, unsigned); > @@ -173,7 +167,7 @@ int pthread_barrier_wait(pthread_barrie > int pthread_barrierattr_destroy(pthread_barrierattr_t *); > int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, > int *); > -int pthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1); > +int pthread_barrierattr_init(pthread_barrierattr_t *); > int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); > > #define pthread_cleanup_push(cleanup_routine, cleanup_arg) \ > @@ -189,111 +183,100 @@ int pthread_barrierattr_setpshared(pthr > __pthread_cleanup_pop_imp(execute); \ > } > > -int pthread_condattr_destroy(pthread_condattr_t *) __nonnull(1); > +int pthread_condattr_destroy(pthread_condattr_t *); > int pthread_condattr_getclock(const pthread_condattr_t *, > - clockid_t *) __nonnull_all; > -int pthread_condattr_getpshared(const pthread_condattr_t *, int *) > - __nonnull_all; > -int pthread_condattr_init(pthread_condattr_t *) __nonnull(1); > -int pthread_condattr_setclock(pthread_condattr_t *, clockid_t) > - __nonnull(1); > -int pthread_condattr_setpshared(pthread_condattr_t *, int) > - __nonnull(1); > -int pthread_cond_broadcast(pthread_cond_t *) > - __nonnull(1); > -int pthread_cond_destroy(pthread_cond_t *) > - __nonnull(1); > + clockid_t *); > +int pthread_condattr_getpshared(const pthread_condattr_t *, int *); > +int pthread_condattr_init(pthread_condattr_t *); > +int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); > +int pthread_condattr_setpshared(pthread_condattr_t *, int); > +int pthread_cond_broadcast(pthread_cond_t *); > +int pthread_cond_destroy(pthread_cond_t *); > int pthread_cond_init(pthread_cond_t *, > - const pthread_condattr_t *) __nonnull(1); > -int pthread_cond_signal(pthread_cond_t *) __nonnull(1); > + const pthread_condattr_t *); > +int pthread_cond_signal(pthread_cond_t *); > int pthread_cond_timedwait(pthread_cond_t *, > pthread_mutex_t *__mutex, const struct timespec *) > - __nonnull_all __requires_exclusive(*__mutex); > + __requires_exclusive(*__mutex); > int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex) > - __nonnull_all __requires_exclusive(*__mutex); > + __requires_exclusive(*__mutex); > int pthread_create(pthread_t *, const pthread_attr_t *, > - void *(*) (void *), void *) __nonnull(1) __nonnull(3); > + void *(*) (void *), void *); > int pthread_detach(pthread_t); > int pthread_equal(pthread_t, pthread_t); > void pthread_exit(void *) __dead2; > void *pthread_getspecific(pthread_key_t); > -int pthread_getcpuclockid(pthread_t, clockid_t *) __nonnull(2); > +int pthread_getcpuclockid(pthread_t, clockid_t *); > int pthread_join(pthread_t, void **); > int pthread_key_create(pthread_key_t *, > - void (*) (void *)) __nonnull(1); > + void (*) (void *)); > int pthread_key_delete(pthread_key_t); > -int pthread_mutexattr_init(pthread_mutexattr_t *) __nonnull(1); > -int pthread_mutexattr_destroy(pthread_mutexattr_t *) __nonnull(1); > +int pthread_mutexattr_init(pthread_mutexattr_t *); > +int pthread_mutexattr_destroy(pthread_mutexattr_t *); > int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, > - int *) __nonnull_all; > -int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *) > - __nonnull_all; > -int pthread_mutexattr_settype(pthread_mutexattr_t *, int) > - __nonnull(1); > -int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) > - __nonnull(1); > + int *); > +int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *); > +int pthread_mutexattr_settype(pthread_mutexattr_t *, int); > +int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); > int pthread_mutex_consistent(pthread_mutex_t *__mutex) > __nonnull(1) __requires_exclusive(*__mutex); > int pthread_mutex_destroy(pthread_mutex_t *__mutex) > - __nonnull(1) __requires_unlocked(*__mutex); > + __requires_unlocked(*__mutex); > int pthread_mutex_init(pthread_mutex_t *__mutex, > const pthread_mutexattr_t *) > - __nonnull(1) __requires_unlocked(*__mutex); > + __requires_unlocked(*__mutex); > int pthread_mutex_lock(pthread_mutex_t *__mutex) > - __nonnull(1) __locks_exclusive(*__mutex); > + __locks_exclusive(*__mutex); > int pthread_mutex_trylock(pthread_mutex_t *__mutex) > - __nonnull(1) __trylocks_exclusive(0, *__mutex); > + __trylocks_exclusive(0, *__mutex); > int pthread_mutex_timedlock(pthread_mutex_t *__mutex, > const struct timespec *) > - __nonnull_all __trylocks_exclusive(0, *__mutex); > + __trylocks_exclusive(0, *__mutex); > int pthread_mutex_unlock(pthread_mutex_t *__mutex) > - __nonnull(1) __unlocks(*__mutex); > -int pthread_once(pthread_once_t *, void (*) (void)) __nonnull_all; > + __unlocks(*__mutex); > +int pthread_once(pthread_once_t *, void (*) (void)); > int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) > - __nonnull(1) __requires_unlocked(*__rwlock); > + __requires_unlocked(*__rwlock); > int pthread_rwlock_init(pthread_rwlock_t *__rwlock, > const pthread_rwlockattr_t *) > - __nonnull(1) __requires_unlocked(*__rwlock); > + __requires_unlocked(*__rwlock); > int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) > - __nonnull(1) __locks_shared(*__rwlock); > + __locks_shared(*__rwlock); > int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock, > const struct timespec *) > - __nonnull_all __trylocks_shared(0, *__rwlock); > + __trylocks_shared(0, *__rwlock); > int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock, > const struct timespec *) > - __nonnull_all __trylocks_exclusive(0, *__rwlock); > + __trylocks_exclusive(0, *__rwlock); > int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) > - __nonnull(1) __trylocks_shared(0, *__rwlock); > + __trylocks_shared(0, *__rwlock); > int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) > - __nonnull(1) __trylocks_exclusive(0, *__rwlock); > + __trylocks_exclusive(0, *__rwlock); > int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) > - __nonnull(1) __unlocks(*__rwlock); > + __unlocks(*__rwlock); > int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) > - __nonnull(1) __locks_exclusive(*__rwlock); > -int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) > - __nonnull(1); > + __locks_exclusive(*__rwlock); > +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); > int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *, > int *); > int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, > - int *) __nonnull_all; > -int pthread_rwlockattr_init(pthread_rwlockattr_t *) > - __nonnull(1); > + int *); > +int pthread_rwlockattr_init(pthread_rwlockattr_t *); > int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int); > -int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) > - __nonnull(1); > +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); > pthread_t pthread_self(void); > int pthread_setspecific(pthread_key_t, const void *); > > int pthread_spin_init(pthread_spinlock_t *__spin, int) > - __requires_unlocked(*__spin); > + __requires_unlocked(*__spin); > int pthread_spin_destroy(pthread_spinlock_t *__spin) > - __requires_unlocked(*__spin); > + __requires_unlocked(*__spin); > int pthread_spin_lock(pthread_spinlock_t *__spin) > - __locks_exclusive(*__spin); > + __locks_exclusive(*__spin); > int pthread_spin_trylock(pthread_spinlock_t *__spin) > - __trylocks_exclusive(0, *__spin); > + __trylocks_exclusive(0, *__spin); > int pthread_spin_unlock(pthread_spinlock_t *__spin) > - __unlocks(*__spin); > + __unlocks(*__spin); > int pthread_cancel(pthread_t); > int pthread_setcancelstate(int, int *); > int pthread_setcanceltype(int, int *); > @@ -322,20 +305,18 @@ int pthread_mutexattr_setrobust(pthread > > int pthread_attr_getinheritsched(const pthread_attr_t *, int *); > int pthread_attr_getschedparam(const pthread_attr_t *, > - struct sched_param *) __nonnull_all; > -int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) > - __nonnull_all; > -int pthread_attr_getscope(const pthread_attr_t *, int *) > - __nonnull_all; > + struct sched_param *); > +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); > +int pthread_attr_getscope(const pthread_attr_t *, int *); > int pthread_attr_setinheritsched(pthread_attr_t *, int); > int pthread_attr_setschedparam(pthread_attr_t *, > - const struct sched_param *) __nonnull(1) __nonnull(2); > -int pthread_attr_setschedpolicy(pthread_attr_t *, int) __nonnull(1); > -int pthread_attr_setscope(pthread_attr_t *, int) __nonnull(1); > + const struct sched_param *); > +int pthread_attr_setschedpolicy(pthread_attr_t *, int); > +int pthread_attr_setscope(pthread_attr_t *, int); > int pthread_getschedparam(pthread_t pthread, int *, > - struct sched_param *) __nonnull(2) __nonnull(3); > + struct sched_param *); > int pthread_setschedparam(pthread_t, int, > - const struct sched_param *) __nonnull(3); > + const struct sched_param *); > #if __XSI_VISIBLE > int pthread_getconcurrency(void); > int pthread_setconcurrency(int); > > Modified: head/include/signal.h > ============================================================================== > --- head/include/signal.h Sun Jan 1 12:35:41 2017 (r311011) > +++ head/include/signal.h Sun Jan 1 17:16:47 2017 (r311012) > @@ -82,10 +82,10 @@ int sigdelset(sigset_t *, int); > int sigemptyset(sigset_t *); > int sigfillset(sigset_t *); > int sigismember(const sigset_t *, int); > -int sigpending(sigset_t *) __nonnull(1); > +int sigpending(sigset_t *); > int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); > -int sigsuspend(const sigset_t *) __nonnull(1); > -int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull_all; > +int sigsuspend(const sigset_t *); > +int sigwait(const sigset_t * __restrict, int * __restrict); > #endif > > #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 > > Modified: head/include/stdlib.h > ============================================================================== > --- head/include/stdlib.h Sun Jan 1 12:35:41 2017 (r311011) > +++ head/include/stdlib.h Sun Jan 1 17:16:47 2017 (r311012) > @@ -172,7 +172,7 @@ char *realpath(const char * __restrict, > int rand_r(unsigned *); /* (TSF) */ > #endif > #if __POSIX_VISIBLE >= 200112 > -int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ > +int posix_memalign(void **, size_t, size_t); /* (ADV) */ > int setenv(const char *, const char *, int); > int unsetenv(const char *); > #endif > From owner-svn-src-head@freebsd.org Mon Jan 2 09:02:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4FE3C9B72E; Mon, 2 Jan 2017 09:02:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85ED11D23; Mon, 2 Jan 2017 09:02:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0292d8M091158; Mon, 2 Jan 2017 09:02:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0292dsQ091157; Mon, 2 Jan 2017 09:02:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701020902.v0292dsQ091157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 2 Jan 2017 09:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311055 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 09:02:40 -0000 Author: kib Date: Mon Jan 2 09:02:39 2017 New Revision: 311055 URL: https://svnweb.freebsd.org/changeset/base/311055 Log: Remove unneeded externs keywords. Reindent long lines. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/sys/event.h Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Mon Jan 2 08:58:51 2017 (r311054) +++ head/sys/sys/event.h Mon Jan 2 09:02:39 2017 (r311055) @@ -259,30 +259,30 @@ struct knlist; struct mtx; struct rwlock; -extern void knote(struct knlist *list, long hint, int lockflags); -extern void knote_fork(struct knlist *list, int pid); -extern struct knlist *knlist_alloc(struct mtx *lock); -extern void knlist_detach(struct knlist *knl); -extern void knlist_add(struct knlist *knl, struct knote *kn, int islocked); -extern void knlist_remove(struct knlist *knl, struct knote *kn, int islocked); -extern int knlist_empty(struct knlist *knl); -extern void knlist_init(struct knlist *knl, void *lock, - void (*kl_lock)(void *), void (*kl_unlock)(void *), - void (*kl_assert_locked)(void *), void (*kl_assert_unlocked)(void *)); -extern void knlist_init_mtx(struct knlist *knl, struct mtx *lock); -extern void knlist_init_rw_reader(struct knlist *knl, struct rwlock *lock); -extern void knlist_destroy(struct knlist *knl); -extern void knlist_cleardel(struct knlist *knl, struct thread *td, - int islocked, int killkn); +void knote(struct knlist *list, long hint, int lockflags); +void knote_fork(struct knlist *list, int pid); +struct knlist *knlist_alloc(struct mtx *lock); +void knlist_detach(struct knlist *knl); +void knlist_add(struct knlist *knl, struct knote *kn, int islocked); +void knlist_remove(struct knlist *knl, struct knote *kn, int islocked); +int knlist_empty(struct knlist *knl); +void knlist_init(struct knlist *knl, void *lock, void (*kl_lock)(void *), + void (*kl_unlock)(void *), void (*kl_assert_locked)(void *), + void (*kl_assert_unlocked)(void *)); +void knlist_init_mtx(struct knlist *knl, struct mtx *lock); +void knlist_init_rw_reader(struct knlist *knl, struct rwlock *lock); +void knlist_destroy(struct knlist *knl); +void knlist_cleardel(struct knlist *knl, struct thread *td, + int islocked, int killkn); #define knlist_clear(knl, islocked) \ - knlist_cleardel((knl), NULL, (islocked), 0) + knlist_cleardel((knl), NULL, (islocked), 0) #define knlist_delete(knl, td, islocked) \ - knlist_cleardel((knl), (td), (islocked), 1) -extern void knote_fdclose(struct thread *p, int fd); -extern int kqfd_register(int fd, struct kevent *kev, struct thread *p, - int waitok); -extern int kqueue_add_filteropts(int filt, struct filterops *filtops); -extern int kqueue_del_filteropts(int filt); + knlist_cleardel((knl), (td), (islocked), 1) +void knote_fdclose(struct thread *p, int fd); +int kqfd_register(int fd, struct kevent *kev, struct thread *p, + int waitok); +int kqueue_add_filteropts(int filt, struct filterops *filtops); +int kqueue_del_filteropts(int filt); #else /* !_KERNEL */ From owner-svn-src-head@freebsd.org Mon Jan 2 14:53:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18D58C9CEE0 for ; Mon, 2 Jan 2017 14:53:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm26-vm4.bullet.mail.ne1.yahoo.com (nm26-vm4.bullet.mail.ne1.yahoo.com [98.138.91.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0B9A17A0 for ; Mon, 2 Jan 2017 14:53:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1483368480; bh=WVxZNMTl1XI0JzV2MN/9pdTT9qYqAYwfTtR/7UGHDMI=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=M4gzzqv3lDwe39zqZUeesYplXKBeyr+yv1HZU+GUiiAyumgkHoOaRI/cGhmgUt8ov5clUczjhd8IUBjPGDJOJiHuJ3IZxmbepUlbKNQbjh99Gextia0WPNGM5xzh4sYJ+msMP5NcZ/GPyP02wN0+2ek4qYpagB95worWyyjOSOOzwpI0l3uFOpkUSPD7aZ5HOstMShVyPP2nhRJ33GS0T3MnNggG6HAqcZX0b8yGZy3SfeFc8pYfZT4huK02c3HEi3hW85GDbJAqAoQ4216DKU3mUPRaHbnSaGReANR4yODJiHIyrEueoSzd1ScTQZtQI7BdNAr2V/V2D8OBzw7V6Q== Received: from [98.138.101.131] by nm26.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jan 2017 14:48:00 -0000 Received: from [98.138.104.114] by tm19.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jan 2017 14:48:00 -0000 Received: from [127.0.0.1] by smtp223.mail.ne1.yahoo.com with NNFMP; 02 Jan 2017 14:48:00 -0000 X-Yahoo-Newman-Id: 292285.26770.bm@smtp223.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: NBS5EWkVM1n3.LouPsW9kwLAJgdnuFVFBLHpyPI93eBRoNf sCB0enbMZUB76mDdMM0lJX7OBBK1EMr2OdYUxrpq1De1l1apqfcnOeH3HJ3M rGvGYPj8euj6Ee68WJWjdpeymS.Sc6b57yFzJ8Koy3fjmVPrmNfrOUENqCXY .rdMU7kJSIB7voGe2fH7Z98wANXmr7AEW8KPB_fhJFECDNQQYbLZIe7tNiBs t6IFx8bT1x.swuHNFtEQGTlT53agnbmIGELFoAQwW.AQs3d92KGDNwL9.a.z OAnJXWKDmMoxAhOt7NRw__Rv5UlLDtkxF1e_hh6iV91mGwbxdrXcqIiIRUq2 eGyDNUvLzCljLO.NhPoMUe9KBLwiT5AfBYxNscrR1ijgK7qc19lJkoLPXMNc uSzfMgcQYmZS0w4pZ42K1x8bWFyC6oJg.eigy5R8WlyWLgbtm_k9jemoShLk lLcYMiDgs.EykbMKtfB71oN8qi12.0smgN5RPEMpLPyZmtd3e.tWBvikBg20 1zfC0A.bnZHQEAeheWeVfSDaQ8bN8JX8S4bp7BwrIoCZCk1g- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r311012 - head/include To: cem@freebsd.org References: <201701011716.v01HGmM2095585@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: Date: Mon, 2 Jan 2017 09:49:40 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 14:53:59 -0000 Hi Conrad; On 01/01/17 13:17, Conrad Meyer wrote: > Hey Pedro, > > Why not just remove __nonnull and replace it with _Nonnull in the same commit? > > Best, > Conrad > The main reason is that I want to MFC this change. Introducing _Nonnull to -stable involves some complexity: It may break use of pre-existing GCC ports. Pedro. > On Sun, Jan 1, 2017 at 9:16 AM, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Sun Jan 1 17:16:47 2017 >> New Revision: 311012 >> URL: https://svnweb.freebsd.org/changeset/base/311012 >> >> Log: >> Remove some uses of the GCC __nonnull() attribute. >> >> While the checks are considered useful, the attribute does dangerous >> optimizations, removing NULL checks where they can be needed. Remove the >> uses of this attribute introduced in r281130: the changes were inspired on >> Google's bionic where this attribute is not used anymore. >> >> The __nonnull() attribute will be deprecrated from our headers and >> replaced with the Clang _Nonnull qualifier in the future. >> >> MFC after: 3 days >> >> Modified: >> head/include/pthread.h >> head/include/signal.h >> head/include/stdlib.h >> >> Modified: head/include/pthread.h >> ============================================================================== >> --- head/include/pthread.h Sun Jan 1 12:35:41 2017 (r311011) >> +++ head/include/pthread.h Sun Jan 1 17:16:47 2017 (r311012) >> @@ -147,25 +147,19 @@ struct _pthread_cleanup_info { >> */ >> __BEGIN_DECLS >> int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); >> -int pthread_attr_destroy(pthread_attr_t *) __nonnull(1); >> +int pthread_attr_destroy(pthread_attr_t *); >> int pthread_attr_getstack(const pthread_attr_t * __restrict, >> - void ** __restrict, size_t * __restrict) >> - __nonnull_all; >> -int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) >> - __nonnull_all; >> + void ** __restrict, size_t * __restrict); >> +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); >> int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); >> int pthread_attr_getstackaddr(const pthread_attr_t *, void **); >> -int pthread_attr_getdetachstate(const pthread_attr_t *, int *) >> - __nonnull_all; >> -int pthread_attr_init(pthread_attr_t *) __nonnull(1); >> -int pthread_attr_setstacksize(pthread_attr_t *, size_t) >> - __nonnull(1); >> -int pthread_attr_setguardsize(pthread_attr_t *, size_t) >> - __nonnull(1); >> -int pthread_attr_setstack(pthread_attr_t *, void *, size_t) >> - __nonnull(1); >> +int pthread_attr_getdetachstate(const pthread_attr_t *, int *); >> +int pthread_attr_init(pthread_attr_t *); >> +int pthread_attr_setstacksize(pthread_attr_t *, size_t); >> +int pthread_attr_setguardsize(pthread_attr_t *, size_t); >> +int pthread_attr_setstack(pthread_attr_t *, void *, size_t); >> int pthread_attr_setstackaddr(pthread_attr_t *, void *); >> -int pthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1); >> +int pthread_attr_setdetachstate(pthread_attr_t *, int); >> int pthread_barrier_destroy(pthread_barrier_t *); >> int pthread_barrier_init(pthread_barrier_t *, >> const pthread_barrierattr_t *, unsigned); >> @@ -173,7 +167,7 @@ int pthread_barrier_wait(pthread_barrie >> int pthread_barrierattr_destroy(pthread_barrierattr_t *); >> int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, >> int *); >> -int pthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1); >> +int pthread_barrierattr_init(pthread_barrierattr_t *); >> int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); >> >> #define pthread_cleanup_push(cleanup_routine, cleanup_arg) \ >> @@ -189,111 +183,100 @@ int pthread_barrierattr_setpshared(pthr >> __pthread_cleanup_pop_imp(execute); \ >> } >> >> -int pthread_condattr_destroy(pthread_condattr_t *) __nonnull(1); >> +int pthread_condattr_destroy(pthread_condattr_t *); >> int pthread_condattr_getclock(const pthread_condattr_t *, >> - clockid_t *) __nonnull_all; >> -int pthread_condattr_getpshared(const pthread_condattr_t *, int *) >> - __nonnull_all; >> -int pthread_condattr_init(pthread_condattr_t *) __nonnull(1); >> -int pthread_condattr_setclock(pthread_condattr_t *, clockid_t) >> - __nonnull(1); >> -int pthread_condattr_setpshared(pthread_condattr_t *, int) >> - __nonnull(1); >> -int pthread_cond_broadcast(pthread_cond_t *) >> - __nonnull(1); >> -int pthread_cond_destroy(pthread_cond_t *) >> - __nonnull(1); >> + clockid_t *); >> +int pthread_condattr_getpshared(const pthread_condattr_t *, int *); >> +int pthread_condattr_init(pthread_condattr_t *); >> +int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); >> +int pthread_condattr_setpshared(pthread_condattr_t *, int); >> +int pthread_cond_broadcast(pthread_cond_t *); >> +int pthread_cond_destroy(pthread_cond_t *); >> int pthread_cond_init(pthread_cond_t *, >> - const pthread_condattr_t *) __nonnull(1); >> -int pthread_cond_signal(pthread_cond_t *) __nonnull(1); >> + const pthread_condattr_t *); >> +int pthread_cond_signal(pthread_cond_t *); >> int pthread_cond_timedwait(pthread_cond_t *, >> pthread_mutex_t *__mutex, const struct timespec *) >> - __nonnull_all __requires_exclusive(*__mutex); >> + __requires_exclusive(*__mutex); >> int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex) >> - __nonnull_all __requires_exclusive(*__mutex); >> + __requires_exclusive(*__mutex); >> int pthread_create(pthread_t *, const pthread_attr_t *, >> - void *(*) (void *), void *) __nonnull(1) __nonnull(3); >> + void *(*) (void *), void *); >> int pthread_detach(pthread_t); >> int pthread_equal(pthread_t, pthread_t); >> void pthread_exit(void *) __dead2; >> void *pthread_getspecific(pthread_key_t); >> -int pthread_getcpuclockid(pthread_t, clockid_t *) __nonnull(2); >> +int pthread_getcpuclockid(pthread_t, clockid_t *); >> int pthread_join(pthread_t, void **); >> int pthread_key_create(pthread_key_t *, >> - void (*) (void *)) __nonnull(1); >> + void (*) (void *)); >> int pthread_key_delete(pthread_key_t); >> -int pthread_mutexattr_init(pthread_mutexattr_t *) __nonnull(1); >> -int pthread_mutexattr_destroy(pthread_mutexattr_t *) __nonnull(1); >> +int pthread_mutexattr_init(pthread_mutexattr_t *); >> +int pthread_mutexattr_destroy(pthread_mutexattr_t *); >> int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, >> - int *) __nonnull_all; >> -int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *) >> - __nonnull_all; >> -int pthread_mutexattr_settype(pthread_mutexattr_t *, int) >> - __nonnull(1); >> -int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) >> - __nonnull(1); >> + int *); >> +int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *); >> +int pthread_mutexattr_settype(pthread_mutexattr_t *, int); >> +int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); >> int pthread_mutex_consistent(pthread_mutex_t *__mutex) >> __nonnull(1) __requires_exclusive(*__mutex); >> int pthread_mutex_destroy(pthread_mutex_t *__mutex) >> - __nonnull(1) __requires_unlocked(*__mutex); >> + __requires_unlocked(*__mutex); >> int pthread_mutex_init(pthread_mutex_t *__mutex, >> const pthread_mutexattr_t *) >> - __nonnull(1) __requires_unlocked(*__mutex); >> + __requires_unlocked(*__mutex); >> int pthread_mutex_lock(pthread_mutex_t *__mutex) >> - __nonnull(1) __locks_exclusive(*__mutex); >> + __locks_exclusive(*__mutex); >> int pthread_mutex_trylock(pthread_mutex_t *__mutex) >> - __nonnull(1) __trylocks_exclusive(0, *__mutex); >> + __trylocks_exclusive(0, *__mutex); >> int pthread_mutex_timedlock(pthread_mutex_t *__mutex, >> const struct timespec *) >> - __nonnull_all __trylocks_exclusive(0, *__mutex); >> + __trylocks_exclusive(0, *__mutex); >> int pthread_mutex_unlock(pthread_mutex_t *__mutex) >> - __nonnull(1) __unlocks(*__mutex); >> -int pthread_once(pthread_once_t *, void (*) (void)) __nonnull_all; >> + __unlocks(*__mutex); >> +int pthread_once(pthread_once_t *, void (*) (void)); >> int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) >> - __nonnull(1) __requires_unlocked(*__rwlock); >> + __requires_unlocked(*__rwlock); >> int pthread_rwlock_init(pthread_rwlock_t *__rwlock, >> const pthread_rwlockattr_t *) >> - __nonnull(1) __requires_unlocked(*__rwlock); >> + __requires_unlocked(*__rwlock); >> int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) >> - __nonnull(1) __locks_shared(*__rwlock); >> + __locks_shared(*__rwlock); >> int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock, >> const struct timespec *) >> - __nonnull_all __trylocks_shared(0, *__rwlock); >> + __trylocks_shared(0, *__rwlock); >> int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock, >> const struct timespec *) >> - __nonnull_all __trylocks_exclusive(0, *__rwlock); >> + __trylocks_exclusive(0, *__rwlock); >> int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) >> - __nonnull(1) __trylocks_shared(0, *__rwlock); >> + __trylocks_shared(0, *__rwlock); >> int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) >> - __nonnull(1) __trylocks_exclusive(0, *__rwlock); >> + __trylocks_exclusive(0, *__rwlock); >> int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) >> - __nonnull(1) __unlocks(*__rwlock); >> + __unlocks(*__rwlock); >> int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) >> - __nonnull(1) __locks_exclusive(*__rwlock); >> -int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) >> - __nonnull(1); >> + __locks_exclusive(*__rwlock); >> +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); >> int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *, >> int *); >> int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, >> - int *) __nonnull_all; >> -int pthread_rwlockattr_init(pthread_rwlockattr_t *) >> - __nonnull(1); >> + int *); >> +int pthread_rwlockattr_init(pthread_rwlockattr_t *); >> int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int); >> -int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) >> - __nonnull(1); >> +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); >> pthread_t pthread_self(void); >> int pthread_setspecific(pthread_key_t, const void *); >> >> int pthread_spin_init(pthread_spinlock_t *__spin, int) >> - __requires_unlocked(*__spin); >> + __requires_unlocked(*__spin); >> int pthread_spin_destroy(pthread_spinlock_t *__spin) >> - __requires_unlocked(*__spin); >> + __requires_unlocked(*__spin); >> int pthread_spin_lock(pthread_spinlock_t *__spin) >> - __locks_exclusive(*__spin); >> + __locks_exclusive(*__spin); >> int pthread_spin_trylock(pthread_spinlock_t *__spin) >> - __trylocks_exclusive(0, *__spin); >> + __trylocks_exclusive(0, *__spin); >> int pthread_spin_unlock(pthread_spinlock_t *__spin) >> - __unlocks(*__spin); >> + __unlocks(*__spin); >> int pthread_cancel(pthread_t); >> int pthread_setcancelstate(int, int *); >> int pthread_setcanceltype(int, int *); >> @@ -322,20 +305,18 @@ int pthread_mutexattr_setrobust(pthread >> >> int pthread_attr_getinheritsched(const pthread_attr_t *, int *); >> int pthread_attr_getschedparam(const pthread_attr_t *, >> - struct sched_param *) __nonnull_all; >> -int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) >> - __nonnull_all; >> -int pthread_attr_getscope(const pthread_attr_t *, int *) >> - __nonnull_all; >> + struct sched_param *); >> +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); >> +int pthread_attr_getscope(const pthread_attr_t *, int *); >> int pthread_attr_setinheritsched(pthread_attr_t *, int); >> int pthread_attr_setschedparam(pthread_attr_t *, >> - const struct sched_param *) __nonnull(1) __nonnull(2); >> -int pthread_attr_setschedpolicy(pthread_attr_t *, int) __nonnull(1); >> -int pthread_attr_setscope(pthread_attr_t *, int) __nonnull(1); >> + const struct sched_param *); >> +int pthread_attr_setschedpolicy(pthread_attr_t *, int); >> +int pthread_attr_setscope(pthread_attr_t *, int); >> int pthread_getschedparam(pthread_t pthread, int *, >> - struct sched_param *) __nonnull(2) __nonnull(3); >> + struct sched_param *); >> int pthread_setschedparam(pthread_t, int, >> - const struct sched_param *) __nonnull(3); >> + const struct sched_param *); >> #if __XSI_VISIBLE >> int pthread_getconcurrency(void); >> int pthread_setconcurrency(int); >> >> Modified: head/include/signal.h >> ============================================================================== >> --- head/include/signal.h Sun Jan 1 12:35:41 2017 (r311011) >> +++ head/include/signal.h Sun Jan 1 17:16:47 2017 (r311012) >> @@ -82,10 +82,10 @@ int sigdelset(sigset_t *, int); >> int sigemptyset(sigset_t *); >> int sigfillset(sigset_t *); >> int sigismember(const sigset_t *, int); >> -int sigpending(sigset_t *) __nonnull(1); >> +int sigpending(sigset_t *); >> int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); >> -int sigsuspend(const sigset_t *) __nonnull(1); >> -int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull_all; >> +int sigsuspend(const sigset_t *); >> +int sigwait(const sigset_t * __restrict, int * __restrict); >> #endif >> >> #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 >> >> Modified: head/include/stdlib.h >> ============================================================================== >> --- head/include/stdlib.h Sun Jan 1 12:35:41 2017 (r311011) >> +++ head/include/stdlib.h Sun Jan 1 17:16:47 2017 (r311012) >> @@ -172,7 +172,7 @@ char *realpath(const char * __restrict, >> int rand_r(unsigned *); /* (TSF) */ >> #endif >> #if __POSIX_VISIBLE >= 200112 >> -int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ >> +int posix_memalign(void **, size_t, size_t); /* (ADV) */ >> int setenv(const char *, const char *, int); >> int unsetenv(const char *); >> #endif >> From owner-svn-src-head@freebsd.org Mon Jan 2 15:12:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0430C9B832; Mon, 2 Jan 2017 15:12:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DC461AB6; Mon, 2 Jan 2017 15:12:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02FCBlt047668; Mon, 2 Jan 2017 15:12:11 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02FCBr8047665; Mon, 2 Jan 2017 15:12:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701021512.v02FCBr8047665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 2 Jan 2017 15:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311101 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 15:12:13 -0000 Author: pfg Date: Mon Jan 2 15:12:11 2017 New Revision: 311101 URL: https://svnweb.freebsd.org/changeset/base/311101 Log: libkvm - extend a bit the swap statistics field. Change ksw_used and ksw_total to unsigned, which increases the maximum total swap that can be displayed properly from ~8TB to ~16TB. Obtained from: DragonflyBSD (ecc2e461) MFC after: 2 weeks Modified: head/lib/libkvm/kvm.h head/lib/libkvm/kvm_getswapinfo.3 head/lib/libkvm/kvm_getswapinfo.c Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Mon Jan 2 12:54:12 2017 (r311100) +++ head/lib/libkvm/kvm.h Mon Jan 2 15:12:11 2017 (r311101) @@ -66,11 +66,11 @@ struct proc; struct kvm_swap { char ksw_devname[32]; - int ksw_used; - int ksw_total; + u_int ksw_used; + u_int ksw_total; int ksw_flags; - int ksw_reserved1; - int ksw_reserved2; + u_int ksw_reserved1; + u_int ksw_reserved2; }; #define SWIF_DEV_PREFIX 0x0002 Modified: head/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- head/lib/libkvm/kvm_getswapinfo.3 Mon Jan 2 12:54:12 2017 (r311100) +++ head/lib/libkvm/kvm_getswapinfo.3 Mon Jan 2 15:12:11 2017 (r311101) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 1999 +.Dd January 2, 2017 .Dt KVM_SWAPINFO 3 .Os .Sh NAME @@ -78,9 +78,9 @@ This structure contains the following fi .It .Va char ksw_devname[] ; .It -.Va int ksw_total ; +.Va u_int ksw_total ; .It -.Va int ksw_used ; +.Va u_int ksw_used ; .It .Va int ksw_flags ; .El Modified: head/lib/libkvm/kvm_getswapinfo.c ============================================================================== --- head/lib/libkvm/kvm_getswapinfo.c Mon Jan 2 12:54:12 2017 (r311100) +++ head/lib/libkvm/kvm_getswapinfo.c Mon Jan 2 15:12:11 2017 (r311101) @@ -112,7 +112,8 @@ int kvm_getswapinfo_kvm(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) { - int i, ttl; + int i; + swblk_t ttl; TAILQ_HEAD(, swdevt) swtailq; struct swdevt *sp, swinfo; struct kvm_swap tot; @@ -163,7 +164,8 @@ int kvm_getswapinfo_sysctl(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) { - int ti, ttl; + int ti; + swblk_t ttl; size_t mibi, len; int soid[SWI_MAXMIB]; struct xswdev xsd; From owner-svn-src-head@freebsd.org Mon Jan 2 15:17:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F95DC9B98A; Mon, 2 Jan 2017 15:17:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F4C21DE3; Mon, 2 Jan 2017 15:17:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02FHXKJ048751; Mon, 2 Jan 2017 15:17:33 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02FHXOb048750; Mon, 2 Jan 2017 15:17:33 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701021517.v02FHXOb048750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 2 Jan 2017 15:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311102 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 15:17:34 -0000 Author: pfg Date: Mon Jan 2 15:17:33 2017 New Revision: 311102 URL: https://svnweb.freebsd.org/changeset/base/311102 Log: Cleanup inelegant calloc(3) introduced in r310984. Modified: head/lib/libc/net/getaddrinfo.c Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Mon Jan 2 15:12:11 2017 (r311101) +++ head/lib/libc/net/getaddrinfo.c Mon Jan 2 15:17:33 2017 (r311102) @@ -691,7 +691,7 @@ reorder(struct addrinfo *sentinel) return(n); /* allocate a temporary array for sort and initialization of it. */ - if ((aio = calloc(1, sizeof(*aio) * n)) == NULL) + if ((aio = calloc(n, sizeof(*aio))) == NULL) return(n); /* give up reordering */ /* retrieve address selection policy from the kernel */ From owner-svn-src-head@freebsd.org Mon Jan 2 15:19:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51147C9BA03; Mon, 2 Jan 2017 15:19:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11D2E1F83; Mon, 2 Jan 2017 15:19:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02FJM95048847; Mon, 2 Jan 2017 15:19:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02FJMaX048846; Mon, 2 Jan 2017 15:19:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701021519.v02FJMaX048846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 2 Jan 2017 15:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311103 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 15:19:23 -0000 Author: ian Date: Mon Jan 2 15:19:22 2017 New Revision: 311103 URL: https://svnweb.freebsd.org/changeset/base/311103 Log: Update ntp.conf to use the ntpd pool feature. Our previous ntp.conf file configured 3 servers from freebsd.pool.ntp.org using 3 separate 'server' config lines. That is now replaced with a single 'pool' line which causes ntpd to add multiple servers from the pool. More than just making the config smaller, the pool feature in ntpd has one major advantage over configuring 3 separate servers from a pool: if a server that was added using a 'pool' statement provides bad time (initially or at some later date), ntpd automatically discards it and configures a new different server from the pool without needing to be restarted. These changes also add a 'tos' line to control how many pool servers get added, a 'restrict source' line that is required to allow ntpd to add new peers from the pool, and it deletes a 'restrict 127.127.1.0' line that does nothing and should never have been there (127.127.1.0 is not a valid IP address, it's a refclock identifier). Differential Revision: https://reviews.freebsd.org/D9011 Modified: head/etc/ntp.conf Modified: head/etc/ntp.conf ============================================================================== --- head/etc/ntp.conf Mon Jan 2 15:17:33 2017 (r311102) +++ head/etc/ntp.conf Mon Jan 2 15:19:22 2017 (r311103) @@ -11,28 +11,43 @@ # # -# The following three servers will give you a random set of three -# NTP servers geographically close to you. -# See http://www.pool.ntp.org/ for details. Note, the pool encourages +# Set the target and limit for adding servers configured via pool statements +# or discovered dynamically via mechanisms such as broadcast and manycast. +# Ntpd automatically adds maxclock-1 servers from configured pools, and may +# add as many as maxclock*2 if necessary to ensure that at least minclock +# servers are providing good consistant time. +# +tos minclock 3 maxclock 6 + +# +# The following pool statement will give you a random set of NTP servers +# geographically close to you. A single pool statement adds multiple +# servers from the pool, according to the tos minclock/maxclock targets. +# See http://www.pool.ntp.org/ for details. Note, pool.ntp.org encourages # users with a static IP and good upstream NTP servers to add a server # to the pool. See http://www.pool.ntp.org/join.html if you are interested. # # The option `iburst' is used for faster initial synchronization. # -server 0.freebsd.pool.ntp.org iburst -server 1.freebsd.pool.ntp.org iburst -server 2.freebsd.pool.ntp.org iburst -#server 3.freebsd.pool.ntp.org iburst +pool 0.freebsd.pool.ntp.org iburst # # If you want to pick yourself which country's public NTP server -# you want sync against, comment out the above servers, uncomment -# the next ones and replace CC with the country's abbreviation. -# Make sure that the hostnames resolve to a proper IP address! -# -# server 0.CC.pool.ntp.org iburst -# server 1.CC.pool.ntp.org iburst -# server 2.CC.pool.ntp.org iburst +# you want to sync against, comment out the above pool, uncomment +# the next one, and replace CC with the country's abbreviation. +# Make sure that the hostname resolves to a proper IP address! +# +# pool 0.CC.pool.ntp.org iburst + +# +# To configure a specific server, such as an organization-wide local +# server, add lines similar to the following. One or more specific +# servers can be configured in addition to, or instead of, any server +# pools specified above. When both are configured, ntpd first adds all +# the specific servers, then adds servers from the pool until the tos +# minclock/maxclock targets are met. +# +#server time.my-internal.org iburst # # Security: @@ -40,11 +55,17 @@ server 2.freebsd.pool.ntp.org iburst # By default, only allow time queries and block all other requests # from unauthenticated clients. # +# The "restrict source" line allows peers to be mobilized when added by +# ntpd from a pool, but does not enable mobilizing a new peer association +# by other dynamic means (broadcast, manycast, ntpq commands, etc). +# # See http://support.ntp.org/bin/view/Support/AccessRestrictions # for more information. # -restrict default limited kod nomodify notrap nopeer noquery -restrict -6 default limited kod nomodify notrap nopeer noquery +restrict default limited kod nomodify notrap noquery nopeer +restrict -6 default limited kod nomodify notrap noquery nopeer +restrict source limited kod nomodify notrap noquery + # # Alternatively, the following rules would block all unauthorized access. # @@ -65,7 +86,6 @@ restrict -6 default limited kod nomodify # The following settings allow unrestricted access from the localhost restrict 127.0.0.1 restrict -6 ::1 -restrict 127.127.1.0 # # If a server loses sync with all upstream servers, NTP clients From owner-svn-src-head@freebsd.org Mon Jan 2 16:50:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27F6DC9CDD5; Mon, 2 Jan 2017 16:50:54 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE50017D2; Mon, 2 Jan 2017 16:50:53 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02GorK3089053; Mon, 2 Jan 2017 16:50:53 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02Goras089052; Mon, 2 Jan 2017 16:50:53 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701021650.v02Goras089052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 2 Jan 2017 16:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311104 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 16:50:54 -0000 Author: jhibbits Date: Mon Jan 2 16:50:52 2017 New Revision: 311104 URL: https://svnweb.freebsd.org/changeset/base/311104 Log: Print flags in hex instead of decimal. Hex is easier to grok for flags, and consistent with other prints. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Jan 2 15:19:22 2017 (r311103) +++ head/sys/vm/uma_core.c Mon Jan 2 16:50:52 2017 (r311104) @@ -1184,7 +1184,7 @@ page_free(void *mem, vm_size_t size, uin else if (flags & UMA_SLAB_KERNEL) vmem = kernel_arena; else - panic("UMA: page_free used with invalid flags %d", flags); + panic("UMA: page_free used with invalid flags %x", flags); kmem_free(vmem, (vm_offset_t)mem, size); } From owner-svn-src-head@freebsd.org Mon Jan 2 16:58:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D2ADC9B0DA; Mon, 2 Jan 2017 16:58:56 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ACD81ED8; Mon, 2 Jan 2017 16:58:56 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02Gwt5R090363; Mon, 2 Jan 2017 16:58:55 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02Gwtxc090362; Mon, 2 Jan 2017 16:58:55 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701021658.v02Gwtxc090362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 2 Jan 2017 16:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311105 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 16:58:56 -0000 Author: avos Date: Mon Jan 2 16:58:55 2017 New Revision: 311105 URL: https://svnweb.freebsd.org/changeset/base/311105 Log: rsu: restore 40Mhz channel support. MFC after: 4 days. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Jan 2 16:50:52 2017 (r311104) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Jan 2 16:58:55 2017 (r311105) @@ -775,7 +775,8 @@ rsu_getradiocaps(struct ieee80211com *ic if (sc->sc_ht) setbit(bands, IEEE80211_MODE_11NG); ieee80211_add_channel_list_2ghz(chans, maxchans, nchans, - rsu_chan_2ghz, nitems(rsu_chan_2ghz), bands, 0); + rsu_chan_2ghz, nitems(rsu_chan_2ghz), bands, + (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) != 0); } static void From owner-svn-src-head@freebsd.org Mon Jan 2 17:12:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA42AC9BAD8; Mon, 2 Jan 2017 17:12:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8332F1A81; Mon, 2 Jan 2017 17:12:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02HCEmP098722; Mon, 2 Jan 2017 17:12:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02HCEsx098719; Mon, 2 Jan 2017 17:12:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701021712.v02HCEsx098719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 2 Jan 2017 17:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311106 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 17:12:15 -0000 Author: pfg Date: Mon Jan 2 17:12:14 2017 New Revision: 311106 URL: https://svnweb.freebsd.org/changeset/base/311106 Log: patch(1): extend the maximum length of a line from USHRT_MAX to UINT_MAX. We can handle such "big data" without much trouble. Try to do a better job at detecting the rejection cause while here. MFC after: 2 weeks Modified: head/usr.bin/patch/patch.c head/usr.bin/patch/pch.c head/usr.bin/patch/pch.h Modified: head/usr.bin/patch/patch.c ============================================================================== --- head/usr.bin/patch/patch.c Mon Jan 2 16:58:55 2017 (r311105) +++ head/usr.bin/patch/patch.c Mon Jan 2 17:12:14 2017 (r311106) @@ -749,15 +749,13 @@ rej_line(int ch, LINENUM i) size_t len; const char *line = pfetch(i); - len = strnlen(line, USHRT_MAX); + len = strnlen(line, UINT_MAX); fprintf(rejfp, "%c%s", ch, line); - if (len == 0 || line[len-1] != '\n') { - if (len >= USHRT_MAX) - fprintf(rejfp, "\n\\ Line too long\n"); - else - fprintf(rejfp, "\n\\ No newline at end of line\n"); - } + if (len == 0 || line[len-1] != '\n') + fprintf(rejfp, "\n\\ No newline at end of line\n"); + else if (len >= UINT_MAX) + fprintf(rejfp, "\n\\ Line too long\n"); } static void @@ -1024,7 +1022,7 @@ patch_match(LINENUM base, LINENUM offset LINENUM pat_lines = pch_ptrn_lines() - fuzz; const char *ilineptr; const char *plineptr; - unsigned short plinelen; + u_int plinelen; for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) { ilineptr = ifetch(iline, offset >= 0); Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Mon Jan 2 16:58:55 2017 (r311105) +++ head/usr.bin/patch/pch.c Mon Jan 2 17:12:14 2017 (r311106) @@ -56,7 +56,7 @@ static LINENUM p_max; /* max allowed va static LINENUM p_context = 3; /* # of context lines */ static LINENUM p_input_line = 0; /* current line # from patch file */ static char **p_line = NULL;/* the text of the hunk */ -static unsigned short *p_len = NULL; /* length of each line */ +static u_int *p_len = NULL; /* length of each line */ static char *p_char = NULL; /* +, -, and ! */ static int hunkmax = INITHUNKMAX; /* size of above arrays to begin with */ static int p_indent; /* indent to patch */ @@ -136,7 +136,7 @@ set_hunkmax(void) if (p_line == NULL) p_line = malloc(hunkmax * sizeof(char *)); if (p_len == NULL) - p_len = malloc(hunkmax * sizeof(unsigned short)); + p_len = malloc(hunkmax * sizeof(u_int)); if (p_char == NULL) p_char = malloc(hunkmax * sizeof(char)); } @@ -153,7 +153,7 @@ grow_hunkmax(void) fatal("Internal memory allocation error\n"); p_line = reallocf(p_line, new_hunkmax * sizeof(char *)); - p_len = reallocf(p_len, new_hunkmax * sizeof(unsigned short)); + p_len = reallocf(p_len, new_hunkmax * sizeof(u_int)); p_char = reallocf(p_char, new_hunkmax * sizeof(char)); if (p_line != NULL && p_len != NULL && p_char != NULL) { @@ -1210,7 +1210,7 @@ bool pch_swap(void) { char **tp_line; /* the text of the hunk */ - unsigned short *tp_len;/* length of each line */ + u_int *tp_len; /* length of each line */ char *tp_char; /* +, -, and ! */ LINENUM i; LINENUM n; @@ -1367,7 +1367,7 @@ pch_context(void) /* * Return the length of a particular patch line. */ -unsigned short +u_int pch_line_len(LINENUM line) { return p_len[line]; Modified: head/usr.bin/patch/pch.h ============================================================================== --- head/usr.bin/patch/pch.h Mon Jan 2 16:58:55 2017 (r311105) +++ head/usr.bin/patch/pch.h Mon Jan 2 17:12:14 2017 (r311106) @@ -44,7 +44,7 @@ bool there_is_another_patch(void); bool another_hunk(void); bool pch_swap(void); char *pfetch(LINENUM); -unsigned short pch_line_len(LINENUM); +u_int pch_line_len(LINENUM); LINENUM pch_first(void); LINENUM pch_ptrn_lines(void); LINENUM pch_newfirst(void); From owner-svn-src-head@freebsd.org Mon Jan 2 17:27:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44860C9BF4B; Mon, 2 Jan 2017 17:27:29 +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 E18E11326; Mon, 2 Jan 2017 17:27:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v02HRMcB063419 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 2 Jan 2017 19:27:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v02HRMcB063419 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v02HRMn3063418; Mon, 2 Jan 2017 19:27:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Jan 2017 19:27:22 +0200 From: Konstantin Belousov To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311106 - head/usr.bin/patch Message-ID: <20170102172722.GK1923@kib.kiev.ua> References: <201701021712.v02HCEsx098719@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701021712.v02HCEsx098719@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 17:27:29 -0000 On Mon, Jan 02, 2017 at 05:12:14PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Jan 2 17:12:14 2017 > New Revision: 311106 > URL: https://svnweb.freebsd.org/changeset/base/311106 > > Log: > patch(1): extend the maximum length of a line from USHRT_MAX to UINT_MAX. > > We can handle such "big data" without much trouble. No, we don't, at least not on arbitrary platform. UINT_MAX allocations on 32bit arches or even in 32bit processes running on 64bit hosts cannot succeed. As result, the use of strnlen() becomes completely non-sensical. BTW, why is it used there at all ? > Try to do a better job at detecting the rejection cause while here. > > MFC after: 2 weeks > > Modified: > head/usr.bin/patch/patch.c > head/usr.bin/patch/pch.c > head/usr.bin/patch/pch.h > > Modified: head/usr.bin/patch/patch.c > ============================================================================== > --- head/usr.bin/patch/patch.c Mon Jan 2 16:58:55 2017 (r311105) > +++ head/usr.bin/patch/patch.c Mon Jan 2 17:12:14 2017 (r311106) > @@ -749,15 +749,13 @@ rej_line(int ch, LINENUM i) > size_t len; > const char *line = pfetch(i); > > - len = strnlen(line, USHRT_MAX); > + len = strnlen(line, UINT_MAX); > > fprintf(rejfp, "%c%s", ch, line); > - if (len == 0 || line[len-1] != '\n') { > - if (len >= USHRT_MAX) > - fprintf(rejfp, "\n\\ Line too long\n"); > - else > - fprintf(rejfp, "\n\\ No newline at end of line\n"); > - } > + if (len == 0 || line[len-1] != '\n') > + fprintf(rejfp, "\n\\ No newline at end of line\n"); > + else if (len >= UINT_MAX) > + fprintf(rejfp, "\n\\ Line too long\n"); > } > > static void > @@ -1024,7 +1022,7 @@ patch_match(LINENUM base, LINENUM offset > LINENUM pat_lines = pch_ptrn_lines() - fuzz; > const char *ilineptr; > const char *plineptr; > - unsigned short plinelen; > + u_int plinelen; > > for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) { > ilineptr = ifetch(iline, offset >= 0); > > Modified: head/usr.bin/patch/pch.c > ============================================================================== > --- head/usr.bin/patch/pch.c Mon Jan 2 16:58:55 2017 (r311105) > +++ head/usr.bin/patch/pch.c Mon Jan 2 17:12:14 2017 (r311106) > @@ -56,7 +56,7 @@ static LINENUM p_max; /* max allowed va > static LINENUM p_context = 3; /* # of context lines */ > static LINENUM p_input_line = 0; /* current line # from patch file */ > static char **p_line = NULL;/* the text of the hunk */ > -static unsigned short *p_len = NULL; /* length of each line */ > +static u_int *p_len = NULL; /* length of each line */ > static char *p_char = NULL; /* +, -, and ! */ > static int hunkmax = INITHUNKMAX; /* size of above arrays to begin with */ > static int p_indent; /* indent to patch */ > @@ -136,7 +136,7 @@ set_hunkmax(void) > if (p_line == NULL) > p_line = malloc(hunkmax * sizeof(char *)); > if (p_len == NULL) > - p_len = malloc(hunkmax * sizeof(unsigned short)); > + p_len = malloc(hunkmax * sizeof(u_int)); > if (p_char == NULL) > p_char = malloc(hunkmax * sizeof(char)); > } > @@ -153,7 +153,7 @@ grow_hunkmax(void) > fatal("Internal memory allocation error\n"); > > p_line = reallocf(p_line, new_hunkmax * sizeof(char *)); > - p_len = reallocf(p_len, new_hunkmax * sizeof(unsigned short)); > + p_len = reallocf(p_len, new_hunkmax * sizeof(u_int)); > p_char = reallocf(p_char, new_hunkmax * sizeof(char)); > > if (p_line != NULL && p_len != NULL && p_char != NULL) { > @@ -1210,7 +1210,7 @@ bool > pch_swap(void) > { > char **tp_line; /* the text of the hunk */ > - unsigned short *tp_len;/* length of each line */ > + u_int *tp_len; /* length of each line */ > char *tp_char; /* +, -, and ! */ > LINENUM i; > LINENUM n; > @@ -1367,7 +1367,7 @@ pch_context(void) > /* > * Return the length of a particular patch line. > */ > -unsigned short > +u_int > pch_line_len(LINENUM line) > { > return p_len[line]; > > Modified: head/usr.bin/patch/pch.h > ============================================================================== > --- head/usr.bin/patch/pch.h Mon Jan 2 16:58:55 2017 (r311105) > +++ head/usr.bin/patch/pch.h Mon Jan 2 17:12:14 2017 (r311106) > @@ -44,7 +44,7 @@ bool there_is_another_patch(void); > bool another_hunk(void); > bool pch_swap(void); > char *pfetch(LINENUM); > -unsigned short pch_line_len(LINENUM); > +u_int pch_line_len(LINENUM); > LINENUM pch_first(void); > LINENUM pch_ptrn_lines(void); > LINENUM pch_newfirst(void); From owner-svn-src-head@freebsd.org Mon Jan 2 18:20:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD9AEC9C1B5; Mon, 2 Jan 2017 18:20:23 +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 87C791591; Mon, 2 Jan 2017 18:20:23 +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 v02IKM3a024065; Mon, 2 Jan 2017 18:20:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02IKMe8024064; Mon, 2 Jan 2017 18:20:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701021820.v02IKMe8024064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 2 Jan 2017 18:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311108 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 18:20:23 -0000 Author: kib Date: Mon Jan 2 18:20:22 2017 New Revision: 311108 URL: https://svnweb.freebsd.org/changeset/base/311108 Log: Move common code from kern_statfs() and kern_fstatfs() into a new helper. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jan 2 17:40:23 2017 (r311107) +++ head/sys/kern/vfs_syscalls.c Mon Jan 2 18:20:22 2017 (r311108) @@ -244,6 +244,45 @@ statfs_scale_blocks(struct statfs *sf, l sf->f_bavail >>= shift; } +static int +kern_do_statfs(struct thread *td, struct mount *mp, struct statfs *buf) +{ + struct statfs *sp, sb; + int error; + + if (mp == NULL) + return (EBADF); + error = vfs_busy(mp, 0); + vfs_rel(mp); + if (error != 0) + return (error); +#ifdef MAC + error = mac_mount_check_stat(td->td_ucred, mp); + if (error != 0) + goto out; +#endif + /* + * Set these in case the underlying filesystem fails to do so. + */ + sp = &mp->mnt_stat; + sp->f_version = STATFS_VERSION; + sp->f_namemax = NAME_MAX; + sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; + error = VFS_STATFS(mp, sp); + if (error != 0) + goto out; + if (priv_check(td, PRIV_VFS_GENERATION)) { + bcopy(sp, &sb, sizeof(sb)); + sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; + prison_enforce_statfs(td->td_ucred, mp, &sb); + sp = &sb; + } + *buf = *sp; +out: + vfs_unbusy(mp); + return (error); +} + /* * Get filesystem statistics. */ @@ -275,7 +314,6 @@ kern_statfs(struct thread *td, char *pat struct statfs *buf) { struct mount *mp; - struct statfs *sp, sb; struct nameidata nd; int error; @@ -288,35 +326,7 @@ kern_statfs(struct thread *td, char *pat vfs_ref(mp); NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_vp); - error = vfs_busy(mp, 0); - vfs_rel(mp); - if (error != 0) - return (error); -#ifdef MAC - error = mac_mount_check_stat(td->td_ucred, mp); - if (error != 0) - goto out; -#endif - /* - * Set these in case the underlying filesystem fails to do so. - */ - sp = &mp->mnt_stat; - sp->f_version = STATFS_VERSION; - sp->f_namemax = NAME_MAX; - sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; - error = VFS_STATFS(mp, sp); - if (error != 0) - goto out; - if (priv_check(td, PRIV_VFS_GENERATION)) { - bcopy(sp, &sb, sizeof(sb)); - sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; - prison_enforce_statfs(td->td_ucred, mp, &sb); - sp = &sb; - } - *buf = *sp; -out: - vfs_unbusy(mp); - return (error); + return (kern_do_statfs(td, mp, buf)); } /* @@ -350,7 +360,6 @@ kern_fstatfs(struct thread *td, int fd, { struct file *fp; struct mount *mp; - struct statfs *sp, sb; struct vnode *vp; cap_rights_t rights; int error; @@ -369,40 +378,7 @@ kern_fstatfs(struct thread *td, int fd, vfs_ref(mp); VOP_UNLOCK(vp, 0); fdrop(fp, td); - if (mp == NULL) { - error = EBADF; - goto out; - } - error = vfs_busy(mp, 0); - vfs_rel(mp); - if (error != 0) - return (error); -#ifdef MAC - error = mac_mount_check_stat(td->td_ucred, mp); - if (error != 0) - goto out; -#endif - /* - * Set these in case the underlying filesystem fails to do so. - */ - sp = &mp->mnt_stat; - sp->f_version = STATFS_VERSION; - sp->f_namemax = NAME_MAX; - sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; - error = VFS_STATFS(mp, sp); - if (error != 0) - goto out; - if (priv_check(td, PRIV_VFS_GENERATION)) { - bcopy(sp, &sb, sizeof(sb)); - sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; - prison_enforce_statfs(td->td_ucred, mp, &sb); - sp = &sb; - } - *buf = *sp; -out: - if (mp) - vfs_unbusy(mp); - return (error); + return (kern_do_statfs(td, mp, buf)); } /* From owner-svn-src-head@freebsd.org Mon Jan 2 18:23:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DA0CC9C3C0; Mon, 2 Jan 2017 18:23:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 285FA1ADD; Mon, 2 Jan 2017 18:23:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02INWBu028050; Mon, 2 Jan 2017 18:23:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02INWXc028047; Mon, 2 Jan 2017 18:23:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701021823.v02INWXc028047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 2 Jan 2017 18:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311109 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 18:23:33 -0000 Author: pfg Date: Mon Jan 2 18:23:31 2017 New Revision: 311109 URL: https://svnweb.freebsd.org/changeset/base/311109 Log: Revert r311106: patch(1): extend the maximum length of a line from USHRT_MAX to UINT_MAX. This doesn't really work for 32 bit platforms. Pointed out by: kib Modified: head/usr.bin/patch/patch.c head/usr.bin/patch/pch.c head/usr.bin/patch/pch.h Modified: head/usr.bin/patch/patch.c ============================================================================== --- head/usr.bin/patch/patch.c Mon Jan 2 18:20:22 2017 (r311108) +++ head/usr.bin/patch/patch.c Mon Jan 2 18:23:31 2017 (r311109) @@ -749,13 +749,15 @@ rej_line(int ch, LINENUM i) size_t len; const char *line = pfetch(i); - len = strnlen(line, UINT_MAX); + len = strnlen(line, USHRT_MAX); fprintf(rejfp, "%c%s", ch, line); - if (len == 0 || line[len-1] != '\n') - fprintf(rejfp, "\n\\ No newline at end of line\n"); - else if (len >= UINT_MAX) - fprintf(rejfp, "\n\\ Line too long\n"); + if (len == 0 || line[len-1] != '\n') { + if (len >= USHRT_MAX) + fprintf(rejfp, "\n\\ Line too long\n"); + else + fprintf(rejfp, "\n\\ No newline at end of line\n"); + } } static void @@ -1022,7 +1024,7 @@ patch_match(LINENUM base, LINENUM offset LINENUM pat_lines = pch_ptrn_lines() - fuzz; const char *ilineptr; const char *plineptr; - u_int plinelen; + unsigned short plinelen; for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) { ilineptr = ifetch(iline, offset >= 0); Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Mon Jan 2 18:20:22 2017 (r311108) +++ head/usr.bin/patch/pch.c Mon Jan 2 18:23:31 2017 (r311109) @@ -56,7 +56,7 @@ static LINENUM p_max; /* max allowed va static LINENUM p_context = 3; /* # of context lines */ static LINENUM p_input_line = 0; /* current line # from patch file */ static char **p_line = NULL;/* the text of the hunk */ -static u_int *p_len = NULL; /* length of each line */ +static unsigned short *p_len = NULL; /* length of each line */ static char *p_char = NULL; /* +, -, and ! */ static int hunkmax = INITHUNKMAX; /* size of above arrays to begin with */ static int p_indent; /* indent to patch */ @@ -136,7 +136,7 @@ set_hunkmax(void) if (p_line == NULL) p_line = malloc(hunkmax * sizeof(char *)); if (p_len == NULL) - p_len = malloc(hunkmax * sizeof(u_int)); + p_len = malloc(hunkmax * sizeof(unsigned short)); if (p_char == NULL) p_char = malloc(hunkmax * sizeof(char)); } @@ -153,7 +153,7 @@ grow_hunkmax(void) fatal("Internal memory allocation error\n"); p_line = reallocf(p_line, new_hunkmax * sizeof(char *)); - p_len = reallocf(p_len, new_hunkmax * sizeof(u_int)); + p_len = reallocf(p_len, new_hunkmax * sizeof(unsigned short)); p_char = reallocf(p_char, new_hunkmax * sizeof(char)); if (p_line != NULL && p_len != NULL && p_char != NULL) { @@ -1210,7 +1210,7 @@ bool pch_swap(void) { char **tp_line; /* the text of the hunk */ - u_int *tp_len; /* length of each line */ + unsigned short *tp_len;/* length of each line */ char *tp_char; /* +, -, and ! */ LINENUM i; LINENUM n; @@ -1367,7 +1367,7 @@ pch_context(void) /* * Return the length of a particular patch line. */ -u_int +unsigned short pch_line_len(LINENUM line) { return p_len[line]; Modified: head/usr.bin/patch/pch.h ============================================================================== --- head/usr.bin/patch/pch.h Mon Jan 2 18:20:22 2017 (r311108) +++ head/usr.bin/patch/pch.h Mon Jan 2 18:23:31 2017 (r311109) @@ -44,7 +44,7 @@ bool there_is_another_patch(void); bool another_hunk(void); bool pch_swap(void); char *pfetch(LINENUM); -u_int pch_line_len(LINENUM); +unsigned short pch_line_len(LINENUM); LINENUM pch_first(void); LINENUM pch_ptrn_lines(void); LINENUM pch_newfirst(void); From owner-svn-src-head@freebsd.org Mon Jan 2 18:27:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2F49C9C48A; Mon, 2 Jan 2017 18:27:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82C761CF7; Mon, 2 Jan 2017 18:27:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02IRZAb028605; Mon, 2 Jan 2017 18:27:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02IRZ6R028604; Mon, 2 Jan 2017 18:27:35 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701021827.v02IRZ6R028604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 2 Jan 2017 18:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311110 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 18:27:36 -0000 Author: pfg Date: Mon Jan 2 18:27:35 2017 New Revision: 311110 URL: https://svnweb.freebsd.org/changeset/base/311110 Log: patch(1): replace strnlen() with a simpler strlen(). Small style fix with here. Pointed out by: kib Modified: head/usr.bin/patch/patch.c Modified: head/usr.bin/patch/patch.c ============================================================================== --- head/usr.bin/patch/patch.c Mon Jan 2 18:23:31 2017 (r311109) +++ head/usr.bin/patch/patch.c Mon Jan 2 18:27:35 2017 (r311110) @@ -749,10 +749,10 @@ rej_line(int ch, LINENUM i) size_t len; const char *line = pfetch(i); - len = strnlen(line, USHRT_MAX); + len = strlen(line); fprintf(rejfp, "%c%s", ch, line); - if (len == 0 || line[len-1] != '\n') { + if (len == 0 || line[len - 1] != '\n') { if (len >= USHRT_MAX) fprintf(rejfp, "\n\\ Line too long\n"); else From owner-svn-src-head@freebsd.org Mon Jan 2 18:34:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE6B9C9C7C2; Mon, 2 Jan 2017 18:34:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wj0-f196.google.com (mail-wj0-f196.google.com [209.85.210.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F05F1314; Mon, 2 Jan 2017 18:34:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wj0-f196.google.com with SMTP id j10so69487844wjb.3; Mon, 02 Jan 2017 10:34:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=EgG2VxNGI/jY1rhXvcQ3dX2izYQXXEX1TfLJWb36hVg=; b=CFdvCk7Yavwugw49GUldNUN+3RB3s3pYIzEOux5HsrRfpTpKSkCHZ6OaokFE56ejze twsJdSZr137j9yt8L+ixhjHuHJcyFOVpY4TbHpq5wPohTVs8nfvqv1RykxHAFfCuM65E xhl1/4YTPkx3MUnyYfC9rgZlCzQjtwf3EWNqdsJuztH2Tz1W51biV40QJ1qllbAZ3kDh QN0h5KFoLpNs/rk+JuD7cCj6BymZGm3DiWb5f5FaRgR6UwcESeErsUSV+wDhzgrP1Vri Jm+zy0YckJKktB0Eh4Wkg/mncM+FNiEzI8zxOqJ5EvgH0EFcyR5uuqz1PfYCUeYTXP03 vHlg== X-Gm-Message-State: AIkVDXLTCP1iTzQ6ymcnqTmg+bOQXzn561HIF779c8qFRzHctYXq9m2I2r1AZzRbXxhB9g== X-Received: by 10.194.82.8 with SMTP id e8mr49744164wjy.97.1483381727176; Mon, 02 Jan 2017 10:28:47 -0800 (PST) Received: from mail-wj0-f169.google.com (mail-wj0-f169.google.com. [209.85.210.169]) by smtp.gmail.com with ESMTPSA id cl10sm88782841wjb.4.2017.01.02.10.28.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jan 2017 10:28:47 -0800 (PST) Received: by mail-wj0-f169.google.com with SMTP id sd9so244707330wjb.1; Mon, 02 Jan 2017 10:28:47 -0800 (PST) X-Received: by 10.195.9.102 with SMTP id dr6mr41128660wjd.209.1483381726805; Mon, 02 Jan 2017 10:28:46 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Mon, 2 Jan 2017 10:28:46 -0800 (PST) In-Reply-To: <201701021823.v02INWXc028047@repo.freebsd.org> References: <201701021823.v02INWXc028047@repo.freebsd.org> From: Conrad Meyer Date: Mon, 2 Jan 2017 10:28:46 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r311109 - head/usr.bin/patch To: "Pedro F. Giffuni" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 18:34:56 -0000 IMO this patch was mostly fine, you just need to restrict line length to UINT32_MAX/2 instead of UINT_MAX (== UINT32_MAX) for 32-bit platforms. Best, Conrad On Mon, Jan 2, 2017 at 10:23 AM, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Jan 2 18:23:31 2017 > New Revision: 311109 > URL: https://svnweb.freebsd.org/changeset/base/311109 > > Log: > Revert r311106: > patch(1): extend the maximum length of a line from USHRT_MAX to UINT_MAX. > > This doesn't really work for 32 bit platforms. > > Pointed out by: kib > > Modified: > head/usr.bin/patch/patch.c > head/usr.bin/patch/pch.c > head/usr.bin/patch/pch.h > > Modified: head/usr.bin/patch/patch.c > ============================================================================== > --- head/usr.bin/patch/patch.c Mon Jan 2 18:20:22 2017 (r311108) > +++ head/usr.bin/patch/patch.c Mon Jan 2 18:23:31 2017 (r311109) > @@ -749,13 +749,15 @@ rej_line(int ch, LINENUM i) > size_t len; > const char *line = pfetch(i); > > - len = strnlen(line, UINT_MAX); > + len = strnlen(line, USHRT_MAX); > > fprintf(rejfp, "%c%s", ch, line); > - if (len == 0 || line[len-1] != '\n') > - fprintf(rejfp, "\n\\ No newline at end of line\n"); > - else if (len >= UINT_MAX) > - fprintf(rejfp, "\n\\ Line too long\n"); > + if (len == 0 || line[len-1] != '\n') { > + if (len >= USHRT_MAX) > + fprintf(rejfp, "\n\\ Line too long\n"); > + else > + fprintf(rejfp, "\n\\ No newline at end of line\n"); > + } > } > > static void > @@ -1022,7 +1024,7 @@ patch_match(LINENUM base, LINENUM offset > LINENUM pat_lines = pch_ptrn_lines() - fuzz; > const char *ilineptr; > const char *plineptr; > - u_int plinelen; > + unsigned short plinelen; > > for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) { > ilineptr = ifetch(iline, offset >= 0); > > Modified: head/usr.bin/patch/pch.c > ============================================================================== > --- head/usr.bin/patch/pch.c Mon Jan 2 18:20:22 2017 (r311108) > +++ head/usr.bin/patch/pch.c Mon Jan 2 18:23:31 2017 (r311109) > @@ -56,7 +56,7 @@ static LINENUM p_max; /* max allowed va > static LINENUM p_context = 3; /* # of context lines */ > static LINENUM p_input_line = 0; /* current line # from patch file */ > static char **p_line = NULL;/* the text of the hunk */ > -static u_int *p_len = NULL; /* length of each line */ > +static unsigned short *p_len = NULL; /* length of each line */ > static char *p_char = NULL; /* +, -, and ! */ > static int hunkmax = INITHUNKMAX; /* size of above arrays to begin with */ > static int p_indent; /* indent to patch */ > @@ -136,7 +136,7 @@ set_hunkmax(void) > if (p_line == NULL) > p_line = malloc(hunkmax * sizeof(char *)); > if (p_len == NULL) > - p_len = malloc(hunkmax * sizeof(u_int)); > + p_len = malloc(hunkmax * sizeof(unsigned short)); > if (p_char == NULL) > p_char = malloc(hunkmax * sizeof(char)); > } > @@ -153,7 +153,7 @@ grow_hunkmax(void) > fatal("Internal memory allocation error\n"); > > p_line = reallocf(p_line, new_hunkmax * sizeof(char *)); > - p_len = reallocf(p_len, new_hunkmax * sizeof(u_int)); > + p_len = reallocf(p_len, new_hunkmax * sizeof(unsigned short)); > p_char = reallocf(p_char, new_hunkmax * sizeof(char)); > > if (p_line != NULL && p_len != NULL && p_char != NULL) { > @@ -1210,7 +1210,7 @@ bool > pch_swap(void) > { > char **tp_line; /* the text of the hunk */ > - u_int *tp_len; /* length of each line */ > + unsigned short *tp_len;/* length of each line */ > char *tp_char; /* +, -, and ! */ > LINENUM i; > LINENUM n; > @@ -1367,7 +1367,7 @@ pch_context(void) > /* > * Return the length of a particular patch line. > */ > -u_int > +unsigned short > pch_line_len(LINENUM line) > { > return p_len[line]; > > Modified: head/usr.bin/patch/pch.h > ============================================================================== > --- head/usr.bin/patch/pch.h Mon Jan 2 18:20:22 2017 (r311108) > +++ head/usr.bin/patch/pch.h Mon Jan 2 18:23:31 2017 (r311109) > @@ -44,7 +44,7 @@ bool there_is_another_patch(void); > bool another_hunk(void); > bool pch_swap(void); > char *pfetch(LINENUM); > -u_int pch_line_len(LINENUM); > +unsigned short pch_line_len(LINENUM); > LINENUM pch_first(void); > LINENUM pch_ptrn_lines(void); > LINENUM pch_newfirst(void); > From owner-svn-src-head@freebsd.org Mon Jan 2 18:49:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74852C9CC69; Mon, 2 Jan 2017 18:49:49 +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 4028B1B91; Mon, 2 Jan 2017 18:49:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02InmCg037273; Mon, 2 Jan 2017 18:49:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02InmTi037272; Mon, 2 Jan 2017 18:49:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701021849.v02InmTi037272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 2 Jan 2017 18:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311111 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 18:49:49 -0000 Author: kib Date: Mon Jan 2 18:49:48 2017 New Revision: 311111 URL: https://svnweb.freebsd.org/changeset/base/311111 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jan 2 18:27:35 2017 (r311110) +++ head/sys/kern/vfs_syscalls.c Mon Jan 2 18:49:48 2017 (r311111) @@ -374,7 +374,7 @@ kern_fstatfs(struct thread *td, int fd, AUDIT_ARG_VNODE1(vp); #endif mp = vp->v_mount; - if (mp) + if (mp != NULL) vfs_ref(mp); VOP_UNLOCK(vp, 0); fdrop(fp, td); From owner-svn-src-head@freebsd.org Mon Jan 2 18:58:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29D36C9CF3F; Mon, 2 Jan 2017 18:58:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDAF21115; Mon, 2 Jan 2017 18:58:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02IwE6k041305; Mon, 2 Jan 2017 18:58:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02IwEWM041304; Mon, 2 Jan 2017 18:58:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701021858.v02IwEWM041304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 18:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311112 - head/kerberos5/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 18:58:15 -0000 Author: ngie Date: Mon Jan 2 18:58:13 2017 New Revision: 311112 URL: https://svnweb.freebsd.org/changeset/base/311112 Log: libgssapi_{krb5,ntlm,spnego} requires MK_GSSAPI != no; conditionalize their building on the knob MFC after: 1 week Modified: head/kerberos5/lib/Makefile Modified: head/kerberos5/lib/Makefile ============================================================================== --- head/kerberos5/lib/Makefile Mon Jan 2 18:49:48 2017 (r311111) +++ head/kerberos5/lib/Makefile Mon Jan 2 18:58:13 2017 (r311112) @@ -1,11 +1,18 @@ - # $FreeBSD$ -SUBDIR= libasn1 libgssapi_krb5 libgssapi_ntlm libgssapi_spnego libhdb \ +.include + +SUBDIR= libasn1 libhdb \ libheimntlm libhx509 libkadm5clnt libkadm5srv libkrb5 \ libroken libsl libvers libkdc libwind libheimbase libheimipcc libheimipcs SUBDIR+= libkafs5 # requires krb_err.h from libkrb5 SUBDIR_DEPEND_libkafs5= libkrb5 +.if ${MK_GSSAPI} != "no" +SUBDIR+= libgssapi_krb5 +SUBDIR+= libgssapi_ntlm +SUBDIR+= libgssapi_spnego +.endif + .include From owner-svn-src-head@freebsd.org Mon Jan 2 18:59:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 011A2C9CFCE; Mon, 2 Jan 2017 18:59:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C50E51391; Mon, 2 Jan 2017 18:59:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02IxN5c041504; Mon, 2 Jan 2017 18:59:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02IxNmO041503; Mon, 2 Jan 2017 18:59:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701021859.v02IxNmO041503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 2 Jan 2017 18:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311113 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 18:59:25 -0000 Author: kib Date: Mon Jan 2 18:59:23 2017 New Revision: 311113 URL: https://svnweb.freebsd.org/changeset/base/311113 Log: There is no need to use temporary statfs buffer for fsid obliteration and prison enforcement. Do it on the caller buffer directly. Besides eliminating memory copies, this change also removes large structure from the kernel stack. Extracted from: ino64 work by gleb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jan 2 18:58:13 2017 (r311112) +++ head/sys/kern/vfs_syscalls.c Mon Jan 2 18:59:23 2017 (r311113) @@ -247,7 +247,7 @@ statfs_scale_blocks(struct statfs *sf, l static int kern_do_statfs(struct thread *td, struct mount *mp, struct statfs *buf) { - struct statfs *sp, sb; + struct statfs *sp; int error; if (mp == NULL) @@ -271,13 +271,11 @@ kern_do_statfs(struct thread *td, struct error = VFS_STATFS(mp, sp); if (error != 0) goto out; + *buf = *sp; if (priv_check(td, PRIV_VFS_GENERATION)) { - bcopy(sp, &sb, sizeof(sb)); - sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; - prison_enforce_statfs(td->td_ucred, mp, &sb); - sp = &sb; + buf->f_fsid.val[0] = buf->f_fsid.val[1] = 0; + prison_enforce_statfs(td->td_ucred, mp, buf); } - *buf = *sp; out: vfs_unbusy(mp); return (error); From owner-svn-src-head@freebsd.org Mon Jan 2 19:02:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A37DC9B22C; Mon, 2 Jan 2017 19:02: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 4A1581897; Mon, 2 Jan 2017 19:02: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 v02J20Zu044428; Mon, 2 Jan 2017 19:02:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02J202J044427; Mon, 2 Jan 2017 19:02:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701021902.v02J202J044427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 19:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311114 - head/kerberos5/libexec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 19:02:01 -0000 Author: ngie Date: Mon Jan 2 19:02:00 2017 New Revision: 311114 URL: https://svnweb.freebsd.org/changeset/base/311114 Log: Build libexec/kadmind when MK_GSSAPI != no because it requires gssapi MFC after: 1 week Modified: head/kerberos5/libexec/Makefile Modified: head/kerberos5/libexec/Makefile ============================================================================== --- head/kerberos5/libexec/Makefile Mon Jan 2 18:59:23 2017 (r311113) +++ head/kerberos5/libexec/Makefile Mon Jan 2 19:02:00 2017 (r311114) @@ -1,7 +1,13 @@ # $FreeBSD$ -SUBDIR= digest-service ipropd-master ipropd-slave hprop hpropd kadmind kdc \ +.include + +SUBDIR= digest-service ipropd-master ipropd-slave hprop hpropd kdc \ kdigest kfd kimpersonate kpasswdd kcm SUBDIR_PARALLEL= +.if ${MK_GSSAPI} != "no" +SUBDIR+= kadmind +.endif + .include From owner-svn-src-head@freebsd.org Mon Jan 2 19:03:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC9A8C9B2BC; Mon, 2 Jan 2017 19:03:02 +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 8C6331A66; Mon, 2 Jan 2017 19:03:02 +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 v02J31oY045338; Mon, 2 Jan 2017 19:03:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02J31tk045337; Mon, 2 Jan 2017 19:03:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701021903.v02J31tk045337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 19:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311115 - head/kerberos5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 19:03:02 -0000 Author: ngie Date: Mon Jan 2 19:03:01 2017 New Revision: 311115 URL: https://svnweb.freebsd.org/changeset/base/311115 Log: Conditionalize adding ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et to ETSRCS if MK_GSSAPI != "no" MFC after: 1 week Modified: head/kerberos5/Makefile.inc Modified: head/kerberos5/Makefile.inc ============================================================================== --- head/kerberos5/Makefile.inc Mon Jan 2 19:02:00 2017 (r311114) +++ head/kerberos5/Makefile.inc Mon Jan 2 19:03:01 2017 (r311115) @@ -26,11 +26,14 @@ ETSRCS= \ ${KRB5DIR}/lib/krb5/k524_err.et \ ${KRB5DIR}/lib/krb5/krb5_err.et \ ${KRB5DIR}/lib/krb5/krb_err.et \ - ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et \ ${KRB5DIR}/lib/hx509/hx509_err.et \ ${KRB5DIR}/lib/wind/wind_err.et \ ${KRB5DIR}/lib/ntlm/ntlm_err.et +.if ${MK_GSSAPI} != "no" +ETSRCS+= ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et +.endif + .for ET in ${ETSRCS} .for _ET in ${ET:T:R} .if ${SRCS:M${_ET}.[ch]} != "" From owner-svn-src-head@freebsd.org Mon Jan 2 19:18:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB34C9BCC2; Mon, 2 Jan 2017 19:18:57 +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 711701DB4; Mon, 2 Jan 2017 19:18:57 +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 v02JIuFL050514; Mon, 2 Jan 2017 19:18:56 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02JIuxT050513; Mon, 2 Jan 2017 19:18:56 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201701021918.v02JIuxT050513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Mon, 2 Jan 2017 19:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311122 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 19:18:57 -0000 Author: jpaetzel Date: Mon Jan 2 19:18:56 2017 New Revision: 311122 URL: https://svnweb.freebsd.org/changeset/base/311122 Log: Workaround NFS bug with readdirplus when there are greater than 1 billion files in a filesystem. Reviewed by kib MFC after: 2 weeks Sponsored by: iXsystems Differential Revision: D9009 Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Mon Jan 2 19:18:33 2017 (r311121) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Mon Jan 2 19:18:56 2017 (r311122) @@ -2018,25 +2018,17 @@ again: } /* - * Check to see if entries in this directory can be safely acquired - * via VFS_VGET() or if a switch to VOP_LOOKUP() is required. - * ZFS snapshot directories need VOP_LOOKUP(), so that any - * automount of the snapshot directory that is required will - * be done. - * This needs to be done here for NFSv4, since NFSv4 never does - * a VFS_VGET() for "." or "..". + * For now ZFS requires VOP_LOOKUP as a workaround. Until ino_t is changed + * to 64 bit type a ZFS filesystem with over 1 billion files in it + * will suffer from 64bit -> 32bit truncation. */ - if (is_zfs == 1) { - r = VFS_VGET(mp, at.na_fileid, LK_SHARED, &nvp); - if (r == EOPNOTSUPP) { - usevget = 0; - cn.cn_nameiop = LOOKUP; - cn.cn_lkflags = LK_SHARED | LK_RETRY; - cn.cn_cred = nd->nd_cred; - cn.cn_thread = p; - } else if (r == 0) - vput(nvp); - } + if (is_zfs == 1) + usevget = 0; + + cn.cn_nameiop = LOOKUP; + cn.cn_lkflags = LK_SHARED | LK_RETRY; + cn.cn_cred = nd->nd_cred; + cn.cn_thread = p; /* * Save this position, in case there is an error before one entry @@ -2105,16 +2097,7 @@ again: else r = EOPNOTSUPP; if (r == EOPNOTSUPP) { - if (usevget) { - usevget = 0; - cn.cn_nameiop = LOOKUP; - cn.cn_lkflags = - LK_SHARED | - LK_RETRY; - cn.cn_cred = - nd->nd_cred; - cn.cn_thread = p; - } + usevget = 0; cn.cn_nameptr = dp->d_name; cn.cn_namelen = nlen; cn.cn_flags = ISLASTCN | From owner-svn-src-head@freebsd.org Mon Jan 2 19:33:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A19CC9C6A4; Mon, 2 Jan 2017 19:33:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE14B15C1; Mon, 2 Jan 2017 19:33:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02JXNXI058639; Mon, 2 Jan 2017 19:33:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02JXNc7058638; Mon, 2 Jan 2017 19:33:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701021933.v02JXNc7058638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Jan 2017 19:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311131 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 19:33:24 -0000 Author: dim Date: Mon Jan 2 19:33:22 2017 New Revision: 311131 URL: https://svnweb.freebsd.org/changeset/base/311131 Log: Make native-xtools build correctly after clang/llvm 3.9.0 import During the clang/llvm 3.9.0 import, the build structure for it was completely revamped. This broke the native-xtools target. It first attempts to build libllvmminimal, then the llvm-tblgen and clang-tblgen executables, but these fail to link because they are linked to the 'full' libllvm by default, as they normally are during the 'world' stage. To make these link against libllvmminimal instead, define TOOLS_PREFIX, similarly as during the bootstrap-tools phase. The value itself is empty, as we don't really want to use a prefix. Reviewed by: imp PR: 215684 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9026 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jan 2 19:26:39 2017 (r311130) +++ head/Makefile.inc1 Mon Jan 2 19:33:22 2017 (r311131) @@ -1867,6 +1867,7 @@ cross-tools: .MAKE .PHONY NXBDESTDIR= ${OBJTREE}/nxb-bin NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ + TOOLS_PREFIX= \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin NXBMAKE= ${NXBENV} ${MAKE} \ From owner-svn-src-head@freebsd.org Mon Jan 2 19:48:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BA9CC9CB08 for ; Mon, 2 Jan 2017 19:48:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm7-vm6.bullet.mail.ne1.yahoo.com (nm7-vm6.bullet.mail.ne1.yahoo.com [98.138.91.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E0F21309 for ; Mon, 2 Jan 2017 19:48:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1483384855; bh=Jhf06kvNC8geZcr7+mW/EHMCGzQuwku4eRUdYpyMYPc=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=T6Kdho9ToifpaDAQJVFvhpkQzbFNEtlYFF+glMFD15oNMvEeyWIioMjNIyHVELe0yYMnCNT3Rl/6duozA/HLhI/g86v7RhyQpEAeXN3v9zNxlJzU7mO3wT9x2UgSj9uToGwHqo0OzKYhpMdMVis7+aHjRrcYnVgEIDI03xUY/eIyrccComDOeY3M0WVNo+Z3dbgN1zxpGRUjDf+kiQujUjCed7SNtzdgtpGmrRyHmGI7fvQZ8aGkwBdTmR0y8xa5SbZNi+IoXccUoHxthDOHn0rKovPjDFpJaNvQnWFlnA2swKtLHRwlQs2fziixDU82iJjvhV96m9KDbcGpv8eEqA== Received: from [98.138.101.128] by nm7.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jan 2017 19:20:55 -0000 Received: from [98.138.84.47] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jan 2017 19:20:55 -0000 Received: from [127.0.0.1] by smtp115.mail.ne1.yahoo.com with NNFMP; 02 Jan 2017 19:20:55 -0000 X-Yahoo-Newman-Id: 831746.41017.bm@smtp115.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: UxD6rfQVM1lkjVbG4n9QroBQjVSB3KF6paOSEzPwa7XEAJG hrh.9EzKcmcFxGLYSzz6IZoByPZh99d72g0MoEaOnuaYk9jNXF2YK.XtkFD8 SHW08KxPDKU3j7TwBp9ZDmshEVVnK1oq5qk5JKcaq.vK.xlk4D7IFe1dF2If 2xMa4fOk7TBAx._juozYhtu9XpKS8mlvo05IM7HbBwK8TJ3oix35TmV287hN cjtBdbHNxPrUs0RdzNt0qnf9b2CYFS9c2p8EM5u2YXRLeLwdf.0cVMw9wmz6 qAV51rkEdGSIgMDs8gtpnIi3eFqTWEPbBGSj.giqVu4TiFieKPW1b6OYoUC3 AicYCJPSUp7RYtzJAKm8W7iWCHffbH2k8bwlsM7hl6D8ofB15cuoazlghB4S RHoO.IWl7SVn_eL_dLFQu2azMNbWuOsJ3hFShYK0QYsE1iDRJ2nbPk9vlo9b lo504jnM1HreDvI4DREYDrvq2MCXS5tQ03dkZreKd13752scbaPCLy1rheDq ZnoD9CsWjqNmXhMk.4wOXoflp7Rn7DfstWEWv1J3.LogTVIE- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r311109 - head/usr.bin/patch To: cem@freebsd.org References: <201701021823.v02INWXc028047@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: Date: Mon, 2 Jan 2017 14:22:36 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------840810EA8B3737957FA7B036" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 19:48:56 -0000 This is a multi-part message in MIME format. --------------840810EA8B3737957FA7B036 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi; On 01/02/17 13:28, Conrad Meyer wrote: > IMO this patch was mostly fine, you just need to restrict line length > to UINT32_MAX/2 instead of UINT_MAX (== UINT32_MAX) for 32-bit > platforms. > > Best, > Conrad > I dislike the idea of special cases for some platforms. I guess moving to int/INT_MAX would be the way to go. TBH, no one has asked for patches wider than USHRT_MAX though. Pedro. --------------840810EA8B3737957FA7B036 Content-Type: text/x-patch; name="patch-intline.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-intline.diff" Index: usr.bin/patch/patch.c =================================================================== --- usr.bin/patch/patch.c (revision 311110) +++ usr.bin/patch/patch.c (working copy) @@ -753,7 +753,7 @@ fprintf(rejfp, "%c%s", ch, line); if (len == 0 || line[len - 1] != '\n') { - if (len >= USHRT_MAX) + if (len >= INT_MAX) fprintf(rejfp, "\n\\ Line too long\n"); else fprintf(rejfp, "\n\\ No newline at end of line\n"); @@ -1024,7 +1024,7 @@ LINENUM pat_lines = pch_ptrn_lines() - fuzz; const char *ilineptr; const char *plineptr; - unsigned short plinelen; + int plinelen; for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) { ilineptr = ifetch(iline, offset >= 0); Index: usr.bin/patch/pch.c =================================================================== --- usr.bin/patch/pch.c (revision 311109) +++ usr.bin/patch/pch.c (working copy) @@ -56,7 +56,7 @@ static LINENUM p_context = 3; /* # of context lines */ static LINENUM p_input_line = 0; /* current line # from patch file */ static char **p_line = NULL;/* the text of the hunk */ -static unsigned short *p_len = NULL; /* length of each line */ +static int *p_len = NULL; /* length of each line */ static char *p_char = NULL; /* +, -, and ! */ static int hunkmax = INITHUNKMAX; /* size of above arrays to begin with */ static int p_indent; /* indent to patch */ @@ -136,7 +136,7 @@ if (p_line == NULL) p_line = malloc(hunkmax * sizeof(char *)); if (p_len == NULL) - p_len = malloc(hunkmax * sizeof(unsigned short)); + p_len = malloc(hunkmax * sizeof(int)); if (p_char == NULL) p_char = malloc(hunkmax * sizeof(char)); } @@ -153,7 +153,7 @@ fatal("Internal memory allocation error\n"); p_line = reallocf(p_line, new_hunkmax * sizeof(char *)); - p_len = reallocf(p_len, new_hunkmax * sizeof(unsigned short)); + p_len = reallocf(p_len, new_hunkmax * sizeof(int)); p_char = reallocf(p_char, new_hunkmax * sizeof(char)); if (p_line != NULL && p_len != NULL && p_char != NULL) { @@ -1210,7 +1210,7 @@ pch_swap(void) { char **tp_line; /* the text of the hunk */ - unsigned short *tp_len;/* length of each line */ + int *tp_len; /* length of each line */ char *tp_char; /* +, -, and ! */ LINENUM i; LINENUM n; @@ -1367,7 +1367,7 @@ /* * Return the length of a particular patch line. */ -unsigned short +int pch_line_len(LINENUM line) { return p_len[line]; Index: usr.bin/patch/pch.h =================================================================== --- usr.bin/patch/pch.h (revision 311109) +++ usr.bin/patch/pch.h (working copy) @@ -44,7 +44,7 @@ bool another_hunk(void); bool pch_swap(void); char *pfetch(LINENUM); -unsigned short pch_line_len(LINENUM); +int pch_line_len(LINENUM); LINENUM pch_first(void); LINENUM pch_ptrn_lines(void); LINENUM pch_newfirst(void); --------------840810EA8B3737957FA7B036-- From owner-svn-src-head@freebsd.org Mon Jan 2 19:55:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8C8FC9CCE8; Mon, 2 Jan 2017 19:55:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B881D185E; Mon, 2 Jan 2017 19:55:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02JtI5K067759; Mon, 2 Jan 2017 19:55:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02JtIh8067758; Mon, 2 Jan 2017 19:55:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701021955.v02JtIh8067758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 19:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311133 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 19:55:20 -0000 Author: ngie Date: Mon Jan 2 19:55:18 2017 New Revision: 311133 URL: https://svnweb.freebsd.org/changeset/base/311133 Log: Move the "MK_* options..." section before the "... MK_*_SUPPORT..." section For the case that someone set WITHOUT_GSSAPI=, now WITHOUT_KERBEROS_SUPPORT will be properly set. This will likely fix the issue for the default case noted in the PR I filed back in 2011. I am trying to fix the less obvious case documented in the PR still. MFC after: 2 weeks PR: 159745 Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jan 2 19:36:28 2017 (r311132) +++ head/share/mk/src.opts.mk Mon Jan 2 19:55:18 2017 (r311133) @@ -402,6 +402,21 @@ MK_CLANG_FULL:= no .endif # +# MK_* options whose default value depends on another option. +# +.for vv in \ + GSSAPI/KERBEROS \ + MAN_UTILS/MAN +.if defined(WITH_${vv:H}) +MK_${vv:H}:= yes +.elif defined(WITHOUT_${vv:H}) +MK_${vv:H}:= no +.else +MK_${vv:H}:= ${MK_${vv:T}} +.endif +.endfor + +# # Set defaults for the MK_*_SUPPORT variables. # @@ -428,21 +443,6 @@ MK_${var}_SUPPORT:= yes .endif .endfor -# -# MK_* options whose default value depends on another option. -# -.for vv in \ - GSSAPI/KERBEROS \ - MAN_UTILS/MAN -.if defined(WITH_${vv:H}) -MK_${vv:H}:= yes -.elif defined(WITHOUT_${vv:H}) -MK_${vv:H}:= no -.else -MK_${vv:H}:= ${MK_${vv:T}} -.endif -.endfor - .if !${COMPILER_FEATURES:Mc++11} MK_LLDB:= no .endif From owner-svn-src-head@freebsd.org Mon Jan 2 20:01:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AE17C9C035; Mon, 2 Jan 2017 20:01:08 +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 4AB981CCD; Mon, 2 Jan 2017 20:01:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02K17gt069487; Mon, 2 Jan 2017 20:01:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02K178S069486; Mon, 2 Jan 2017 20:01:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701022001.v02K178S069486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 20:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311134 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:01:08 -0000 Author: ngie Date: Mon Jan 2 20:01:07 2017 New Revision: 311134 URL: https://svnweb.freebsd.org/changeset/base/311134 Log: rcs was removed in r307351; kill off WITH*_RCS MFC after: never Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jan 2 19:55:18 2017 (r311133) +++ head/share/mk/src.opts.mk Mon Jan 2 20:01:07 2017 (r311134) @@ -189,7 +189,6 @@ __DEFAULT_NO_OPTIONS = \ NAND \ OFED \ OPENLDAP \ - RCS \ REPRODUCIBLE_BUILD \ SHARED_TOOLCHAIN \ SORT_THREADS \ From owner-svn-src-head@freebsd.org Mon Jan 2 20:07:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AC0AC9C1D5; Mon, 2 Jan 2017 20:07:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A547122F; Mon, 2 Jan 2017 20:07:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02K7vi9072632; Mon, 2 Jan 2017 20:07:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02K7v4a072630; Mon, 2 Jan 2017 20:07:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701022007.v02K7v4a072630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 20:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311135 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:07:58 -0000 Author: ngie Date: Mon Jan 2 20:07:56 2017 New Revision: 311135 URL: https://svnweb.freebsd.org/changeset/base/311135 Log: Add documentation for MK_EFI added in r307243 Added: head/tools/build/options/WITHOUT_EFI (contents, props changed) head/tools/build/options/WITH_EFI (contents, props changed) Added: head/tools/build/options/WITHOUT_EFI ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_EFI Mon Jan 2 20:07:56 2017 (r311135) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . Added: head/tools/build/options/WITH_EFI ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_EFI Mon Jan 2 20:07:56 2017 (r311135) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . From owner-svn-src-head@freebsd.org Mon Jan 2 20:09:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F15FC9C3C7; Mon, 2 Jan 2017 20:09: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 2F049162F; Mon, 2 Jan 2017 20:09: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 v02K992D072771; Mon, 2 Jan 2017 20:09:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02K99wm072770; Mon, 2 Jan 2017 20:09:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701022009.v02K99wm072770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 20:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311136 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:09:10 -0000 Author: ngie Date: Mon Jan 2 20:09:09 2017 New Revision: 311136 URL: https://svnweb.freebsd.org/changeset/base/311136 Log: Add WITH_SSP to silence complaints from mkman about there not being a file MFC after: 3 days Added: head/tools/build/options/WITH_SSP (contents, props changed) Added: head/tools/build/options/WITH_SSP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_SSP Mon Jan 2 20:09:09 2017 (r311136) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build world with propolice stack smashing protection. From owner-svn-src-head@freebsd.org Mon Jan 2 20:11:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A6EAC9C592; Mon, 2 Jan 2017 20:11:47 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E36D019A0; Mon, 2 Jan 2017 20:11:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-io0-x242.google.com with SMTP id m204so22627200ioe.3; Mon, 02 Jan 2017 12:11:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=wsElSFJ+kb0jlM4FBZCpMGymmMLHt29MFEDl0/X7iuc=; b=keyRHbcaOFOrKg5KgcCekYMoX3st//MdDjj3WBY/nbjM1F8CAGkyJLbfSK10gexNYt 1PLPYWNw5ju+JJJxjPidxOATgNbQhwUy/lTTiEQhg+3yuPkX697CtaRL8M0aFT1CwGir DylwiXGWN2yIefVxqyYQBTBrWHnJml6vO/dyFHixAcs61thrCyr4quDLt79jT0J6Sc+s oZBZoBFL0KUeHzW6buImozvJVOd09/OD3c+GoxqbbfLI9iCx4KhrJlIHIFScjDbnBsk6 HSZTebaxYVL0sdMkoC3IJdNL1YNenPREPICaagassrAoo7vtgMf/g2/89/oXLL2AlMd1 xjQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=wsElSFJ+kb0jlM4FBZCpMGymmMLHt29MFEDl0/X7iuc=; b=ZYBp9a5sCvqMfOrvP1CT9HHweJQBErwbxhGPVmES1MauoFiOQWI1qI5K+0bNuBn6+H ae+rDcDGNFLFG7Ybex4iVm/yB+GwzJJd24n++6jEoDxD2ppEyKwF29GweqKnPr1QIZZN SVAhwgndLAGMw4kpbVSzVDXOahGOOWmmoNViqt+ODXnrQ+A49pEMT1rrxtffphA200dN Seb4JTmvaK6XGxJOlGqcwoSob6ZD4H3LSeC/8O9AhHOElBM4ZxjRVlw6bRXiTRcGmrZ5 Mhi4fbhGbYaUhmEFsc0KNe2Xkf6pR9gF4ht7XggI0B0ndw+9VaQHW1huBCQZlSAQTP0p MvkA== X-Gm-Message-State: AIkVDXIhm26onwfTJHe6j+c4H1zsfyT4EhqExLL9oQ/iZ+4nR7N+SiXNu6MG3zyPzcbKEQ== X-Received: by 10.107.32.137 with SMTP id g131mr47697742iog.196.1483387906158; Mon, 02 Jan 2017 12:11:46 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u63sm18659824ita.1.2017.01.02.12.11.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Jan 2017 12:11:45 -0800 (PST) Subject: Re: svn commit: r311136 - head/tools/build/options Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7C04857F-5E7E-4A20-98A9-49B30CF9247B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701022009.v02K99wm072770@repo.freebsd.org> Date: Mon, 2 Jan 2017 12:11:43 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <7D8BB91D-34DD-430F-98C2-69777B542D8C@gmail.com> References: <201701022009.v02K99wm072770@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:11:47 -0000 --Apple-Mail=_7C04857F-5E7E-4A20-98A9-49B30CF9247B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jan 2, 2017, at 12:09, Ngie Cooper wrote: > > Author: ngie > Date: Mon Jan 2 20:09:09 2017 > New Revision: 311136 > URL: https://svnweb.freebsd.org/changeset/base/311136 > > Log: > Add WITH_SSP to silence complaints from mkman about there not being a file I meant makeman. --Apple-Mail=_7C04857F-5E7E-4A20-98A9-49B30CF9247B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYarQAAAoJEPWDqSZpMIYVQvsP/Rl7Ph2YIWTD0p9rpcezbHbq ASpJJnfs2CgU+vpvsP4SRGPA0E2okqQqjgVMVJyV+Ux1lf3MCshelh6ToH64Skkp Oua3QpHDSm5WyHlVtNh53y2N6aC+mkG46StolSA47ft46lx8EmHCx3nF8dQjyyuV ZBwJR+nrto2FLQC4dT4DEQku4Myl49bnAkeITZxsnHcuYXMYVPgEfe/AVzJUrNeQ qRNbAbX7oULkAnpAsFh5dy8sVIsbykM2+Uxa9Qws/TAa313mD9DfmFpszC2QIicB CEmGpMdSuHUViiG3lu8eLi7ZInWZ6+JzO5EuBXj67rnynNQWQJliQbyRgAbNVzTV dMIGp202fM7xoT5+y95OQV9HJZkR3fCDwCK+UqlS0pm9KRJJ1Qr0984vIrCvH09f urLGVYqSX0aqnRCU6Z0eVBv/d55GUgxZHgkDFvR0ftwNzDNT+tZ6uCthV/UJVYss 0x1jC3klt5F0YApGEKk4a1W6EFH9qWnplcczvaIyRMRjhj0tVPl9hPQYCJ4gE790 oonDjCZA81SDmTePCUjXmSFgM390x287Xac8DVyZY1n/SPnL7ek7bhhuROz/pJPZ 3tl5EfxJBEFFAMftc2QNpjeOxN9jACuWaHcGXDchlHdWu9e5ytf9LaBa8bFaB7SR UtzK1YYqmWMjp1dKMuYJ =rvY1 -----END PGP SIGNATURE----- --Apple-Mail=_7C04857F-5E7E-4A20-98A9-49B30CF9247B-- From owner-svn-src-head@freebsd.org Mon Jan 2 20:14:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81291C9C7A0; Mon, 2 Jan 2017 20:14:07 +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 421AE1DE6; Mon, 2 Jan 2017 20:14:07 +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 v02KE6r9077128; Mon, 2 Jan 2017 20:14:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02KE6GD077127; Mon, 2 Jan 2017 20:14:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701022014.v02KE6GD077127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 20:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311137 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:14:07 -0000 Author: ngie Date: Mon Jan 2 20:14:06 2017 New Revision: 311137 URL: https://svnweb.freebsd.org/changeset/base/311137 Log: Regen src.conf after recent changes to tools/build/options/... and src.opts.mk Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Jan 2 20:09:09 2017 (r311136) +++ head/share/man/man5/src.conf.5 Mon Jan 2 20:14:06 2017 (r311137) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 306729 2016-10-05 20:12:00Z emaste .\" $FreeBSD$ -.Dd December 19, 2016 +.Dd January 2, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -635,6 +635,24 @@ Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. +.It Va WITHOUT_EFI +.\" from FreeBSD: head/tools/build/options/WITHOUT_EFI 311135 2017-01-02 20:07:56Z ngie +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +.It Va WITH_EFI +.\" from FreeBSD: head/tools/build/options/WITH_EFI 311135 2017-01-02 20:07:56Z ngie +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA .\" from FreeBSD: head/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. @@ -1369,7 +1387,7 @@ This includes .Xr rsh 1 , etc. .It Va WITH_REPRODUCIBLE_BUILD -.\" from FreeBSD: head/tools/build/options/WITH_REPRODUCIBLE_BUILD 310268 2016-12-19 14:45:59Z emaste +.\" from FreeBSD: head/tools/build/options/WITH_REPRODUCIBLE_BUILD 310271 2016-12-19 15:09:30Z gjb Set to exclude build metadata (such as the build time, user, or host) from the kernel, boot loaders, and uname output, so that builds produce bit-for-bit identical output. @@ -1431,6 +1449,12 @@ Set to not build world with propolice st .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. +.It Va WITH_SSP +.\" from FreeBSD: head/tools/build/options/WITH_SSP 311136 2017-01-02 20:09:09Z ngie +Set to build world with propolice stack smashing protection. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, pc98/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_STAGING .\" from FreeBSD: head/tools/build/options/WITH_STAGING 290816 2015-11-14 03:24:48Z sjg Enable staging of files to a stage tree. From owner-svn-src-head@freebsd.org Mon Jan 2 20:23:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65D4BC9C9BB; Mon, 2 Jan 2017 20:23:48 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 333A8155B; Mon, 2 Jan 2017 20:23:48 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02KNleY081458; Mon, 2 Jan 2017 20:23:47 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02KNlEO081454; Mon, 2 Jan 2017 20:23:47 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201701022023.v02KNlEO081454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 2 Jan 2017 20:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311138 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:23:48 -0000 Author: pstef Date: Mon Jan 2 20:23:46 2017 New Revision: 311138 URL: https://svnweb.freebsd.org/changeset/base/311138 Log: indent(1): add option -P for loading user-provided files as profiles Without this change, indent(1) would only look to load options from ~/.indent.pro if it's there and -npro wasn't used on the command line. This option lets the user set their own path to the file. Approved by: pfg (mentor) Differential Revision: https://reviews.freebsd.org/D9010 Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent.1 head/usr.bin/indent/indent.c head/usr.bin/indent/indent.h Modified: head/usr.bin/indent/args.c ============================================================================== --- head/usr.bin/indent/args.c Mon Jan 2 20:14:06 2017 (r311137) +++ head/usr.bin/indent/args.c Mon Jan 2 20:23:46 2017 (r311138) @@ -177,13 +177,16 @@ struct pro { * given in these files. */ void -set_profile(void) +set_profile(const char *profile_name) { FILE *f; char fname[PATH_MAX]; static char prof[] = ".indent.pro"; - snprintf(fname, sizeof(fname), "%s/%s", getenv("HOME"), prof); + if (profile_name == NULL) + snprintf(fname, sizeof(fname), "%s/%s", getenv("HOME"), prof); + else + snprintf(fname, sizeof(fname), "%s", profile_name + 2); if ((f = fopen(option_source = fname, "r")) != NULL) { scan_profile(f); (void) fclose(f); Modified: head/usr.bin/indent/indent.1 ============================================================================== --- head/usr.bin/indent/indent.1 Mon Jan 2 20:14:06 2017 (r311137) +++ head/usr.bin/indent/indent.1 Mon Jan 2 20:23:46 2017 (r311138) @@ -30,7 +30,7 @@ .\" @(#)indent.1 8.1 (Berkeley) 7/1/93 .\" $FreeBSD$ .\" -.Dd December 2, 2016 +.Dd January 2, 2017 .Dt INDENT 1 .Os .Sh NAME @@ -74,6 +74,7 @@ .Op Fl \&ldi Ns Ar n .Op Fl \&lp | Fl nlp .Op Fl npro +.Op Fl P Ns Ar file .Op Fl pcs | Fl npcs .Op Fl psl | Fl npsl .Op Fl sac | Fl nsac @@ -383,6 +384,9 @@ Causes the profile files, and .Sq Pa ~/.indent.pro , to be ignored. +.It Fl P Ns Ar file +Read profile from +.Ar file . .It Fl pcs , npcs If true .Pq Fl pcs Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Mon Jan 2 20:14:06 2017 (r311137) +++ head/usr.bin/indent/indent.c Mon Jan 2 20:23:46 2017 (r311138) @@ -98,6 +98,7 @@ main(int argc, char **argv) int type_code; /* the type of token, returned by lexi */ int last_else = 0; /* true iff last keyword was an else */ + const char *profile_name = NULL; /*-----------------------------------------------*\ @@ -194,9 +195,11 @@ main(int argc, char **argv) for (i = 1; i < argc; ++i) if (strcmp(argv[i], "-npro") == 0) break; + else if (argv[i][0] == '-' && argv[i][1] == 'P' && argv[i][2] != '\0') + profile_name = argv[i]; /* non-empty -P (set profile) */ set_defaults(); if (i >= argc) - set_profile(); + set_profile(profile_name); for (i = 1; i < argc; ++i) { Modified: head/usr.bin/indent/indent.h ============================================================================== --- head/usr.bin/indent/indent.h Mon Jan 2 20:14:06 2017 (r311137) +++ head/usr.bin/indent/indent.h Mon Jan 2 20:23:46 2017 (r311138) @@ -45,5 +45,5 @@ void parsefont(struct fstate *, const ch void pr_comment(void); void set_defaults(void); void set_option(char *); -void set_profile(void); +void set_profile(const char *); void writefdef(struct fstate *f, int); From owner-svn-src-head@freebsd.org Mon Jan 2 20:29:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE9E3C9CB91; Mon, 2 Jan 2017 20:29:51 +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 712271937; Mon, 2 Jan 2017 20:29:51 +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 v02KToWx081751; Mon, 2 Jan 2017 20:29:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02KToX9081747; Mon, 2 Jan 2017 20:29:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701022029.v02KToX9081747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 2 Jan 2017 20:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311140 - in head: . secure/lib/libssh secure/usr.bin/ssh secure/usr.sbin/sshd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:29:51 -0000 Author: ngie Date: Mon Jan 2 20:29:50 2017 New Revision: 311140 URL: https://svnweb.freebsd.org/changeset/base/311140 Log: Only bake krb5_config.h support in to ssh(3), etc if both MK_GSSAPI and MK_KERBEROS_SUPPORT != no This fixes the odd case where someone specified MK_GSSAPI=no and MK_KERBEROS_SUPPORT=yes (which admittedly, probably doesn't make sense, but the build system doesn't prevent this case today, and it didn't when I filed the bug back in 2011 either). MFC after: 2 weeks PR: 159745 Modified: head/Makefile.inc1 head/secure/lib/libssh/Makefile head/secure/usr.bin/ssh/Makefile head/secure/usr.sbin/sshd/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jan 2 20:24:10 2017 (r311139) +++ head/Makefile.inc1 Mon Jan 2 20:29:50 2017 (r311140) @@ -2156,7 +2156,7 @@ secure/lib/libssh__L: lib/libz__L secure .if ${MK_LDNS} != "no" secure/lib/libssh__L: lib/libldns__L .endif -.if ${MK_KERBEROS_SUPPORT} != "no" +.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Mon Jan 2 20:24:10 2017 (r311139) +++ head/secure/lib/libssh/Makefile Mon Jan 2 20:29:50 2017 (r311140) @@ -46,7 +46,7 @@ LIBADD+= ldns CFLAGS+= -I${SSHDIR} -include ssh_namespace.h SRCS+= ssh_namespace.h -.if ${MK_KERBEROS_SUPPORT} != "no" +.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h SRCS+= krb5_config.h .endif Modified: head/secure/usr.bin/ssh/Makefile ============================================================================== --- head/secure/usr.bin/ssh/Makefile Mon Jan 2 20:24:10 2017 (r311139) +++ head/secure/usr.bin/ssh/Makefile Mon Jan 2 20:29:50 2017 (r311140) @@ -23,7 +23,7 @@ LIBADD= ssh CFLAGS+= -DHAVE_LDNS=1 .endif -.if ${MK_KERBEROS_SUPPORT} != "no" +.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h SRCS+= krb5_config.h LIBADD+= gssapi Modified: head/secure/usr.sbin/sshd/Makefile ============================================================================== --- head/secure/usr.sbin/sshd/Makefile Mon Jan 2 20:24:10 2017 (r311139) +++ head/secure/usr.sbin/sshd/Makefile Mon Jan 2 20:29:50 2017 (r311140) @@ -47,7 +47,7 @@ LIBADD+= blacklist LDFLAGS+=-L${LIBBLACKLISTDIR} .endif -.if ${MK_KERBEROS_SUPPORT} != "no" +.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h SRCS+= krb5_config.h LIBADD+= gssapi_krb5 gssapi krb5 From owner-svn-src-head@freebsd.org Mon Jan 2 20:49:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 153D0C9C2CD; Mon, 2 Jan 2017 20:49:26 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8F5B1633; Mon, 2 Jan 2017 20:49:25 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v02KnPZg089676; Mon, 2 Jan 2017 20:49:25 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v02KnPwH089675; Mon, 2 Jan 2017 20:49:25 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201701022049.v02KnPwH089675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 2 Jan 2017 20:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311141 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 20:49:26 -0000 Author: pstef Date: Mon Jan 2 20:49:24 2017 New Revision: 311141 URL: https://svnweb.freebsd.org/changeset/base/311141 Log: indent(1): add a piece missed in r311138. Modified: head/usr.bin/indent/args.c Modified: head/usr.bin/indent/args.c ============================================================================== --- head/usr.bin/indent/args.c Mon Jan 2 20:29:50 2017 (r311140) +++ head/usr.bin/indent/args.c Mon Jan 2 20:49:24 2017 (r311141) @@ -96,6 +96,7 @@ struct pro { {"T", PRO_SPECIAL, 0, KEY, 0}, {"U", PRO_SPECIAL, 0, KEY_FILE, 0}, + {"P", PRO_SPECIAL, 0, IGN, 0}, {"bacc", PRO_BOOL, false, ON, &blanklines_around_conditional_compilation}, {"badp", PRO_BOOL, false, ON, &blanklines_after_declarations_at_proctop}, {"bad", PRO_BOOL, false, ON, &blanklines_after_declarations}, From owner-svn-src-head@freebsd.org Mon Jan 2 22:54:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B195C9C63D; Mon, 2 Jan 2017 22:54:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEEEF1EF0; Mon, 2 Jan 2017 22:54:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f44.google.com with SMTP id k184so220620744wme.1; Mon, 02 Jan 2017 14:54:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y1qcN5ev+3v0aGkFXnNMogwuB7b48Yg1gun1u8K/rm4=; b=kj3YGLwVo5zs98LF5NEfANrDUN/o7xM3stpZ5k0Gt21rOneLv0ehsmFYUUAxWyxtIs 6wEnHtJBD5+ueWHDuR2sjZEm1j8BsHjNylRQkhPL3F5dy9Ig0dGQyNsxGP3rFduhQje/ pl08PgtH6H/prUk4/fyOmQrQQuYSZMv6v3ouI9LDHBC63EWZCHzxyQdyGe8cbYiV8bXZ W/4OOIaRBkMyqJnhTWdjeUU1WEU4AB9tZh6v4+RJGPL/3lss49irYEwUq4ojrbN2Fi7+ Accf+7nI4K3Xi6KFSd1zRbgf7ucuCTZc2A5hBqu6OkmNCyCJ+SuXyRDr3ixjdV+LJxeT h/uA== X-Gm-Message-State: AIkVDXIQEggkn/vc275GyRD2Az8q/0WMJ/vBrBV0BYrNAFGbo2qJCXypvThCfhS3vH6WPw== X-Received: by 10.28.189.136 with SMTP id n130mr55343938wmf.133.1483397659780; Mon, 02 Jan 2017 14:54:19 -0800 (PST) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com. [74.125.82.42]) by smtp.gmail.com with ESMTPSA id e3sm54942589wjm.12.2017.01.02.14.54.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jan 2017 14:54:19 -0800 (PST) Received: by mail-wm0-f42.google.com with SMTP id k184so220620555wme.1; Mon, 02 Jan 2017 14:54:19 -0800 (PST) X-Received: by 10.28.88.11 with SMTP id m11mr50743150wmb.45.1483397659081; Mon, 02 Jan 2017 14:54:19 -0800 (PST) MIME-Version: 1.0 References: <201701021823.v02INWXc028047@repo.freebsd.org> In-Reply-To: From: Conrad Meyer Date: Mon, 02 Jan 2017 22:54:08 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r311109 - head/usr.bin/patch To: Pedro Giffuni , cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 22:54:28 -0000 I was suggesting using UINT32_MAX/2 on all platforms (which is safe everywhere). Best, Conrad On Mon, Jan 2, 2017 at 11:48 AM Pedro Giffuni wrote: > Hi; > > > > On 01/02/17 13:28, Conrad Meyer wrote: > > > IMO this patch was mostly fine, you just need to restrict line length > > > to UINT32_MAX/2 instead of UINT_MAX (== UINT32_MAX) for 32-bit > > > platforms. > > > > > > Best, > > > Conrad > > > > > > > I dislike the idea of special cases for some platforms. I guess moving > > to int/INT_MAX would be the way to go. > > > > TBH, no one has asked for patches wider than USHRT_MAX though. > > > > Pedro. > > From owner-svn-src-head@freebsd.org Tue Jan 3 00:05:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFF28C9C6BE; Tue, 3 Jan 2017 00:05:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A6911D9D; Tue, 3 Jan 2017 00:05:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0305jDU071935; Tue, 3 Jan 2017 00:05:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0305jMu071929; Tue, 3 Jan 2017 00:05:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701030005.v0305jMu071929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Jan 2017 00:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311147 - in head/sys: sys vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 00:05:46 -0000 Author: markj Date: Tue Jan 3 00:05:44 2017 New Revision: 311147 URL: https://svnweb.freebsd.org/changeset/base/311147 Log: Add a page queue for holding dirty anonymous unswappable pages. On systems without a configured swap device, an attempt to launder pages from a swap object will always fail and result in the page being reactivated. This means that the page daemon will continuously scan pages that can never be evicted. With this change, anonymous pages are instead moved to PQ_UNSWAPPABLE after a failed laundering attempt when no swap devices are configured. PQ_UNSWAPPABLE is not scanned unless a swap device is configured, so unreferenced unswappable pages are excluded from the page daemon's workload. Reviewed by: alc Modified: head/sys/sys/eventhandler.h head/sys/vm/swap_pager.c head/sys/vm/swap_pager.h head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c Modified: head/sys/sys/eventhandler.h ============================================================================== --- head/sys/sys/eventhandler.h Mon Jan 2 22:05:05 2017 (r311146) +++ head/sys/sys/eventhandler.h Tue Jan 3 00:05:44 2017 (r311147) @@ -277,4 +277,11 @@ typedef void (*ada_probe_veto_fn)(void * struct ata_params *, int *); EVENTHANDLER_DECLARE(ada_probe_veto, ada_probe_veto_fn); +/* Swap device events */ +struct swdevt; +typedef void (*swapon_fn)(void *, struct swdevt *); +typedef void (*swapoff_fn)(void *, struct swdevt *); +EVENTHANDLER_DECLARE(swapon, swapon_fn); +EVENTHANDLER_DECLARE(swapoff, swapoff_fn); + #endif /* _SYS_EVENTHANDLER_H_ */ Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Mon Jan 2 22:05:05 2017 (r311146) +++ head/sys/vm/swap_pager.c Tue Jan 3 00:05:44 2017 (r311147) @@ -1632,6 +1632,13 @@ swap_pager_isswapped(vm_object_t object, return (0); } +int +swap_pager_nswapdev(void) +{ + + return (nswapdev); +} + /* * SWP_PAGER_FORCE_PAGEIN() - force a swap block to be paged in * @@ -1750,6 +1757,7 @@ restart: pause("swpoff", hz / 20); goto full_rescan; } + EVENTHANDLER_INVOKE(swapoff, sp); } /************************************************************************ @@ -2209,6 +2217,7 @@ swaponsomething(struct vnode *vp, void * swapon_check_swzone(swap_total / PAGE_SIZE); swp_sizecheck(); mtx_unlock(&sw_dev_mtx); + EVENTHANDLER_INVOKE(swapon, sp); } /* Modified: head/sys/vm/swap_pager.h ============================================================================== --- head/sys/vm/swap_pager.h Mon Jan 2 22:05:05 2017 (r311146) +++ head/sys/vm/swap_pager.h Tue Jan 3 00:05:44 2017 (r311147) @@ -83,6 +83,7 @@ vm_pindex_t swap_pager_find_least(vm_obj void swap_pager_freespace(vm_object_t, vm_pindex_t, vm_size_t); void swap_pager_swap_init(void); int swap_pager_isswapped(vm_object_t, struct swdevt *); +int swap_pager_nswapdev(void); int swap_pager_reserve(vm_object_t, vm_pindex_t, vm_size_t); void swap_pager_status(int *total, int *used); void swapoff_all(void); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Jan 2 22:05:05 2017 (r311146) +++ head/sys/vm/vm_page.c Tue Jan 3 00:05:44 2017 (r311147) @@ -393,6 +393,11 @@ vm_page_domain_init(struct vm_domain *vm "vm laundry pagequeue"; *__DECONST(int **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_vcnt) = &vm_cnt.v_laundry_count; + *__DECONST(char **, &vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_name) = + "vm unswappable pagequeue"; + /* Unswappable dirty pages are counted as being in the laundry. */ + *__DECONST(int **, &vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_vcnt) = + &vm_cnt.v_laundry_count; vmd->vmd_page_count = 0; vmd->vmd_free_count = 0; vmd->vmd_segs = 0; @@ -2578,7 +2583,7 @@ vm_page_enqueue(uint8_t queue, vm_page_t KASSERT(queue < PQ_COUNT, ("vm_page_enqueue: invalid queue %u request for page %p", queue, m)); - if (queue == PQ_LAUNDRY) + if (queue == PQ_LAUNDRY || queue == PQ_UNSWAPPABLE) pq = &vm_dom[0].vmd_pagequeues[queue]; else pq = &vm_phys_domain(m)->vmd_pagequeues[queue]; @@ -2947,6 +2952,23 @@ vm_page_launder(vm_page_t m) } /* + * vm_page_unswappable + * + * Put a page in the PQ_UNSWAPPABLE holding queue. + */ +void +vm_page_unswappable(vm_page_t m) +{ + + vm_page_assert_locked(m); + KASSERT(m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0, + ("page %p already unswappable", m)); + if (m->queue != PQ_NONE) + vm_page_dequeue(m); + vm_page_enqueue(PQ_UNSWAPPABLE, m); +} + +/* * vm_page_try_to_free() * * Attempt to free the page. If we cannot free it, we do nothing. @@ -3534,13 +3556,14 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pag db_printf("pq_free %d\n", vm_cnt.v_free_count); for (dom = 0; dom < vm_ndomains; dom++) { db_printf( - "dom %d page_cnt %d free %d pq_act %d pq_inact %d pq_laund %d\n", + "dom %d page_cnt %d free %d pq_act %d pq_inact %d pq_laund %d pq_unsw %d\n", dom, vm_dom[dom].vmd_page_count, vm_dom[dom].vmd_free_count, vm_dom[dom].vmd_pagequeues[PQ_ACTIVE].pq_cnt, vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt, - vm_dom[dom].vmd_pagequeues[PQ_LAUNDRY].pq_cnt); + vm_dom[dom].vmd_pagequeues[PQ_LAUNDRY].pq_cnt, + vm_dom[dom].vmd_pagequeues[PQ_UNSWAPPABLE].pq_cnt); } } Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon Jan 2 22:05:05 2017 (r311146) +++ head/sys/vm/vm_page.h Tue Jan 3 00:05:44 2017 (r311147) @@ -207,7 +207,8 @@ struct vm_page { #define PQ_INACTIVE 0 #define PQ_ACTIVE 1 #define PQ_LAUNDRY 2 -#define PQ_COUNT 3 +#define PQ_UNSWAPPABLE 3 +#define PQ_COUNT 4 TAILQ_HEAD(pglist, vm_page); SLIST_HEAD(spglist, vm_page); @@ -347,7 +348,7 @@ extern struct mtx_padalign pa_lock[]; #include /* - * Each pageable resident page falls into one of four lists: + * Each pageable resident page falls into one of five lists: * * free * Available for allocation now. @@ -360,6 +361,10 @@ extern struct mtx_padalign pa_lock[]; * This is the list of pages that should be * paged out next. * + * unswappable + * Dirty anonymous pages that cannot be paged + * out because no swap device is configured. + * * active * Pages that are "active", i.e., they have been * recently referenced. @@ -483,6 +488,7 @@ vm_offset_t vm_page_startup(vm_offset_t void vm_page_sunbusy(vm_page_t m); int vm_page_trysbusy(vm_page_t m); void vm_page_unhold_pages(vm_page_t *ma, int count); +void vm_page_unswappable(vm_page_t m); boolean_t vm_page_unwire(vm_page_t m, uint8_t queue); void vm_page_updatefake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_wire (vm_page_t); @@ -707,7 +713,7 @@ static inline bool vm_page_in_laundry(vm_page_t m) { - return (m->queue == PQ_LAUNDRY); + return (m->queue == PQ_LAUNDRY || m->queue == PQ_UNSWAPPABLE); } #endif /* _KERNEL */ Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Mon Jan 2 22:05:05 2017 (r311146) +++ head/sys/vm/vm_pageout.c Tue Jan 3 00:05:44 2017 (r311147) @@ -182,6 +182,7 @@ static int vm_pageout_update_period; static int disable_swap_pageouts; static int lowmem_period = 10; static time_t lowmem_uptime; +static int swapdev_enabled; #if defined(NO_SWAPPING) static int vm_swap_enabled = 0; @@ -568,12 +569,24 @@ vm_pageout_flush(vm_page_t *mc, int coun case VM_PAGER_ERROR: case VM_PAGER_FAIL: /* - * If the page couldn't be paged out, then reactivate - * it so that it doesn't clog the laundry and inactive - * queues. (We will try paging it out again later). + * If the page couldn't be paged out to swap because the + * pager wasn't able to find space, place the page in + * the PQ_UNSWAPPABLE holding queue. This is an + * optimization that prevents the page daemon from + * wasting CPU cycles on pages that cannot be reclaimed + * becase no swap device is configured. + * + * Otherwise, reactivate the page so that it doesn't + * clog the laundry and inactive queues. (We will try + * paging it out again later.) */ vm_page_lock(mt); - vm_page_activate(mt); + if (object->type == OBJT_SWAP && + pageout_status[i] == VM_PAGER_FAIL) { + vm_page_unswappable(mt); + numpagedout++; + } else + vm_page_activate(mt); vm_page_unlock(mt); if (eio != NULL && i >= mreq && i - mreq < runlen) *eio = TRUE; @@ -600,6 +613,21 @@ vm_pageout_flush(vm_page_t *mc, int coun return (numpagedout); } +static void +vm_pageout_swapon(void *arg __unused, struct swdevt *sp __unused) +{ + + atomic_store_rel_int(&swapdev_enabled, 1); +} + +static void +vm_pageout_swapoff(void *arg __unused, struct swdevt *sp __unused) +{ + + if (swap_pager_nswapdev() == 1) + atomic_store_rel_int(&swapdev_enabled, 0); +} + #if !defined(NO_SWAPPING) /* * vm_pageout_object_deactivate_pages @@ -893,7 +921,7 @@ vm_pageout_launder(struct vm_domain *vmd vnodes_skipped = 0; /* - * Scan the laundry queue for pages eligible to be laundered. We stop + * Scan the laundry queues for pages eligible to be laundered. We stop * once the target number of dirty pages have been laundered, or once * we've reached the end of the queue. A single iteration of this loop * may cause more than one page to be laundered because of clustering. @@ -901,11 +929,18 @@ vm_pageout_launder(struct vm_domain *vmd * maxscan ensures that we don't re-examine requeued pages. Any * additional pages written as part of a cluster are subtracted from * maxscan since they must be taken from the laundry queue. + * + * As an optimization, we avoid laundering from PQ_UNSWAPPABLE when no + * swap devices are configured. */ - pq = &vmd->vmd_pagequeues[PQ_LAUNDRY]; - maxscan = pq->pq_cnt; + if (atomic_load_acq_int(&swapdev_enabled)) + pq = &vmd->vmd_pagequeues[PQ_UNSWAPPABLE]; + else + pq = &vmd->vmd_pagequeues[PQ_LAUNDRY]; +scan: vm_pagequeue_lock(pq); + maxscan = pq->pq_cnt; queue_locked = true; for (m = TAILQ_FIRST(&pq->pq_pl); m != NULL && maxscan-- > 0 && launder > 0; @@ -1070,6 +1105,11 @@ relock_queue: } vm_pagequeue_unlock(pq); + if (launder > 0 && pq == &vmd->vmd_pagequeues[PQ_UNSWAPPABLE]) { + pq = &vmd->vmd_pagequeues[PQ_LAUNDRY]; + goto scan; + } + /* * Wakeup the sync daemon if we skipped a vnode in a writeable object * and we didn't launder enough pages. @@ -1132,6 +1172,14 @@ vm_pageout_laundry_worker(void *arg) last_launder = 0; /* + * Calls to these handlers are serialized by the swap syscall lock. + */ + (void)EVENTHANDLER_REGISTER(swapon, vm_pageout_swapon, domain, + EVENTHANDLER_PRI_ANY); + (void)EVENTHANDLER_REGISTER(swapoff, vm_pageout_swapoff, domain, + EVENTHANDLER_PRI_ANY); + + /* * The pageout laundry worker is never done, so loop forever. */ for (;;) { @@ -1492,18 +1540,22 @@ drop_page: /* * Wake up the laundry thread so that it can perform any needed * laundering. If we didn't meet our target, we're in shortfall and - * need to launder more aggressively. + * need to launder more aggressively. If PQ_LAUNDRY is empty and no + * swap devices are configured, the laundry thread has no work to do, so + * don't bother waking it up. */ if (vm_laundry_request == VM_LAUNDRY_IDLE && starting_page_shortage > 0) { pq = &vm_dom[0].vmd_pagequeues[PQ_LAUNDRY]; vm_pagequeue_lock(pq); - if (page_shortage > 0) { - vm_laundry_request = VM_LAUNDRY_SHORTFALL; - PCPU_INC(cnt.v_pdshortfalls); - } else if (vm_laundry_request != VM_LAUNDRY_SHORTFALL) - vm_laundry_request = VM_LAUNDRY_BACKGROUND; - wakeup(&vm_laundry_request); + if (pq->pq_cnt > 0 || atomic_load_acq_int(&swapdev_enabled)) { + if (page_shortage > 0) { + vm_laundry_request = VM_LAUNDRY_SHORTFALL; + PCPU_INC(cnt.v_pdshortfalls); + } else if (vm_laundry_request != VM_LAUNDRY_SHORTFALL) + vm_laundry_request = VM_LAUNDRY_BACKGROUND; + wakeup(&vm_laundry_request); + } vm_pagequeue_unlock(pq); } From owner-svn-src-head@freebsd.org Tue Jan 3 00:24:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F1A5C9CE29; Tue, 3 Jan 2017 00:24:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BC671F0C; Tue, 3 Jan 2017 00:24:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v030ODOV080292; Tue, 3 Jan 2017 00:24:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v030ODW1080291; Tue, 3 Jan 2017 00:24:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701030024.v030ODW1080291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Jan 2017 00:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311148 - head/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 00:24:14 -0000 Author: markj Date: Tue Jan 3 00:24:12 2017 New Revision: 311148 URL: https://svnweb.freebsd.org/changeset/base/311148 Log: Remove the "unused" DIF subroutine index left after r308582. These indices are input to a build-time script that generates code to validate subroutine names. Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Tue Jan 3 00:05:44 2017 (r311147) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Tue Jan 3 00:24:12 2017 (r311148) @@ -306,15 +306,14 @@ typedef enum dtrace_probespec { #define DIF_SUBR_TOUPPER 44 #define DIF_SUBR_TOLOWER 45 #define DIF_SUBR_MEMREF 46 -#define DIF_SUBR_UNUSED 47 -#define DIF_SUBR_SX_SHARED_HELD 48 -#define DIF_SUBR_SX_EXCLUSIVE_HELD 49 -#define DIF_SUBR_SX_ISEXCLUSIVE 50 -#define DIF_SUBR_MEMSTR 51 -#define DIF_SUBR_GETF 52 -#define DIF_SUBR_JSON 53 -#define DIF_SUBR_STRTOLL 54 -#define DIF_SUBR_MAX 54 /* max subroutine value */ +#define DIF_SUBR_SX_SHARED_HELD 47 +#define DIF_SUBR_SX_EXCLUSIVE_HELD 48 +#define DIF_SUBR_SX_ISEXCLUSIVE 49 +#define DIF_SUBR_MEMSTR 50 +#define DIF_SUBR_GETF 51 +#define DIF_SUBR_JSON 52 +#define DIF_SUBR_STRTOLL 53 +#define DIF_SUBR_MAX 53 /* max subroutine value */ typedef uint32_t dif_instr_t; From owner-svn-src-head@freebsd.org Tue Jan 3 00:45:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD3DDC9B620 for ; Tue, 3 Jan 2017 00:45:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm7-vm0.bullet.mail.ne1.yahoo.com (nm7-vm0.bullet.mail.ne1.yahoo.com [98.138.91.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80ACE1CB9 for ; Tue, 3 Jan 2017 00:45:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1483403986; bh=Dandy6Z8LhjLcHJEy/t6uHfpB8Bcn00qJc3DygJ9/0c=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=lrw9Mo1rkUJ/dqS3WRz2D66DCLaH3gIdFYmFqJXje6vRsdiTCtFA3+qoxitIAiJKgrh1klsffawjkhgy2mBTv93AYUftd6IWQj0Me9GSAJXkzNtvaOBuVj68uI7emj6RGpmxruG2HXZsiHMi2E+C6acJnfJdk8mLKS8dTc9+VBvbDtRIwI6viaVR5xRF8B9tZLLfvOj4xY3lUWraNYd7RlCAVOEz1/WVb9MuKjeHC6iUhSwPYX2Q3D5bYUkfrZzcT1zAEuG3XT0dhCzNZEHiZoiZyMomQzAq3gypgwLEnTPjgLIbrBZJEbFKSodvhAsMB9fV7YiyDA4C0Pr8JuLBFQ== Received: from [98.138.100.102] by nm7.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 00:39:46 -0000 Received: from [98.138.226.30] by tm101.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 00:39:46 -0000 Received: from [127.0.0.1] by smtp201.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 00:39:46 -0000 X-Yahoo-Newman-Id: 299529.20774.bm@smtp201.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: KMkfsoMVM1l7.VBwPaAqKAnreKJ.Hd9DfHk4lamHHaGjlEE cexnM8pXHuHZT3w7jSz1s650rQqiRr2k3uvW14_5ImOJbF7aTmFEqL8nc9Rw byp8zSlsTyHP4q1NMfQ_dB8_ZxQjpg2.86l3En2EJF_Bjiay17SQRq1MpgH2 sI2p6sg3Vtnp2TZbTEbpoZ4cGAeDA1JrxMkOBGueK1bm_M046G42INTnGgHX hVCdBDXc954cxGZepMjySUmhfBGmgZlmsbr6tGd3tBx4rnrkR.IIE3JJnpyg Zsn6QBCJ0EwgkHG.2KY40yysE4oXDkUg.ADKlG.0.cTOHniL0g.MSDEnn6Uz lpJ3iZYNKbCz.5BjQTxcch4vuLny0S7g1aDTGRxLuEovXVq3RksrcLXyj1Fk z0.dfziIpeW6v_Bl8xaL14h8_WCxqZ981qCQetO51wQ1n_iaBbCVYRqrjeUY 6M1.68aT_TknoZ3ykxIg3PKTcsL4sApmUxSANkOEji8Z0AceZ4mxSs7pXB9c tgeIjuQ4i2_xiwmpGCaEcyNMnRtDWxj3EMZiSia9.TJ_ylTg- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r311109 - head/usr.bin/patch To: Conrad Meyer References: <201701021823.v02INWXc028047@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <9c3fc378-ee5e-19ba-c286-1440d4b13615@FreeBSD.org> Date: Mon, 2 Jan 2017 19:41:26 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 00:45:30 -0000 On 01/02/17 17:54, Conrad Meyer wrote: > I was suggesting using UINT32_MAX/2 on all platforms (which is safe > everywhere). > Ah OK. INT_MAX is ~ (UINT_MAX / 2) so it's the same to use either. I just think it's clearer to use INT_MAX and the corresponding int type. The other issue is if diff(1) can handle such lines(?). Pedro. > Best, > Conrad > > On Mon, Jan 2, 2017 at 11:48 AM Pedro Giffuni > wrote: > > Hi; > > > > On 01/02/17 13:28, Conrad Meyer wrote: > > > IMO this patch was mostly fine, you just need to restrict line length > > > to UINT32_MAX/2 instead of UINT_MAX (== UINT32_MAX) for 32-bit > > > platforms. > > > > > > Best, > > > Conrad > > > > > > > I dislike the idea of special cases for some platforms. I guess moving > > to int/INT_MAX would be the way to go. > > > > TBH, no one has asked for patches wider than USHRT_MAX though. > > > > Pedro. > From owner-svn-src-head@freebsd.org Tue Jan 3 01:39:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35890C9B552; Tue, 3 Jan 2017 01:39:07 +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 EA803177F; Tue, 3 Jan 2017 01:39:06 +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 v031d659009352; Tue, 3 Jan 2017 01:39:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v031d5t0009343; Tue, 3 Jan 2017 01:39:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701030139.v031d5t0009343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 3 Jan 2017 01:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311151 - in head: . lib/libsysdecode usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 01:39:07 -0000 Author: jhb Date: Tue Jan 3 01:39:05 2017 New Revision: 311151 URL: https://svnweb.freebsd.org/changeset/base/311151 Log: Update libsysdecode for getfsstat() 'flags' argument changing to 'mode'. As a followup to r310638, update libsysdecode (and kdump) to decode the 'mode' argument to getfsstat(). sysdecode_getfsstat_flags() has been renamed to sysdecode_getfsstat_mode() and now treats the argument as an enumerated value rather than a mask of flags. Modified: head/ObsoleteFiles.inc head/lib/libsysdecode/Makefile head/lib/libsysdecode/flags.c head/lib/libsysdecode/mktables head/lib/libsysdecode/sysdecode.h head/lib/libsysdecode/sysdecode_enum.3 head/lib/libsysdecode/sysdecode_mask.3 head/usr.bin/kdump/kdump.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jan 3 00:26:10 2017 (r311150) +++ head/ObsoleteFiles.inc Tue Jan 3 01:39:05 2017 (r311151) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170102: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode() +OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz # 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu # 20161229: Three files from gnop tests consolidated into one Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Tue Jan 3 00:26:10 2017 (r311150) +++ head/lib/libsysdecode/Makefile Tue Jan 3 01:39:05 2017 (r311151) @@ -30,6 +30,7 @@ MLINKS+=sysdecode_enum.3 sysdecode_aclty sysdecode_enum.3 sysdecode_extattrnamespace.3 \ sysdecode_enum.3 sysdecode_fadvice.3 \ sysdecode_enum.3 sysdecode_fcntl_cmd.3 \ + sysdecode_enum.3 sysdecode_getfsstat_mode.3 \ sysdecode_enum.3 sysdecode_idtype.3 \ sysdecode_enum.3 sysdecode_ipproto.3 \ sysdecode_enum.3 sysdecode_kldsym_cmd.3 \ @@ -70,7 +71,6 @@ MLINKS+=sysdecode_mask.3 sysdecode_acces sysdecode_mask.3 sysdecode_fileflags.3 \ sysdecode_mask.3 sysdecode_filemode.3 \ sysdecode_mask.3 sysdecode_flock_operation.3 \ - sysdecode_mask.3 sysdecode_getfsstat_flags.3 \ sysdecode_mask.3 sysdecode_mlockall_flags.3 \ sysdecode_mask.3 sysdecode_mmap_flags.3 \ sysdecode_mask.3 sysdecode_mmap_prot.3 \ Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Tue Jan 3 00:26:10 2017 (r311150) +++ head/lib/libsysdecode/flags.c Tue Jan 3 01:39:05 2017 (r311151) @@ -472,11 +472,15 @@ sysdecode_flock_operation(FILE *fp, int return (print_mask_int(fp, flockops, operation, rem)); } -bool -sysdecode_getfsstat_flags(FILE *fp, int flags, int *rem) +static struct name_table getfsstatmode[] = { + X(MNT_WAIT) X(MNT_NOWAIT) XEND +}; + +const char * +sysdecode_getfsstat_mode(int mode) { - return (print_mask_int(fp, getfsstatflags, flags, rem)); + return (lookup_value(getfsstatmode, mode)); } const char * Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Tue Jan 3 00:26:10 2017 (r311150) +++ head/lib/libsysdecode/mktables Tue Jan 3 01:39:05 2017 (r311151) @@ -94,7 +94,6 @@ gen_table "extattrns" "EXTATTR_NAM gen_table "fadvisebehav" "POSIX_FADV_[A-Z]+[[:space:]]+[0-9]+" "sys/fcntl.h" gen_table "openflags" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" "O_RDONLY|O_RDWR|O_WRONLY" gen_table "flockops" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h" -gen_table "getfsstatflags" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h" gen_table "kldsymcmd" "KLDSYM_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" gen_table "kldunloadfflags" "LINKER_UNLOAD_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" gen_table "lio_listiomodes" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h" Modified: head/lib/libsysdecode/sysdecode.h ============================================================================== --- head/lib/libsysdecode/sysdecode.h Tue Jan 3 00:26:10 2017 (r311150) +++ head/lib/libsysdecode/sysdecode.h Tue Jan 3 01:39:05 2017 (r311151) @@ -54,7 +54,7 @@ bool sysdecode_fileflags(FILE *_fp, ffla bool sysdecode_filemode(FILE *_fp, int _mode, int *_rem); bool sysdecode_flock_operation(FILE *_fp, int _operation, int *_rem); int sysdecode_freebsd_to_abi_errno(enum sysdecode_abi _abi, int _error); -bool sysdecode_getfsstat_flags(FILE *_fp, int _flags, int *_rem); +const char *sysdecode_getfsstat_mode(int _mode); const char *sysdecode_idtype(int _idtype); const char *sysdecode_ioctlname(unsigned long _val); const char *sysdecode_ipproto(int _protocol); Modified: head/lib/libsysdecode/sysdecode_enum.3 ============================================================================== --- head/lib/libsysdecode/sysdecode_enum.3 Tue Jan 3 00:26:10 2017 (r311150) +++ head/lib/libsysdecode/sysdecode_enum.3 Tue Jan 3 01:39:05 2017 (r311151) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2016 +.Dd January 2, 2017 .Dt sysdecode_enum 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm sysdecode_extattrnamespace , .Nm sysdecode_fadvice , .Nm sysdecode_fcntl_cmd , +.Nm sysdecode_getfsstat_mode , .Nm sysdecode_idtype , .Nm sysdecode_ipproto , .Nm sysdecode_kldsym_cmd , @@ -86,6 +87,8 @@ .Ft const char * .Fn sysdecode_fcntl_cmd "int cmd" .Ft const char * +.Fn sysdecode_getfsstat_mode "int mode" +.Ft const char * .Fn sysdecode_idtype "int idtype" .Ft const char * .Fn sysdecode_ipproto "int protocol" @@ -168,6 +171,7 @@ Most of these functions decode an argume .It Fn sysdecode_extattrnamespace Ta Xr extattr_get_fd 2 Ta Fa attrnamespace .It Fn sysdecode_fadvice Ta Xr posix_fadvise 2 Ta Fa advice .It Fn sysdecode_fcntl_cmd Ta Xr fcntl 2 Ta Fa cmd +.It Fn sysdecode_getfsstat_mode Ta Xr getfsstat 2 Ta Fa mode .It Fn sysdecode_idtype Ta .Xr procctl 2 , .Xr waitid 2 Modified: head/lib/libsysdecode/sysdecode_mask.3 ============================================================================== --- head/lib/libsysdecode/sysdecode_mask.3 Tue Jan 3 00:26:10 2017 (r311150) +++ head/lib/libsysdecode/sysdecode_mask.3 Tue Jan 3 01:39:05 2017 (r311151) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2016 +.Dd January 2, 2017 .Dt sysdecode_mask 3 .Os .Sh NAME @@ -36,7 +36,6 @@ .Nm sysdecode_fileflags , .Nm sysdecode_filemode , .Nm sysdecode_flock_operation , -.Nm sysdecode_getfsstat_flags , .Nm sysdecode_mlockall_flags , .Nm sysdecode_mmap_flags , .Nm sysdecode_mmap_prot , @@ -153,7 +152,6 @@ Most of these functions decode an argume .It Fn sysdecode_fileflags Ta Xr chflags 2 Ta Fa flags .It Fn sysdecode_filemode Ta Xr chmod 2 , Xr open 2 Ta mode .It Fn sysdecode_flock_operation Ta Xr flock 2 Ta Fa operation -.It Fn sysdecode_getfsstat_flags Ta Xr getfsstatflags 2 Ta Fa flags .It Fn sysdecode_mlockall_flags Ta Xr mlockall 2 Ta Fa flags .It Fn sysdecode_mmap_flags Ta Xr mmap 2 Ta Fa flags .It Fn sysdecode_mmap_prot Ta Xr mmap 2 Ta Fa prot Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Jan 3 00:26:10 2017 (r311150) +++ head/usr.bin/kdump/kdump.c Tue Jan 3 01:39:05 2017 (r311151) @@ -943,7 +943,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_getfsstat_flags, *ip); + print_integer_arg(sysdecode_getfsstat_mode, *ip); ip++; narg--; break; From owner-svn-src-head@freebsd.org Tue Jan 3 10:26:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA4CFC9D2E7; Tue, 3 Jan 2017 10:26:28 +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 4F7BF1D31; Tue, 3 Jan 2017 10:26:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v03AQMAP056058 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 3 Jan 2017 12:26:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v03AQMAP056058 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v03AQMVj056057; Tue, 3 Jan 2017 12:26:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 3 Jan 2017 12:26:22 +0200 From: Konstantin Belousov To: Pedro Giffuni Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311109 - head/usr.bin/patch Message-ID: <20170103102622.GO1923@kib.kiev.ua> References: <201701021823.v02INWXc028047@repo.freebsd.org> <9c3fc378-ee5e-19ba-c286-1440d4b13615@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c3fc378-ee5e-19ba-c286-1440d4b13615@FreeBSD.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 10:26:28 -0000 On Mon, Jan 02, 2017 at 07:41:26PM -0500, Pedro Giffuni wrote: > > > On 01/02/17 17:54, Conrad Meyer wrote: > > I was suggesting using UINT32_MAX/2 on all platforms (which is safe > > everywhere). > > > > Ah OK. INT_MAX is ~ (UINT_MAX / 2) so it's the same to use either. > I just think it's clearer to use INT_MAX and the corresponding int > type. > > The other issue is if diff(1) can handle such lines(?). Of course it cannot, on ILP32 arches. From owner-svn-src-head@freebsd.org Tue Jan 3 14:52:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3455C9CFBF; Tue, 3 Jan 2017 14:52:40 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82E011956; Tue, 3 Jan 2017 14:52:40 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03Eqdkp039286; Tue, 3 Jan 2017 14:52:39 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03Eqdrt039285; Tue, 3 Jan 2017 14:52:39 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701031452.v03Eqdrt039285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 3 Jan 2017 14:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311154 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 14:52:40 -0000 Author: sbruno Date: Tue Jan 3 14:52:39 2017 New Revision: 311154 URL: https://svnweb.freebsd.org/changeset/base/311154 Log: Restore r302384 that was dropped when r303816 updated the driver to 1.6.6.-k Original log: Do not initialize the adapter on MTU change when adapter status is down. This fixes long-standing problems when changing settings of the adapter. Discussed in: https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html Reported by: Franco Fichtner MFH: 2 days Modified: head/sys/dev/ixl/ixl_pf_main.c Modified: head/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- head/sys/dev/ixl/ixl_pf_main.c Tue Jan 3 05:44:24 2017 (r311153) +++ head/sys/dev/ixl/ixl_pf_main.c Tue Jan 3 14:52:39 2017 (r311154) @@ -4927,7 +4927,8 @@ ixl_ioctl(struct ifnet * ifp, u_long com vsi->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; - ixl_init_locked(pf); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixl_init_locked(pf); IXL_PF_UNLOCK(pf); } break; From owner-svn-src-head@freebsd.org Tue Jan 3 15:52:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14AF7C9D3DF for ; Tue, 3 Jan 2017 15:52:12 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E249B1DC7 for ; Tue, 3 Jan 2017 15:52:11 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 8aaf21d1-d1cc-11e6-acc0-c7e6c9ad01d6 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 8aaf21d1-d1cc-11e6-acc0-c7e6c9ad01d6; Tue, 03 Jan 2017 15:51:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v03Fq3vN000939; Tue, 3 Jan 2017 08:52:03 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1483458723.16152.107.camel@freebsd.org> Subject: Re: svn commit: r311109 - head/usr.bin/patch From: Ian Lepore To: Konstantin Belousov , Pedro Giffuni Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 03 Jan 2017 08:52:03 -0700 In-Reply-To: <20170103102622.GO1923@kib.kiev.ua> References: <201701021823.v02INWXc028047@repo.freebsd.org> <9c3fc378-ee5e-19ba-c286-1440d4b13615@FreeBSD.org> <20170103102622.GO1923@kib.kiev.ua> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 15:52:12 -0000 On Tue, 2017-01-03 at 12:26 +0200, Konstantin Belousov wrote: > On Mon, Jan 02, 2017 at 07:41:26PM -0500, Pedro Giffuni wrote: > > > > > > > > On 01/02/17 17:54, Conrad Meyer wrote: > > > > > > I was suggesting using UINT32_MAX/2 on all platforms (which is > > > safe > > > everywhere). > > > > > Ah OK. INT_MAX is ~ (UINT_MAX / 2) so it's the same to use either. > > I just think it's clearer to use INT_MAX and the corresponding int > > type. > > > > The other issue is if diff(1) can handle such lines(?). > Of course it cannot, on ILP32 arches. > I kind of don't understand the premise of the naysayers in this thread.  Some machines cannot do lines that are UINT_MAX long, so in that case we should not support any lines longer than USHORT_MAX?  As if there aren't *billions* of line length limits to choose from between those two numbers? I'm also trying to picture the real-world need to diff and patch lines of ascii text longer than 64K, but for every problem out there, there is someone with a perverse need to solve that problem outside of the normal lines we all live between. -- Ian From owner-svn-src-head@freebsd.org Tue Jan 3 16:04:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 396EDC9D87B; Tue, 3 Jan 2017 16:04:12 +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 D4CAD1862; Tue, 3 Jan 2017 16:04:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v03G42KB083483 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 3 Jan 2017 18:04:02 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v03G42KB083483 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v03G42lm083482; Tue, 3 Jan 2017 18:04:02 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 3 Jan 2017 18:04:02 +0200 From: Konstantin Belousov To: Ian Lepore Cc: Pedro Giffuni , Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311109 - head/usr.bin/patch Message-ID: <20170103160401.GT1923@kib.kiev.ua> References: <201701021823.v02INWXc028047@repo.freebsd.org> <9c3fc378-ee5e-19ba-c286-1440d4b13615@FreeBSD.org> <20170103102622.GO1923@kib.kiev.ua> <1483458723.16152.107.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1483458723.16152.107.camel@freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 16:04:12 -0000 On Tue, Jan 03, 2017 at 08:52:03AM -0700, Ian Lepore wrote: > On Tue, 2017-01-03 at 12:26 +0200, Konstantin Belousov wrote: > > On Mon, Jan 02, 2017 at 07:41:26PM -0500, Pedro Giffuni wrote: > > > > > > > > > > > > On 01/02/17 17:54, Conrad Meyer wrote: > > > > > > > > I was suggesting using UINT32_MAX/2 on all platforms (which is > > > > safe > > > > everywhere). > > > > > > > Ah OK. INT_MAX is ~ (UINT_MAX / 2) so it's the same to use either. > > > I just think it's clearer to use INT_MAX and the corresponding int > > > type. > > > > > > The other issue is if diff(1) can handle such lines(?). > > Of course it cannot, on ILP32 arches. > > > > I kind of don't understand the premise of the naysayers in this thread. > šSome machines cannot do lines that are UINT_MAX long, so in that case > we should not support any lines longer than USHORT_MAX? šAs if there > aren't *billions* of line length limits to choose from between those > two numbers? > > I'm also trying to picture the real-world need to diff and patch lines > of ascii text longer than 64K, but for every problem out there, there > is someone with a perverse need to solve that problem outside of the > normal lines we all live between. The original disallow of lines longer than USHORT_MAX can be reasonably interpreted as an attempt to only process patches which have sensible data. The test for UINT_MAX or INT_MAX have no sense at all: what should that check prevent ? On 32bit arches, malloc(3) is guaranteed to fail for such large requests (for typical memory maps, malloc(3) would be unable to allocate even 1G), for 64bit arches this is still an artificial limitation. Might be this is an attempt to provide DoS mitigation ? It is probably too naive for that. In other words, I do see some reasoning in UINT_SHORT limit, is it useful goal or not, is another question. While the check for INT_MAX does not provide any value, IMO. From owner-svn-src-head@freebsd.org Tue Jan 3 16:06:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB1C7C9DA6A for ; Tue, 3 Jan 2017 16:06:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm23-vm0.bullet.mail.ne1.yahoo.com (nm23-vm0.bullet.mail.ne1.yahoo.com [98.138.91.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93FF41D81 for ; Tue, 3 Jan 2017 16:06:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1483459608; bh=pFGRsLsJszRZPOVsoMPe8O9pwVwHgtA2OXWZa949+oE=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=nY2CxHe9grdGKZnMde0tJOUMWtFKwr+NGDE5phRtG+CboxU8FOEo7k1baLlQ2PjnJ1nmDwg06By4ECCLBVK8e4e36OQNTPnE2WKRv8VqLLQrK7RLqeCdtslMOXIRIAcle8+5nbAABjl9pBIQHQpec6B9JbzVhEdOhKVb3us0EP/Q+OSNZm0uIIMfyzJxtwbAtNKtT9//2YcfarGNwkDfuRBlLJo4qAOhVWxdXL3TBjg1+XHLymPNJob4KjzEGdtucXDXPSI/l3oX4F7h4DvUHBo0yqXQqLLWenXvJfdcPMZwMlPDs7aA3poOw5wgRX3mdtzKE10O3cf+8gxor6+FpQ== Received: from [98.138.101.128] by nm23.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 16:06:48 -0000 Received: from [98.138.84.37] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 16:06:48 -0000 Received: from [127.0.0.1] by smtp105.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 16:06:48 -0000 X-Yahoo-Newman-Id: 73210.53980.bm@smtp105.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: G416mMYVM1lzrjc0usXN_q_HQVor9k.RE1rU9U9MQ8MY_JL UAya2AsdfYdQ6TU26bhYlJiVnDdHG0y8mGwXO3XG5mzEn1JaHNb6P8v2OLbf YIQs.6WTFVThe.9UPrWnECdTf13TmkahVfLcAdqGlvIZfNPJDa2cVx3LgukH RNPnNGaB8_MZTdA0Pn0RthdG3lGPFSy8xK8tiWx5K3beG9y_MwY_uQO5Q7pu VSlVdidkgUJrQxkjAbTztfpXY4FnrPtO25qiJyZ_8kLxCfhXJ6DdwjjnGTK6 6hQdsB0.IiLq00tm05gtSLKWidxQJhoea5EA3GXQ5qVbnR3HxWmKbUOu8TJf LGuPJp6CZOcqEiCD4Uc1j7gJD6YqA34OxySZ_P51M9iuK7Fg4ybYbLmGu_EC jBnTUAaRYDq56LGrcI42ad1wufFIEv3zeDeT9ztwDMmGrRkrkpsEEmR61DcH rL7XIFhGsdrlOWhz2R53JsnELjLq6QOxmU1kAOHjNkOhcL7nTVmokBYwdun6 fTpKUCwCAkImTHnempiTbK1BIw1T01EJYl0yn.e4h9WzMfh8- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r311109 - head/usr.bin/patch To: Ian Lepore , Konstantin Belousov References: <201701021823.v02INWXc028047@repo.freebsd.org> <9c3fc378-ee5e-19ba-c286-1440d4b13615@FreeBSD.org> <20170103102622.GO1923@kib.kiev.ua> <1483458723.16152.107.camel@freebsd.org> Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <385c8ef6-32b9-c703-14d8-2c10f5816b44@FreeBSD.org> Date: Tue, 3 Jan 2017 11:08:28 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1483458723.16152.107.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 16:06:55 -0000 Hi Ian; On 01/03/17 10:52, Ian Lepore wrote: > On Tue, 2017-01-03 at 12:26 +0200, Konstantin Belousov wrote: >> On Mon, Jan 02, 2017 at 07:41:26PM -0500, Pedro Giffuni wrote: >>> >>> >>> >>> On 01/02/17 17:54, Conrad Meyer wrote: >>>> >>>> I was suggesting using UINT32_MAX/2 on all platforms (which is >>>> safe >>>> everywhere). >>>> >>> Ah OK. INT_MAX is ~ (UINT_MAX / 2) so it's the same to use either. >>> I just think it's clearer to use INT_MAX and the corresponding int >>> type. >>> >>> The other issue is if diff(1) can handle such lines(?). >> Of course it cannot, on ILP32 arches. >> > > I kind of don't understand the premise of the naysayers in this thread. > Some machines cannot do lines that are UINT_MAX long, so in that case > we should not support any lines longer than USHORT_MAX? As if there > aren't *billions* of line length limits to choose from between those > two numbers? > I am considering INT_MAX, which, I think can be reasonably supported by all archs. I looked briefly at GNU diff, and it has a way of specifying the width. It does look like it can handle ints but the default is 130. So yes, it seems supporting something larger than USHORT_MAX may be useful in these "big data" era but it's not urgent. > I'm also trying to picture the real-world need to diff and patch lines > of ascii text longer than 64K, but for every problem out there, there > is someone with a perverse need to solve that problem outside of the > normal lines we all live between. > Pedro. > -- Ian > From owner-svn-src-head@freebsd.org Tue Jan 3 16:25:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 703BEC9D61A for ; Tue, 3 Jan 2017 16:25:53 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm15-vm2.bullet.mail.ne1.yahoo.com (nm15-vm2.bullet.mail.ne1.yahoo.com [98.138.91.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41CDB1EF1 for ; Tue, 3 Jan 2017 16:25:53 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1483460932; bh=A2BbaeLK8hnAH2NBMF2aib0Lr12GVtpkufy0rrRrkDU=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=SstYwXCkwQdOdEfvGo/vjiGQaDmv/aETbSwt4E/lk3Zwi5x8ZaFgSCDvTRvmSRuMn0yBkpo+ItS/PKtDfI4LzDlBlTwSg5Ow2z7JifK6cT0ZQ6x4p6kYDQk3/e40S8f9Y4rMeHch1xXkp2A4mSrUGepibRO9/7DVU+pSTPGqRm/FgE314UX8eYWOZF7F/3RzaFmeVo6r5Qo2MNCJpm9wYQ+zEFQ8+CvSP7Av8YDtF0rhzNxGisPsgIa/u3IkPorWXTBOulQUp71FhFCI3XtEwJakgnJJDpOSLMrnoOeN7kjINHU3Osn+D97vo332hKj8zXu8eMETDwZ18fBYsfUQog== Received: from [98.138.100.113] by nm15.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 16:28:52 -0000 Received: from [98.138.226.60] by tm104.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 16:25:46 -0000 Received: from [127.0.0.1] by smtp211.mail.ne1.yahoo.com with NNFMP; 03 Jan 2017 16:25:46 -0000 X-Yahoo-Newman-Id: 650834.75363.bm@smtp211.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: A00o1msVM1mjEmwiK2Rexvx8VnW3W.rcErgxbBAHcqXH0L6 Zc3wyV2x6bOteitc0mPcFS4Yvj6OK0euRPHMpR9irCc3IfFEPDNABOuUOy7M jVwp87ClKf1xs5NMyA1E.YdPmEqkLpcaLqjO5GsG6JX1ApmRwhJxjGazLfi7 atmB7uahg6L5Orn2Tpm_g.M2ydrMNjywzF1_AbFd0LfJVAWKfG3dO7D4GPON XG_5bQwVR.aNAXwgbmdlesImb7DOBHqzL0YMMUBhwwRQVIXQhfsPNzABxK38 vyuRaD_9Zt30PxLkR5b5uPfdR4VDGFMiI4cpBDUHSR_f9riXW7XHty3x10Lk dXG6fROgsf5ivDs.W6C672VUZhLe7d1Ap7BoxaSxGmRn9VDpe3LATIQPfSno WmA3DYE4vG4uA8U3HMFPNyUU6aB1YVvDd8p5Fs9hFb.HHAfp_zf_Roj0o4hR 5cpTbCch5D3PFHMmBVWyxt2qVwRP_97T089kB_mwMuR7inB0AX3uBb_BY8fR TXlm8scT4NH5BqdAMK00mdm13PoZ7weZFSg2qfdlbN_rVVes- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r311109 - head/usr.bin/patch To: Konstantin Belousov , Ian Lepore References: <201701021823.v02INWXc028047@repo.freebsd.org> <9c3fc378-ee5e-19ba-c286-1440d4b13615@FreeBSD.org> <20170103102622.GO1923@kib.kiev.ua> <1483458723.16152.107.camel@freebsd.org> <20170103160401.GT1923@kib.kiev.ua> Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: Date: Tue, 3 Jan 2017 11:27:28 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170103160401.GT1923@kib.kiev.ua> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 16:25:53 -0000 On 01/03/17 11:04, Konstantin Belousov wrote: > On Tue, Jan 03, 2017 at 08:52:03AM -0700, Ian Lepore wrote: >> On Tue, 2017-01-03 at 12:26 +0200, Konstantin Belousov wrote: >>> On Mon, Jan 02, 2017 at 07:41:26PM -0500, Pedro Giffuni wrote: >>>> >>>> >>>> >>>> On 01/02/17 17:54, Conrad Meyer wrote: >>>>> >>>>> I was suggesting using UINT32_MAX/2 on all platforms (which is >>>>> safe >>>>> everywhere). >>>>> >>>> Ah OK. INT_MAX is ~ (UINT_MAX / 2) so it's the same to use either. >>>> I just think it's clearer to use INT_MAX and the corresponding int >>>> type. >>>> >>>> The other issue is if diff(1) can handle such lines(?). >>> Of course it cannot, on ILP32 arches. >>> >> >> I kind of don't understand the premise of the naysayers in this thread. >> Some machines cannot do lines that are UINT_MAX long, so in that case >> we should not support any lines longer than USHORT_MAX? As if there >> aren't *billions* of line length limits to choose from between those >> two numbers? >> >> I'm also trying to picture the real-world need to diff and patch lines >> of ascii text longer than 64K, but for every problem out there, there >> is someone with a perverse need to solve that problem outside of the >> normal lines we all live between. > > The original disallow of lines longer than USHORT_MAX can be reasonably > interpreted as an attempt to only process patches which have sensible > data. The test for UINT_MAX or INT_MAX have no sense at all: what > should that check prevent ? On 32bit arches, malloc(3) is guaranteed > to fail for such large requests (for typical memory maps, malloc(3) > would be unable to allocate even 1G), for 64bit arches this is still an > artificial limitation. > I think this is a valid reason to leave things as they are. FWIW, both NetBSD and OpenBSD seem be fine with just SHORT_MAX. Given the default width in GNU diff is 130, exceeding USHORT_MAX means the tool is not being used for code. As you say, another question is if we should be limiting the use of patch(1) for code only. > Might be this is an attempt to provide DoS mitigation ? It is > probably too naive for that. > > In other words, I do see some reasoning in UINT_SHORT limit, is it useful > goal or not, is another question. While the check for INT_MAX does not > provide any value, IMO. > The check is basically a post-mortem attempt, it is of little relevance and the other BSDs don't have it. Pedro. From owner-svn-src-head@freebsd.org Tue Jan 3 16:46:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E9C7C9D03F; Tue, 3 Jan 2017 16:46:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68F2C10A7; Tue, 3 Jan 2017 16:46:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03Gkpig084055; Tue, 3 Jan 2017 16:46:51 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03GkpJf084054; Tue, 3 Jan 2017 16:46:51 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701031646.v03GkpJf084054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 3 Jan 2017 16:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311157 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 16:46:52 -0000 Author: loos Date: Tue Jan 3 16:46:51 2017 New Revision: 311157 URL: https://svnweb.freebsd.org/changeset/base/311157 Log: Remove a GPL licensed DTS. The micro-Firewall DTS is now a single BSD licensed file. Reported by: manu Obtained from: pfSense MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Deleted: head/sys/boot/fdt/dts/arm/ubmc.dtsi Modified: head/sys/boot/fdt/dts/arm/ufw.dts Modified: head/sys/boot/fdt/dts/arm/ufw.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/ufw.dts Tue Jan 3 15:59:39 2017 (r311156) +++ head/sys/boot/fdt/dts/arm/ufw.dts Tue Jan 3 16:46:51 2017 (r311157) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Rubicon Communications, LLC (Netgate) + * Copyright (c) 2016, 2017 Rubicon Communications, LLC (Netgate) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,11 +29,247 @@ /dts-v1/; #include "am33xx.dtsi" -#include "ubmc.dtsi" / { model = "AM335x uFW"; compatible = "ti,am335x-ufw", "ti,am335x-ubmc", "ti,am33xx"; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + vmmcsd_fixed: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&clkout2_pin>; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_ctsn.i2c1_sda */ + AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_rtsn.i2c1_scl */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii_1_txen */ + AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxdv.rgmii_1_rxdv */ + AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii_1_txd3 */ + AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii_1_txd2 */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii_1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii_1_txd0 */ + AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii_1_txclk */ + AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxclk.rgmii_1_rxclk */ + AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd3.rgmii_1_rxd3 */ + AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd2.rgmii_1_rxd2 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd1.rgmii_1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd0.rgmii_1_rxd0 */ + + /* Slave 2 */ + AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gmpc_a0.rgmii_2_txen */ + AM33XX_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE2) /* gmpc_a1.rgmii_2_rxdv */ + AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gmpc_a2.rgmii_2_txd3 */ + AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gmpc_a3.rgmii_2_txd2 */ + AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gmpc_a4.rgmii_2_txd1 */ + AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gmpc_a5.rgmii_2_txd0 */ + AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gmpc_a6.rgmii_2_txclk */ + AM33XX_IOPAD(0x85c, PIN_INPUT_PULLUP | MUX_MODE2) /* gmpc_a7.rgmii_2_rxclk */ + AM33XX_IOPAD(0x860, PIN_INPUT_PULLUP | MUX_MODE2) /* gmpc_a8.rgmii_2_rxd3 */ + AM33XX_IOPAD(0x864, PIN_INPUT_PULLUP | MUX_MODE2) /* gmpc_a9.rgmii_2_rxd2 */ + AM33XX_IOPAD(0x868, PIN_INPUT_PULLUP | MUX_MODE2) /* gmpc_a10.rgmii_2_rxd1 */ + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLUP | MUX_MODE2) /* gmpc_a11.rgmii_2_rxd0 */ + >; + }; + + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ + AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) + + /* Slave 2 reset value */ + AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + davinci_mdio_sleep: davinci_mdio_sleep { + pinctrl-single,pins = < + /* MDIO reset value */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */ + AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */ + AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */ + AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */ + AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */ + AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */ + AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE5) /* spi0_cs1.mmc0_cd */ + >; + }; + + emmc_pins: pinmux_emmc_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x994, PIN_INPUT_PULLUP | MUX_MODE4) /* mcasp0_fsx.mmc1_cd */ + AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ + AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ + AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ + AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ + AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ + AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ + AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ + AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ + AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ + >; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + + status = "okay"; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&usb1 { + status = "okay"; + dr_mode = "host"; +}; + +&cppi41dma { + status = "okay"; +}; + +&cpsw_emac0 { + phy_id = <&davinci_mdio>, <1>; + phy-mode = "rgmii"; + dual_emac_res_vlan = <4071>; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <2>; + phy-mode = "rgmii"; + dual_emac_res_vlan = <4072>; +}; + +&mac { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cpsw_default>; + pinctrl-1 = <&cpsw_sleep>; + active_slave = <1>; + status = "okay"; + dual_emac; + txen-skew-ps = <0>; + rxdv-skew-ps = <1400>; + rxd0-skew-ps = <1400>; + rxd1-skew-ps = <1400>; + rxd2-skew-ps = <1400>; + rxd3-skew-ps = <1400>; + txd0-skew-ps = <0>; + txd1-skew-ps = <0>; + txd2-skew-ps = <0>; + txd3-skew-ps = <0>; + rxc-skew-ps = <4400>; + txc-skew-ps = <6200>; +}; + +&davinci_mdio { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&davinci_mdio_default>; + pinctrl-1 = <&davinci_mdio_sleep>; + status = "okay"; +}; + +&aes { + status = "okay"; +}; + +&sham { + status = "okay"; }; &mmc1 { @@ -60,6 +296,18 @@ pinctrl-0 = <&i2c0_pins>; status = "okay"; + clock-frequency = <400000>; + + baseboard_eeprom: baseboard_eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + + #address-cells = <1>; + #size-cells = <1>; + baseboard_data: baseboard_data@0 { + reg = <0 0x100>; + }; + }; }; &i2c1 { From owner-svn-src-head@freebsd.org Tue Jan 3 17:24:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9132EC9DFAE; Tue, 3 Jan 2017 17:24:57 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60C261C18; Tue, 3 Jan 2017 17:24:57 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03HOueZ001435; Tue, 3 Jan 2017 17:24:56 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03HOuQk001434; Tue, 3 Jan 2017 17:24:56 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201701031724.v03HOuQk001434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 3 Jan 2017 17:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311159 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 17:24:57 -0000 Author: cognet Date: Tue Jan 3 17:24:56 2017 New Revision: 311159 URL: https://svnweb.freebsd.org/changeset/base/311159 Log: In the netfront_rxq struct, we should use NET_RX_RING_SIZE, not NET_TX_RING_SIZE. Reviewed by: royger Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Tue Jan 3 17:16:13 2017 (r311158) +++ head/sys/dev/xen/netfront/netfront.c Tue Jan 3 17:24:56 2017 (r311159) @@ -168,7 +168,7 @@ struct netfront_rxq { xen_intr_handle_t xen_intr_handle; grant_ref_t gref_head; - grant_ref_t grant_ref[NET_TX_RING_SIZE + 1]; + grant_ref_t grant_ref[NET_RX_RING_SIZE + 1]; struct mbuf *mbufs[NET_RX_RING_SIZE + 1]; From owner-svn-src-head@freebsd.org Tue Jan 3 17:35:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A920C9D55C; Tue, 3 Jan 2017 17:35:18 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F10FC1458; Tue, 3 Jan 2017 17:35:17 +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 v03HZHtk005324; Tue, 3 Jan 2017 17:35:17 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03HZHrJ005322; Tue, 3 Jan 2017 17:35:17 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701031735.v03HZHrJ005322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 3 Jan 2017 17:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311160 - head/sys/dev/mpr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 17:35:18 -0000 Author: asomers Date: Tue Jan 3 17:35:16 2017 New Revision: 311160 URL: https://svnweb.freebsd.org/changeset/base/311160 Log: misc minor fixes in mpr(4) sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934) sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935) Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880 Modified: head/sys/dev/mpr/mpr_sas.c head/sys/dev/mpr/mpr_sas_lsi.c Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Tue Jan 3 17:24:56 2017 (r311159) +++ head/sys/dev/mpr/mpr_sas.c Tue Jan 3 17:35:16 2017 (r311160) @@ -1846,8 +1846,12 @@ mprsas_action_scsiio(struct mprsas_softc if (csio->ccb_h.flags & CAM_CDB_POINTER) bcopy(csio->cdb_io.cdb_ptr, &req->CDB.CDB32[0], csio->cdb_len); - else + else { + KASSERT(csio->cdb_len <= IOCDBLEN, + ("cdb_len %d is greater than IOCDBLEN but CAM_CDB_POINTER is not set", + csio->cdb_len)); bcopy(csio->cdb_io.cdb_bytes, &req->CDB.CDB32[0],csio->cdb_len); + } req->IoFlags = htole16(csio->cdb_len); /* @@ -2429,6 +2433,7 @@ mprsas_scsiio_complete(struct mpr_softc * driver is being shutdown. */ if ((csio->cdb_io.cdb_bytes[0] == INQUIRY) && + (csio->data_ptr != NULL) && ((csio->data_ptr[0] & 0x1f) == T_DIRECT) && (sc->mapping_table[target_id].device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE) && Modified: head/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- head/sys/dev/mpr/mpr_sas_lsi.c Tue Jan 3 17:24:56 2017 (r311159) +++ head/sys/dev/mpr/mpr_sas_lsi.c Tue Jan 3 17:35:16 2017 (r311160) @@ -1074,6 +1074,7 @@ out: mpr_free_command(sc, cm); else if (error == 0) error = EWOULDBLOCK; + cm->cm_data = NULL; free(buffer, M_MPR); return (error); } @@ -1214,18 +1215,18 @@ mprsas_SSU_to_SATA_devices(struct mpr_so continue; } - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " - "unit.\n"); - return; - } - /* * The stop_at_shutdown flag will be set if this device is * a SATA direct-access end device. */ if (target->stop_at_shutdown) { + ccb = xpt_alloc_ccb_nowait(); + if (ccb == NULL) { + mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " + "unit.\n"); + return; + } + if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, pathid, targetid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { From owner-svn-src-head@freebsd.org Tue Jan 3 20:59:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B441C9E0B0; Tue, 3 Jan 2017 20:59:52 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE33412C3; Tue, 3 Jan 2017 20:59:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03KxpFV093284; Tue, 3 Jan 2017 20:59:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03Kxpgs093283; Tue, 3 Jan 2017 20:59:51 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701032059.v03Kxpgs093283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 3 Jan 2017 20:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311168 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 20:59:52 -0000 Author: mjg Date: Tue Jan 3 20:59:50 2017 New Revision: 311168 URL: https://svnweb.freebsd.org/changeset/base/311168 Log: Add the upcoming atomic_fcmpset family to the atomic(9) man page. These primitives give the caller the read value if the exchange attempt failed which saves an explicit reload for cmpset loops. The man page was partially submitted by kib. Reviewed by: kib (previous version), jhb (previous version) Modified: head/share/man/man9/atomic.9 Modified: head/share/man/man9/atomic.9 ============================================================================== --- head/share/man/man9/atomic.9 Tue Jan 3 20:28:48 2017 (r311167) +++ head/share/man/man9/atomic.9 Tue Jan 3 20:59:50 2017 (r311168) @@ -23,13 +23,14 @@ .\" .\" $FreeBSD$ .\" -.Dd May 12, 2016 +.Dd Jan 3, 2017 .Dt ATOMIC 9 .Os .Sh NAME .Nm atomic_add , .Nm atomic_clear , .Nm atomic_cmpset , +.Nm atomic_fcmpset , .Nm atomic_fetchadd , .Nm atomic_load , .Nm atomic_readandclear , @@ -50,6 +51,12 @@ .Fa " old" .Fa " new" .Fc +.Ft int +.Fo atomic_fcmpset_[acq_|rel_] +.Fa "volatile *dst" +.Fa " *old" +.Fa " new" +.Fc .Ft .Fn atomic_fetchadd_ "volatile *p" " v" .Ft @@ -228,6 +235,45 @@ functions are not implemented for the ty and .Dq Li 16 . .Bl -hang +.It Fn atomic_fcmpset dst *old new +.El +.Pp +On architectures implementing +.Em Compare And Swap +operation in hardware, the functionality can be described as +.Bd -literal -offset indent -compact +if (*dst == *old) { + *dst = new; + return (1); +} else { + *old = *dst; + return (0); +} +.Ed +On architectures which provide +.Em Load Linked/Store Conditional +primitive, the write to +.Dv *dst +might also fail for several reasons, most important of which +is a parallel write to +.Dv *dst +cache line by other CPU. +In this case +.Fn atomic_fcmpset +function also returns +.Dv false , +despite +.Dl *old == *dst . +.Pp +The +.Fn atomic_fcmpset +functions are not implemented for the types +.Dq Li char , +.Dq Li short , +.Dq Li 8 , +and +.Dq Li 16 . +.Bl -hang .It Fn atomic_fetchadd p v .Bd -literal -compact tmp = *p; @@ -353,6 +399,16 @@ The .Fn atomic_cmpset function returns the result of the compare operation. The +.Fn atomic_fcmpset +function returns +.Dv true +if the operationg succeeded. +Otherwise it returns +.Dv false +and sets +.Va *old +to the found value. +The .Fn atomic_fetchadd , .Fn atomic_load , .Fn atomic_readandclear , From owner-svn-src-head@freebsd.org Tue Jan 3 21:00:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E71E2C9E13C; Tue, 3 Jan 2017 21:00:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1EE714D0; Tue, 3 Jan 2017 21:00:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03L0Ool093392; Tue, 3 Jan 2017 21:00:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03L0Oqj093391; Tue, 3 Jan 2017 21:00:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701032100.v03L0Oqj093391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 3 Jan 2017 21:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311169 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 21:00:26 -0000 Author: mjg Date: Tue Jan 3 21:00:24 2017 New Revision: 311169 URL: https://svnweb.freebsd.org/changeset/base/311169 Log: amd64: add atomic_fcmpset Reviewed by: kib, jhb Modified: head/sys/amd64/include/atomic.h Modified: head/sys/amd64/include/atomic.h ============================================================================== --- head/sys/amd64/include/atomic.h Tue Jan 3 20:59:50 2017 (r311168) +++ head/sys/amd64/include/atomic.h Tue Jan 3 21:00:24 2017 (r311169) @@ -99,6 +99,8 @@ void atomic_##NAME##_barr_##TYPE(volatil int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src); +int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src); +int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src); u_int atomic_fetchadd_int(volatile u_int *p, u_int v); u_long atomic_fetchadd_long(volatile u_long *p, u_long v); int atomic_testandset_int(volatile u_int *p, u_int v); @@ -196,6 +198,42 @@ atomic_cmpset_long(volatile u_long *dst, return (res); } +static __inline int +atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) +{ + u_char res; + + __asm __volatile( + " " MPLOCKED " " + " cmpxchgl %3,%1 ; " + " sete %0 ; " + "# atomic_fcmpset_int" + : "=r" (res), /* 0 */ + "+m" (*dst), /* 1 */ + "+a" (*expect) /* 2 */ + : "r" (src) /* 3 */ + : "memory", "cc"); + return (res); +} + +static __inline int +atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) +{ + u_char res; + + __asm __volatile( + " " MPLOCKED " " + " cmpxchgq %3,%1 ; " + " sete %0 ; " + "# atomic_fcmpset_long" + : "=r" (res), /* 0 */ + "+m" (*dst), /* 1 */ + "+a" (*expect) /* 2 */ + : "r" (src) /* 3 */ + : "memory", "cc"); + return (res); +} + /* * Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. @@ -504,6 +542,8 @@ u_long atomic_swap_long(volatile u_long #define atomic_subtract_rel_int atomic_subtract_barr_int #define atomic_cmpset_acq_int atomic_cmpset_int #define atomic_cmpset_rel_int atomic_cmpset_int +#define atomic_fcmpset_acq_int atomic_fcmpset_int +#define atomic_fcmpset_rel_int atomic_fcmpset_int #define atomic_set_acq_long atomic_set_barr_long #define atomic_set_rel_long atomic_set_barr_long @@ -515,6 +555,8 @@ u_long atomic_swap_long(volatile u_long #define atomic_subtract_rel_long atomic_subtract_barr_long #define atomic_cmpset_acq_long atomic_cmpset_long #define atomic_cmpset_rel_long atomic_cmpset_long +#define atomic_fcmpset_acq_long atomic_fcmpset_long +#define atomic_fcmpset_rel_long atomic_fcmpset_long #define atomic_readandclear_int(p) atomic_swap_int(p, 0) #define atomic_readandclear_long(p) atomic_swap_long(p, 0) @@ -569,6 +611,9 @@ u_long atomic_swap_long(volatile u_long #define atomic_cmpset_32 atomic_cmpset_int #define atomic_cmpset_acq_32 atomic_cmpset_acq_int #define atomic_cmpset_rel_32 atomic_cmpset_rel_int +#define atomic_fcmpset_32 atomic_fcmpset_int +#define atomic_fcmpset_acq_32 atomic_fcmpset_acq_int +#define atomic_fcmpset_rel_32 atomic_fcmpset_rel_int #define atomic_swap_32 atomic_swap_int #define atomic_readandclear_32 atomic_readandclear_int #define atomic_fetchadd_32 atomic_fetchadd_int @@ -593,6 +638,9 @@ u_long atomic_swap_long(volatile u_long #define atomic_cmpset_64 atomic_cmpset_long #define atomic_cmpset_acq_64 atomic_cmpset_acq_long #define atomic_cmpset_rel_64 atomic_cmpset_rel_long +#define atomic_fcmpset_64 atomic_fcmpset_long +#define atomic_fcmpset_acq_64 atomic_fcmpset_acq_long +#define atomic_fcmpset_rel_64 atomic_fcmpset_rel_long #define atomic_swap_64 atomic_swap_long #define atomic_readandclear_64 atomic_readandclear_long #define atomic_fetchadd_64 atomic_fetchadd_long @@ -617,6 +665,9 @@ u_long atomic_swap_long(volatile u_long #define atomic_cmpset_ptr atomic_cmpset_long #define atomic_cmpset_acq_ptr atomic_cmpset_acq_long #define atomic_cmpset_rel_ptr atomic_cmpset_rel_long +#define atomic_fcmpset_ptr atomic_fcmpset_long +#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_long +#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_long #define atomic_swap_ptr atomic_swap_long #define atomic_readandclear_ptr atomic_readandclear_long From owner-svn-src-head@freebsd.org Tue Jan 3 21:02:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B713C9E2BA; Tue, 3 Jan 2017 21:02:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AE1C199B; Tue, 3 Jan 2017 21:02:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03L2Uji096985; Tue, 3 Jan 2017 21:02:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03L2UPb096984; Tue, 3 Jan 2017 21:02:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701032102.v03L2UPb096984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 3 Jan 2017 21:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311170 - head/sys/cddl/compat/opensolaris/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 21:02:31 -0000 Author: mjg Date: Tue Jan 3 21:02:30 2017 New Revision: 311170 URL: https://svnweb.freebsd.org/changeset/base/311170 Log: Revert r309619 "ifndef atomic_cas_* in cddl code" It was a temporary change to ease an import of native atomic_cas primitives. Instead, atomic_fcmpset was devised with different semantics. See r311168. Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/atomic.h Tue Jan 3 21:00:24 2017 (r311169) +++ head/sys/cddl/compat/opensolaris/sys/atomic.h Tue Jan 3 21:02:30 2017 (r311170) @@ -41,15 +41,11 @@ extern void atomic_add_64(volatile uint6 extern void atomic_dec_64(volatile uint64_t *target); #endif #ifndef __sparc64__ -#ifndef atomic_cas_32 extern uint32_t atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval); -#endif -#ifndef atomic_cas_64 extern uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval); #endif -#endif extern uint64_t atomic_add_64_nv(volatile uint64_t *target, int64_t delta); extern uint8_t atomic_or_8_nv(volatile uint8_t *target, uint8_t value); extern void membar_producer(void); @@ -127,7 +123,6 @@ atomic_dec_64_nv(volatile uint64_t *targ return (atomic_add_64_nv(target, -1)); } -#ifndef atomic_cas_ptr #if !defined(COMPAT_32BIT) && defined(__LP64__) static __inline void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) @@ -143,6 +138,5 @@ atomic_cas_ptr(volatile void *target, vo (uint32_t)cmp, (uint32_t)newval)); } #endif /* !defined(COMPAT_32BIT) && defined(__LP64__) */ -#endif #endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */ From owner-svn-src-head@freebsd.org Tue Jan 3 21:11:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DFD5C9E489; Tue, 3 Jan 2017 21:11:31 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47DC012E9; Tue, 3 Jan 2017 21:11:31 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03LBUMr098656; Tue, 3 Jan 2017 21:11:30 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03LBUr6098655; Tue, 3 Jan 2017 21:11:30 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201701032111.v03LBUr6098655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Tue, 3 Jan 2017 21:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311171 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 21:11:31 -0000 Author: bjk (doc committer) Date: Tue Jan 3 21:11:30 2017 New Revision: 311171 URL: https://svnweb.freebsd.org/changeset/base/311171 Log: Fix typo Modified: head/share/man/man9/atomic.9 Modified: head/share/man/man9/atomic.9 ============================================================================== --- head/share/man/man9/atomic.9 Tue Jan 3 21:02:30 2017 (r311170) +++ head/share/man/man9/atomic.9 Tue Jan 3 21:11:30 2017 (r311171) @@ -402,7 +402,7 @@ The .Fn atomic_fcmpset function returns .Dv true -if the operationg succeeded. +if the operation succeeded. Otherwise it returns .Dv false and sets From owner-svn-src-head@freebsd.org Tue Jan 3 21:36:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0C8DC9EC24; Tue, 3 Jan 2017 21:36:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B32A176F; Tue, 3 Jan 2017 21:36:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03LaFg3010316; Tue, 3 Jan 2017 21:36:15 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03LaFCe010314; Tue, 3 Jan 2017 21:36:15 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701032136.v03LaFCe010314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 3 Jan 2017 21:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311172 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 21:36:16 -0000 Author: mjg Date: Tue Jan 3 21:36:15 2017 New Revision: 311172 URL: https://svnweb.freebsd.org/changeset/base/311172 Log: mtx: reduce lock accesses Instead of spuriously re-reading the lock value, read it once. This change also has a side effect of fixing a performance bug: on failed _mtx_obtain_lock, it was possible that re-read would find the lock is unowned, but in this case the primitive would make a trip through turnstile code. This is diff reduction to a variant which uses atomic_fcmpset. Discussed with: jhb (previous version) Tested by: pho (previous version) Modified: head/sys/kern/kern_mutex.c head/sys/sys/mutex.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Jan 3 21:11:30 2017 (r311171) +++ head/sys/kern/kern_mutex.c Tue Jan 3 21:36:15 2017 (r311172) @@ -94,8 +94,6 @@ PMC_SOFT_DEFINE( , , lock, failed); #define mtx_destroyed(m) ((m)->mtx_lock == MTX_DESTROYED) -#define mtx_owner(m) ((struct thread *)((m)->mtx_lock & ~MTX_FLAGMASK)) - static void assert_mtx(const struct lock_object *lock, int what); #ifdef DDB static void db_show_mtx(const struct lock_object *lock); @@ -491,8 +489,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, lock_delay_arg_init(&lda, NULL); #endif m = mtxlock2mtx(c); + v = MTX_READ_VALUE(m); - if (mtx_owned(m)) { + if (__predict_false(lv_mtx_owner(v) == (struct thread *)tid)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || (opts & MTX_RECURSE) != 0, ("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n", @@ -520,8 +519,12 @@ __mtx_lock_sleep(volatile uintptr_t *c, #endif for (;;) { - if (m->mtx_lock == MTX_UNOWNED && _mtx_obtain_lock(m, tid)) - break; + if (v == MTX_UNOWNED) { + if (_mtx_obtain_lock(m, tid)) + break; + v = MTX_READ_VALUE(m); + continue; + } #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif @@ -530,31 +533,30 @@ __mtx_lock_sleep(volatile uintptr_t *c, * If the owner is running on another CPU, spin until the * owner stops running or the state of the lock changes. */ - v = m->mtx_lock; - if (v != MTX_UNOWNED) { - owner = (struct thread *)(v & ~MTX_FLAGMASK); - if (TD_IS_RUNNING(owner)) { - if (LOCK_LOG_TEST(&m->lock_object, 0)) - CTR3(KTR_LOCK, - "%s: spinning on %p held by %p", - __func__, m, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname((struct thread *)tid), - "spinning", "lockname:\"%s\"", - m->lock_object.lo_name); - while (mtx_owner(m) == owner && - TD_IS_RUNNING(owner)) - lock_delay(&lda); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname((struct thread *)tid), - "running"); - continue; - } + owner = lv_mtx_owner(v); + if (TD_IS_RUNNING(owner)) { + if (LOCK_LOG_TEST(&m->lock_object, 0)) + CTR3(KTR_LOCK, + "%s: spinning on %p held by %p", + __func__, m, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", + m->lock_object.lo_name); + do { + lock_delay(&lda); + v = m->mtx_lock; + owner = lv_mtx_owner(v); + } while (v != MTX_UNOWNED && TD_IS_RUNNING(owner)); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "running"); + continue; } #endif ts = turnstile_trywait(&m->lock_object); - v = m->mtx_lock; + v = MTX_READ_VALUE(m); /* * Check if the lock has been released while spinning for @@ -573,7 +575,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, * chain lock. If so, drop the turnstile lock and try * again. */ - owner = (struct thread *)(v & ~MTX_FLAGMASK); + owner = lv_mtx_owner(v); if (TD_IS_RUNNING(owner)) { turnstile_cancel(ts); continue; @@ -588,6 +590,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, if ((v & MTX_CONTESTED) == 0 && !atomic_cmpset_ptr(&m->mtx_lock, v, v | MTX_CONTESTED)) { turnstile_cancel(ts); + v = MTX_READ_VALUE(m); continue; } @@ -618,6 +621,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, sleep_time += lockstat_nsecs(&m->lock_object); sleep_cnt++; #endif + v = MTX_READ_VALUE(m); } #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&m->lock_object); @@ -675,6 +679,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t { struct mtx *m; struct lock_delay_arg lda; + uintptr_t v; #ifdef LOCK_PROFILING int contested = 0; uint64_t waittime = 0; @@ -701,24 +706,30 @@ _mtx_lock_spin_cookie(volatile uintptr_t #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&m->lock_object); #endif + v = MTX_READ_VALUE(m); for (;;) { - if (m->mtx_lock == MTX_UNOWNED && _mtx_obtain_lock(m, tid)) - break; + if (v == MTX_UNOWNED) { + if (_mtx_obtain_lock(m, tid)) + break; + v = MTX_READ_VALUE(m); + continue; + } /* Give interrupts a chance while we spin. */ spinlock_exit(); - while (m->mtx_lock != MTX_UNOWNED) { + do { if (lda.spin_cnt < 10000000) { lock_delay(&lda); - continue; + } else { + lda.spin_cnt++; + if (lda.spin_cnt < 60000000 || kdb_active || + panicstr != NULL) + DELAY(1); + else + _mtx_lock_spin_failed(m); + cpu_spinwait(); } - lda.spin_cnt++; - if (lda.spin_cnt < 60000000 || kdb_active || - panicstr != NULL) - DELAY(1); - else - _mtx_lock_spin_failed(m); - cpu_spinwait(); - } + v = MTX_READ_VALUE(m); + } while (v != MTX_UNOWNED); spinlock_enter(); } #ifdef KDTRACE_HOOKS Modified: head/sys/sys/mutex.h ============================================================================== --- head/sys/sys/mutex.h Tue Jan 3 21:11:30 2017 (r311171) +++ head/sys/sys/mutex.h Tue Jan 3 21:36:15 2017 (r311172) @@ -420,9 +420,15 @@ extern struct mtx_pool *mtxpool_sleep; _sleep((chan), &(mtx)->lock_object, (pri), (wmesg), \ tick_sbt * (timo), 0, C_HARDCLOCK) +#define MTX_READ_VALUE(m) ((m)->mtx_lock) + #define mtx_initialized(m) lock_initialized(&(m)->lock_object) -#define mtx_owned(m) (((m)->mtx_lock & ~MTX_FLAGMASK) == (uintptr_t)curthread) +#define lv_mtx_owner(v) ((struct thread *)((v) & ~MTX_FLAGMASK)) + +#define mtx_owner(m) lv_mtx_owner(MTX_READ_VALUE(m)) + +#define mtx_owned(m) (mtx_owner(m) == curthread) #define mtx_recursed(m) ((m)->mtx_recurse != 0) From owner-svn-src-head@freebsd.org Tue Jan 3 22:05:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24EEAC9D5C3; Tue, 3 Jan 2017 22:05:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 993BC25FA; Tue, 3 Jan 2017 22:05:08 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03M57VX022383; Tue, 3 Jan 2017 22:05:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03M57ng022380; Tue, 3 Jan 2017 22:05:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701032205.v03M57ng022380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 3 Jan 2017 22:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311173 - in head/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 22:05:09 -0000 Author: np Date: Tue Jan 3 22:05:07 2017 New Revision: 311173 URL: https://svnweb.freebsd.org/changeset/base/311173 Log: cxgbe(4): Update T4, T5 and T6 firmwares to 1.16.26.0. Changelog for all public firmwares for all chips since the last release (1.15.37.0) follows (it's a straight copy-paste from the Release Notes for the 12/30/2016 Unified Wire release on Chelsio's website). T6 Firmware ++++++++++++ Version : 1.16.26.0 Date : 12/28/2016 Fixes ----- BASE: - Max number of egress and control queues adjusted to accomodate co-processor mode queues. - Fixed intermittent DDR3/4 ECC errors. - Fixed a traffic stall when ETS BW is configured as 0%. - Max number of ethctrl queue in VF set to 1. ETH: - Added a new config file option 'speed' under port section to set the port speed. Use only when auto negotiation is off. - FEC option removed from firmware config file. cxgbtool can be used to change the fec setting. - CPL_TX_TNL_LSO cpl handling added in ETH_TX_PKT_VM handler. This fixes large tunnel tcp packet support for VxLAN. Version : 1.16.22.0 Date : 12/05/2016 Fixes ----- BASE: - fw_port_type updated in fw API to match kernel.org definitions. - Saved power by disaling unused MAC lanes. - Configures correct power bin. - Enhanced DDR4 performance. - Enabled interrupts. - Fixed an issue where filter rule for 'unicast hash' is not working. ETH: - Disabled auto negotiation by default because most of 100G switches do not support AN as of today. - Fixed flow control not getting disabled problem. - Fixed an issue where port0 doesn't come up sometimes. - Fixed 10G link not coming up issue. - Fixed an issue with promiscuous mode when dcbx disabled. OFLD: - Fixed a connection stuck issue when abort is received during out of tx pages backpressure. ENHANCEMENTS ------------ BASE: - Added inline TLS mode support. Version : 1.16.12.0 Date : 11/11/2016 ENHANCEMENTS ------------ BASE: - Added T6 support. - Added T6 1G/10G/25G/40G/100G link speeds. - Added T6 co-processor mode crypto support. - Added facility to increase link AN+AEC timeout. OFLD: - Added support for all T5 offload protocols except FCoE. iSCSI: - iscsi completion moderation enabled. ======================================================================= T5 Firmware ++++++++++++ Version : 1.16.26.0 Date : 12/28/2016 FIXES ----- BASE: - Max number of ethctrl queue in VF set to 1. Version : 1.16.22.0 Date : 12/05/2016 FIXES ----- BASE: - Fixed an issue where filter rule for 'unicast hash' is not working. ETH: - Fixed an issue with promiscuous mode when dcbx disabled. ENHANCEMENTS ------------ ETH: - Added 40G-KR support. Version : 1.16.12.0 Date : 11/11/2016 FIXES ----- BASE: - Fixed multiple issues related with VFs FLR processing. - Fixed channel assignment based on number of ports in adapter. - Fixed a crash when VM having PF assigned as passthrough mode is rebooted. - Handled 2nd HELLO command from the same PF without seeing BYE from the same PF and if that is the only PF. - A warning is printed in firmware log if PCI-E cookie generation is enabled in serial initialization file. - Fixed multiple issues related with Filtering. - Enabled DSGL memory write for iscsi and rdma. - Added new FW_PARAMS_CMD[DEV] options to retrieve Serial Configuration and VPD version numbers. - Fixed an issue where LVDS output was not getting enabled using vpd. DCBX: - Fixed DCBX CEE Incorrect class to pririty mapping. - Fixed incorrect interpretation of DCBX IEEE PFC. ETH: - Adjusted the link related delay timings according to the QSFP spec. - Improved 40G link bringup time with few switches. OFLD: - Do not reserve qp/cq if rdma capability is not enabled. - Fixed an issue where approx 1600+ TOE connections were causing a firmware fatal error. FOiSCSI: - Fixed an issue where unloading foiscsi driver causes mailbox timeout. ENHANCEMENTS ------------ BASE: - Added 10G KR/KX support. - Added T540-BT adapter support. - Added 4 new rss key modes for PFs and VFs. OFLD: - Added new WR FW_RI_FR_NSMR_TPTE_WR to improve fast MR write performance in RDMA. Version : 1.16.5.0 Date : 10/26/2016 FIXES ----- BASE: - Fixed multiple issues where FLR from multiple VFs can cause firmware crash. - Fixed channel assignment based on number of ports in adapter. - Fixed the HELLO command master force api to handle the 2nd HELLO correctly without getting BYE from the PF driver. - Added facility to retrieve Serial configuration and VPD version. Two new FW_PARAMS_CMD[DEV] options added to retrieve these values. - Fixed multiple issues where FLR from multiple VFs are not completing. - Added new RSS hash secret key modes. - Fixed an issue where LVDS output was not getting enabled using vpd. DCBX: - Fixed an issue where iscsi tlv is sent incorrectly to host (DCBX CEE). - Fixed an issue where app priority values are not handled correctly in fw (DCBX IEEE). ETH: - Adjusts the link related delay timings according to the QSFP spec. - Changed 2.5G mac speed bit to 25G mac speed bit in fw API. - Improvement in 40G link bringup time with few switches. OFLD: - Do not reserve qp/cq if rdma capability is not enabled. - Fixed an issue where approx 1600+ TOE connections were causing a firmware fatal error. - Fixed DSGL memory write in T5. Now iwarp and iscsi can use DSGL to do memory write. - Fixed multiple issues in hash filter mode where incorrect protocol mask was getting used and affecting hash filter functionality. - New fastpath WR FW_RI_FR_NSMR_TPTE_WR (with fully populated TPTE) is added for small REG_MR operations. FOiSCSI: - Fixed an issue in foiscsi recovery path. - Fixed an issue where foiscsi (in VM in PCIE passthrough mode) didn't come up after VM FLR. ENHANCEMENTS ------------ ETH: - Implemented 1G/10G KR/KX ability. - Implemented T540-BT adapter support. ======================================================================= T4 Firmware +++++++++++ Version : 1.16.12.0 Date : 11/11/2016 FIXES ----- BASE: - Fixed an issue where reading temperature sesors using ldst command causes mailbox timeout. - Added new FW_PARAMS_CMD[DEV] options to retrieve Serial Configuration and VPD version numbers. ETH: - Fixed DCBX CEE Incorrect class to pririty mapping. FOiSCSI: - Fixed an issue where unloading foiscsi driver causes mailbox timeout. MFC after: 3 days Sponsored by: Chelsio Communications Added: head/sys/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu (contents, props changed) head/sys/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu (contents, props changed) head/sys/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu (contents, props changed) Deleted: head/sys/dev/cxgbe/firmware/t4fw-1.16.22.0.bin.uu head/sys/dev/cxgbe/firmware/t5fw-1.16.22.0.bin.uu head/sys/dev/cxgbe/firmware/t6fw-1.16.22.0.bin.uu Modified: head/sys/conf/files head/sys/dev/cxgbe/firmware/t4fw_interface.h head/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt head/sys/dev/cxgbe/firmware/t6fw_cfg.txt head/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt head/sys/modules/cxgbe/t4_firmware/Makefile head/sys/modules/cxgbe/t5_firmware/Makefile head/sys/modules/cxgbe/t6_firmware/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 3 21:36:15 2017 (r311172) +++ head/sys/conf/files Tue Jan 3 22:05:07 2017 (r311173) @@ -1386,7 +1386,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.16.22.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1410,7 +1410,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.16.22.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1434,7 +1434,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.16.22.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Added: head/sys/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu Tue Jan 3 22:05:07 2017 (r311173) @@ -0,0 +1,9603 @@ +/*- + * Copyright (c) 2016 Chelsio Communications, Inc. + * 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. + */ +begin-base64 644 t4fw +AAAEKgEQGgAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAABA0EHAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFdlZCBEZWMgMjEgMDg6 +MjI6NDggUFNUIDIwMTYgb24gdm5jNC5hc2ljZGVzaWduZXJzLmNvbTovaG9tZS9maXJtd2FyZS9j +dnMvZnctcmVsZWFzZSksIFZlcnNpb24gVDR4eCAwMS4xMC4xYS4wMAAAAAAAAAAAAAAAAEqXR79g +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//2M4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAMAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//kuAAAAAA +H/+S5AAAAAAf/5LoAAAAAB//kuwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtEv+VwDAnNwAnNxAn +NyAnNzAjPQFyM+0S/5AV/5AW/5HAMNcgBWYBYAAZAAAAAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QACABL/ay0nAMARAUkxAEgxAQIAwAAU/2gE0jEV/2eUUBT/ZwTTMRX/ZpRQFP9mBNQxFf9m +lFAU/2UE1TEV/2WUUBD/ZQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+KUOMACfgf/4pQH/+KUOMAFEgf +/4pQH/+KUOMAFEgf/4pQH/+L8OMAFEgf/4vwH/+S3OMAFegf/5LgH/+0AOMAHNgf/7QAH/+0AOMA +Pfgf/8AAH//+eeMAPfggAAAAIAABauMAfHQgAAF4IAABfOMAfeAgAAF8IAABheMAfeQgAAGYIAAB +nOMAffAgAAGcIAABpeMAffQgAAG4IAABvOMAfgAgAAG8IAABxeMAfgQgAAHYIAAB2OMAfhAgAAHc +IAAB4uMAfhAgAAH4IAAB+OMAfhggAAH8IAAB/OMAfhggAAIYIAACGOMAfhggAAIcIAACHOMAfhgg +AAI4IAACOOMAfhggAAI8IAACPOMAfhggAAJYIAACWOMAfhggAAJcIAACYuMAfhggAAJ4IAACeOMA +fiAgAAJ8IAACguMAfiAgAAKYIAHz/uMAfiggAwAAIAMVlOMCb5AgAxWUIAMVlOMChSQgAxWYIAbc +BOMChSggBtwQIAbfgOMGS6AgCAAAIAgOYOMGTxAgCA5gIAkpBuMGXXAgCSkQIAkp3OMHeCAgCwAA +IAsAAOMHeOwgCwAAIAsAAOMHeOwgCwAAIAuf+OMHeOwAAAAAAAAAAAAAAAAgABOGIAATeCAAF2Ig +ABN4IAAW3SAAE3ggABQqIAAWdSAAFfogABN4IAAVqSAAFWIgABT1IAATZSAAFJ8gABN4IAATeCAA +E3ggABRKAAAAAP///////w/8///w////APwgAKvLIACtQiAArXIgAK04IACs+SAArO8gAKy5IACs +ryAArJ4gAKxKIACtcCAArEAgAKwVIACtciAArAsgAKv5ARAYAQAEAAAAAAAAAAAAAAAAAAoAAAAK +AAAAFAAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEA +AQACAAMABAAFAAYABwAIAAkACgAOABEAFQAZAB4AIwAtADwAUABkAMgBLAGQAfQAAAAAAAAAAAAA +AAAAAAAAAAAAAQABAAIAAgADAAMAAwADAAQABAAEAAQABAAFAAUABQAFAAUABQAGAAYABwAHAAAA +AgAAAAYAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKA +AAADgAAABQEAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAA +AcAAAAKAAAADgAD/AAECAgAAABAgQAAAAAAABAACAAEAAIAAQAAgABAACCBAgAAAAAAAAAAAAAAA +AAAgCKlLIAipSyAIqQMgCKjKIAiokCAIqEsgCKhLIAiqQCAIqkAgCKhLIAiqQCAIqkAgCKhLIAio +SyAIp/cgCKpAIAiqQCAIqkAgCKpAIAiqQCAIqkAgCKpAIAiqQCAIqkAgCKpAIAiqQCAIqkAgCKpA +IAiqQCAIqkAgCKpAIAioJyADCtAAAAABIAMK2AAAAAIgAw8IAAAA/yADCDAAAAD/IAMKvAAAAAIg +AwrAAAAAAyADCsgAAAAHAAAAAAAAAAAgAwqgAAAAASADCqQAAAACIAMKrAAAAAQgAw8IAAAA/yAD +CDAAAAD/AAAAAAAAAAAgAwgwAAAAACADDwgAAAAAIAMJbAAAAAEgAwl0AAAABCADCXwAAAAIIAMJ +iAAAACAgAwmYAAAAQCADCaAAAACAIAMJqAAAAQAgAwmwAAACACADCcQAAAQAIAMJ2AAACAAgAwnw +AAAQACADCgQAACAAIAMKFAAAQAAgAwogAACAACADCjQAAQAAIAMKRAACAAAgAwpUABAAACADCmwA +IAAAIAMKhABAAAAgAwqMAIAAACADCVgAAAAQIAMJYAAAABEgAwlAAAAAACADCUQAAAABIAMJSAAA +AAIgAwlQAAAAAwAAAAAAAP//AAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAIAMIwAAAAQAgAwjMAAAA +gCADCNwAAABAIAMI7AAAACAgAwj8AAAAECADCQwAAAAIIAMJGAAAAAQgAwkkAAAAAiADCTAAAAAB +AAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEA +AAABAAAAAQAAAAEAAAABAAAABwAAAAcAAAAGAAAABgAMNQAAEEaqABRYVQAYagAAACtoAAAjgwAA +GGoAAA0GAAALKgAAAAAAAAAAAAAAAAAAaCsAAGgrAABsggAAb5wAAEpoAABKaAAATSkAAEpoAABO +6gAATJgAAFI9AABPuAABhqAAAYagAAII1gACCNYAAgjVAAII1QACiwsAAosLAAII1QACtnIAArZy +AAMNQAAEBgcAAAAAAAAAAAAAAAAAAgIFBQgICwsODhERFBQXFxoaHR0gICMjJiYpKSwsLy8yMjU1 +ODg7OwAAAAAAAAABAxERCAgQCQMBAAAAAAAAIATAYCABrfQgADdAIAF9UCABqkAgAaS0IAFeOCAE +Lmwf/+o8IACXoCAArjAf/90QIABmYCAAV8AAAAAAAAAAACABfwggAIYwAAAAAAAAAAAf/9X0H//F +fB//wpQf/8AwIABSwCAARhwgAENIIACjQB//4/AgBq7QAAAAAAAAAAAgAEnQAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAACABtVwgAZV4IAC4gCAAt7Qf//EQH//QoB//zDggAIOoIAVBqCABLqgg +AQ68IAD16CAA6lggAN3UIADQTCAAu2AgBMRYIAMmaCABI7AgA1SQIAHf/CAAZiAAAAAAIAC45CAF +umQgAKtAIAGIDCAAApggAJ0AAAAAAAAAAAAf//RYIAC4nCADKRgAAAAAAAAAACADpswgACeEIAAJ +aCAAJoAAAAAAIAAyeCAAMBAgAC1AAAAAACAANwAgASdwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAIAA0nCAEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAANkAg +A6/AIAA1UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAICwAAACADEugIAAAAIAMS +9AgAAAAgAxMACgAAACADEwwMAAAAIAMTGBIAAAAgAxMoDQAAACADEzwOAAAAIAMTTBMAAAAgAxNc +CgAAACADE3AOAAAAIAMTfBgAAAAgAxOMDQAAACADE6gOAAAAIAMTuBAAAAAgAxPIEgAAACADE9wO +AAAAIAMT8BAAAAAgAxQAEQAAACADFBQKAAAAIAMUKAsAAAAgAxQ0DQAAACADFEAUAAAAIAMUUAoA +AAAgAxRoDwAAACADFHQGAAAAIAMUhAYAAAAgAxSMBgAAACADFJQGAAAAIAMUnAYAAAAgAxSkCQAA +ACADFKwGAAAAIAMUuAQAAAAgAxTABgAAACADFMgLAAAAIAMU0AsAAAAgAxTcBAAAACADFMAEAAAA +IAMU6AkAAAAgAxTwCQAAACADFPwAAAAAAAAAAA0AAAAgAxUICgAAACADFRgGAAAAIAMVJAIAAAAg +AxUsAwAAACADDtwBAAAAIAMVMAAAAAAAAAAA12qkeOjHt1YkIHDbwb3O7vV8D69Hh8YqqDBGE/1G +lQFpgJjYi0T3r///W7GJXNe+a5ARIv2YcZOmeUOOSbQIIfYeJWLAQLNAJl5aUem2x6rWLxBdAkQU +U9ih5oHn0/vIIeHN5sM3B9b01Q2HRVoU7anj6QX876P4Z28C2Y0qTIr/+jlCh3H2gW2dYSL95TgM +pL7qREvez6n2u0tgvr+8cCibfsbqoSf61O8whQSIHQXZ1NA55tuZ5R+ifPjErFZl9CkiREMq/5er +lCOn/JOgOWVbWcOPDMyS/+/0fYWEXdFvqH5P/izm4KMBQxROCBGh91N+gr068jUq19K764bTkQcM +ERYHDBEWBwwRFgcMERYFCQ4UBQkOFAUJDhQFCQ4UBAsQFwQLEBcECxAXBAsQFwYKDxUGCg8VBgoP +FQYKDxUf/8AAAAQAICAG34AgBuQwH/zeACAG38Af/6wkH/+tNB//sKADgAAAgQAAAB//sJAA//gA +AQAAAAAQAACBBAEAgQQAAAEEAAABBAEAgAAAAAAF//8f/4VABgAAACoAAAAf/8/4IARBfAIAAACA +EAAAQUAAAEFAAQCDAAAB//+//7////8f/5jcBAAACCADDPiBgAAADAAAAB//kzD//wAA//8A/wAB +AAAAAP//H/+xkB//qNQP///////QZP//02Af/2acH/zg6CAG3Vz//770H/9mkB//ZxT//8FgH/+t +7B//nuQf/OIAAAAIuOD//gDhAZIAH/+ZUAD///8f/64MH/+dhARBAAgEAQAIpQAAAMAAAADABAAA +MAAAAB//rpAAAB1AAAD/gCAG3BAgC2Aw4QAuAB//roQf/6pMH/+vQB//qrAAABeA4AAAoOEAMLgA +AIAA4QBgEAAAQADhAhAA4QIwAOECUADhAnAA4QAQCB/84UDhAHtwH/+zwB//s7gf/OAIH/+zvB// +s9gf/7PQH/+z1B//s/Af/7PoH/+z7CAG38Af/7GQH/+sJB/83gAf/600H/+tMB//rdAf/52UH/+w +3B//qjggCwBgH/+vXAAA/4AAAB4gH/+TMB//r2gf/69kH/+vyCALBnAEAAAIBQAAAIP/AACBAAAA +ABAAACoAAAAgAAmsIAMMGB//iZAf/4VAH/+HRB//sKBnRSMB782riZi63P4QMlR2H/+AAAAAPygg +Aw7cz////yALB2AQAAAAP////wIAAABAAAAA//9//yALCIAf/7CQIAAjuCALCLAgCwkgCAAAAAD/ +//8gCwmQ9////yALC4AgACBg//7//yALFmCAAAAAIAMM8AwAAAAAAEAAAAD//wAAgAD/+///D/aA +ACALGdAgCxoAAAEAAAAEAAAgC3RAH/+t4CAAMnggADRYIAAwECALGpAgAC1AIAsbICALG3AgCxwA +BAEACOAAAAAgCxyAIAscQFMAAAAgCxygUgAAACALHOBRAAAAIAHpLB//qqQgCx9wIAsf0CALH6Ag +CyJQH/+uDCALIqAf/52MH/+tsCALJJAUAAAAgAAAAngAAACAAAAGgACwAAAACgAA4zCS///wAIAA +sQDhAZoAAAIAACALJFAf/5sEAAB+QB//reQA/8AAH/+t8B//k7QBAAAAKAAAACYAAAAgCyTAH/+T +8AYAAAAFgAAAH/+p/CsAAAAgAE04IAt28B//q5gDgAAAB////zUAAAADAAAAAD///4BAAAAID/// +H////yAAAAAAAMAAH/+tyD0AAAAf/5l8BwAAAIEEAQCBBAAAH/+sFAAAOpjDAAAAAAAP/wBDAAAA +AAgABAAAAB//q8wgC3dQH/+zNB//sbAf/5jcAAYAAOEAegAf/5lMH/+t1CCgAAAf/6wsH/+dnB// +nYggC3eAAAMHgCALd/Af/5toACAAAABAAAAAAAkAAAAwAv/8+H/AAAAAo/+7AKP/ugANAAAA4AMA +AIP/tgAP////D//4AP8AAAAgC3gwIAsmICALJlAgC3jAAA8AAAAKAAD//wAPA//AAIP/wAAgC3lA +IAt5sB//rrAf/7Ig/2DwAB//sgAf/5LwBIAACB//gFAARAAA/x///wDAAAABgMIAAACBAPAAAACB +gAAA/3///x/84HQf/6jU/7//////AAAAgAAAAACG3R//ntwf/OIAH/+T4O4AAAAAAAm8H/ziDA8A +AAAgCyaQH/+uUAAACLwf/69UH/+fWB//mXgf/4BgIAbdsAAAMAAAACcQH//cgCALgbAgC4GAH/+u +tB//mXAAAP/+H/+dfN6tvu8gAwfgNAAAAD8AAAAf/69wAACJBgCZAAAf/7D4EAAHAgHAgACZAAAA +H/+v4ACIAAiCgAABH/+xSAMVAAADEQAAAA8D/yALKwAf/620IAuCACALK2AgCyuwIAssQCALKzAg +AOT8IAssECALLeAgCy4QIAsuYCALLsAgAOqgKQAAAAAAiRQgAPEEIAuCcCALgtAgAPr4H/+vAPDw +8PD/AP8AqqqqqszMzMwf/7JAAAAfEB//sEgAA///AAAn/yABA3ggC4NAAA9CQCADW7Af/66IAAkA +AAAASACCAAAAIAEneCALg7Af/640OwAACA4AAADQAAAAH/+AoAAAH8oAAAhQAAAfQCALOBAgCzgw +IAs4UAAJAAgf/7FEMAAAAP//9/8gCzqgIANh9AAAg/8gBuL4FaAAACAG4/Af/7EIH/+t3AAACAYA +AIjMfwAAAAAAD/4gC4hwIAuJAAAA4AAgC4ZQIAuI0B//mxwABAP/CgAAACAG4Dgf/62gIAbggB// +njCD/7cAg/+2ICALOtDhAAAAMwAAAB//sRAf/7IEA//gAH///wAAP/aQAAAf2AP/8AAgC2WwIAtl +cCALZdAf/7MQIAs7UBoAAAAgCzugIAF1mB//sQwAD///H/+vMB//rewgC4mQH/+dvB//qlAf/6xE +IABqiCAG3TggAAWIH/+pMB//mpgf/5kYH/+qqCALPrDABAAAH/+sOB//rFAf/7HwH/+xZCALiqAg +Cz7wIAMNoCAAa2jgAQAAH/+e4CALi/AgCz8wIACoGB//ntggAKUYIAuLcCALi8Af/5s8IAtBQOD/ +/gAgC2hQH/+e5CALTOAf/63oH/+VbCALVwAgC1eQH/+xtCALWkAgC1pwSAAAACABvTAf/6uoIAG/ +NB//mcwf/6pMH/+pRB//rDQf/6lsAAAYMAAAFjwf/6x0IAbftB//qfQf/5lQ4QAuAB//rIDhAF4A +4QIOAP//v//hAA4A4QGOAP//vv8f/52EH/+qgCABwqAgAc7I4AUAAAP/AAAf/6m0IAMM+B/8v/88 +AAAAAAX//4MAAAAf/6lMIAHkwCALY/Af/67EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIGAAAAAAAAA//// +/////////////////x///IAf//yAH//8SB///Egf//xIH//8SB//9dAf//j4H//3VB//91Qf//dU +IAawwAAAAAAAAAAAAAAAAAAAAAAgBrQIIAa0CAAAAAAAAAAAAAAAAAAAAAAgBrDAIAawwB//+ewf +//nsH//57B//+ewf//nsH//57AAAAAAgAcO4AAAAAAAAAAAAAAAAAAAAAAIBAAAAAAAAAAAAAAAA +AAAEAAAAAAAAAIGAAAAAAAAQBQAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAgQAAAAAAABgFAAAAgAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAIAoAEfKTE/KT0w8D5jEBAgAW8pEX8pJ3awaQYLRmd2P4VA8xVcbK +DxQAY//5AAAAbBAIKCAFJyAHKTEF+CCGFeAZRQD5AA6FYXcBAIoiFvKE/eUIBeAMlQDxV7wN4A+l +AOrygRvHAoAApogrgp4KeQopkr/9YA2DogCdACiCnQmIAegWBSQNUYAAKNII9wANqJIAnQArYq7s +8nUVirmAACpirSzCf+yrAQRz/QAA/UAKHiIAnQAu1gj9QAoeIgCdAC8gFKT/Dw9HLyQU9eAMXdIA +nQAZ8mcuIhYsISmIFR/yZa7Mn4DqIh4uZ8KAAP0AZhWgDSUA/QBGFeALZQDt8l4dVgKAAAuqAosU +moHpABUEQEEAAIkVCACKKDwQ/SDGFeBMBQD9IOYVoAxFAOy7NgTIgQAAbbkFCACGCQJh7vJPFaCH +gACIFe4ABQ3PAoAAqYjojCAlpDUAAAvJDG2ZAggCYS0hKdMP6iEoJugFAAANDU8tJSn9QAd0YgCd +AP/kgAXgDBUA+iCoFeAe5QDqIh4uzUKAAPggJhXgCAUA+CAGFaANBQDoFgIl2YEAAFiEnP7gABc3 +xQEA98AARzANlQDt5p0oBAqAAPmABVlSAJ0AwCDRDwAAAOokAAnYBIAA7EQACugEgABYhoXSoNEP +AAAAAMCwD4k06dYILfYuAAD6QGgdoBvFAPwAAh2gDRUAWItJY//BAADqJAAK2ASAAFiIHtKg0Q8A +//lYDaAIBQDqJAAD2GEAAPwAAh2gDZUAWIs9Y/+RwKBZwEAd8gaI2Pkf8giQD6UAY/+k2iBYC4xj +/nAAAAAAAPwAAh3gCgUA+kUkHa/8KgCKJ+tEAApoBIAA+0QAFaAMBQBYgBXSoNEPAAAAbBAGLiIQ +lBHlIRoq0ASAACYgB/ZBKBXgH8UA6hYAKsfCgAD/AlIN4WYBAAcJQvEgcA3ihQEAZIHy1PApIAX8 +QEgVoBuFAP6eAA2wGkUA+yAPlSIAnQDn8d8eC9YAAOXx2xtPAoAA9MAMEhIAnQClmS2SngdqCiqi +v/egEbtSAJ0AKZKdCpkB7pQABI5JgACMKYsqDAc+DLsM92AJA+IAnQAqIE4tIEyxqPugDewgCxUA +KCROKjABKSIY80AN9pIAnQArIActIST4YCQVoAxVAP1ABAUwuxEA4KoRDdqCgAALqgIb8cMKiAIq +IQcsIQkL3QL7BgAMeqoBAOvxvh1TAoAACswCKiEimOCIIJzjneQLqgKa4v0AABQwCmUACogCmOEt +IhCd5SwgOBvxs/gAIh2gTRUA+cEmFaDMGQAM2Dkd8a+U6Ay9OfmmAA6wCwUAm+cY8aKd5u3xoxTg +BQAALCYYm+uZ6ugAFQdIwQAACQCK7eYOIchBAADv5g8neQEAAAkghg8CYwkAhg8CYQxuEaXu6uad +I4CxgACIKS8gOKeIKCYJ8+AIF5IAnQCJEAkJR/kgBwFSAJ0AwCDRD54S6iQAC9gEgABYiPSOEv9N +EA3gH8UA7BIBKVAEgADtEgAp2ASAAFiF4dKg0Q8AHvF5iuj3QAY4kgCdAAxpEaWZK5Ke92AGi1IA +nQApkp0Haworsr8LmQFkkL+wrJzo7pQADPN+AABgACwAAAAAAPPf8EhSAJ0ACVQM9J0AFa/4AgAA +AAAAAOsSAClQBIAAWIdu0qDRDwDqJAADWGEAAPwAIh2gDWUAWIqPY/9pjSLA5A7dAvxARhXv/X4A +AAAA+EOoFaTZAQAA0QQAvBoMiAL4Q6YVr/jGAIonjRHAwOqsIC7YBIAAWH9q0qDRD9ogWIV3Y/75 +AAD/9zwNoAkFAMCgWb9+HvFDiuj5X/l4kB/FAP/9KA2gCQUAwJDAugurNPvBBhXv/O4AAAAAbBAO +lRwoIhAuIgknITUpIAcjFg4qMgL+YIgV4A0VAPxgaB2ntQEA4yEaJdv5AAAL2zn6IaYV4ZkBAOf/ +Ngm3woAA/sJSDeOqAQAODkLxwHAN4tMBAGTUYyYgBcHo+f4ADzAXRQD2wCQdYgCdAIciix705fwN +4A6FACuwAZ8R82AhJxIAnQCZEJkamhQY8Rbt8RcSKA0AAOUWCyyvAoAA6FUIDN+CgACtu+sWCSJw +BQAAiRqeGI0b9SAGqhIAnQArUp6GGf1gCiPiAJ0AL1KdJmK/Bv8BZPQ5GfEEiZj3IAmYkgCdACqC +rmShUhrxASOCrSqifx3w/Qo7AesWBSTb/QAA+mAJ5iIAnQCb2PpgH2YiAJ0AhymGKgwDPgdmDPLA +CaviAJ0AKRoA8yIyDeD69QArIBacE/tgCf0iAJ0AixGGwyogOPfg5hWgBgUA9+EmFaBHBQD74QYV +4KoZAAp2ORfw75YWLSIXFvDsnfotIhud+4nECnY5lhf5YBFK4gCdAIYdnh/sFgMjDdmAAGABCBnw +1omYapEuixsqUp6PGXujSy1SnS/yvw/dAZ0VhhXr8M4U0/0AAO9kAAMB6YAAmrhl/xNgA0qeH/wg +ZhWgCgUAWb7/GfDFiZgY8MKME+4SDySO2wAA//9cDaAPBQDAoPogphWv/uYAHfC8wLoLmzT7oQYV +7/72AAAAAAD/+xQNoA8FAJ4fLxYQ/CBmFaAKBQBZvusZ8LGMEy8SEImYjh8Y8K35P/VwkgCdAGAC +vcCgmhWLFRbwqcDaDZ007WYILfYmAABgAqSeHy8WEJwT6iQACdgEgABYiBKMEy8SEO4SDyV1oYAA +YAJanh8vFhD6QPAVoAwFAFiH64wTLxIQ7hIPLXVmAABgA8eOF4sTiBSMEfYgyBWvigUAKiQ7DJkM +CGYCmbSs2AbuAi0iEOgmGylQBIAAWIaYjh+MExjwhvqzphWhCQUAc5sNKyAWKgr/+2AETSIAnQCK +KSsgOA8CAKOq6iYJKAQKgADzYAQ/kgCdACYhNS/CBCshGikiEOb/Ng3vwoAAf9sLCgpCZKAFCw1C +ZNBz/iAmFeAdhQD5/gAO8AoVAPohphWgBjUA9iGGFa/1xgCKJy8WEIse6qwgKmAEgABYgygvEhCa +Ey0iG/lAiBXv/N4AAAAAAAAA6iAHKeAEgABYh4UY8FuME/4h6BWv/Z4A2iBYhIcY8FaME44f+kEo +Fa/9tgBxnogKvwz//QAV7/4KAIsUihYtIhAZ8FwLqgIb8FwKaAKGHRrwUwmIAunwUhsLPgAAIxYR +JRYSJiAHhcAjIQf2QSQV4GYRAOtVAQsygoAA9qYACrozAQDmISIpmwKAAAN3AgpVAiMhJAlmApXw +hSCX85by/eCmFeOYAQDo9gYsygKAAAk5AuMSESJT+QAA6fYEKq4CgADl5QIGQIEAAOX2ASfIwQAA +5RISIhQ1AABtqQUIAIYJAmEmIBSkZgYGRyYkFPTACDXSAJ0AiBj4s6YVoQcFAPLh8g3g+fUAKyAW ++WAIzWIAnQAqIhexquomFyGAqYAAjCkrIDijzJwp82AHn5IAnQCNHWXQz8Ag0Q8vIE5k+9kOeAL4 +QEYVoACGAAAAAAAA8x/cwFIAnQAOPwz//QAV7+42AAAAAAAA6xIOKVAEgADtEgwqYASAAFiEZ9Kg +0Q8A6xIMKVAEgABYhgrSoNEPAPpAaB2gG8UA/AAiHaANFQBYiStj/8GLEPpAaB2gDBUA7RILJdhh +AABYiSVj/6kAACYgO2RgceokAA5YBIAA/CAoFa+JBQDpJDsscASAAFiF9/ohBhWgCwUAKyYb+kdm +He/7zgAAAAAA6xIFKVAEgABYCWlj/u+KJ+tEAApoBIAA+0QAFaAMBQBYfffSoNEPANogWIQFY/8I +6iAHKeAEgABYhvtj/twAACchCSUWEiMWESQWEyYgB4TAIyEk9EDkFeBmEQDrRAELMoKAAAZEAgpE +AvZERBWqtQEA6yIHLdMCgAAKdwIJZgIqsRWaEpTwhSCX85by/eCmFeNIAQDo9gYqIgKAAAQzAuP2 +BCXYgQAA9CJoFa/DBQADuwEjEhHrqQgKrgKAAAXlAuX2ASZggQAA5RISJMkBAADpy0N+QASAAC1M +/gzWEaaG5pM7d+DBAAD0n+/xEgCdAG3ZBQgAhgwCYWP97YsQ+kBoHaAMFQD7YkAV4A0FAFiI0mP+ +WgAAAPuPAAw//vYACJ0MDUkUbZkFCCCGDAJj79oIBcEBAADpTAwFSMEAAPWf7UESAJ0AK8z+bbkF +CECGCQJlY/2UAABsEAYoIAUc74n33w4F4BpFAPsACp0iAJ0AKyBOiciwuyskTvcgCMiSAJ0ALnKu +7e+BFxFxgAArcq0t0n8NuwHmtAAFkSmAALCe7sYIJYg5gAAvIBSz/w8PRy8kFPXgEMXSAJ0ALiBz ++EOoFe/69QD7wAQA0AsVAOC4GgdoBQAA+xcADTTdAQAtJHMJiAEIuDkKmQHpJh0sBw4AAIoifKcE +KCBOyY99pwgrIEwpIE57kxTMbCwgFO0iAi5YHAAAZNHJwCDRDwCOJ8fzD68B7yYCJ1DBAABYdWTj +72UVATmAACigANMP0w8DiAooghDsoActWASAAPpAaB2gDUUAC4AAZa/ciSfTD2SfpiqZFMqniplk +r5wooAADiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/gY/96AAD//1QNoAoFAMCgWb10HO85icj5 +P/bokgCdAMBgKSAUs5n4QoYd7/weAAAAAAAAAADqJAAK2ASAAFiFPNKg0Q8AKiAFKyAHwdT9QA5l +YbsBAAUFR/igDnlSAJ0AkxCNNp0S7e8lHZgEgAD1YAmKEgCdAAy6EaeqLqKe98ANnNIAnQAqop0N +vAoswr8MqgFkoT36QAgV4AwVAFgh3x3vGSkhCRjvGSshIi8gBx7vIywhJPlmAA2w/xEA6BICL/qC +gAAPzAIOzAIspgCOIJui+UCmFaAPJQDppgMvdgKAAA/uAv9AJhWgCQUA7QAVBVBhAACxmeqDHgyP +6AAADDkR9yAARPAIpQAolp30v/K5EgCdAIon60QACmgEgAD7RAAVoAwFAFh9E2P+Ov/3bA2gCwUA +wLoLmzTrxggrbwYAAGP+2+okAAtYBIAAWAh1/d3UBa/3dgCKJ8Cw+0QAFaAMFQBYhcAZ7vaZoP5A +CBWgG8UA+d3oBaAMFQD5QEYVoA0VAP3AABcwCBUA6O4CDXgEgADu9gEpUASAAFiIDMAg0Q+JyPcg +BKCSAJ0ADDoRp6ouop73wAVU0gCdACqinQ0+Ci7ivw6qAWSgmLCfn8hlrsGIIusWASQE4YAA+L/s +OVIAnQCKJysKAPtEABWgDBUAWIGEixAe7tKeoIwgHe7SnaL9gAAWMA0VAA3MApyhi7b7QGYV7/VK +AAAAAOtUAAlQBIAAWITCY/08jzP+IEYV7/jWAP/5ZA2gCgUA+iAmFeAKBQBZvOYc7qyJyIsRHe6r ++T/6uJIAnQD//cgNoAoFAADAoMCKCJg0+YEGFa/9igAAAADqJAAF2GEAAPwAIh2gDaUAWIfRY/9R +AABsEAQoIBTvix5qGASAAIon+mBoHeAMBQDqrCAp6ASAAFh8sdKg0Q8AiyJzvksU7o+KSGqhRxvu +jCyyrsrHHe6NLLKtLdJ/DcsBfcAbsK6eSH3AIS8gFO8kFC/a0AAA2iBYCA1j/6fAsMCKCKg06EYI +Lf8WAACJIsmVwCDRD8CgWby1ikhroa1j/+oAAAAAAAD6QGgdoBvFAPwAIh2gDRUAWIenwCDRDwBs +EAgsIg8vIAcoITQnMgf+Q0QVp9UBAPm/wBXgCxUA6bk5CbAEgADrIgkqUASAAPgghhXgBBUA6Hc2 +D0/CgAD3IlIN4f8BAAsJQvEgcA3ijgEAZIJywbTsex8OlHQAACwgT+kgTSZgBQAADAxHLCRP/SAU +o6IAnQAsIAX7gBL9YgCdAI0i+iAGFa/7NQD9YA5Y4gCdACgiGY4y+cAU1SIAnQCJOBjuSxzuSOSS +Ym/fgoAAmhCYEay76O5CFUgNAACZE+sWAi+nAoAAqET14A0iEgCdAIsTKkKe+0AbG+IAnQCKEilC +ndMPKqK/CpkB7pQABJJxgACMKYsqDAU+0w8Muwz1YAnb4gCdAC0aAPWh8g3g+PUAKyAW+WAZdSIA +nQAsISIZ7j0oIQcqISQrIQn8QPAV6ogBAOmqAgxDAoAACLsCGe42GO4nDS1A6cwCDuqCgAAI3QKd +4IkgnOKa5PvAZhXgClUA6+4uHM4CgAAKmQKZ4YgvmOUsIDj3wQYV4A0FAP3A5hXgCiUA/dxMBeBJ +JQD4wIgVoMwZAAyaOZjpDNs5jWWd6h3uIPzAyBWgCQUA7OYLI4fhgAAKnBANzAKc7IwRiWiX75nu +iGko5hCNai3mEewAFQdJIQAACQCKiGf44AujogCdAB/uBQq9Ag/dAp3mwMX8k6YVoQkFAPUh8g3g ++PUAKyAW+WATpSIAnQAsIhmKKSsgTykgOOWqCAZgBQAA7CYZJdv9AAArJE+aKfMgD4+SAJ0AixRl +se/AINEPnxWfFp4X6iQACtgEgABYhU+OF+8SBSV1kYAAjBRlz9uKJ9sw7BIAJVDBAABYgF7AINEP +Gu3Uiqj3QBCIkgCdAIwTK0Ke/WARQ6IAnQCLEilCnSuyvx3tywuZAeSSFGVj/QAAnNjulAAM8mYA +AGAAjiggOfEf+A4SAJ0A//vkDaAJFQAAAAAA85/sSFIAnQAJ5wz2/YAV7/X6AAAAAMGze8kUKSA6 +mhD+IMYV4Az1AP0gEP0iAJ0A6iQACtgEgABYg77SoNEPAPAAGA2gGtUAwKGMNyshCY04jjLrrxEN +3QKAAA+7AuS7AglQBIAAWIOiwCDRDwAAAP//WA2gGoUA6iQAB9hhAAD8IGgV4AwVAFiG0WP/BQAA +CrgCmObA1fyTphXhDAUAdcsNKyAWKQr/+WAONWIAnQCKFGShXYtqjGeKaat7B8wMnGf3YNIN4A4F +ALGqjGWbaotmmmms6qt7d7sBsaqOKZtmmmUtIDil7p4p86AKN5IAnQCJJyiZFMqCi5nJvhntjyiw +AJ8VnxYJiAooghAssAf6QGgdoA01AAuAAI8ViyLHo/tf8oDiAJ0AKCE0h2cuIRqKL4sp6Hc2D2fC +gAB3ywoLCULIlA4LQmSwtMHU+v4ADrAMFQD8IIYVr/KuANogWIGWY/4KiifqrDArWASAAFhsQ9Kg +0Q8AAP/yqA2gCQUAAACfFZ8Wnhf6QPAVoAwFAFiErY4X7xIFLWX+AADqJAAH2EkAAPwAIh2gDQUA +WIaIY/3gAAAAAADqIAcq4ASAAFiEd2P9gZ8V/iDGFeAKBQBZu4Qa7UqKqI8V+V/u2JIAnQD/9+AN +oAkFAMCQHO1EwLoLqzT7gQYV7/eaAAAAAADzX/o4UgCdAAnnDPb9gBXv/PIAiiefFe8WBinYBIAA +7BIAJVDBAABYf77WoP4gqBXv+hYAnxXvFgYpUASAAFiBXv4gqBXv+rYAAADBU/pAaB2gCwUA/AAC +HaANNQBYelsrIAWPFooQ9X/ahWIAnQBj/SGfFZ8W6iAHKuAEgABYhEj+IKgV7/iuAAAAAGwQDpMc +lRqIL4opLiEaJyE0LzIE+EDwFee1AQD7f8AV4A0VAAvbOesWCyngBIAA9+EAD/GZAQDnIAUvN8KA +AP7B8g3iqgEA8UBwDeJuAQBkZEHBpAj6jfrgI00iAJ0AjiKLHPXEXA3gCoUAK7ABnxLzYCBXEgCd +AJkR6Oz8ElgNAACbGRvs/OkWCCyvAoAA6FUIDNeCgACrquoWByJwBQAAhhieFosZ9MAF6hIAnQAq +Up6GF/tACWPiAJ0AL1KdJmK/Bv8BZPQhGezqiZj3IAjgkgCdACqCrmShORrs5yOCrSqifx3s4wo7 +AesWAyTb/QAA+mAJHiIAnQCb2PpgHqYiAJ0AhymGKgwDPgdmDPLACOPiAJ0AKRoA8yIyDeD69QAr +IBacEPtgCSUiAJ0AG+zoKSA4+9nMBaAGBQD34OYVoEcFAP2AiBXgmRkACXY5Cbo5ixKaFJYV/WAR +0uIAnQCGG2Rh02ABAxnswomYapEuixkqUp6PF3ujSy1SnS/yvw/dAZ0ThhPr7LoU0/0AAO9kAAMB +6YAAmrhl/ytgA0qeHfwgBhWgCgUAWbrrGeyxiZiMEBjsru4SDSSO2wAA//9cDaAPBQDAoPogZhWv +/uYAHeyowLoLmzT7oQYV7/72AAAAAAD/+3QNoA8FAACeHZ8e/CAGFaAKBQBZutcZ7J2MEI8eiZiO +HRjsmfk/9jiSAJ0AYAK+wKCaE4sTFuyVwNoNnTTtZggt9u4AAGACpZ4dnx6cEOokAAnYBIAAWIP+ +jBCPHu4SDSV2eYAAYAJdnh2fHvpA8BWgDAUAWIPYjBCPHu4SDS12TgAAYAPEnBD+IaYVr4kFAOkk +OyY4QQAABwCG5xICJ7CBAAAGAmGNx5f4isSJxq19B6oMmsR32wmeHewWACTIBQAAjBKLEIYVjhSZ +tp23Bu4C7SIPKVAEgABYgnyOHRjsaowQ+rOmFaEHBQBzewgrIBYpCv95uX6KKSsgOKOq6iYJKAQK +gADzYAQnkgCdACYhNI/EKyEaiS/m/zYN78KAAH/bCgoKQsikCw1CZNBz/iBGFeAdRQD5/gAO8AoV +APohZhWgBjUA9iFGFa/1xgAAAAAAAJ4diiefHosc6qwgKmAEgABYfwzvEg4tYASAAP4hqBWv/FIA +6iAHKeAEgABYg2uMEBjsQP4hqBWv/bYA2iBYgG2MEBjsPI4d+kEoFa/9wgBxnogKvwz//YAV7/4K +ABfsPhvsPh3sQwapAoYbGuxC7ZkCBkBBAADlYVRn6IEAACUWEJMfJSAHg8AFJUDqMwEKqoKAAAUz +AgczAichByohIiYhCfRB6BXqdwEA66oCC7sCgAAHZgInISST8IMglvOZ9pry9eCmFeOpAQDlEhAt +UgKAAAp3Auf2BCmeAoAAA+MC4/YBIlP9AADjEg8iDDUAAG2pBQgAhg0CYSYgFKRmBgZHJiQU9MAI +HdIAnQCIFvizphWhBwUA8uHyDeD59QArIBb5YAi1YgCdAMg/iykqIDiju5sp80AH35IAnQCMG2XA +18Ag0Q8tIE5k2/MK6AL4QEYVoACGAAAAAAAA8x/d0FIAnQAK7wz//YAV7+6+AAAAAAAA6xIMKVAE +gADtEgoqYASAAFiAU9Kg0Q8A6xIKKVAEgABYgfbSoNEPAPpAaB2gG8UA/AAiHaANFQBYhRdj/8GL +EfpAaB2gDBUA7RIJJdhhAABYhRFj/6kAAAAAACYgO2Rgdyv6gCskO+wSAi5YBIAACCCGDQJj7PYI +LPAEgADtIg8pUASAAFiB3/ogxhWgDAUA/EdmHa/7ygDrEgMpUASAAFgFU2P+8oon60QACmgEgAD7 +RAAVoAwFAFh54dKg0Q8A2iBYf+9j/wDqIAcp4ASAAFiC5WP+3wAAACchByQWESYgB4TAkx/yREQV +4GYRAOpEAQsygoAABkQCFuu6LCEkiicGRAImIQn6ZgAJ+ncBAOuhFSu7AoAAB2YChy+U8IQgl/WT +8vfgZhWjOQEA6fYGKZoCgAADzALjEg8qJgKAAATkAuz2BCVQgQAA9eAmFa/MBQAMqgGqvOQSESZh +AQAA7Is9fEgEgACwSAyGEaaWdsM29J/wiJIAnQBtiQUJQIYNAmVj/gCLEfpAaB2gDBUA+2JAFeAN +BQBYhMBj/mIAAAD7DwAM//8OAAnMDAxIFG2JBQlghg0CZ+/NCAVJAQAA6EwMBsCBAAD1n+3YkgCd +ALDObekFCYCGCAJpY/2oAAAAbBAGKCAFIyAHJAoD/Q9ARFEzAQAoICJkgG8CKgJYeBT9TMCA0A0V +ACwgIRjrbQ8CAOwzEQZ9VoAAqDMpMp4PAgBuk0UrMp1ksD/6QAgVoP7lAA7OAf3GAA7wDwUA/EQm +HeAJBQD4IAYV4AwFAPggJhXgDpUA+CBGFeANBQBYfcj0c6YVoAIFANEPwCDRDwAAbBAKKiAF+EDw +FeAMFQD4YGgdp7UBAOgWACXb+QAA68s5ChgEgADrFgUsIASAAP1BwARRmQEAwcP9QCAlIgCdAI0i +7+tFHpwWAADr60ERsBEAAOYWBCz3goAAr+7uFgMs1wKAAKuq6hYHLMAEgACHF/UABCISAJ0AihQn +cp6GE48X+uAHW6IAnQAmYr8v8p0G/wHvFgYnmhGAACUhG4pChymGKgWlNvVPAA5xCwUAfLMB1aCY +GgdmDPTABePiAJ0AKhoA9UIyDeD89QArIBaYGv1gBf0iAJ0AikL6oA56ogCdAIwVG+s2h0OYGut3 +AQYI+YAAYAC2AAAa6xeKqOgWCiUM34AAixeMFIYTK7KejxcmYr98s0Mv8p0c6w4G/wHk8DllW/0A +AJvI7xYGL/tuAABgAqMAAAAA+CFmFeAKBQBZuT4a6wSKqIkb6BIKJQ7fAAD//0wNoA8FAMDwHOr+ +wLoLqzT7gQYV7/8GAAAAAAD//HgNoA8FAJkb6iQACtgEgABYgmaJG+gSCiV5qYAAYAI1AJkb+kDw +FaAMBQBYgkCJG+gSCi15lgAAYAMa8OAEiFIAnQAtIRqMKZcY+CFGFaLtAQDpFgsvBBYAAJcY+CFG +FaLsAQDpFgsnA4GAAJga6RYLLv/CgAB1+14O1Qz51egFoLfpAOZCAy3cgoAAC3kCmRgIZgH2gGYV +oAECAIonmRsrEgDqrCAp4ASAAFh9kIkb+CFIFaALJQDrpAItIASAAOqiAigECoAA8v/7uFIAnQCM +KZcYmBqZG44YjxblrQwKWASAAOXMCAlQBIAA7UYCKugEgADsJgkp4ASAAFh9q4gaiRuPF/vzphWh +DgUAdesIKyAWJgr/drkMwKH6IKYVr/d2AAAAAOogByrgBIAAWIHViRv4IUgVr/+KAI8pGOrFiRal +/58pjEOLQI0V58QABMiBAAD8DgAFN+sBAO4WAS6I5gAAJyAHBwdBCHcKJ3Kf7q0QDVPCgADtqgIC +QEEAAOp3AQHT/QAA58cCAYw9AABtqQUIAIYJAmGLQMCAmBIZ6rAa6q8vIRqGFh7qrCQhBxjqqfwg +KBWh1zEA/6AARrpEAQDt0IAqJwKAAOzMDyZwQQAA+IYACjTMHQDkZgAmYAUAAAw8DBTqhA1dDOgi +AC/6AoAAn2aXZ55jnWUMpDkJiQLpZgQsRgKAAORmAiHQBQAACKgCmGEmIBTjZggNIASAAOYkFCgE +CoAA82AEGpIAnQCIF/UTphWhBwUA9OHyDeD59QArIBb5YAUdYgCdAIgS0oDRDwCKFWSgo8Ag0Q8A +AAAAAAAA6iQABNhhAAD8IIgV4AwVAFiDj2P/2Yon/CEmFafbQQDqrCAoBAqAAPWgBGHSAJ0AjBYr +CgHszCAp6ASAAFh4bpoS+oAIFe/7zgAAixbsTREJUASAAP1gAEXwDBUAWHa89IBgFa/9ogBlu/z5 +X9/I0gCdAC8gIPH/33eSAJ0AY/9zAAAAAAAAAOogByrgBIAAWIFjiBLSgNEPiifcMOsSACVQgQAA +WHz4wLL7QEYd4AIFANEPAAAAAOs0AA44BIAA/GBoHeAMBQBYeEvbQOw0AAroBIAA6hYCK/AEgADv +EgYpUASAAFh9F/qACBXv+xYA6iQABNhJAAD8ACIdoA0FAFiDU2P+6QAAbBAIkhSTFRnqK4hA+CBG +Fa/LBQDrKgECcCEAAPogZhWniEEA5IHAYlARAACPEy0hBamMLMAAr98EzAvv/EAuWASAAP+ADYri +AJ0A+iAmFaBoAQD+ACId4A0FAAb9OAvfC+vdCgfYIQAAghWeEPkAAEVwDCUA8kEAFeAPBQDyQIAV +oAIOAI0UDlUM/+AgFaADBQDv5AAEQAUAAPEOYA3gfgEAhhMioAAt0QUEIgvm1ggJWASAAOIWBiMx +AQAA9kAGeqIAnQAIBkDyACIdoA0FAAYtOAvSC+vdCgFYIQAA9yAQFaACFQAHIziHFQdmCxfqAqc3 +J3CgBjIKBjML7HwIAZghAACO0AsAiQXuNi4mAAMAiyLSAOqsASTIBQAA9F/7I+IAnQAFKQwOKgz7 +oAYVoAcVAPVgKBXgBgUACXY4CGgIIrIABeUIJbYBflsCIiwB4rYAJn0SgAAW6emLEh7p6Oa2AQeQ +BQAABiIChhXuuwEMbgKAAA27ApJg+oAGFeEsHQDRD4sQ/CAoFe/9UgAAAPxPAA3//MYAhRUZ6bkF +xQv4AAoV4AIFALEi5YMeCQ/oAAAd6dKGEhrp0u1tAQfYBQAADbsCjRXqZgEMTgKAAAlmAuvWACYQ +BQAA9oAGFaEiHQDRDwAAAADqFgEtaASAAPvAaB3v+dYA/Y8ADf/5PgBsEAz4QEgVoAoFAOsgBynI +BIAA8oBoHefFAQD9n8AVoAQVAOxMOQy4BIAA/CEmFaG7AQDzG1wN4AwFAJoWnBWZE5sUmxsuIBYV +6Yod6Ysf6a3vFggtx4KAAO2ICA2nAoAApUQd6akoFgr50wQFoP/1AH/hEwIqAlgsrhjpfh3pouoW +CCUqEYAAYAAXAABmY8v4wB8okPr1ACkgFvsgGU0iAJ0AiYj3IAYQkgCdACtSrhzpc2Sw0SzCfytS +rQy7AWSwx7CZmYgc6ZFks0sswIAszDf+IWgVpMwdAKw86xYCJmAdAAD1wAWCEgCdAC5Cnv3ACCui +AJ0AjBorQp0swr8MuwHrFgAlmVGAACpxDIl3mRH9QA6sYgCdACxwEOtyAyYJQYAA+Z/7KNIAnQAu +cgNk4NCPFmXxsIYRjxiNFO4SAClQBIAA5v82C9gEgADvFgEp4ASAAFgqZBjpRx3pa+evLm0wBIAA +YALyAADAoFm3exjpQYmIHelk+T/5iJIAnQD//QgNoAsFAMCwwKoKmTT5AQYV7/zOAABqkSQrQp58 +s0GMGitCnSzCvwy7AeSwNWTz/QAA/wEGFa/9KgAAAAAA/CGmFaAKBQBZt2QY6SqJiB3pTuwSDSSP +EwAA//yMDaALBQDAsMD6D580/wEGFe/8UgAAAAAAAAD//BgNoAsFAAAAAIoYwLGbFvlf+SriAJ0A +wOCeFvlf+MriAJ0A63QACVAEgADtEgkp4ASAAFgqoP4AIh3gBxUA5xYJLTgEgAD/QGYV7/u6AGSw +SY8V/gAiHaAMBQAP7DhkwIyIEYYY6iQAC9gEgADtEgQp4ASAAOhmNgjwBIAA5hYBIPgRAABYKyzo +6PwdMASAAP3SPgXv9/4AAAAAixgPAgAPAgD5YTYN4AwFAHmjAcDB+AAiHeAOBQAMnjjsFgUnfJGA +AOt0AAlQBIAA7RIJKeAEgABYK8r3QGgd4AsVAPohJhXgChUA+uBmFa/9ngCLEBXpASohB4lwHOj9 +/9HIBeqqAQD/QAAVOJkBAOyqAgTAPQAA/CEoFaSIHQDqtgAkQAkAAAg4DI4gmbPoXzkBs/0AAO+2 +Ai92AoAA7m4CBahBAADutgEuDuYAAIgT6IwgIZRVAADqPP4qyASAAG2pBQgAhgkCYSs8/gy7Eatb +mxAoIBQsIASjiPWACJkSAJ0ACAlHKSQU9SAKLlIAnQCIcigmHIlx6BYHLagEgADzIAowUgCdAPE1 ++A3gBwUAp2YmRp0qIBYrCv97oQrrEgEpUASAAFgumIwZZcDjwCDRD+sSASlQBIAAWC6TLiAWGOin +/dGWBeD/9QD/3+UcYgCdAGP8h4gZZY/SKnAQ23D8YGgdoAkVAPtf4BWgDQUA6p04CVAEgABYKVbA +INEPAAAA+kBoHaAbxQD8ACIdoA0VAFiBx2P/vQAAHei3LdCA6xIEJujdAAD6QGgdpN0dAPxgAEbw +DBUA7dwHJdhhAABYgbxj/48uIBYvCv//3/r0YgCdAOsSASlQBIAAWC5rwCDRD4sQDGwRrLv6IAYV +7/uWACgkFI1w8b/4upIAnQD6QGgdoAwFAFh06vbAYBWv/BIAiifrNAAJ6ASAAPtEABWgDAUAWHaN +0qDRDwAAAAAAAADrEgIpUASAAFgB8/ogCBXv+sIAAAAAAADqJAAMYASAAFgDdogXiXGaHOekAA1f +AoAA61UIBPVNgADrVAAJUASAAP0AaB3gDAUAWAM790AAQ//6OgCKJ/ygaB2gCyUA6qwgKegEgABY +KUgrcBD5f/E40gCdAClwFQkIRWSOGStxCRzocCpxDC9wEY4nDKoMq/8PiAn9wqQVr80FAO7sICR4 +iQAA7e4BBEBJAAAK+Dmofa7O7uxAJuiBAADu21p+0ASAAA7qMBvoYC2hAf1ABBWh+TEAC/8KKyIX +7/KfLmQCgAAM3QIL7gwP7iyu3ahe/cAkHe/dgQD9wAQd7/Z2AIsU+kBoHaAMFQD7YkAV4A0FAFiB +W2P+DQAA/a8ADT/+mgBsEAQjIAAkCu10MQYiIQO8ItEPhCGGIPJAaBWgCCUA92QAArCUcQD5DwAM +czYBAPRgAEHzZoEA5eg9HAEKgAAAZhr2YAEBvUQBAOUiAQGoOQAA5SIMAZhpAAAEJCwEMyijItEP +bBAIiiInIAeJMJUV+ELQFaF3AQDxXUwN6JkBAPggJhXg/PUAfIEdBQtH+3/AFeAJFQDrmzkJUASA +AFguEfNTMA3g/PUAGuf4iKgW5/b3AA2YkgCdAC5irhnn9mTh2ymSfyVirQlVAWRR0SiM/yimCOlU +AAKNgYAAG+gSJbCA7efrEqjdAAD4IAYV5FUdAOVFCAvPAoAA5pkIAqgNAAD04AiSEgCdACiSnvUA +EzviAJ0AJZKdDXgKKIK/CFUBZFGIKSAW/SMmDaDr1QAqMBD7QBJUYgCdACsxC7y72iBYLb0oIBQs +IASkiPWADEEXmAEAKSQU9SAOLlIAnQCKFR7n6Y0RKCEHHOfNGefl/6HgFeqIAQD/AAAUNP8dAOmI +Agf4BQAAD08MmFCLIA/sOfygZhXnqgEA7FYCLd4CgADrSwICyEEAAOtWASHAQQAA+UAJcVIAnQDo +QQ1iU/0AAG2pBQgAhgkCYcCAmBTpIAQiW/0AAAy7Eatb9SAJCRIAnQCIMigmHOkyASXYQQAAmxMo +FgLzIAm4UAUFAGaRUKVMiBQMfRGm3ezWnSwQBIAA0Q8AAAAAAPcADpCSAJ0ADHkRppkukp71wA77 +4gCdACWSnQ17CiuyvwtVAWRRzbCNnahlXt1gAGMAAAAAAAAA6iQACdgEgADtEgUqYASAAFh78dKg +0Q8AwKBZtcIa54eIqPkf8hiQ/PUA//lYDaAFBQAAAAAAAAD6QGgdoBvFAPwAIh2gDRUAWICxY/+x +wFDA6g6INPlBBhWv+K4AHeedLdCALdw3+uMAFeTdHQDtTQgJUASAAP2gYBXgDBUAWICkY/97AAAA +APhChh2v+g4AAAAAiif9IGgdoAsVAOqsICpoBIAAWHWE+iCGFa/7SgCLMPNgCKKSAJ0A4hIEK+cC +gACmzCTGndEPAAAAAAAAAOsSAClQBIAAWADjY/4wAADqJAAMYASAAFgCaIkxixOIEuysEQ0oBIAA +7LsIBPWdgADaIP0AaB3gDAUAWAIviBSlpaVMDH0Rpt3s1p0sEASAANEPAAAAAAD/9pQNoAUFAI01 +jDQe52r6YOgV4AklAPxwAAewrXEA+y8ADLuMIQD7IAQA08wBAOjMCA/4CoAA/4ABBn3dAQDuuwEG +cDkAAO67DAZgaQAADb0sDcwo/WAARb/1ugAAAADqJAAD2EkAAPwAIh2gDQUAWIBdY/5hwKBZtWAa +5yaIqB3nJvkf8QiQ/PUA//jwDaAFBQDAUMC6C4s0+0EGFe/4tgCwSwy7EetbCAlQBIAA+2IAFeAM +BQBYc4yzTOISBCvvAoAApt0s1p3RDwBsEASJNxfnOSswFvnOYAWjKgUACiooC7YJ6KgICzcCgACo +ZhjnM6dn5HK/KQEKgAD++AgVoAwVAOhmCA5oCoAA5kEYdMAhAACLMpjgnpOWkg27Aih2wJsy0Q8A +AB/nJq+vKfK9ALEE7fLBLnAKgAAOmQL596YV7/71AA7dAw2ZAR7nHuVywClvAoAArt2Z0I8ymFDm +hgApAQqAAOWGAS4gCoAABP8CKHbAnzLRDwAAAGwQChnnEgkpCiiSf+IWCCloBIAA+wAEANAGFQDm +FgorKAqAAPgghhXgVU0AEucJG+cJHOb6GObX9c4QBaMqBQDq2igOvwKAAOmSfybruQAAnRWkpKh3 +rKycFihyuSRCn+uqCATL/QAA+iDmFaOZAQD4ISYV4GMFAPiABAIwAGoAihrAsP3/4h2gYwUA7FUD +BQLhgACbGi1yuAReAQ7dAZ0QAQCHAzZgaD7VihiLF40VHObriBbjOQkB8oEAAO4WCSzPAoAAqYj9 +AABGP//1AOKICA8BCoAA6IKfK0gKgAAPmQMJRAELgABj/6oAihmLFLGqCgpDKrZ/0Q8AAGwQBBvm +2IogK7J/HubX+08ADXMvBQAPrygO/ggp4r8o4r79zaQF7/v1AAuZA+mLAQ1nAoAA/YAARn/09QD9 +gAgVoAMVAPkO4B3gDQUAGebIGOa0+QAARn8sAQDs/AgF/USAAMspCOowKcK/L+LACYgM6PsTfoEK +gAAv4r4AOBoEiAMI/wEv5r79oCAV4bsdAOSwLGZgwQAAf7cUY//EAAAJ6jD5l+YV7/+GAAAAAAAA +/aAgFeG7HQDlv9xmYMEAAFgubMAg0Q8AbBAEJiEJ+EKQFe/4BQAnIBXomAELNgKAAOiZDAu5AoAA +B2YC+EKGHeAHBQAnNAD4YGYdoAQVAARmApYxFeZlJFat0Q8AAAAAbBAEFuaYFeZv0w+mIgU1AiUm +gCQigGdAC20IBSgigGeAAmP/89EPAGwQBBPmjyI2imP//AAAAABsEAQoIAUlIAf6YKgVr/TVAPpA +SBXgAyUA/QEgEdFVAQDAINEPAIgpmisPAgD7AAg8IgCdABrmfwpaCemh/CVQCwAAKqEA+yAEs6IA +nQDzYARwEgCdAAIqAlhy0isiAg8CAAO6AWSvuIonBLsB6yYCJVDBAABYbEbj5kcVATmAACigANMP +0w8DiAooghDsoActWASAAPpAaB2gDUUAC4AAZa/ciSfTD2SfdiqZFMqniplkr2wooAADiAooghDs +oActWASAAPpAaB2gDTUAC4AAZa/gY/9KAAD//1QNoAoFANogWHK/KyAi6rsMCVAEgABYdAnaUPoA +Ih3gDAUAWHVMiyIDugHzf/rmYgCdAC8gB9og/AAiHaANBQD1YAQHMb8BAO4mAiXYfQAAWH8/wCDR +DwAAAAAAAADrICIpUASAAFhz9SogBcGDeKEMaKgpiyLzYAQFf/xGACkgOsC/e5nq+kBoHaALBQD8 +AAIdoA0lAFhzLGP/1wAA+kBoHaALBQD8AAIdoA0lAFhypWP/vwAAbBAKiCsd5hcuICGLN/xgyBWg +/+UAD+4BLiQhDcwBDLsM64kIeMgEgADAINEPAwCGCQJhmxUoIAUlIAf4IQYV7/TVAPxASBXgAyUA +/RtAQdFVAQCKKRzmE5sr+0AIFGIAnQAMXAnrwfwmYAsAACzBAP1gBKOiAJ0A86AEYBIAnQDaIFhy +ZIsiA7oBZK+biicEuwHrJgIlUMEAAFhr2QqrAuPl2RUBKYAAKLAA0w8DiAooghAssAf6QGgdoA1F +AAuAAOukAA1/HgAAiSdkn1oqmRQrkgnKqGS/TyiwAAOICiiCECywB/pAaB2gDTUAC4AA66QADX8u +AABj/y0AAAAAAP//SA2gCwUA2iBYclErICLquwwJUASAAFhzm9pQ+gAiHeAMBQBYdN6LIgO6AfN/ ++s5iAJ0ALyAH2iD8ACIdoA0FAPVgBAcxvwEA7iYCJdh9AABYftHAINEPAAAAAAAAAOsgIilQBIAA +WHOHKiAFwYN4oQxoqCmLIvNgBAV//DoAKSA6wL97mer6QGgdoAsFAPwAAh2gDSUAWHK+Y//XAAD6 +QGgdoAsFAPwAAh2gDSUAWHI3Y/+/AABsEAQc5buLNCkwFv1gBAW1mR0A9SAICJIAnQDu5bYUiImA +APvLagWv/eUA5OWIFKS5AABplSIsoX7sswx2UBEAAPtgCJuiAJ0AKyAGsLsLC0frJAYlgsmAAMAg +0Q8soX7TD+yzDHZ4EQAA/2AH0+IAnQAoIAawiAgIR+gkBix+3gAAiSeLIiqZFA27AZsii5lkoLQo +sAAEiAooghDaIP1g8BWgDTUAC4AAwCDRDwCLIoonDwIADbsB6yYCJVDBAABYa2HJrSigAASICiiC +EOygBy1YBIAA+kBoHaANRQALgABlr+CJJ2SfbyqZFGSgYIqZZK9kKKAABIgKKIIQ7KAHLVgEgAD6 +QGgdoA01AAuAAGWv4GP/QgAA6iQACdgEgADsRAAK6ASAAFhzP8Ag0Q8A6iQACdgEgADsRAAK6ASA +AFv/QcAg0Q8A//0cDaALBQD//nQNoAoFAIg3IuJ/CYgR+EAAQT/7lgCINyLifwmIEfhAAEE/+/oA +bBAEGuVFKKLbZIALCeowK6LcC5kMZ5AB0Q9YdPTRDwBsEAQd5VgnIAcc5Vf+QQQV4OcRAA7cOZww +iCD7yjYF4AolAPpgRhXgGQUA6TYDLEYCgAAKiQL4YCYV4XcBAOYgeSu8AoAA9+YAD3ANBQD8BAId +oAs1AOnlRRMCOYAAnTWcMwuKAhblQpoxGuVCBu4CJiEJnjSaNgRmAiIgB505lTv4xgALcSIBAOY2 +CikUAoAAAv8CCf8C7zYILZAEgADRDywhCCshCZ01lTcHzAIEuwIJuwIJzAKcNOs2Bi0QBIAA0Q8A +bBAEGOURHuUmLCAHHeUmGeUp+kEEFeD8EQD/zQAO8cwBAO02AC5kAoAADLsCCbsC44CAKbAEgAAd +5OP8QAgVoA4FAJ5l7WYCIbjdAAD6wIYV5HcdAOp8/y5mAoAA7HwCDVcCgADsZgElU+EAAJpjAgSJ +mWYjZgcGIIslIQn0wWYVpDMdAOVmCiuQBIAA6IAFAyjBAABtOQIFAmHRDwAAAGwQBh3lBQsrEa2z +KjJ/GeUDF+TgiKDAQPjgAETwBhUA6bkIBAGpgAAsMngvMnv5gAV8YgCdAGXxFCw2fCsyeSs2e91A +DeQWAQIAlKAN5BbAyfxABdwiAJ0ALzJ7wcDt5PAXg5GAACIyfCohBI4g8+H+Daa6AQAkNnz0b2YV +oAAeAC42fO2vAQXD/QAACP8C7yUEJYxZAAAiMnywzO8yeyEA8YAAycZj/7/aIFh1D2WgwiohBP9B +AAwWmgEAyJfRD9ogWHUC0Q/aIFh0xNEPAAAAAAAA+kBoHaALBQBYdZLRDy4s+OrSiC8BCoAA/MAB +Bd/89QAMuwMLqgEq1ohZuOokNnwkNnv6b+gVr/ziAAAAFeSAL1BhZPBqWa4vWHR7KHLb0w/IgVh0 +UClQYWSfKVh0SsiuFeS8LFJrsMzsVmsmAsmAAFhz0WP/DgAAAAAc5Lb+b4gVoApVAPxvSBXgC0UA +7RYAIWvlAABZtxr6b+gVr/syAC4ye+I2fC96HgAAIjZ70Q8f5Kov8q5x9ov2rCYdr/4iAAAAAABZ +rfb6rWYVr/6SAGwQBBTkohnknOjkeRlewoAApLQjQn+piOi4CAGCIYAAKjIAeKkCKkJ7HOSUKzEE +KkZ/DLoB6jUEKdAEgABYdMHOqSkxBP8hAAwW2QEAyNfRD9owWHS10Q/aMFh0d9EPAPpAaB2gCwUA +WHVG0Q8jRn/RDwAAbBAE8GDgDe/59QCIIgk5AwmIAZgiiicqrDBYakbj5EYVARmAACigAAOICiiC +EOygBy1YBIAA+kBoHaANRQALgABlr+CJJ8uSKpkUyqWKmcmtKKAAA4gKKIIQ7KAHLVgEgAD6QGgd +oA01AAuAAGWv4NEPAAD//1wNoAoFANEPAABsEAgW5GYb5GYd5Dz1yDQFoBjFAOMs6CXTgQAA+EAN +zCczAQAMNRGkVehSnilmwoAApsQpQH/5ABCT4gCdAChSnWSCB5sR6gseDUgEgACZEAoghgsCZQsC +Yw0AhwkCYQkCYRbkUR/kT+3DCAkBCoAA8iCmFeAOFQDj5BAfcAqAAJ4Tr8/+IIYV7//1AP/XAA9w +B0UA/iBGFaAAugAAipnJrSigAAOICiiCEOygBy1YBIAA+kBoHaANNQALgABlr+ApQiBkkOstQHwe +5C2MFQ3bCa7eDLsKLEB9pruKsi7ggGShOP3Hvg2gCBUAwPANjziIFQ//CQj/Ci/9Fy/8HC/yG/Hh +cA3gDAUAwLEL2wMLC0crRHwLuwkIuwqmu/yPph2gDAUAjbDvUp4m8/8AAC7g///gBHuiAJ0AL1Kd +9v/gFeD49QDx58AN53cBAHhxdOoSBCZABQAA6ER9JuPhAABYdEaJE9Kg6xICJIBhgACKoguqASom +AoonKqwwWGnOya0ooAADiAooghDsoActWASAAPpAaB2gDUUAC4AAZa/giSdknxsqmRRlrvL/+8QN +oAoFAIwRixAMgIYMYIYLAmkLAmfRD48RjRAuRH8PwIYPoIYNAm0NAmvRD5sR6gceDUAEgACYEAoA +hgsCYwsCYQ3ghwgCb+jsAAnQBIAAWa1ZZK+v7eO+Ga8CgADkVQgJZsKAAPeAAEI/+TIAAAD+IKgV +oAsVAPu3AA3wDAUA/I+mHae7AQArRHwLuwn/YAEFsAwFAPdgAEW/+3oAAAALYIYLQIYKAmcKAmXR +DwAAbBAEGOOFAgNHDDMRqDMrMoQZ45IosACKsQmICgohjAIKPiiCEAMCPvxAaB2gDSUAC4AAIjaE +0Q9sEAQU43cCA0cMMxEEMwgkMoQqQgEmQAAoQAj6mGgdoKklAAIFPgMCPnmBIxjjfghoCiiCEOpU +AApYBIAA/EBoHaANJQALgAAiNoTRDwAAAOskAApQBIAAWHQL80BoHa//NgAAAAAAAGwQBFmwvRLj +XBPjfQwCACkiggkajgOoCoiEC4AAY//rEuOkA+gwBO4wBbEwkyCUIZUiEuOgE+NfhCAEMwKTIBLj +nsAwKDdAKDdEKDdIKDdMIz0BcjPtEuOZwDCTIMcvE+OYAyMDEuOXhCAENAGUIBLjloQgBDQBlCAS +45SEIAQ0AZQgEuOThCAENAGUIMcvwDEDIwMS45CEIAQ0AZQgY//8AAAAEuONgyADExQPMxGTIBLj +isAwIyYAV//ZEOOJkQCSAZMClAMR44eCEAHqMKIRAfAxwEAE5BYAAgAR44OCECMaAAMiApIQEeOA +wCGSEATkMYQDgwKCAYEAANIwASMAAAAAEON7kQCSAZMClAMR43mCEAHqMKIRAfExwEAE5BYAAgAR +43GCECMqAAMiApIQEeNxwCGSEATkMYQDgwKCAYEAANMwATMAAAAAEONskQCSAZMClAMR42qCEAHq +MKIRAfIxwEAE5BYAAgAR41+CECNKAAMiApIQEeNiwCGSEATkMYQDgwKCAYEAANQwAUMAAAAAAFyU +AV2UAl6UA1+UAEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAABckAFdkAJekANfkABTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAnJQAHZABnZQCnpQDn5QECJQFCZQGCpQHC5QAQwAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAJyQAZ2QAp6QBx2QA5+QBHiQBXmQBnqQB3uQAFMAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADclAAdkAHdlALelAPflAQElAUFlAYGlAcHlAgIlAkJ +lAoKlAsLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3JAB3ZAC3pALHZAD35AEtJAFtZAGtpAH +t5AIuJAJuZAKupALu5AAUwAAAB///aQA0jEQ//4KAAAAAAAf//3sANMxEP/+CgAAAAAAH//+NADU +MRD//goAAAAAAAD0MAoAAAAAAPQwCgAAAAAA9DAKAAAAAGwQCCcgB4giFuJX/cSmBeF3AQDlgPFr +1wKAABjiUC6AgOaqCAdw3QAA/VPIFaTuHQCuTuviSxdwCQAA/4AIS6AJpQAqop0LfAoswr8MqgHq +FgIlB/mAAIjY9wAI8JIAnQAvYq7s4kEXhcGAACpirSzCf+yrAQRz/QAA/UAFJiIAnQCe2P1ABS4i +AJ0ALyAUpP8PD0cvJBT14AeuUgCdAPggSBXnhQEA+QAHcVIAnQDoPBAiDD0AALBKbakFCACGCQJh +wFCIEo0y7SYcIkv9AADrMgEszwKAAKmImBPzYApAUAoFAOoWAC2LSgAAixDrSwgL5wKAAObMCAXb +/QAA68adKpAEgADRD+okAAnYBIAA7EQACugEgABYdhPSoNEPAMCwCYw07NYILfseAACNImXf1fpA +aB2gG8UA/AAiHaANFQBYetdj/7///AwNoAoFAAAAjiJl77AtgIAt3Df64wAV5N0dAO1NCAlQBIAA +/aBAFeAMFQBYespj/4zAoFmvzR3h9ojY+R/2wJAJpQBj/5zaIFv7GWP/BgCOJ54RiOn7wqQV78kF +AOXpFCdggQAACckB6b0IClcCgADqVQwEQEEAAJjpCFUy5eUUJukBAAD9AAg64gCdAGirPairK7zw ++6AE0+IAnQDvEgIiDHUAALBObekFCACGDwJhK8IBC6sI5ckEJdvBAAD9YAbMYgCdAOvGAS3ABIAA +ZFCp9QBoHe/6lgAAAAAAAOokAA7gBIAA7BYELFgEgABb/HiLMYgTjRTqFgAtZwKAAOyICAX0/YAA +2iD7AGgd4AwFAFv8P40Q7a0ICpAEgADtTQgL9wKAAObuCAbr/QAALead0Q8I3Qz6IEgV5P0dANMP +bfkFCCCGCwJjKxIC708MBMEBAADtuwgHjEEAAC78/23pBQhAhgsCZS/JBA2oDKiYKIww6MYBL/rW +AAAqnECawfuABhWgCAUA+YCEHa/9FgALiAz5wSYVr/vaACicQPmAJhWv/LIAbBAEHeGeGuGfHOGd +LdKYKqF+LMKOo93qOgwO7kKAAP2AAEZwCwUAK8QEK8QFWRBA+kBoHaALBQBb/OrRDwAAAGwQBBjh +kSmCfyowBy2RAi6RBP0gpBWgDwUA65IAJokRgADu7P8mk/0AAOKVAi93AoAA7rsIDmcCgAD9bwAN +sADGACuRBS2RBLG7/7/gFa+7AQDrlQUvdwKAAP1gBrxiAJ0AjJDuzAgN3wKAAAvLDAsAhw/fYOsA +BwbzJ4AAHuFzKZEFK+J/CZkRqdnt4n0lhhGAAIzRi9CbwIvQnLGf0J/RK+J/sLsr5n/1oAYcH7kB +AIzZ+aMAFa/JBQD5AAQEfxIFAKLSKyY6/6IEHeVJBQDp1REkIQEAAOTWBy0vAoAA5NYGKlgEgAD1 +gATkIgCdACXVEOhYCAR4GwAA7IxAJ/oBAAD94ARjogCdAMky6UQABQCBgABtqQUDAIYJAmErIkKr +WP8ABYxiAJ0A6CZCJpPhAADRDy+VBf/8mA2gCwUAwKX9woYFoDslAFmzhcAg0Q8t4oCM0YvQm8CL +0Jyxn9Cf0SvigrC7+9BGFe/8+gAAwMD7D+gVoA0VAFh6xMAg0Q8AAAAAAAAA79YJJpPhAADRDwDL +MPpgaB3gXMUA7Kw2CnAEgABtyQULIIYOAmP4YABF8F5FAH6hDS+srNMPbfkFC0CGBAJlKY376SZC +JpPhAADRDwAAAADkJkImk+EAANEPAABsEASCIwICQdEPAABsEASFI4MgFOEX+ECEFaFVAQDq4RUa +rsKAAORUCAGAuYAA+wAEBDaYOQAJiAIoJQQiQn/RDx3hDBPhDR/hDSZCfishBC5Cf5JgliGj//1g +BAX2yzkADLsCr1/vJgAnKAUAACVGfyJGfuslBCqQBIAA0Q8AAGwQBIogZaBQHeD+6iIDKfbCgACu +3f2v6BXgDBUA/IBABjGqAQAGqgINyCwI3SgnJQXtzAwEWAUAAP1tAAw/+8UA66oBDE5CgAAJWQID +qgKaIwmIAiglBNEPjyMb4OoPD0EL/hGr6y2yfxng5CyyfnLZGdnA8yPeDaAMBQDAwCy2fyy2fvpA +CBWgAEYA2MDzDEYNoAwFAHLRHI0hmtCOICmyfZ3hnCDsJgEky/0AAPlvphXv/VoAGeDQGODQqYio +6HihIOq2fy+BLgAAza0qsn1qohgtsnv9b+YV4ABKAAAAAAAAAOy2fyf/KYAA+kAIFa/+pgAc4MGI +IayZqen5DwAM8AwFAAnIOPlvxhWv/ioAbBAE9cF6BeAGFQD0QGgdoAI1APaAQAMwAB4AALAiKFJ/ +6GP3cquBAADRDwBsEAQoIhzrNAAKYASAAO1UAAlQBIAAC4AA0qDRDwAAAGwQBPRCSBWkI0EA8loA +CT9TgQAEIgqEJoIhBUQoCkQRpCLRD2wQBCoiEiMgB/o+AAQwBjUA9QAJEJEzAQAKyFH1AAkokgCd +APooAAawOwUA/cEwBaAKVQBZstEX4Ibk4IQZzwKAAPRgBhISAJ0Ap5kqkp73QAiJ0gCdACqSnQQ7 +CiuyvwuqAfFO4A3nRQEAKCEHGeCI/8EQBaqIAQDr4IccRwKAAAmIApigGOCF/EAIFeA8BQCcp/tA +phXgGYUAmaP5QEYVoAgFAJim7t0CDv4CgACdpAb/Ap+hLyISD49B6KYIL/8CgACfqe3gdhn3AoAA +p+4m5p0sIhIqIhANzALsJhIpWASAAFjkLWhCGYon+gAiHeAMBQD7RAAVoA0VAFhuDdKg0Q8AwCDR +DxzgT4vIarFbDDkRp5ktkp5u02Yqkp0EPQot0r8NqgHkoFll8/0AAP+BBhWv/MIALxoAD6oC+kJG +Fa/7YgAoKgAIqgL6QkYVr/tWAAAAiSLLmWhCTcAg0Q8AAAAA//vsDaAKBQDAoFmuDBzgNIvIa7GW +//uYDaAKBQAAwKDA2g29NP2BBhXv+1oAAAAA6iQAAdhhAAD8AAIdoA01AFh4+WlCsYwnL8kUisn/ +hAAVr8gFAOjuAQf4QQAA78UUJVPBAADqxgkncQEAAH6rKinBFR3gM6qamsmdoIwg+8BiBeANFQDr +pgIuZgKAAA3MAv1AJhWgAgUA0Q8d4CmdoIwg+8BQBeANFQDrpgIuZgKAAA3MAv1AJhWgAgUA0Q8A +bBAYFOAikhCOIBngH4sjLSIBLCICLBYiLRYkKxYj+CDGFeAIFQD4IOYVoA81AP4hJhXgCgUA+iCm +FaAPtQD+IiYV4Ap1APohphWgCJUA+CHmFaAJhQD4IcYV4AtlAPohhhXgDUUA/CFGFeAMVQD8IWYV +oA3FAPwiRhXgDNUA/CJmFaAL5QD6IoYV4An1APgiphXgCEUAmBQa3//6JKYVoAIlAPIhBhWgAqUA +IhYQEt/4hRYrEiQpEgUmUX4sEiInUX8GmSgvQICpefheiBWjmQEAA5kK7pIAL1AEgAAlUj4tEiMI +7ggLUACOFywSJC0SIgbuKC9Aga5++F6oFaPuAQAD7gqO4CoWFuoSIy1YBIAAqO4LUACOGCwSFi0S +JAbuKC9Agq5++F7IFaPuAQAD7gqO4CoWF+oSIi1YBIAACO4IC1AAjhksEhctEhYG7igvQIOufvhe +6BWj7gEAA+4KjuAqFhjqEiQtWASAAKjuC1AAjhosEhgtEhcG7igvQISufvhfCBWj7gEAA+4KjuAq +FhnqEhYtWASAAKjuC1AAjhssEhktEhgG7igvQIWufvhfKBWj7gEAA+4KjuAqFhrqEhctWASAAAju +CAtQAI4cLBIaLRIZBu4oL0CGrn74X0gVo+4BAAPuCo7gKhYb6hIYLVgEgACo7gtQAI4dLBIbLRIa +Bu4oL0CHrn74X2gVo+4BAAPuCo7gKhYc6hIZLVgEgACo7gtQAI4eLBIcLRIbBu4oL0CIDn4I+F+I +FaPuAQAD7gou4gAqFh3qEhotWASAAKjuC1AAjh8sEh0tEhwG7igvQIkOfgj4X6gVo+4BAAPuCi7i +ACoWHuoSGy1YBIAACO4IC1AALhIQLBIeLRIdBu4oL0CKrn74X8gVo+4BAAPuCo7gKhYf6hIcLVgE +gACo7gtQAC4SESwSHy0SHgbuKC9Ai65++F/oFaPuAQAD7gqO4CoWIOoSHS1YBIAAqO4LUAAsEiAu +EhItEh8oEiUG7igvQIyufvkP6BWj7gEAA+4KLuIAKhYh6hIeLVgEgAAI7ggLUAAsEiEtEiAuEhMv +QI0oEiUG7iiaE65++RAIFaPuAQAD7gqO4OoSHy1YBIAAmxGo7gtQAIwRLRIhLhIUL0COKBIlBu4o +mhKufvkQKBWj7gEAA+4KjuDqEiAtWASAACsWI6juC1AALBIjLhIVjRMoEiUG7igvQI+ufvkQSBWj +7gEAA+4KjuDqEiEtMASAACYWIujuCAtYBIAAC1AAjhEqFiQpEhIrEhMoEiUtEhWPFewSFCRBAQAA +6BYlJuhBAADtFhUn+EEAAO8WBSZgQQAA7BYUJdhBAADrFhMkyEEAACkWEosdiRyMHi8SEI0f6BIR +JmBBAADsFg4n+EEAAO8WECboQQAA7RYPJEBBAADoFhEkyEEAAOkWDCXYQQAAmx2JFosXiBuNGe8S +CiERAQAA7BIIJEBBAADoFgsm6EEAAO0WCSf4QQAA7xYKIiBBAADvEgQmYEEAAOwWCCXYQQAA6xYH +JMghAADpFgYn+/0AAO8WBC/hZgAAixCIE4wSj7CJs42yjrGsmabdqu6o/5+wnrGdspmz0Q8AAABs +EAQpIhX4oAAE8Dh1AOmMDAEgQQAA8yAART+LBQDrpBAlUEUAAPkABdNiAJ0AKwoAWanDLCIVKyIU +7c0RCUAEgAD8QkYV7oA9AP1rAA2wCTUA+kJmFeAKJQBtqgyOhA4Oju6GBCRAEQAADwIA0w/TD22a +IemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuCnIPrRAAJUASAAFv+rYogiCKJIY8jCAiO +CQmODw+OCgqOmiCfIykmAegmAilABIAAGd7KAgCGAwJh+AAKFeAJtQBtmgIIAIrRDwAAAAAAAAD9 +gQAVoAsFAFmplPhAaB2gCUUA0w9tmiHpggQkQEEAAIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyD +6iQAClgEgABb/ovaQP/7/A2gPIUAAGwQBikiFfhCiBWgRgUA0w/4gABFdZkBAAlmDHSrAbGIKiYV +BioM6CYUJVFBAAD2gAezogCdAOs0AAtgBIAAWalo+EBoHaAJRQDTD9MPbZoh6YIEJEBBAACKgYuC +jIMJCY4KCo4LC44MDI6ZgJqBm4KcgyUsEOokAArYBIAAW/5oBkcM9uAFjtIAnQDmNAgK0ASAAPbg +aB2gAwUA5BYAKkAEgAD4yGgdoAlFAAoCZwhAhgoCZQgghgoCYwgAhuoMAAlABIAAbZoh6YIEJEBB +AACKgYuCjIMJCY4KCo4LC44MDI6ZgJqBm4Kcg+okAArYBIAAW/5L6lQAAZgFAADmbMAiIQEAAO9t +mmpABIAAixAKPBELywjsfAwK0ASAAFmpMNEPAAAAAAAA6zQACmAEgABZqSvRDwAAAPZgAEYwAwUA +/CAGFa//JgBsEAQY3l4Z3lwa3loT3l2TI5gimSH6QAYVoAsFACsmFSsmFNEPAAAAbBAG3iDk4hAq +YASAAOdCByvQBIAA+7yUBeAYNQDjQhUpkASAAOdyDiL76QAAePsnGN5LCPgKiICaE5wS7hYBLAAi +gAAAkxAqsqXsVAAJWASAAFmq6WSlx/KCphXgAgUA0Q8AAAAAK+ISC5tS7hYBJf9BgAAa3jPjFgAp +WASAAOqixyrgBIAAWarcZKV6Gt4s2yDqoskq4ASAAFmq1yN9BeSmz2GaAQAAGt4m2yDqossq4ASA +AFmq0PdH4A3jhgUAGt4g2yDqos0q4ASAAFmqymSmxBreG9sg6qLPKuAEgABZqsX7QEKIEgCdACsw +5cFY9WAr4GIAnQBptyElNOWLEPqCphXgAgUA0Q+TECqynexUAAlYBIAAWaq4ZKcCixD6gqYV4AIF +ANEPAJMQKrKr7FQACVgEgABZqrBlrxr6IGgdoAu1AFjgMfoAIh3gAwUA6rM4BQDhgADqEgIrWASA +AFmpNMipHN3+jREMrDYs1hdlMyWNEPyCphXgAgUA0Q8uQG5k7tKTECqywexUAAlYBIAAWaqZZa6/ ++iBoHaAbZQBY4Br6ACId4AIFAOqyOAUAqYAA6hICK1gEgABZqR4sfQMqxShlItGNEPyCphXgAgUA +0Q8AAJMQKrKz7FQACVgEgABZqoVkorca3dbbINMP6qKfKuAEgABZqoBlrlr6IGgdoAtVAFjgAfoA +Ih3gAgUA6rI4BSfpgADqEgIrWASAAFmpBCxAb/GAJz7SAJ0AZKTfihP6AKId4AzVAFjf3tKg0Q+T +ECqyuexUAAlYBIAAWapqZa7H+iBoHaAbJQBY3+tkojUrQG5kt2/qEgIrWASAAFmo8CxCFgrMNixG +FosQ+oKmFeACBQDRD5MQKrK37FQACVgEgABZqlhkojMa3anbIOqisSrgBIAAWapTZa5t+iBoHaAL +5QBY39VkodvqEgIrWASAAFmo2yt9Aiq1FIsQ+oKmFeACBQDRD5MQKrKp7FQACVgEgABZqkRkoioa +3ZTbIOqitSrgBIAAWao/ZKOHGt2Q2yDTD+qioyrgBIAAWao6Za4H+iBoHaALdQBY37tkoXUrQG5k +tuMa3YWLEuqi7ytgBIAAWaowZaZGK0BvwMgMuwIrRG+LEPqCphXgAgUA0Q8AAJMQKrK/7FQACVgE +gABZqiVkoe8a3XbbINMP6qKhKuAEgABZqiBlrZ/6IGgdoAtlAFjfoWShDStAbmS2ahrda4sS6qLv +K2AEgABZqhZkpnkrQG8sCv0MuwErRG+LEPqCphXgAgUA0Q8AkxAqsqfsVAAJWASAAFmqC2Shtxrd +XNsg0w/qopsq4ASAAFmqBmSi2hrdVtsg6qK7KuAEgABZqgFkrF8a3VLbIOqiwyrgBIAAWan8ZaxM +Gt1NixLqot0rYASAAFmp92WkUosRK7ISC5lSyJlokgf5IA9h0gCdAIwRK8YS8oKmFeACBQDRD5MQ +KrKX7FQACVgEgABZqepkoXoa3TrbIOqimSrgBIAAWanlZay0+iBoHaALJQBY32bKohrdMosS6qLv +K2AEgABZqd1lrJSKE/oAQh3gDNUAWN9I0qDRD8Ag0Q8AAAD6IGgdoAv1AFjfWGSv6uoSAitYBIAA +Wahf6xIAI+ALAAAqxRX6gqYV4AIFANEPAAD6IGgdoBsVAFjfTGSvui1AbmTVBilAb/E/4ZeSAJ0A +8T/hV9IAnQDqEgIrWASAAFmoTS5CFwruNi5GF4sQ+oKmFeACBQDRDwD6IGgdoAulAFjfOmSvci9A +btMPZPR26hICK1gEgABZqD8oQTT7AA8CogCdAIoT+gFCHeAM1QBY3xnSoNEPAAAA+iBoHaAbVQBY +3ypkrzLqEgEqWASAAOwSAitoBIAAWN6yixD6gqYV4AIFANEPAAAA+iBoHaALlQBY3x5krwIpQG5k +lBka3OmLEuqi7ytgBIAAWamTZaJcK0BvjRD8gqYV4AwVAAy7AvqN5h3gAgUA0Q8AAAAAAAAA+iBo +HaALFQBY3wxkrroa3NiLEtMP6qLvK2AEgABZqYJlqymKE/oAIh3gDNUAWN7t0qDRDwAAAADqEgIr +WASAAFmoCPVAFfKSAJ0Axy/RDwD6IGgdoAuFAFje+PoAIh3gAgUA6rI4BQFJgAAsQG4PAgBkw4Ma +3MjrEgIrYASAAFmpamWibi1Ab8DoDt0CLURvZS41jxD+gqYV4AIFANEPAOoSASpYBIAAWN7tZa+c +KzDlY/pzAAAAAPogaB2gGwUAWN7eZK4CKEBu0w9kgvXqEgIrWASAAFmn4ylCGIsQK0YVCpk2+IMG +FeACBQDRDwAA+iBoHaALNQBY3tBkrcoa3JyLEtMP6qLVK2AEgABZqUbj3KIdBy4AAIsRK7ISC8lR +yJlokgf5P/kR0gCdAI4RjBADvQEt5hL8gqYVoAIFANEPZS2EjxD+gqYV4AIFANEP6hICK1gEgABZ +p8IqRTSCEPKCphWgAgUA0Q8lfQT0sAAV4AsFAPqgaB2gjAUAWadT6hICKtgEgABY3wUrMOXAxAy7 +Avp8Jh2nuwEA+nymHe/l/gAtMOX6IEgVoA4lAA7dAu005StYBIAAWaeqKzDl+nyGHa/lbgAAihJZ +mykvMOJ/qRSKElmbJtyg6hICI9gTAABZqRFkobfAov242AWgOwUAWa6Rxy/RDxrcXYsS6qLXK2AE +gABZqQhlrj6LESuyEgvJUWiRCmiSB/k/8WnSAJ0AHtxfA70BDt0CjhGMEC3mEvyCphWgAgUA0Q+K +E/oBIh3gDNUAWN5n0qDRDwAAAPogaB2gC0UAWN54ZKxqGtxEixLTD+qi1StgBIAAWaju49xNHQVm +AACLESuyEgvpUciZaJIH+T/uEdIAnQCOEYwQA70BLeYS/IKmFaACBQDRDxrcM4sS6qLfK2AEgABZ +qN5lrZaLESuyEguZUmiRCmiSB/k/7CnSAJ0AH9w3ghHvvwID6BcAAO8mEibqAQAALNDlwOEOzAIs +1OXygqYV4AIFANEPihP6AQId4AzVAFjeOdKg0Q8jfQUjPIArMOXAwQy7AgsLR/p8ph3v4BIAAAAa +3BSLEuqi1ytgBIAAWai+Za0XixErshIL6VFokQpokgf5P+gx0gCdAB3cGAO8AQ3MAo0RLNYSixD6 +gqYV4AIFANEPAAAAAAD24ABDMAsFAPrAaB2gjAUAWabUwVDqEgIrWASAAFjehisw5QW7Avp8Jh2n +uwEA+nymHe/eEgAAACsw5cDIDLsCCwtH+nymHe/dvgCKE/oA4h3gDNUAWN4J0qDRD4oT+gICHeAM +xQBY3gXSoNEPihP6AUId4AzFAFjeAdKg0Q+KE/oBIh3gDMUAWN380qDRDwCKE/oBAh3gDMUAWN34 +0qDRD4oT+gJCHeAMxQBY3fTSoNEPAIoT+gIiHeAMxQBY3e/SoNEPihP6AMId4AzFAFjd69Kg0Q+K +E/oA4h3gDMUAWN3n0qDRD4oT+gDCHeAM1QBY3eLSoNEPAGwQBCQiEGRAbCkwECowESwwGuswEizO +AoAACpkC6jATLM4CgAALmQLrMBkszgKAAAqZAuowGCSFEQAACKoRC6oC6zAbLVYCgAAMqgIIqhEL +qgKxquomFiSEjQAAKSIS69u8FMAogAALmwErJhIsQAUtCpV9wUnAINEPAC4wFC8wFegwFi92AoAA +D+4C7zAXL3YCgAAI7gII7hEP7gL912AAUI0FAC8iEnj3JMCl/bdSBaA7BQBZrcjAINEPAAAAAPqA +aB2gC2UAWPjOwCDRDwCMJynJFIvJ+YQAFa/KBQDqiAEEyQEAAOnFFCXbAQAA68YJJEEBAAB4uwYu +wRWr65vJGNuV2bD4AAgdoA9FAG36AgkCYRzbe5ywiiD9QAAVMAxFAAyqApqxKTAUKjAVHtuL7zAW +LM4CgAAKmQLqMBcszgKAAA+ZAu62AizOAoAACpkC6bYEIcAhAADoBgAF+GEAAA8AiioiEokiDaoC +6iYSLPfmAAD6QGgdoA01AAvgAGP+6QBsEAYoIAQpChh5gQPAINEPKiISJCIQ0w/zQApH0gCdAC9A +btMPDwIA/ecAgNCcVQArQAV8sdUc22n8QAgV4AolAP6ACBWgOwUAWa2C+oBoHaANJQD8TKYd4AsV +AFj4iMAg0Q8AHNtfjSCONi8xC/hj8BWgClUA+CAGFaA7BQBZrXUa21gkIhgsMQuILIlKhUf9AABE +MAsFAPhBhhWgDQUA5VIOJJBKgAAtRh4KngL+gUYVoAAeACtCHutaCAHYgQAAWaX+L0IeLjELjUCv +7i5GHipQBCxQBRjbROtQBi1WAoAADKoC6VAHLVYCgAALqgLs2z8dLgKAAAlVAghVAfSgYBXv+MUA ++KAEArA7BQD+oGgd4ApVAFmtTyoiEykxCytCHg8CAAqZCOkmEyLAwQAA+X/2xSIAnQAd2y4sQgoN +zAHsRgopUASAAFj1j/pAaB2gCwUA/AACHaANJQBYNrHAINEPAC8iEy4xC/pAaB2gCwUA/8AAR3AM +BQD+QmYVoA0lAFg2qMAg0Q8AAABsEAYc2xktIgAuMgX0QOgVp1UBAP6/wBXgCBUAD4859IKCFaAK +VQD0IAYVoDtFAFmtJokiZZCYJiAHF9rYBgZB6jIFK0cCgACniCuCniSsH/m1pAXkRB0AdLN8KIKd +CWsKK7K/C4gB7YQABAOpgAAc2vYMAIdtSQIIAmGINB7a157QiSAc2tnq1gMm2EEAAOzWAizOAoAA +6UkCAeCBAADp1gEpUASAAAuAAAxvEaf/5PadIpR1AACKJ/oBQh3gDAUA+0QAFaANpQBYaG3SoNEP +wCDRDwAAAAD//iwNoAgFAOokAApoBIAA+sMAFeAMBQBYc3nAINEPAGwQBIcnKnkUH9rS+OKkFe/N +BQDocgglUAcAAOxyCyVSgQAA6pN3c9iBAAANuwGrmejBdHTJAQAALo0B6nUUJ1KBAADqk3F8MASA +AHmhfZp47wAFCzgEgAAHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEX2qCXYIUgk2WUZPO1 +eAWgB6UA4mYCKq4CgAAHVQLlZgErEASAANEPwCDRDwAAAAAAAPeAaB2gCAUA+OFmFa/+cgAImgwK +ugwqrQEqrOD64QYVr/4iACy8QPzhBhWv/fYAAGwQBMePCFgDCDgCCEgDqGjoIggLgQqAAAIiGKIy +0Q8AbBAEBDgDCFgDqGjoIggLgQqAAAIiGKIy0Q8AAGwQBAQ4AwhYAQhIA6ho6CIIC4EKgAACIhii +MtEPAAAAbBAEBUgDCDgBCFgDqGjoIggLgQqAAAIiGKIy0Q8AAABsEAQjIhAoMAX4QkgV4JQlAHSJ +SP8ooAMQjQUAeJ89cJ8Z6tqAFL1YgAAKmgH6QkYVoAIFANEPAAAAAAD9tPYFoApVAPxgCBXgOwUA +WayLKzBu0w9psQUsMAV0wQbAINEPAAAA+mBoHaANJQD8TKYd4AsVAFj3jMAg0Q8AjCcvyRSLyf+E +ABWvyAUA6O4BB/kBAADvxRQl2wEAAOvGCSdxAQAAfrsGKcEVq5ubyRzaU9mw/AAIHaAKRQBtqgIJ +AmEc2jmcsIkgHtpO+//iHaAMRQDqtgQszgKAAAyZApmxKCISjyKesg2IAugmEi/7hgAA+kBoHaAN +NQAL4ADAINEPbBAEE9pKAyIC0Q8AbBAGJiAHiCIc2g/0QggV4WYBAOWCe2tPAoAArJkokp4a2gj3 +ABOK0gCdACSSnQpoCiiCvwhEAejaHBIS6YAAJyISiin4QUgV4HdBAJcQCHcKJ3KQ6pkMA9jBAAD7 +IA+z4gCdACsgFigK/3ixEvpA8BWgDAUAWHDg7NnzFRGhgAArIQcd2gD5tE4F6rsBAO/aAB3fAoAA +DbsCm0CIIPu0RgXgSgUA+oBmFaAGVQDvRgIsdgKAAAbuAp5BLSISjhAvIRr7tDIFot1RAOruEQ7t +goAADe4CC+4C+wYADDHeMQCp3S3QgOhGBC/6AoAAn0YNfQzuRgcm6MEAAJ1FKiIViyn3QABFf+kF +AOe7CAVQwQAA6iYVJdjBAADrJgkiUIEAAPiAC2xiAJ0AG9nxxJD6AAgd4A0FAAoCYQoCYQoCYSlE +IC1EJC1EJy1EJvyEph3vigUAKkQhL1IR/odmHej/HQD+h0Yd6P8dAP6HJh3o/x0AL0Q4LiIW/ofm +HajuHQD+h8YdqO4dAP6Hph2o7h0ALkQ8ijQY2efv2dsR8GEAAPVABhgQ+fUA7gYAAlChAAAKAIop +RDAoRDH+hkYd7/71AC5EM4o0LUQj+obmHaj9HQD+hEYd6OodAP6Gxh2o7h0A/oamHajuHQAuRDTr +AAUCSQEAAAkCYSggBwgIQQyIEayIJoadKyAWLwr/f7EK+kDwFaA8BQBYcE6INGiAJ4on+gCCHeAM +BQD7RAAVoA1FAFhnPisiEiz6fwy7AfpCRhXgAgUA0Q8e2bstIhIO3QL8QkYV7/8uANogWHCG7Nl6 +FXApgABgACuIXhnZrrGImF4JiAL4hmYdqPgdAP6GRh3o/x0A/oYmHej/HQD+hgYd7/zeAMAg0Q8A +AOtsGClQBIAA/AAiHaANVQBYcjXAINEPAOtsEilQBIAA/AAiHaANBQBYci/AINEPAGwQBiQiEioK +jukiEyJ8bIAAKDELqYj4QmYVoAkFAOkmESyQBIAA0Q8vIhgv8HR68VQoIAUa2Y/p2Y8UAlmAACsx +CwpEASQmEo05LCITfZg/LiIRq8zsJhMiZZ6AAGTgko3sfdcgiOv7wGgdoAsFAPwAAh2gDSUAC4AA +wJDpJhEskASAANEPwCDRDwAAAAAAAP2y9AWgCiUA/kAIFaA7BQBZq4EqIhApoAUrCpV7kdbAwvxM +ph2gCxUAWPaGwCDRDxzZb43g/8CwFaAKVQD0IAYVoDsFAFmrdC0iEsCQ+EImFe++9QAO3QHtJhIs +kASAANEPANogWPO5wJDpJhEskASAANEPbBAIKiISDwIA80APJ9CI5QAtIhgr0HT5YA60IgCdACkg +BRzZVu/ZVhSOQYAADKoCKiYS80AnO1IAnQCOLCgyBiQwIPxhRBWv9cUA/wAnrSVEAQAMDE79m2AV +oCZVAPWABAZwhbUA9WAS1GAnFQAPqAKs6fhBhhXgOxUA+EJGFaAsJQD2gkYN4AoFAHZBCntBB/yA +KD0iAJ0ALTAwKiIQLjAxLzAy6qBwLu4CgAAO3QLuMDMu7gKAAA/dAujdEQV4GQAA7t0CD4IKgAAN +Dhn1wCPXVf0BAArlEQX1ApUR+iAGFaA7BQD9sk4FoApVAFmrLRzY4xvZJSzCoC8iGCuyiqXM7/B0 +LmZCgACsu/pCJhXgiLUA6rAFLegEgAD54Bg1IJ6lAP9AF/QgmLUA+UAXtCIAnQD1QBdwkJmVAPlA +IKVgD0UA9oAFfGIAnQD2gAU8IgCdACkwQSwwQC4wPCowPegwPi5mAoAA6cwCD3YCgAAK7gIpMD/q +MEIvdgKAAAjuAugwQy5mAoAA6swCD3YCgADp7gIOZgKAAAjMAg7IDOoiECQEi4AAJaISflEIBegM +ZoACLqYSLqITfOEIDskMZpACLKYTirwPqgKavHZBPcPB/IAJfCIAnQD2gA+MYgCdAMLi/oAXdCIA +nQAvEBBl8xLAINEPAAAoMCPAkQiYOSi0QSgUEPaf+l0iAJ0AKjAhf6e7KTBBLDBALjA8KjA96DA+ +LmYCgADpzAIPdgKAAAruAikwP+owQi92AoAACO4C6DBDLmYCgADqzAIPdgKAAOnuAg5mAoAACMwC +DsgM6iIQJASLgAAkohJ+QQgE6AxmgAIuphIuohN84QgOyQxmkAIsphMuMDgoMDmMvOkwOi92AoAA +CO4C6DA7L3YCgAAJ7gLq2LofdgKAAAjuAu/MAgdwBQAALiYWnLz7YWYVr/y2AAAA+ABiHaOa4QD5 +H+z2YgCdACgwJCkwJeswJixGAoAACYgC6TAnLEYCgAALiAIIiBHpiAIGWBEAAPltAA4/9b4AACkw +IfEgB84SAJ0AKjAkLDAl7jAmLVYCgAAMqgLsMCctVgKAAA6qAgiqEQyqAmWgzywwTC4wTe8wTi5m +AoAADswC7jBPLmYCgAAPzAIIzBEOzALqIhAmBWmAAC6iGP3ABROiAJ0ALLYSKjBILjBJ7zBKLVYC +gAAOqgLuMEstVgKAAA+qAgiqEQ6qAiq2FCkwNC4wNeowNizOAoAADpkC6Nh7HM4CgAAKmQL6ZvAV +oA4FAC62FS62E+i2CyzOAoAACpkC+WGmFe/4hgAuMDgvMDnoMDovdgKAAA/uAu8wOy92AoAACO4C +CO4RD+4C7NhpF3AFAAAuJhb9YWYVr/eyAAAqIhAvoAUoCpX5/+8EIgCdAMCS+EymHeALFQBY9WzA +INEPHNhc7bIALXAEgAD6QkgVoDsFAPogBhWgClUAWapYLSIS+kIIFaBOBQAO3QItJhIuMEErMEAs +MDwvMD3tMD4t3gKAAO67Ag5mAoAAD8wCLjA/7zBCLmYCgAANzALtMEMt3gKAAO+7Ag5mAoAA7swC +Dd4CgAANuwIMvQz3v+poEgCdAC2iEnzRCA3PDGbwAiymEiyiE/uf6ZxiAJ0ADLgMZo0o+0JmFeAC +BQDRDwAAACowOCwwOe4wOi1WAoAADKoC7DA7LVYCgAAOqgIIqhEMqgLp2CkVUAUAAComFpm7itcp +PCD7QcgVoAs1AG26BQkAhgoCYcAg0Q8pIhFkkH+Jl4me+SYAFeALZQAqPCDTD225BQoghgkCY8Ag +0Q8AACoiEGP+vAAA/+4wDa/19QAc2BMvMDApMDGOsOgwMi/+AoAACf8C6TAzL/4CgADo/wINaASA +AOgwIC/+AoAA+eYAD/AKJQD4IAYVoDsFAFmqBMAg0Q8AAAD6QiYVr/2SAInXKzELiZ6/uwtLS+W/ +fGTIwQAAY/w1AGwQBisiByYgBw8CACi5FAUNR/VhyBWhZgEA47IJJA5RgAD5oBBRUgCdABzX7ygi +AP9gSBWgClUA/b/AFeAJFQDtnTkJeASAAPggBhWgOwUAWanlHNfm/GAQFeAKVQD+ShAVoDsFAFmp +4BfXlOXXkxtPAoAA9MALwhIAnQCnmSqSnvdAD1pSAJ0AKpKdBWsKK7K/C6oBZKGlKyEHKSBALyAH +9a8yBeq7AQDt19Ed3wKAAPUgC5iR7wEA9SAJGRIAnQD1gAjakgCdAMDA+a+UBaD/EQDpIQgv+oKA +AA+7Au27Ag90AoAADpkCCJkCm6COIJim9UBGFeA/BQD5QIYV4A1FAP9AZhXgCQUA6aYFJViBAADp +pgcvdgKAAP3GAA9wDyUA7qYBLnYCgADv7gIFSQEAAAMghgsCYwMAhgsCYf9BJhWvlXUABICGCQJp +BGCGCQJnBECGCQJl6CISK08CgACnme2WnSEhIQAA9QxGDa9nhQAW16EjIhIPAgAHOQgqkicllH0s +kiYspgArkib7YCYVoAgFAOiWJiGbgQAA6JYnKdAEgABZp436AKIdoDsFAOxkAAnoBIAAWamLLyIS +wOHTD/XvAA+wDQUAD+04ZN+k5SQFKVAEgABZp4DAINEPAPyAUBWv+54A//jYDaADBQAc1zCLyGqx +fwxpEaeZKJKe9wAEclIAnQAqkp0FbQot0r8NqgFkoHywvp7IZa55YAAcAAAAAAAAAPwQQh2v+n4A +LyBACP8Q/mAGFe/3wgCPImTwXxzXbu4iACloBIAA+eBoHaAJFQD/LQAMcApVAPggBhWgOwUAWalg +wCDRDwAAAP/4hA2gCgUAwKBZpOQc1wyLyPl/+5CSAJ0A//40DaAKBQDAoMDaDb00/YEGFe/9+gAA +AI8w6iQAA1hhAAD/rqgFp//BAP5IBh3gDBUA/mAGFaANRQBYb8z+QEgV7/3eAGwQCIknKyAHKJkU +9OAABnG7AQDmkgkkCAmAAPmACeFSAJ0ALSBBHNbw5NbwHZgEgADxs0wN4AVFAPYAAh3gDQUA9WAG +2hIAnQAMuhGkqi6invXADRviAJ0AKaKdDL4KLuK/DpkB6pQABInpgAAvIEFl8WYc1vEZ1yooIQct +IAce1yn+QQQV6ogBAPwgAAXw3REA6t0QDEcCgADtiAIN3AKAAAv/Ag7/AgmIApigiCCfpP9AxhWg +DQUAnaX9QOYV4DsFAP1ARhWgCUUA66YDLEYCgAAJiALopgElSIEAAAYghgkCYwYAhgkCYfzgABWw +DCUADLsCm6kMOhEEqgj1U6YV75l1AOkkBSlQBIAAWab/wCDRDwAAAAD/+/wNoAYFAB/WsI7498AG +uJIAnQAMOhGkqiiinvUAB4PiAJ0AKqKdDDgKKIK/CKoB5KDeZ0v9AACZ+PlAaB3v/DoAKiBACKoQ ++sAGFa/6+gCPni3wBCfwBR7WzuXwBi7uAoAAB90C7/AHLu4CgAAF3QII3REP3QIO3QEl3Gf0jgAK +8IeVAPSggBXv+n4AjyLrFgQnhHmAABzW4e4iACloBIAA+eBoHaAJFQD/LQAMcApVAPggBhWgOwUA +WajRwCDRDyzcSOvcZylwBIAA/sBoHeS7HQBZp7Zj/n8AAAAAAP/5pA2gCQUAmxT8IKYV4AoFAFmk +TB/WdI0VjviLFBzWdPnf+ICSAJ0A//y4DaAKBQDAoMDKDOw0/eEGFa/8fgAAAACNYOokAAXYYQAA +/a14BafdwQDtJEAq6ASAAPzABhWgDBUAWG8y/kBIFe/9MgBsEAaJJyMgByiZFAMDQeaSCSQHMYAA +FNZb9ayyBeeFAQD5AAihUgCdAPRgBpoSAJ0ADDkRpJkqkp4FOworsr/3QAnqUgCdACqSnQuqAWSg +9ykgByshBxzWmPtAAAXw2REA6t0QDd8CgAANuwIMuwKboI4g+ayuBaA/BQD/QGYV4A1FAOimAi92 +AoAADe4CnqEsIEH6AAId4A8FAPlEABXh6QEA5cDRb3QCgAAsIQifpQ7MAh7Wgp+nnqYOzAKcpAYg +hgkCYwYAhgkCYf1gABWwDCUADLsCm6kMORGkmf0zphXvmHUA6CQFKVAEgABZpm3AINEPAAAAAP/8 +aA2gBgUAF9Yei3hqsX8MORGkmS2SngU8CuzCvygECoAA96AEClIAnQAqkp0MqgHkoHVl6/0AAJ14 +Za8ZYAAOLiBACO4Q/sAGFa/7mgAAjyJk8GUc1mHuIgApaASAAPngaB2gCRUA/y0ADHAKVQD4IAYV +oDsFAFmoT8Ag0Q8A+hEiHe/8vgD/+yQNoAoFAMCgWaPSi3j5f/uokgCdAP/+YA2gCgUAAMCgwMoM +vDT84QYVr/4iAAAAAACPYOokAAHYYQAA/6yMBaf/wQD+SAYd4AwVAP7ABhWgDUUAWG66/kBIFe/9 +xgBsEASKKo6vGNY96CYLIUiBAADp5gAleOEAAO8mCClYBIAA/kEmFaAMBQD5QeYV75iFAPhAph2g +DSUAWG0mwCDRDwAAAGwQBBvWLioxDNMPK7J/HNYP+GIQFeAUZQD7Q/YN4AUFAHyhF+okAArYBIAA +7DQACmgEgABY8nrAINEPAGiRQWiSIWiUCcBA//9kDaAFBQB8odF7q87aMFjyqNWg//8QDaAEBQD9 +QOYNoBRlAHujAmAAAcBA2jBY8r///pwNoAUFANowWPLT5aQABQERgAD9rBgFoApVAPxgKBXgOwUA +Waf7//38DaAEBQAAAAD//dANoATFAGwQBCkwE/EmAA3g9YUAaJEDwCDRD4QnhE4c1f3tMBEiQBcA +AC2EYv5iUBWgClUA/wxmHaA7BQBZp+gqTQTsMBEh2GEAAFjy5OU7CAJQFwAA7DASJVOBAABY8t/q +JAAKWASAAFj0NcAg0Q+EJw8CAA8CAIROHNXoLTARLUQC/mJQFaAKVQD+gGYdoDsFAFmn0us8GCJQ +CwAA7DARJVMhAABY8s3lOwgCUA8AAOwwEiVSoQAAWPLJwCDRDwAAbBAE9EBgJeizHQAjVFf6qsYd +4EQ1APSqph2gCHUA+KqGHaAJBQD4qmYd4EoFACpUUtEPAGwQBI84/auQBaAKVQD8YhAV4DsFAP/g +aB2h//EAWaeyKTAQ6tXCFIyRAABokllplBKINiKifwmIEagiKCAFKQqVeYFewCDRDwAAANowWPUM +/18ADeAJdQCLp4u+LLKODJ1W/SNAHejsuQDA037QEPtgQCXgDAUAWPTWwCDRDwAAWPPxwCDRDwCL +Niqifwm7EftAAEVwCwUAWPN+wCDRDwAAAADApf2rRAWgOwUAWaeO+kBoHaALJQBY8pbAINEPAGwQ +BIguIyw4c4kFwCDRDwAAiy6Is+xEAAroBIAA67zgKVAEgAALgACMIu0gBS5+7gAAZN/Vji5z6dZj +/80AAABsEBYrIAeHNSMWGog05RYXKkgEgACZHOoSFyn4BIAA/+HkFeADFQDyIeYV4MhZAPwjZhWh +uwEAKxYW/CNIFaC/eQD6ImYV56oBACoWFRvVeS7BPS3CH/wiBhXj9vUA+2/EFeB3+QD+IkYVoEhR +AP2DsBWsOB0A6zsMBFQ+gAAPCEn4IcYVoAAaAJYe/CAGHa+7AQArFhT1QDwhEgCdAI8i++BBoJIA +nQDw5XAN4AoFAOoWESOASYAA2jBY/Vn0AAId4AYFAC0SG9pw+gBiHeAMJQDtvDkKWASAAFj9QfdA +AEMwDvUAduBU9CFmFaT2HQDjFgon+AUAAP4jBhXgAToAAAAAKBISZIdiKRIaiZV9lp4rEhIsEhD8 +IGgd4AoVAOoWESnQBIAAWP1vZqeS+gBiHeAFBQAKtTpkV3zDYJQb8iFGFeTGHQAsFhgtEhYc1Nge +1Nrj1NoeoASAAPWgCToSAJ0A6RIYLrcCgACjZihinvkAQSPiAJ0AJmKdDtgKKIK/CGYB22DmtAAF +vYGAAI/ImxX34D3okgCdACkyrurVJhS7gYAALjKtLaJg7esBB9P9AAD9wDrmYgCdAJrI/cA6/mIA +nQCNHCwgFA8CAK3MDAxHLCQU9YA8flIAnQAuEhspEhTxwMAN4Ag1APkAPYjiAJ0AZFDOihsPAgDI +oWRQY+tkAAlQBIAA/ABiHaAdhQBY/WPuEg4teASAAOYSCiKvmYAAHNUGLRIT+alqBeAKBQCa8prz +mvSa9elpAg9EAoAA6fYALuiCgADo3QIK9sKAAP+mAA6wG8UA/eAmFeAKVQBZpuErEhX5YDgpUgCd +AMAg7BIYKm8CgACj3SzWndEPAAAAAAAAj8j34DjgkgCdAOkSGCo3AoAAo2YoYp75ADk74gCdACti +nQ5NCi3Svw27Aea0AAW42YAAsP6eyPrAaB3v+xYALxIR0w9k8HfrEgUpUASAAPwAYh2gHYUAWP0w +GdTYFtTVjhooEAAmYp8J7gIZ1KkIHxTmhgsP+wKAAOn/AgR8oIAALBIQ7RISI1v/AAAosj8rsX2e +oJ+hnaKco5uk+UCmFaAAcgAALBIQLRISK2EFiGOeoJ+hm6KYo52knKUmrBgtEhOMHgLdEO0WBy5k +AoAA7BYIK6b+AAAa1Gj4IUgVoA8FAP4gxhXgDyUAnx0KiAIoFgnrZAAJUASAAPwAYh2gHYUAWP0F +jRkvEhqJFisSGo/18TXQDeP+9QAc1KmLtP9ARhWgj5kA/UAGFeBviQD9QCYVoN+hAPDQABMwz5EA +7tShHulCgADupgMsQQKAAP0GAAx5uwEA66YELmDCgAAMZgIIZgImpgUsEg3pnAElMGEAAOkWBiZj +/QAA7BYNLnumAADrZAAJUASAAPwAYh2gHYUAWPzhFtSMiRePGPohKBXgDQUAnRGdEp0TnRSdpP1A +phXv/vUAnqKeo5ugLhIa6f8CCsbCgADo/wIA4DEAAOb/AgDYIQAA7RwQJTBhAADvpgEg0BEAAFj7 +sPlAaB3gDBUA6sk5DSgEgADpFh4lIAmAACQWH/4AIh2gDQUACe045RYgJurhgAAT1GyIGIwXGtRr +KxIbhBoV1DrxeAAUsA4VAOvrOQongoAA9IYACnYPBQALrzn9JgAMsA01APkmAAwwDCUAC9w5LBYd +CfkCKRYZ+eYAD7AFBQD+I4YV4AMKAAAPVlD+GAAF8M/JAPwhKBXgj7EA/UAGFeDveQDs7hEMRAKA +AOvMEA3agoAA7LsCCzPCgAD4xgALMM+BAP2IABYxj2kA7O4CDEUCgAAI7gIc1BScoSgQAAbuAvvG +AA9wb7kA9MgAEzu/AQD3xgAPMAYlAObuAg3dAoAA7qYELEICgAALiAKYpRvUNpuiGNQ2+UBmFa/5 +jgCZoZSgnqKeo56knqWdpp2nnaidqS8SHeVcASUwoQAA/qARnGIAnQDrZAAJUASAAPwAgh2gLYUA +WPx25FBRas7CgAD0oApgkgCdACsSHMfv+yYADPANBQDjmQIL/S4AAI0TLBIajhKPEYvMLMIQmaGb +qfVABhWgCAUAmKKYpp+jnqSdp5yljBT9QQYVr/4mAC0SGywSGRvUDwyZAuuZAgaEGYAA8OJADe/+ +9QCZoZSgnqKeo56k/0CmFaANBQCdpp2nnaj9QSYV7/02AC8SGiIWISvyFibxOCLxOizyFejxOSs0 +AoAABiICJvE7LfIb7vIaLEQCgAAIZgIo8hcv8hmfop6jnaScppunmKiWpZmhlKCSqfIkKBWv+/YA +AAAAAAAAAPDiQA3v+/UAmaGUoJuim6ObpPtAphXgCAUAmKaYp5io+UEmFa/7OgAsEhqNEi/BOybB +OSjBOC7BOuvCGCs0AoAA5v8CDEQCgAAI7gImwhSIzCzCEJukmKeWqJmhnaKUoJyjn6WeqYwU/UDG +Fa/6GgArEhvsEhklg1GAABvTzcfv/SYADLANBQDrmQIDgPGAAJmhlKCeop6jnqSepZ2mnaedqP1B +JhXv+TIALhIaIhYhLeISLOITK+IYiO2G7i/iFILvLuIRnqKdo5ykm6WYppann6mZoZSgkqjyJCgV +r/hWACsSHMff+yYADPAMBQDjmQIDgPGAAJmhlKCdop2jnaSdpZymnKecqP1BJhWv95oAmaGUoI4T +/iAoFeAIBQCYopijmKSYppinmKifpf9BJhWv9woAKhIaGdOfiqUT0zQlEiDkEh8lTDCAAOPTMBOD +uYAAHNOZixoMuwL7P0YV7+eiAIUfwNL3rQAK/+gmAMCl/acmBaAbxQDuPhEJ6ASAAFmlbWP4ZwAA ++iKIFaAOBQCeEZ4SnhOeFFj6tCQWH+UWICViYYAA+iKIFaALBQBY+qckFh/0JAYV7/DaAC8SEGX4 +lmP4OhrTUogaCogC+T9GFa/l1gDAoFleksinG9N5K7CAZLBaKhIUWPqg6RIeLV9OAAD6IogVoAsV +AFj6lPgjyBXv71oAAAD/4CQNoDYFAOsSEinQBIAA7BIQKOgEgABY+2Nj+FYAACsSGowc7RIXKVAE +gABYZvbSoNEPAAAAAPumwgWhSxUAWY5LLBoADKwC+6a4BaFLFQBZjktj/4UAAMCwwNoN/TTtxggt +xU4AAPpAaB2gG8UA/AACHaANFQBYa7Fj/6EAAAAAKxIW+kBoHaAMBQDtEhgl2GEAAFhrqmP/hMCg +WaCtHNLWj8j5/8HIkgCdAGP/t9ogW+v5Y/hsiieNHMDA6qwgLtgEgABYYIjSoOsSGCpnAoAAo8wr +xp3RDwAAAAAAAP/foA2gBgUA/+FIDaAFRQDAoFmgmBzSwI/IHtLB+f/GuJIAnQD/4/ANoAYFAAAA +AP/jlA2gCwUAwNoN/TT9gQYV7+OSAAAAAGwQBBTTJYIgJEJ/E9MkBCIMAyIC0Q8AAGwQDBjTIhrS +sRnTHyiAfSqiqSmShgmqEeqZCAR8RIAAJJ0B9JAAFaAAMgAAACSdAyRMgBnS3yhBKfkACAxiAJ0A +GtLL6gAFCMgEgAAJAmEJAmEJAmEJAmEZ0w8Y0ugf0wyOIJ8S+CDGFaAKRQDpFgAvdgKAAArqApoR +KUAHL0Ep/aYMBaGZAQDj7gIMzAKAAAn/Agj/Ap8UKyA5/iFmFaANJQCdGQy7AusWCCgECoAA9GAE +sZIAnQCJRyqZFOSgf2TggQAAjZmLwP/4Ah2gJYUA7s4BBoIZgABtCC59sTgv0AAp0Ad18S8vwQXu ++AgMzwKAAOndCARBAQAA6NsRftAEgADtpAAFAImAAGP/ygAA/68ADX//vgD9bwANcAkFAAqdOObU +AA6BpgAA6kQACNgEgAD8AIIdoA0lAFhcutEP//4MDaANBQAAACocOvpHQBXgDGUAWZ1AY/9cwnaO +aPoAoh2gO0UA7NLNG2gEgAD+RzAV4+4BAFmknopoCo9Xd/FtikcuoRX7RAAVr8sFAAurAavr62pw +c2kBAADvogAmgYGAAH3xKCzQANMPDwIAdcEdKdAHDJkR6d0IBcEBAADo2yR+0ASAAO2kAA1+xgAA +/e8ADfAKBQALrTjm1AAG+mGAAGP/dgAA/68ADT//cgAsIDkKDUN9yYiOIAjuEQ4+Ap5r0Q8AAAD/ +rwAOv/5CAGwQBiggBSwgB8GUDwIA+QAQdWHMAQApIgJlkcMtMAEb0iTm0iQeOASAAP+hQAbQD6UA +LiBOZeJX7tIcHk8CgAD1gArSEgCdAKaZKJKenBALywr3ABGU0gCdACuyvyqSnQurAesWASWOSYAA +iuj3QA64kgCdAChiru3SEBQL+YAALGKtLdJ/7csBBUP9AAD9gAteYgCdAJjo/YALZmIAnQApIBSk +mQkJRykkFPUgDXXSAJ0AHtIRG9IKjCD4ICgV4AoFACq2Mu7MAg5uAoAA/WcGFaAORQAO3QIttjEb +0m3ckOsPHg3QBIAADAJnC0CGDAJlCyCGDAJjCwCG7AwABNkBAAAK4IYLAm8KwIYLAm0KoIYLAmsK +gIYLAmkuMQEoIQktIAcsMAEb0lsqIST8IAAGMN0RAOrdEA5kAoAADcwCDKoCHdJVLCEiC6oCKpYg +DcwCiyAd0fMoliMuliQsliL9YAAVsAwlAAy7AiuWIYoz6pYlJMgHAADtABUEymEAAAkAigx4EaaI +/xOmFeflAQD5wAa5UgCdAMAg0Q8AAIro90AH4JIAnQAMeRGmmS2Sngt7Ciuyv/egCGTSAJ0ALZKd +C9sBZLEAsK2d6OsWAS305gAA/CAGFaABZgAAAAAAAOokAAnYBIAA7EQACugEgABYZbHSoNEPAAAA +AMCwD6k06eYILfTmAAD6QGgdoBvFAPwAIh2gDRUAWGp1Y//BAADqJAAK2ASAAFhnStKg0Q8AixD6 +QGgdoAwVAPtjABXgDaUAWGprY/+XwKBZn24e0ZaK6Plf8PiQD6UAY/+q2iBb6rr/+TQNoA+lAACK +J+tEAApoBIAA+0QAFaAMBQBYX0bSoNEPAAAAAP/3XA2gCwUAwLgLmwL6QEYV7/0eAAAAAPwgBhWg +CgUAWZ9WHtF/iuiMEBvRf/lf93iQD6UA//woDaALBQAAwLAPrTT9wQYV7/vyAABsEAYoIAUmIAfn +NAAK2ASAAPgCgh3gBTUA+QAPnWFmAQALCEdoghSKIhjRbBfRbeRkAAUDyYAAwCDRDwArIh1lseGI +J4OI+wKkFe/MBQDpggskcIEAAAzsAey7CAp/AoAA7BYAJdkBAADzIA38YgCdAC2JFKP6r90thRT7 +YA3rogCdAMl1yUPZMG1JBQcAhgkCYYrgDwIADwIAr6r7QBCsYgCdAPvABhWv/f4A7GoRAyTxAAAH +qggrop4PAgD3YArZ0gCdACqinQhrCiuyvwuqAWWgT+tsGClQBIAA/AAiHaANNQBYag3AINEPABvR +Oom49yAMoJIAnQAMShEHqggsop73gA0B0gCdACqinQhMCizCvwyqAeShjmTr/QAALbYIZK+vGdFW +maCIIP+jTgXgCxUA66YCLEYCgAAFiAKYoYgzL/J//6KCBaiIHQCo/5+j7gAVBUhBAAD/omgF4AgF +ALGI6YMeDA/oAACfphnRl/lBBhXgGAUAmKeOIAjuEQXuAp6pDE0Rp90l1p2OIiwgBoknC+4C69GO +FmAFAADsJAYkyIEAAIiR/SCCFe/MBQAMnAHuJgIkQ0EAAOiWASbowQAA7ZUEJmEBAAB8iyIqkQUd +0RioqJiRnYCMIOuGAi5mAoAABcwC/QAmFaACBQDRDx3REJ2AjCAb0XbrhgIuZgKAAAXMAv0AJhWg +AgUA0Q/aIFhmm9Kg0Q8AAAD/+sQNoAoFAFgAJ2P+FwAA8yBoHeAOBQD/AWYVr/e+AOO6DAOBuYAA +CksU7LwIK8AEgADsTDYJyASAANMPbckFCACGCQJhiRCqeOtNDATJAQAAbdkFCCCGCQJjixAK/Ays +uyu8QPvABhXv9ooAwKBZnqkb0NGJuBjQ0vk/8viSAJ0A//n8DaAKBQDAoMDaDZ00/WEGFe/5wgCP +EC/8QP/ABhXv9aYAAABsEAYS0MYX0UL1oZ4FoBOVAPhQyBWgpiUAKiKCf6cgKyKCf7cYKiKELKAI +JaAHdsE3iETAoAuAAAUzDGU/2tEPLSKEKSKHKiKH+WAABPuqgQB6mTAK6jArQkHDwgy7KKuq+puG +Fa/+6gAuoQsu7PgODkPu7Pwi6/0AAP+iAAq//s4AAAAADAIALyKCf//FJdAHblu/3HD6AKIdoAsF +AP6gABcw/wUAWaLoJVzxylsoCnGYEcChWZbJ+iAoFeAJ9QAJWTaZEAm7DPogJhXgCgUAWX10ihAK +VQxlX9fAoVmWv/oOIh3gCgUAWX1uY/9lAABsEAYoIAUvIAfBlPkAFM1h/wEA9CAmFaeFAQCYEvUA +D7kSAJ0AiSId0H7r0H8foASAAObQfhyRlgAA9eAPQhAHtQDvFgAv1wKAAKaqLKKeC/sKK7K/94AV +u+IAnQAsop0LywHntAAFkomAAI7Y98AS+JIAnQAsYq7q0OsWECmAAC9irSui5uv8AQdD/QAA++AP +jmIAnQCY2PvgD6ZiAJ0AKyAUKTAHq5kJCUcpJBT1IBG10gCdAB/Q3J9wiSD8AIId4AUVAOV2AizO +AoAADZkCmXGINhnQ1iyiGv+g3gWiiB0ACYgBqMz84GYVoCsFAO4AFQPIQQAACQCKm3cZ0F/pdgYh +4MEAAOwHHgPAgQAACAJj7uMFA+DBAAAMAmEvdhCIIOV2EixGAoAADYgCKHYRjDMqohgMjBSsqup2 +EyP5gQAA7gAVA9FBAAAKAIopdhbrdhch0EEAAApghg8CZwpAhg8CZS0wAY8zGNB98aAFB9AchQAt +IAcV0K76RIQVoN0RAOMxAS7qgoAACN0CLXYgiyApdiIsdiP9YAAVsAw1AAy7Aut2ISPIBwAA7uMF +BMpBAAAJAmEJAmEuIAcoIQny5SYV4BmlAP7lBhXgCwUA63YlLEUCgAD5BgAMce4BAOh2Ji90AoAA +Dq4CBe4C/uSGFaAJtQDsEgIqbwKAAKbdKdad+YAHqVIAnQDAINEPAAD//4QNoAmFAC4iHWTuBv4g +BhXgA+4Ajtj3wAfgkgCdAAxKEaaqKKKe9wAIo+IAnQAsop0LSAoogr8IzAHrxAAGCEGAALDpmdjn +tAAN8H4AAP4gBhXgAVIA6iQACdgEgADsEgEq6ASAAFhj7dKg0Q8AAMDAwLoL6zTr1ggucKYAAPpA +aB2gG8UA/AAiHaANFQBYaLFj/8EAAOokAArYBIAAWGWG0qDRDwCLEPpAaB2gDBUA+2MAFeANtQBY +aKdj/5fAoFmdqh3P0o7Y+d/suJIAnQBj/6oAAADrxAAJUASAAFvo8/ugmAWv9v4AiieNEcDA6qwg +LtgEgABYXYHSoNEP//U8DaALBQAAAAAAAFv+/P4gCBXv9AYA/iAGFeAKBQBZnZIdz7uO2I8QG8+7 ++d/3eJIAnQD//DwNoAsFAAAAAP/74A2gDAUAwMoM7DT9oQYVr/veAAAAAGwQCuQiBypQBIAAiCL+ +QPAVr88FAOVBFS1nAoAA7DwIAiCBAAAPRAGkVORMQC5YBIAA9YAl0qHuAQAtsAfs3P4tsASAAOSA +CGboDQAAwCDRDx/Pme0WACXAgQAAmBMdz5j1ACSaogCdAOXPlh8gBIAA9cAfYhIAnQAM6xGluymy +nu4WASZAIQAA+SAlm6IAnQArsp0N6Aoogr8IuwHntAAFoBmAAI34mhTTD/egIsiSAJ0AKVKu69AB +FKBBgAAuUq0vsuYbz30P6AHoFgImy/0AAP/AH4ZiAJ0Ambj/wB/GYgCdAC4gFC1gB67d+iCGFafd +AQAtJBT1oCFt0gCdABnPvh/P8Y0giDTuz4EaXwKAAOW7CA7uAoAA8QAE+lAFNQCDYyohJAXcAigg +By1hAf7gRhWgFIUAlHP84CYVoIgRAOzPixxCgoAA+QYADHAEBQD44AYVoAglAOwABQPgQQAAbYoC +DAJhLiEJLCAHlHX84SYV4DilAON2CC9tAoAA+aYADrHMAQDtdgYuZAKAAAyqAg+qApp0KSEJAioC +/sAkFaAMBQDltp0s3QKAAPlmAA2wDQUAWGTawCDRD4gTiID1gCAVoIkVAPWmAAo3iMEAeYkZlHHv +z7oWS/0AAP7gBhXhmR0A+OBGFeAAUgCUcYgTGc+2mXCIgQhYFJhyjzYZz68oIgcUz68pkhr1AqQV +4v8dAAT/ASUWBg+ZCO+CCSRAgQAA+OBmFe/JBQDpiAEFIAkAAOgWBSonAoAABP8ICFUI7KkIAqkB +AADl8wp0yAkAACgSBgj/DOoWBCzPAoAABJkM5JBFbicCgADvSAgDyEEAAJkX+KAOyqIAnQAPVQwF +TRTTD23ZBQ8AhgkCYYkVDc8Mp1jsjBAkyQEAAG35BQkghgwCYy0iAAjdERjPhfTgAESwDxUA/yDG +FeAMRQAM3AKYlBjPfpyVjGMoghgVz4H/ni4F6MwdAKyImJcYz3zvABUE6IEAAP+e+AXgDAUAsczt +gx4OD+gAAP8hRhWgLAUAnJuHY4Q0jDUIRAHvzAELwkKAAAhEAgVEApScKGAJLWALJGAKJWAI789s +HukCgADmRBAMQwKAAP0GAAwwxTEA7UQCDmHCgAAMRAIIRAKMNhjPDJSd9GFIFaXVHQDvzAEO6EKA +AA3MAv0hxhWkVQEA6EQBCqoCgAAFRAKIZZifhWYllhCPZySWEi+WEY1kLZYTLGAB8YAEp9IAnQAs +IAcdzxbywCQV4MwRAO8hJC5igoAADcwCLJYUiCD8AwId4Aw1AO2WFyxGAoAADIgCHM7o/yLGFaAN +BQD5IqYVoAglAOwABQThgQAAbYoCDAJhKCEJmhQuIAf7AAAUMBylAAyIAiiWGvmeYAWh7gEA7ZYZ +L3QCgAAO/gII7gKIECOWHSeWHO6WGCRADQAAmBCOFI8QL7adLWAHiif/oABGsAwFAOvUAAVQgQAA +WFxX0qDRDwAAZM5WbckFD0CGCQJlY/5EjfiaFPegBviSAJ0ADEsRpbsosp64yfkAB6viAJ0AGM6Q +KbKdCEgKKIK/CJkB65QABIcxgACw2Zn417DuFgEt4C4AAI0QixH6QGgdoAwVAO3cAyXYYQAAWGdR +wCDRDwAAAMDgnhKIEhvOfMCaCdk06bYILGCGAAD6QGgdoBvFAPwAIh2gDRUAWGdFwCDRDwD1jwAN +/+0aAAWLDPogZhXv7aoAAAAAAAD8IQYVoAoFAFmcQB/OaY34ihSMGPm/3JiSAJ0AY/+wAJwY6xIC +KVAEgABb54mKFPwhCBWv7xIAAP/tZA2gCwUAnhH8IQYVoAoFAFmcMB/OWIoUjfiMGI4R+b/4SJIA +nQD//LgNoAsFAP/8aA2gCQUAwIoI2DT54QYVr/xmAAAAAGwQBikgBSYgB9gw9gBiHeAaRQD7IA/N +IWYBAAUJR/0jAAFfxQUAiyIZzkQTzkTkZAAFg7GAAMAg0Q+IJ4uILoEV6YILJHiBAAAF+gHq7ggK +bwKAAOoWACdxAQAA+yAORGIAnQAsiRSdEavarcwshRT7wA4jogCdAMk0yULZsG1JBQMAhgkCYSwS +ASryAAyqCP9AESQiAJ0AmvDTsPhgaB2v/hoAAAAAAOxqEQMk/QAAA6oILaKeCWsKK7K/96ALAdIA +nQAqop0PAgALqgFloE/rbBgpUASAAPwAIh2gDTUAWGblwCDRDwAAAAAdzhGL2JgS92AMkJIAnQAM +ShGjqiyinveADRHSAJ0AKqKdCUwKLMK/DKoBZKGQsL6e2GSvrx7OLp6gjSD9nP4FoAsVAOumAi7u +AoAAB90CnaGJgyjCf/+cMgXomR0AqYiYo+8AFQVIQQAA/5wYBeAIBQCxiOmDHgwP6AAAn6YZzm/5 +QQYV4BgFAJinjiAI7hEH7gKeqekiBypvAoAAo90n1p0sIAbtIgIkyIEAAOWfAQZgBQAALCQGiJEs +mQQL3QLtJgIkQ0EAAOiWASZgwQAA7JUEJ/kBAAD/BTIN4AwFACqRBR3N8KiomJGdgIsg7IYCLd4C +gAAHuwL7ACYV4AIFANEPAAAdzeidgIsgwMDshgIt3gKAAAe7AvsAJhXgAgUA0Q8AAOokAArYBIAA +WGNw0qDRDwD/+qQNoAoFAPMgaB3gDgUA/wFmFa/5ogDr6gwBgbmAAApNFOzcCCnABIAA7Ew2DcgE +gADTD23JBQgAhgkCYYkQqjjtTgwEyQEAAG3pBQgghgkCY40RjBAK3QytzCzMQP3gBhWv+F4AAMCg +WZuAHc2oi9iIEhnNqfl/8viSAJ0A//noDaAKBQAAwKDA6g6+NP+hBhWv+aoAAIgQKIxA+eAGFa/3 +ZgAAAABsEAQVza0WzabwiAATsAlFAOTODxnGAoAACYgCKGYxBTUC52YyKhgEgADlZjgpMASAAANg +hgYCZwNAhgYCZQMghgYCYwMAhuYMAAEZAQAAIi0B5B8eARIBAAADAm8EwIYDAm0EoIYDAmsEgIYD +AmnRDwAAAGwQBiMgBxTNfgMDQerNfBnPAoAApJkokp76YAEGMAU1AOzCvywZHAAAK5KdDLsBy7kf *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jan 3 22:31:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94574C9E056; Tue, 3 Jan 2017 22:31:07 +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 54027167B; Tue, 3 Jan 2017 22:31:07 +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 v03MV6df030731; Tue, 3 Jan 2017 22:31:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03MV6fY030726; Tue, 3 Jan 2017 22:31:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701032231.v03MV6fY030726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 3 Jan 2017 22:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311174 - in head: . usr.sbin/bsnmpd/tools usr.sbin/bsnmpd/tools/bsnmptools usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 22:31:07 -0000 Author: ngie Date: Tue Jan 3 22:31:05 2017 New Revision: 311174 URL: https://svnweb.freebsd.org/changeset/base/311174 Log: Make /usr/lib/libbsnmptools.so.0 into an INTERRNALLIB Although it increases the size of the bsnmp{get,set,walk} binaries by four on my [amd64] system, it removes the need for producing .debug files, profiled libraries, and for installing the library itself, reducing the overall size use on disk by the utilities noted previously. Plus, it guards against ABI/API compatibility issues with the library as it's only used internal to the tools themselves. MFC after: 3 weeks Modified: head/ObsoleteFiles.inc head/usr.sbin/bsnmpd/tools/Makefile head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jan 3 22:05:07 2017 (r311173) +++ head/ObsoleteFiles.inc Tue Jan 3 22:31:05 2017 (r311174) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20170103: libbsnmptools.so made into an INTERNALLIB +OLD_FILES+=usr/lib/libbsnmptools.a +OLD_FILES+=usr/lib/libbsnmptools_p.a +OLD_LIBS+=usr/lib/libbsnmptools.so.0 +OLD_LIBS+=usr/lib/libbsnmptools.so # 20170102: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode() OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz # 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu Modified: head/usr.sbin/bsnmpd/tools/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/tools/Makefile Tue Jan 3 22:05:07 2017 (r311173) +++ head/usr.sbin/bsnmpd/tools/Makefile Tue Jan 3 22:31:05 2017 (r311174) @@ -4,4 +4,8 @@ SUBDIR= libbsnmptools \ bsnmptools +SUBDIR_DEPEND_bsnmptools= libbsnmptools + +SUBDIR_PARALLEL= + .include Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Tue Jan 3 22:05:07 2017 (r311173) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Tue Jan 3 22:31:05 2017 (r311174) @@ -8,7 +8,9 @@ PROG= bsnmpget LIBADD= bsnmp bsnmptools -CFLAGS+= -I${.CURDIR}/../libbsnmptools + +CFLAGS+= -I${.CURDIR:H}/libbsnmptools +LDFLAGS+= -L${.OBJDIR:H}/libbsnmptools LINKS= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpwalk LINKS+= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpset Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Tue Jan 3 22:05:07 2017 (r311173) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Tue Jan 3 22:31:05 2017 (r311174) @@ -5,9 +5,9 @@ .PATH: ${.CURDIR} LIB= bsnmptools -#INTERNALLIB= + SRCS= bsnmpimport.c bsnmpmap.c bsnmptools.c bsnmptc.c -SHLIB_MAJOR= 0 +INTERNALLIB= .include From owner-svn-src-head@freebsd.org Tue Jan 3 22:33:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF133C9E1D0; Tue, 3 Jan 2017 22:33:08 +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 8E9B21846; Tue, 3 Jan 2017 22:33:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03MX7Nu034440; Tue, 3 Jan 2017 22:33:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03MX7LJ034439; Tue, 3 Jan 2017 22:33:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701032233.v03MX7LJ034439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 3 Jan 2017 22:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311175 - head/usr.sbin/bsnmpd/tools/bsnmptools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 22:33:08 -0000 Author: ngie Date: Tue Jan 3 22:33:07 2017 New Revision: 311175 URL: https://svnweb.freebsd.org/changeset/base/311175 Log: Swap parameters around with parse_syntax_strval(..) for consistency with other parse_* APIs in bsnmp* MFC after: 3 days Noted by: bz Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Tue Jan 3 22:31:05 2017 (r311174) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Tue Jan 3 22:33:07 2017 (r311175) @@ -849,10 +849,9 @@ parse_pair_numoid_val(char *str, struct return (1); } -/* XXX-BZ aruments should be swapped. */ static int32_t -parse_syntax_strval(struct snmp_toolinfo *snmptoolctx, char *str, - struct snmp_object *object) +parse_syntax_strval(struct snmp_toolinfo *snmptoolctx, + struct snmp_object *object, char *str) { uint32_t len; enum snmp_syntax syn; @@ -924,7 +923,7 @@ parse_pair_stroid_val(struct snmp_toolin return (-1); } - if (parse_syntax_strval(snmptoolctx, ptr + 1, obj) < 0) + if (parse_syntax_strval(snmptoolctx, obj, ptr + 1) < 0) return (-1); return (1); From owner-svn-src-head@freebsd.org Tue Jan 3 23:08:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A250C9D00D; Tue, 3 Jan 2017 23:08:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29FE6182E; Tue, 3 Jan 2017 23:08:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03N8BvA047671; Tue, 3 Jan 2017 23:08:11 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03N8B4Q047670; Tue, 3 Jan 2017 23:08:11 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701032308.v03N8B4Q047670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 3 Jan 2017 23:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311194 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 23:08:12 -0000 Author: mjg Date: Tue Jan 3 23:08:11 2017 New Revision: 311194 URL: https://svnweb.freebsd.org/changeset/base/311194 Log: Reduce lock accesses in thread lock similarly to r311172. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Jan 3 23:07:40 2017 (r311193) +++ head/sys/kern/kern_mutex.c Tue Jan 3 23:08:11 2017 (r311194) @@ -754,7 +754,7 @@ void thread_lock_flags_(struct thread *td, int opts, const char *file, int line) { struct mtx *m; - uintptr_t tid; + uintptr_t tid, v; struct lock_delay_arg lda; #ifdef LOCK_PROFILING int contested = 0; @@ -796,10 +796,15 @@ retry: m->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); + v = MTX_READ_VALUE(m); for (;;) { - if (m->mtx_lock == MTX_UNOWNED && _mtx_obtain_lock(m, tid)) - break; - if (m->mtx_lock == tid) { + if (v == MTX_UNOWNED) { + if (_mtx_obtain_lock(m, tid)) + break; + v = MTX_READ_VALUE(m); + continue; + } + if (v == tid) { m->mtx_recurse++; break; } @@ -810,7 +815,7 @@ retry: &contested, &waittime); /* Give interrupts a chance while we spin. */ spinlock_exit(); - while (m->mtx_lock != MTX_UNOWNED) { + do { if (lda.spin_cnt < 10000000) { lock_delay(&lda); } else { @@ -824,7 +829,8 @@ retry: } if (m != td->td_lock) goto retry; - } + v = MTX_READ_VALUE(m); + } while (v != MTX_UNOWNED); spinlock_enter(); } if (m == td->td_lock) From owner-svn-src-head@freebsd.org Wed Jan 4 00:18:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD66AC9ECF7; Wed, 4 Jan 2017 00:18:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D42E18C9; Wed, 4 Jan 2017 00:18:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v040IpoV075964; Wed, 4 Jan 2017 00:18:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v040IpGq075963; Wed, 4 Jan 2017 00:18:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701040018.v040IpGq075963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 4 Jan 2017 00:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311204 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 00:18:52 -0000 Author: markj Date: Wed Jan 4 00:18:51 2017 New Revision: 311204 URL: https://svnweb.freebsd.org/changeset/base/311204 Log: Add some missing atomic_*_ptr #defines for arm. MFC after: 1 week Modified: head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Wed Jan 4 00:18:38 2017 (r311203) +++ head/sys/arm/include/atomic.h Wed Jan 4 00:18:51 2017 (r311204) @@ -81,12 +81,19 @@ atomic_store_long(volatile u_long *dst, } #define atomic_clear_ptr atomic_clear_32 +#define atomic_clear_acq_ptr atomic_clear_acq_32 +#define atomic_clear_rel_ptr atomic_clear_rel_32 #define atomic_set_ptr atomic_set_32 +#define atomic_set_acq_ptr atomic_set_acq_32 +#define atomic_set_rel_ptr atomic_set_rel_32 #define atomic_cmpset_ptr atomic_cmpset_32 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_32 +#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 +#define atomic_load_acq_ptr atomic_load_acq_32 #define atomic_store_ptr atomic_store_32 #define atomic_store_rel_ptr atomic_store_rel_32 +#define atomic_swap_ptr atomic_swap_32 +#define atomic_readandclear_ptr atomic_readandclear_32 #define atomic_add_int atomic_add_32 #define atomic_add_acq_int atomic_add_acq_32 From owner-svn-src-head@freebsd.org Wed Jan 4 00:26:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 492BAC9C0AC; Wed, 4 Jan 2017 00:26:42 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18E901029; Wed, 4 Jan 2017 00:26:42 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v040QfqB080034; Wed, 4 Jan 2017 00:26:41 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v040Qfrk080033; Wed, 4 Jan 2017 00:26:41 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701040026.v040Qfrk080033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 4 Jan 2017 00:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311206 - head/sys/dev/rtwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 00:26:42 -0000 Author: avos Date: Wed Jan 4 00:26:41 2017 New Revision: 311206 URL: https://svnweb.freebsd.org/changeset/base/311206 Log: rtwn: fix possible buffer overrun. r297596 was not merged properly into new code; restore lost part. Modified: head/sys/dev/rtwn/if_rtwnvar.h Modified: head/sys/dev/rtwn/if_rtwnvar.h ============================================================================== --- head/sys/dev/rtwn/if_rtwnvar.h Wed Jan 4 00:25:22 2017 (r311205) +++ head/sys/dev/rtwn/if_rtwnvar.h Wed Jan 4 00:26:41 2017 (r311206) @@ -26,7 +26,7 @@ #define RTWN_TX_DESC_SIZE 64 #define RTWN_RXBUFSZ (8 * 1024) -#define RTWN_TXBUFSZ (RTWN_TX_DESC_SIZE + IEEE80211_MAX_LEN) +#define RTWN_TXBUFSZ (16 * 1024) #define RTWN_BCN_MAX_SIZE 512 #define RTWN_CAM_ENTRY_LIMIT 64 From owner-svn-src-head@freebsd.org Wed Jan 4 00:39:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3DF3C9C5E2; Wed, 4 Jan 2017 00:39:07 +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 9127E1906; Wed, 4 Jan 2017 00:39:07 +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 v040d6Uv084204; Wed, 4 Jan 2017 00:39:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v040d6Ut084203; Wed, 4 Jan 2017 00:39:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701040039.v040d6Ut084203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 4 Jan 2017 00:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311210 - head/usr.sbin/diskinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 00:39:07 -0000 Author: asomers Date: Wed Jan 4 00:39:06 2017 New Revision: 311210 URL: https://svnweb.freebsd.org/changeset/base/311210 Log: Quell Coverity for diskinfo(8) * CID 1198994: Don't run the speed disk on a disk with no sectors * CID 1011442: Don't call close(2) if open(2) fails * CID 1011161: Use snprintf instead of sprintf * CID 1009825: Check the return value of lseek Reported by: Coverity CID: 1198994 1011442 1011161 1009825 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Wed Jan 4 00:39:00 2017 (r311209) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Jan 4 00:39:06 2017 (r311210) @@ -104,13 +104,12 @@ main(int argc, char **argv) for (i = 0; i < argc; i++) { fd = open(argv[i], O_RDONLY | O_DIRECT); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { - sprintf(buf, "%s%s", _PATH_DEV, argv[i]); + snprintf(buf, BUFSIZ, "%s%s", _PATH_DEV, argv[i]); fd = open(buf, O_RDONLY); } if (fd < 0) { warn("%s", argv[i]); - exitval = 1; - goto out; + exit(1); } error = fstat(fd, &sb); if (error != 0) { @@ -213,7 +212,8 @@ rdsect(int fd, off_t blockno, u_int sect { int error; - lseek(fd, (off_t)blockno * sectorsize, SEEK_SET); + if (lseek(fd, (off_t)blockno * sectorsize, SEEK_SET) == -1) + err(1, "lseek"); error = read(fd, sector, sectorsize); if (error == -1) err(1, "read"); @@ -296,6 +296,9 @@ speeddisk(int fd, off_t mediasize, u_int off_t b0, b1, sectorcount, step; sectorcount = mediasize / sectorsize; + if (sectorcount <= 0) + return; /* Can't test devices with no sectors */ + step = 1ULL << (flsll(sectorcount / (4 * 200)) - 1); if (step > 16384) step = 16384; From owner-svn-src-head@freebsd.org Wed Jan 4 01:38:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66450C9C118; Wed, 4 Jan 2017 01:38:08 +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 302211450; Wed, 4 Jan 2017 01:38:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v041c7tf009738; Wed, 4 Jan 2017 01:38:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v041c75C009737; Wed, 4 Jan 2017 01:38:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040138.v041c75C009737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 01:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311221 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 01:38:08 -0000 Author: ngie Date: Wed Jan 4 01:38:07 2017 New Revision: 311221 URL: https://svnweb.freebsd.org/changeset/base/311221 Log: Initialize msg.msg_flags to 0 This mutes a valid coverity warning about it being uninitialized when passed in to sendmsg(2). MFC after: 2 weeks Reported by: Coverity CID: 1368202 Modified: head/contrib/bsnmp/snmpd/trans_udp.c Modified: head/contrib/bsnmp/snmpd/trans_udp.c ============================================================================== --- head/contrib/bsnmp/snmpd/trans_udp.c Wed Jan 4 01:23:15 2017 (r311220) +++ head/contrib/bsnmp/snmpd/trans_udp.c Wed Jan 4 01:38:07 2017 (r311221) @@ -226,6 +226,7 @@ udp_send(struct tport *tp, const u_char iov.iov_base = __DECONST(void*, buf); iov.iov_len = len; + msg.msg_flags = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_name = __DECONST(void *, addr); From owner-svn-src-head@freebsd.org Wed Jan 4 01:44:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4685C9C47F; Wed, 4 Jan 2017 01:44:46 +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 B3FD31957; Wed, 4 Jan 2017 01:44:46 +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 v041ijkp013586; Wed, 4 Jan 2017 01:44:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v041iji4013585; Wed, 4 Jan 2017 01:44:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040144.v041iji4013585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 01:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311222 - head/usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 01:44:47 -0000 Author: ngie Date: Wed Jan 4 01:44:45 2017 New Revision: 311222 URL: https://svnweb.freebsd.org/changeset/base/311222 Log: Fix logical inversion when checking result from calloc in snmp_output_err_resp(..) X-MFC with: r310987 MFC after: 3 days Reported by: Coverity CID: 1368195 Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jan 4 01:38:07 2017 (r311221) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jan 4 01:44:45 2017 (r311222) @@ -2011,7 +2011,7 @@ snmp_output_err_resp(struct snmp_toolinf return; } - if ((object = calloc(1, sizeof(struct snmp_object))) != NULL) { + if ((object = calloc(1, sizeof(struct snmp_object))) == NULL) { fprintf(stdout, "calloc: %s", strerror(errno)); return; } From owner-svn-src-head@freebsd.org Wed Jan 4 02:15:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6A38C9CEAE; Wed, 4 Jan 2017 02:15:04 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A65091BF4; Wed, 4 Jan 2017 02:15:04 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v042F37t026378; Wed, 4 Jan 2017 02:15:03 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042F3MC026377; Wed, 4 Jan 2017 02:15:03 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201701040215.v042F3MC026377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 4 Jan 2017 02:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311224 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:15:04 -0000 Author: gnn Date: Wed Jan 4 02:15:03 2017 New Revision: 311224 URL: https://svnweb.freebsd.org/changeset/base/311224 Log: Fix PMC architecture check to handle later IPAs including Skylake Tested with tools/test/hwpmc/pmctest.py Obtained from: Oliver Pinter MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9036 Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Wed Jan 4 01:58:38 2017 (r311223) +++ head/sys/dev/hwpmc/hwpmc_core.c Wed Jan 4 02:15:03 2017 (r311224) @@ -2857,7 +2857,7 @@ pmc_core_initialize(struct pmc_mdep *md, PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", core_cputype, maxcpu, ipa_version); - if (ipa_version < 1 || ipa_version > 3 || + if (ipa_version < 1 || ipa_version > 4 || (core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) { /* Unknown PMC architecture. */ printf("hwpc_core: unknown PMC architecture: %d\n", From owner-svn-src-head@freebsd.org Wed Jan 4 02:19:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E21CFC9D027; Wed, 4 Jan 2017 02:19:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2E811E8B; Wed, 4 Jan 2017 02:19:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v042JDbI026547; Wed, 4 Jan 2017 02:19:13 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042JDEk026544; Wed, 4 Jan 2017 02:19:13 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201701040219.v042JDEk026544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 4 Jan 2017 02:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311225 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:19:15 -0000 Author: gnn Date: Wed Jan 4 02:19:13 2017 New Revision: 311225 URL: https://svnweb.freebsd.org/changeset/base/311225 Log: Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and dangerous. Those wanting data from an mbuf should use DTrace itself to get the data. PR: 203409 Reviewed by: hiren MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D9035 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Wed Jan 4 02:15:03 2017 (r311224) +++ head/sys/netinet/tcp_input.c Wed Jan 4 02:19:13 2017 (r311225) @@ -1408,7 +1408,7 @@ tfo_socket_result: tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); tcp_dooptions(&to, optp, optlen, TO_SYN); #ifdef TCP_RFC7413 if (syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL)) @@ -1456,7 +1456,7 @@ tfo_socket_result: } #endif - TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th); + TCP_PROBE5(receive, NULL, tp, m, tp, th); /* * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later @@ -1468,7 +1468,7 @@ tfo_socket_result: return (IPPROTO_DONE); dropwithreset: - TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th); + TCP_PROBE5(receive, NULL, tp, m, tp, th); if (ti_locked == TI_RLOCKED) { INP_INFO_RUNLOCK(&V_tcbinfo); @@ -1492,7 +1492,7 @@ dropwithreset: dropunlock: if (m != NULL) - TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th); + TCP_PROBE5(receive, NULL, tp, m, tp, th); if (ti_locked == TI_RLOCKED) { INP_INFO_RUNLOCK(&V_tcbinfo); @@ -1826,8 +1826,7 @@ tcp_do_segment(struct mbuf *m, struct tc (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, - mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); if (tp->snd_una == tp->snd_max) tcp_timer_activate(tp, TT_REXMT, 0); else if (!tcp_timer_active(tp, TT_PERSIST)) @@ -1873,7 +1872,7 @@ tcp_do_segment(struct mbuf *m, struct tc tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); /* * Automatic sizing of receive socket buffer. Often the send @@ -2035,7 +2034,7 @@ tcp_do_segment(struct mbuf *m, struct tc } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { TCP_PROBE5(connect__refused, NULL, tp, - mtod(m, const char *), tp, th); + m, tp, th); tp = tcp_drop(tp, ECONNREFUSED); } if (thflags & TH_RST) @@ -2088,7 +2087,7 @@ tcp_do_segment(struct mbuf *m, struct tc } else { tcp_state_change(tp, TCPS_ESTABLISHED); TCP_PROBE5(connect__established, NULL, tp, - mtod(m, const char *), tp, th); + m, tp, th); cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); @@ -2468,7 +2467,7 @@ tcp_do_segment(struct mbuf *m, struct tc } else { tcp_state_change(tp, TCPS_ESTABLISHED); TCP_PROBE5(accept__established, NULL, tp, - mtod(m, const char *), tp, th); + m, tp, th); #ifdef TCP_RFC7413 if (tp->t_tfo_pending) { tcp_fastopen_decrement_counter(tp->t_tfo_pending); @@ -3202,7 +3201,7 @@ dodata: /* XXX */ tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); /* * Return any desired output. @@ -3250,7 +3249,7 @@ dropafterack: tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); if (ti_locked == TI_RLOCKED) INP_INFO_RUNLOCK(&V_tcbinfo); ti_locked = TI_UNLOCKED; @@ -3291,7 +3290,7 @@ drop: tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); if (tp != NULL) INP_WUNLOCK(tp->t_inpcb); m_freem(m); Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Wed Jan 4 02:15:03 2017 (r311224) +++ head/sys/netinet/tcp_output.c Wed Jan 4 02:19:13 2017 (r311225) @@ -1339,7 +1339,7 @@ send: ipov->ih_len = save; } #endif /* TCPDEBUG */ - TCP_PROBE3(debug__output, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__output, tp, th, m); /* * Fill in IP length and desired time to live and Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Jan 4 02:15:03 2017 (r311224) +++ head/sys/netinet/tcp_subr.c Wed Jan 4 02:19:13 2017 (r311225) @@ -1156,12 +1156,11 @@ tcp_respond(struct tcpcb *tp, void *ipge if (tp == NULL || (inp->inp_socket->so_options & SO_DEBUG)) tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); #endif - TCP_PROBE3(debug__output, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__output, tp, th, m); if (flags & TH_RST) - TCP_PROBE5(accept__refused, NULL, NULL, mtod(m, const char *), - tp, nth); + TCP_PROBE5(accept__refused, NULL, NULL, m, tp, nth); - TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth); + TCP_PROBE5(send, NULL, tp, m, tp, nth); #ifdef INET6 if (isipv6) (void) ip6_output(m, NULL, NULL, 0, NULL, NULL, inp); From owner-svn-src-head@freebsd.org Wed Jan 4 02:25:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA2C3C9D2F9; Wed, 4 Jan 2017 02:25:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89867146A; Wed, 4 Jan 2017 02:25:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v042PVxx030651; Wed, 4 Jan 2017 02:25:31 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042PVhL030650; Wed, 4 Jan 2017 02:25:31 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701040225.v042PVhL030650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 4 Jan 2017 02:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311226 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:25:32 -0000 Author: mjg Date: Wed Jan 4 02:25:31 2017 New Revision: 311226 URL: https://svnweb.freebsd.org/changeset/base/311226 Log: mtx: plug open-coded mtx_lock access missed in r311172 Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Wed Jan 4 02:19:13 2017 (r311225) +++ head/sys/kern/kern_mutex.c Wed Jan 4 02:25:31 2017 (r311226) @@ -545,7 +545,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, m->lock_object.lo_name); do { lock_delay(&lda); - v = m->mtx_lock; + v = MTX_READ_VALUE(m); owner = lv_mtx_owner(v); } while (v != MTX_UNOWNED && TD_IS_RUNNING(owner)); KTR_STATE0(KTR_SCHED, "thread", From owner-svn-src-head@freebsd.org Wed Jan 4 02:31:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0349FC9D439; Wed, 4 Jan 2017 02:31:07 +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 AD3AB16C2; Wed, 4 Jan 2017 02:31:06 +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 v042V536032984; Wed, 4 Jan 2017 02:31:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042V5WV032983; Wed, 4 Jan 2017 02:31:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040231.v042V5WV032983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 02:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311227 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:31:07 -0000 Author: ngie Date: Wed Jan 4 02:31:05 2017 New Revision: 311227 URL: https://svnweb.freebsd.org/changeset/base/311227 Log: seekdir_basic: fix various Coverity issues Address.. - .. resource leaks of file descriptors and memory - .. unchecked return values from creat(2), mkdir(2), and telldir(3) - .. potential NULL derefs after calling readdir(3) MFC after: 1 week Reported by: Coverity CID: 975255, 975256, 976989, 978989, 978990 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_dir.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Wed Jan 4 02:25:31 2017 (r311226) +++ head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Wed Jan 4 02:31:05 2017 (r311227) @@ -39,6 +39,10 @@ #include +#ifdef __FreeBSD__ +#include +#endif + ATF_TC(seekdir_basic); ATF_TC_HEAD(seekdir_basic, tc) { @@ -54,10 +58,26 @@ ATF_TC_BODY(seekdir_basic, tc) struct dirent *entry; long here; +#ifdef __FreeBSD__ +#define CREAT(x, m) do { \ + int _creat_fd; \ + ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))), \ + "creat(%s, %x) failed: %s", (x), (m), \ + strerror(errno)); \ + (void)close(_creat_fd); \ + } while(0); + + ATF_REQUIRE_MSG(mkdir("t", 0755) == 0, + "mkdir failed: %s", strerror(errno)); + CREAT("t/a", 0600); + CREAT("t/b", 0600); + CREAT("t/c", 0600); +#else mkdir("t", 0755); creat("t/a", 0600); creat("t/b", 0600); creat("t/c", 0600); +#endif dp = opendir("t"); if ( dp == NULL) @@ -70,9 +90,17 @@ ATF_TC_BODY(seekdir_basic, tc) /* get first entry */ entry = readdir(dp); here = telldir(dp); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(here != -1, + "telldir failed: %s", strerror(errno)); +#endif /* get second entry */ entry = readdir(dp); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(entry != NULL, + "readdir failed: %s", strerror(errno)); +#endif wasname = strdup(entry->d_name); if (wasname == NULL) atf_tc_fail("cannot allocate memory"); @@ -109,6 +137,9 @@ ATF_TC_BODY(seekdir_basic, tc) atf_tc_fail("3rd seekdir found wrong name"); closedir(dp); +#ifdef __FreeBSD__ + free(wasname); +#endif } /* There is no sbrk on AArch64 and RISC-V */ From owner-svn-src-head@freebsd.org Wed Jan 4 02:34:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E349FC9D673; Wed, 4 Jan 2017 02:34:31 +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 B30AD1A9F; Wed, 4 Jan 2017 02:34:31 +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 v042YU2r034757; Wed, 4 Jan 2017 02:34:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042YUeN034756; Wed, 4 Jan 2017 02:34:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040234.v042YUeN034756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 02:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311228 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:34:32 -0000 Author: ngie Date: Wed Jan 4 02:34:30 2017 New Revision: 311228 URL: https://svnweb.freebsd.org/changeset/base/311228 Log: ftok_link: don't leak fd MFC after: 3 days Reported by: Coverity CID: 978291 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Wed Jan 4 02:31:05 2017 (r311227) +++ head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Wed Jan 4 02:34:30 2017 (r311228) @@ -68,6 +68,9 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0); From owner-svn-src-head@freebsd.org Wed Jan 4 02:38:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59B89C9D7BB; Wed, 4 Jan 2017 02:38:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 226A51C9D; Wed, 4 Jan 2017 02:38:15 +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 v042cEcF034936; Wed, 4 Jan 2017 02:38:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042cEsu034935; Wed, 4 Jan 2017 02:38:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040238.v042cEsu034935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 02:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311229 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:38:15 -0000 Author: ngie Date: Wed Jan 4 02:38:14 2017 New Revision: 311229 URL: https://svnweb.freebsd.org/changeset/base/311229 Log: humanize_number_basic: don't leak buf MFC after: 3 days Reported by: Coverity CID: 1251407 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Wed Jan 4 02:34:30 2017 (r311228) +++ head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Wed Jan 4 02:38:14 2017 (r311229) @@ -247,6 +247,9 @@ ATF_TC_BODY(humanize_number_basic, tc) newline(); atf_tc_fail_nonfatal("Failed for table entry %d", i); } +#ifdef __FreeBSD__ + free(buf); +#endif } ATF_TC(humanize_number_big); From owner-svn-src-head@freebsd.org Wed Jan 4 02:46:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 676E4C9DF26; Wed, 4 Jan 2017 02:46:37 +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 37353176A; Wed, 4 Jan 2017 02:46:37 +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 v042kao8039042; Wed, 4 Jan 2017 02:46:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042kaEh039041; Wed, 4 Jan 2017 02:46:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040246.v042kaEh039041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 02:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311233 - head/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:46:37 -0000 Author: ngie Date: Wed Jan 4 02:46:36 2017 New Revision: 311233 URL: https://svnweb.freebsd.org/changeset/base/311233 Log: Fix Coverity issues - Initialize .sun_len before passing it to strlcpy and bind. - Close fd on error MFC after: 3 days Reported by: Coverity CID: 978283, 979581 Modified: head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Modified: head/contrib/netbsd-tests/fs/tmpfs/h_tools.c ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Wed Jan 4 02:43:33 2017 (r311232) +++ head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Wed Jan 4 02:46:36 2017 (r311233) @@ -243,12 +243,19 @@ sockets_main(int argc, char **argv) return EXIT_FAILURE; } +#ifdef __FreeBSD__ + addr.sun_len = sizeof(addr.sun_path); + (void)strlcpy(addr.sun_path, argv[1], addr.sun_len); +#else (void)strlcpy(addr.sun_path, argv[1], sizeof(addr.sun_path)); +#endif addr.sun_family = PF_UNIX; - error = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); if (error == -1) { warn("connect"); +#ifdef __FreeBSD__ + (void)close(fd); +#endif return EXIT_FAILURE; } From owner-svn-src-head@freebsd.org Wed Jan 4 02:52:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50453C9E295; Wed, 4 Jan 2017 02:52:40 +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 1C28A1F36; Wed, 4 Jan 2017 02:52:40 +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 v042qdsR043069; Wed, 4 Jan 2017 02:52:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v042qdDM043068; Wed, 4 Jan 2017 02:52:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040252.v042qdDM043068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 02:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311235 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 02:52:40 -0000 Author: ngie Date: Wed Jan 4 02:52:39 2017 New Revision: 311235 URL: https://svnweb.freebsd.org/changeset/base/311235 Log: ttyname_err: close fd if it was opened successfully MFC after: 3 days Reported by: Coverity CID: 978292 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Wed Jan 4 02:51:39 2017 (r311234) +++ head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Wed Jan 4 02:52:39 2017 (r311235) @@ -78,6 +78,9 @@ ATF_TC_BODY(ttyname_err, tc) ATF_REQUIRE(ttyname(fd) == NULL); ATF_REQUIRE(errno == ENOTTY); +#ifdef __FreeBSD__ + (void)close(fd); +#endif } } From owner-svn-src-head@freebsd.org Wed Jan 4 03:35:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A855C9ED83; Wed, 4 Jan 2017 03:35: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 1EE0016D8; Wed, 4 Jan 2017 03:35: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 v043ZNrb059797; Wed, 4 Jan 2017 03:35:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v043ZNHh059796; Wed, 4 Jan 2017 03:35:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040335.v043ZNHh059796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 03:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311236 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 03:35:24 -0000 Author: ngie Date: Wed Jan 4 03:35:23 2017 New Revision: 311236 URL: https://svnweb.freebsd.org/changeset/base/311236 Log: unlink_fifo: don't leak the file descriptors opened with mkfifo and open MFC fater: 3 days Reported by: Coverity CID: 978316, 978317 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Wed Jan 4 02:52:39 2017 (r311235) +++ head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Wed Jan 4 03:35:23 2017 (r311236) @@ -63,7 +63,12 @@ ATF_TC_BODY(unlink_basic, tc) ATF_REQUIRE(unlink(path) == 0); errno = 0; +#ifdef __FreeBSD__ + ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1); + (void)close(fd); +#else ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1); +#endif } } @@ -111,12 +116,24 @@ ATF_TC_HEAD(unlink_fifo, tc) ATF_TC_BODY(unlink_fifo, tc) { +#ifdef __FreeBSD__ + int fd; + ATF_REQUIRE_MSG((fd = mkfifo(path, 0666)) == 0, + "mkfifo failed: %s", strerror(errno)); + (void)close(fd); +#else ATF_REQUIRE(mkfifo(path, 0666) == 0); +#endif ATF_REQUIRE(unlink(path) == 0); errno = 0; +#ifdef __FreeBSD__ + ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1); + (void)close(fd); +#else ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1); +#endif } ATF_TC_CLEANUP(unlink_fifo, tc) From owner-svn-src-head@freebsd.org Wed Jan 4 03:35:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D15C9EDBB; Wed, 4 Jan 2017 03:35:41 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4996717DB; Wed, 4 Jan 2017 03:35:41 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v043Zeip059859; Wed, 4 Jan 2017 03:35:40 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v043ZdOx059850; Wed, 4 Jan 2017 03:35:39 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201701040335.v043ZdOx059850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Jan 2017 03:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311237 - in head/sys: arm/allwinner arm/allwinner/a33 arm/allwinner/clk conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 03:35:41 -0000 Author: manu Date: Wed Jan 4 03:35:39 2017 New Revision: 311237 URL: https://svnweb.freebsd.org/changeset/base/311237 Log: Allwinner: Add A33 support Add basic support for A33/R16 that is enough to boot a kernel. This adds the platform code, padconf data and the new clocks strings. MFC after: 2 weeks Added: head/sys/arm/allwinner/a33/ head/sys/arm/allwinner/a33/a33_padconf.c (contents, props changed) head/sys/arm/allwinner/a33/files.a33 (contents, props changed) Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/allwinner/aw_ccu.c head/sys/arm/allwinner/aw_machdep.c head/sys/arm/allwinner/aw_machdep.h head/sys/arm/allwinner/clk/aw_axiclk.c head/sys/arm/allwinner/clk/aw_gate.c head/sys/conf/options.arm Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Wed Jan 4 03:35:23 2017 (r311236) +++ head/sys/arm/allwinner/a10_gpio.c Wed Jan 4 03:35:39 2017 (r311237) @@ -105,6 +105,11 @@ extern const struct allwinner_padconf a3 extern const struct allwinner_padconf a31_r_padconf; #endif +/* Defined in a33_padconf.c */ +#ifdef SOC_ALLWINNER_A33 +extern const struct allwinner_padconf a33_padconf; +#endif + /* Defined in h3_padconf.c */ #ifdef SOC_ALLWINNER_H3 extern const struct allwinner_padconf h3_padconf; @@ -142,6 +147,9 @@ static struct ofw_compat_data compat_dat #if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) {"allwinner,sun6i-a31-r-pinctrl", (uintptr_t)&a31_r_padconf}, #endif +#ifdef SOC_ALLWINNER_A33 + {"allwinner,sun6i-a33-pinctrl", (uintptr_t)&a33_padconf}, +#endif #ifdef SOC_ALLWINNER_A83T {"allwinner,sun8i-a83t-pinctrl", (uintptr_t)&a83t_padconf}, {"allwinner,sun8i-a83t-r-pinctrl", (uintptr_t)&a83t_r_padconf}, Added: head/sys/arm/allwinner/a33/a33_padconf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a33/a33_padconf.c Wed Jan 4 03:35:39 2017 (r311237) @@ -0,0 +1,149 @@ +/*- + * Copyright (c) 2016 Emmanuel Vadot + * 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 + +#ifdef SOC_ALLWINNER_A33 + +const static struct allwinner_pins a33_pins[] = { + {"PB0", 1, 0, {"gpio_in", "gpio_out", "uart2", "uart0", "pb_eint0", NULL}, 4, 0}, + {"PB1", 1, 1, {"gpio_in", "gpio_out", "uart2", "uart0", "pb_eint1", NULL}, 4, 1}, + {"PB2", 1, 2, {"gpio_in", "gpio_out", "uart2", NULL, "pb_eint2", NULL}, 4, 2}, + {"PB3", 1, 3, {"gpio_in", "gpio_out", "uart2", NULL, "pb_eint3", NULL}, 4, 3}, + {"PB4", 1, 4, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint4", NULL}, 4, 4}, + {"PB5", 1, 5, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint5", NULL}, 4, 5}, + {"PB6", 1, 6, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint6", NULL}, 4, 6}, + {"PB7", 1, 7, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint7", NULL}, 4, 7}, + + {"PC0", 2, 0, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, + {"PC1", 2, 1, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, + {"PC2", 2, 2, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, + {"PC3", 2, 3, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, + {"PC4", 2, 4, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, + {"PC5", 2, 5, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC6", 2, 6, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC7", 2, 7, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, + {"PC8", 2, 8, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC9", 2, 9, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC10", 2, 10, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC11", 2, 11, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC12", 2, 12, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC13", 2, 13, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC14", 2, 14, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC15", 2, 15, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC16", 2, 16, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + + {"PD2", 3, 2, {"gpio_in", "gpio_out", "lcd0", "mmc1", NULL, NULL, NULL, NULL}}, + {"PD3", 3, 3, {"gpio_in", "gpio_out", "lcd0", "mmc1", NULL, NULL, NULL, NULL}}, + {"PD4", 3, 4, {"gpio_in", "gpio_out", "lcd0", "mmc1", NULL, NULL, NULL, NULL}}, + {"PD5", 3, 5, {"gpio_in", "gpio_out", "lcd0", "mmc1", NULL, NULL, NULL, NULL}}, + {"PD6", 3, 6, {"gpio_in", "gpio_out", "lcd0", "mmc1", NULL, NULL, NULL, NULL}}, + {"PD7", 3, 7, {"gpio_in", "gpio_out", "lcd0", "mmc1", NULL, NULL, NULL, NULL}}, + {"PD10", 3, 10, {"gpio_in", "gpio_out", "lcd0", "uart1", NULL, NULL, NULL, NULL}}, + {"PD11", 3, 11, {"gpio_in", "gpio_out", "lcd0", "uart1", NULL, NULL, NULL, NULL}}, + {"PD12", 3, 12, {"gpio_in", "gpio_out", "lcd0", "uart1", NULL, NULL, NULL, NULL}}, + {"PD13", 3, 13, {"gpio_in", "gpio_out", "lcd0", "uart1", NULL, NULL, NULL, NULL}}, + {"PD14", 3, 14, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD15", 3, 15, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD18", 3, 18, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD19", 3, 19, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD20", 3, 20, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD21", 3, 21, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD22", 3, 22, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD23", 3, 23, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD24", 3, 24, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD25", 3, 25, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD26", 3, 26, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + {"PD27", 3, 27, {"gpio_in", "gpio_out", "lcd0", "lvds0", NULL, NULL, NULL, NULL}}, + + {"PE0", 4, 0, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE1", 4, 1, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE2", 4, 2, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE3", 4, 3, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE4", 4, 4, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE5", 4, 5, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE6", 4, 6, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE7", 4, 7, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE8", 4, 8, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE9", 4, 9, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE10", 4, 10, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE11", 4, 11, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE12", 4, 12, {"gpio_in", "gpio_out", "csi", "i2c2", NULL, NULL, NULL, NULL}, 0, 0}, + {"PE13", 4, 13, {"gpio_in", "gpio_out", "csi", "i2c2", NULL, NULL, NULL, NULL}, 0, 0}, + {"PE14", 4, 14, {"gpio_in", "gpio_out", NULL, NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE15", 4, 15, {"gpio_in", "gpio_out", NULL, NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE16", 4, 16, {"gpio_in", "gpio_out", NULL, NULL, NULL, NULL, NULL, NULL}, 0, 0}, + {"PE17", 4, 16, {"gpio_in", "gpio_out", NULL, NULL, NULL, NULL, NULL, NULL}, 0, 0}, + + {"PF0", 5, 0, {"gpio_in", "gpio_out", "mmc0", "jtag", NULL, NULL, NULL}}, + {"PF1", 5, 1, {"gpio_in", "gpio_out", "mmc0", "jtag", NULL, NULL, NULL}}, + {"PF2", 5, 2, {"gpio_in", "gpio_out", "mmc0", "uart0", NULL, NULL, NULL}}, + {"PF3", 5, 3, {"gpio_in", "gpio_out", "mmc0", "jtag", NULL, NULL, NULL}}, + {"PF4", 5, 4, {"gpio_in", "gpio_out", "mmc0", "uart0", NULL, NULL, NULL}}, + {"PF5", 5, 5, {"gpio_in", "gpio_out", "mmc0", "jtag", NULL, NULL, NULL}}, + + {"PG0", 6, 0, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint0", NULL}, 4, 0}, + {"PG1", 6, 1, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint1", NULL}, 4, 1}, + {"PG2", 6, 2, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint2", NULL}, 4, 2}, + {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint3", NULL}, 4, 3}, + {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint4", NULL}, 4, 4}, + {"PG5", 6, 5, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint5", NULL}, 4, 5}, + {"PG6", 6, 6, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint6", NULL}, 4, 6}, + {"PG7", 6, 7, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint7", NULL}, 4, 7}, + {"PG8", 6, 8, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint8", NULL}, 4, 8}, + {"PG9", 6, 9, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint9", NULL}, 4, 9}, + {"PG10", 6, 10, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint10", NULL}, 4, 10}, + {"PG11", 6, 11, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint11", NULL}, 4, 11}, + {"PG12", 6, 12, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint12", NULL}, 4, 12}, + {"PG13", 6, 13, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint13", NULL}, 4, 13}, + + {"PH0", 7, 0, {"gpio_in", "gpio_out", "pwm0", NULL, NULL, NULL, NULL, NULL}}, + {"PH1", 7, 1, {"gpio_in", "gpio_out", "pwm1", NULL, NULL, NULL, NULL, NULL}}, + {"PH2", 7, 2, {"gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, NULL, NULL}}, + {"PH3", 7, 3, {"gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, NULL, NULL}}, + {"PH4", 7, 4, {"gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, NULL, NULL}}, + {"PH5", 7, 5, {"gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, NULL, NULL}}, + {"PH6", 7, 6, {"gpio_in", "gpio_out", "spi0", "uart3", NULL, NULL, NULL, NULL}}, + {"PH7", 7, 7, {"gpio_in", "gpio_out", "spi0", "uart3", NULL, NULL, NULL, NULL}}, + {"PH8", 7, 8, {"gpio_in", "gpio_out", "spi0", "uart3", NULL, NULL, NULL, NULL}}, + {"PH9", 7, 9, {"gpio_in", "gpio_out", "spi0", "uart3", NULL, NULL, NULL, NULL}}, +}; + +const struct allwinner_padconf a33_padconf = { + .npins = nitems(a33_pins), + .pins = a33_pins, +}; + +#endif /* SOC_ALLWINNER_A33 */ Added: head/sys/arm/allwinner/a33/files.a33 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a33/files.a33 Wed Jan 4 03:35:39 2017 (r311237) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +arm/allwinner/a33/a33_padconf.c standard Modified: head/sys/arm/allwinner/aw_ccu.c ============================================================================== --- head/sys/arm/allwinner/aw_ccu.c Wed Jan 4 03:35:23 2017 (r311236) +++ head/sys/arm/allwinner/aw_ccu.c Wed Jan 4 03:35:39 2017 (r311237) @@ -80,6 +80,7 @@ static struct ofw_compat_data compat_dat { "allwinner,sun6i-a31", CLOCK_CCU }, { "allwinner,sun6i-a31s", CLOCK_CCU }, { "allwinner,sun50i-a64", CLOCK_CCU }, + { "allwinner,sun8i-a33", CLOCK_CCU }, { "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL }, { "allwinner,sun8i-h3", CLOCK_CCU|CLOCK_PRCM }, { NULL, 0 } Modified: head/sys/arm/allwinner/aw_machdep.c ============================================================================== --- head/sys/arm/allwinner/aw_machdep.c Wed Jan 4 03:35:23 2017 (r311236) +++ head/sys/arm/allwinner/aw_machdep.c Wed Jan 4 03:35:39 2017 (r311237) @@ -111,6 +111,15 @@ a31s_attach(platform_t plat) } static int +a33_attach(platform_t plat) +{ + soc_type = ALLWINNERSOC_A33; + soc_family = ALLWINNERSOC_SUN8I; + + return (0); +} + +static int a83t_attach(platform_t plat) { soc_type = ALLWINNERSOC_A83T; @@ -222,6 +231,21 @@ static platform_method_t a31s_methods[] FDT_PLATFORM_DEF(a31s, "a31s", 0, "allwinner,sun6i-a31s", 200); #endif +#if defined(SOC_ALLWINNER_A33) +static platform_method_t a33_methods[] = { + PLATFORMMETHOD(platform_attach, a33_attach), + PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), + +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, aw_mp_setmaxid), +#endif + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(a33, "a33", 0, "allwinner,sun8i-a33", 200); +#endif + #if defined(SOC_ALLWINNER_A83T) static platform_method_t a83t_methods[] = { PLATFORMMETHOD(platform_attach, a83t_attach), Modified: head/sys/arm/allwinner/aw_machdep.h ============================================================================== --- head/sys/arm/allwinner/aw_machdep.h Wed Jan 4 03:35:23 2017 (r311236) +++ head/sys/arm/allwinner/aw_machdep.h Wed Jan 4 03:35:39 2017 (r311237) @@ -37,6 +37,7 @@ #define ALLWINNERSOC_H3 0x30000000 #define ALLWINNERSOC_A31 0x31000000 #define ALLWINNERSOC_A31S 0x31000001 +#define ALLWINNERSOC_A33 0x33000000 #define ALLWINNERSOC_A83T 0x83000000 #define ALLWINNERSOC_SUN4I 0x40000000 Modified: head/sys/arm/allwinner/clk/aw_axiclk.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_axiclk.c Wed Jan 4 03:35:23 2017 (r311236) +++ head/sys/arm/allwinner/clk/aw_axiclk.c Wed Jan 4 03:35:39 2017 (r311237) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); static struct ofw_compat_data compat_data[] = { { "allwinner,sun4i-a10-axi-clk", 1 }, + { "allwinner,sun8i-a23-axi-clk", 1 }, { NULL, 0 } }; Modified: head/sys/arm/allwinner/clk/aw_gate.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_gate.c Wed Jan 4 03:35:23 2017 (r311236) +++ head/sys/arm/allwinner/clk/aw_gate.c Wed Jan 4 03:35:39 2017 (r311237) @@ -83,6 +83,11 @@ static struct ofw_compat_data compat_dat { "allwinner,sun6i-a31-apb2-gates-clk", (uintptr_t)"Allwinner APB2 Clock Gates" }, + { "allwinner,sun8i-a23-apb1-gates-clk", + (uintptr_t)"Allwinner APB1 Clock Gates" }, + { "allwinner,sun8i-a23-apb2-gates-clk", + (uintptr_t)"Allwinner APB2 Clock Gates" }, + { "allwinner,sun8i-a83t-bus-gates-clk", (uintptr_t)"Allwinner Bus Clock Gates" }, { "allwinner,sun8i-a83t-apb0-gates-clk", Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Wed Jan 4 03:35:23 2017 (r311236) +++ head/sys/conf/options.arm Wed Jan 4 03:35:39 2017 (r311237) @@ -47,6 +47,7 @@ SOC_ALLWINNER_A13 opt_global.h SOC_ALLWINNER_A20 opt_global.h SOC_ALLWINNER_A31 opt_global.h SOC_ALLWINNER_A31S opt_global.h +SOC_ALLWINNER_A33 opt_global.h SOC_ALLWINNER_A83T opt_global.h SOC_ALLWINNER_H3 opt_global.h SOC_BCM2835 opt_global.h From owner-svn-src-head@freebsd.org Wed Jan 4 03:37:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC1FCC9EE48; Wed, 4 Jan 2017 03:37:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C07219F9; Wed, 4 Jan 2017 03:37:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v043b0xc059952; Wed, 4 Jan 2017 03:37:00 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v043b097059951; Wed, 4 Jan 2017 03:37:00 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201701040337.v043b097059951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Jan 2017 03:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311238 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 03:37:01 -0000 Author: manu Date: Wed Jan 4 03:37:00 2017 New Revision: 311238 URL: https://svnweb.freebsd.org/changeset/base/311238 Log: ARM GENERIC: Add support for Allwinner A33 SoC Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Wed Jan 4 03:35:39 2017 (r311237) +++ head/sys/arm/conf/GENERIC Wed Jan 4 03:37:00 2017 (r311238) @@ -35,6 +35,7 @@ files "../allwinner/a10/files.a10" files "../allwinner/a13/files.a13" files "../allwinner/a20/files.a20" files "../allwinner/a31/files.a31" +files "../allwinner/a33/files.a33" files "../allwinner/a83t/files.a83t" files "../allwinner/h3/files.h3" files "../broadcom/bcm2835/files.bcm2836" @@ -50,6 +51,7 @@ options SOC_ALLWINNER_A13 options SOC_ALLWINNER_A20 options SOC_ALLWINNER_A31 options SOC_ALLWINNER_A31S +options SOC_ALLWINNER_A33 options SOC_ALLWINNER_A83T options SOC_ALLWINNER_H3 options SOC_BCM2836 From owner-svn-src-head@freebsd.org Wed Jan 4 03:41:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 938FAC9EF4B; Wed, 4 Jan 2017 03:41:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62EEA1D7A; Wed, 4 Jan 2017 03:41:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v043fGc5060139; Wed, 4 Jan 2017 03:41:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v043fGmX060138; Wed, 4 Jan 2017 03:41:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040341.v043fGmX060138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 03:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311239 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 03:41:17 -0000 Author: ngie Date: Wed Jan 4 03:41:16 2017 New Revision: 311239 URL: https://svnweb.freebsd.org/changeset/base/311239 Log: umask_open: don't leak fd on success MFC after: 3 days Reported by: Coverity CID: 978315 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_umask.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_umask.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_umask.c Wed Jan 4 03:37:00 2017 (r311238) +++ head/contrib/netbsd-tests/lib/libc/sys/t_umask.c Wed Jan 4 03:41:16 2017 (r311239) @@ -129,6 +129,9 @@ ATF_TC_BODY(umask_open, tc) if (fd < 0) continue; +#ifdef __FreeBSD__ + (void)close(fd); +#endif (void)memset(&st, 0, sizeof(struct stat)); if (stat(path, &st) != 0) { From owner-svn-src-head@freebsd.org Wed Jan 4 03:54:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE9BAC9E2C4; Wed, 4 Jan 2017 03:54: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 BE24E1395; Wed, 4 Jan 2017 03:54: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 v043ssk1068089; Wed, 4 Jan 2017 03:54:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v043ssbw068088; Wed, 4 Jan 2017 03:54:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040354.v043ssbw068088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 03:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311240 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 03:54:56 -0000 Author: ngie Date: Wed Jan 4 03:54:54 2017 New Revision: 311240 URL: https://svnweb.freebsd.org/changeset/base/311240 Log: kqueue_desc_passing: initialize m.msg_flags to 0 This mutes an uninitialized scalar warning from Coverity MFC after: 3 days Reported by: Coverity CID: 979620 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c Wed Jan 4 03:41:16 2017 (r311239) +++ head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c Wed Jan 4 03:54:54 2017 (r311240) @@ -101,6 +101,9 @@ ATF_TC_BODY(kqueue_desc_passing, tc) m.msg_namelen = 0; m.msg_control = msg; m.msg_controllen = CMSG_SPACE(sizeof(int)); +#ifdef __FreeBSD__ + m.msg_flags = 0; +#endif child = fork(); if (child == 0) { From owner-svn-src-head@freebsd.org Wed Jan 4 03:59:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A12C6C9E3D2; Wed, 4 Jan 2017 03:59:51 +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 70C9B172C; Wed, 4 Jan 2017 03:59:51 +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 v043xoJn068364; Wed, 4 Jan 2017 03:59:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v043xodu068363; Wed, 4 Jan 2017 03:59:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040359.v043xodu068363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 03:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311242 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 03:59:51 -0000 Author: ngie Date: Wed Jan 4 03:59:50 2017 New Revision: 311242 URL: https://svnweb.freebsd.org/changeset/base/311242 Log: listen_low_port: check for errors from socket(2) before continuing MFC after: 3 days Reported by: Coverity CID: 976778 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_listen.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_listen.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_listen.c Wed Jan 4 03:57:18 2017 (r311241) +++ head/contrib/netbsd-tests/lib/libc/sys/t_listen.c Wed Jan 4 03:59:50 2017 (r311242) @@ -110,6 +110,9 @@ ATF_TC_BODY(listen_low_port, tc) int sd, val; sd = socket(AF_INET, SOCK_STREAM, 0); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(sd != -1, "socket failed: %s", strerror(errno)); +#endif val = IP_PORTRANGE_LOW; if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE, &val, From owner-svn-src-head@freebsd.org Wed Jan 4 04:00:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD16FC9E43F; Wed, 4 Jan 2017 04:00:29 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97DF718D9; Wed, 4 Jan 2017 04:00:29 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0440SCt068475; Wed, 4 Jan 2017 04:00:28 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0440S68068474; Wed, 4 Jan 2017 04:00:28 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201701040400.v0440S68068474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 4 Jan 2017 04:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311243 - head/sys/netinet/tcp_stacks X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:00:29 -0000 Author: gnn Date: Wed Jan 4 04:00:28 2017 New Revision: 311243 URL: https://svnweb.freebsd.org/changeset/base/311243 Log: Followup to mtod removal in main stack (r311225). Continued removal of mtod() calls from TCP_PROBE macros. MFC after: 1 week Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_stacks/fastpath.c Modified: head/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- head/sys/netinet/tcp_stacks/fastpath.c Wed Jan 4 03:59:50 2017 (r311242) +++ head/sys/netinet/tcp_stacks/fastpath.c Wed Jan 4 04:00:28 2017 (r311243) @@ -312,7 +312,7 @@ tcp_do_fastack(struct mbuf *m, struct tc (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); m_freem(m); if (tp->snd_una == tp->snd_max) tcp_timer_activate(tp, TT_REXMT, 0); @@ -404,7 +404,7 @@ tcp_do_fastnewdata(struct mbuf *m, struc tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); /* * Automatic sizing of receive socket buffer. Often the send * buffer size is not optimally adjusted to the actual network @@ -579,8 +579,7 @@ tcp_do_slowpath(struct mbuf *m, struct t goto dropwithreset; } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { - TCP_PROBE5(connect__refused, NULL, tp, - mtod(m, const char *), tp, th); + TCP_PROBE5(connect__refused, NULL, tp, m, tp, th); tp = tcp_drop(tp, ECONNREFUSED); } if (thflags & TH_RST) @@ -633,7 +632,7 @@ tcp_do_slowpath(struct mbuf *m, struct t } else { tcp_state_change(tp, TCPS_ESTABLISHED); TCP_PROBE5(connect__established, NULL, tp, - mtod(m, const char *), tp, th); + m, tp, th); cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); @@ -1004,7 +1003,7 @@ tcp_do_slowpath(struct mbuf *m, struct t } else { tcp_state_change(tp, TCPS_ESTABLISHED); TCP_PROBE5(accept__established, NULL, tp, - mtod(m, const char *), tp, th); + m, tp, th); cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); } @@ -1676,7 +1675,7 @@ dodata: /* XXX */ tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); /* * Return any desired output. @@ -1723,7 +1722,7 @@ dropafterack: tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__drop, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__drop, tp, th, m); if (ti_locked == TI_RLOCKED) { INP_INFO_RUNLOCK(&V_tcbinfo); } @@ -1766,7 +1765,7 @@ drop: tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__drop, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__drop, tp, th, m); if (tp != NULL) INP_WUNLOCK(tp->t_inpcb); m_freem(m); @@ -2183,7 +2182,7 @@ tcp_fastack(struct mbuf *m, struct tcphd (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__input, tp, th, m); m_freem(m); if (tp->snd_una == tp->snd_max) tcp_timer_activate(tp, TT_REXMT, 0); From owner-svn-src-head@freebsd.org Wed Jan 4 04:10:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AEC4C9EBEA; Wed, 4 Jan 2017 04:10:37 +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 5A7F21186; Wed, 4 Jan 2017 04:10:37 +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 v044AaKL072317; Wed, 4 Jan 2017 04:10:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v044AacG072316; Wed, 4 Jan 2017 04:10:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040410.v044AacG072316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 04:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311244 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:10:37 -0000 Author: ngie Date: Wed Jan 4 04:10:36 2017 New Revision: 311244 URL: https://svnweb.freebsd.org/changeset/base/311244 Log: mmap_prot_3, mmap_truncate, mmap_truncate_signal: don't leak fd and map Reported by: Coverity CID: 978306, 1251406, 1288196, 1300541 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Wed Jan 4 04:00:28 2017 (r311243) +++ head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Wed Jan 4 04:10:36 2017 (r311244) @@ -381,9 +381,13 @@ ATF_TC_BODY(mmap_prot_3, tc) * the access should generate SIGSEGV. */ fd = open(path, O_RDWR | O_CREAT, 0700); - if (fd < 0) +#ifdef __FreeBSD__ + atf_tc_skip("opening %s failed; skipping testcase: %s", + path, strerror(errno)); +#else return; +#endif ATF_REQUIRE(write(fd, "XXX", 3) == 3); ATF_REQUIRE(close(fd) == 0); @@ -409,6 +413,9 @@ ATF_TC_BODY(mmap_prot_3, tc) ATF_REQUIRE(WIFEXITED(sta) != 0); ATF_REQUIRE(WEXITSTATUS(sta) == SIGSEGV); ATF_REQUIRE(munmap(map, 3) == 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif } ATF_TC_CLEANUP(mmap_prot_3, tc) @@ -453,6 +460,9 @@ ATF_TC_BODY(mmap_truncate, tc) ATF_REQUIRE(ftruncate(fd, page / 12) == 0); ATF_REQUIRE(ftruncate(fd, page / 64) == 0); +#ifdef __FreeBSD__ + (void)munmap(map, page); +#endif ATF_REQUIRE(close(fd) == 0); } @@ -509,6 +519,10 @@ ATF_TC_BODY(mmap_truncate_signal, tc) prevent the access to be optimized out */ ATF_REQUIRE(i == 0); ATF_REQUIRE(sta == 0); +#ifdef __FreeBSD__ + (void)munmap(map, page); + (void)close(fd); +#endif return; } From owner-svn-src-head@freebsd.org Wed Jan 4 04:19:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5785BC9EF85; Wed, 4 Jan 2017 04:19:06 +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 26348172C; Wed, 4 Jan 2017 04:19:06 +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 v044J5NR076273; Wed, 4 Jan 2017 04:19:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v044J5DO076272; Wed, 4 Jan 2017 04:19:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040419.v044J5DO076272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 04:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311245 - head/contrib/netbsd-tests/lib/libc/ttyio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:19:06 -0000 Author: ngie Date: Wed Jan 4 04:19:05 2017 New Revision: 311245 URL: https://svnweb.freebsd.org/changeset/base/311245 Log: tty: don't leak s after opening it with openpty MFC after: 3 days Reported by: Coverity CID: 978321 Modified: head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Modified: head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Wed Jan 4 04:10:36 2017 (r311244) +++ head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Wed Jan 4 04:19:05 2017 (r311245) @@ -152,6 +152,9 @@ ATF_TC_BODY(ioctl, tc) REQUIRE_ERRNO(sigaction(SIGCHLD, &sa, NULL), -1); (void) wait(NULL); +#ifdef __FreeBSD__ + (void)close(s); +#endif ATF_REQUIRE_EQ(rc, 0); } From owner-svn-src-head@freebsd.org Wed Jan 4 04:27:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BA4EC9E215; Wed, 4 Jan 2017 04:27:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2F71C49; Wed, 4 Jan 2017 04:27:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v044RDfG080577; Wed, 4 Jan 2017 04:27:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v044RDUi080576; Wed, 4 Jan 2017 04:27:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040427.v044RDUi080576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 04:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311246 - head/contrib/netbsd-tests/lib/libc/c063 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:27:14 -0000 Author: ngie Date: Wed Jan 4 04:27:13 2017 New Revision: 311246 URL: https://svnweb.freebsd.org/changeset/base/311246 Log: fexecve: don't leak fd on fexecve(2) failure; close before calling err MFC after: 3 days Reported by: Coverity CID: 978285 Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Wed Jan 4 04:19:05 2017 (r311245) +++ head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Wed Jan 4 04:27:13 2017 (r311246) @@ -70,6 +70,9 @@ ATF_TC_BODY(fexecve, tc) error = 76; else error = EXIT_FAILURE; +#ifdef __FreeBSD__ + (void)close(fd); +#endif err(error, "fexecve"); } } From owner-svn-src-head@freebsd.org Wed Jan 4 04:29:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9707DC9E29B; Wed, 4 Jan 2017 04:29: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 66A3C1DE9; Wed, 4 Jan 2017 04:29: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 v044Trt9080697; Wed, 4 Jan 2017 04:29:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v044TrX0080696; Wed, 4 Jan 2017 04:29:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040429.v044TrX0080696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 04:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311247 - head/contrib/netbsd-tests/lib/libc/c063 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:29:54 -0000 Author: ngie Date: Wed Jan 4 04:29:53 2017 New Revision: 311247 URL: https://svnweb.freebsd.org/changeset/base/311247 Log: mkfifoat_fd: close dfd after use to avoid leaking it MFC after: 3 days Reported by: Coverity CID: 978286 Modified: head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Modified: head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Wed Jan 4 04:27:13 2017 (r311246) +++ head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Wed Jan 4 04:29:53 2017 (r311247) @@ -63,6 +63,9 @@ ATF_TC_BODY(mkfifoat_fd, tc) ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FIFO, F_OK) == 0); +#ifdef __FreeBSD__ + (void)close(dfd); +#endif } ATF_TC(mkfifoat_fdcwd); From owner-svn-src-head@freebsd.org Wed Jan 4 04:32:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85B2CC9E43B; Wed, 4 Jan 2017 04:32: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 4EAEE11B7; Wed, 4 Jan 2017 04:32: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 v044W0J7083579; Wed, 4 Jan 2017 04:32:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v044W0C9083578; Wed, 4 Jan 2017 04:32:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040432.v044W0C9083578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 04:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311248 - head/contrib/netbsd-tests/lib/libc/c063 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:32:01 -0000 Author: ngie Date: Wed Jan 4 04:32:00 2017 New Revision: 311248 URL: https://svnweb.freebsd.org/changeset/base/311248 Log: mknodat_fd: close dfd after use to avoid leaking it MFC after: 3 days Reported by: Coverity CID: 978287 Modified: head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Modified: head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Wed Jan 4 04:29:53 2017 (r311247) +++ head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Wed Jan 4 04:32:00 2017 (r311248) @@ -80,6 +80,9 @@ ATF_TC_BODY(mknodat_fd, tc) ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FILE, F_OK) == 0); +#ifdef __FreeBSD__ + (void)close(dfd); +#endif } ATF_TC(mknodat_fdcwd); From owner-svn-src-head@freebsd.org Wed Jan 4 04:50:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9823CC9EA41; Wed, 4 Jan 2017 04:50: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 4DB421D4C; Wed, 4 Jan 2017 04:50: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 v044o3Oh089184; Wed, 4 Jan 2017 04:50:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v044o3K5089182; Wed, 4 Jan 2017 04:50:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040450.v044o3K5089182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 04:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311249 - head/contrib/netbsd-tests/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:50:04 -0000 Author: ngie Date: Wed Jan 4 04:50:03 2017 New Revision: 311249 URL: https://svnweb.freebsd.org/changeset/base/311249 Log: {strchr,strlen}_basic: don't leak the dlopen'ed handle; close after use MFC after: 3 days Reported by: Coverity CID: 978299, 978300 Modified: head/contrib/netbsd-tests/lib/libc/string/t_strchr.c head/contrib/netbsd-tests/lib/libc/string/t_strlen.c Modified: head/contrib/netbsd-tests/lib/libc/string/t_strchr.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_strchr.c Wed Jan 4 04:32:00 2017 (r311248) +++ head/contrib/netbsd-tests/lib/libc/string/t_strchr.c Wed Jan 4 04:50:03 2017 (r311249) @@ -58,6 +58,9 @@ ATF_TC_HEAD(strchr_basic, tc) ATF_TC_BODY(strchr_basic, tc) { +#ifdef __FreeBSD__ + void *dl_handle; +#endif unsigned int t, a; char *off; char buf[32]; @@ -245,8 +248,12 @@ ATF_TC_BODY(strchr_basic, tc) "abcdefgh/abcdefgh/", }; - +#ifdef __FreeBSD__ + dl_handle = dlopen(NULL, RTLD_LAZY); + strchr_fn = dlsym(dl_handle, "test_strlen"); +#else strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr"); +#endif if (!strchr_fn) strchr_fn = strchr; @@ -281,6 +288,9 @@ ATF_TC_BODY(strchr_basic, tc) verify_strchr(buf + a, 0xff, t, a); } } +#ifdef __FreeBSD__ + (void)dlclose(dl_handle); +#endif } ATF_TP_ADD_TCS(tp) Modified: head/contrib/netbsd-tests/lib/libc/string/t_strlen.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_strlen.c Wed Jan 4 04:32:00 2017 (r311248) +++ head/contrib/netbsd-tests/lib/libc/string/t_strlen.c Wed Jan 4 04:50:03 2017 (r311249) @@ -40,6 +40,9 @@ ATF_TC_HEAD(strlen_basic, tc) ATF_TC_BODY(strlen_basic, tc) { +#ifdef __FreeBSD__ + void *dl_handle; +#endif /* try to trick the compiler */ size_t (*strlen_fn)(const char *); @@ -107,7 +110,12 @@ ATF_TC_BODY(strlen_basic, tc) * During testing it is useful have the rest of the program * use a known good version! */ +#ifdef __FreeBSD__ + dl_handle = dlopen(NULL, RTLD_LAZY); + strlen_fn = dlsym(dl_handle, "test_strlen"); +#else strlen_fn = dlsym(dlopen(NULL, RTLD_LAZY), "test_strlen"); +#endif if (!strlen_fn) strlen_fn = strlen; @@ -134,6 +142,9 @@ ATF_TC_BODY(strlen_basic, tc) } } } +#ifdef __FreeBSD__ + (void)dlclose(dl_handle); +#endif } ATF_TC(strlen_huge); From owner-svn-src-head@freebsd.org Wed Jan 4 04:55:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E106C9ED12; Wed, 4 Jan 2017 04:55:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6534B12CD; Wed, 4 Jan 2017 04:55:34 +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 v044tXOu092922; Wed, 4 Jan 2017 04:55:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v044tXXK092921; Wed, 4 Jan 2017 04:55:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040455.v044tXXK092921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 04:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311250 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:55:34 -0000 Author: ngie Date: Wed Jan 4 04:55:33 2017 New Revision: 311250 URL: https://svnweb.freebsd.org/changeset/base/311250 Log: mincore_resid: free buf after use MFC after: 3 days Reported by: Coverity CID: 978304 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Wed Jan 4 04:50:03 2017 (r311249) +++ head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Wed Jan 4 04:55:33 2017 (r311250) @@ -279,6 +279,9 @@ ATF_TC_BODY(mincore_resid, tc) (void)munmap(addr2, npgs * page); (void)munmap(addr3, npgs * page); (void)unlink(path); +#ifdef __FreeBSD__ + free(buf); +#endif } ATF_TC_CLEANUP(mincore_resid, tc) From owner-svn-src-head@freebsd.org Wed Jan 4 07:53:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 384B4C9E492; Wed, 4 Jan 2017 07:53:02 +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 080121828; Wed, 4 Jan 2017 07:53: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 v047r1sQ065842; Wed, 4 Jan 2017 07:53:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v047r16m065841; Wed, 4 Jan 2017 07:53:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040753.v047r16m065841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 07:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311263 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 07:53:02 -0000 Author: ngie Date: Wed Jan 4 07:53:01 2017 New Revision: 311263 URL: https://svnweb.freebsd.org/changeset/base/311263 Log: Use calloc instead of malloc with buffers in snmp_{recv,send}_packet This doesn't fix the issue noted in the PR, but at the very least it cleans up the error so it looks a bit more sane, and in the event that bsnmp did wander off into the weeds, the likelihood of it crashing with more sensible output is greater, in my opinion MFC counter set high so I have enough time to resolve the real underlying bug in bsnmpwalk MFC after: 1 month PR: 215721 Modified: head/contrib/bsnmp/lib/snmpclient.c Modified: head/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- head/contrib/bsnmp/lib/snmpclient.c Wed Jan 4 07:49:29 2017 (r311262) +++ head/contrib/bsnmp/lib/snmpclient.c Wed Jan 4 07:53:01 2017 (r311263) @@ -1231,7 +1231,7 @@ snmp_send_packet(struct snmp_pdu * pdu) struct asn_buf b; ssize_t ret; - if ((buf = malloc(snmp_client.txbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.txbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } @@ -1256,7 +1256,7 @@ snmp_send_packet(struct snmp_pdu * pdu) } free(buf); - return pdu->request_id; + return (pdu->request_id); } /* @@ -1352,7 +1352,7 @@ snmp_receive_packet(struct snmp_pdu *pdu socklen_t optlen; #endif - if ((buf = malloc(snmp_client.rxbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.rxbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } From owner-svn-src-head@freebsd.org Wed Jan 4 08:07:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CDA3C9EB0D; Wed, 4 Jan 2017 08:07:49 +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 42990111D; Wed, 4 Jan 2017 08:07:49 +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 v0487mpc070723; Wed, 4 Jan 2017 08:07:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0487m6h070722; Wed, 4 Jan 2017 08:07:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040807.v0487m6h070722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 08:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311265 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 08:07:49 -0000 Author: ngie Date: Wed Jan 4 08:07:48 2017 New Revision: 311265 URL: https://svnweb.freebsd.org/changeset/base/311265 Log: fpu: ensure calls to pthread_create succeed and test sched_yield to make sure it returns 0 sched_yield tests for values returning 0 of type int and sched_yield is of type long, so the test is a mismatch MFC after: 1 week Reported by: Coverity CID: 1254953, 1254954, 1254965, 1254966 Modified: head/contrib/netbsd-tests/lib/libpthread/t_fpu.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_fpu.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_fpu.c Wed Jan 4 08:04:58 2017 (r311264) +++ head/contrib/netbsd-tests/lib/libpthread/t_fpu.c Wed Jan 4 08:07:48 2017 (r311265) @@ -58,6 +58,11 @@ __RCSID("$NetBSD: t_fpu.c,v 1.2 2013/01/ #include +#ifdef __FreeBSD__ +#include +#include +#endif + #include "h_common.h" #define N_RECURSE 10 @@ -77,14 +82,24 @@ stir(void *p) for (;;) { x = sin ((y = cos (x + y + .4)) - (z = cos (x + z + .6))); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(sched_yield() == 0, + "sched_yield failed: %s", strerror(errno)); +#else PTHREAD_REQUIRE(sched_yield()); +#endif } } static double mul3(double x, double y, double z) { +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(sched_yield() == 0, + "sched_yield failed: %s", strerror(errno)); +#else PTHREAD_REQUIRE(sched_yield()); +#endif return x * y * z; } @@ -114,7 +129,11 @@ bar(void *p) static void recurse(void) { pthread_t s2; +#ifdef __FreeBSD__ + PTHREAD_REQUIRE(pthread_create(&s2, 0, bar, 0)); +#else pthread_create(&s2, 0, bar, 0); +#endif sleep(20); /* XXX must be long enough for our slowest machine */ } @@ -134,7 +153,11 @@ ATF_TC_BODY(fpu, tc) PTHREAD_REQUIRE(pthread_mutex_init(&recursion_depth_lock, 0)); +#ifdef __FreeBSD__ + PTHREAD_REQUIRE(pthread_create(&s5, 0, stir, stirseed)); +#else pthread_create(&s5, 0, stir, stirseed); +#endif recurse(); atf_tc_fail("exiting from main"); From owner-svn-src-head@freebsd.org Wed Jan 4 08:08:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF620C9EB93; Wed, 4 Jan 2017 08:08:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF23E12BE; Wed, 4 Jan 2017 08:08:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0488oMp070805; Wed, 4 Jan 2017 08:08:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0488oGU070804; Wed, 4 Jan 2017 08:08:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701040808.v0488oGU070804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 4 Jan 2017 08:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311266 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 08:08:52 -0000 Author: adrian Date: Wed Jan 4 08:08:50 2017 New Revision: 311266 URL: https://svnweb.freebsd.org/changeset/base/311266 Log: [net80211] Add VHT flags for printf/debugging. Whilst here, note that the last bit is currently used by ifconfig (_CHAN_HT) so don't use it without fixing that first. Modified: head/sys/net80211/_ieee80211.h Modified: head/sys/net80211/_ieee80211.h ============================================================================== --- head/sys/net80211/_ieee80211.h Wed Jan 4 08:07:48 2017 (r311265) +++ head/sys/net80211/_ieee80211.h Wed Jan 4 08:08:50 2017 (r311266) @@ -194,6 +194,7 @@ struct ieee80211_channel { #define IEEE80211_CHAN_VHT80 0x08000000 /* VHT80 channel */ #define IEEE80211_CHAN_VHT80_80 0x10000000 /* VHT80+80 channel */ #define IEEE80211_CHAN_VHT160 0x20000000 /* VHT160 channel */ +/* XXX note: 0x80000000 is used in src/sbin/ifconfig/ifieee80211.c :( */ #define IEEE80211_CHAN_HT40 (IEEE80211_CHAN_HT40U | IEEE80211_CHAN_HT40D) #define IEEE80211_CHAN_HT (IEEE80211_CHAN_HT20 | IEEE80211_CHAN_HT40) @@ -206,8 +207,8 @@ struct ieee80211_channel { #define IEEE80211_CHAN_BITS \ "\20\1PRIV0\2PRIV2\3PRIV3\4PRIV4\5TURBO\6CCK\7OFDM\0102GHZ\0115GHZ" \ "\12PASSIVE\13DYN\14GFSK\15GSM\16STURBO\17HALF\20QUARTER\21HT20" \ - "\22HT40U\23HT40D\24DFS\0254MSXMIT\26NOADHOC\27NOHOSTAP\03011D" -/* XXX TODO: add VHT bits */ + "\22HT40U\23HT40D\24DFS\0254MSXMIT\26NOADHOC\27NOHOSTAP\03011D" \ + "\031VHT20\032VHT40U\033VHT40D\034VHT80\035VHT80_80\036VHT160" /* * Useful combinations of channel characteristics. From owner-svn-src-head@freebsd.org Wed Jan 4 08:25:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE1EFC9EFD7; Wed, 4 Jan 2017 08:25:32 +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 7DAD41C31; Wed, 4 Jan 2017 08:25: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 v048PVWB078612; Wed, 4 Jan 2017 08:25:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v048PVPg078611; Wed, 4 Jan 2017 08:25:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040825.v048PVPg078611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 08:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311268 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 08:25:32 -0000 Author: ngie Date: Wed Jan 4 08:25:31 2017 New Revision: 311268 URL: https://svnweb.freebsd.org/changeset/base/311268 Log: Clarify lifetime of child(..) function Ensure child exits when complete as it's always run in a forked process. Add a missing break statement in :pselect_sigmask when calling child(..) for clarity and to avoid weird domino effects if the child process somehow does something it's not supposed to do with the logfiles, file descriptors, etc MFC after: 1 week Reported by: Coverity CID: 1223369, 1223370, 1300301 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_select.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_select.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_select.c Wed Jan 4 08:12:31 2017 (r311267) +++ head/contrib/netbsd-tests/lib/libc/sys/t_select.c Wed Jan 4 08:25:31 2017 (r311268) @@ -135,6 +135,9 @@ child(const struct timespec *ts) "after timeout %s != %s", prmask(&nset, nbuf, sizeof(nbuf)), prmask(&oset, obuf, sizeof(obuf))); +#ifdef __FreeBSD__ + _exit(0); +#endif } ATF_TC(pselect_sigmask); @@ -154,6 +157,9 @@ ATF_TC_BODY(pselect_sigmask, tc) switch (pid = fork()) { case 0: child(NULL); +#ifdef __FreeBSD__ + break; +#endif case -1: err(1, "fork"); default: From owner-svn-src-head@freebsd.org Wed Jan 4 08:35:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A872C9D2EA; Wed, 4 Jan 2017 08:35:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A1F11116; Wed, 4 Jan 2017 08:35:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v048ZkZc082659; Wed, 4 Jan 2017 08:35:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v048Zkbb082658; Wed, 4 Jan 2017 08:35:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040835.v048Zkbb082658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 08:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311269 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 08:35:47 -0000 Author: ngie Date: Wed Jan 4 08:35:46 2017 New Revision: 311269 URL: https://svnweb.freebsd.org/changeset/base/311269 Log: swapcontext1: test for getcontext(3) and swapcontext(3) success properly The beforementioned libcalls both succeed if the return codes aren't -1 MFC after: 3 days Reported by: Coverity CID: 976790, 976791 Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Wed Jan 4 08:25:31 2017 (r311268) +++ head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Wed Jan 4 08:35:46 2017 (r311269) @@ -30,6 +30,8 @@ __RCSID("$NetBSD"); #ifdef __FreeBSD__ #include +#include +#include #endif #include #include @@ -80,7 +82,12 @@ threadfunc(void *arg) oself = (void *)pthread_self(); printf("before swapcontext self = %p\n", oself); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(swapcontext(&octx, &nctx) != -1, "swapcontext failed: %s", + strerror(errno)); +#else PTHREAD_REQUIRE(swapcontext(&octx, &nctx)); +#endif /* NOTREACHED */ return NULL; @@ -111,7 +118,12 @@ ATF_TC_BODY(swapcontext1, tc) printf("Testing if swapcontext() alters pthread_self()\n"); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(getcontext(&nctx) != -1, "getcontext failed: %s", + strerror(errno)); +#else PTHREAD_REQUIRE(getcontext(&nctx)); +#endif PTHREAD_REQUIRE(pthread_create(&thread, NULL, threadfunc, NULL)); PTHREAD_REQUIRE(pthread_join(thread, NULL)); } From owner-svn-src-head@freebsd.org Wed Jan 4 08:43:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78452C9D513; Wed, 4 Jan 2017 08:43:28 +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 3D0B61647; Wed, 4 Jan 2017 08:43:28 +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 v048hRsT086645; Wed, 4 Jan 2017 08:43:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v048hRWj086644; Wed, 4 Jan 2017 08:43:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040843.v048hRWj086644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 08:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311270 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 08:43:28 -0000 Author: ngie Date: Wed Jan 4 08:43:27 2017 New Revision: 311270 URL: https://svnweb.freebsd.org/changeset/base/311270 Log: pipe_restart: free f on function exit to quell complaint from Coverity MFC after: 3 days Reported by: Coverity CID: 978307 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_pipe.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_pipe.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_pipe.c Wed Jan 4 08:35:46 2017 (r311269) +++ head/contrib/netbsd-tests/lib/libc/sys/t_pipe.c Wed Jan 4 08:43:27 2017 (r311270) @@ -153,6 +153,9 @@ ATF_TC_BODY(pipe_restart, tc) ATF_REQUIRE_EQ(WEXITSTATUS(st), 0); } +#ifdef __FreeBSD__ + free(f); +#endif } ATF_TP_ADD_TCS(tp) From owner-svn-src-head@freebsd.org Wed Jan 4 08:49:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0109DC9D6A2; Wed, 4 Jan 2017 08:49:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C43071905; Wed, 4 Jan 2017 08:49:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v048n767086936; Wed, 4 Jan 2017 08:49:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v048n7mB086935; Wed, 4 Jan 2017 08:49:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040849.v048n7mB086935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 08:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311271 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 08:49:09 -0000 Author: ngie Date: Wed Jan 4 08:49:07 2017 New Revision: 311271 URL: https://svnweb.freebsd.org/changeset/base/311271 Log: stat_symlink: don't leak fd; close the file descriptor when done MFC after: 3 days Reported by: Coverity CID: 978314 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_stat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Wed Jan 4 08:43:27 2017 (r311270) +++ head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Wed Jan 4 08:49:07 2017 (r311271) @@ -398,6 +398,9 @@ ATF_TC_BODY(stat_symlink, tc) ATF_REQUIRE(unlink(path) == 0); ATF_REQUIRE(unlink(pathlink) == 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif } ATF_TC_CLEANUP(stat_symlink, tc) From owner-svn-src-head@freebsd.org Wed Jan 4 08:59:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E1EBC9D9E0; Wed, 4 Jan 2017 08:59:07 +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 602EF1DE4; Wed, 4 Jan 2017 08:59:07 +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 v048x6Sk090915; Wed, 4 Jan 2017 08:59:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v048x6S2090914; Wed, 4 Jan 2017 08:59:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040859.v048x6S2090914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 08:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311272 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 08:59:07 -0000 Author: ngie Date: Wed Jan 4 08:59:06 2017 New Revision: 311272 URL: https://svnweb.freebsd.org/changeset/base/311272 Log: revoke_perm: don't leak fd at the end of the test; close it This code is unused on FreeBSD, but it mutes a valid Coverity warning which would be true on NetBSD MFC after: 3 days Reported by: Coverity CID: 978311 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Wed Jan 4 08:49:07 2017 (r311271) +++ head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Wed Jan 4 08:59:06 2017 (r311272) @@ -176,6 +176,9 @@ ATF_TC_BODY(revoke_perm, tc) if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS) atf_tc_fail("revoke(2) did not obey permissions"); +#ifdef __FreeBSD__ + (void)close(fd); +#endif ATF_REQUIRE(unlink(path) == 0); } From owner-svn-src-head@freebsd.org Wed Jan 4 09:00:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48779C9DC84; Wed, 4 Jan 2017 09:00:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17AAF1F72; Wed, 4 Jan 2017 09:00:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0490GLc091049; Wed, 4 Jan 2017 09:00:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0490GUc091048; Wed, 4 Jan 2017 09:00:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040900.v0490GUc091048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 09:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311273 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 09:00:17 -0000 Author: ngie Date: Wed Jan 4 09:00:16 2017 New Revision: 311273 URL: https://svnweb.freebsd.org/changeset/base/311273 Log: setrlimit_basic: don't leak buf; free it on completion MFC after: 3 days Reported by: Coverity CID: 978311 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Wed Jan 4 08:59:06 2017 (r311272) +++ head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Wed Jan 4 09:00:16 2017 (r311273) @@ -129,6 +129,9 @@ out: if (lim != 0) atf_tc_fail("failed to set limit (%d)", lim); +#ifdef __FreeBSD__ + free(buf); +#endif } ATF_TC(setrlimit_current); From owner-svn-src-head@freebsd.org Wed Jan 4 09:06:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEF74C9DEF0; Wed, 4 Jan 2017 09:06:50 +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 A1D771513; Wed, 4 Jan 2017 09:06:50 +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 v0496nlv094879; Wed, 4 Jan 2017 09:06:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0496nIg094878; Wed, 4 Jan 2017 09:06:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701040906.v0496nIg094878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 09:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311274 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 09:06:51 -0000 Author: ngie Date: Wed Jan 4 09:06:49 2017 New Revision: 311274 URL: https://svnweb.freebsd.org/changeset/base/311274 Log: run: ensure pthread_condattr_{init,setclock} is successful MFC after: 1 week Reported by: Coverity CID: 1268631, 1268633 Modified: head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_condwait.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Wed Jan 4 09:00:16 2017 (r311273) +++ head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Wed Jan 4 09:06:49 2017 (r311274) @@ -42,6 +42,8 @@ __RCSID("$NetBSD: t_condwait.c,v 1.4 201 #ifdef __FreeBSD__ #include + +#include "h_common.h" #endif #define WAITTIME 2 /* Timeout wait secound */ @@ -60,8 +62,13 @@ run(void *param) clck = *(clockid_t *)param; +#ifdef __FreeBSD__ + PTHREAD_REQUIRE(pthread_condattr_init(&attr)); + PTHREAD_REQUIRE(pthread_condattr_setclock(&attr, clck)); +#else pthread_condattr_init(&attr); pthread_condattr_setclock(&attr, clck); /* MONOTONIC or MONOTONIC */ +#endif pthread_cond_init(&cond, &attr); ATF_REQUIRE_EQ((ret = pthread_mutex_lock(&m)), 0); From owner-svn-src-head@freebsd.org Wed Jan 4 09:30:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D42EC9B5C5; Wed, 4 Jan 2017 09:30:49 +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 E3FB8109C; Wed, 4 Jan 2017 09:30:48 +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 v049UmOg003331; Wed, 4 Jan 2017 09:30:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v049UlwN003322; Wed, 4 Jan 2017 09:30:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701040930.v049UlwN003322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Jan 2017 09:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311275 - in head: contrib/zlib contrib/zlib/amiga contrib/zlib/as400 contrib/zlib/contrib/ada contrib/zlib/contrib/amd64 contrib/zlib/contrib/blast contrib/zlib/contrib/delphi contrib/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 09:30:49 -0000 Author: delphij Date: Wed Jan 4 09:30:47 2017 New Revision: 311275 URL: https://svnweb.freebsd.org/changeset/base/311275 Log: Restructure libz, place vendor files in contrib/zlib like other third party software, this provides more standarized import workflow and makes future upgrades easier. The following files are new with this commit: zconf.h.in zlib.map zlib.pc.in They are not connected to build, but were kept in tree for reference for future maintenance. All our local trivial changes were applied to contrib/zlib, and the contrib/zlib vendor source code is intended to 100% match lib/libz before this commit. MFC after: 2 weeks Added: - copied from r311267, vendor/zlib/dist/ Directory Properties: head/contrib/zlib/ (props changed) Deleted: head/contrib/zlib/CMakeLists.txt head/contrib/zlib/INDEX head/contrib/zlib/Makefile head/contrib/zlib/Makefile.in head/contrib/zlib/amiga/ head/contrib/zlib/as400/ head/contrib/zlib/configure head/contrib/zlib/contrib/ada/ head/contrib/zlib/contrib/amd64/ head/contrib/zlib/contrib/blast/ head/contrib/zlib/contrib/delphi/ head/contrib/zlib/contrib/dotzlib/ head/contrib/zlib/contrib/infback9/ head/contrib/zlib/contrib/inflate86/ head/contrib/zlib/contrib/iostream/ head/contrib/zlib/contrib/iostream2/ head/contrib/zlib/contrib/iostream3/ head/contrib/zlib/contrib/masmx64/ head/contrib/zlib/contrib/masmx86/ head/contrib/zlib/contrib/minizip/ head/contrib/zlib/contrib/pascal/ head/contrib/zlib/contrib/puff/ head/contrib/zlib/contrib/testzlib/ head/contrib/zlib/contrib/untgz/ head/contrib/zlib/contrib/vstudio/ head/contrib/zlib/examples/ head/contrib/zlib/make_vms.com head/contrib/zlib/msdos/ head/contrib/zlib/nintendods/ head/contrib/zlib/old/ head/contrib/zlib/qnx/ head/contrib/zlib/treebuild.xml head/contrib/zlib/watcom/ head/contrib/zlib/win32/ head/contrib/zlib/zconf.h.cmakein head/contrib/zlib/zlib.3.pdf head/contrib/zlib/zlib.pc.cmakein head/contrib/zlib/zlib2ansi head/lib/libz/ChangeLog head/lib/libz/FAQ head/lib/libz/README head/lib/libz/adler32.c head/lib/libz/compress.c head/lib/libz/contrib/ head/lib/libz/crc32.c head/lib/libz/crc32.h head/lib/libz/deflate.c head/lib/libz/deflate.h head/lib/libz/doc/ head/lib/libz/gzclose.c head/lib/libz/gzguts.h head/lib/libz/gzlib.c head/lib/libz/gzread.c head/lib/libz/gzwrite.c head/lib/libz/infback.c head/lib/libz/inffast.c head/lib/libz/inffast.h head/lib/libz/inffixed.h head/lib/libz/inflate.c head/lib/libz/inflate.h head/lib/libz/inftrees.c head/lib/libz/inftrees.h head/lib/libz/test/ head/lib/libz/trees.c head/lib/libz/trees.h head/lib/libz/uncompr.c head/lib/libz/zconf.h head/lib/libz/zlib.3 head/lib/libz/zlib.h head/lib/libz/zutil.c head/lib/libz/zutil.h Modified: head/contrib/zlib/gzlib.c head/contrib/zlib/gzread.c head/contrib/zlib/gzwrite.c head/contrib/zlib/inflate.c head/contrib/zlib/zconf.h head/lib/libstand/Makefile head/lib/libz/FREEBSD-upgrade head/lib/libz/Makefile head/usr.bin/minigzip/Makefile Modified: head/contrib/zlib/gzlib.c ============================================================================== --- vendor/zlib/dist/gzlib.c Wed Jan 4 08:12:31 2017 (r311267) +++ head/contrib/zlib/gzlib.c Wed Jan 4 09:30:47 2017 (r311275) @@ -3,7 +3,10 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $FreeBSD$ */ + #include "gzguts.h" +#include "zutil.h" #if defined(_WIN32) && !defined(__BORLANDC__) # define LSEEK _lseeki64 Modified: head/contrib/zlib/gzread.c ============================================================================== --- vendor/zlib/dist/gzread.c Wed Jan 4 08:12:31 2017 (r311267) +++ head/contrib/zlib/gzread.c Wed Jan 4 09:30:47 2017 (r311275) @@ -3,7 +3,10 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $FreeBSD$ */ + #include "gzguts.h" +#include /* Local functions */ local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); Modified: head/contrib/zlib/gzwrite.c ============================================================================== --- vendor/zlib/dist/gzwrite.c Wed Jan 4 08:12:31 2017 (r311267) +++ head/contrib/zlib/gzwrite.c Wed Jan 4 09:30:47 2017 (r311275) @@ -3,7 +3,10 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $FreeBSD$ */ + #include "gzguts.h" +#include /* Local functions */ local int gz_init OF((gz_statep)); Modified: head/contrib/zlib/inflate.c ============================================================================== --- vendor/zlib/dist/inflate.c Wed Jan 4 08:12:31 2017 (r311267) +++ head/contrib/zlib/inflate.c Wed Jan 4 09:30:47 2017 (r311275) @@ -1504,7 +1504,7 @@ z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; + if (strm == Z_NULL || strm->state == Z_NULL) return -(1L << 16); state = (struct inflate_state FAR *)strm->state; return ((long)(state->back) << 16) + (state->mode == COPY ? state->length : Modified: head/contrib/zlib/zconf.h ============================================================================== --- vendor/zlib/dist/zconf.h Wed Jan 4 08:12:31 2017 (r311267) +++ head/contrib/zlib/zconf.h Wed Jan 4 09:30:47 2017 (r311275) @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ +/* @(#) $FreeBSD$ */ #ifndef ZCONF_H #define ZCONF_H @@ -408,7 +408,7 @@ typedef uLong FAR uLongf; typedef unsigned long z_crc_t; #endif -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +#if 0 /* was set to #if 0 by ./configure */ # define Z_HAVE_UNISTD_H #endif @@ -477,6 +477,14 @@ typedef uLong FAR uLongf; # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif +/* + * This is hard-configured for FreeBSD. + */ +#define z_off_t off_t +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif + #ifndef z_off_t # define z_off_t long #endif Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Wed Jan 4 09:06:49 2017 (r311274) +++ head/lib/libstand/Makefile Wed Jan 4 09:30:47 2017 (r311275) @@ -109,9 +109,9 @@ libstand_bzlib_private.h: bzlib_private. sed -e 's||"stand.h"|' \ ${.ALLSRC} > ${.TARGET} -# decompression functionality from libz -.PATH: ${LIBSTAND_SRC}/../libz -CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../libz +# decompression functionality from zlib +.PATH: ${LIBSTAND_SRC}/../../contrib/zlib +CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../../contrib/zlib SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c Modified: head/lib/libz/FREEBSD-upgrade ============================================================================== --- head/lib/libz/FREEBSD-upgrade Wed Jan 4 09:06:49 2017 (r311274) +++ head/lib/libz/FREEBSD-upgrade Wed Jan 4 09:30:47 2017 (r311275) @@ -1,44 +1,16 @@ $FreeBSD$ -ZLib 1.2.2 - -Original distribution from http://www.gzip.org/zlib/ - -Vendor files removed from distribution before import: - INDEX configure qnx/ - Makefile contrib/ win32/ - Makefile.in msdos/ zconf.in.h - amiga/ old/ - as400/ projects/ - -Vendor files imported: - ChangeLog example.c minigzip.c - FAQ gzio.c trees.c - README infback.c trees.h - adler32.c inffast.c uncompr.c - algorithm.txt inffast.h zconf.h - compress.c inffixed.h zlib.3 - crc32.c inflate.c zlib.h - crc32.h inflate.h zutil.c - deflate.c inftrees.c zutil.h - deflate.h inftrees.h - -As of April, 2005, only the following three vendor files -had non-trivial local changes: - gzio.c minigzip.c zconf.h - -Added files (not from vendor): - Makefile zopen.c FREEBSD-upgrade +Original distribution from http://zlib.net/. Currently, only trivial +changes were made to support build of libstand and to suppress certain +compiler warnings, we upstream our local changes whenever they would +benefit other consumers. To Update: 1) Unpack vendor sources into a clean directory. - 2) Delete unnecessary files. - 3) Import onto the vendor branch. The 1.2.2 import was done like this: - cvs -d import -ko -m "ZLib 1.2.2" src/lib/libz ZLIB v1_2_2 - 4) In a clean directory, check out a fresh copy of HEAD, - merging in vendor changes since the last import. - cvs -d co -jZLIB:yesterday -jZLIB src/lib/libz - 5) Resolve any conflicts and commit them. - 6) Update this file with any changes to the file list or update procedure. + 2) Import onto the vendor area. + 3) Merge the vendor tree to contrib/zlib, which contains a stripped down + version of upstream source, resolve any conflicts. + 4) Double check zconf.h, zlib.pc, and Symbol.map to make sure that we + have the required changes. Test universe and commit them. -kientzle@FreeBSD.org +delphij@FreeBSD.org Modified: head/lib/libz/Makefile ============================================================================== --- head/lib/libz/Makefile Wed Jan 4 09:06:49 2017 (r311274) +++ head/lib/libz/Makefile Wed Jan 4 09:30:47 2017 (r311275) @@ -8,6 +8,10 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 6 MAN= zlib.3 zopen.3 +ZLIBSRC= ${SRCTOP}/contrib/zlib + +.PATH: ${ZLIBSRC} + #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 #CFLAGS=-g -DDEBUG #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ @@ -37,14 +41,14 @@ SRCS+= zopen.c SRCS+= zutil.c #.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*} -#.PATH: ${.CURDIR}/contrib/asm686 +#.PATH: ${ZLIBSRC}/contrib/asm686 #SRCS+= match.S #CFLAGS+= -DASMV -DNO_UNDERLINE #ACFLAGS+= -Wa,--noexecstack #.endif #.if ${MACHINE_ARCH} == "amd64" -#.PATH: ${.CURDIR}/contrib/gcc_gvmat64 +#.PATH: ${ZLIBSRC}/contrib/gcc_gvmat64 #SRCS+= gvmat64.S #CFLAGS+= -DASMV -DNO_UNDERLINE #ACFLAGS+= -Wa,--noexecstack @@ -56,7 +60,7 @@ CFLAGS+= -DSYMBOL_VERSIONING INCS= zconf.h zlib.h -.PATH: ${.CURDIR}/test +.PATH: ${ZLIBSRC}/test minigzip: all minigzip.o $(CC) -o minigzip minigzip.o -L. -lz Modified: head/usr.bin/minigzip/Makefile ============================================================================== --- head/usr.bin/minigzip/Makefile Wed Jan 4 09:06:49 2017 (r311274) +++ head/usr.bin/minigzip/Makefile Wed Jan 4 09:30:47 2017 (r311275) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../lib/libz/test +SRCDIR= ${.CURDIR}/../../contrib/zlib/test .PATH: ${SRCDIR} PROG= minigzip From owner-svn-src-head@freebsd.org Wed Jan 4 10:08:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48485C9C36F; Wed, 4 Jan 2017 10:08:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17D151880; Wed, 4 Jan 2017 10:08:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04A8IrX019707; Wed, 4 Jan 2017 10:08:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04A8IpU019706; Wed, 4 Jan 2017 10:08:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701041008.v04A8IpU019706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 10:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311282 - head/contrib/bsnmp/snmp_mibII X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 10:08:19 -0000 Author: ngie Date: Wed Jan 4 10:08:18 2017 New Revision: 311282 URL: https://svnweb.freebsd.org/changeset/base/311282 Log: snmp_mibII(3) requires net/if.h and net/if_mib.h Document that requirement MFC after: 1 week Modified: head/contrib/bsnmp/snmp_mibII/snmp_mibII.3 Modified: head/contrib/bsnmp/snmp_mibII/snmp_mibII.3 ============================================================================== --- head/contrib/bsnmp/snmp_mibII/snmp_mibII.3 Wed Jan 4 10:03:25 2017 (r311281) +++ head/contrib/bsnmp/snmp_mibII/snmp_mibII.3 Wed Jan 4 10:08:18 2017 (r311282) @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/snmp_mibII/snmp_mibII.3,v 1.10 2005/10/04 08:46:52 brandt_h Exp $ .\" -.Dd October 4, 2005 +.Dd January 4, 2017 .Dt SNMP_MIBII 3 .Os .Sh NAME @@ -63,6 +63,8 @@ .Sh LIBRARY .Pq begemotSnmpdModulePath."mibII" = "@MODPATH@snmp_mibII.so" .Sh SYNOPSIS +.In net/if.h +.In net/if_mib.h .In bsnmp/snmpmod.h .In bsnmp/snmp_mibII.h .Ft typedef void From owner-svn-src-head@freebsd.org Wed Jan 4 12:50:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 874C1C9CE3A; Wed, 4 Jan 2017 12:50:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56C9E1BB6; Wed, 4 Jan 2017 12:50:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04CoiaS085211; Wed, 4 Jan 2017 12:50:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04Coits085210; Wed, 4 Jan 2017 12:50:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701041250.v04Coits085210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 4 Jan 2017 12:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311283 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 12:50:45 -0000 Author: trasz Date: Wed Jan 4 12:50:44 2017 New Revision: 311283 URL: https://svnweb.freebsd.org/changeset/base/311283 Log: Don't release the cfiscsi session refcount too early. It wasn't observed to fix any actual error, but it's the right thing to do from the correctness point of view. Tested by: Eugene M. Zheganin MFC after: 1 month Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jan 4 10:08:18 2017 (r311282) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jan 4 12:50:44 2017 (r311283) @@ -2963,7 +2963,6 @@ cfiscsi_done(union ctl_io *io) request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; cs = PDU_SESSION(request); - refcount_release(&cs->cs_outstanding_ctl_pdus); switch (request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) { case ISCSI_BHS_OPCODE_SCSI_COMMAND: @@ -2976,4 +2975,6 @@ cfiscsi_done(union ctl_io *io) panic("cfiscsi_done called with wrong opcode 0x%x", request->ip_bhs->bhs_opcode); } + + refcount_release(&cs->cs_outstanding_ctl_pdus); } From owner-svn-src-head@freebsd.org Wed Jan 4 14:43:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FE66C9E61F; Wed, 4 Jan 2017 14:43:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D94DC16A7; Wed, 4 Jan 2017 14:43:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04Ehwn0034434; Wed, 4 Jan 2017 14:43:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04EhwMQ034433; Wed, 4 Jan 2017 14:43:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701041443.v04EhwMQ034433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 4 Jan 2017 14:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311284 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 14:43:59 -0000 Author: trasz Date: Wed Jan 4 14:43:57 2017 New Revision: 311284 URL: https://svnweb.freebsd.org/changeset/base/311284 Log: Fix bug that would result in a kernel crash in some cases involving a symlink and an autofs mount request. The crash was caused by namei() calling bcopy() with a negative length, caused by numeric underflow: in lookup(), in the relookup path, the ni_pathlen was decremented too many times. The bug was introduced in r296715. Big thanks to Alex Deiter for his help with debugging this. Reviewed by: kib@ Tested by: Alex Deiter MFC after: 1 month Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Wed Jan 4 12:50:44 2017 (r311283) +++ head/sys/kern/vfs_lookup.c Wed Jan 4 14:43:57 2017 (r311284) @@ -621,11 +621,13 @@ needs_exclusive_leaf(struct mount *mp, i int lookup(struct nameidata *ndp) { - char *cp; /* pointer into pathname argument */ + char *cp; /* pointer into pathname argument */ + char *prev_ni_next; /* saved ndp->ni_next */ struct vnode *dp = NULL; /* the directory we are searching */ struct vnode *tdp; /* saved dp */ struct mount *mp; /* mount table entry */ struct prison *pr; + size_t prev_ni_pathlen; /* saved ndp->ni_pathlen */ int docache; /* == 0 do not cache last component */ int wantparent; /* 1 => wantparent or lockparent flag */ int rdonly; /* lookup read-only flag bit */ @@ -687,7 +689,11 @@ dirloop: printf("{%s}: ", cnp->cn_nameptr); *cp = c; } #endif + prev_ni_pathlen = ndp->ni_pathlen; ndp->ni_pathlen -= cnp->cn_namelen; + KASSERT(ndp->ni_pathlen <= PATH_MAX, + ("%s: ni_pathlen underflow to %zd\n", __func__, ndp->ni_pathlen)); + prev_ni_next = ndp->ni_next; ndp->ni_next = cp; /* @@ -1008,6 +1014,8 @@ nextname: ("lookup: invalid path state.")); if (relookup) { relookup = 0; + ndp->ni_pathlen = prev_ni_pathlen; + ndp->ni_next = prev_ni_next; if (ndp->ni_dvp != dp) vput(ndp->ni_dvp); else From owner-svn-src-head@freebsd.org Wed Jan 4 15:38:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C774C9F7ED; Wed, 4 Jan 2017 15:38:56 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 442C71D63; Wed, 4 Jan 2017 15:38:56 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-io0-x22f.google.com with SMTP id n85so222807762ioi.2; Wed, 04 Jan 2017 07:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LVlakb4250jU8kovhstT2ZoNjiVgXJEx2/bV/tSVAdc=; b=mfcxGRPvYW5gPGySjGfzPhG4Ce5oohW0D8T2IOMX3TW5lwJ6u8W3UfoVeqXLS5yO0o kv6xgYmMCVuRQbLevLWp6fGs2fbj7sHq3BtMhAhUsm2A4K0fzPdhETq76Az9w7aBnZuH nSRq2Nc43lTrfq3WKfwqfI2ihqwjvQX52X8pWEoESYhcv0Ge75EELP2Jz/R14iLubvwz j4H0HIe5cywrtgnxb43XL0vFgNN6gVZGFz7KWrI7l6wYgcf0FRUdXxls5pKHB4GtuXCd dZz4fonyyTL17svSUQw1P2AqmLqphrKkF/I/PtjZHpx886Y/bwbQXiKx+mgIDT2TcW68 yRgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LVlakb4250jU8kovhstT2ZoNjiVgXJEx2/bV/tSVAdc=; b=MSwagldpGw0oQlyAOTbjUveiNVTAid19MjWJvQ1yhw4En4NS2ajKVOZS5agay+RnRV ZbiTQ+MdoLQgOncAq6cP7P7JCmiE4s2D7tUZiNI8Ff0zngtMrLCuzhh8OEzxmDyHjWDo WMDL3/kLxmFtwdPYovwoW64Zvbb5jZHTdQoLQdZHArXsFOpXXidUulQ2AxmPrjIMUXpf yFFqnFQqN29jKWwHYDXlX39zSNBvfrlKCjjEY8108iOokAEbIMTP3Y8/f29869AaVKnL e/fbzlGXCQwNhcZjTvT2MgVVcxW8v/7ID17LNnZjgU98Pq2GQSeGD9ebfkmNXLngKyFN WlwA== X-Gm-Message-State: AIkVDXIsWlBpMS6TsnPWgI/daCe1To/O01zVZjbvfgZ1MJOMDu5lckM3I4XwqSncOXpBZoS4yl7EmbqFtAL3iQ== X-Received: by 10.107.26.205 with SMTP id a196mr2979792ioa.214.1483544335375; Wed, 04 Jan 2017 07:38:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.144.84 with HTTP; Wed, 4 Jan 2017 07:38:55 -0800 (PST) In-Reply-To: <201701041250.v04Coits085210@repo.freebsd.org> References: <201701041250.v04Coits085210@repo.freebsd.org> From: Ryan Stone Date: Wed, 4 Jan 2017 10:38:55 -0500 Message-ID: Subject: Re: svn commit: r311283 - head/sys/cam/ctl To: Edward Tomasz Napierala Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 15:38:56 -0000 On Wed, Jan 4, 2017 at 7:50 AM, Edward Tomasz Napierala wrote: > + refcount_release(&cs->cs_outstanding_ctl_pdus); > Shouldn't the return value of refcount_release() be checked? From owner-svn-src-head@freebsd.org Wed Jan 4 16:09:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04E0DC9E46D; Wed, 4 Jan 2017 16:09:10 +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 C155C1289; Wed, 4 Jan 2017 16:09:09 +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 v04G99Xc068695; Wed, 4 Jan 2017 16:09:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04G98e7068687; Wed, 4 Jan 2017 16:09:08 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701041609.v04G98e7068687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Jan 2017 16:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311285 - in head: contrib/zlib contrib/zlib/contrib contrib/zlib/test lib/libz X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 16:09:10 -0000 Author: delphij Date: Wed Jan 4 16:09:08 2017 New Revision: 311285 URL: https://svnweb.freebsd.org/changeset/base/311285 Log: MFV r311279: zlib 1.2.10. MFC after: 1 month Modified: head/contrib/zlib/ChangeLog head/contrib/zlib/README head/contrib/zlib/adler32.c head/contrib/zlib/compress.c head/contrib/zlib/contrib/README.contrib head/contrib/zlib/crc32.c head/contrib/zlib/deflate.c head/contrib/zlib/deflate.h head/contrib/zlib/gzguts.h head/contrib/zlib/gzlib.c head/contrib/zlib/gzread.c head/contrib/zlib/gzwrite.c head/contrib/zlib/infback.c head/contrib/zlib/inffast.c head/contrib/zlib/inflate.c head/contrib/zlib/inflate.h head/contrib/zlib/inftrees.c head/contrib/zlib/test/example.c head/contrib/zlib/test/infcover.c head/contrib/zlib/test/minigzip.c head/contrib/zlib/trees.c head/contrib/zlib/uncompr.c head/contrib/zlib/zconf.h head/contrib/zlib/zconf.h.in head/contrib/zlib/zlib.3 head/contrib/zlib/zlib.h head/contrib/zlib/zlib.map head/contrib/zlib/zutil.c head/contrib/zlib/zutil.h head/lib/libz/Symbol.map head/lib/libz/Versions.def head/lib/libz/zlib.pc Directory Properties: head/contrib/zlib/ (props changed) Modified: head/contrib/zlib/ChangeLog ============================================================================== --- head/contrib/zlib/ChangeLog Wed Jan 4 14:43:57 2017 (r311284) +++ head/contrib/zlib/ChangeLog Wed Jan 4 16:09:08 2017 (r311285) @@ -1,10 +1,49 @@ ChangeLog file for zlib +Changes in 1.2.10 (2 Jan 2017) +- Avoid warnings on snprintf() return value +- Fix bug in deflate_stored() for zero-length input +- Fix bug in gzwrite.c that produced corrupt gzip files +- Remove files to be installed before copying them in Makefile.in +- Add warnings when compiling with assembler code + +Changes in 1.2.9 (31 Dec 2016) +- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] +- Improve contrib/blast to return unused bytes +- Assure that gzoffset() is correct when appending +- Improve compress() and uncompress() to support large lengths +- Fix bug in test/example.c where error code not saved +- Remedy Coverity warning [Randers-Pehrson] +- Improve speed of gzprintf() in transparent mode +- Fix inflateInit2() bug when windowBits is 16 or 32 +- Change DEBUG macro to ZLIB_DEBUG +- Avoid uninitialized access by gzclose_w() +- Allow building zlib outside of the source directory +- Fix bug that accepted invalid zlib header when windowBits is zero +- Fix gzseek() problem on MinGW due to buggy _lseeki64 there +- Loop on write() calls in gzwrite.c in case of non-blocking I/O +- Add --warn (-w) option to ./configure for more compiler warnings +- Reject a window size of 256 bytes if not using the zlib wrapper +- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE +- Add --debug (-d) option to ./configure to define ZLIB_DEBUG +- Fix bugs in creating a very large gzip header +- Add uncompress2() function, which returns the input size used +- Assure that deflateParams() will not switch functions mid-block +- Dramatically speed up deflation for level 0 (storing) +- Add gzfread(), duplicating the interface of fread() +- Add gzfwrite(), duplicating the interface of fwrite() +- Add deflateGetDictionary() function +- Use snprintf() for later versions of Microsoft C +- Fix *Init macros to use z_ prefix when requested +- Replace as400 with os400 for OS/400 support [Monnerat] +- Add crc32_z() and adler32_z() functions with size_t lengths +- Update Visual Studio project files [AraHaan] + Changes in 1.2.8 (28 Apr 2013) - Update contrib/minizip/iowin32.c for Windows RT [Vollant] - Do not force Z_CONST for C++ -- Clean up contrib/vstudio [Ro§] +- Clean up contrib/vstudio [Roß] - Correct spelling error in zlib.h - Fix mixed line endings in contrib/vstudio @@ -34,7 +73,7 @@ Changes in 1.2.7.1 (24 Mar 2013) - Clean up the usage of z_const and respect const usage within zlib - Clean up examples/gzlog.[ch] comparisons of different types - Avoid shift equal to bits in type (caused endless loop) -- Fix unintialized value bug in gzputc() introduced by const patches +- Fix uninitialized value bug in gzputc() introduced by const patches - Fix memory allocation error in examples/zran.c [Nor] - Fix bug where gzopen(), gzclose() would write an empty file - Fix bug in gzclose() when gzwrite() runs out of memory @@ -194,7 +233,7 @@ Changes in 1.2.5.2 (17 Dec 2011) - Add a transparent write mode to gzopen() when 'T' is in the mode - Update python link in zlib man page - Get inffixed.h and MAKEFIXED result to match -- Add a ./config --solo option to make zlib subset with no libary use +- Add a ./config --solo option to make zlib subset with no library use - Add undocumented inflateResetKeep() function for CAB file decoding - Add --cover option to ./configure for gcc coverage testing - Add #define ZLIB_CONST option to use const in the z_stream interface @@ -564,7 +603,7 @@ Changes in 1.2.3.1 (16 August 2006) - Update make_vms.com [Zinser] - Use -fPIC for shared build in configure [Teredesai, Nicholson] - Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] -- Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck] - Add some FAQ entries about the contrib directory - Update the MVS question in the FAQ - Avoid extraneous reads after EOF in gzio.c [Brown] @@ -1178,7 +1217,7 @@ Changes in 1.0.6 (19 Jan 1998) 386 asm code replacing longest_match(). contrib/iostream/ by Kevin Ruland A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset + contrib/iostream2/ by Tyge Løvset Another C++ I/O streams interface contrib/untgz/ by "Pedro A. Aranda Guti\irrez" A very simple tar.gz file extractor using zlib @@ -1267,7 +1306,7 @@ Changes in 1.0.1 (20 May 96) [1.0 skippe - fix array overlay in deflate.c which sometimes caused bad compressed data - fix inflate bug with empty stored block - fix MSDOS medium model which was broken in 0.99 -- fix deflateParams() which could generated bad compressed data. +- fix deflateParams() which could generate bad compressed data. - Bytef is define'd instead of typedef'ed (work around Borland bug) - added an INDEX file - new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), Modified: head/contrib/zlib/README ============================================================================== --- head/contrib/zlib/README Wed Jan 4 14:43:57 2017 (r311284) +++ head/contrib/zlib/README Wed Jan 4 16:09:08 2017 (r311285) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.8 is a general purpose data compression library. All the code is +zlib 1.2.10 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -31,7 +31,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.8 are documented in the file ChangeLog. +The changes made in version 1.2.10 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . @@ -84,7 +84,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2013 Jean-loup Gailly and Mark Adler + (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages Modified: head/contrib/zlib/adler32.c ============================================================================== --- head/contrib/zlib/adler32.c Wed Jan 4 14:43:57 2017 (r311284) +++ head/contrib/zlib/adler32.c Wed Jan 4 16:09:08 2017 (r311285) @@ -1,5 +1,5 @@ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2011 Mark Adler + * Copyright (C) 1995-2011, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -7,11 +7,9 @@ #include "zutil.h" -#define local static - local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); -#define BASE 65521 /* largest prime smaller than 65536 */ +#define BASE 65521U /* largest prime smaller than 65536 */ #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ @@ -62,10 +60,10 @@ local uLong adler32_combine_ OF((uLong a #endif /* ========================================================================= */ -uLong ZEXPORT adler32(adler, buf, len) +uLong ZEXPORT adler32_z(adler, buf, len) uLong adler; const Bytef *buf; - uInt len; + z_size_t len; { unsigned long sum2; unsigned n; @@ -133,6 +131,15 @@ uLong ZEXPORT adler32(adler, buf, len) } /* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + return adler32_z(adler, buf, len); +} + +/* ========================================================================= */ local uLong adler32_combine_(adler1, adler2, len2) uLong adler1; uLong adler2; @@ -156,7 +163,7 @@ local uLong adler32_combine_(adler1, adl sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; if (sum1 >= BASE) sum1 -= BASE; if (sum1 >= BASE) sum1 -= BASE; - if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1); if (sum2 >= BASE) sum2 -= BASE; return sum1 | (sum2 << 16); } Modified: head/contrib/zlib/compress.c ============================================================================== --- head/contrib/zlib/compress.c Wed Jan 4 14:43:57 2017 (r311284) +++ head/contrib/zlib/compress.c Wed Jan 4 16:09:08 2017 (r311285) @@ -1,5 +1,5 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -28,16 +28,11 @@ int ZEXPORT compress2 (dest, destLen, so { z_stream stream; int err; + const uInt max = (uInt)-1; + uLong left; - stream.next_in = (z_const Bytef *)source; - stream.avail_in = (uInt)sourceLen; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; -#endif - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + left = *destLen; + *destLen = 0; stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; @@ -46,15 +41,26 @@ int ZEXPORT compress2 (dest, destLen, so err = deflateInit(&stream, level); if (err != Z_OK) return err; - err = deflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - deflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; - } - *destLen = stream.total_out; + stream.next_out = dest; + stream.avail_out = 0; + stream.next_in = (z_const Bytef *)source; + stream.avail_in = 0; + + do { + if (stream.avail_out == 0) { + stream.avail_out = left > (uLong)max ? max : (uInt)left; + left -= stream.avail_out; + } + if (stream.avail_in == 0) { + stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen; + sourceLen -= stream.avail_in; + } + err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); + } while (err == Z_OK); - err = deflateEnd(&stream); - return err; + *destLen = stream.total_out; + deflateEnd(&stream); + return err == Z_STREAM_END ? Z_OK : err; } /* =========================================================================== Modified: head/contrib/zlib/contrib/README.contrib ============================================================================== --- head/contrib/zlib/contrib/README.contrib Wed Jan 4 14:43:57 2017 (r311284) +++ head/contrib/zlib/contrib/README.contrib Wed Jan 4 16:09:08 2017 (r311285) @@ -38,7 +38,7 @@ inflate86/ by Chris Anderson A C++ I/O streams interface to the zlib gz* functions -iostream2/ by Tyge Løvset +iostream2/ by Tyge Løvset Another C++ I/O streams interface iostream3/ by Ludwig Schwardt @@ -58,7 +58,7 @@ masmx86/ by Gilles Vollant Mini zip and unzip based on zlib Includes Zip64 support by Mathias Svensson - See http://www.winimage.com/zLibDll/unzip.html + See http://www.winimage.com/zLibDll/minizip.html pascal/ by Bob Dellaca et al. Support for Pascal Modified: head/contrib/zlib/crc32.c ============================================================================== --- head/contrib/zlib/crc32.c Wed Jan 4 14:43:57 2017 (r311284) +++ head/contrib/zlib/crc32.c Wed Jan 4 16:09:08 2017 (r311285) @@ -1,5 +1,5 @@ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler + * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster @@ -30,17 +30,15 @@ #include "zutil.h" /* for STDC and FAR definitions */ -#define local static - /* Definitions for doing the crc four data bytes at a time. */ #if !defined(NOBYFOUR) && defined(Z_U4) # define BYFOUR #endif #ifdef BYFOUR local unsigned long crc32_little OF((unsigned long, - const unsigned char FAR *, unsigned)); + const unsigned char FAR *, z_size_t)); local unsigned long crc32_big OF((unsigned long, - const unsigned char FAR *, unsigned)); + const unsigned char FAR *, z_size_t)); # define TBLS 8 #else # define TBLS 1 @@ -201,10 +199,10 @@ const z_crc_t FAR * ZEXPORT get_crc_tabl #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 /* ========================================================================= */ -unsigned long ZEXPORT crc32(crc, buf, len) +unsigned long ZEXPORT crc32_z(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - uInt len; + z_size_t len; { if (buf == Z_NULL) return 0UL; @@ -235,8 +233,29 @@ unsigned long ZEXPORT crc32(crc, buf, le return crc ^ 0xffffffffUL; } +/* ========================================================================= */ +unsigned long ZEXPORT crc32(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + uInt len; +{ + return crc32_z(crc, buf, len); +} + #ifdef BYFOUR +/* + This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit + integer pointer type. This violates the strict aliasing rule, where a + compiler can assume, for optimization purposes, that two pointers to + fundamentally different types won't ever point to the same memory. This can + manifest as a problem only if one of the pointers is written to. This code + only reads from those pointers. So long as this code remains isolated in + this compilation unit, there won't be a problem. For this reason, this code + should not be copied and pasted into a compilation unit in which other code + writes to the buffer that is passed to these routines. + */ + /* ========================================================================= */ #define DOLIT4 c ^= *buf4++; \ c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ @@ -247,7 +266,7 @@ unsigned long ZEXPORT crc32(crc, buf, le local unsigned long crc32_little(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + z_size_t len; { register z_crc_t c; register const z_crc_t FAR *buf4; @@ -278,7 +297,7 @@ local unsigned long crc32_little(crc, bu } /* ========================================================================= */ -#define DOBIG4 c ^= *++buf4; \ +#define DOBIG4 c ^= *buf4++; \ c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 @@ -287,7 +306,7 @@ local unsigned long crc32_little(crc, bu local unsigned long crc32_big(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + z_size_t len; { register z_crc_t c; register const z_crc_t FAR *buf4; @@ -300,7 +319,6 @@ local unsigned long crc32_big(crc, buf, } buf4 = (const z_crc_t FAR *)(const void FAR *)buf; - buf4--; while (len >= 32) { DOBIG32; len -= 32; @@ -309,7 +327,6 @@ local unsigned long crc32_big(crc, buf, DOBIG4; len -= 4; } - buf4++; buf = (const unsigned char FAR *)buf4; if (len) do { Modified: head/contrib/zlib/deflate.c ============================================================================== --- head/contrib/zlib/deflate.c Wed Jan 4 14:43:57 2017 (r311284) +++ head/contrib/zlib/deflate.c Wed Jan 4 16:09:08 2017 (r311285) @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.10 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -73,6 +73,8 @@ typedef enum { typedef block_state (*compress_func) OF((deflate_state *s, int flush)); /* Compression function. Returns the block state after the call. */ +local int deflateStateCheck OF((z_streamp strm)); +local void slide_hash OF((deflate_state *s)); local void fill_window OF((deflate_state *s)); local block_state deflate_stored OF((deflate_state *s, int flush)); local block_state deflate_fast OF((deflate_state *s, int flush)); @@ -84,15 +86,16 @@ local block_state deflate_huff OF((def local void lm_init OF((deflate_state *s)); local void putShortMSB OF((deflate_state *s, uInt b)); local void flush_pending OF((z_streamp strm)); -local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); +local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); #ifdef ASMV +# pragma message("Assembler code may have bugs -- use at your own risk") void match_init OF((void)); /* asm code initialization */ uInt longest_match OF((deflate_state *s, IPos cur_match)); #else local uInt longest_match OF((deflate_state *s, IPos cur_match)); #endif -#ifdef DEBUG +#ifdef ZLIB_DEBUG local void check_match OF((deflate_state *s, IPos start, IPos match, int length)); #endif @@ -148,21 +151,14 @@ local const config configuration_table[1 * meaning. */ -#define EQUAL 0 -/* result of memcmp for equal strings */ - -#ifndef NO_DUMMY_DECL -struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ -#endif - /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ -#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0)) +#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) /* =========================================================================== * Update a hash value with the given input byte - * IN assertion: all calls to to UPDATE_HASH are made with consecutive - * input characters, so that a running hash key can be computed from the - * previous key instead of complete recalculation each time. + * IN assertion: all calls to UPDATE_HASH are made with consecutive input + * characters, so that a running hash key can be computed from the previous + * key instead of complete recalculation each time. */ #define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) @@ -173,9 +169,9 @@ struct static_tree_desc_s {int dummy;}; * the previous length of the hash chain. * If this file is compiled with -DFASTEST, the compression level is forced * to 1, and no hash chains are maintained. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of str are valid - * (except for the last MIN_MATCH-1 bytes of the input file). + * IN assertion: all calls to INSERT_STRING are made with consecutive input + * characters and the first MIN_MATCH bytes of str are valid (except for + * the last MIN_MATCH-1 bytes of the input file). */ #ifdef FASTEST #define INSERT_STRING(s, str, match_head) \ @@ -197,6 +193,37 @@ struct static_tree_desc_s {int dummy;}; s->head[s->hash_size-1] = NIL; \ zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); +/* =========================================================================== + * Slide the hash table when sliding the window down (could be avoided with 32 + * bit values at the expense of memory usage). We slide even when level == 0 to + * keep the hash table consistent if we switch back to level > 0 later. + */ +local void slide_hash(s) + deflate_state *s; +{ + unsigned n, m; + Posf *p; + uInt wsize = s->w_size; + + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + } while (--n); + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif +} + /* ========================================================================= */ int ZEXPORT deflateInit_(strm, level, version, stream_size) z_streamp strm; @@ -270,7 +297,7 @@ int ZEXPORT deflateInit2_(strm, level, m #endif if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { + strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) { return Z_STREAM_ERROR; } if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ @@ -278,14 +305,15 @@ int ZEXPORT deflateInit2_(strm, level, m if (s == Z_NULL) return Z_MEM_ERROR; strm->state = (struct internal_state FAR *)s; s->strm = strm; + s->status = INIT_STATE; /* to pass state test in deflateReset() */ s->wrap = wrap; s->gzhead = Z_NULL; - s->w_bits = windowBits; + s->w_bits = (uInt)windowBits; s->w_size = 1 << s->w_bits; s->w_mask = s->w_size - 1; - s->hash_bits = memLevel + 7; + s->hash_bits = (uInt)memLevel + 7; s->hash_size = 1 << s->hash_bits; s->hash_mask = s->hash_size - 1; s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); @@ -319,6 +347,31 @@ int ZEXPORT deflateInit2_(strm, level, m return deflateReset(strm); } +/* ========================================================================= + * Check for a valid deflate stream state. Return 0 if ok, 1 if not. + */ +local int deflateStateCheck (strm) + z_streamp strm; +{ + deflate_state *s; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + s = strm->state; + if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE && +#ifdef GZIP + s->status != GZIP_STATE && +#endif + s->status != EXTRA_STATE && + s->status != NAME_STATE && + s->status != COMMENT_STATE && + s->status != HCRC_STATE && + s->status != BUSY_STATE && + s->status != FINISH_STATE)) + return 1; + return 0; +} + /* ========================================================================= */ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) z_streamp strm; @@ -331,7 +384,7 @@ int ZEXPORT deflateSetDictionary (strm, unsigned avail; z_const unsigned char *next; - if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) + if (deflateStateCheck(strm) || dictionary == Z_NULL) return Z_STREAM_ERROR; s = strm->state; wrap = s->wrap; @@ -389,13 +442,34 @@ int ZEXPORT deflateSetDictionary (strm, } /* ========================================================================= */ +int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) + z_streamp strm; + Bytef *dictionary; + uInt *dictLength; +{ + deflate_state *s; + uInt len; + + if (deflateStateCheck(strm)) + return Z_STREAM_ERROR; + s = strm->state; + len = s->strstart + s->lookahead; + if (len > s->w_size) + len = s->w_size; + if (dictionary != Z_NULL && len) + zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len); + if (dictLength != Z_NULL) + *dictLength = len; + return Z_OK; +} + +/* ========================================================================= */ int ZEXPORT deflateResetKeep (strm) z_streamp strm; { deflate_state *s; - if (strm == Z_NULL || strm->state == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) { + if (deflateStateCheck(strm)) { return Z_STREAM_ERROR; } @@ -410,7 +484,11 @@ int ZEXPORT deflateResetKeep (strm) if (s->wrap < 0) { s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ } - s->status = s->wrap ? INIT_STATE : BUSY_STATE; + s->status = +#ifdef GZIP + s->wrap == 2 ? GZIP_STATE : +#endif + s->wrap ? INIT_STATE : BUSY_STATE; strm->adler = #ifdef GZIP s->wrap == 2 ? crc32(0L, Z_NULL, 0) : @@ -440,8 +518,8 @@ int ZEXPORT deflateSetHeader (strm, head z_streamp strm; gz_headerp head; { - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - if (strm->state->wrap != 2) return Z_STREAM_ERROR; + if (deflateStateCheck(strm) || strm->state->wrap != 2) + return Z_STREAM_ERROR; strm->state->gzhead = head; return Z_OK; } @@ -452,7 +530,7 @@ int ZEXPORT deflatePending (strm, pendin int *bits; z_streamp strm; { - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; if (pending != Z_NULL) *pending = strm->state->pending; if (bits != Z_NULL) @@ -469,7 +547,7 @@ int ZEXPORT deflatePrime (strm, bits, va deflate_state *s; int put; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3)) return Z_BUF_ERROR; @@ -494,9 +572,8 @@ int ZEXPORT deflateParams(strm, level, s { deflate_state *s; compress_func func; - int err = Z_OK; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; #ifdef FASTEST @@ -509,14 +586,22 @@ int ZEXPORT deflateParams(strm, level, s } func = configuration_table[s->level].func; - if ((strategy != s->strategy || func != configuration_table[level].func) && - strm->total_in != 0) { + if ((strategy != s->strategy || func != configuration_table[level].func)) { /* Flush the last buffer: */ - err = deflate(strm, Z_BLOCK); - if (err == Z_BUF_ERROR && s->pending == 0) - err = Z_OK; + int err = deflate(strm, Z_BLOCK); + if (err == Z_STREAM_ERROR) + return err; + if (strm->avail_out == 0) + return Z_BUF_ERROR; } if (s->level != level) { + if (s->level == 0 && s->matches != 0) { + if (s->matches == 1) + slide_hash(s); + else + CLEAR_HASH(s); + s->matches = 0; + } s->level = level; s->max_lazy_match = configuration_table[level].max_lazy; s->good_match = configuration_table[level].good_length; @@ -524,7 +609,7 @@ int ZEXPORT deflateParams(strm, level, s s->max_chain_length = configuration_table[level].max_chain; } s->strategy = strategy; - return err; + return Z_OK; } /* ========================================================================= */ @@ -537,12 +622,12 @@ int ZEXPORT deflateTune(strm, good_lengt { deflate_state *s; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; - s->good_match = good_length; - s->max_lazy_match = max_lazy; + s->good_match = (uInt)good_length; + s->max_lazy_match = (uInt)max_lazy; s->nice_match = nice_length; - s->max_chain_length = max_chain; + s->max_chain_length = (uInt)max_chain; return Z_OK; } @@ -569,14 +654,13 @@ uLong ZEXPORT deflateBound(strm, sourceL { deflate_state *s; uLong complen, wraplen; - Bytef *str; /* conservative upper bound for compressed data */ complen = sourceLen + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; /* if can't get parameters, return conservative bound plus zlib wrapper */ - if (strm == Z_NULL || strm->state == Z_NULL) + if (deflateStateCheck(strm)) return complen + 6; /* compute wrapper length */ @@ -588,9 +672,11 @@ uLong ZEXPORT deflateBound(strm, sourceL case 1: /* zlib wrapper */ wraplen = 6 + (s->strstart ? 4 : 0); break; +#ifdef GZIP case 2: /* gzip wrapper */ wraplen = 18; if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ + Bytef *str; if (s->gzhead->extra != Z_NULL) wraplen += 2 + s->gzhead->extra_len; str = s->gzhead->name; @@ -607,6 +693,7 @@ uLong ZEXPORT deflateBound(strm, sourceL wraplen += 2; } break; +#endif default: /* for compiler happiness */ wraplen = 6; } @@ -634,10 +721,10 @@ local void putShortMSB (s, b) } /* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->next_out buffer and copying into it. - * (See also read_buf()). + * Flush as much pending output as possible. All deflate() output, except for + * some deflate_stored() output, goes through this function so some + * applications may wish to modify it to avoid allocating a large + * strm->next_out buffer and copying into it. (See also read_buf()). */ local void flush_pending(strm) z_streamp strm; @@ -654,13 +741,23 @@ local void flush_pending(strm) strm->next_out += len; s->pending_out += len; strm->total_out += len; - strm->avail_out -= len; - s->pending -= len; + strm->avail_out -= len; + s->pending -= len; if (s->pending == 0) { s->pending_out = s->pending_buf; } } +/* =========================================================================== + * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. + */ +#define HCRC_UPDATE(beg) \ + do { \ + if (s->gzhead->hcrc && s->pending > (beg)) \ + strm->adler = crc32(strm->adler, s->pending_buf + (beg), \ + s->pending - (beg)); \ + } while (0) + /* ========================================================================= */ int ZEXPORT deflate (strm, flush) z_streamp strm; @@ -669,230 +766,229 @@ int ZEXPORT deflate (strm, flush) int old_flush; /* value of flush param for previous deflate call */ deflate_state *s; - if (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_BLOCK || flush < 0) { + if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) { return Z_STREAM_ERROR; } s = strm->state; if (strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0) || + (strm->avail_in != 0 && strm->next_in == Z_NULL) || (s->status == FINISH_STATE && flush != Z_FINISH)) { ERR_RETURN(strm, Z_STREAM_ERROR); } if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - s->strm = strm; /* just in case */ old_flush = s->last_flush; s->last_flush = flush; + /* Flush as much pending output as possible */ + if (s->pending != 0) { + flush_pending(strm); + if (strm->avail_out == 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s->last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) && + flush != Z_FINISH) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s->status == FINISH_STATE && strm->avail_in != 0) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + /* Write the header */ if (s->status == INIT_STATE) { -#ifdef GZIP - if (s->wrap == 2) { - strm->adler = crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (s->gzhead == Z_NULL) { - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s->status = BUSY_STATE; - } - else { - put_byte(s, (s->gzhead->text ? 1 : 0) + - (s->gzhead->hcrc ? 2 : 0) + - (s->gzhead->extra == Z_NULL ? 0 : 4) + - (s->gzhead->name == Z_NULL ? 0 : 8) + - (s->gzhead->comment == Z_NULL ? 0 : 16) - ); - put_byte(s, (Byte)(s->gzhead->time & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, s->gzhead->os & 0xff); - if (s->gzhead->extra != Z_NULL) { - put_byte(s, s->gzhead->extra_len & 0xff); - put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); - } - if (s->gzhead->hcrc) - strm->adler = crc32(strm->adler, s->pending_buf, - s->pending); - s->gzindex = 0; - s->status = EXTRA_STATE; - } - } + /* zlib header */ + uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt level_flags; + + if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) + level_flags = 0; + else if (s->level < 6) + level_flags = 1; + else if (s->level == 6) + level_flags = 2; else -#endif - { - uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; - uInt level_flags; - - if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) - level_flags = 0; - else if (s->level < 6) - level_flags = 1; - else if (s->level == 6) - level_flags = 2; - else - level_flags = 3; - header |= (level_flags << 6); - if (s->strstart != 0) header |= PRESET_DICT; - header += 31 - (header % 31); + level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = adler32(0L, Z_NULL, 0); + s->status = BUSY_STATE; + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } +#ifdef GZIP + if (s->status == GZIP_STATE) { + /* gzip header */ + strm->adler = crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (s->gzhead == Z_NULL) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); s->status = BUSY_STATE; - putShortMSB(s, header); - /* Save the adler32 of the preset dictionary: */ - if (s->strstart != 0) { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; } - strm->adler = adler32(0L, Z_NULL, 0); + } + else { + put_byte(s, (s->gzhead->text ? 1 : 0) + + (s->gzhead->hcrc ? 2 : 0) + + (s->gzhead->extra == Z_NULL ? 0 : 4) + + (s->gzhead->name == Z_NULL ? 0 : 8) + + (s->gzhead->comment == Z_NULL ? 0 : 16) + ); + put_byte(s, (Byte)(s->gzhead->time & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, s->gzhead->os & 0xff); + if (s->gzhead->extra != Z_NULL) { + put_byte(s, s->gzhead->extra_len & 0xff); + put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); + } + if (s->gzhead->hcrc) + strm->adler = crc32(strm->adler, s->pending_buf, + s->pending); + s->gzindex = 0; + s->status = EXTRA_STATE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jan 4 16:09:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43D9DC9E603; Wed, 4 Jan 2017 16:09:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E34C415D6; Wed, 4 Jan 2017 16:09:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04G9j59068757; Wed, 4 Jan 2017 16:09:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04G9juf068756; Wed, 4 Jan 2017 16:09:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701041609.v04G9juf068756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Jan 2017 16:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311286 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 16:09:47 -0000 Author: kib Date: Wed Jan 4 16:09:45 2017 New Revision: 311286 URL: https://svnweb.freebsd.org/changeset/base/311286 Log: The callers of kern_getfsstat(UIO_SYSSPACE) expect that *buf always returns memory which must be freed, regardless of the error. Assign NULL to *buf in case we are not going to allocate any memory due to invalid mode. Reported and tested by: pho Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 weeks (together with r310638) Differential revision: https://reviews.freebsd.org/D9042 Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Wed Jan 4 16:09:08 2017 (r311285) +++ head/sys/kern/vfs_syscalls.c Wed Jan 4 16:09:45 2017 (r311286) @@ -429,6 +429,8 @@ kern_getfsstat(struct thread *td, struct case MNT_NOWAIT: break; default: + if (bufseg == UIO_SYSSPACE) + *buf = NULL; return (EINVAL); } restart: From owner-svn-src-head@freebsd.org Wed Jan 4 16:10:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6651AC9E7DF; Wed, 4 Jan 2017 16:10:53 +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 4102C18C8; Wed, 4 Jan 2017 16:10:53 +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 v04GAqtd068860; Wed, 4 Jan 2017 16:10:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04GAq8n068859; Wed, 4 Jan 2017 16:10:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701041610.v04GAq8n068859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Jan 2017 16:10:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311287 - head/lib/libc/x86/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 16:10:53 -0000 Author: kib Date: Wed Jan 4 16:10:52 2017 New Revision: 311287 URL: https://svnweb.freebsd.org/changeset/base/311287 Log: __vdso_gettc(): be extra careful with /dev/hpet mappings, never unmap the mapping which might be accessed by other threads. If a pointer to the /dev/hpet register page mapping was stored into the hpet_dev_map, other threads might access the page at any time. Never unmap it, instead, keep track of mappings for all hpet units in smal array. Store pointer to the newly mapped registers page using CAS, to detect parallel mappings. It appeared relatively easy to demonstrate the problem by arranging two threads which perform gettimeofday(2) concurently, first time in the process address space, when HPET is used for timecounter. PR: 215715 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/x86/sys/__vdso_gettc.c Modified: head/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- head/lib/libc/x86/sys/__vdso_gettc.c Wed Jan 4 16:09:45 2017 (r311286) +++ head/lib/libc/x86/sys/__vdso_gettc.c Wed Jan 4 16:10:52 2017 (r311287) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2012 Konstantin Belousov - * Copyright (c) 2016 The FreeBSD Foundation + * Copyright (c) 2016, 2017 The FreeBSD Foundation * All rights reserved. * * Portions of this software were developed by Konstantin Belousov @@ -42,11 +42,11 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include #include #include #include #ifdef __amd64__ -#include #include #endif #include "libc_private.h" @@ -115,37 +115,47 @@ __vdso_rdtsc32(void) return (rdtsc32()); } -static char *hpet_dev_map = NULL; -static uint32_t hpet_idx = 0xffffffff; +#define HPET_DEV_MAP_MAX 10 +static volatile char *hpet_dev_map[HPET_DEV_MAP_MAX]; static void __vdso_init_hpet(uint32_t u) { static const char devprefix[] = "/dev/hpet"; char devname[64], *c, *c1, t; + volatile char *new_map, *old_map; + uint32_t u1; int fd; c1 = c = stpcpy(devname, devprefix); - u = hpet_idx; + u1 = u; do { - *c++ = u % 10 + '0'; - u /= 10; - } while (u != 0); + *c++ = u1 % 10 + '0'; + u1 /= 10; + } while (u1 != 0); *c = '\0'; for (c--; c1 != c; c1++, c--) { t = *c1; *c1 = *c; *c = t; } + + old_map = hpet_dev_map[u]; + if (old_map != NULL) + return; + fd = _open(devname, O_RDONLY); if (fd == -1) { - hpet_dev_map = MAP_FAILED; + atomic_cmpset_rel_ptr((volatile uintptr_t *)&hpet_dev_map[u], + (uintptr_t)old_map, (uintptr_t)MAP_FAILED); return; } - if (hpet_dev_map != NULL && hpet_dev_map != MAP_FAILED) - munmap(hpet_dev_map, PAGE_SIZE); - hpet_dev_map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, 0); + new_map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, 0); _close(fd); + if (atomic_cmpset_rel_ptr((volatile uintptr_t *)&hpet_dev_map[u], + (uintptr_t)old_map, (uintptr_t)new_map) == 0 && + new_map != MAP_FAILED) + munmap((void *)new_map, PAGE_SIZE); } #ifdef __amd64__ @@ -213,7 +223,8 @@ __vdso_hyperv_tsc(struct hyperv_reftsc * int __vdso_gettc(const struct vdso_timehands *th, u_int *tc) { - uint32_t tmp; + volatile char *map; + uint32_t idx; switch (th->th_algo) { case VDSO_TH_ALGO_X86_TSC: @@ -221,14 +232,19 @@ __vdso_gettc(const struct vdso_timehands __vdso_rdtsc32(); return (0); case VDSO_TH_ALGO_X86_HPET: - tmp = th->th_x86_hpet_idx; - if (hpet_dev_map == NULL || tmp != hpet_idx) { - hpet_idx = tmp; - __vdso_init_hpet(hpet_idx); + idx = th->th_x86_hpet_idx; + if (idx >= HPET_DEV_MAP_MAX) + return (ENOSYS); + map = (volatile char *)atomic_load_acq_ptr( + (volatile uintptr_t *)&hpet_dev_map[idx]); + if (map == NULL) { + __vdso_init_hpet(idx); + map = (volatile char *)atomic_load_acq_ptr( + (volatile uintptr_t *)&hpet_dev_map[idx]); } - if (hpet_dev_map == MAP_FAILED) + if (map == MAP_FAILED) return (ENOSYS); - *tc = *(volatile uint32_t *)(hpet_dev_map + HPET_MAIN_COUNTER); + *tc = *(volatile uint32_t *)(map + HPET_MAIN_COUNTER); return (0); #ifdef __amd64__ case VDSO_TH_ALGO_X86_HVTSC: From owner-svn-src-head@freebsd.org Wed Jan 4 16:24:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D42FC9EF83; Wed, 4 Jan 2017 16:24:42 +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 D0D9012DF; Wed, 4 Jan 2017 16:24:41 +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 v04GOf46076745; Wed, 4 Jan 2017 16:24:41 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04GOfUN076744; Wed, 4 Jan 2017 16:24:41 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701041624.v04GOfUN076744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 4 Jan 2017 16:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311288 - head/usr.bin/chat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 16:24:42 -0000 Author: asomers Date: Wed Jan 4 16:24:40 2017 New Revision: 311288 URL: https://svnweb.freebsd.org/changeset/base/311288 Log: Delete dead code in chat(8) It's always been dead, ever since first import in 1994. It's still dead in OpenBSD's version, too. Reported by: Coverity CID: 270586 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.bin/chat/chat.c Modified: head/usr.bin/chat/chat.c ============================================================================== --- head/usr.bin/chat/chat.c Wed Jan 4 16:10:52 2017 (r311287) +++ head/usr.bin/chat/chat.c Wed Jan 4 16:24:40 2017 (r311288) @@ -1173,7 +1173,7 @@ int get_string(char *string) { char temp[STR_LEN]; - int c, printed = 0; + int c; size_t len, minlen; char *s = temp, *end = s + STR_LEN; char *logged = temp; @@ -1306,13 +1306,6 @@ get_string(char *string) alarm(0); - if (verbose && printed) { - if (alarmed) - chat_logf(" -- read timed out"); - else - chat_logf(" -- read failed: %m"); - } - exit_code = 3; alarmed = 0; return (0); From owner-svn-src-head@freebsd.org Wed Jan 4 17:33:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F00BC9F95D; Wed, 4 Jan 2017 17:33:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B7DF13CB; Wed, 4 Jan 2017 17:33:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04HXIlp005985; Wed, 4 Jan 2017 17:33:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04HXIaA005984; Wed, 4 Jan 2017 17:33:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701041733.v04HXIaA005984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 17:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311290 - head/usr.sbin/bsnmpd/modules/snmp_bridge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 17:33:19 -0000 Author: ngie Date: Wed Jan 4 17:33:18 2017 New Revision: 311290 URL: https://svnweb.freebsd.org/changeset/base/311290 Log: Use strlcpy instead of strcpy when copying the bridge name to ifr.ifr_name to avoid buffer overflows MFC after: 1 week Reported by: Coverity CID: 1006735, 1006737, 1006738 Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 16:36:51 2017 (r311289) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:33:18 2017 (r311290) @@ -485,7 +485,7 @@ bridge_set_if_up(const char* b_name, int struct ifreq ifr; bzero(&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, b_name); + strlcpy(ifr.ifr_name, b_name, sizeof(ifr.ifr_name)); if (ioctl(sock, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) { syslog(LOG_ERR, "set bridge up: ioctl(SIOCGIFFLAGS) " "failed: %s", strerror(errno)); @@ -516,7 +516,7 @@ bridge_create(const char *b_name) struct ifreq ifr; bzero(&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, b_name); + strlcpy(ifr.ifr_name, b_name, sizeof(ifr.ifr_name)); if (ioctl(sock, SIOCIFCREATE, &ifr) < 0) { syslog(LOG_ERR, "create bridge: ioctl(SIOCIFCREATE) " @@ -549,7 +549,7 @@ bridge_destroy(const char *b_name) struct ifreq ifr; bzero(&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, b_name); + strlcpy(ifr.ifr_name, b_name, sizeof(ifr.ifr_name)); if (ioctl(sock, SIOCIFDESTROY, &ifr) < 0) { syslog(LOG_ERR, "destroy bridge: ioctl(SIOCIFDESTROY) " From owner-svn-src-head@freebsd.org Wed Jan 4 17:38:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74B4DC9FA9E; Wed, 4 Jan 2017 17:38:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD811715; Wed, 4 Jan 2017 17:38:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04HcIEW006207; Wed, 4 Jan 2017 17:38:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04HcIcj006206; Wed, 4 Jan 2017 17:38:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701041738.v04HcIcj006206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 17:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311291 - head/usr.sbin/bsnmpd/modules/snmp_bridge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 17:38:19 -0000 Author: ngie Date: Wed Jan 4 17:38:18 2017 New Revision: 311291 URL: https://svnweb.freebsd.org/changeset/base/311291 Log: bridge_get_pfval: use nitems instead of spelling it out longhand MFC after: 3 days Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:33:18 2017 (r311290) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:38:18 2017 (r311291) @@ -1449,8 +1449,8 @@ static struct { int32_t bridge_get_pfval(uint8_t which) { - if (which > sizeof(bridge_pf_sysctl) / sizeof(bridge_pf_sysctl[0]) - || which < 1) + + if (which > nitems(bridge_pf_sysctl) || which < 1) return (-1); return (bridge_pf_sysctl[which - 1].val); From owner-svn-src-head@freebsd.org Wed Jan 4 17:39:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81C77C9FB35; Wed, 4 Jan 2017 17:39:21 +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 5160F19AE; Wed, 4 Jan 2017 17:39:21 +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 v04HdKbc006427; Wed, 4 Jan 2017 17:39:20 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04HdKLY006426; Wed, 4 Jan 2017 17:39:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701041739.v04HdKLY006426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 4 Jan 2017 17:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311292 - head/usr.bin/rpcgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 17:39:21 -0000 Author: asomers Date: Wed Jan 4 17:39:20 2017 New Revision: 311292 URL: https://svnweb.freebsd.org/changeset/base/311292 Log: Remove dead code in rpc_parse.c It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.bin/rpcgen/rpc_parse.c Modified: head/usr.bin/rpcgen/rpc_parse.c ============================================================================== --- head/usr.bin/rpcgen/rpc_parse.c Wed Jan 4 17:38:18 2017 (r311291) +++ head/usr.bin/rpcgen/rpc_parse.c Wed Jan 4 17:39:20 2017 (r311292) @@ -290,7 +290,6 @@ def_union(definition *defp) declaration dec; case_list *cases; case_list **tailp; - int flag; defp->def_kind = DEF_UNION; scan(TOK_IDENT, &tok); @@ -309,7 +308,6 @@ def_union(definition *defp) cases->case_name = tok.str; scan(TOK_COLON, &tok); /* now peek at next token */ - flag = 0; if (peekscan(TOK_CASE, &tok)){ do { scan2(TOK_IDENT, TOK_CHARCONST, &tok); @@ -322,14 +320,6 @@ def_union(definition *defp) scan(TOK_COLON, &tok); } while (peekscan(TOK_CASE, &tok)); } - else - if (flag) - { - - *tailp = cases; - tailp = &cases->next; - cases = XALLOC(case_list); - } get_declaration(&dec, DEF_UNION); cases->case_decl = dec; From owner-svn-src-head@freebsd.org Wed Jan 4 17:50:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB5F6C9FE8B; Wed, 4 Jan 2017 17:50:53 +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 895A811B9; Wed, 4 Jan 2017 17:50:53 +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 v04Hoqds010546; Wed, 4 Jan 2017 17:50:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04HoqA9010545; Wed, 4 Jan 2017 17:50:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701041750.v04HoqA9010545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 17:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311293 - head/usr.sbin/bsnmpd/modules/snmp_bridge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 17:50:53 -0000 Author: ngie Date: Wed Jan 4 17:50:52 2017 New Revision: 311293 URL: https://svnweb.freebsd.org/changeset/base/311293 Log: bridge_do_pfctl: allocate mib_name dynamically using asprintf This is being done to reduce wasted space, simplify complexity in the code, and to quell a Coverity warning about buffer overruns. warning about buffer overruns. MFC after: 1 week Reported by: Coverity CID: 1006736 Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:39:20 2017 (r311292) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:50:52 2017 (r311293) @@ -1459,7 +1459,7 @@ bridge_get_pfval(uint8_t which) int32_t bridge_do_pfctl(int32_t bridge_ctl, enum snmp_op op, int32_t *val) { - char mib_name[100]; + char *mib_oid; int32_t i, s_i; size_t len, s_len; @@ -1474,19 +1474,24 @@ bridge_do_pfctl(int32_t bridge_ctl, enum len = sizeof(i); - strcpy(mib_name, bridge_sysctl); + asprintf(&mib_oid, "%s%s", bridge_sysctl, + bridge_pf_sysctl[bridge_ctl].name); + if (mib_oid == NULL) + return (-1); - if (sysctlbyname(strcat(mib_name, - bridge_pf_sysctl[bridge_ctl].name), &i, &len, - (op == SNMP_OP_SET ? &s_i : NULL), s_len) == -1) { - syslog(LOG_ERR, "sysctl(%s%s) failed - %s", bridge_sysctl, - bridge_pf_sysctl[bridge_ctl].name, strerror(errno)); + if (sysctlbyname(mib_oid, &i, &len, (op == SNMP_OP_SET ? &s_i : NULL), + s_len) == -1) { + syslog(LOG_ERR, "sysctl(%s) failed - %s", mib_oid, + strerror(errno)); + free(mib_oid); return (-1); } bridge_pf_sysctl[bridge_ctl].val = i; *val = i; + free(mib_oid); + return (i); } From owner-svn-src-head@freebsd.org Wed Jan 4 17:54:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93B4C9F014; Wed, 4 Jan 2017 17:54:45 +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 78C991519; Wed, 4 Jan 2017 17:54:45 +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 v04Hsise014194; Wed, 4 Jan 2017 17:54:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04Hsifb014193; Wed, 4 Jan 2017 17:54:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701041754.v04Hsifb014193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 4 Jan 2017 17:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311294 - head/usr.sbin/bsnmpd/modules/snmp_bridge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 17:54:45 -0000 Author: ngie Date: Wed Jan 4 17:54:44 2017 New Revision: 311294 URL: https://svnweb.freebsd.org/changeset/base/311294 Log: style cleanup - bridge_pf_dump: use nitems instead of spelling it out longhand - bridge_do_pfctl: sort variables by alignment for type MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:50:52 2017 (r311293) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:54:44 2017 (r311294) @@ -1460,8 +1460,8 @@ int32_t bridge_do_pfctl(int32_t bridge_ctl, enum snmp_op op, int32_t *val) { char *mib_oid; - int32_t i, s_i; size_t len, s_len; + int32_t i, s_i; if (bridge_ctl >= LEAF_begemotBridgeLayer2PfStatus) return (-2); @@ -1500,8 +1500,7 @@ bridge_pf_dump(void) { uint8_t i; - for (i = 0; i < sizeof(bridge_pf_sysctl) / sizeof(bridge_pf_sysctl[0]); - i++) { + for (i = 0; i < nitems(bridge_pf_sysctl); i++) { syslog(LOG_ERR, "%s%s = %d", bridge_sysctl, bridge_pf_sysctl[i].name, bridge_pf_sysctl[i].val); } From owner-svn-src-head@freebsd.org Wed Jan 4 18:13:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA0AEC9FA5E; Wed, 4 Jan 2017 18:13:06 +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 A9A8E1909; Wed, 4 Jan 2017 18:13:06 +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 v04ID5hj022702; Wed, 4 Jan 2017 18:13:05 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04ID5JX022701; Wed, 4 Jan 2017 18:13:05 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701041813.v04ID5JX022701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 4 Jan 2017 18:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311298 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 18:13:07 -0000 Author: asomers Date: Wed Jan 4 18:13:05 2017 New Revision: 311298 URL: https://svnweb.freebsd.org/changeset/base/311298 Log: Remove dead code in dhclient(8) The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function. Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/sbin/dhclient/dispatch.c Modified: head/sbin/dhclient/dispatch.c ============================================================================== --- head/sbin/dhclient/dispatch.c Wed Jan 4 18:03:27 2017 (r311297) +++ head/sbin/dhclient/dispatch.c Wed Jan 4 18:13:05 2017 (r311298) @@ -454,16 +454,12 @@ add_protocol(char *name, int fd, void (* void remove_protocol(struct protocol *proto) { - struct protocol *p, *next, *prev; + struct protocol *p, *next; - prev = NULL; for (p = protocols; p; p = next) { next = p->next; if (p == proto) { - if (prev) - prev->next = p->next; - else - protocols = p->next; + protocols = p->next; free(p); } } From owner-svn-src-head@freebsd.org Wed Jan 4 18:20:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67B3EC9FBFF; Wed, 4 Jan 2017 18:20:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 210D21CAE; Wed, 4 Jan 2017 18:20:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x241.google.com with SMTP id 3so40671097qtr.2; Wed, 04 Jan 2017 10:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OuKROI8huaDqyx6t+5D+i2PKMp5f0B2NSr0HsogC2gA=; b=P/Tc7Fu0y8q0LgF51bixBiN0ZgnE/+YIU8B5AebSHo8/fBA8ncIvGwdSTTZ0eFuW0y xjt2j5/cYvOihGhcqMsW/X1IkP2Q5fEdp1T0O8Gv9jgD8Fm7/sFBDGuVzEexY6taZuPd pokYngRf3r/Owp30ihOJkmvIUKm1qAA1tb99q7FcLz9q5un6jEDjIK/LuynF+oMZ/OsO F2A9Tuw8CTvCwnyu+1hV5KKCjvbuSMqRnMSYOV6P0VG/rMEHccfXJsj5G5l0v+n5oH8l laonRUQU9vrqj3J4hdq26OOyJIIEEvw2xOVnwEP3ENdBsDoAVMfI7nQkm/a6S3ErdcJk hh7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=OuKROI8huaDqyx6t+5D+i2PKMp5f0B2NSr0HsogC2gA=; b=FFJh6AtoJZ9A42Efr9LxmaFoL54vKdLUixc0NcZrDxklow9QeNUFIzJVABaEPlINmP yLzpPixELCiVgm7Mj0OcHiE7H+kfG8RYYRIegHWtsDzsJN30fCWgk+JBTbym/4+DWi/J HzCI5QyoXPZb9SQYE1nZZhA04pjImO6m7MuDRGs7U/9KSluerbDv5vkOx6yN11gq3rUZ VJCkxvj/2Se3VCnlSdqfWCD4CZjFrvFedlMDiQp69RAAE5kmc0WtkMua1FEfJIUJC4+I LjrxTP6TX2dHhj70SsVUP7u3hb9uwDYCkgdg0V99gONCkA4eyv75Iuq8SWlxkiOuN4At 6H3Q== X-Gm-Message-State: AIkVDXKRNvLCIyspzbtkY0A9UnJ69uN5bK46BMslz/ucYjE2HvSYe7N1nh1Hhq4Q93cmKg== X-Received: by 10.237.36.12 with SMTP id r12mr64174447qtc.97.1483554037990; Wed, 04 Jan 2017 10:20:37 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id q62sm42977817qkb.46.2017.01.04.10.20.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jan 2017 10:20:37 -0800 (PST) Sender: Mark Johnston Date: Wed, 4 Jan 2017 10:26:30 -0800 From: Mark Johnston To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311225 - head/sys/netinet Message-ID: <20170104182630.GA26522@wkstn-mjohnston.west.isilon.com> References: <201701040219.v042JDEk026544@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701040219.v042JDEk026544@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 18:20:39 -0000 On Wed, Jan 04, 2017 at 02:19:13AM +0000, George V. Neville-Neil wrote: > Author: gnn > Date: Wed Jan 4 02:19:13 2017 > New Revision: 311225 > URL: https://svnweb.freebsd.org/changeset/base/311225 > > Log: > Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and > dangerous. Those wanting data from an mbuf should use DTrace itself to get > the data. I think you also need to update the types in in_kdtrace.c, and add a translator for struct mbuf * to ipinfo_t. From owner-svn-src-head@freebsd.org Wed Jan 4 18:36:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7689EC9E287; Wed, 4 Jan 2017 18:36:31 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46484180B; Wed, 4 Jan 2017 18:36:31 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04IaUuT030840; Wed, 4 Jan 2017 18:36:30 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04IaURH030839; Wed, 4 Jan 2017 18:36:30 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201701041836.v04IaURH030839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Wed, 4 Jan 2017 18:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311299 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 18:36:31 -0000 Author: kan Date: Wed Jan 4 18:36:30 2017 New Revision: 311299 URL: https://svnweb.freebsd.org/changeset/base/311299 Log: Remove duplicate iic and iicbus devices from JZ4780 kernel Modified: head/sys/mips/conf/JZ4780 Modified: head/sys/mips/conf/JZ4780 ============================================================================== --- head/sys/mips/conf/JZ4780 Wed Jan 4 18:13:05 2017 (r311298) +++ head/sys/mips/conf/JZ4780 Wed Jan 4 18:36:30 2017 (r311299) @@ -75,9 +75,6 @@ device ext_resources device gpio -device iicbus -device iic - device scbus device da From owner-svn-src-head@freebsd.org Wed Jan 4 20:26:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30BEFC9F5D0; Wed, 4 Jan 2017 20:26:49 +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 DB3931078; Wed, 4 Jan 2017 20:26:48 +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 v04KQm0b076079; Wed, 4 Jan 2017 20:26:48 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04KQggH076026; Wed, 4 Jan 2017 20:26:42 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701042026.v04KQggH076026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 4 Jan 2017 20:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311305 - in head/sys: cam cam/ctl cam/scsi dev/aac dev/aacraid dev/advansys dev/aha dev/ahb dev/ahci dev/aic dev/aic7xxx dev/amr dev/arcmsr dev/ata dev/buslogic dev/ciss dev/dpt dev/es... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 20:26:49 -0000 Author: asomers Date: Wed Jan 4 20:26:42 2017 New Revision: 311305 URL: https://svnweb.freebsd.org/changeset/base/311305 Log: Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name) The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v". This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field. PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 Reviewed by: imp, sephe, slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9037 Differential Revision: https://reviews.freebsd.org/D9038 Modified: head/sys/cam/cam_xpt.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/scsi/scsi_low.c head/sys/dev/aac/aac_cam.c head/sys/dev/aacraid/aacraid_cam.c head/sys/dev/advansys/advansys.c head/sys/dev/advansys/adwcam.c head/sys/dev/aha/aha.c head/sys/dev/ahb/ahb.c head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahciem.c head/sys/dev/aic/aic.c head/sys/dev/aic7xxx/aic79xx_osm.c head/sys/dev/aic7xxx/aic7xxx_osm.c head/sys/dev/amr/amr_cam.c head/sys/dev/arcmsr/arcmsr.c head/sys/dev/ata/ata-all.c head/sys/dev/buslogic/bt.c head/sys/dev/ciss/ciss.c head/sys/dev/dpt/dpt_scsi.c head/sys/dev/esp/ncr53c9x.c head/sys/dev/firewire/sbp.c head/sys/dev/firewire/sbp_targ.c head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c head/sys/dev/hptiop/hptiop.c head/sys/dev/hptmv/entry.c head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptrr/hptrr_osm_bsd.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/iir/iir.c head/sys/dev/isci/isci_controller.c head/sys/dev/iscsi_initiator/isc_cam.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/mfi/mfi_cam.c head/sys/dev/mly/mly.c head/sys/dev/mpr/mpr_sas.c head/sys/dev/mps/mps_sas.c head/sys/dev/mpt/mpt_cam.c head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mvs/mvs.c head/sys/dev/ncr/ncr.c head/sys/dev/nvme/nvme_sim.c head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c head/sys/dev/ppbus/vpo.c head/sys/dev/siis/siis.c head/sys/dev/sym/sym_hipd.c head/sys/dev/trm/trm.c head/sys/dev/twa/tw_osl_cam.c head/sys/dev/tws/tws_cam.c head/sys/dev/virtio/scsi/virtio_scsi.c head/sys/powerpc/ps3/ps3cdrom.c head/sys/powerpc/pseries/phyp_vscsi.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/cam/cam_xpt.c Wed Jan 4 20:26:42 2017 (r311305) @@ -5166,9 +5166,9 @@ xptaction(struct cam_sim *sim, union ccb cpi->max_target = 0; cpi->max_lun = 0; cpi->initiator_id = 0; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "", HBA_IDLEN); - strncpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "", HBA_IDLEN); + strlcpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); cpi->unit_number = sim->unit_number; cpi->bus_id = sim->bus_id; cpi->base_transfer_speed = 0; Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Wed Jan 4 20:26:42 2017 (r311305) @@ -773,9 +773,9 @@ cfcs_action(struct cam_sim *sim, union c cpi->hpath_id = 0; cpi->initiator_id = 0; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "FreeBSD", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "FreeBSD", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = 0; cpi->bus_id = 0; cpi->base_transfer_speed = 800000; Modified: head/sys/cam/scsi/scsi_low.c ============================================================================== --- head/sys/cam/scsi/scsi_low.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/cam/scsi/scsi_low.c Wed Jan 4 20:26:42 2017 (r311305) @@ -722,9 +722,9 @@ settings_out: cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "SCSI_LOW", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "SCSI_LOW", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: head/sys/dev/aac/aac_cam.c ============================================================================== --- head/sys/dev/aac/aac_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/aac/aac_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -317,9 +317,9 @@ aac_cam_action(struct cam_sim *sim, unio cpi->initiator_id = camsc->inf->InitiatorBusId; cpi->bus_id = camsc->inf->BusNumber; cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- head/sys/dev/aacraid/aacraid_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/aacraid/aacraid_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1037,9 +1037,9 @@ aac_cam_action(struct cam_sim *sim, unio cpi->transport_version = 0; cpi->protocol_version = SCSI_REV_SPC2; #endif - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "PMC-Sierra", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "PMC-Sierra", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: head/sys/dev/advansys/advansys.c ============================================================================== --- head/sys/dev/advansys/advansys.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/advansys/advansys.c Wed Jan 4 20:26:42 2017 (r311305) @@ -429,9 +429,9 @@ adv_action(struct cam_sim *sim, union cc cpi->initiator_id = adv->scsi_id; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Advansys", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Advansys", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->ccb_h.status = CAM_REQ_CMP; cpi->transport = XPORT_SPI; Modified: head/sys/dev/advansys/adwcam.c ============================================================================== --- head/sys/dev/advansys/adwcam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/advansys/adwcam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -708,9 +708,9 @@ adw_action(struct cam_sim *sim, union cc cpi->initiator_id = adw->initiator_id; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "AdvanSys", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "AdvanSys", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/aha/aha.c ============================================================================== --- head/sys/dev/aha/aha.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/aha/aha.c Wed Jan 4 20:26:42 2017 (r311305) @@ -947,9 +947,9 @@ ahaaction(struct cam_sim *sim, union ccb cpi->initiator_id = aha->scsi_id; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/ahb/ahb.c ============================================================================== --- head/sys/dev/ahb/ahb.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/ahb/ahb.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1178,9 +1178,9 @@ ahbaction(struct cam_sim *sim, union ccb cpi->initiator_id = ahb->scsi_id; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/ahci/ahci.c Wed Jan 4 20:26:42 2017 (r311305) @@ -2687,9 +2687,9 @@ ahciaction(struct cam_sim *sim, union cc cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "AHCI", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "AHCI", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SATA; cpi->transport_version = XPORT_VERSION_UNSPECIFIED; Modified: head/sys/dev/ahci/ahciem.c ============================================================================== --- head/sys/dev/ahci/ahciem.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/ahci/ahciem.c Wed Jan 4 20:26:42 2017 (r311305) @@ -578,9 +578,9 @@ ahciemaction(struct cam_sim *sim, union cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "AHCI", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "AHCI", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SATA; cpi->transport_version = XPORT_VERSION_UNSPECIFIED; Modified: head/sys/dev/aic/aic.c ============================================================================== --- head/sys/dev/aic/aic.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/aic/aic.c Wed Jan 4 20:26:42 2017 (r311305) @@ -281,9 +281,9 @@ aic_action(struct cam_sim *sim, union cc cpi->initiator_id = aic->initiator; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/aic7xxx/aic79xx_osm.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx_osm.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/aic7xxx/aic79xx_osm.c Wed Jan 4 20:26:42 2017 (r311305) @@ -699,9 +699,9 @@ ahd_action(struct cam_sim *sim, union cc } cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; Modified: head/sys/dev/aic7xxx/aic7xxx_osm.c ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx_osm.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/aic7xxx/aic7xxx_osm.c Wed Jan 4 20:26:42 2017 (r311305) @@ -797,9 +797,9 @@ ahc_action(struct cam_sim *sim, union cc } cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; Modified: head/sys/dev/amr/amr_cam.c ============================================================================== --- head/sys/dev/amr/amr_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/amr/amr_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -323,9 +323,9 @@ amr_cam_action(struct cam_sim *sim, unio cpi->max_target = AMR_MAX_TARGETS; cpi->max_lun = 0 /* AMR_MAX_LUNS*/; cpi->initiator_id = 7; /* XXX variable? */ - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "LSI", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "LSI", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 132 * 1024; /* XXX */ Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/arcmsr/arcmsr.c Wed Jan 4 20:26:42 2017 (r311305) @@ -2901,9 +2901,9 @@ static void arcmsr_action(struct cam_sim cpi->max_lun = ARCMSR_MAX_TARGETLUN; /* 0-7 */ cpi->initiator_id = ARCMSR_SCSI_INITIATOR_ID; /* 255 */ cpi->bus_id = cam_sim_bus(psim); - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "ARCMSR", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "ARCMSR", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(psim); #ifdef CAM_NEW_TRAN_CODE if(acb->adapter_bus_speed == ACB_BUS_SPEED_12G) Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/ata/ata-all.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1167,9 +1167,9 @@ ataaction(struct cam_sim *sim, union ccb cpi->base_transfer_speed = 150000; else cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "ATA", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "ATA", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); if (ch->flags & ATA_SATA) cpi->transport = XPORT_SATA; Modified: head/sys/dev/buslogic/bt.c ============================================================================== --- head/sys/dev/buslogic/bt.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/buslogic/bt.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1367,9 +1367,9 @@ btaction(struct cam_sim *sim, union ccb cpi->initiator_id = bt->scsi_id; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "BusLogic", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "BusLogic", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->ccb_h.status = CAM_REQ_CMP; cpi->transport = XPORT_SPI; Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/ciss/ciss.c Wed Jan 4 20:26:42 2017 (r311305) @@ -3026,9 +3026,9 @@ ciss_cam_action(struct cam_sim *sim, uni cpi->max_target = sc->ciss_cfg->max_logical_supported; cpi->max_lun = 0; /* 'logical drive' channel only */ cpi->initiator_id = sc->ciss_cfg->max_logical_supported; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "msmith@freebsd.org", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "CISS", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 132 * 1024; /* XXX what to set this to? */ Modified: head/sys/dev/dpt/dpt_scsi.c ============================================================================== --- head/sys/dev/dpt/dpt_scsi.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/dpt/dpt_scsi.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1027,9 +1027,9 @@ dpt_action(struct cam_sim *sim, union cc cpi->initiator_id = dpt->hostid[cam_sim_bus(sim)]; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "DPT", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "DPT", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/esp/ncr53c9x.c ============================================================================== --- head/sys/dev/esp/ncr53c9x.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/esp/ncr53c9x.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1013,9 +1013,9 @@ ncr53c9x_action(struct cam_sim *sim, uni cpi->max_target = sc->sc_ntarg - 1; cpi->max_lun = 7; cpi->initiator_id = sc->sc_id; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "NCR", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "NCR", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = 0; cpi->base_transfer_speed = 3300; Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/firewire/sbp.c Wed Jan 4 20:26:42 2017 (r311305) @@ -2484,9 +2484,9 @@ END_DEBUG cpi->initiator_id = SBP_INITIATOR; cpi->bus_id = sim->bus_id; cpi->base_transfer_speed = 400 * 1000 / 8; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "SBP", HBA_IDLEN); - strncpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "SBP", HBA_IDLEN); + strlcpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); cpi->unit_number = sim->unit_number; cpi->transport = XPORT_SPI; /* XX should have a FireWire */ cpi->transport_version = 2; Modified: head/sys/dev/firewire/sbp_targ.c ============================================================================== --- head/sys/dev/firewire/sbp_targ.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/firewire/sbp_targ.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1331,9 +1331,9 @@ sbp_targ_action1(struct cam_sim *sim, un cpi->initiator_id = 7; /* XXX */ cpi->bus_id = sim->bus_id; cpi->base_transfer_speed = 400 * 1000 / 8; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "SBP_TARG", HBA_IDLEN); - strncpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "SBP_TARG", HBA_IDLEN); + strlcpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); cpi->unit_number = sim->unit_number; cpi->ccb_h.status = CAM_REQ_CMP; Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Wed Jan 4 20:26:42 2017 (r311305) @@ -934,9 +934,9 @@ static void hpt_action(struct cam_sim *s cpi->initiator_id = osm_max_targets; cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "HPT ", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/hptiop/hptiop.c Wed Jan 4 20:26:42 2017 (r311305) @@ -2365,9 +2365,9 @@ static void hptiop_action(struct cam_sim cpi->initiator_id = hba->max_devices; cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "HPT ", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/hptmv/entry.c Wed Jan 4 20:26:42 2017 (r311305) @@ -2329,9 +2329,9 @@ hpt_action(struct cam_sim *sim, union cc cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "HPT ", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1134,9 +1134,9 @@ static void hpt_action(struct cam_sim *s cpi->initiator_id = osm_max_targets; cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "HPT ", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Wed Jan 4 20:26:42 2017 (r311305) @@ -782,9 +782,9 @@ static void hpt_action(struct cam_sim *s cpi->initiator_id = osm_max_targets; cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "HPT ", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Jan 4 20:26:42 2017 (r311305) @@ -266,10 +266,10 @@ static const struct hyperv_guid gBlkVscD }; static struct storvsc_driver_props g_drv_props_table[] = { - {"blkvsc", "Hyper-V IDE Storage Interface", + {"blkvsc", "Hyper-V IDE", BLKVSC_MAX_IDE_DISKS_PER_TARGET, BLKVSC_MAX_IO_REQUESTS, 20*PAGE_SIZE}, - {"storvsc", "Hyper-V SCSI Storage Interface", + {"storvsc", "Hyper-V SCSI", STORVSC_MAX_LUNS_PER_TARGET, STORVSC_MAX_IO_REQUESTS, 20*PAGE_SIZE} }; @@ -1451,9 +1451,9 @@ storvsc_action(struct cam_sim *sim, unio cpi->transport_version = 0; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_SPC2; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, sc->hs_drv_props->drv_name, HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, sc->hs_drv_props->drv_name, HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); ccb->ccb_h.status = CAM_REQ_CMP; Modified: head/sys/dev/iir/iir.c ============================================================================== --- head/sys/dev/iir/iir.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/iir/iir.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1366,12 +1366,12 @@ iir_action( struct cam_sim *sim, union c cpi->initiator_id = (bus == gdt->sc_virt_bus ? 127 : gdt->sc_bus_id[bus]); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); if (gdt->sc_vendor == INTEL_VENDOR_ID_IIR) - strncpy(cpi->hba_vid, "Intel Corp.", HBA_IDLEN); + strlcpy(cpi->hba_vid, "Intel Corp.", HBA_IDLEN); else - strncpy(cpi->hba_vid, "ICP vortex ", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->hba_vid, "ICP vortex ", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; Modified: head/sys/dev/isci/isci_controller.c ============================================================================== --- head/sys/dev/isci/isci_controller.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/isci/isci_controller.c Wed Jan 4 20:26:42 2017 (r311305) @@ -691,9 +691,9 @@ void isci_action(struct cam_sim *sim, un cpi->bus_id = bus; cpi->initiator_id = SCI_MAX_REMOTE_DEVICES; cpi->base_transfer_speed = 300000; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Intel Corp.", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Intel Corp.", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->transport = XPORT_SAS; cpi->transport_version = 0; cpi->protocol = PROTO_SCSI; Modified: head/sys/dev/iscsi_initiator/isc_cam.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/iscsi_initiator/isc_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -76,9 +76,9 @@ _inq(struct cam_sim *sim, union ccb *ccb cpi->max_lun = sp->opt.maxluns - 1; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; // 40000; // XXX: - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "iSCSI", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "iSCSI", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->ccb_h.status = CAM_REQ_CMP; #if defined(KNOB_VALID_ADDRESS) Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/isp/isp_freebsd.c Wed Jan 4 20:26:42 2017 (r311305) @@ -4073,9 +4073,9 @@ isp_action(struct cam_sim *sim, union cc } cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Qlogic", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Qlogic", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: head/sys/dev/mfi/mfi_cam.c ============================================================================== --- head/sys/dev/mfi/mfi_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/mfi/mfi_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -222,9 +222,9 @@ mfip_cam_action(struct cam_sim *sim, uni cpi->max_target = MFI_SCSI_MAX_TARGETS; cpi->max_lun = MFI_SCSI_MAX_LUNS; cpi->initiator_id = MFI_SCSI_INITIATOR_ID; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "LSI", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "LSI", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; Modified: head/sys/dev/mly/mly.c ============================================================================== --- head/sys/dev/mly/mly.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/mly/mly.c Wed Jan 4 20:26:42 2017 (r311305) @@ -2109,9 +2109,9 @@ mly_cam_action(struct cam_sim *sim, unio cpi->max_target = MLY_MAX_TARGETS - 1; cpi->max_lun = MLY_MAX_LUNS - 1; cpi->initiator_id = sc->mly_controllerparam->initiator_id; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "FreeBSD", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Mylex", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 132 * 1024; /* XXX what to set this to? */ Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/mpr/mpr_sas.c Wed Jan 4 20:26:42 2017 (r311305) @@ -987,9 +987,9 @@ mprsas_action(struct cam_sim *sim, union cpi->max_target = sassc->maxtargets - 1; cpi->max_lun = 255; cpi->initiator_id = sassc->maxtargets - 1; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Avago Tech (LSI)", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Avago Tech", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); /* Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/mps/mps_sas.c Wed Jan 4 20:26:42 2017 (r311305) @@ -943,9 +943,9 @@ mpssas_action(struct cam_sim *sim, union cpi->max_target = sassc->maxtargets - 1; cpi->max_lun = 255; cpi->initiator_id = sassc->maxtargets - 1; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Avago Tech (LSI)", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Avago Tech", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/mpt/mpt_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -3583,9 +3583,9 @@ mpt_action(struct cam_sim *sim, union cc } else { cpi->target_sprt = 0; } - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "LSI", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "LSI", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->ccb_h.status = CAM_REQ_CMP; break; Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/mrsas/mrsas_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -356,9 +356,9 @@ mrsas_action(struct cam_sim *sim, union ccb->cpi.bus_id = cam_sim_bus(sim); ccb->cpi.initiator_id = MRSAS_SCSI_INITIATOR_ID; ccb->cpi.base_transfer_speed = 150000; - strncpy(ccb->cpi.sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(ccb->cpi.hba_vid, "AVAGO", HBA_IDLEN); - strncpy(ccb->cpi.dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(ccb->cpi.sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(ccb->cpi.hba_vid, "AVAGO", HBA_IDLEN); + strlcpy(ccb->cpi.dev_name, cam_sim_name(sim), DEV_IDLEN); ccb->cpi.transport = XPORT_SPI; ccb->cpi.transport_version = 2; ccb->cpi.protocol = PROTO_SCSI; Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/mvs/mvs.c Wed Jan 4 20:26:42 2017 (r311305) @@ -2417,9 +2417,9 @@ mvsaction(struct cam_sim *sim, union ccb cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Marvell", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Marvell", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SATA; cpi->transport_version = XPORT_VERSION_UNSPECIFIED; Modified: head/sys/dev/ncr/ncr.c ============================================================================== --- head/sys/dev/ncr/ncr.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/ncr/ncr.c Wed Jan 4 20:26:42 2017 (r311305) @@ -4347,9 +4347,9 @@ ncr_action (struct cam_sim *sim, union c cpi->initiator_id = np->myaddr; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Symbios", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Symbios", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/nvme/nvme_sim.c Wed Jan 4 20:26:42 2017 (r311305) @@ -181,9 +181,9 @@ nvme_sim_action(struct cam_sim *sim, uni cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 4000000; /* 4 GB/s 4 lanes pcie 3 */ - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "NVMe", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "NVMe", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_NVME; /* XXX XPORT_PCIE ? */ cpi->transport_version = 1; /* XXX Get PCIe spec ? */ Modified: head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c ============================================================================== --- head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1838,9 +1838,9 @@ static void agtiapi_cam_action( struct c cpi->max_lun = AGTIAPI_MAX_LUN; cpi->maxio = 1024 *1024; /* Max supported I/O size, in bytes. */ cpi->initiator_id = 255; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "PMC", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "PMC", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); // rate is set when XPT_GET_TRAN_SETTINGS is processed Modified: head/sys/dev/ppbus/vpo.c ============================================================================== --- head/sys/dev/ppbus/vpo.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/ppbus/vpo.c Wed Jan 4 20:26:42 2017 (r311305) @@ -390,9 +390,9 @@ vpo_action(struct cam_sim *sim, union cc cpi->initiator_id = VP0_INITIATOR; cpi->bus_id = sim->bus_id; cpi->base_transfer_speed = 93; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Iomega", HBA_IDLEN); - strncpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Iomega", HBA_IDLEN); + strlcpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); cpi->unit_number = sim->unit_number; cpi->transport = XPORT_PPB; cpi->transport_version = 0; Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/siis/siis.c Wed Jan 4 20:26:42 2017 (r311305) @@ -1959,9 +1959,9 @@ siisaction(struct cam_sim *sim, union cc cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "SIIS", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "SIIS", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SATA; cpi->transport_version = XPORT_VERSION_UNSPECIFIED; Modified: head/sys/dev/sym/sym_hipd.c ============================================================================== --- head/sys/dev/sym/sym_hipd.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/sym/sym_hipd.c Wed Jan 4 20:26:42 2017 (r311305) @@ -8047,9 +8047,9 @@ static void sym_action2(struct cam_sim * cpi->bus_id = cam_sim_bus(sim); cpi->initiator_id = np->myaddr; cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Symbios", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Symbios", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->protocol = PROTO_SCSI; Modified: head/sys/dev/trm/trm.c ============================================================================== --- head/sys/dev/trm/trm.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/trm/trm.c Wed Jan 4 20:26:42 2017 (r311305) @@ -651,9 +651,9 @@ trm_action(struct cam_sim *psim, union c cpi->initiator_id = pACB->AdaptSCSIID; cpi->bus_id = cam_sim_bus(psim); cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Tekram_TRM", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Tekram_TRM", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(psim); cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/twa/tw_osl_cam.c ============================================================================== --- head/sys/dev/twa/tw_osl_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/twa/tw_osl_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -424,9 +424,9 @@ twa_action(struct cam_sim *sim, union cc path_inq->bus_id = cam_sim_bus(sim); path_inq->initiator_id = TW_CL_MAX_NUM_UNITS; path_inq->base_transfer_speed = 100000; - strncpy(path_inq->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(path_inq->hba_vid, "3ware", HBA_IDLEN); - strncpy(path_inq->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(path_inq->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(path_inq->hba_vid, "3ware", HBA_IDLEN); + strlcpy(path_inq->dev_name, cam_sim_name(sim), DEV_IDLEN); path_inq->transport = XPORT_SPI; path_inq->transport_version = 2; path_inq->protocol = PROTO_SCSI; Modified: head/sys/dev/tws/tws_cam.c ============================================================================== --- head/sys/dev/tws/tws_cam.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/tws/tws_cam.c Wed Jan 4 20:26:42 2017 (r311305) @@ -309,9 +309,9 @@ tws_action(struct cam_sim *sim, union cc ccb->cpi.bus_id = cam_sim_bus(sim); ccb->cpi.initiator_id = TWS_SCSI_INITIATOR_ID; ccb->cpi.base_transfer_speed = 6000000; - strncpy(ccb->cpi.sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(ccb->cpi.hba_vid, "3ware", HBA_IDLEN); - strncpy(ccb->cpi.dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(ccb->cpi.sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(ccb->cpi.hba_vid, "3ware", HBA_IDLEN); + strlcpy(ccb->cpi.dev_name, cam_sim_name(sim), DEV_IDLEN); #if (__FreeBSD_version >= 700000 ) ccb->cpi.transport = XPORT_SPI; ccb->cpi.transport_version = 2; Modified: head/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- head/sys/dev/virtio/scsi/virtio_scsi.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/dev/virtio/scsi/virtio_scsi.c Wed Jan 4 20:26:42 2017 (r311305) @@ -917,9 +917,9 @@ vtscsi_cam_path_inquiry(struct vtscsi_so cpi->max_lun = sc->vtscsi_max_lun; cpi->initiator_id = VTSCSI_INITIATOR_ID; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "VirtIO", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "VirtIO", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); Modified: head/sys/powerpc/ps3/ps3cdrom.c ============================================================================== --- head/sys/powerpc/ps3/ps3cdrom.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/powerpc/ps3/ps3cdrom.c Wed Jan 4 20:26:42 2017 (r311305) @@ -420,9 +420,9 @@ ps3cdrom_action(struct cam_sim *sim, uni cpi->bus_id = cam_sim_bus(sim); cpi->unit_number = cam_sim_unit(sim); cpi->base_transfer_speed = 150000; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Sony", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "Sony", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; Modified: head/sys/powerpc/pseries/phyp_vscsi.c ============================================================================== --- head/sys/powerpc/pseries/phyp_vscsi.c Wed Jan 4 19:53:04 2017 (r311304) +++ head/sys/powerpc/pseries/phyp_vscsi.c Wed Jan 4 20:26:42 2017 (r311305) @@ -429,9 +429,9 @@ vscsi_cam_action(struct cam_sim *sim, un cpi->max_target = 0; cpi->max_lun = 0; cpi->initiator_id = ~0; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "IBM", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "IBM", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; From owner-svn-src-head@freebsd.org Wed Jan 4 21:13:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02B37C9F57F; Wed, 4 Jan 2017 21:13:23 +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 CE67410AB; Wed, 4 Jan 2017 21:13:22 +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 v04LDM4Q096553; Wed, 4 Jan 2017 21:13:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04LDMQR096552; Wed, 4 Jan 2017 21:13:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701042113.v04LDMQR096552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 4 Jan 2017 21:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311309 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 21:13:23 -0000 Author: jhb Date: Wed Jan 4 21:13:21 2017 New Revision: 311309 URL: https://svnweb.freebsd.org/changeset/base/311309 Log: Further refine MIPS stack traces across trapframes. Use the trapframe unwinder recently added for kernel stack overflow panics for frames crossing MipsKernGenException and MipsKernIntr. This provides more reliably unwinding across nested interrupts and exceptions in the kernel. While here, dump the value of the CAUSE and BADVADDR registers when crossing a trapframe. Submitted by: rwatson (original version) Obtained from: CheriBSD Sponsored by: DARPA / AFRL Modified: head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Wed Jan 4 20:56:03 2017 (r311308) +++ head/sys/mips/mips/db_trace.c Wed Jan 4 21:13:21 2017 (r311309) @@ -141,11 +141,12 @@ stacktrace_subr(register_t pc, register_ */ int valid_args[4]; register_t args[4]; - register_t va, subr; + register_t va, subr, cause, badvaddr; unsigned instr, mask; unsigned int frames = 0; int more, stksize, j; register_t next_ra; + bool trapframe; /* Jump here when done with a frame, to start a new one */ loop: @@ -160,6 +161,7 @@ loop: next_ra = 0; stksize = 0; subr = 0; + trapframe = false; if (frames++ > 100) { (*printfn) ("\nstackframe count exceeded\n"); /* return breaks stackframe-size heuristics with gcc -O2 */ @@ -183,17 +185,21 @@ loop: * preceding "j ra" at the tail of the preceding function. Depends * on relative ordering of functions in exception.S, swtch.S. */ - if (pcBetween(MipsKernGenException, MipsUserGenException)) + if (pcBetween(MipsKernGenException, MipsUserGenException)) { subr = (uintptr_t)MipsKernGenException; - else if (pcBetween(MipsUserGenException, MipsKernIntr)) + trapframe = true; + } else if (pcBetween(MipsUserGenException, MipsKernIntr)) subr = (uintptr_t)MipsUserGenException; - else if (pcBetween(MipsKernIntr, MipsUserIntr)) + else if (pcBetween(MipsKernIntr, MipsUserIntr)) { subr = (uintptr_t)MipsKernIntr; - else if (pcBetween(MipsUserIntr, MipsTLBInvalidException)) + trapframe = true; + } else if (pcBetween(MipsUserIntr, MipsTLBInvalidException)) subr = (uintptr_t)MipsUserIntr; - else if (pcBetween(MipsTLBInvalidException, MipsTLBMissException)) + else if (pcBetween(MipsTLBInvalidException, MipsTLBMissException)) { subr = (uintptr_t)MipsTLBInvalidException; - else if (pcBetween(fork_trampoline, savectx)) + if (pc == (uintptr_t)MipsKStackOverflow) + trapframe = true; + } else if (pcBetween(fork_trampoline, savectx)) subr = (uintptr_t)fork_trampoline; else if (pcBetween(savectx, cpu_throw)) subr = (uintptr_t)savectx; @@ -215,11 +221,11 @@ loop: } /* - * For a kernel stack overflow, skip to the output and - * afterwards pull the previous registers out of the trapframe - * instead of decoding the function prologue. + * For a trapframe, skip to the output and afterwards pull the + * previous registers out of the trapframe instead of decoding + * the function prologue. */ - if (pc == (uintptr_t)MipsKStackOverflow) + if (trapframe) goto done; /* @@ -398,19 +404,24 @@ done: (uintmax_t)(u_register_t) sp, stksize); - if (pc == (uintptr_t)MipsKStackOverflow) { + if (trapframe) { #define TF_REG(base, reg) ((base) + CALLFRAME_SIZ + ((reg) * SZREG)) #if defined(__mips_n64) || defined(__mips_n32) pc = kdbpeekd((int *)TF_REG(sp, PC)); ra = kdbpeekd((int *)TF_REG(sp, RA)); sp = kdbpeekd((int *)TF_REG(sp, SP)); + cause = kdbpeekd((int *)TF_REG(sp, CAUSE)); + badvaddr = kdbpeekd((int *)TF_REG(sp, BADVADDR)); #else pc = kdbpeek((int *)TF_REG(sp, PC)); ra = kdbpeek((int *)TF_REG(sp, RA)); sp = kdbpeek((int *)TF_REG(sp, SP)); + cause = kdbpeek((int *)TF_REG(sp, CAUSE)); + badvaddr = kdbpeek((int *)TF_REG(sp, BADVADDR)); #endif #undef TF_REG - (*printfn) ("--- Kernel Stack Overflow ---\n"); + (*printfn) ("--- exception, cause %jx badvaddr %jx ---\n", + (uintmax_t)cause, (uintmax_t)badvaddr); goto loop; } else if (ra) { if (pc == ra && stksize == 0) From owner-svn-src-head@freebsd.org Wed Jan 4 21:45:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89DC9C9F125; Wed, 4 Jan 2017 21:45:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 523C812D8; Wed, 4 Jan 2017 21:45:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::edbb:2c55:e474:cdd2] (unknown [IPv6:2001:7b8:3a7:0:edbb:2c55:e474:cdd2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B4DE936CFF; Wed, 4 Jan 2017 22:45:51 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_DCD0AA8A-28DA-48C7-B47E-9FB9FD16D771"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r310889 - head/tools/build/mk From: Dimitry Andric In-Reply-To: <201612310607.uBV67mVO019147@repo.freebsd.org> Date: Wed, 4 Jan 2017 22:45:46 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201612310607.uBV67mVO019147@repo.freebsd.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 21:45:55 -0000 --Apple-Mail=_DCD0AA8A-28DA-48C7-B47E-9FB9FD16D771 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 31 Dec 2016, at 07:07, Jung-uk Kim wrote: >=20 > Author: jkim > Date: Sat Dec 31 06:07:48 2016 > New Revision: 310889 > URL: https://svnweb.freebsd.org/changeset/base/310889 >=20 > Log: > Do not remove llvm-objdump. It is installed by default since = r310840. >=20 > Modified: > head/tools/build/mk/OptionalObsoleteFiles.inc >=20 > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 31 = 03:07:48 2016 (r310888) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 31 = 06:07:48 2016 (r310889) > @@ -1484,7 +1484,6 @@ OLD_FILES+=3Dusr/bin/llvm-link > OLD_FILES+=3Dusr/bin/llvm-lto > OLD_FILES+=3Dusr/bin/llvm-mc > OLD_FILES+=3Dusr/bin/llvm-nm > -OLD_FILES+=3Dusr/bin/llvm-objdump > OLD_FILES+=3Dusr/bin/llvm-pdbdump > OLD_FILES+=3Dusr/bin/llvm-rtdyld > OLD_FILES+=3Dusr/bin/llvm-symbolizer This block is under MK_CLANG_EXTRAS. Shouldn't llvm-objdump be moved to the MK_CLANG block just above instead? Otherwise it would never be cleaned up, if somebody disabled llvm/clang completely. -Dimitry --Apple-Mail=_DCD0AA8A-28DA-48C7-B47E-9FB9FD16D771 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlhtbQ8ACgkQsF6jCi4glqOX/wCg/xD3xzlHp2MoLgz4xRBnpG6i SBMAniJMa1gmVN20FuK95RW25Pm6e2sO =vRhu -----END PGP SIGNATURE----- --Apple-Mail=_DCD0AA8A-28DA-48C7-B47E-9FB9FD16D771-- From owner-svn-src-head@freebsd.org Wed Jan 4 21:55:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4979C9F3F7; Wed, 4 Jan 2017 21:55:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3E8D19FA; Wed, 4 Jan 2017 21:55:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04Ltqmr013028; Wed, 4 Jan 2017 21:55:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04Ltq2e013027; Wed, 4 Jan 2017 21:55:52 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201701042155.v04Ltq2e013027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 4 Jan 2017 21:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311311 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 21:55:53 -0000 Author: jkim Date: Wed Jan 4 21:55:52 2017 New Revision: 311311 URL: https://svnweb.freebsd.org/changeset/base/311311 Log: Remove llvm-objdump when Clang is disabled. It was missed in r310889. Submitted by: dim Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jan 4 21:47:39 2017 (r311310) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jan 4 21:55:52 2017 (r311311) @@ -1348,6 +1348,7 @@ OLD_FILES+=usr/bin/clang OLD_FILES+=usr/bin/clang++ OLD_FILES+=usr/bin/clang-cpp OLD_FILES+=usr/bin/clang-tblgen +OLD_FILES+=usr/bin/llvm-objdump OLD_FILES+=usr/bin/llvm-tblgen OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/asan_interface.h From owner-svn-src-head@freebsd.org Wed Jan 4 22:17:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EDB1C9FFE2; Wed, 4 Jan 2017 22:17:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43A75108F; Wed, 4 Jan 2017 22:17:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x244.google.com with SMTP id e1so296748qkh.1; Wed, 04 Jan 2017 14:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CGhBoZZ1mBQF4htyJkYVgfit6xiFDAh4RfFIXDZ0QHw=; b=PudqMf3bURN5faUctYnRn5ktBv7q8dpYZcLy/mNpFQBD1JWNz7aTp3H1oDpFwy5WyS yVkmm3R7qQzP/oD1AcYjIDr+YD7G/N9h+8IQJqfoyyL/bFny5cH05VcSXYGLoJ5JG1bT f0ywvEc0NDFkI3V36BNOZtoASW0fErMkoqinsJG9D+M5crmW6Kpmz3zzXJGmZM5ped/G JPH5w7XN0KxUMvoSyE7GAt3b9I9F5GhoRuyYN8fVa8p+cJaia7pjDWZFkqNnQByns4dx E6YHCRnSNR2iDHlZGjr8zXG/2LWN9JG+TmIsmYZ1otHgfzlRHoaYWBqCH+Z4O//NOml6 GVHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CGhBoZZ1mBQF4htyJkYVgfit6xiFDAh4RfFIXDZ0QHw=; b=RAUNwKpnk+EhTqy3lICUiaNtWWH/RPzhmhdChc2C232Dw3iSfEOX3+OzWJyEu6Qz99 hfKE3zoghwrP3KzKV9BcZkYI+ytYwYKSSm/cQwH5yrD6MGbLHERJEUfjcyFIFb2hNLGA p0ML4au6oNcpHfB708VlTYfiziGTeehwGiZJ2L3aiQVqLCvD1nvpEQ3c0goe9aDZqX+i c71yFGuaXryzsDUmT4Sype6BwWp35d7yED/JGW/ZWN54DIC8x/rWNXlyVnYby6t8qUK7 ALzS7ZDPk8zxUIORDXbgRxp+GBv9GMYR3aNXyqVrB4L1jpxIYTSypZR7buIUQcWGeqAn SyUA== X-Gm-Message-State: AIkVDXJGninoXOPRv5rY1mQxPyrJ6Cw6SC8vGE0x3IjuQxdYBGh3fv8lIwv9OycCm9MR8ez74217fYJ1C9kqfA== X-Received: by 10.55.122.134 with SMTP id v128mr63345511qkc.111.1483568250321; Wed, 04 Jan 2017 14:17:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.83.133 with HTTP; Wed, 4 Jan 2017 14:17:29 -0800 (PST) In-Reply-To: <201701042026.v04KQggH076026@repo.freebsd.org> References: <201701042026.v04KQggH076026@repo.freebsd.org> From: Ngie Cooper Date: Wed, 4 Jan 2017 14:17:29 -0800 Message-ID: Subject: Re: svn commit: r311305 - in head/sys: cam cam/ctl cam/scsi dev/aac dev/aacraid dev/advansys dev/aha dev/ahb dev/ahci dev/aic dev/aic7xxx dev/amr dev/arcmsr dev/ata dev/buslogic dev/ciss dev/dpt dev/es... To: Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 22:17:31 -0000 On Wed, Jan 4, 2017 at 12:26 PM, Alan Somers wrote: > Author: asomers > Date: Wed Jan 4 20:26:42 2017 > New Revision: 311305 > URL: https://svnweb.freebsd.org/changeset/base/311305 > > Log: > Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name) > > The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are > fixed-length strings. AFAICT the only place they're read is in > sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. > However, the kernel doesn't null-terminate them. A bunch of copy-pasted code > uses strncpy to write them, and doesn't guarantee null-termination. For at > least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually > overflows. You can see the result by doing "camcontrol negotiate da0 -v". > > This change null-terminates those fields everywhere they're set in the > kernel. It also shortens a few strings to ensure they'll fit within the > 16-character field. > > PR: 215474 > Reported by: Coverity > CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 > CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 > CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 > CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 > CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 > CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 > CID: 1010035 1010036 1010042 1010041 1010040 1010039 > Reviewed by: imp, sephe, slm > MFC after: 4 weeks > Sponsored by: Spectra Logic Corp > Differential Revision: https://reviews.freebsd.org/D9037 > Differential Revision: https://reviews.freebsd.org/D9038 Awesome -- after I make my pass at bsnmp and netbsd-tests, I'll loop back around to help out with writing tests for cam(3). Cheers, -Ngie From owner-svn-src-head@freebsd.org Wed Jan 4 22:27:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F75FC9F648; Wed, 4 Jan 2017 22:27:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D464C14CD; Wed, 4 Jan 2017 22:27:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04MRKVt027328; Wed, 4 Jan 2017 22:27:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04MRJbh027321; Wed, 4 Jan 2017 22:27:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701042227.v04MRJbh027321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Jan 2017 22:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311336 - in head/sys: dev/agp kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 22:27:21 -0000 Author: glebius Date: Wed Jan 4 22:27:19 2017 New Revision: 311336 URL: https://svnweb.freebsd.org/changeset/base/311336 Log: Move bogus_page declaration to vm_page.h and initialization to vm_page.c. Reviewed by: kib Modified: head/sys/dev/agp/agp_i810.c head/sys/kern/kern_sendfile.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cluster.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pager.c Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Wed Jan 4 22:25:57 2017 (r311335) +++ head/sys/dev/agp/agp_i810.c Wed Jan 4 22:27:19 2017 (r311336) @@ -1932,8 +1932,6 @@ DRIVER_MODULE(agp_i810, vgapci, agp_i810 MODULE_DEPEND(agp_i810, agp, 1, 1, 1); MODULE_DEPEND(agp_i810, pci, 1, 1, 1); -extern vm_page_t bogus_page; - void agp_intel_gtt_clear_range(device_t dev, u_int first_entry, u_int num_entries) { Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Wed Jan 4 22:25:57 2017 (r311335) +++ head/sys/kern/kern_sendfile.c Wed Jan 4 22:27:19 2017 (r311336) @@ -62,8 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include -extern vm_page_t bogus_page; - /* * Structure describing a single sendfile(2) I/O, which may consist of * several underlying pager I/Os. Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Jan 4 22:25:57 2017 (r311335) +++ head/sys/kern/vfs_bio.c Wed Jan 4 22:27:19 2017 (r311336) @@ -288,15 +288,6 @@ static int bufspace_request; static int bd_speedupreq; /* - * bogus page -- for I/O to/from partially complete buffers - * this is a temporary solution to the problem, but it is not - * really that bad. it would be better to split the buffer - * for input in the case of buffers partially already in memory, - * but the code is intricate enough already. - */ -vm_page_t bogus_page; - -/* * Synchronization (sleep/wakeup) variable for active buffer space requests. * Set when wait starts, cleared prior to wakeup(). * Used in runningbufwakeup() and waitrunningbufspace(). @@ -1115,9 +1106,6 @@ bufinit(void) hifreebuffers = (3 * lofreebuffers) / 2; numfreebuffers = nbuf; - bogus_page = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | - VM_ALLOC_NORMAL | VM_ALLOC_WIRED); - /* Setup the kva and free list allocators. */ vmem_set_reclaim(buffer_arena, bufkva_reclaim); buf_zone = uma_zcache_create("buf free cache", sizeof(struct buf), Modified: head/sys/kern/vfs_cluster.c ============================================================================== --- head/sys/kern/vfs_cluster.c Wed Jan 4 22:25:57 2017 (r311335) +++ head/sys/kern/vfs_cluster.c Wed Jan 4 22:27:19 2017 (r311336) @@ -81,9 +81,6 @@ static int read_min = 1; SYSCTL_INT(_vfs, OID_AUTO, read_min, CTLFLAG_RW, &read_min, 0, "Cluster read min block count"); -/* Page expended to mark partially backed buffers */ -extern vm_page_t bogus_page; - /* * Read data to a buf, including read-ahead if we find this to be beneficial. * cluster_read replaces bread. Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Jan 4 22:25:57 2017 (r311335) +++ head/sys/vm/vm_page.c Wed Jan 4 22:27:19 2017 (r311336) @@ -131,6 +131,12 @@ struct mtx_padalign vm_page_queue_free_m struct mtx_padalign pa_lock[PA_LOCK_COUNT]; +/* + * bogus page -- for I/O to/from partially complete buffers, + * or for paging into sparsely invalid regions. + */ +vm_page_t bogus_page; + vm_page_t vm_page_array; long vm_page_array_size; long first_page; @@ -158,7 +164,7 @@ static void vm_page_alloc_check(vm_page_ static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(uint8_t queue, vm_page_t m); static void vm_page_free_wakeup(void); -static void vm_page_init_fakepg(void *dummy); +static void vm_page_init(void *dummy); static int vm_page_insert_after(vm_page_t m, vm_object_t object, vm_pindex_t pindex, vm_page_t mpred); static void vm_page_insert_radixdone(vm_page_t m, vm_object_t object, @@ -166,14 +172,16 @@ static void vm_page_insert_radixdone(vm_ static int vm_page_reclaim_run(int req_class, u_long npages, vm_page_t m_run, vm_paddr_t high); -SYSINIT(vm_page, SI_SUB_VM, SI_ORDER_SECOND, vm_page_init_fakepg, NULL); +SYSINIT(vm_page, SI_SUB_VM, SI_ORDER_SECOND, vm_page_init, NULL); static void -vm_page_init_fakepg(void *dummy) +vm_page_init(void *dummy) { fakepg_zone = uma_zcreate("fakepg", sizeof(struct vm_page), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM); + bogus_page = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | + VM_ALLOC_NORMAL | VM_ALLOC_WIRED); } /* Make sure that u_long is at least 64 bits when PAGE_SIZE is 32K. */ Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Jan 4 22:25:57 2017 (r311335) +++ head/sys/vm/vm_page.h Wed Jan 4 22:27:19 2017 (r311336) @@ -243,6 +243,8 @@ extern struct vm_domain vm_dom[MAXMEMDOM #define vm_pagequeue_unlock(pq) mtx_unlock(&(pq)->pq_mutex) #ifdef _KERNEL +extern vm_page_t bogus_page; + static __inline void vm_pagequeue_cnt_add(struct vm_pagequeue *pq, int addend) { Modified: head/sys/vm/vm_pager.c ============================================================================== --- head/sys/vm/vm_pager.c Wed Jan 4 22:25:57 2017 (r311335) +++ head/sys/vm/vm_pager.c Wed Jan 4 22:27:19 2017 (r311336) @@ -84,8 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include -extern vm_page_t bogus_page; - int cluster_pbuf_freecnt = -1; /* unlimited to begin with */ struct buf *swbuf; From owner-svn-src-head@freebsd.org Wed Jan 4 22:31:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38925C9F71E; Wed, 4 Jan 2017 22:31:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08539199D; Wed, 4 Jan 2017 22:31:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04MVAHa029719; Wed, 4 Jan 2017 22:31:10 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04MVAdc029718; Wed, 4 Jan 2017 22:31:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701042231.v04MVAdc029718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Jan 2017 22:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311338 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 22:31:11 -0000 Author: glebius Date: Wed Jan 4 22:31:09 2017 New Revision: 311338 URL: https://svnweb.freebsd.org/changeset/base/311338 Log: Fix assertion that checks that pages are consecutive to properly handle bogus_page insertion(s). Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Wed Jan 4 22:29:00 2017 (r311337) +++ head/sys/vm/vnode_pager.c Wed Jan 4 22:31:09 2017 (r311338) @@ -974,10 +974,14 @@ vnode_pager_generic_getpages(struct vnod #ifdef INVARIANTS KASSERT(bp->b_npages <= nitems(bp->b_pages), ("%s: buf %p overflowed", __func__, bp)); - for (int j = 1; j < bp->b_npages; j++) - KASSERT(bp->b_pages[j]->pindex - 1 == - bp->b_pages[j - 1]->pindex, - ("%s: pages array not consecutive, bp %p", __func__, bp)); + for (int j = 1, prev = 1; j < bp->b_npages; j++) { + if (bp->b_pages[j] == bogus_page) + continue; + KASSERT(bp->b_pages[j]->pindex - bp->b_pages[prev]->pindex == + j - prev, ("%s: pages array not consecutive, bp %p", + __func__, bp)); + prev = j; + } #endif /* From owner-svn-src-head@freebsd.org Wed Jan 4 23:22:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C25F8C9F6C2; Wed, 4 Jan 2017 23:22:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 922CF16E7; Wed, 4 Jan 2017 23:22:35 +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 v04NMY2E052411; Wed, 4 Jan 2017 23:22:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04NMYg1052410; Wed, 4 Jan 2017 23:22:34 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701042322.v04NMYg1052410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 4 Jan 2017 23:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311340 - head/usr.bin/tail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 23:22:35 -0000 Author: asomers Date: Wed Jan 4 23:22:34 2017 New Revision: 311340 URL: https://svnweb.freebsd.org/changeset/base/311340 Log: Misc Coverity fixes for tail(1) CID 1006402: Initialize stack variable CID 271580: Don't leak memory when ENOMEM. Reported by: Coverity CID: 271580 1006402 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.bin/tail/reverse.c Modified: head/usr.bin/tail/reverse.c ============================================================================== --- head/usr.bin/tail/reverse.c Wed Jan 4 22:32:17 2017 (r311339) +++ head/usr.bin/tail/reverse.c Wed Jan 4 23:22:34 2017 (r311340) @@ -117,6 +117,7 @@ r_reg(FILE *fp, const char *fn, enum STY map.start = NULL; map.mapoff = map.maxoff = size; map.fd = fileno(fp); + map.maplen = 0; /* * Last char is special, ignore whether newline or not. Note that @@ -205,7 +206,13 @@ r_buf(FILE *fp, const char *fn) (tl->l = malloc(BSZ)) == NULL) { if (!mark) err(1, "malloc"); - tl = enomem ? tl->next : mark; + if (enomem) + tl = tl->next; + else { + if (tl) + free(tl); + tl = mark; + } enomem += tl->len; } else if (mark) { tl->next = mark; From owner-svn-src-head@freebsd.org Wed Jan 4 23:36:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 593E4C9F903; Wed, 4 Jan 2017 23:36:53 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2809D1C3B; Wed, 4 Jan 2017 23:36:53 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id 9BFD430; Thu, 5 Jan 2017 00:36:50 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 8B7E928494; Thu, 5 Jan 2017 00:36:50 +0100 (CET) Date: Thu, 5 Jan 2017 00:36:50 +0100 From: Jilles Tjoelker To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311233 - head/contrib/netbsd-tests/fs/tmpfs Message-ID: <20170104233650.GB17765@stack.nl> References: <201701040246.v042kaEh039041@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701040246.v042kaEh039041@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 23:36:53 -0000 On Wed, Jan 04, 2017 at 02:46:36AM +0000, Ngie Cooper wrote: > Author: ngie > Date: Wed Jan 4 02:46:36 2017 > New Revision: 311233 > URL: https://svnweb.freebsd.org/changeset/base/311233 > Log: > Fix Coverity issues > - Initialize .sun_len before passing it to strlcpy and bind. > - Close fd on error > MFC after: 3 days > Reported by: Coverity > CID: 978283, 979581 > Modified: > head/contrib/netbsd-tests/fs/tmpfs/h_tools.c > Modified: head/contrib/netbsd-tests/fs/tmpfs/h_tools.c > ============================================================================== > --- head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Wed Jan 4 02:43:33 2017 (r311232) > +++ head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Wed Jan 4 02:46:36 2017 (r311233) > @@ -243,12 +243,19 @@ sockets_main(int argc, char **argv) > return EXIT_FAILURE; > } > > +#ifdef __FreeBSD__ > + addr.sun_len = sizeof(addr.sun_path); > + (void)strlcpy(addr.sun_path, argv[1], addr.sun_len); > +#else > (void)strlcpy(addr.sun_path, argv[1], sizeof(addr.sun_path)); > +#endif > addr.sun_family = PF_UNIX; > - > error = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); > if (error == -1) { > warn("connect"); > +#ifdef __FreeBSD__ > + (void)close(fd); > +#endif > return EXIT_FAILURE; > } > It would be better to avoid naming the non-portable sun_len field if it is just to make Coverity happy. I suggest initializing the structure with designated initializers or memset(). Apart from that, the value for sun_len is wrong; it should be the length of the whole structure and not just the sun_path part. Fortunately, the field is ignored by bind(), which uses the addrlen parameter instead. On a more general note, refactoring tests without a way to verify they have not been changed to always pass is risky :( -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Wed Jan 4 23:45:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01A28C9FC74 for ; Wed, 4 Jan 2017 23:45:33 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C87EF12BF for ; Wed, 4 Jan 2017 23:45:32 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: by mail-it0-x232.google.com with SMTP id o141so312754182itc.0 for ; Wed, 04 Jan 2017 15:45:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clockworksquid.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=r58Z7HwALie7FbNNvDktjc+gr49q4rkXL95RIaapBL0=; b=UQFyf9N02Eto9hy73lEA5PdvLpEaWsP7aTY/XFmXy71lBalFILHIROY5smTC0YWQmj zjGvsgG779N1eF9nPlF/6BS2kf4471eP8B/IaDzpg0apPiOZhQZQTL5ckNo8YP47zeZE niNxN+w6kk/EUkJ2R3zpO0AurzxDqRL0D7Mhg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=r58Z7HwALie7FbNNvDktjc+gr49q4rkXL95RIaapBL0=; b=FPBw1zXoTAEFWOOEjHoyEoB4SRaBLd40QWgaFhCe92NLgDMxDTIOT3Eth8TWIjgekZ VM2YGAjIBucC678Rr7dXDzwxkYvuQYII49/7vSn1pETXSn1X6e/wD7tHzKpzPHtWHX8p iEWAaBIIDsViiyEJ2CPM1SYp09/rFg6uJkm3D/LH6q1UGySdYiJ99/1v+635YEhJdLpI zyombCR272in7bP2NL0p/ZAtNevV8pmFmjaxwrZ+ztNoMerczrgOHBcPrOq9QYgYnjvo CU8pZKggh5UmgrKm9BebTJ5xkaSPxlo+rcCClH9rvxwEwzYloNTK3Pa0jV2ULCtcSLNm 6dCg== X-Gm-Message-State: AIkVDXKv9iHeJ4TsAc8F+mkvDoauht4dnaTJqUfVTcRDW0U6E3lzOjFkGD/EotXrfXSj6ppsokOYssJ1XboR2A== X-Received: by 10.36.130.131 with SMTP id t125mr35277134itd.49.1483573531928; Wed, 04 Jan 2017 15:45:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.50.210 with HTTP; Wed, 4 Jan 2017 15:45:11 -0800 (PST) In-Reply-To: <20170104233650.GB17765@stack.nl> References: <201701040246.v042kaEh039041@repo.freebsd.org> <20170104233650.GB17765@stack.nl> From: Juli Mallett Date: Wed, 4 Jan 2017 15:45:11 -0800 Message-ID: Subject: Re: svn commit: r311233 - head/contrib/netbsd-tests/fs/tmpfs To: Jilles Tjoelker Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 23:45:33 -0000 On Wed, Jan 4, 2017 at 3:36 PM, Jilles Tjoelker wrote: > On Wed, Jan 04, 2017 at 02:46:36AM +0000, Ngie Cooper wrote: >> - Initialize .sun_len before passing it to strlcpy and bind. > It would be better to avoid naming the non-portable sun_len field if it > is just to make Coverity happy. I suggest initializing the structure > with designated initializers or memset(). > > Apart from that, the value for sun_len is wrong; it should be the length > of the whole structure and not just the sun_path part. Fortunately, the > field is ignored by bind(), which uses the addrlen parameter instead. This is incorrect, too. It's the length of the sockaddr_un header plus the actual length of the pathname, not the available size of the path field. It's kind of awful that it's inconsistent with the other sockaddr types, but that's the fun of sockaddr_un, to accommodate the fact that the path name is naturally a variable-length field. In fact, the calculation here seems to be wrong, also; we have the SUN_LEN macro in for a reason, and it's what the unix(4) manpage suggests. Of course, sun_len is sort of needlessly obscure and in general it's best for us to fix anything which requires the _len fields to be accurate, and to just ignore them :( From owner-svn-src-head@freebsd.org Thu Jan 5 00:08:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50845C9F82A; Thu, 5 Jan 2017 00:08:06 +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 12DE81E76; Thu, 5 Jan 2017 00:08:06 +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 v05085oX068421; Thu, 5 Jan 2017 00:08:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05085bQ068419; Thu, 5 Jan 2017 00:08:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701050008.v05085bQ068419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Jan 2017 00:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311341 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 00:08:06 -0000 Author: jhb Date: Thu Jan 5 00:08:04 2017 New Revision: 311341 URL: https://svnweb.freebsd.org/changeset/base/311341 Log: Only call stacktrace_subr() from DDB. There was a single call to stacktrace() under an #ifdef DEBUG to obtain a stack trace during a fault that resulted in a function pointer to a printf function being passed to stacktrace_subr() in db_trace.c. The kernel now has existing interfaces for obtaining a stack trace outside of DDB (kdb_backtrace(), or the stack_*() API) that should be used instead. Rather than fix the one call however, remove it since the kernel will dump a trace anyway once it panics. Make stacktrace_subr() static, remove the function pointer and change it to use db_printf() explicitly. Discussed with: kan Sponsored by: DARPA / AFRL Modified: head/sys/mips/include/db_machdep.h head/sys/mips/mips/db_trace.c head/sys/mips/mips/trap.c Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Wed Jan 4 23:22:34 2017 (r311340) +++ head/sys/mips/include/db_machdep.h Thu Jan 5 00:08:04 2017 (r311341) @@ -92,7 +92,6 @@ db_addr_t next_instr_address(db_addr_t, int db_inst_type(int); db_addr_t branch_taken(int inst, db_addr_t pc); -void stacktrace_subr(register_t pc, register_t sp, register_t ra, int (*)(const char *, ...)); int32_t kdbpeek(int *); int64_t kdbpeekd(int *); Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Wed Jan 4 23:22:34 2017 (r311340) +++ head/sys/mips/mips/db_trace.c Thu Jan 5 00:08:04 2017 (r311341) @@ -130,9 +130,8 @@ fn_name(uintptr_t addr) return (buf); } -void -stacktrace_subr(register_t pc, register_t sp, register_t ra, - int (*printfn) (const char *,...)) +static void +stacktrace_subr(register_t pc, register_t sp, register_t ra) { InstFmt i; /* @@ -163,14 +162,14 @@ loop: subr = 0; trapframe = false; if (frames++ > 100) { - (*printfn) ("\nstackframe count exceeded\n"); + db_printf("\nstackframe count exceeded\n"); /* return breaks stackframe-size heuristics with gcc -O2 */ goto finish; /* XXX */ } /* check for bad SP: could foul up next frame */ /*XXX MIPS64 bad: this hard-coded SP is lame */ if (!MIPS_IS_VALID_KERNELADDR(sp)) { - (*printfn) ("SP 0x%jx: not in kernel\n", sp); + db_printf("SP 0x%jx: not in kernel\n", sp); ra = 0; subr = 0; goto done; @@ -215,7 +214,7 @@ loop: /* check for bad PC */ /*XXX MIPS64 bad: These hard coded constants are lame */ if (!MIPS_IS_VALID_KERNELADDR(pc)) { - (*printfn) ("PC 0x%jx: not in kernel\n", pc); + db_printf("PC 0x%jx: not in kernel\n", pc); ra = 0; goto done; } @@ -389,17 +388,17 @@ loop: } done: - (*printfn) ("%s+%x (", fn_name(subr), pc - subr); + db_printf("%s+%jx (", fn_name(subr), (uintmax_t)(pc - subr)); for (j = 0; j < 4; j ++) { if (j > 0) - (*printfn)(","); + db_printf(","); if (valid_args[j]) - (*printfn)("%jx", (uintmax_t)(u_register_t)args[j]); + db_printf("%jx", (uintmax_t)(u_register_t)args[j]); else - (*printfn)("?"); + db_printf("?"); } - (*printfn) (") ra %jx sp %jx sz %d\n", + db_printf(") ra %jx sp %jx sz %d\n", (uintmax_t)(u_register_t) ra, (uintmax_t)(u_register_t) sp, stksize); @@ -420,12 +419,12 @@ done: badvaddr = kdbpeek((int *)TF_REG(sp, BADVADDR)); #endif #undef TF_REG - (*printfn) ("--- exception, cause %jx badvaddr %jx ---\n", + db_printf("--- exception, cause %jx badvaddr %jx ---\n", (uintmax_t)cause, (uintmax_t)badvaddr); goto loop; } else if (ra) { if (pc == ra && stksize == 0) - (*printfn) ("stacktrace: loop!\n"); + db_printf("stacktrace: loop!\n"); else { pc = ra; sp += stksize; @@ -435,9 +434,9 @@ done: } else { finish: if (curproc) - (*printfn) ("pid %d\n", curproc->p_pid); + db_printf("pid %d\n", curproc->p_pid); else - (*printfn) ("curproc NULL\n"); + db_printf("curproc NULL\n"); } } @@ -479,7 +478,7 @@ db_trace_self(void) "move $31, %1\n" /* restore ra */ : "=r" (pc) : "r" (ra)); - stacktrace_subr(pc, sp, ra, db_printf); + stacktrace_subr(pc, sp, ra); return; } @@ -493,7 +492,7 @@ db_trace_thread(struct thread *thr, int sp = (register_t)ctx->pcb_context[PCB_REG_SP]; pc = (register_t)ctx->pcb_context[PCB_REG_PC]; ra = (register_t)ctx->pcb_context[PCB_REG_RA]; - stacktrace_subr(pc, sp, ra, db_printf); + stacktrace_subr(pc, sp, ra); return (0); } Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Wed Jan 4 23:22:34 2017 (r311340) +++ head/sys/mips/mips/trap.c Thu Jan 5 00:08:04 2017 (r311341) @@ -278,11 +278,6 @@ char *trap_type[] = { struct trapdebug trapdebug[TRAPSIZE], *trp = trapdebug; #endif -#if defined(DDB) || defined(DEBUG) -void stacktrace(struct trapframe *); -void logstacktrace(struct trapframe *); -#endif - #define KERNLAND(x) ((vm_offset_t)(x) >= VM_MIN_KERNEL_ADDRESS && (vm_offset_t)(x) < VM_MAX_KERNEL_ADDRESS) #define DELAYBRANCH(x) ((int)(x) < 0) @@ -1082,7 +1077,6 @@ dofault: err: #if !defined(SMP) && defined(DEBUG) - stacktrace(!usermode ? trapframe : td->td_frame); trapDump("trap"); #endif #ifdef SMP @@ -1302,18 +1296,6 @@ MipsEmulateBranch(struct trapframe *fram return (retAddr); } - -#if defined(DDB) || defined(DEBUG) -/* - * Print a stack backtrace. - */ -void -stacktrace(struct trapframe *regs) -{ - stacktrace_subr(regs->pc, regs->sp, regs->ra, printf); -} -#endif - static void log_frame_dump(struct trapframe *frame) { From owner-svn-src-head@freebsd.org Thu Jan 5 00:59:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D64AC9D40B; Thu, 5 Jan 2017 00:59:54 +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 1801A1356; Thu, 5 Jan 2017 00:59:54 +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 v050xrNl088678; Thu, 5 Jan 2017 00:59:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v050xrDZ088677; Thu, 5 Jan 2017 00:59:53 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701050059.v050xrDZ088677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Jan 2017 00:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311343 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 00:59:54 -0000 Author: jhb Date: Thu Jan 5 00:59:53 2017 New Revision: 311343 URL: https://svnweb.freebsd.org/changeset/base/311343 Log: Use db_printsym() to display function names in stack traces. Previously, the stack unwinder tried to locate the start of the function in each frame by walking backwards until it found an instruction that modified the stack pointer and then assumed that was the first instruction in a function. The unwinder would only print a function name if the starting instruction's address was an exact match for a symbol name. However, not all functions generated by modern compilers start off functions with that instruction. For those functions, the unwinder would fail to find a matching function name. As a result, most frames in a stack trace would be printed as raw hex PC's instead of a function name. Stop depending on this incorrect assumption and just use db_printsym() like other platforms to display the function name and offset for each frame. This generates a far more useful stack trace. While here, don't print out curproc's pid at the end of the trace. The pid was always from curproc even if tracing some other process. In addition, remove some rotted comments about hardcoded constants that are no longer hardcoded. Sponsored by: DARPA / AFRL Modified: head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Thu Jan 5 00:26:57 2017 (r311342) +++ head/sys/mips/mips/db_trace.c Thu Jan 5 00:59:53 2017 (r311343) @@ -79,57 +79,6 @@ extern char edata[]; ((vm_offset_t)(reg) >= MIPS_KSEG0_START)) #endif -/* - * Functions ``special'' enough to print by name - */ -#ifdef __STDC__ -#define Name(_fn) { (void*)_fn, # _fn } -#else -#define Name(_fn) { _fn, "_fn"} -#endif -static struct { - void *addr; - char *name; -} names[] = { - - Name(trap), - Name(MipsKernGenException), - Name(MipsUserGenException), - Name(MipsKernIntr), - Name(MipsUserIntr), - Name(cpu_switch), - { - 0, 0 - } -}; - -/* - * Map a function address to a string name, if known; or a hex string. - */ -static const char * -fn_name(uintptr_t addr) -{ - static char buf[17]; - int i = 0; - - db_expr_t diff; - c_db_sym_t sym; - const char *symname; - - diff = 0; - symname = NULL; - sym = db_search_symbol((db_addr_t)addr, DB_STGY_ANY, &diff); - db_symbol_values(sym, &symname, NULL); - if (symname && diff == 0) - return (symname); - - for (i = 0; names[i].name; i++) - if (names[i].addr == (void *)addr) - return (names[i].name); - sprintf(buf, "%jx", (uintmax_t)addr); - return (buf); -} - static void stacktrace_subr(register_t pc, register_t sp, register_t ra) { @@ -163,11 +112,10 @@ loop: trapframe = false; if (frames++ > 100) { db_printf("\nstackframe count exceeded\n"); - /* return breaks stackframe-size heuristics with gcc -O2 */ - goto finish; /* XXX */ + return; } - /* check for bad SP: could foul up next frame */ - /*XXX MIPS64 bad: this hard-coded SP is lame */ + + /* Check for bad SP: could foul up next frame. */ if (!MIPS_IS_VALID_KERNELADDR(sp)) { db_printf("SP 0x%jx: not in kernel\n", sp); ra = 0; @@ -211,8 +159,8 @@ loop: ra = 0; goto done; } - /* check for bad PC */ - /*XXX MIPS64 bad: These hard coded constants are lame */ + + /* Check for bad PC. */ if (!MIPS_IS_VALID_KERNELADDR(pc)) { db_printf("PC 0x%jx: not in kernel\n", pc); ra = 0; @@ -388,7 +336,8 @@ loop: } done: - db_printf("%s+%jx (", fn_name(subr), (uintmax_t)(pc - subr)); + db_printsym(pc, DB_STGY_PROC); + db_printf(" ("); for (j = 0; j < 4; j ++) { if (j > 0) db_printf(","); @@ -431,12 +380,6 @@ done: ra = next_ra; goto loop; } - } else { -finish: - if (curproc) - db_printf("pid %d\n", curproc->p_pid); - else - db_printf("curproc NULL\n"); } } From owner-svn-src-head@freebsd.org Thu Jan 5 01:28:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9EDAC9E1EC; Thu, 5 Jan 2017 01:28:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A983813A1; Thu, 5 Jan 2017 01:28:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v051S8Es000998; Thu, 5 Jan 2017 01:28:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v051S80C000997; Thu, 5 Jan 2017 01:28:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701050128.v051S80C000997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 5 Jan 2017 01:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311345 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 01:28:10 -0000 Author: markj Date: Thu Jan 5 01:28:08 2017 New Revision: 311345 URL: https://svnweb.freebsd.org/changeset/base/311345 Log: Sort includes in kern_exec.c. MFC after: 1 week Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu Jan 5 01:27:53 2017 (r311344) +++ head/sys/kern/kern_exec.c Thu Jan 5 01:28:08 2017 (r311345) @@ -33,39 +33,39 @@ __FBSDID("$FreeBSD$"); #include "opt_vm.h" #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include #include +#include +#include #include #include -#include +#include +#include #include +#include +#include +#include +#include #include #include -#include #include -#include #include #include #include #include #include -#include -#include #include +#include +#include +#include #include +#include +#include #include -#include +#include #ifdef KTRACE #include #endif From owner-svn-src-head@freebsd.org Thu Jan 5 01:44:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D8DEC9E7A9; Thu, 5 Jan 2017 01:44:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D352D1D19; Thu, 5 Jan 2017 01:44:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v051iDV4008582; Thu, 5 Jan 2017 01:44:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v051iCso008577; Thu, 5 Jan 2017 01:44:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701050144.v051iCso008577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 5 Jan 2017 01:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311346 - in head/sys: kern sys vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 01:44:14 -0000 Author: markj Date: Thu Jan 5 01:44:12 2017 New Revision: 311346 URL: https://svnweb.freebsd.org/changeset/base/311346 Log: Add a small allocator for exec_map entries. Upon each execve, we allocate a KVA range for use in copying data to the new image. Pages must be faulted into the range, and when the range is freed, the backing pages are freed and their mappings are destroyed. This is a lot of needless overhead, and the exec_map management becomes a bottleneck when many CPUs are executing execve concurrently. Moreover, the number of available ranges is fixed at 16, which is insufficient on large systems and potentially excessive on 32-bit systems. The new allocator reduces overhead by making exec_map allocations persistent. When a range is freed, pages backing the range are marked clean and made easy to reclaim. With this change, the exec_map is sized based on the number of CPUs. Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8921 Modified: head/sys/kern/kern_exec.c head/sys/sys/imgact.h head/sys/vm/vm_init.c head/sys/vm/vm_kern.c head/sys/vm/vm_kern.h Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu Jan 5 01:28:08 2017 (r311345) +++ head/sys/kern/kern_exec.c Thu Jan 5 01:44:12 2017 (r311346) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -59,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1315,17 +1317,80 @@ err_exit: return (error); } +struct exec_args_kva { + vm_offset_t addr; + SLIST_ENTRY(exec_args_kva) next; +}; + +static DPCPU_DEFINE(struct exec_args_kva *, exec_args_kva); + +static SLIST_HEAD(, exec_args_kva) exec_args_kva_freelist; +static struct mtx exec_args_kva_mtx; + +static void +exec_prealloc_args_kva(void *arg __unused) +{ + struct exec_args_kva *argkva; + u_int i; + + SLIST_INIT(&exec_args_kva_freelist); + mtx_init(&exec_args_kva_mtx, "exec args kva", NULL, MTX_DEF); + for (i = 0; i < exec_map_entries; i++) { + argkva = malloc(sizeof(*argkva), M_PARGS, M_WAITOK); + argkva->addr = kmap_alloc_wait(exec_map, exec_map_entry_size); + SLIST_INSERT_HEAD(&exec_args_kva_freelist, argkva, next); + } +} +SYSINIT(exec_args_kva, SI_SUB_EXEC, SI_ORDER_ANY, exec_prealloc_args_kva, NULL); + +static vm_offset_t +exec_alloc_args_kva(void **cookie) +{ + struct exec_args_kva *argkva; + + argkva = (void *)atomic_readandclear_ptr( + (uintptr_t *)DPCPU_PTR(exec_args_kva)); + if (argkva == NULL) { + mtx_lock(&exec_args_kva_mtx); + while ((argkva = SLIST_FIRST(&exec_args_kva_freelist)) == NULL) + (void)mtx_sleep(&exec_args_kva_freelist, + &exec_args_kva_mtx, 0, "execkva", 0); + SLIST_REMOVE_HEAD(&exec_args_kva_freelist, next); + mtx_unlock(&exec_args_kva_mtx); + } + *(struct exec_args_kva **)cookie = argkva; + return (argkva->addr); +} + +static void +exec_free_args_kva(void *cookie) +{ + struct exec_args_kva *argkva; + vm_offset_t base; + + argkva = cookie; + base = argkva->addr; + + vm_map_madvise(exec_map, base, base + exec_map_entry_size, MADV_FREE); + if (!atomic_cmpset_ptr((uintptr_t *)DPCPU_PTR(exec_args_kva), + (uintptr_t)NULL, (uintptr_t)argkva)) { + mtx_lock(&exec_args_kva_mtx); + SLIST_INSERT_HEAD(&exec_args_kva_freelist, argkva, next); + wakeup_one(&exec_args_kva_freelist); + mtx_unlock(&exec_args_kva_mtx); + } +} + /* * Allocate temporary demand-paged, zero-filled memory for the file name, - * argument, and environment strings. Returns zero if the allocation succeeds - * and ENOMEM otherwise. + * argument, and environment strings. */ int exec_alloc_args(struct image_args *args) { - args->buf = (char *)kmap_alloc_wait(exec_map, PATH_MAX + ARG_MAX); - return (args->buf != NULL ? 0 : ENOMEM); + args->buf = (char *)exec_alloc_args_kva(&args->bufkva); + return (0); } void @@ -1333,8 +1398,7 @@ exec_free_args(struct image_args *args) { if (args->buf != NULL) { - kmap_free_wakeup(exec_map, (vm_offset_t)args->buf, - PATH_MAX + ARG_MAX); + exec_free_args_kva(args->bufkva); args->buf = NULL; } if (args->fname_buf != NULL) { Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Thu Jan 5 01:28:08 2017 (r311345) +++ head/sys/sys/imgact.h Thu Jan 5 01:44:12 2017 (r311346) @@ -42,6 +42,7 @@ struct ucred; struct image_args { char *buf; /* pointer to string buffer */ + void *bufkva; /* cookie for string buffer KVA */ char *begin_argv; /* beginning of argv in buf */ char *begin_envv; /* beginning of envv in buf */ char *endp; /* current `end' pointer of arg & env strings */ Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Thu Jan 5 01:28:08 2017 (r311345) +++ head/sys/vm/vm_init.c Thu Jan 5 01:44:12 2017 (r311346) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -91,10 +92,6 @@ __FBSDID("$FreeBSD$"); long physmem; -static int exec_map_entries = 16; -SYSCTL_INT(_vm, OID_AUTO, exec_map_entries, CTLFLAG_RDTUN, &exec_map_entries, 0, - "Maximum number of simultaneous execs"); - /* * System initialization */ @@ -271,10 +268,19 @@ again: panic("Clean map calculation incorrect"); /* - * Allocate the pageable submaps. + * Allocate the pageable submaps. We may cache an exec map entry per + * CPU, so we therefore need to reserve space for at least ncpu+1 + * entries to avoid deadlock. The exec map is also used by some image + * activators, so we leave a fixed number of pages for their use. */ +#ifdef __LP64__ + exec_map_entries = 8 * mp_ncpus; +#else + exec_map_entries = min(8 * mp_ncpus, 2 * mp_ncpus + 4); +#endif + exec_map_entry_size = round_page(PATH_MAX + ARG_MAX); exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, - exec_map_entries * round_page(PATH_MAX + ARG_MAX), FALSE); + exec_map_entries * exec_map_entry_size + 64 * PAGE_SIZE, FALSE); pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, FALSE); } Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Thu Jan 5 01:28:08 2017 (r311345) +++ head/sys/vm/vm_kern.c Thu Jan 5 01:44:12 2017 (r311346) @@ -97,6 +97,9 @@ CTASSERT((ZERO_REGION_SIZE & PAGE_MASK) /* NB: Used by kernel debuggers. */ const u_long vm_maxuser_address = VM_MAXUSER_ADDRESS; +u_int exec_map_entry_size; +u_int exec_map_entries; + SYSCTL_ULONG(_vm, OID_AUTO, min_kernel_address, CTLFLAG_RD, SYSCTL_NULL_ULONG_PTR, VM_MIN_KERNEL_ADDRESS, "Min kernel address"); Modified: head/sys/vm/vm_kern.h ============================================================================== --- head/sys/vm/vm_kern.h Thu Jan 5 01:28:08 2017 (r311345) +++ head/sys/vm/vm_kern.h Thu Jan 5 01:44:12 2017 (r311346) @@ -61,7 +61,7 @@ */ #ifndef _VM_VM_KERN_H_ -#define _VM_VM_KERN_H_ 1 +#define _VM_VM_KERN_H_ /* Kernel memory management definitions. */ extern vm_map_t kernel_map; @@ -74,5 +74,7 @@ extern struct vmem *transient_arena; extern struct vmem *memguard_arena; extern vm_offset_t swapbkva; extern u_long vm_kmem_size; +extern u_int exec_map_entries; +extern u_int exec_map_entry_size; -#endif /* _VM_VM_KERN_H_ */ +#endif /* _VM_VM_KERN_H_ */ From owner-svn-src-head@freebsd.org Thu Jan 5 02:04:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23CC4C9ED75; Thu, 5 Jan 2017 02:04:55 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C128E1746; Thu, 5 Jan 2017 02:04:54 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0524rxr016948; Thu, 5 Jan 2017 02:04:53 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0524rq1016945; Thu, 5 Jan 2017 02:04:53 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201701050204.v0524rq1016945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 5 Jan 2017 02:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311347 - in head/sys/dev/rtwn/rtl8192c: . pci usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 02:04:55 -0000 Author: kevlo Date: Thu Jan 5 02:04:53 2017 New Revision: 311347 URL: https://svnweb.freebsd.org/changeset/base/311347 Log: In rtl8188eu, read R92C_HSSI_PARAM2(0)) register to detect whether it needs to enable CCK high power feature or not. Reviewed by: avos Modified: head/sys/dev/rtwn/rtl8192c/pci/r92ce_init.c head/sys/dev/rtwn/rtl8192c/r92c_init.c head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Modified: head/sys/dev/rtwn/rtl8192c/pci/r92ce_init.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/pci/r92ce_init.c Thu Jan 5 01:44:12 2017 (r311346) +++ head/sys/dev/rtwn/rtl8192c/pci/r92ce_init.c Thu Jan 5 02:04:53 2017 (r311347) @@ -105,10 +105,6 @@ r92ce_init_bb(struct rtwn_softc *sc) rtwn_setbits_4(sc, R92C_LEDCFG0, 0, 0x00800000); r92c_init_bb_common(sc); - - if (rtwn_bb_read(sc, R92C_HSSI_PARAM2(0)) & - R92C_HSSI_PARAM2_CCK_HIPWR) - sc->sc_flags |= RTWN_FLAG_CCK_HIPWR; } int Modified: head/sys/dev/rtwn/rtl8192c/r92c_init.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_init.c Thu Jan 5 01:44:12 2017 (r311346) +++ head/sys/dev/rtwn/rtl8192c/r92c_init.c Thu Jan 5 02:04:53 2017 (r311347) @@ -159,6 +159,9 @@ r92c_init_bb_common(struct rtwn_softc *s rtwn_delay(sc, 1); } } + + if (rtwn_bb_read(sc, R92C_HSSI_PARAM2(0)) & R92C_HSSI_PARAM2_CCK_HIPWR) + sc->sc_flags |= RTWN_FLAG_CCK_HIPWR; } int Modified: head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Thu Jan 5 01:44:12 2017 (r311346) +++ head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Thu Jan 5 02:04:53 2017 (r311347) @@ -78,10 +78,6 @@ r92cu_init_bb(struct rtwn_softc *sc) rtwn_write_1(sc, R92C_AFE_XTAL_CTRL + 1, 0x80); r92c_init_bb_common(sc); - - if (rtwn_bb_read(sc, R92C_HSSI_PARAM2(0)) & - R92C_HSSI_PARAM2_CCK_HIPWR) - sc->sc_flags |= RTWN_FLAG_CCK_HIPWR; } int From owner-svn-src-head@freebsd.org Thu Jan 5 02:33:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2E6EC9F7BE; Thu, 5 Jan 2017 02:33:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AB041498; Thu, 5 Jan 2017 02:33:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v052XAPt028760; Thu, 5 Jan 2017 02:33:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v052XAi7028759; Thu, 5 Jan 2017 02:33:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701050233.v052XAi7028759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 5 Jan 2017 02:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311348 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 02:33:11 -0000 Author: markj Date: Thu Jan 5 02:33:10 2017 New Revision: 311348 URL: https://svnweb.freebsd.org/changeset/base/311348 Log: Add a reasonable bound on the symbol table index size. Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Thu Jan 5 02:04:53 2017 (r311347) +++ head/lib/libproc/proc_sym.c Thu Jan 5 02:33:10 2017 (r311348) @@ -143,10 +143,12 @@ load_symtab(Elf *e, struct symtab *symta if (scn == NULL) return (-1); - if ((symtab->data = elf_getdata(scn, NULL)) == NULL) + nsyms = shdr.sh_size / shdr.sh_entsize; + if (nsyms > (1 << 20)) return (-1); - nsyms = shdr.sh_size / shdr.sh_entsize; + if ((symtab->data = elf_getdata(scn, NULL)) == NULL) + return (-1); symtab->index = calloc(nsyms, sizeof(u_int)); if (symtab->index == NULL) From owner-svn-src-head@freebsd.org Thu Jan 5 02:47:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A62DFC9FAED; Thu, 5 Jan 2017 02:47:57 +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 75D5A19DD; Thu, 5 Jan 2017 02:47:57 +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 v052luNG032969; Thu, 5 Jan 2017 02:47:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v052lujj032967; Thu, 5 Jan 2017 02:47:56 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701050247.v052lujj032967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 5 Jan 2017 02:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311349 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 02:47:57 -0000 Author: asomers Date: Thu Jan 5 02:47:56 2017 New Revision: 311349 URL: https://svnweb.freebsd.org/changeset/base/311349 Log: tabs -> spaces in etc/mtree MFC after: 4 weeks Modified: head/etc/mtree/BSD.tests.dist head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Jan 5 02:33:10 2017 (r311348) +++ head/etc/mtree/BSD.tests.dist Thu Jan 5 02:47:56 2017 (r311349) @@ -593,9 +593,8 @@ t0 .. .. + bsdcat .. - bsdcat - .. calendar .. cmp Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Thu Jan 5 02:33:10 2017 (r311348) +++ head/etc/mtree/BSD.var.dist Thu Jan 5 02:47:56 2017 (r311349) @@ -28,7 +28,7 @@ /set gname=wheel backups .. - cache mode=0755 + cache mode=0755 .. crash .. From owner-svn-src-head@freebsd.org Thu Jan 5 02:54:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 002CFC9FCA1; Thu, 5 Jan 2017 02:54:04 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B85B51E0E; Thu, 5 Jan 2017 02:54:04 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v052s3Gq036687; Thu, 5 Jan 2017 02:54:03 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v052s3K5036686; Thu, 5 Jan 2017 02:54:03 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201701050254.v052s3K5036686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 5 Jan 2017 02:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311350 - head/sys/dev/advansys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 02:54:05 -0000 Author: rpokala Date: Thu Jan 5 02:54:03 2017 New Revision: 311350 URL: https://svnweb.freebsd.org/changeset/base/311350 Log: Fix whitespace in handling of XPT_PATH_INQ in adw(4). Came across this while doing some other minor CAM cleanup. Whitespace-only change, so not bothering w/ a review. Sponsored by: Panasas Modified: head/sys/dev/advansys/adwcam.c Modified: head/sys/dev/advansys/adwcam.c ============================================================================== --- head/sys/dev/advansys/adwcam.c Thu Jan 5 02:47:56 2017 (r311349) +++ head/sys/dev/advansys/adwcam.c Thu Jan 5 02:54:03 2017 (r311350) @@ -712,10 +712,10 @@ adw_action(struct cam_sim *sim, union cc strlcpy(cpi->hba_vid, "AdvanSys", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; From owner-svn-src-head@freebsd.org Thu Jan 5 03:08:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E534CC9C211; Thu, 5 Jan 2017 03:08:59 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFD361A16; Thu, 5 Jan 2017 03:08:59 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0538w7P041842; Thu, 5 Jan 2017 03:08:58 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0538v74041832; Thu, 5 Jan 2017 03:08:57 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201701050308.v0538v74041832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 5 Jan 2017 03:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311351 - in head/sys/dev: aha ahb aic ciss dpt firewire mly ncr nvme twa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 03:09:00 -0000 Author: rpokala Date: Thu Jan 5 03:08:57 2017 New Revision: 311351 URL: https://svnweb.freebsd.org/changeset/base/311351 Log: In the same vein as r311350, fix whitespace in handling of XPT_PATH_INQ in several more drivers. Sponsored by: Panasas Modified: head/sys/dev/aha/aha.c head/sys/dev/ahb/ahb.c head/sys/dev/aic/aic.c head/sys/dev/ciss/ciss.c head/sys/dev/dpt/dpt_scsi.c head/sys/dev/firewire/sbp.c head/sys/dev/mly/mly.c head/sys/dev/ncr/ncr.c head/sys/dev/nvme/nvme_sim.c head/sys/dev/twa/tw_osl_cam.c Modified: head/sys/dev/aha/aha.c ============================================================================== --- head/sys/dev/aha/aha.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/aha/aha.c Thu Jan 5 03:08:57 2017 (r311351) @@ -951,10 +951,10 @@ ahaaction(struct cam_sim *sim, union ccb strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: head/sys/dev/ahb/ahb.c ============================================================================== --- head/sys/dev/ahb/ahb.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/ahb/ahb.c Thu Jan 5 03:08:57 2017 (r311351) @@ -1182,10 +1182,10 @@ ahbaction(struct cam_sim *sim, union ccb strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: head/sys/dev/aic/aic.c ============================================================================== --- head/sys/dev/aic/aic.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/aic/aic.c Thu Jan 5 03:08:57 2017 (r311351) @@ -280,7 +280,7 @@ aic_action(struct cam_sim *sim, union cc cpi->max_lun = 7; cpi->initiator_id = aic->initiator; cpi->bus_id = cam_sim_bus(sim); - cpi->base_transfer_speed = 3300; + cpi->base_transfer_speed = 3300; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/ciss/ciss.c Thu Jan 5 03:08:57 2017 (r311351) @@ -3027,10 +3027,10 @@ ciss_cam_action(struct cam_sim *sim, uni cpi->max_lun = 0; /* 'logical drive' channel only */ cpi->initiator_id = sc->ciss_cfg->max_logical_supported; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strlcpy(cpi->hba_vid, "CISS", HBA_IDLEN); - strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); - cpi->unit_number = cam_sim_unit(sim); - cpi->bus_id = cam_sim_bus(sim); + strlcpy(cpi->hba_vid, "CISS", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + cpi->unit_number = cam_sim_unit(sim); + cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 132 * 1024; /* XXX what to set this to? */ cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/dpt/dpt_scsi.c ============================================================================== --- head/sys/dev/dpt/dpt_scsi.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/dpt/dpt_scsi.c Thu Jan 5 03:08:57 2017 (r311351) @@ -1031,10 +1031,10 @@ dpt_action(struct cam_sim *sim, union cc strlcpy(cpi->hba_vid, "DPT", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/firewire/sbp.c Thu Jan 5 03:08:57 2017 (r311351) @@ -2488,10 +2488,10 @@ END_DEBUG strlcpy(cpi->hba_vid, "SBP", HBA_IDLEN); strlcpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); cpi->unit_number = sim->unit_number; - cpi->transport = XPORT_SPI; /* XX should have a FireWire */ - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; /* XX should have a FireWire */ + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: head/sys/dev/mly/mly.c ============================================================================== --- head/sys/dev/mly/mly.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/mly/mly.c Thu Jan 5 03:08:57 2017 (r311351) @@ -2110,10 +2110,10 @@ mly_cam_action(struct cam_sim *sim, unio cpi->max_lun = MLY_MAX_LUNS - 1; cpi->initiator_id = sc->mly_controllerparam->initiator_id; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strlcpy(cpi->hba_vid, "Mylex", HBA_IDLEN); - strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); - cpi->unit_number = cam_sim_unit(sim); - cpi->bus_id = cam_sim_bus(sim); + strlcpy(cpi->hba_vid, "Mylex", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + cpi->unit_number = cam_sim_unit(sim); + cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 132 * 1024; /* XXX what to set this to? */ cpi->transport = XPORT_SPI; cpi->transport_version = 2; Modified: head/sys/dev/ncr/ncr.c ============================================================================== --- head/sys/dev/ncr/ncr.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/ncr/ncr.c Thu Jan 5 03:08:57 2017 (r311351) @@ -4351,10 +4351,10 @@ ncr_action (struct cam_sim *sim, union c strlcpy(cpi->hba_vid, "Symbios", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/nvme/nvme_sim.c Thu Jan 5 03:08:57 2017 (r311351) @@ -185,10 +185,10 @@ nvme_sim_action(struct cam_sim *sim, uni strlcpy(cpi->hba_vid, "NVMe", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_NVME; /* XXX XPORT_PCIE ? */ - cpi->transport_version = 1; /* XXX Get PCIe spec ? */ - cpi->protocol = PROTO_NVME; - cpi->protocol_version = NVME_REV_1; /* Groks all 1.x NVMe cards */ + cpi->transport = XPORT_NVME; /* XXX XPORT_PCIE ? */ + cpi->transport_version = 1; /* XXX Get PCIe spec ? */ + cpi->protocol = PROTO_NVME; + cpi->protocol_version = NVME_REV_1; /* Groks all 1.x NVMe cards */ cpi->xport_specific.nvme.nsid = ns->id; cpi->ccb_h.status = CAM_REQ_CMP; break; Modified: head/sys/dev/twa/tw_osl_cam.c ============================================================================== --- head/sys/dev/twa/tw_osl_cam.c Thu Jan 5 02:54:03 2017 (r311350) +++ head/sys/dev/twa/tw_osl_cam.c Thu Jan 5 03:08:57 2017 (r311351) @@ -427,11 +427,11 @@ twa_action(struct cam_sim *sim, union cc strlcpy(path_inq->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(path_inq->hba_vid, "3ware", HBA_IDLEN); strlcpy(path_inq->dev_name, cam_sim_name(sim), DEV_IDLEN); - path_inq->transport = XPORT_SPI; - path_inq->transport_version = 2; - path_inq->protocol = PROTO_SCSI; - path_inq->protocol_version = SCSI_REV_2; - path_inq->maxio = TW_CL_MAX_IO_SIZE; + path_inq->transport = XPORT_SPI; + path_inq->transport_version = 2; + path_inq->protocol = PROTO_SCSI; + path_inq->protocol_version = SCSI_REV_2; + path_inq->maxio = TW_CL_MAX_IO_SIZE; ccb_h->status = CAM_REQ_CMP; xpt_done(ccb); break; From owner-svn-src-head@freebsd.org Thu Jan 5 03:11:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C65FCC9C4CE for ; Thu, 5 Jan 2017 03:11:23 +0000 (UTC) (envelope-from apache@tk2-215-17125.vs.sakura.ne.jp) Received: from tk2-215-17125.vs.sakura.ne.jp (160.16.78.129.v6.sakura.ne.jp [IPv6:2001:e42:102:1515:160:16:78:129]) by mx1.freebsd.org (Postfix) with ESMTP id 9E94E1D83 for ; Thu, 5 Jan 2017 03:11:23 +0000 (UTC) (envelope-from apache@tk2-215-17125.vs.sakura.ne.jp) Received: by tk2-215-17125.vs.sakura.ne.jp (Postfix, from userid 48) id 28B55C910F; Thu, 5 Jan 2017 12:09:34 +0900 (JST) To: svn-src-head@freebsd.org Subject: Notification status of your delivery (USPS 8230681) X-PHP-Originating-Script: 48:post.php(5) : regexp code(1) : eval()'d code(17) : eval()'d code Date: Thu, 5 Jan 2017 12:09:34 +0900 MIME-Version: 1.0 Message-ID: Reply-To: "USPS TechConnect" From: "USPS TechConnect" Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 03:11:23 -0000 Dear Customer, Your item has arrived at the USPS Post Office at January 03, but the courier was unable to deliver parcel to you. Please review delivery label in attachment! Most sincerely, Roger Kane, USPS Parcels Delivery Agent. From owner-svn-src-head@freebsd.org Thu Jan 5 03:13:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B198C9C515; Thu, 5 Jan 2017 03:13:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5F41EB3; Thu, 5 Jan 2017 03:13:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v053DjR7045549; Thu, 5 Jan 2017 03:13:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v053DjVg045548; Thu, 5 Jan 2017 03:13:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701050313.v053DjVg045548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 5 Jan 2017 03:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311352 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 03:13:46 -0000 Author: markj Date: Thu Jan 5 03:13:45 2017 New Revision: 311352 URL: https://svnweb.freebsd.org/changeset/base/311352 Log: Remove a redundant use of min(). Reported by: rpokala X-MFC With: r311346 Modified: head/sys/vm/vm_init.c Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Thu Jan 5 03:08:57 2017 (r311351) +++ head/sys/vm/vm_init.c Thu Jan 5 03:13:45 2017 (r311352) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -276,7 +275,7 @@ again: #ifdef __LP64__ exec_map_entries = 8 * mp_ncpus; #else - exec_map_entries = min(8 * mp_ncpus, 2 * mp_ncpus + 4); + exec_map_entries = 2 * mp_ncpus + 4; #endif exec_map_entry_size = round_page(PATH_MAX + ARG_MAX); exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, From owner-svn-src-head@freebsd.org Thu Jan 5 03:25:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46C07C9C947; Thu, 5 Jan 2017 03:25:18 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F085616CA; Thu, 5 Jan 2017 03:25:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v053PH3V049863; Thu, 5 Jan 2017 03:25:17 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v053PHa8049862; Thu, 5 Jan 2017 03:25:17 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201701050325.v053PHa8049862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 5 Jan 2017 03:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311354 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 03:25:18 -0000 Author: hrs Date: Thu Jan 5 03:25:16 2017 New Revision: 311354 URL: https://svnweb.freebsd.org/changeset/base/311354 Log: Fix build when WITHOUT_INET6 is defined. Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Thu Jan 5 03:20:00 2017 (r311353) +++ head/usr.sbin/inetd/inetd.c Thu Jan 5 03:25:16 2017 (r311354) @@ -315,9 +315,11 @@ whichaf(struct request_info *req) sa = (struct sockaddr *)req->client->sin; if (sa == NULL) return AF_UNSPEC; +#ifdef INET6 if (sa->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr)) return AF_INET; +#endif return sa->sa_family; } @@ -1283,6 +1285,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) syslog(LOG_ERR, "setsockopt (SO_PRIVSTATE): %m"); #endif /* tftpd opens a new connection then needs more infos */ +#ifdef INET6 if ((sep->se_family == AF_INET6) && (strcmp(sep->se_proto, "udp") == 0) && (sep->se_accept == 0) && @@ -1295,6 +1298,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) (char *)&flag, sizeof (flag)) < 0) syslog(LOG_ERR, "setsockopt (IPV6_V6ONLY): %m"); } +#endif #undef turnon #ifdef IPSEC ipsecsetup(sep); @@ -1332,7 +1336,9 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) u_int i; socklen_t len = sep->se_ctrladdr_size; struct netconfig *netid, *netid2 = NULL; +#ifdef INET6 struct sockaddr_in sock; +#endif struct netbuf nbuf, nbuf2; if (getsockname(sep->se_fd, @@ -1347,6 +1353,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) nbuf.len = sep->se_ctrladdr.sa_len; if (sep->se_family == AF_INET) netid = sep->se_socktype==SOCK_DGRAM? udpconf:tcpconf; +#ifdef INET6 else { netid = sep->se_socktype==SOCK_DGRAM? udp6conf:tcp6conf; if (!sep->se_nomapped) { /* INET and INET6 */ @@ -1358,6 +1365,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) sock.sin_port = sep->se_ctrladdr6.sin6_port; } } +#endif if (debug) print_service("REG ", sep); for (i = sep->se_rpc_lowvers; i <= sep->se_rpc_highvers; i++) { From owner-svn-src-head@freebsd.org Thu Jan 5 04:49:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E2EDC9E41B; Thu, 5 Jan 2017 04:49:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1A251FEC; Thu, 5 Jan 2017 04:49:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v054nOjF082558; Thu, 5 Jan 2017 04:49:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v054nORi082557; Thu, 5 Jan 2017 04:49:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701050449.v054nORi082557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 5 Jan 2017 04:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311360 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 04:49:25 -0000 Author: adrian Date: Thu Jan 5 04:49:23 2017 New Revision: 311360 URL: https://svnweb.freebsd.org/changeset/base/311360 Log: [net80211] add VHT media types in the media layer. Modified: head/sys/net/if_media.h Modified: head/sys/net/if_media.h ============================================================================== --- head/sys/net/if_media.h Thu Jan 5 04:22:03 2017 (r311359) +++ head/sys/net/if_media.h Thu Jan 5 04:49:23 2017 (r311360) @@ -573,6 +573,7 @@ struct ifmedia_description { { IFM_IEEE80211_OFDM4, "OFDM/4.5Mbps" }, \ { IFM_IEEE80211_OFDM27, "OFDM/27Mbps" }, \ { IFM_IEEE80211_MCS, "MCS" }, \ + { IFM_IEEE80211_VHT, "VHT" }, \ { 0, NULL }, \ } @@ -612,6 +613,7 @@ struct ifmedia_description { { IFM_IEEE80211_OFDM4, "OFDM4.5" }, \ { IFM_IEEE80211_OFDM27, "OFDM27" }, \ { IFM_IEEE80211_MCS, "MCS" }, \ + { IFM_IEEE80211_VHT, "VHT" }, \ { 0, NULL }, \ } @@ -634,6 +636,8 @@ struct ifmedia_description { { IFM_IEEE80211_FH, "fh" }, \ { IFM_IEEE80211_11NA, "11na" }, \ { IFM_IEEE80211_11NG, "11ng" }, \ + { IFM_IEEE80211_VHT5G, "11ac" }, \ + { IFM_IEEE80211_VHT2G, "11ac2" }, \ { 0, NULL }, \ } From owner-svn-src-head@freebsd.org Thu Jan 5 04:56:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9628C9E672; Thu, 5 Jan 2017 04:56:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4159150F; Thu, 5 Jan 2017 04:56:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v054u4sO086577; Thu, 5 Jan 2017 04:56:04 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v054u4p9086576; Thu, 5 Jan 2017 04:56:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701050456.v054u4p9086576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 5 Jan 2017 04:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311361 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 04:56:06 -0000 Author: adrian Date: Thu Jan 5 04:56:04 2017 New Revision: 311361 URL: https://svnweb.freebsd.org/changeset/base/311361 Log: [ath_hal] mad, mad hacks to get some semblence of correct HT/40 channels populated. The HT40 channel population logic was "just" doing pairs of channels starting with the band entry frequency. Trouble is, a lot of the rules start way off at 5120MHz, which isn't a valid 5GHz channel. Then, eg for HT40U, it would populate: * (5120,5140) * (5160,5180) * (5200,5220) * (5240,5260) .. as the HT40U pairs, with the first being the primary channel. Channel 36 is 5180MHz, and since it's not a primary channel here, it wouldn't populate it. Then, the next HT40U would be 5200/5220, which is highly wrong. HT40D had the same problem. So, this just forces that 5GHz HT40 channels start at channel 36 (5180), no matter what the band edge says. This includes eg doing 4.9GHz channels. This erm, meant that the HT40 channels for the low band was always wrong. Oops! Tested: * AR9380, STA mode * AR9344 SoC, AP mode MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain.c Thu Jan 5 04:49:23 2017 (r311360) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Thu Jan 5 04:56:04 2017 (r311361) @@ -426,6 +426,10 @@ addchan(struct ath_hal *ah, struct ieee8 if (*nchans >= maxchans) return (HAL_ENOMEM); + HALDEBUG(ah, HAL_DEBUG_REGDOMAIN, + "%s: %d: freq=%d, flags=0x%08x\n", + __func__, *nchans, (int) freq, flags); + c = &chans[(*nchans)++]; c->ic_freq = freq; c->ic_flags = flags; @@ -439,7 +443,7 @@ addchan(struct ath_hal *ah, struct ieee8 static int copychan_prev(struct ath_hal *ah, struct ieee80211_channel chans[], - u_int maxchans, int *nchans, uint16_t freq) + u_int maxchans, int *nchans, uint16_t freq, uint32_t flags) { struct ieee80211_channel *c; @@ -449,6 +453,10 @@ copychan_prev(struct ath_hal *ah, struct if (*nchans >= maxchans) return (HAL_ENOMEM); + HALDEBUG(ah, HAL_DEBUG_REGDOMAIN, + "%s: %d: freq=%d, flags=0x%08x\n", + __func__, *nchans, (int) freq, flags); + c = &chans[(*nchans)++]; c[0] = c[-1]; c->ic_freq = freq; @@ -469,9 +477,13 @@ add_chanlist_band(struct ath_hal *ah, st if (freq_hi < freq_lo) return (0); + HALDEBUG(ah, HAL_DEBUG_REGDOMAIN, + "%s: freq=%d..%d, flags=0x%08x, step=%d\n", __func__, + (int) freq_lo, (int) freq_hi, flags, step); + error = addchan(ah, chans, maxchans, nchans, freq, flags, fband, rd); for (freq += step; freq <= freq_hi && error == 0; freq += step) - error = copychan_prev(ah, chans, maxchans, nchans, freq); + error = copychan_prev(ah, chans, maxchans, nchans, freq, flags); return (error); } @@ -548,7 +560,6 @@ add_chanlist_mode(struct ath_hal *ah, st continue; } #endif - /* * XXX TODO: handle REG_EXT_FCC_CH_144. * @@ -558,11 +569,52 @@ add_chanlist_mode(struct ath_hal *ah, st bfreq_lo = MAX(fband->lowChannel + low_adj, freq_lo); bfreq_hi = MIN(fband->highChannel + hi_adj, freq_hi); + + /* + * Don't start the 5GHz channel list at 5120MHz. + * + * Unfortunately (sigh) the HT40 channel creation + * logic will create HT40U channels at 5120, 5160, 5200. + * This means that 36 (5180) isn't considered as a + * HT40 channel, and everything goes messed up from there. + */ + if ((cm->flags & IEEE80211_CHAN_5GHZ) && + (cm->flags & IEEE80211_CHAN_HT40U)) { + if (bfreq_lo < 5180) + bfreq_lo = 5180; + } + + /* + * Same with HT40D - need to start at 5200 or the low + * channels are all wrong again. + */ + if ((cm->flags & IEEE80211_CHAN_5GHZ) && + (cm->flags & IEEE80211_CHAN_HT40D)) { + if (bfreq_lo < 5200) + bfreq_lo = 5200; + } + if (fband->channelSep >= channelSep) step = fband->channelSep; else step = roundup(channelSep, fband->channelSep); + HALDEBUG(ah, HAL_DEBUG_REGDOMAIN, + "%s: freq_lo=%d, freq_hi=%d, low_adj=%d, hi_adj=%d, " + "bandlo=%d, bandhi=%d, bfreqlo=%d, bfreqhi=%d, step=%d, " + "flags=0x%08x\n", + __func__, + (int) freq_lo, + (int) freq_hi, + (int) low_adj, + (int) hi_adj, + (int) fband->lowChannel, + (int) fband->highChannel, + (int) bfreq_lo, + (int) bfreq_hi, + step, + (int) cm->flags); + error = add_chanlist_band(ah, chans, maxchans, nchans, bfreq_lo, bfreq_hi, step, cm->flags, fband, rd); if (error != 0) { From owner-svn-src-head@freebsd.org Thu Jan 5 05:03:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD4CFC9EA99; Thu, 5 Jan 2017 05:03:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CAE01CC4; Thu, 5 Jan 2017 05:03:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0553BKf090627; Thu, 5 Jan 2017 05:03:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0553BbG090626; Thu, 5 Jan 2017 05:03:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701050503.v0553BbG090626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 5 Jan 2017 05:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311363 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 05:03:12 -0000 Author: adrian Date: Thu Jan 5 05:03:11 2017 New Revision: 311363 URL: https://svnweb.freebsd.org/changeset/base/311363 Log: [net80211] correct VHT ieee80211com state bits. * rename the ieee80211com field for vht mcsinfo to be ic_, not iv; * add a vht config field, stealing from the spares I left there. This doesn't change the ABI. Modified: head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Thu Jan 5 04:59:37 2017 (r311362) +++ head/sys/net80211/ieee80211_var.h Thu Jan 5 05:03:11 2017 (r311363) @@ -232,8 +232,9 @@ struct ieee80211com { /* VHT information */ uint32_t ic_vhtcaps; /* VHT capabilities */ uint32_t ic_vhtextcaps; /* VHT extended capabilities (TODO) */ - struct ieee80211_vht_mcs_info iv_vht_mcsinfo; /* Support TX/RX VHT MCS */ - uint32_t ic_vht_spare[4]; + struct ieee80211_vht_mcs_info ic_vht_mcsinfo; /* Support TX/RX VHT MCS */ + uint32_t ic_flags_vht; /* VHT state flags */ + uint32_t ic_vht_spare[3]; /* optional state for Atheros SuperG protocol extensions */ struct ieee80211_superg *ic_superg; @@ -651,6 +652,10 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FVEN_BITS "\20" +#define IEEE80211_FVHT_VHT 0x000000001 /* CONF: VHT supported */ +#define IEEE80211_VFHT_BITS \ + "\20\1VHT" + int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3); void ieee80211_ifattach(struct ieee80211com *); void ieee80211_ifdetach(struct ieee80211com *); From owner-svn-src-head@freebsd.org Thu Jan 5 06:29:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23745C9F658; Thu, 5 Jan 2017 06:29:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDAC510E3; Thu, 5 Jan 2017 06:29:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id y68so28019267pfb.1; Wed, 04 Jan 2017 22:29:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ME2ZdFHkSqq2bJ1Q9VzesHkd2D/vbAVSzdxSkzrsCJI=; b=t0q+YwBX8AARWP4MCGfVw3WW4xQ+EnyoiCYYpgtjIoM9DMuA9V+XOe0ynmu94swyjR bEFc5vp1UuuBU/Px4wourXw4MKMzv6K6X5V2JZAKR6ezxTFmfRftgxhAV5zCavTa0z2Q bsSXG6E9C1Qa0oz3zIuYYYrl/EJaHPgA7Imeq4jCkxgBaYiivXYncFKBfdpPsW9nOIhy 4DOND+BJm+elRJ4AzmfrnzADAELCMWxMJpJkjzJi+aEzvVD7/rJwLIttemOcxw9jvZTY T5gZPJQS98MhdCs4aoKTRzIiX0TzKoXMg4wBxqwj4LMQhIHeCmSwsRf1WmA5MwLDTLkU 9HRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ME2ZdFHkSqq2bJ1Q9VzesHkd2D/vbAVSzdxSkzrsCJI=; b=EGCcjSabvKZ/Ium2bt1O09w25ILGlw/HQyw2Tgmczy1rdmsjK5WlhDJcLJRKYcbmWs dToz2bVd2gGiIFg3n34gXnaDd9Rg+OAqKBYCyTPZCAulaWIiISquETyo1UYjH7j9bC7W FsWPJZ2vErZ1o4nI5cP7f2AvG3qPjJUoJAoH5zZ4GvUY6eg9u+7b0N7j09z1mZ29ZF6G +rNlk1QazKvm/qVp5KrcmO+ciAZqJTGerPtHFS/o01em/VzF0nVgZj7Wsppa6DiYpx+b 3F78GgaVl3zv1NO+OkVLeXlaq3mkSvWropwiw9nDVJSKGIp/6vOgDU8Hu6xmUN/h3WaR EtIg== X-Gm-Message-State: AIkVDXJJFxvd4i+jY6I3gSna4ZTswSRVIYw47nQ0VISd0D93WFIxJvdoHXiI35whsKhG5w== X-Received: by 10.84.198.129 with SMTP id p1mr155259936pld.14.1483597794357; Wed, 04 Jan 2017 22:29:54 -0800 (PST) Received: from ?IPv6:2607:fb90:80b1:1aa9:91a9:7481:6851:3188? ([2607:fb90:80b1:1aa9:91a9:7481:6851:3188]) by smtp.gmail.com with ESMTPSA id x4sm152451629pgc.14.2017.01.04.22.29.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jan 2017 22:29:53 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r311233 - head/contrib/netbsd-tests/fs/tmpfs From: Ngie Cooper X-Mailer: iPhone Mail (14C92) In-Reply-To: Date: Wed, 4 Jan 2017 22:29:52 -0800 Cc: Jilles Tjoelker , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201701040246.v042kaEh039041@repo.freebsd.org> <20170104233650.GB17765@stack.nl> To: Juli Mallett X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 06:29:55 -0000 > On Jan 4, 2017, at 15:45, Juli Mallett wrote: >=20 >> On Wed, Jan 4, 2017 at 3:36 PM, Jilles Tjoelker wrote: >>> On Wed, Jan 04, 2017 at 02:46:36AM +0000, Ngie Cooper wrote: >>> - Initialize .sun_len before passing it to strlcpy and bind. >> It would be better to avoid naming the non-portable sun_len field if it >> is just to make Coverity happy. I suggest initializing the structure >> with designated initializers or memset(). >>=20 >> Apart from that, the value for sun_len is wrong; it should be the length >> of the whole structure and not just the sun_path part. Fortunately, the >> field is ignored by bind(), which uses the addrlen parameter instead. The problem was the strcpy and the fact that the code didn't check the input= buffer to make sure it didn't overrun the destination buffer. > This is incorrect, too. It's the length of the sockaddr_un header > plus the actual length of the pathname, not the available size of the > path field. It's kind of awful that it's inconsistent with the other > sockaddr types, but that's the fun of sockaddr_un, to accommodate the > fact that the path name is naturally a variable-length field. In > fact, the calculation here seems to be wrong, also; we have the > SUN_LEN macro in for a reason, and it's what the unix(4) > manpage suggests. Of course, sun_len is sort of needlessly obscure > and in general it's best for us to fix anything which requires the > _len fields to be accurate, and to just ignore them :( Ack.. thanks for the reminder :/.. I'll fix this soon :(. -Ngie= From owner-svn-src-head@freebsd.org Thu Jan 5 06:35:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9A47C9F91D; Thu, 5 Jan 2017 06:35:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9A0C15CB; Thu, 5 Jan 2017 06:35:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id 127so18057151pfg.0; Wed, 04 Jan 2017 22:35:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EXEHcEIRYxEmYZhQij8PfXwQ+TWbchLtyt+dXVBrVmU=; b=jC7T4uLVhn+dzMYQSSP2nBSG1jmjpxtoaAVdp6+8PEZ2vc0nCyk+S13yIMCdD2gkdk wD30vx8TYyhIocw8WfKnwVB6QJXCeDI9VNzU9tGne0imjmWOvhqnQc4CS10vVY/z3Myh 3HQN9dtfeAmri21Xb6atTN+CGNZljvs9y6g3OaLfv9WZr091cibFiobHNjhmAgsisRCS 1XvXI26FPbgKfBKxJDGvJJbERJmaGHeULNAOIoG9eZxN+yekKBA3HPgQOl4oEFtO8x+e xydUksNO4TXc/YMZ2vpCtIEOC24dOVgqqt8iO68LVYPhp7JG6/i/T9s0D4K3CyEbQ4h8 6dUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EXEHcEIRYxEmYZhQij8PfXwQ+TWbchLtyt+dXVBrVmU=; b=M+5JBCGeJ+To7VJ7VydTdqwPpmjHTqbqq7MejWZgSTbh3FdK8mV8bNsaAfXI5OeRCu HfShKS0e8vIvDe1KPN6WmJOdYhpAg3c8/vccZ/A5Cr+u2HYzu9crbBDkWpTIYLR3rdTD XpNH4V/Sv8vMOl/nvh8ENiwd3OJiyuQSu5Xl1rnnmd7SjqBVPoHbB4V6hcXu45Fm+oXu OHUAwXi/mTDeNF77u0GvH6hRTx8x0ToWC9PZseKQxy809GEzipZmfNU3gsb9wMRMCaD5 ZhuHSHgwk5vuxWfGZkfQuHunYdHRK0eYWBjAK+Uis8cbpm01l209a1XTV3gm99+EQMgP 4PcA== X-Gm-Message-State: AIkVDXI53H0ASXK3NX4vf1wZW0c4MT9dMJiRAjS3j9ZKUjQisn/MjUpPGmuL0iW5Z3P1xg== X-Received: by 10.84.142.131 with SMTP id 3mr153375876plx.124.1483598120320; Wed, 04 Jan 2017 22:35:20 -0800 (PST) Received: from ?IPv6:2607:fb90:80b1:1aa9:91a9:7481:6851:3188? ([2607:fb90:80b1:1aa9:91a9:7481:6851:3188]) by smtp.gmail.com with ESMTPSA id k22sm93474049pfg.84.2017.01.04.22.35.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jan 2017 22:35:19 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r311233 - head/contrib/netbsd-tests/fs/tmpfs From: Ngie Cooper X-Mailer: iPhone Mail (14C92) In-Reply-To: <20170104233650.GB17765@stack.nl> Date: Wed, 4 Jan 2017 22:35:18 -0800 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <340662A0-12F5-46A1-AEA0-CFC62732F91B@gmail.com> References: <201701040246.v042kaEh039041@repo.freebsd.org> <20170104233650.GB17765@stack.nl> To: Jilles Tjoelker X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 06:35:21 -0000 > On Jan 4, 2017, at 15:36, Jilles Tjoelker wrote: ... > It would be better to avoid naming the non-portable sun_len field if it > is just to make Coverity happy. I suggest initializing the structure > with designated initializers or memset(). >=20 > Apart from that, the value for sun_len is wrong; it should be the length > of the whole structure and not just the sun_path part. Fortunately, the > field is ignored by bind(), which uses the addrlen parameter instead. >=20 > On a more general note, refactoring tests without a way to verify they > have not been changed to always pass is risky :( Yeah... agreed. Unfortunately, the interest in reviewing tests is low.. some= people only care when they "break" :(.. In general, I try to test all of my changes carefully, but this item fell th= rough the cracks, due to my poor memory about how sockaddr_un is structured.= Thank you for the input jilles and jmallett! > --=20 > Jilles Tjoelker From owner-svn-src-head@freebsd.org Thu Jan 5 07:26:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0463CA03F0; Thu, 5 Jan 2017 07:26:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 834811865; Thu, 5 Jan 2017 07:26:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id 75so1597637pgf.3; Wed, 04 Jan 2017 23:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Av1ujPc/VAp6VJo/earytoUbaJpcqsTwDwmv6siuq7o=; b=E5WzOr1cv9ptdllvqKMH00JtS0sdaKwqs7vq37omHZvsVjhl2WPVGu4YKfChBN6cK4 ZCXsG44jflOe0XDqXUTWbNr9n94Z3UtT5Y5u+qZ7p/PGVwj3bylS6KJK4GAmEtfmNfXk gIDFxj3eyv69lObOZFj1nXqselQg8mBqgwGuEStoYhJZTjeBgg2mxByyKiq4xFtjU7OR wFTRRWGQaGTsnxN5Io72WRvuyxx+B7IAECI2H3CDn+KfRiI9g+0gm34cVdv1fuiY5Upa va1qp68S9jRg+wKp+TXutAtUEq6Imqum5g+CpFhbpjDhEoWFe06bULYQWPCMrVVZH3ns ya0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Av1ujPc/VAp6VJo/earytoUbaJpcqsTwDwmv6siuq7o=; b=YXaNqXHsrtAjK2+KBMC0ags8ODahtLJcYslpa4j3m3OUUugl8Jjgeb1pFZ6WeYLhA5 HCN4Pb84xmCGMCUy5ZNgXuRP6t/INkfa0C4cAKHrhBIvJvmcSUnYERasDoZokBslmeud Y1UROO4L5KOlNUtWIeQuKgRZds25FKMxa7zWJnymOTyitsHIN/VyAxFVPO66mitH0ygq WcGdbJKr0sZO8lfa9IpgEqJRJxVyqaMdX/CVTQ4gB1BZgN9VdaujUh4d8M0ru/Z980VG lLvl0itfSotdcA4Buhh/4Y4wBzAKKBYBU8GWf/n/0bAFiHvDAOr4Ud1aERbgqG4Xd0Ps I8xw== X-Gm-Message-State: AIkVDXJyVzU8rFMJm4P1FW1UzrMQYBFjPWSZ7rJ8Q2SrI1yf9SGzxvpNsU84kO+1vj+n3A== X-Received: by 10.99.19.65 with SMTP id 1mr72343447pgt.153.1483601181615; Wed, 04 Jan 2017 23:26:21 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 72sm151417161pfw.37.2017.01.04.23.26.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Jan 2017 23:26:20 -0800 (PST) Subject: Re: svn commit: r311233 - head/contrib/netbsd-tests/fs/tmpfs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E8D1BBDA-0DF9-4ADF-AB26-B81705D26167"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 4 Jan 2017 23:26:18 -0800 Cc: Jilles Tjoelker , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701040246.v042kaEh039041@repo.freebsd.org> <20170104233650.GB17765@stack.nl> To: Juli Mallett X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 07:26:22 -0000 --Apple-Mail=_E8D1BBDA-0DF9-4ADF-AB26-B81705D26167 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 4, 2017, at 22:29, Ngie Cooper wrote: >=20 >=20 >> On Jan 4, 2017, at 15:45, Juli Mallett = wrote: >>=20 >>> On Wed, Jan 4, 2017 at 3:36 PM, Jilles Tjoelker = wrote: >>>> On Wed, Jan 04, 2017 at 02:46:36AM +0000, Ngie Cooper wrote: >>>> - Initialize .sun_len before passing it to strlcpy and bind. >>> It would be better to avoid naming the non-portable sun_len field if = it >>> is just to make Coverity happy. I suggest initializing the structure >>> with designated initializers or memset(). >>>=20 >>> Apart from that, the value for sun_len is wrong; it should be the = length >>> of the whole structure and not just the sun_path part. Fortunately, = the >>> field is ignored by bind(), which uses the addrlen parameter = instead. >=20 > The problem was the strcpy and the fact that the code didn't check the = input buffer to make sure it didn't overrun the destination buffer. Bah.. I misremembered the fact that it was using strlcpy before and = after=E2=80=A6 -Ngie --Apple-Mail=_E8D1BBDA-0DF9-4ADF-AB26-B81705D26167 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYbfUbAAoJEPWDqSZpMIYVMSgP/Rf3U+6Vwlhw0nRbXdH+9RF+ sVG1H+Vz6K0+EEAaPPYCJi6HcXjXklsURhYxDuGtJaq0Hxz2peGXScPxjsaIOchP 7mSOFxX15cFz9jwaTaXaj0FyYQ1pFjmx7jmH49De2Pmu9/E5xBCZDPa1J7Leet4C bdvC9AX/U+/M/UPpgude6yOM73Xpo65LO+DjgCLLhkPj72Ij7tyc0kankLyCLK1h zZGf0Hyb/l+WS7JCOYCKhFSxIS0XisGs+foYZ1JJc/kzitgdxVtOyqhjYrQy8OW4 7RZYaUMjzZUIYernyTwY2eTikG7Zvi+2KlJWV1V8ppIfCF9pwvlYBL31CwcAobHr DRci90y79aGrQWvG/bnmqfs52XQo2EVt190u1sqLT/nmpBvZBnTfXKeoTHDRKZxA p8HJJKdLTyrR/oj3gB4L+bvD+dAGZjZYbGitvUTzkmMiRHgauc2eORlxXPL8TpN7 pNdHQzq4GXV8dyLPIjDp6Zj39cieqz8oFXtVw8NR6+hk9xXA1fGhkdrMyJxli/on l7qAaThoosg8i+e3L45iK1bS+AtJTDGevmo6W0rWq2V3k+qNKekA+PrVzP9d7ciw 5/kRLJNFp+s+d//yc6BTM3uk+VteosBDT72cGvbJxxCbbnhCcCRvryqilwwwROmK Zgu/SfLbWOelMx+wg5bI =nO3T -----END PGP SIGNATURE----- --Apple-Mail=_E8D1BBDA-0DF9-4ADF-AB26-B81705D26167-- From owner-svn-src-head@freebsd.org Thu Jan 5 07:46:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9727ECA09E2; Thu, 5 Jan 2017 07:46:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66B041288; Thu, 5 Jan 2017 07:46:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v057kvai056937; Thu, 5 Jan 2017 07:46:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v057kvFH056936; Thu, 5 Jan 2017 07:46:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050746.v057kvFH056936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 07:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311377 - head/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 07:46:58 -0000 Author: ngie Date: Thu Jan 5 07:46:57 2017 New Revision: 311377 URL: https://svnweb.freebsd.org/changeset/base/311377 Log: Redo fix for CID 979581 The previous change was flawed in terms of how it calculated the buffer length for the sockaddr_un object. Use SUN_LEN where appropriate and mute the Coverity complaint by using memset(.., 0, ..) to zero out the entire structure instead of setting .sun_len to a bogus value and strlcpy'ing in the contents of argv[1]. SUN_LEN is now being passed to bind(2) as well. For some odd reason this wasn't flagged as a bug with Coverity. Reported by: jilles, jmallett MFC after: 2 days X-MFC with: r311233 Modified: head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Modified: head/contrib/netbsd-tests/fs/tmpfs/h_tools.c ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Thu Jan 5 07:42:08 2017 (r311376) +++ head/contrib/netbsd-tests/fs/tmpfs/h_tools.c Thu Jan 5 07:46:57 2017 (r311377) @@ -244,13 +244,15 @@ sockets_main(int argc, char **argv) } #ifdef __FreeBSD__ - addr.sun_len = sizeof(addr.sun_path); - (void)strlcpy(addr.sun_path, argv[1], addr.sun_len); -#else - (void)strlcpy(addr.sun_path, argv[1], sizeof(addr.sun_path)); + memset(&addr, 0, sizeof(addr)); #endif + (void)strlcpy(addr.sun_path, argv[1], sizeof(addr.sun_path)); addr.sun_family = PF_UNIX; +#ifdef __FreeBSD__ + error = bind(fd, (struct sockaddr *)&addr, SUN_LEN(&addr)); +#else error = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); +#endif if (error == -1) { warn("connect"); #ifdef __FreeBSD__ From owner-svn-src-head@freebsd.org Thu Jan 5 07:55:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96099CA0BC2; Thu, 5 Jan 2017 07:55:18 +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 5FAD117D6; Thu, 5 Jan 2017 07:55:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v057tHUx061137; Thu, 5 Jan 2017 07:55:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v057tHLE061136; Thu, 5 Jan 2017 07:55:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050755.v057tHLE061136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 07:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311378 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 07:55:18 -0000 Author: ngie Date: Thu Jan 5 07:55:17 2017 New Revision: 311378 URL: https://svnweb.freebsd.org/changeset/base/311378 Log: lm_load: fix string copying issues - Ensure `section` doesn't overrun section by using strlcpy instead of strcpy [*]. - Use strdup instead of malloc + strcpy (this wasn't flagged by Coverity, but is an opportunistic change). MFC after: 1 week Reported by: Coverity CID: 1006826 [*] Modified: head/contrib/bsnmp/snmpd/main.c Modified: head/contrib/bsnmp/snmpd/main.c ============================================================================== --- head/contrib/bsnmp/snmpd/main.c Thu Jan 5 07:46:57 2017 (r311377) +++ head/contrib/bsnmp/snmpd/main.c Thu Jan 5 07:55:17 2017 (r311378) @@ -2324,13 +2324,12 @@ lm_load(const char *path, const char *se } m->handle = NULL; m->flags = 0; - strcpy(m->section, section); + strlcpy(m->section, section, sizeof(m->section)); - if ((m->path = malloc(strlen(path) + 1)) == NULL) { + if ((m->path = strdup(path)) == NULL) { syslog(LOG_ERR, "lm_load: %m"); goto err; } - strcpy(m->path, path); /* * Make index From owner-svn-src-head@freebsd.org Thu Jan 5 08:14:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DF24C9F3EC; Thu, 5 Jan 2017 08:14:21 +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 6D95113CB; Thu, 5 Jan 2017 08:14:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v058EK6u069291; Thu, 5 Jan 2017 08:14:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v058EKma069290; Thu, 5 Jan 2017 08:14:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050814.v058EKma069290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 08:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311381 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 08:14:21 -0000 Author: ngie Date: Thu Jan 5 08:14:20 2017 New Revision: 311381 URL: https://svnweb.freebsd.org/changeset/base/311381 Log: lsock_init_port: address issues with initializing sockaddr_un object - Use strlcpy to ensure p->name doesn't overflow sa.sun_path [*]. - Use SUN_LEN(..) instead of spelling out calculation longhand (inspired by comment by jmallett). Tested with: dgram and stream support with both bsnmpwalk and snmpwalk MFC after: 1 week Reported by: Coverity CID: 1006825 Modified: head/contrib/bsnmp/snmpd/trans_lsock.c Modified: head/contrib/bsnmp/snmpd/trans_lsock.c ============================================================================== --- head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:04:04 2017 (r311380) +++ head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:14:20 2017 (r311381) @@ -308,10 +308,9 @@ lsock_init_port(struct tport *tp) return (SNMP_ERR_RES_UNAVAIL); } - strcpy(sa.sun_path, p->name); + strlcpy(sa.sun_path, p->name, sizeof(sa.sun_path)); sa.sun_family = AF_LOCAL; - sa.sun_len = strlen(p->name) + - offsetof(struct sockaddr_un, sun_path); + sa.sun_len = SUN_LEN(&sa); (void)remove(p->name); @@ -363,10 +362,9 @@ lsock_init_port(struct tport *tp) return (SNMP_ERR_GENERR); } - strcpy(sa.sun_path, p->name); + strlcpy(sa.sun_path, p->name, sizeof(sa.sun_path)); sa.sun_family = AF_LOCAL; - sa.sun_len = strlen(p->name) + - offsetof(struct sockaddr_un, sun_path); + sa.sun_len = SUN_LEN(&sa); (void)remove(p->name); From owner-svn-src-head@freebsd.org Thu Jan 5 08:17:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29492C9F52F; Thu, 5 Jan 2017 08:17:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECFC116BD; Thu, 5 Jan 2017 08:17:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v058HI0W069443; Thu, 5 Jan 2017 08:17:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v058HIiK069442; Thu, 5 Jan 2017 08:17:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050817.v058HIiK069442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 08:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311382 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 08:17:19 -0000 Author: ngie Date: Thu Jan 5 08:17:17 2017 New Revision: 311382 URL: https://svnweb.freebsd.org/changeset/base/311382 Log: Use calloc instead of malloc + memset(.., 0, ..) MFC after: 3 days Modified: head/contrib/bsnmp/snmpd/trans_lsock.c Modified: head/contrib/bsnmp/snmpd/trans_lsock.c ============================================================================== --- head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:14:20 2017 (r311381) +++ head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:17:17 2017 (r311382) @@ -146,16 +146,14 @@ lsock_open_port(u_char *name, size_t nam return (SNMP_ERR_BADVALUE); } - if ((port = malloc(sizeof(*port))) == NULL) + if ((port = calloc(1, sizeof(*port))) == NULL) return (SNMP_ERR_GENERR); - memset(port, 0, sizeof(*port)); if (!is_stream) { - if ((peer = malloc(sizeof(*peer))) == NULL) { + if ((peer = calloc(1, sizeof(*peer))) == NULL) { free(port); return (SNMP_ERR_GENERR); } - memset(peer, 0, sizeof(*peer)); } if ((port->name = malloc(namelen + 1)) == NULL) { free(port); @@ -261,12 +259,11 @@ lsock_listen_input(int fd, void *udata) struct lsock_port *p = udata; struct lsock_peer *peer; - if ((peer = malloc(sizeof(*peer))) == NULL) { + if ((peer = calloc(1, sizeof(*peer))) == NULL) { syslog(LOG_WARNING, "%s: peer malloc failed", p->name); (void)close(accept(fd, NULL, NULL)); return; } - memset(peer, 0, sizeof(*peer)); peer->port = p; From owner-svn-src-head@freebsd.org Thu Jan 5 08:27:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95ECAC9F8C7; Thu, 5 Jan 2017 08:27: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 5D63A1E11; Thu, 5 Jan 2017 08:27: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 v058RNVh073542; Thu, 5 Jan 2017 08:27:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v058RN4b073541; Thu, 5 Jan 2017 08:27:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050827.v058RN4b073541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 08:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311384 - head/contrib/bsnmp/snmp_usm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 08:27:24 -0000 Author: ngie Date: Thu Jan 5 08:27:23 2017 New Revision: 311384 URL: https://svnweb.freebsd.org/changeset/base/311384 Log: op_usm_users: fix indentation in SNMP_OP_SET block MFC after: 3 days Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c ============================================================================== --- head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 08:21:46 2017 (r311383) +++ head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 08:27:23 2017 (r311384) @@ -167,7 +167,7 @@ op_usm_users(struct snmp_context *ctx, s if ((uuser = usm_get_user(&val->var, sub)) == NULL && val->var.subs[sub - 1] != LEAF_usmUserStatus && val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) - return (SNMP_ERR_NOSUCHNAME); + return (SNMP_ERR_NOSUCHNAME); if (community != COMM_INITIALIZE && uuser->type == StorageType_readOnly) From owner-svn-src-head@freebsd.org Thu Jan 5 08:45:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09FEBC9FFB3; Thu, 5 Jan 2017 08:45:54 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com [IPv6:2a00:1450:4010:c07::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C3421E48; Thu, 5 Jan 2017 08:45:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-lf0-x233.google.com with SMTP id x140so23067761lfa.3; Thu, 05 Jan 2017 00:45:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=h3VZkSrUB4Qm5xLyX6UwROHYGfm+G4tHiwqYwmkZbzA=; b=DS38uJ+DwyebDQXGFCOHoFOCpzEo08ZlvYkP2uQ3p4zpp8XoEVS6Ow/0KMWkKP3qdr /1S+/JP9rrXIEu5feWyMzzNAxklRaeRZMM4e0lFbkYTf0jRW2HU/2qoAaYHE9CCFGzV7 iMe0ncuf622/zC6ZXUN+YM3+JK4rDpbN9R/9byPkwnKUCAhaeVPikneln7Jr5pejbYeq Xabu1IGszyIrGoz3m/T7hntoq56/9vaszLmvpBUadFpzM8ZGjfgvTqraxof1adRNSmcf TJn3jFCZjf4GrVZQiRW7mNfzbt5leXROAdiTi09nZjcpi314bztAeDxtXC3H2TMknOc7 N4rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; bh=h3VZkSrUB4Qm5xLyX6UwROHYGfm+G4tHiwqYwmkZbzA=; b=AEpstoLTA8fqGOVMl+KJkf/P2Psdg/w77as5UJxo3bh5w7BjraKRFSEDc2HQLZumkH MmLWLTwmvU3j3aQvVXlRmb5vAc3JccsHvMHxcTbqxTZa7Z9olEAEoyw68Oz8o7100O0h s/qqCYZCyUIKCzohfTMkK+g4n9mUD0FnlWitnxTY5b9ZBV1Oz/jb5Wv9Cod8ruZtNjGe h5rMFkNdnkOuzy4Fzqg0vIeIxFgGDii3+Lfiw5ciuLeOhcMf2Lm56uOugKphhNkn2Xne htNPSv0IuDLwjjfzp+HxDMqhhdlGCwS7QymiPdaS/JsEsinbepHwadUanv+CoIwpbwZR bF3g== X-Gm-Message-State: AIkVDXIcxyKAAyU3rGtOatNMx2IdN81Hj+3trWKA75XJHienK6DlCQUbQUj0Otjd5fprkQ== X-Received: by 10.25.15.199 with SMTP id 68mr15706951lfp.53.1483605951336; Thu, 05 Jan 2017 00:45:51 -0800 (PST) Received: from [100.100.129.172] (apn-37-248-160-117.dynamic.gprs.plus.pl. [37.248.160.117]) by smtp.gmail.com with ESMTPSA id c66sm17789702ljd.44.2017.01.05.00.45.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 00:45:50 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r311283 - head/sys/cam/ctl From: =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= X-Mailer: iPhone Mail (14C92) In-Reply-To: Date: Thu, 5 Jan 2017 09:45:49 +0100 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <7A6F3E33-8994-4DC2-9B2A-5C23E379680E@FreeBSD.org> References: <201701041250.v04Coits085210@repo.freebsd.org> To: Ryan Stone Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 08:45:54 -0000 Dnia 04.01.2017 o godz. 16:38 Ryan Stone napisa=C5=82(a)= : >> On Wed, Jan 4, 2017 at 7:50 AM, Edward Tomasz Napierala wrote: >> + refcount_release(&cs->cs_outstanding_ctl_pdus); >=20 > Shouldn't the return value of refcount_release() be checked? Not in this case. The destruction of cfumass sessions is always done in on= e specific place; everywhere else we don't care whether the reference was th= e last one or not. From owner-svn-src-head@freebsd.org Thu Jan 5 08:49:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C352CA0078; Thu, 5 Jan 2017 08:49:07 +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 4BEA01006; Thu, 5 Jan 2017 08:49:07 +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 v058n6bx082298; Thu, 5 Jan 2017 08:49:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v058n60V082297; Thu, 5 Jan 2017 08:49:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050849.v058n60V082297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 08:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311390 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 08:49:07 -0000 Author: ngie Date: Thu Jan 5 08:49:06 2017 New Revision: 311390 URL: https://svnweb.freebsd.org/changeset/base/311390 Log: snmp_table_fetch_async: don't leak `work` if snmp_pdu_send(..) fails MFC after: 1 week Reported by: Coverity CID: 1017276 Modified: head/contrib/bsnmp/lib/snmpclient.c Modified: head/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- head/contrib/bsnmp/lib/snmpclient.c Thu Jan 5 08:42:58 2017 (r311389) +++ head/contrib/bsnmp/lib/snmpclient.c Thu Jan 5 08:49:06 2017 (r311390) @@ -728,8 +728,11 @@ snmp_table_fetch_async(const struct snmp work->last_change = 0; table_init_pdu(descr, &work->pdu); - if (snmp_pdu_send(&work->pdu, table_cb, work) == -1) + if (snmp_pdu_send(&work->pdu, table_cb, work) == -1) { + free(work); + work = NULL; return (-1); + } return (0); } From owner-svn-src-head@freebsd.org Thu Jan 5 09:18:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7326CA0E98 for ; Thu, 5 Jan 2017 09:18:10 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 665811355 for ; Thu, 5 Jan 2017 09:18:10 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x230.google.com with SMTP id p64so602784wmp.0 for ; Thu, 05 Jan 2017 01:18:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to; bh=NC7nCqP4PTjcU8habuFZqfUl99NZgPzvrB+9xdZ4zlE=; b=vWo7D3xx55xCDu6eRXHp5bXIUmIguARIOT6eCaR3qfu3QqNIt9bVIYiqRay/qfk8Ts wkiY9Jv5xDQ0CNBnOUiqciidXdl0kqJ6QAVpI7Qpvvh5Osqm1Ab35ny/8Q53zQzOyLya QtgxsLfrIhBtic3w1XUUuD52YNVAjdpFNFp5smlbWoj8FvJw0Nnzayu8CEK7Mc6Xo0vk jCX65G2cd+bAu04iUNl/67TAUaGeFi0UyG8I9XtWeIqjUnYG383oAmx/0+TGcetDiKNY vco1ZO4zCpOJ6kRVls0ygzprbjG4Dch9TH1Tsrym8sJetffH1A6U4F+9uKWFYzeIF73U Sp1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to; bh=NC7nCqP4PTjcU8habuFZqfUl99NZgPzvrB+9xdZ4zlE=; b=l/01xwLvNpiBWwagxFWtQRQ9HqHx6fDLRAXNBemTz2BLKG5xV6Czs6F7vmspKsYyfc OCr8sA6+lI/gkKjPYxXLN3ifjVJN42Gm7sYshCuKdIwSkllrdYbY8j3a7UEfy0ywBuja R+2YYrbq7vBjHBUHdtILqdwfWqH74BilxQn76XhIkuD0tlaJmXODmB9YmqUMTpaElqsz zFktfk3DUbpyq5X/aV59G5xUwnZ27itaxPxRTbIB39q0attF192B85rhAVp16Ph9T4SA 79K5iKhojiWMVZ3g6soHCvYYaIZsnTqIMGHO3POHHKnwW4FcNsFOkQRQMyVCiC+Y1B8i 9bMQ== X-Gm-Message-State: AIkVDXJc7cR2dvrqGkOLmFIbux4qzvUsYmyEUNjRGYKZVo4wQvT7DeUeTPL423cL7z2jPCCM X-Received: by 10.28.94.10 with SMTP id s10mr1384731wmb.1.1483607888164; Thu, 05 Jan 2017 01:18:08 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id i132sm98872728wmf.14.2017.01.05.01.18.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 01:18:07 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r311346 - in head/sys: kern sys vm To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201701050144.v051iCso008577@repo.freebsd.org> Message-ID: <3cf413dd-f8d5-4462-9486-0a56adf08b77@freebsd.org> Date: Thu, 5 Jan 2017 09:16:02 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <201701050144.v051iCso008577@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 09:18:10 -0000 Given the use of the number of CPU's for sizing would this play nice with hot plug CPU's? Regards Steve On 05/01/2017 01:44, Mark Johnston wrote: > Author: markj > Date: Thu Jan 5 01:44:12 2017 > New Revision: 311346 > URL: https://svnweb.freebsd.org/changeset/base/311346 > > Log: > Add a small allocator for exec_map entries. > > Upon each execve, we allocate a KVA range for use in copying data to the > new image. Pages must be faulted into the range, and when the range is > freed, the backing pages are freed and their mappings are destroyed. This > is a lot of needless overhead, and the exec_map management becomes a > bottleneck when many CPUs are executing execve concurrently. Moreover, the > number of available ranges is fixed at 16, which is insufficient on large > systems and potentially excessive on 32-bit systems. > > The new allocator reduces overhead by making exec_map allocations > persistent. When a range is freed, pages backing the range are marked clean > and made easy to reclaim. With this change, the exec_map is sized based on > the number of CPUs. > > Reviewed by: kib > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D8921 > > Modified: > head/sys/kern/kern_exec.c > head/sys/sys/imgact.h > head/sys/vm/vm_init.c > head/sys/vm/vm_kern.c > head/sys/vm/vm_kern.h > > Modified: head/sys/kern/kern_exec.c > ============================================================================== > --- head/sys/kern/kern_exec.c Thu Jan 5 01:28:08 2017 (r311345) > +++ head/sys/kern/kern_exec.c Thu Jan 5 01:44:12 2017 (r311346) > @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -59,6 +60,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -1315,17 +1317,80 @@ err_exit: > return (error); > } > > +struct exec_args_kva { > + vm_offset_t addr; > + SLIST_ENTRY(exec_args_kva) next; > +}; > + > +static DPCPU_DEFINE(struct exec_args_kva *, exec_args_kva); > + > +static SLIST_HEAD(, exec_args_kva) exec_args_kva_freelist; > +static struct mtx exec_args_kva_mtx; > + > +static void > +exec_prealloc_args_kva(void *arg __unused) > +{ > + struct exec_args_kva *argkva; > + u_int i; > + > + SLIST_INIT(&exec_args_kva_freelist); > + mtx_init(&exec_args_kva_mtx, "exec args kva", NULL, MTX_DEF); > + for (i = 0; i < exec_map_entries; i++) { > + argkva = malloc(sizeof(*argkva), M_PARGS, M_WAITOK); > + argkva->addr = kmap_alloc_wait(exec_map, exec_map_entry_size); > + SLIST_INSERT_HEAD(&exec_args_kva_freelist, argkva, next); > + } > +} > +SYSINIT(exec_args_kva, SI_SUB_EXEC, SI_ORDER_ANY, exec_prealloc_args_kva, NULL); > + > +static vm_offset_t > +exec_alloc_args_kva(void **cookie) > +{ > + struct exec_args_kva *argkva; > + > + argkva = (void *)atomic_readandclear_ptr( > + (uintptr_t *)DPCPU_PTR(exec_args_kva)); > + if (argkva == NULL) { > + mtx_lock(&exec_args_kva_mtx); > + while ((argkva = SLIST_FIRST(&exec_args_kva_freelist)) == NULL) > + (void)mtx_sleep(&exec_args_kva_freelist, > + &exec_args_kva_mtx, 0, "execkva", 0); > + SLIST_REMOVE_HEAD(&exec_args_kva_freelist, next); > + mtx_unlock(&exec_args_kva_mtx); > + } > + *(struct exec_args_kva **)cookie = argkva; > + return (argkva->addr); > +} > + > +static void > +exec_free_args_kva(void *cookie) > +{ > + struct exec_args_kva *argkva; > + vm_offset_t base; > + > + argkva = cookie; > + base = argkva->addr; > + > + vm_map_madvise(exec_map, base, base + exec_map_entry_size, MADV_FREE); > + if (!atomic_cmpset_ptr((uintptr_t *)DPCPU_PTR(exec_args_kva), > + (uintptr_t)NULL, (uintptr_t)argkva)) { > + mtx_lock(&exec_args_kva_mtx); > + SLIST_INSERT_HEAD(&exec_args_kva_freelist, argkva, next); > + wakeup_one(&exec_args_kva_freelist); > + mtx_unlock(&exec_args_kva_mtx); > + } > +} > + > /* > * Allocate temporary demand-paged, zero-filled memory for the file name, > - * argument, and environment strings. Returns zero if the allocation succeeds > - * and ENOMEM otherwise. > + * argument, and environment strings. > */ > int > exec_alloc_args(struct image_args *args) > { > > - args->buf = (char *)kmap_alloc_wait(exec_map, PATH_MAX + ARG_MAX); > - return (args->buf != NULL ? 0 : ENOMEM); > + args->buf = (char *)exec_alloc_args_kva(&args->bufkva); > + return (0); > } > > void > @@ -1333,8 +1398,7 @@ exec_free_args(struct image_args *args) > { > > if (args->buf != NULL) { > - kmap_free_wakeup(exec_map, (vm_offset_t)args->buf, > - PATH_MAX + ARG_MAX); > + exec_free_args_kva(args->bufkva); > args->buf = NULL; > } > if (args->fname_buf != NULL) { > > Modified: head/sys/sys/imgact.h > ============================================================================== > --- head/sys/sys/imgact.h Thu Jan 5 01:28:08 2017 (r311345) > +++ head/sys/sys/imgact.h Thu Jan 5 01:44:12 2017 (r311346) > @@ -42,6 +42,7 @@ struct ucred; > > struct image_args { > char *buf; /* pointer to string buffer */ > + void *bufkva; /* cookie for string buffer KVA */ > char *begin_argv; /* beginning of argv in buf */ > char *begin_envv; /* beginning of envv in buf */ > char *endp; /* current `end' pointer of arg & env strings */ > > Modified: head/sys/vm/vm_init.c > ============================================================================== > --- head/sys/vm/vm_init.c Thu Jan 5 01:28:08 2017 (r311345) > +++ head/sys/vm/vm_init.c Thu Jan 5 01:44:12 2017 (r311346) > @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -91,10 +92,6 @@ __FBSDID("$FreeBSD$"); > > long physmem; > > -static int exec_map_entries = 16; > -SYSCTL_INT(_vm, OID_AUTO, exec_map_entries, CTLFLAG_RDTUN, &exec_map_entries, 0, > - "Maximum number of simultaneous execs"); > - > /* > * System initialization > */ > @@ -271,10 +268,19 @@ again: > panic("Clean map calculation incorrect"); > > /* > - * Allocate the pageable submaps. > + * Allocate the pageable submaps. We may cache an exec map entry per > + * CPU, so we therefore need to reserve space for at least ncpu+1 > + * entries to avoid deadlock. The exec map is also used by some image > + * activators, so we leave a fixed number of pages for their use. > */ > +#ifdef __LP64__ > + exec_map_entries = 8 * mp_ncpus; > +#else > + exec_map_entries = min(8 * mp_ncpus, 2 * mp_ncpus + 4); > +#endif > + exec_map_entry_size = round_page(PATH_MAX + ARG_MAX); > exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, > - exec_map_entries * round_page(PATH_MAX + ARG_MAX), FALSE); > + exec_map_entries * exec_map_entry_size + 64 * PAGE_SIZE, FALSE); > pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, > FALSE); > } > > Modified: head/sys/vm/vm_kern.c > ============================================================================== > --- head/sys/vm/vm_kern.c Thu Jan 5 01:28:08 2017 (r311345) > +++ head/sys/vm/vm_kern.c Thu Jan 5 01:44:12 2017 (r311346) > @@ -97,6 +97,9 @@ CTASSERT((ZERO_REGION_SIZE & PAGE_MASK) > /* NB: Used by kernel debuggers. */ > const u_long vm_maxuser_address = VM_MAXUSER_ADDRESS; > > +u_int exec_map_entry_size; > +u_int exec_map_entries; > + > SYSCTL_ULONG(_vm, OID_AUTO, min_kernel_address, CTLFLAG_RD, > SYSCTL_NULL_ULONG_PTR, VM_MIN_KERNEL_ADDRESS, "Min kernel address"); > > > Modified: head/sys/vm/vm_kern.h > ============================================================================== > --- head/sys/vm/vm_kern.h Thu Jan 5 01:28:08 2017 (r311345) > +++ head/sys/vm/vm_kern.h Thu Jan 5 01:44:12 2017 (r311346) > @@ -61,7 +61,7 @@ > */ > > #ifndef _VM_VM_KERN_H_ > -#define _VM_VM_KERN_H_ 1 > +#define _VM_VM_KERN_H_ > > /* Kernel memory management definitions. */ > extern vm_map_t kernel_map; > @@ -74,5 +74,7 @@ extern struct vmem *transient_arena; > extern struct vmem *memguard_arena; > extern vm_offset_t swapbkva; > extern u_long vm_kmem_size; > +extern u_int exec_map_entries; > +extern u_int exec_map_entry_size; > > -#endif /* _VM_VM_KERN_H_ */ > +#endif /* _VM_VM_KERN_H_ */ > From owner-svn-src-head@freebsd.org Thu Jan 5 09:23:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BAD7C9E2DD; Thu, 5 Jan 2017 09:23:56 +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 343BA19FD; Thu, 5 Jan 2017 09:23:56 +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 v059NtG1098302; Thu, 5 Jan 2017 09:23:55 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v059NsCS098294; Thu, 5 Jan 2017 09:23:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701050923.v059NsCS098294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 5 Jan 2017 09:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311392 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 09:23:56 -0000 Author: delphij Date: Thu Jan 5 09:23:54 2017 New Revision: 311392 URL: https://svnweb.freebsd.org/changeset/base/311392 Log: Use strlcpy and snprintf in netstat(1). Expand inet6name() line buffer to NI_MAXHOST and use strlcpy/snprintf in various places. Reported by: Anton Yuzhaninov MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D8916 Modified: head/usr.bin/netstat/if.c head/usr.bin/netstat/inet.c head/usr.bin/netstat/inet6.c head/usr.bin/netstat/mroute.c head/usr.bin/netstat/netstat.h head/usr.bin/netstat/route.c head/usr.bin/netstat/sctp.c head/usr.bin/netstat/unix.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/if.c Thu Jan 5 09:23:54 2017 (r311392) @@ -393,10 +393,10 @@ intpr(void (*pfunc)(char *), int af) case AF_LINK: { struct sockaddr_dl *sdl; - char linknum[10]; + char linknum[sizeof("")]; sdl = (struct sockaddr_dl *)ifa->ifa_addr; - sprintf(linknum, "", sdl->sdl_index); + snprintf(linknum, sizeof(linknum), "", sdl->sdl_index); xo_emit("{t:network/%-*.*s} ", net_len, net_len, linknum); if (sdl->sdl_nlen == 0 && Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/inet.c Thu Jan 5 09:23:54 2017 (r311392) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include "netstat.h" #include "nl_defs.h" -char *inetname(struct in_addr *); void inetprint(const char *, struct in_addr *, int, const char *, int, const int); #ifdef INET6 @@ -1413,21 +1412,26 @@ inetprint(const char *container, struct struct servent *sp = 0; char line[80], *cp; int width; + size_t alen, plen; if (container) xo_open_container(container); if (Wflag) - sprintf(line, "%s.", inetname(in)); + snprintf(line, sizeof(line), "%s.", inetname(in)); else - sprintf(line, "%.*s.", (Aflag && !num_port) ? 12 : 16, inetname(in)); - cp = strchr(line, '\0'); + snprintf(line, sizeof(line), "%.*s.", + (Aflag && !num_port) ? 12 : 16, inetname(in)); + alen = strlen(line); + cp = line + alen; if (!num_port && port) sp = getservbyport((int)port, proto); if (sp || port == 0) - sprintf(cp, "%.15s ", sp ? sp->s_name : "*"); + snprintf(cp, sizeof(line) - alen, + "%.15s ", sp ? sp->s_name : "*"); else - sprintf(cp, "%d ", ntohs((u_short)port)); + snprintf(cp, sizeof(line) - alen, + "%d ", ntohs((u_short)port)); width = (Aflag && !Wflag) ? 18 : ((!Wflag || af1 == AF_INET) ? 22 : 45); if (Wflag) @@ -1435,7 +1439,8 @@ inetprint(const char *container, struct else xo_emit("{d:target/%-*.*s} ", width, width, line); - int alen = cp - line - 1, plen = strlen(cp) - 1; + plen = strlen(cp) - 1; + alen--; xo_emit("{e:address/%*.*s}{e:port/%*.*s}", alen, alen, line, plen, plen, cp); @@ -1481,8 +1486,9 @@ inetname(struct in_addr *inp) } else { inp->s_addr = ntohl(inp->s_addr); #define C(x) ((u_int)((x) & 0xff)) - sprintf(line, "%u.%u.%u.%u", C(inp->s_addr >> 24), - C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr)); + snprintf(line, sizeof(line), "%u.%u.%u.%u", + C(inp->s_addr >> 24), C(inp->s_addr >> 16), + C(inp->s_addr >> 8), C(inp->s_addr)); } return (line); } Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/inet6.c Thu Jan 5 09:23:54 2017 (r311392) @@ -70,8 +70,6 @@ __FBSDID("$FreeBSD$"); #include #include "netstat.h" -char *inet6name(struct in6_addr *); - static char ntop_buf[INET6_ADDRSTRLEN]; static const char *ip6nh[] = { @@ -1270,24 +1268,30 @@ inet6print(const char *container, struct struct servent *sp = 0; char line[80], *cp; int width; + size_t alen, plen; if (container) xo_open_container(container); - sprintf(line, "%.*s.", Wflag ? 39 : (Aflag && !numeric) ? 12 : 16, + snprintf(line, sizeof(line), "%.*s.", + Wflag ? 39 : (Aflag && !numeric) ? 12 : 16, inet6name(in6)); - cp = strchr(line, '\0'); + alen = strlen(line); + cp = line + alen; if (!numeric && port) GETSERVBYPORT6(port, proto, sp); if (sp || port == 0) - sprintf(cp, "%.15s", sp ? sp->s_name : "*"); + snprintf(cp, sizeof(line) - alen, + "%.15s", sp ? sp->s_name : "*"); else - sprintf(cp, "%d", ntohs((u_short)port)); + snprintf(cp, sizeof(line) - alen, + "%d", ntohs((u_short)port)); width = Wflag ? 45 : Aflag ? 18 : 22; xo_emit("{d:target/%-*.*s} ", width, width, line); - int alen = cp - line - 1, plen = strlen(cp) - 1; + plen = strlen(cp) - 1; + alen--; xo_emit("{e:address/%*.*s}{e:port/%*.*s}", alen, alen, line, plen, plen, cp); @@ -1306,7 +1310,7 @@ inet6name(struct in6_addr *in6p) { struct sockaddr_in6 sin6; char hbuf[NI_MAXHOST], *cp; - static char line[50]; + static char line[NI_MAXHOST]; static char domain[MAXHOSTNAMELEN]; static int first = 1; int flags, error; @@ -1317,9 +1321,9 @@ inet6name(struct in6_addr *in6p) } if (first && !numeric_addr) { first = 0; - if (gethostname(domain, MAXHOSTNAMELEN) == 0 && + if (gethostname(domain, sizeof(domain)) == 0 && (cp = strchr(domain, '.'))) - (void) strcpy(domain, cp + 1); + strlcpy(domain, cp + 1, sizeof(domain)); else domain[0] = 0; } @@ -1336,10 +1340,10 @@ inet6name(struct in6_addr *in6p) (cp = strchr(hbuf, '.')) && !strcmp(cp + 1, domain)) *cp = 0; - strcpy(line, hbuf); + strlcpy(line, hbuf, sizeof(line)); } else { /* XXX: this should not happen. */ - sprintf(line, "%s", + snprintf(line, sizeof(line), "%s", inet_ntop(AF_INET6, (void *)&sin6.sin6_addr, ntop_buf, sizeof(ntop_buf))); } Modified: head/usr.bin/netstat/mroute.c ============================================================================== --- head/usr.bin/netstat/mroute.c Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/mroute.c Thu Jan 5 09:23:54 2017 (r311392) @@ -100,17 +100,19 @@ print_bw_meter(struct bw_meter *bw_meter /* The measured values */ if (bw_meter->bm_flags & BW_METER_UNIT_PACKETS) { - sprintf(s1, "%ju", (uintmax_t)bw_meter->bm_measured.b_packets); + snprintf(s1, sizeof(s1), "%ju", + (uintmax_t)bw_meter->bm_measured.b_packets); xo_emit("{e:measured-packets/%ju}", (uintmax_t)bw_meter->bm_measured.b_packets); } else - sprintf(s1, "?"); + strcpy(s1, "?"); if (bw_meter->bm_flags & BW_METER_UNIT_BYTES) { - sprintf(s2, "%ju", (uintmax_t)bw_meter->bm_measured.b_bytes); + snprintf(s2, sizeof(s2), "%ju", + (uintmax_t)bw_meter->bm_measured.b_bytes); xo_emit("{e:measured-bytes/%ju}", (uintmax_t)bw_meter->bm_measured.b_bytes); } else - sprintf(s2, "?"); + strcpy(s2, "?"); xo_emit(" {[:-30}{:start-time/%lu.%06lu}|{q:measured-packets/%s}" "|{q:measured-bytes%s}{]:}", (u_long)bw_meter->bm_start_time.tv_sec, @@ -122,17 +124,19 @@ print_bw_meter(struct bw_meter *bw_meter /* The threshold values */ if (bw_meter->bm_flags & BW_METER_UNIT_PACKETS) { - sprintf(s1, "%ju", (uintmax_t)bw_meter->bm_threshold.b_packets); + snprintf(s1, sizeof(s1), "%ju", + (uintmax_t)bw_meter->bm_threshold.b_packets); xo_emit("{e:threshold-packets/%ju}", (uintmax_t)bw_meter->bm_threshold.b_packets); } else - sprintf(s1, "?"); + strcpy(s1, "?"); if (bw_meter->bm_flags & BW_METER_UNIT_BYTES) { - sprintf(s2, "%ju", (uintmax_t)bw_meter->bm_threshold.b_bytes); + snprintf(s2, sizeof(s2), "%ju", + (uintmax_t)bw_meter->bm_threshold.b_bytes); xo_emit("{e:threshold-bytes/%ju}", (uintmax_t)bw_meter->bm_threshold.b_bytes); } else - sprintf(s2, "?"); + strcpy(s2, "?"); xo_emit(" {[:-30}{:threshold-time/%lu.%06lu}|{q:threshold-packets/%s}" "|{q:threshold-bytes%s}{]:}", @@ -144,13 +148,13 @@ print_bw_meter(struct bw_meter *bw_meter &bw_meter->bm_threshold.b_time, &end); if (timercmp(&now, &end, <=)) { timersub(&end, &now, &delta); - sprintf(s3, "%lu.%06lu", + snprintf(s3, sizeof(s3), "%lu.%06lu", (u_long)delta.tv_sec, (u_long)delta.tv_usec); } else { /* Negative time */ timersub(&now, &end, &delta); - sprintf(s3, "-%lu.06%lu", + snprintf(s3, sizeof(s3), "-%lu.06%lu", (u_long)delta.tv_sec, (u_long)delta.tv_usec); } Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/netstat.h Thu Jan 5 09:23:54 2017 (r311392) @@ -100,7 +100,16 @@ void ah_stats(u_long, const char *, int, void ipcomp_stats(u_long, const char *, int, int); #endif +#ifdef INET +struct in_addr; + +char *inetname(struct in_addr *); +#endif + #ifdef INET6 +struct in6_addr; + +char *inet6name(struct in6_addr *); void ip6_stats(u_long, const char *, int, int); void ip6_ifstats(char *); void icmp6_stats(u_long, const char *, int, int); Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/route.c Thu Jan 5 09:23:54 2017 (r311392) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -115,7 +116,7 @@ static const char *fmt_sockaddr(struct s int flags); static void p_flags(int, const char *); static const char *fmt_flags(int f); -static void domask(char *, in_addr_t, u_long); +static void domask(char *, size_t, u_long); /* @@ -494,12 +495,16 @@ fmt_sockaddr(struct sockaddr *sa, struct cq = buf; slim = sa->sa_len + (u_char *) sa; - cqlim = cq + sizeof(buf) - 6; - cq += sprintf(cq, "(%d)", sa->sa_family); + cqlim = cq + sizeof(buf) - sizeof(" ffff"); + snprintf(cq, sizeof(cq), "(%d)", sa->sa_family); + cq += strlen(cq); while (s < slim && cq < cqlim) { - cq += sprintf(cq, " %02x", *s++); - if (s < slim) - cq += sprintf(cq, "%02x", *s++); + snprintf(cq, sizeof(" ff"), " %02x", *s++); + cq += strlen(cq); + if (s < slim) { + snprintf(cq, sizeof("ff"), "%02x", *s++); + cq += strlen(cq); + } } cp = buf; } @@ -576,7 +581,7 @@ routename(struct sockaddr *sa, int flags 0) static void -domask(char *dst, in_addr_t addr __unused, u_long mask) +domask(char *dst, size_t buflen, u_long mask) { int b, i; @@ -598,9 +603,9 @@ domask(char *dst, in_addr_t addr __unuse break; } if (i == -1) - sprintf(dst, "&0x%lx", mask); + snprintf(dst, buflen, "&0x%lx", mask); else - sprintf(dst, "/%d", 32-i); + snprintf(dst, buflen, "/%d", 32-i); } /* @@ -631,7 +636,7 @@ static const char * netname4(in_addr_t in, in_addr_t mask) { char *cp = 0; - static char line[MAXHOSTNAMELEN + sizeof("/xx")]; + static char line[MAXHOSTNAMELEN + sizeof("&0xffffffff")]; char nline[INET_ADDRSTRLEN]; struct netent *np = 0; in_addr_t i; @@ -657,7 +662,7 @@ netname4(in_addr_t in, in_addr_t mask) else { inet_ntop(AF_INET, &in, nline, sizeof(nline)); strlcpy(line, nline, sizeof(line)); - domask(line + strlen(line), i, ntohl(mask)); + domask(line + strlen(line), sizeof(line) - strlen(line), ntohl(mask)); } return (line); @@ -686,7 +691,7 @@ in6_fillscopeid(struct sockaddr_in6 *sa6 } /* Mask to length table. To check an invalid value, (length + 1) is used. */ -static int masktolen[256] = { +static const u_char masktolen[256] = { [0xff] = 8 + 1, [0xfe] = 7 + 1, [0xfc] = 6 + 1, @@ -704,17 +709,20 @@ netname6(struct sockaddr_in6 *sa6, struc static char line[NI_MAXHOST + sizeof("/xxx") - 1]; struct sockaddr_in6 addr; char nline[NI_MAXHOST]; + char maskbuf[sizeof("/xxx")]; u_char *p, *lim; - int masklen, illegal = 0, i; + u_char masklen; + int i; + bool illegal = false; if (mask) { p = (u_char *)&mask->sin6_addr; for (masklen = 0, lim = p + 16; p < lim; p++) { - if (masktolen[*p] > 0) + if (masktolen[*p] > 0) { /* -1 is required. */ - masklen += masktolen[*p] - 1; - else - illegal++; + masklen += (masktolen[*p] - 1); + } else + illegal = true; } if (illegal) xo_error("illegal prefixlen\n"); @@ -738,8 +746,10 @@ netname6(struct sockaddr_in6 *sa6, struc else getnameinfo((struct sockaddr *)sa6, sa6->sin6_len, line, sizeof(line), NULL, 0, 0); - if (numeric_addr || strcmp(line, nline) == 0) - sprintf(&line[strlen(line)], "/%d", masklen); + if (numeric_addr || strcmp(line, nline) == 0) { + snprintf(maskbuf, sizeof(maskbuf), "/%d", masklen); + strlcat(line, maskbuf, sizeof(line)); + } return (line); } Modified: head/usr.bin/netstat/sctp.c ============================================================================== --- head/usr.bin/netstat/sctp.c Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/sctp.c Thu Jan 5 09:23:54 2017 (r311392) @@ -104,16 +104,6 @@ struct xraddr_entry { LIST_ENTRY(xraddr_entry) xraddr_entries; }; -#ifdef INET -char * -inetname(struct in_addr *inp); -#endif - -#ifdef INET6 -char * -inet6name(struct in6_addr *in6p); -#endif - static void sctp_print_address(const char *container, union sctp_sockstore *address, int port, int num_port) @@ -121,6 +111,7 @@ sctp_print_address(const char *container struct servent *sp = 0; char line[80], *cp; int width; + size_t alen, plen; if (container) xo_open_container(container); @@ -128,29 +119,36 @@ sctp_print_address(const char *container switch (address->sa.sa_family) { #ifdef INET case AF_INET: - sprintf(line, "%.*s.", Wflag ? 39 : 16, inetname(&address->sin.sin_addr)); + snprintf(line, sizeof(line), "%.*s.", + Wflag ? 39 : 16, inetname(&address->sin.sin_addr)); break; #endif #ifdef INET6 case AF_INET6: - sprintf(line, "%.*s.", Wflag ? 39 : 16, inet6name(&address->sin6.sin6_addr)); + snprintf(line, sizeof(line), "%.*s.", + Wflag ? 39 : 16, inet6name(&address->sin6.sin6_addr)); break; #endif default: - sprintf(line, "%.*s.", Wflag ? 39 : 16, ""); + snprintf(line, sizeof(line), "%.*s.", + Wflag ? 39 : 16, ""); break; } - cp = strchr(line, '\0'); + alen = strlen(line); + cp = line + alen; if (!num_port && port) sp = getservbyport((int)port, "sctp"); if (sp || port == 0) - sprintf(cp, "%.15s ", sp ? sp->s_name : "*"); + snprintf(cp, sizeof(line) - alen, + "%.15s ", sp ? sp->s_name : "*"); else - sprintf(cp, "%d ", ntohs((u_short)port)); + snprintf(cp, sizeof(line) - alen, + "%d ", ntohs((u_short)port)); width = Wflag ? 45 : 22; xo_emit("{d:target/%-*.*s} ", width, width, line); - int alen = cp - line - 1, plen = strlen(cp) - 1; + plen = strlen(cp) - 1; + alen--; xo_emit("{e:address/%*.*s}{e:port/%*.*s}", alen, alen, line, plen, plen, cp); Modified: head/usr.bin/netstat/unix.c ============================================================================== --- head/usr.bin/netstat/unix.c Thu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/unix.c Thu Jan 5 09:23:54 2017 (r311392) @@ -75,7 +75,7 @@ pcblist_sysctl(int type, char **bufp) size_t len; char mibvar[sizeof "net.local.seqpacket.pcblist"]; - sprintf(mibvar, "net.local.%s.pcblist", socktype[type]); + snprintf(mibvar, sizeof(mibvar), "net.local.%s.pcblist", socktype[type]); len = 0; if (sysctlbyname(mibvar, 0, &len, 0, 0) < 0) { From owner-svn-src-head@freebsd.org Thu Jan 5 09:28:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B12DC9E671; Thu, 5 Jan 2017 09:28:39 +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 3A9631E24; Thu, 5 Jan 2017 09:28:39 +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 v059ScMY098526; Thu, 5 Jan 2017 09:28:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v059Scm8098525; Thu, 5 Jan 2017 09:28:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050928.v059Scm8098525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 09:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311393 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 09:28:39 -0000 Author: ngie Date: Thu Jan 5 09:28:38 2017 New Revision: 311393 URL: https://svnweb.freebsd.org/changeset/base/311393 Log: OS_getSystemUptime: use nitems for calculating the number of elements in a sysctl mib instead of hardcoding the number 2 MFC after: 3 days Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Thu Jan 5 09:23:54 2017 (r311392) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Thu Jan 5 09:28:38 2017 (r311393) @@ -33,7 +33,7 @@ * Host Resources MIB scalars implementation for SNMPd. */ -#include +#include #include #include @@ -85,7 +85,7 @@ OS_getSystemUptime(uint32_t *ut) int mib[2] = { CTL_KERN, KERN_BOOTTIME }; size_t len = sizeof(kernel_boot_timestamp); - if (sysctl(mib, 2, &kernel_boot_timestamp, + if (sysctl(mib, nitems(mib), &kernel_boot_timestamp, &len, NULL, 0) == -1) { syslog(LOG_ERR, "sysctl KERN_BOOTTIME failed: %m"); return (SNMP_ERR_GENERR); From owner-svn-src-head@freebsd.org Thu Jan 5 09:46:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C7A7C9ED53; Thu, 5 Jan 2017 09:46:37 +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 6C3FF1947; Thu, 5 Jan 2017 09:46:37 +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 v059ka2W006666; Thu, 5 Jan 2017 09:46:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v059kaAU006665; Thu, 5 Jan 2017 09:46:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701050946.v059kaAU006665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 5 Jan 2017 09:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311394 - head/contrib/bsnmp/snmp_usm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 09:46:37 -0000 Author: ngie Date: Thu Jan 5 09:46:36 2017 New Revision: 311394 URL: https://svnweb.freebsd.org/changeset/base/311394 Log: op_usm_users: don't deref uusers if it's NULL when SETting the value Add an XXX comment to note that the conditional seems suspect given how it's handled elsewhere in the SNMP_OP_SET case. MFC after: 2 weeks Reported by: Coverity CID: 1008573 Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c ============================================================================== --- head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 09:28:38 2017 (r311393) +++ head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 09:46:36 2017 (r311394) @@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, s val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) return (SNMP_ERR_NOSUCHNAME); + /* + * XXX (ngie): need to investigate the MIB to determine how + * this is possible given some of the transitions below. + */ if (community != COMM_INITIALIZE && - uuser->type == StorageType_readOnly) + uuser != NULL && uuser->type == StorageType_readOnly) return (SNMP_ERR_NOT_WRITEABLE); switch (val->var.subs[sub - 1]) { From owner-svn-src-head@freebsd.org Thu Jan 5 10:12:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0628C9F6E1; Thu, 5 Jan 2017 10:12:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD3BE176A; Thu, 5 Jan 2017 10:12:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id b1so40273980pgc.1; Thu, 05 Jan 2017 02:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=6qmZ2GqvMQhr9k19osjgbl2xBMdGWhCwebhVmtCm/mc=; b=dO9M19zIYzUBAM9PNuhbWLT3z5V+FOmFih/c4is9sQp/P5AMT2Dyh0nbu0tfuhwD+G 1Q65ks8aO8Orw79XGmnHaD8kMmrcl4rAbHx8HK+tqF6DED0lc8OnKYWqCJu3zHsY3E/4 GvVFijZCSwWcEQxFx3iZYqj5omoOgWkz3M642wb9rjDrzYFmEOjwufB73KdNZL4VN26y 99oeZ0bGUmkFD4NYHG1kuuD2MZQxf8KYsqoxT0pAZ4cugFnZG6Pgl1x3jib9oG2vhB5/ SuIu44o3XdRt7HBHXeoPGniD61EYHSGXpBzDyQvZSFajBeHPBKc+neGuy3N/5UEoqrhz t/fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=6qmZ2GqvMQhr9k19osjgbl2xBMdGWhCwebhVmtCm/mc=; b=A1IQcD/BDdxpezW+e3RGNZuQAExeYBLM29R1ojmwkBPdSxpGkuAUl0lu5cTr3tTXGq HCt9lwyt62iilJkC5e5wLXB6tc/1pdjL/Y86jblQiaU9o3MpEoWAUfhf7eZwJA2Cfoza 1qgDGZ689DqPWSguoYL5fflK03Qk2AJmzmQbAz9MRrGokyzfSbGddD+wNKnoM76rfI0i iPACCOGnT3Z8VeKhyNq4SfGpCBqAp5XXAAU1FTlwVig+n7LbbCaEFdpp/HmHJqECA2Ob UYDpqKiBVO5zbayhVZByEwpjGnTZaXOuR1nqiSXLFCobF/btTVJIAf7MPJ+xAu1NfONA 7YCg== X-Gm-Message-State: AIkVDXJhZMD3fFbxnpKjq/69XM0SGmEK0xhxwzZlLLhxJaOGC2rqHJv/ZQJXXRR/UpVk8A== X-Received: by 10.84.241.8 with SMTP id a8mr149590551pll.74.1483611175163; Thu, 05 Jan 2017 02:12:55 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s17sm3454955pgo.27.2017.01.05.02.12.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Jan 2017 02:12:54 -0800 (PST) Subject: Re: svn commit: r311287 - head/lib/libc/x86/sys Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_725FD605-BAB0-4628-B686-A32BF9085BB6"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701041610.v04GAq8n068859@repo.freebsd.org> Date: Thu, 5 Jan 2017 02:12:52 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <9DCD3DCE-D1B9-428D-8BD8-E199C37BFC64@gmail.com> References: <201701041610.v04GAq8n068859@repo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 10:12:56 -0000 --Apple-Mail=_725FD605-BAB0-4628-B686-A32BF9085BB6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 4, 2017, at 08:10, Konstantin Belousov wrote: >=20 > Author: kib > Date: Wed Jan 4 16:10:52 2017 > New Revision: 311287 > URL: https://svnweb.freebsd.org/changeset/base/311287 >=20 > Log: > __vdso_gettc(): be extra careful with /dev/hpet mappings, never unmap > the mapping which might be accessed by other threads. >=20 > If a pointer to the /dev/hpet register page mapping was stored into > the hpet_dev_map, other threads might access the page at any time. > Never unmap it, instead, keep track of mappings for all hpet units in > smal array. Store pointer to the newly mapped registers page using > CAS, to detect parallel mappings. >=20 > It appeared relatively easy to demonstrate the problem by arranging > two threads which perform gettimeofday(2) concurently, first time in > the process address space, when HPET is used for timecounter. >=20 > PR: 215715 > Sponsored by: The FreeBSD Foundation > MFC after: 1 week Thank you very much for the work! I=E2=80=99ll try to reproduce the bug = again with the ATF test. -Ngie --Apple-Mail=_725FD605-BAB0-4628-B686-A32BF9085BB6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYbhwlAAoJEPWDqSZpMIYVeUMP/A3suUEFM3GkD0rdvgkP8Qhz i8U//978pUHMk2eSEkM0DIllSDnuPawLeQrHRXzesdQUf0v6pGTVDE+4avguZYXW 6ydHVIHZchneA7KkT6uCor03SkN4mxl+GlFbVVQj5YjDUQmazEBJ1GGIqqGLAr0B xZsaKLABLjNSBZLiyFBQBhWmuS7TS4uMPIAURnWYnpnu1rNJ9Xk+56H/3a9NWsHu +RxsYgwK4/h6ClSZUylFoYmzWYr9kThnHK14dX6iGp4iwylGpnhdmLD940Yg67SZ HdLXg+9njYJY5fXk4ihiC7mShmtktzw8lvkZS3AohnE/5bMSuAQtw3X+vcx3DIbq PUxJsfA8NhcXIN7zVBKMyhySCAcz3BrzQcJ78LxDeWXLEiRAM82noOqZSNlZqbKM N1P8kIwjfZCVYVww5/p6gm34hDnrDg3gfDEIPKcA4J5W9xWFCHb6AihWtWfViqCM EY7+lGk1Ln0BQ+/UTQ4VDq0cQWExjGrKrbmteXtkNVNw634O/oolxgElkgioGX/L TI/0ORViI3FvqTjSiOYzxXe70SbV4r+s0GRTPtGLr0vK+9pji8PAMrQZbL3kFcrA 7TYlG2NPzSKLbUPAcqljq26TIHXZDE8TVh3TIq8r5rytL6pNX0BzLrx1KYb7lOsU ZZ3iB1OMHEKqsUSBog0A =ASqr -----END PGP SIGNATURE----- --Apple-Mail=_725FD605-BAB0-4628-B686-A32BF9085BB6-- From owner-svn-src-head@freebsd.org Thu Jan 5 11:44:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEA06CA0B07; Thu, 5 Jan 2017 11:44:28 +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 BE7BA189E; Thu, 5 Jan 2017 11:44:28 +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 v05BiRuE058550; Thu, 5 Jan 2017 11:44:27 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05BiRPl058549; Thu, 5 Jan 2017 11:44:27 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201701051144.v05BiRPl058549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 5 Jan 2017 11:44:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311426 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 11:44:29 -0000 Author: ume Date: Thu Jan 5 11:44:27 2017 New Revision: 311426 URL: https://svnweb.freebsd.org/changeset/base/311426 Log: When displaying netstat details with libxo in JSON or XML modes, the value conversion for tcp6 and udp6 port numbers drops last digit. PR: 215682 MFC after: 3 days Modified: head/usr.bin/netstat/inet6.c Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Thu Jan 5 11:43:47 2017 (r311425) +++ head/usr.bin/netstat/inet6.c Thu Jan 5 11:44:27 2017 (r311426) @@ -1290,7 +1290,7 @@ inet6print(const char *container, struct xo_emit("{d:target/%-*.*s} ", width, width, line); - plen = strlen(cp) - 1; + plen = strlen(cp); alen--; xo_emit("{e:address/%*.*s}{e:port/%*.*s}", alen, alen, line, plen, plen, cp); From owner-svn-src-head@freebsd.org Thu Jan 5 15:07:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2118C9F1F1; Thu, 5 Jan 2017 15:07:05 +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 81A521DBC; Thu, 5 Jan 2017 15:07:05 +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 v05F74xA041711; Thu, 5 Jan 2017 15:07:04 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05F74L3041710; Thu, 5 Jan 2017 15:07:04 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701051507.v05F74L3041710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 5 Jan 2017 15:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311445 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 15:07:05 -0000 Author: asomers Date: Thu Jan 5 15:07:04 2017 New Revision: 311445 URL: https://svnweb.freebsd.org/changeset/base/311445 Log: Fix typo from r311349 Reported by: lwhsu Pointy-hat-to: asomers MFC after: 4 weeks X-MFC-with: 311349 Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Jan 5 13:29:57 2017 (r311444) +++ head/etc/mtree/BSD.tests.dist Thu Jan 5 15:07:04 2017 (r311445) @@ -593,6 +593,7 @@ t0 .. .. + .. bsdcat .. calendar From owner-svn-src-head@freebsd.org Thu Jan 5 16:30:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1595ECA0ADB; Thu, 5 Jan 2017 16:30:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D919415D2; Thu, 5 Jan 2017 16:30:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05GUEnj074750; Thu, 5 Jan 2017 16:30:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05GUEpf074749; Thu, 5 Jan 2017 16:30:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701051630.v05GUEpf074749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 5 Jan 2017 16:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311446 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 16:30:15 -0000 Author: mav Date: Thu Jan 5 16:30:13 2017 New Revision: 311446 URL: https://svnweb.freebsd.org/changeset/base/311446 Log: Fix bootverbose affecting code logic in r294558. Reported by: Jilles Tjoelker Modified: head/sys/cam/ctl/ctl_ha.c Modified: head/sys/cam/ctl/ctl_ha.c ============================================================================== --- head/sys/cam/ctl/ctl_ha.c Thu Jan 5 15:07:04 2017 (r311445) +++ head/sys/cam/ctl/ctl_ha.c Thu Jan 5 16:30:13 2017 (r311446) @@ -443,8 +443,9 @@ ctl_ha_connect(struct ha_softc *softc) memcpy(&sa, &softc->ha_peer_in, sizeof(sa)); error = soconnect(so, (struct sockaddr *)&sa, td); - if (error != 0 && bootverbose) { - printf("%s: soconnect() error %d\n", __func__, error); + if (error != 0) { + if (bootverbose) + printf("%s: soconnect() error %d\n", __func__, error); goto out; } return (0); From owner-svn-src-head@freebsd.org Thu Jan 5 16:44:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC9F0CA0FE1; Thu, 5 Jan 2017 16:44:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC0301099; Thu, 5 Jan 2017 16:44:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 04B8610B57C; Thu, 5 Jan 2017 11:44:29 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311343 - head/sys/mips/mips Date: Thu, 05 Jan 2017 08:41:15 -0800 Message-ID: <2120165.Kvv3hnWIOn@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201701050059.v050xrDZ088677@repo.freebsd.org> References: <201701050059.v050xrDZ088677@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 05 Jan 2017 11:44:29 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 16:44:37 -0000 On Thursday, January 05, 2017 12:59:53 AM John Baldwin wrote: > Author: jhb > Date: Thu Jan 5 00:59:53 2017 > New Revision: 311343 > URL: https://svnweb.freebsd.org/changeset/base/311343 > > Log: > Use db_printsym() to display function names in stack traces. > > Previously, the stack unwinder tried to locate the start of the function > in each frame by walking backwards until it found an instruction that > modified the stack pointer and then assumed that was the first instruction > in a function. The unwinder would only print a function name if the > starting instruction's address was an exact match for a symbol name. > However, not all functions generated by modern compilers start off functions > with that instruction. For those functions, the unwinder would fail to > find a matching function name. As a result, most frames in a stack > trace would be printed as raw hex PC's instead of a function name. > > Stop depending on this incorrect assumption and just use db_printsym() > like other platforms to display the function name and offset for each > frame. This generates a far more useful stack trace. > > While here, don't print out curproc's pid at the end of the trace. The > pid was always from curproc even if tracing some other process. > > In addition, remove some rotted comments about hardcoded constants that > are no longer hardcoded. > > Sponsored by: DARPA / AFRL After these (and previous fixes), the original kernel stack overflow I saw earlier now results in a much more usable stack trace from DDB. Note that some of the function names are false positives due to no symbols for static functions, but many more frames were false negatives previously. panic: kernel stack overflow - trapframe at 0xffffffff806d9eb0 KDB: enter: panic [ thread pid 624 tid 100043 ] Stopped at 0x4: db> tr Tracing pid 624 tid 100043 td 0x98000000016baa20 kdb_enter+0x88 (?,?,?,?) ra ffffffff8031cbc8 sp ffffffff806d9e00 sz 16 vpanic+0x1b0 (?,?,?,?) ra ffffffff8031cc30 sp ffffffff806d9e10 sz 32 kassert_panic (?,ffffffff806d9eb0,ffffffffffffffec,ffffffff802fce94) ra ffffffff80569fec sp ffffffff806d9e30 sz 96 MipsKStackOverflow (?,?,?,?) ra 0 sp ffffffff806d9e90 sz 0 --- exception, cause 7 badvaddr 1 --- thread_lock_flags_+0xc (?,?,?,?) ra ffffffff802acf4c sp c00000002a5a9fb0 sz 96 statclock_cnt+0x1ec (?,?,?,?) ra ffffffff80581388 sp c00000002a5aa010 sz 32 cpu_set_upcall+0x668 (?,?,?,?) ra ffffffff805816f8 sp c00000002a5aa030 sz 64 cpu_set_upcall+0x9d8 (?,?,?,?) ra ffffffff8058ae94 sp c00000002a5aa070 sz 48 DELAY+0x4e4 (?,?,?,?) ra ffffffff802db900 sp c00000002a5aa0a0 sz 64 intr_event_handle+0xb0 (?,?,?,?) ra ffffffff8058a250 sp c00000002a5aa0e0 sz 64 cpu_intr+0x230 (?,?,?,?) ra ffffffff80569840 sp c00000002a5aa120 sz 80 MipsKernIntr+0x188 (?,?,?,?) ra 0 sp c00000002a5aa170 sz 0 --- exception, cause 0 badvaddr ffffffff8043d700 --- bpf_mtap+0x88 (?,?,?,?) ra ffffffff80190028 sp c00000002a5aa2e0 sz 96 am7990_config+0x680 (?,?,?,?) ra ffffffff801925fc sp c00000002a5aa340 sz 96 lance_init_locked+0x564 (?,?,?,?) ra ffffffff8042fbdc sp c00000002a5aa3a0 sz 32 if_start+0x14 (?,?,?,?) ra ffffffff804317f8 sp c00000002a5aa3c0 sz 16 if_handoff+0x340 (?,?,?,?) ra ffffffff8043cfe0 sp c00000002a5aa3d0 sz 48 ether_output_frame+0x80 (?,9800000001629e00,?,?) ra ffffffff8043d700 sp c00000002a5aa400 sz 32 ether_output+0x710 (?,9800000001629e00,?,?) ra ffffffff80484618 sp c00000002a5aa420 sz 112 ip_output+0x1af8 (9800000001629e00,?,?,0) ra ffffffff804986bc sp c00000002a5aa490 sz 304 tcp_output+0x209c (?,?,?,?) ra ffffffff804aa8e8 sp c00000002a5aa5c0 sz 368 tcp_twstart+0x2c70 (?,?,?,?) ra ffffffff803c7220 sp c00000002a5aa730 sz 96 sosend_generic+0x618 (?,0,?,?) ra ffffffff803c3cb4 sp c00000002a5aa790 sz 160 sosend+0x1c (?,?,?,?) ra ffffffff804bb2f0 sp c00000002a5aa830 sz 16 clnt_vc_create+0x1208 (?,?,15,980000000162d900) ra ffffffff804b993c sp c00000002a5aa840 sz 320 clnt_reconnect_create+0xec4 (9800000001630400,?,15,980000000162d900) ra ffffffff801e225c sp c00000002a5aa980 sz 176 newnfs_request+0x9f4 (?,?,?,?) ra ffffffff8023466c sp c00000002a5aaa30 sz 336 nfscl_request+0x7c (?,?,?,?) ra ffffffff8020e2d0 sp c00000002a5aab80 sz 64 nfsrpc_commit+0x470 (?,?,?,?) ra ffffffff802276f8 sp c00000002a5aabc0 sz 368 ncl_commit+0xf8 (9800000004440760,?,?,?) ra ffffffff80227bfc sp c00000002a5aad30 sz 288 ncl_flush+0x474 (9800000004440760,?,?,98000000016baa20) ra ffffffff802285d0 sp c00000002a5aae50 sz 384 ncl_flush+0xe48 (?,?,?,?) ra ffffffff80591390 sp c00000002a5aafd0 sz 16 VOP_FSYNC_APV+0x118 (?,?,?,?) ra ffffffff803df524 sp c00000002a5aafe0 sz 32 bufsync+0x5c (9800000004440760,1,?,?) ra ffffffff8040e030 sp c00000002a5ab000 sz 48 bufobj_invalbuf+0xf8 (?,?,?,?) ra ffffffff8040e3e0 sp c00000002a5ab030 sz 96 vinvalbuf+0x28 (?,?,?,?) ra ffffffff80239780 sp c00000002a5ab090 sz 16 ncl_vinvalbuf+0x170 (?,?,?,?) ra ffffffff80226b58 sp c00000002a5ab0a0 sz 96 ncl_removeit+0x298 (?,?,?,?) ra ffffffff805920b8 sp c00000002a5ab100 sz 304 VOP_SETATTR_APV+0x118 (?,?,?,?) ra ffffffff8023c4e0 sp c00000002a5ab230 sz 32 ncl_write+0x13c0 (4101,?,?,?) ra ffffffff805924f4 sp c00000002a5ab250 sz 512 VOP_WRITE_APV+0x18c (?,?,?,?) ra ffffffff8041e6a0 sp c00000002a5ab450 sz 256 vn_utimes_perm+0x1d8 (?,?,?,?) ra ffffffff8041e840 sp c00000002a5ab550 sz 64 vn_utimes_perm+0x378 (?,?,?,?) ra ffffffff804218a0 sp c00000002a5ab590 sz 320 vn_rdwr+0x1b0 (1,?,16042b000,10000) ra ffffffff80421b00 sp c00000002a5ab6d0 sz 240 vn_rdwr_inchunks+0xc8 (?,?,?,?) ra ffffffff802a1764 sp c00000002a5ab7c0 sz 144 elf64_brand_inuse+0x964 (?,?,?,?) ra ffffffff802a2070 sp c00000002a5ab850 sz 48 elf64_coredump+0x7d8 (?,9800000004440760,7fffffffffffffff,?) ra ffffffff80320320 sp c00000002a5ab880 sz 256 sigexit+0xb58 (?,?,?,?) ra ffffffff803226cc sp c00000002a5ab980 sz 672 postsig+0x1e4 (?,?,?,?) ra ffffffff8038cfb8 sp c00000002a5abc20 sz 192 ast+0x418 (?,?,?,?) ra ffffffff8056951c sp c00000002a5abce0 sz 48 MipsUserGenException+0x1d8 (?,?,?,120000ff0) ra 0 sp c00000002a5abd10 sz 0 -- John Baldwin From owner-svn-src-head@freebsd.org Thu Jan 5 17:03:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F7F8CA15FD; Thu, 5 Jan 2017 17:03:36 +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 2F19C1BDD; Thu, 5 Jan 2017 17:03:36 +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 v05H3Z7r090573; Thu, 5 Jan 2017 17:03:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05H3Zk8090571; Thu, 5 Jan 2017 17:03:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701051703.v05H3Zk8090571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 5 Jan 2017 17:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311447 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:03:36 -0000 Author: kib Date: Thu Jan 5 17:03:35 2017 New Revision: 311447 URL: https://svnweb.freebsd.org/changeset/base/311447 Log: Some style fixes for getfstat(2)-related code. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/vfs_syscalls.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 16:30:13 2017 (r311446) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 17:03:35 2017 (r311447) @@ -244,7 +244,8 @@ copy_statfs(struct statfs *in, struct st #ifdef COMPAT_FREEBSD4 int -freebsd4_freebsd32_getfsstat(struct thread *td, struct freebsd4_freebsd32_getfsstat_args *uap) +freebsd4_freebsd32_getfsstat(struct thread *td, + struct freebsd4_freebsd32_getfsstat_args *uap) { struct statfs *buf, *sp; struct statfs32 stat32; Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Jan 5 16:30:13 2017 (r311446) +++ head/sys/kern/vfs_syscalls.c Thu Jan 5 17:03:35 2017 (r311447) @@ -485,7 +485,7 @@ restart: continue; } } - if (sfsp && count < maxcount) { + if (sfsp != NULL && count < maxcount) { sp = &mp->mnt_stat; /* * Set these in case the underlying filesystem @@ -530,7 +530,7 @@ restart: vfs_unbusy(mp); } mtx_unlock(&mountlist_mtx); - if (sfsp && count > maxcount) + if (sfsp != NULL && count > maxcount) *countp = maxcount; else *countp = count; From owner-svn-src-head@freebsd.org Thu Jan 5 17:08:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB5E1CA16A9; Thu, 5 Jan 2017 17:08:11 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93C321DEB; Thu, 5 Jan 2017 17:08:11 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05H8AHW090781; Thu, 5 Jan 2017 17:08:10 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05H8AfF090779; Thu, 5 Jan 2017 17:08:10 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201701051708.v05H8AfF090779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 5 Jan 2017 17:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311448 - head/sys/dev/etherswitch/e6000sw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:08:11 -0000 Author: zbb Date: Thu Jan 5 17:08:10 2017 New Revision: 311448 URL: https://svnweb.freebsd.org/changeset/base/311448 Log: Improve ports handling in e6000sw driver - recognize ports and vlangroups based on DTS file - support multi-chip addresing mode (required in upcoming Armada-388-Clearfog support) - refactor attachment function Each port in 'dsa' node should have 'vlangroup' property. Otherwise, e6000sw will fail to attach. Submitted by: Bartosz Szczepanek Konrad Adamczyk Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7328 Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c head/sys/dev/etherswitch/e6000sw/e6000swreg.h Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Thu Jan 5 17:03:35 2017 (r311447) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Thu Jan 5 17:08:10 2017 (r311448) @@ -59,6 +59,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include "e6000swreg.h" #include "etherswitch_if.h" #include "miibus_if.h" @@ -78,23 +82,28 @@ MALLOC_DEFINE(M_E6000SW, "e6000sw", "e60 typedef struct e6000sw_softc { device_t dev; + phandle_t node; struct sx sx; - struct ifnet *ifp[E6000SW_NUM_PHYS]; - char *ifname[E6000SW_NUM_PHYS]; - device_t miibus[E6000SW_NUM_PHYS]; - struct mii_data *mii[E6000SW_NUM_PHYS]; + struct ifnet *ifp[E6000SW_MAX_PORTS]; + char *ifname[E6000SW_MAX_PORTS]; + device_t miibus[E6000SW_MAX_PORTS]; + struct mii_data *mii[E6000SW_MAX_PORTS]; struct callout tick_callout; uint32_t cpuports_mask; + uint32_t fixed_mask; + int sw_addr; + int num_ports; + boolean_t multi_chip; int vid[E6000SW_NUM_VGROUPS]; int members[E6000SW_NUM_VGROUPS]; - int vgroup[E6000SW_NUM_PORTS]; + int vgroup[E6000SW_MAX_PORTS]; } e6000sw_softc_t; static etherswitch_info_t etherswitch_info = { - .es_nports = E6000SW_NUM_PORTS, + .es_nports = 0, .es_nvlangroups = E6000SW_NUM_VGROUPS, .es_name = "Marvell 6000 series switch" }; @@ -134,7 +143,9 @@ static int e6000sw_atu_mac_table(device_ atu_opt *atu, int flag); static int e6000sw_get_pvid(e6000sw_softc_t *sc, int port, int *pvid); static int e6000sw_set_pvid(e6000sw_softc_t *sc, int port, int pvid); -static __inline int e6000sw_cpuport(e6000sw_softc_t *sc, int port); +static __inline int e6000sw_is_cpuport(e6000sw_softc_t *sc, int port); +static __inline int e6000sw_is_fixedport(e6000sw_softc_t *sc, int port); +static __inline int e6000sw_is_phyport(e6000sw_softc_t *sc, int port); static __inline struct mii_data *e6000sw_miiforphy(e6000sw_softc_t *sc, unsigned int phy); @@ -181,6 +192,14 @@ DRIVER_MODULE(etherswitch, e6000sw, ethe DRIVER_MODULE(miibus, e6000sw, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(e6000sw, mdio, 1, 1, 1); +#define SMI_CMD 0 +#define SMI_CMD_BUSY (1<<15) +#define SMI_CMD_OP_READ ((2<<10)|SMI_CMD_BUSY|(1<<12)) +#define SMI_CMD_OP_WRITE ((1<<10)|SMI_CMD_BUSY|(1<<12)) +#define SMI_DATA 1 + +#define MDIO_READ(dev, addr, reg) MDIO_READREG(device_get_parent(dev), (addr), (reg)) +#define MDIO_WRITE(dev, addr, reg, val) MDIO_WRITEREG(device_get_parent(dev), (addr), (reg), (val)) static void e6000sw_identify(driver_t *driver, device_t parent) { @@ -195,10 +214,37 @@ e6000sw_probe(device_t dev) e6000sw_softc_t *sc; const char *description; unsigned int id; + uint16_t dev_addr; + phandle_t dsa_node, switch_node; + + dsa_node = fdt_find_compatible(OF_finddevice("/"), + "marvell,dsa", 0); + switch_node = OF_child(dsa_node); + + if (switch_node == 0) + return (ENXIO); sc = device_get_softc(dev); bzero(sc, sizeof(e6000sw_softc_t)); sc->dev = dev; + sc->node = switch_node; + + /* Read ADDR[4:1]n using indirect access */ + MDIO_WRITE(dev, REG_GLOBAL2, SCR_AND_MISC_REG, + SCR_AND_MISC_PTR_CFG); + dev_addr = MDIO_READ(dev, REG_GLOBAL2, SCR_AND_MISC_REG) & + SCR_AND_MISC_DATA_CFG_MASK; + if (dev_addr != 0) { + sc->multi_chip = true; + device_printf(dev, "multi-chip addresing mode\n"); + } else { + device_printf(dev, "single-chip addressing mode\n"); + } + + if (OF_getencprop(sc->node, "reg", &sc->sw_addr, + sizeof(sc->sw_addr)) < 0) + return (ENXIO); + /* Lock is necessary due to assertions. */ sx_init(&sc->sx, "e6000sw"); E6000SW_LOCK(sc); @@ -218,7 +264,7 @@ e6000sw_probe(device_t dev) default: E6000SW_UNLOCK(sc); sx_destroy(&sc->sx); - device_printf(dev, "Unrecognized device.\n"); + device_printf(dev, "Unrecognized device, id 0x%x.\n", id); return (ENXIO); } @@ -230,48 +276,151 @@ e6000sw_probe(device_t dev) } static int +e6000sw_parse_child_fdt(device_t dev, phandle_t child, uint32_t *fixed_mask, + uint32_t *cpu_mask, int *pport, int *pvlangroup) +{ + char portlabel[100]; + uint32_t port, vlangroup; + boolean_t fixed_link; + + if (fixed_mask == NULL || cpu_mask == NULL || pport == NULL) + return (ENXIO); + + OF_getprop(child, "label", (void *)portlabel, 100); + OF_getencprop(child, "reg", (void *)&port, sizeof(port)); + + if (OF_getencprop(child, "vlangroup", (void *)&vlangroup, + sizeof(vlangroup)) > 0) { + if (vlangroup >= E6000SW_NUM_VGROUPS) + return (ENXIO); + *pvlangroup = vlangroup; + } else { + *pvlangroup = -1; + } + + if (port >= E6000SW_MAX_PORTS) + return (ENXIO); + *pport = port; + + if (strncmp(portlabel, "cpu", 3) == 0) { + device_printf(dev, "CPU port at %d\n", port); + *cpu_mask |= (1 << port); + return (0); + } + + fixed_link = OF_child(child); + if (fixed_link) { + *fixed_mask |= (1 << port); + device_printf(dev, "fixed port at %d\n", port); + } else { + device_printf(dev, "PHY at %d\n", port); + } + + return (0); +} + +static int +e6000sw_init_interface(e6000sw_softc_t *sc, int port) +{ + char name[IFNAMSIZ]; + + snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->dev)); + + sc->ifp[port] = if_alloc(IFT_ETHER); + if (sc->ifp[port] == NULL) + return (ENOMEM); + sc->ifp[port]->if_softc = sc; + sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX; + sc->ifname[port] = malloc(strlen(name) + 1, M_E6000SW, M_WAITOK); + if (sc->ifname[port] == NULL) + return (ENOMEM); + memcpy(sc->ifname[port], name, strlen(name) + 1); + if_initname(sc->ifp[port], sc->ifname[port], port); + + return (0); +} + +static int +e6000sw_attach_miibus(e6000sw_softc_t *sc, int port) +{ + int err; + + err = mii_attach(sc->dev, &sc->miibus[port], sc->ifp[port], + e6000sw_ifmedia_upd, e6000sw_ifmedia_sts, BMSR_DEFCAPMASK, + port, MII_OFFSET_ANY, 0); + if (err != 0) + return (err); + + sc->mii[port] = device_get_softc(sc->miibus[port]); + return (0); +} + +static int e6000sw_attach(device_t dev) { e6000sw_softc_t *sc; - int phy, err, port; - char name[IFNAMSIZ]; + phandle_t child; + int err, port, vlangroup; + int member_ports[E6000SW_NUM_VGROUPS]; + etherswitch_vlangroup_t vg; err = 0; sc = device_get_softc(dev); + E6000SW_LOCK(sc); - sc->cpuports_mask = E6000SW_CPUPORTS_MASK; - for (port = 0; port < E6000SW_NUM_PORTS; port++) - sc->vgroup[port] = E6000SW_PORT_NO_VGROUP; e6000sw_setup(dev, sc); + bzero(member_ports, sizeof(member_ports)); - snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->dev)); - for (phy = 0; phy < E6000SW_NUM_PHYS; phy++) { - sc->ifp[phy] = if_alloc(IFT_ETHER); - if (sc->ifp[phy] == NULL) + for (child = OF_child(sc->node); child != 0; child = OF_peer(child)) { + err = e6000sw_parse_child_fdt(dev, child, &sc->fixed_mask, + &sc->cpuports_mask, &port, &vlangroup); + if (err != 0) { + device_printf(sc->dev, "failed to parse DTS\n"); goto out_fail; - sc->ifp[phy]->if_softc = sc; - sc->ifp[phy]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; - sc->ifname[phy] = malloc(strlen(name) + 1, M_E6000SW, M_WAITOK); - if (sc->ifname[phy] == NULL) + } + + if (vlangroup != -1) + member_ports[vlangroup] |= (1 << port); + + sc->num_ports++; + + err = e6000sw_init_interface(sc, port); + if (err != 0) { + device_printf(sc->dev, "failed to init interface\n"); goto out_fail; - bcopy(name, sc->ifname[phy], strlen(name) + 1); - if_initname(sc->ifp[phy], sc->ifname[phy], phy); - err = mii_attach(sc->dev, &sc->miibus[phy], sc->ifp[phy], - e6000sw_ifmedia_upd, e6000sw_ifmedia_sts, BMSR_DEFCAPMASK, - phy, MII_OFFSET_ANY, 0); + } + + /* Don't attach miibus at CPU/fixed ports */ + if (!e6000sw_is_phyport(sc, port)) + continue; + + err = e6000sw_attach_miibus(sc, port); if (err != 0) { - device_printf(sc->dev, - "attaching PHY %d failed\n", - phy); + device_printf(sc->dev, "failed to attach miibus\n"); goto out_fail; } - sc->mii[phy] = device_get_softc(sc->miibus[phy]); } + + etherswitch_info.es_nports = sc->num_ports; + for (port = 0; port < sc->num_ports; port++) + sc->vgroup[port] = E6000SW_PORT_NO_VGROUP; + + /* Set VLAN configuration */ + e6000sw_port_vlan_conf(sc); + + /* Set vlangroups */ + for (vlangroup = 0; vlangroup < E6000SW_NUM_VGROUPS; vlangroup++) + if (member_ports[vlangroup] != 0) { + vg.es_vlangroup = vg.es_vid = vlangroup; + vg.es_member_ports = vg.es_untagged_ports = + member_ports[vlangroup]; + e6000sw_setvgroup(dev, &vg); + } + E6000SW_UNLOCK(sc); bus_generic_probe(dev); - bus_enumerate_hinted_children(dev); bus_generic_attach(dev); kproc_create(e6000sw_tick, sc, &e6000sw_kproc, 0, 0, @@ -282,7 +431,7 @@ e6000sw_attach(device_t dev) out_fail: e6000sw_detach(dev); - return (ENXIO); + return (err); } static __inline void @@ -294,7 +443,6 @@ e6000sw_poll_done(e6000sw_softc_t *sc) continue; } - /* * PHY registers are paged. Put page index in reg 22 (accessible from every * page), then access specific register. @@ -308,7 +456,7 @@ e6000sw_readphy(device_t dev, int phy, i sc = device_get_softc(dev); val = 0; - if (phy >= E6000SW_NUM_PHYS || reg >= E6000SW_NUM_PHY_REGS) { + if (!e6000sw_is_phyport(sc, phy) || reg >= E6000SW_NUM_PHY_REGS) { device_printf(dev, "Wrong register address.\n"); return (EINVAL); } @@ -338,7 +486,7 @@ e6000sw_writephy(device_t dev, int phy, sc = device_get_softc(dev); val = 0; - if (phy >= E6000SW_NUM_PHYS || reg >= E6000SW_NUM_PHY_REGS) { + if (!e6000sw_is_phyport(sc, phy) || reg >= E6000SW_NUM_PHY_REGS) { device_printf(dev, "Wrong register address.\n"); return (EINVAL); } @@ -368,7 +516,7 @@ e6000sw_detach(device_t dev) sc = device_get_softc(dev); bus_generic_detach(dev); sx_destroy(&sc->sx); - for (phy = 0; phy < E6000SW_NUM_PHYS; phy++) { + for (phy = 0; phy < sc->num_ports; phy++) { if (sc->miibus[phy] != NULL) device_delete_child(dev, sc->miibus[phy]); if (sc->ifp[phy] != NULL) @@ -422,7 +570,7 @@ e6000sw_getport(device_t dev, etherswitc E6000SW_LOCK(sc); - if (p->es_port >= E6000SW_NUM_PORTS || + if (p->es_port >= sc->num_ports || p->es_port < 0) { err = EINVAL; goto out; @@ -430,7 +578,7 @@ e6000sw_getport(device_t dev, etherswitc e6000sw_get_pvid(sc, p->es_port, &p->es_pvid); - if (e6000sw_cpuport(sc, p->es_port)) { + if (e6000sw_is_cpuport(sc, p->es_port)) { p->es_flags |= ETHERSWITCH_PORT_CPU; ifmr = &p->es_ifmr; ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; @@ -438,6 +586,13 @@ e6000sw_getport(device_t dev, etherswitc ifmr->ifm_current = ifmr->ifm_active = IFM_ETHER | IFM_1000_T | IFM_FDX; ifmr->ifm_mask = 0; + } else if (e6000sw_is_fixedport(sc, p->es_port)) { + ifmr = &p->es_ifmr; + ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; + ifmr->ifm_count = 0; + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_1000_T | IFM_FDX; + ifmr->ifm_mask = 0; } else { mii = e6000sw_miiforphy(sc, p->es_port); err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, @@ -462,7 +617,7 @@ e6000sw_setport(device_t dev, etherswitc E6000SW_LOCK(sc); - if (p->es_port >= E6000SW_NUM_PORTS || + if (p->es_port >= sc->num_ports || p->es_port < 0) { err = EINVAL; goto out; @@ -470,7 +625,7 @@ e6000sw_setport(device_t dev, etherswitc if (p->es_pvid != 0) e6000sw_set_pvid(sc, p->es_port, p->es_pvid); - if (!e6000sw_cpuport(sc, p->es_port)) { + if (!e6000sw_is_cpuport(sc, p->es_port)) { mii = e6000sw_miiforphy(sc, p->es_port); err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, &mii->mii_media, SIOCSIFMEDIA); @@ -644,7 +799,7 @@ e6000sw_setvgroup(device_t dev, etherswi vg->es_untagged_ports &= PORT_VLAN_MAP_TABLE_MASK; fid = vg->es_vlangroup + 1; - for (port = 0; port < E6000SW_NUM_PORTS; port++) { + for (port = 0; port < sc->num_ports; port++) { if ((sc->members[vg->es_vlangroup] & (1 << port)) || (vg->es_untagged_ports & (1 << port))) e6000sw_flush_port(sc, port); @@ -679,7 +834,7 @@ static __inline struct mii_data* e6000sw_miiforphy(e6000sw_softc_t *sc, unsigned int phy) { - if (phy >= E6000SW_NUM_PHYS) + if (!e6000sw_is_phyport(sc, phy)) return (NULL); return (device_get_softc(sc->miibus[phy])); @@ -717,13 +872,42 @@ e6000sw_ifmedia_sts(struct ifnet *ifp, s ifmr->ifm_status = mii->mii_media_status; } + +static int +e6000sw_smi_waitready(e6000sw_softc_t *sc, int phy) +{ + int i; + + for (i = 0; i < E6000SW_SMI_TIMEOUT; i++) { + if ((MDIO_READ(sc->dev, phy, SMI_CMD) + & SMI_CMD_BUSY) == 0) + return 0; + } + + return 1; +} + static __inline uint32_t e6000sw_readreg(e6000sw_softc_t *sc, int addr, int reg) { E6000SW_LOCK_ASSERT(sc, SA_XLOCKED); - return (MDIO_READREG(device_get_parent(sc->dev), addr, reg)); + if (!sc->multi_chip) + return (MDIO_READ(sc->dev, addr, reg) & 0xffff); + + if (e6000sw_smi_waitready(sc, sc->sw_addr)) { + printf("e6000sw: readreg timeout\n"); + return (0xffff); + } + MDIO_WRITE(sc->dev, sc->sw_addr, SMI_CMD, SMI_CMD_OP_READ | + (addr << 5) | reg); + if (e6000sw_smi_waitready(sc, sc->sw_addr)) { + printf("e6000sw: readreg timeout\n"); + return (0xffff); + } + + return (MDIO_READ(sc->dev, sc->sw_addr, SMI_DATA) & 0xffff); } static __inline void @@ -732,17 +916,50 @@ e6000sw_writereg(e6000sw_softc_t *sc, in E6000SW_LOCK_ASSERT(sc, SA_XLOCKED); - MDIO_WRITEREG(device_get_parent(sc->dev), addr, reg, val); + if (!sc->multi_chip) { + MDIO_WRITE(sc->dev, addr, reg, val); + return; + } + + if (e6000sw_smi_waitready(sc, sc->sw_addr)) { + printf("e6000sw: readreg timeout\n"); + return; + } + MDIO_WRITE(sc->dev, sc->sw_addr, SMI_DATA, val); + MDIO_WRITE(sc->dev, sc->sw_addr, SMI_CMD, SMI_CMD_OP_WRITE | + (addr << 5) | reg); + if (e6000sw_smi_waitready(sc, sc->sw_addr)) { + printf("e6000sw: readreg timeout\n"); + return; + } + + return; } static __inline int -e6000sw_cpuport(e6000sw_softc_t *sc, int port) +e6000sw_is_cpuport(e6000sw_softc_t *sc, int port) { return (sc->cpuports_mask & (1 << port)); } static __inline int +e6000sw_is_fixedport(e6000sw_softc_t *sc, int port) +{ + + return (sc->fixed_mask & (1 << port)); +} + +static __inline int +e6000sw_is_phyport(e6000sw_softc_t *sc, int port) +{ + uint32_t phy_mask; + phy_mask = ~(sc->fixed_mask | sc->cpuports_mask); + + return (phy_mask & (1 << port)); +} + +static __inline int e6000sw_set_pvid(e6000sw_softc_t *sc, int port, int pvid) { @@ -770,17 +987,20 @@ e6000sw_tick (void *arg) { e6000sw_softc_t *sc; struct mii_softc *miisc; - int i; + int port; sc = arg; E6000SW_LOCK_ASSERT(sc, SA_UNLOCKED); for (;;) { E6000SW_LOCK(sc); - for (i = 0; i < E6000SW_NUM_PHYS; i++) { - mii_tick(sc->mii[i]); - LIST_FOREACH(miisc, &sc->mii[i]->mii_phys, mii_list) { - if (IFM_INST(sc->mii[i]->mii_media.ifm_cur->ifm_media) + for (port = 0; port < sc->num_ports; port++) { + /* Tick only on PHY ports */ + if (!e6000sw_is_phyport(sc, port)) + continue; + mii_tick(sc->mii[port]); + LIST_FOREACH(miisc, &sc->mii[port]->mii_phys, mii_list) { + if (IFM_INST(sc->mii[port]->mii_media.ifm_cur->ifm_media) != miisc->mii_inst) continue; mii_phy_update(miisc, MII_POLLSTAT); @@ -815,9 +1035,6 @@ e6000sw_setup(device_t dev, e6000sw_soft SWITCH_MGMT_FC_PRI_MASK | (1 << SWITCH_MGMT_FORCEFLOW)); - /* Set VLAN configuration */ - e6000sw_port_vlan_conf(sc); - e6000sw_atu_flush(dev, sc, NO_OPERATION); e6000sw_atu_mac_table(dev, sc, NULL, NO_OPERATION); e6000sw_set_atustat(dev, sc, 0, COUNT_ALL); @@ -837,36 +1054,25 @@ static void e6000sw_port_vlan_conf(e6000sw_softc_t *sc) { int port, ret; - etherswitch_vlangroup_t vg; device_t dev; dev = sc->dev; /* Disable all ports */ - for (port = 0; port < E6000SW_NUM_PORTS; port++) { + for (port = 0; port < sc->num_ports; port++) { ret = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL); e6000sw_writereg(sc, REG_PORT(port), PORT_CONTROL, (ret & ~PORT_CONTROL_ENABLE)); } /* Set port priority */ - for (port = 0; port < E6000SW_NUM_PORTS; port++) { + for (port = 0; port < sc->num_ports; port++) { ret = e6000sw_readreg(sc, REG_PORT(port), PORT_VID); ret &= ~PORT_VID_PRIORITY_MASK; e6000sw_writereg(sc, REG_PORT(port), PORT_VID, ret); } - vg.es_vlangroup = 0; - vg.es_vid = 0; - vg.es_member_ports = vg.es_untagged_ports = E6000SW_DEF_VLANGROUP0; - e6000sw_setvgroup(dev, &vg); - vg.es_vlangroup = 1; - vg.es_vid = 1; - vg.es_member_ports = vg.es_untagged_ports = E6000SW_DEF_VLANGROUP1; - e6000sw_setvgroup(dev, &vg); - - device_printf(dev, "Default vlangroups set.\n"); /* Set VID map */ - for (port = 0; port < E6000SW_NUM_PORTS; port++) { + for (port = 0; port < sc->num_ports; port++) { ret = e6000sw_readreg(sc, REG_PORT(port), PORT_VID); ret &= ~PORT_VID_DEF_VID_MASK; ret |= (port + 1); @@ -874,7 +1080,7 @@ e6000sw_port_vlan_conf(e6000sw_softc_t * } /* Enable all ports */ - for (port = 0; port < E6000SW_NUM_PORTS; port++) { + for (port = 0; port < sc->num_ports; port++) { ret = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL); e6000sw_writereg(sc, REG_PORT(port), PORT_CONTROL, (ret | PORT_CONTROL_ENABLE)); Modified: head/sys/dev/etherswitch/e6000sw/e6000swreg.h ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000swreg.h Thu Jan 5 17:03:35 2017 (r311447) +++ head/sys/dev/etherswitch/e6000sw/e6000swreg.h Thu Jan 5 17:08:10 2017 (r311448) @@ -42,8 +42,6 @@ struct atu_opt { * Definitions for the Marvell 88E6000 series Ethernet Switch. */ -#define CPU_PORT 0x5 - /* * Switch Registers */ @@ -167,19 +165,21 @@ struct atu_opt { #define PHY_PAGE_REG 22 -#define E6000SW_NUM_PHYS 5 +/* + * Scratch and Misc register accessed via + * 'Switch Global Registers' (REG_GLOBAL2) + */ +#define SCR_AND_MISC_REG 0x1a + +#define SCR_AND_MISC_PTR_CFG 0x7000 +#define SCR_AND_MISC_DATA_CFG_MASK 0xf0 + #define E6000SW_NUM_PHY_REGS 29 -#define E6000SW_CPUPORTS_MASK ((1 << 5) | (1 << 6)) #define E6000SW_NUM_VGROUPS 8 -#define E6000SW_NUM_PORTS 7 +#define E6000SW_MAX_PORTS 10 #define E6000SW_PORT_NO_VGROUP -1 #define E6000SW_DEFAULT_AGETIME 20 #define E6000SW_RETRIES 100 - - -/* Default vlangroups */ -#define E6000SW_DEF_VLANGROUP0 (1 | (1 << 1) | (1 << 2) | (1 << 3) | \ - (1 << 6)) -#define E6000SW_DEF_VLANGROUP1 ((1 << 4) | (1 << 5)) +#define E6000SW_SMI_TIMEOUT 16 #endif /* _E6000SWREG_H_ */ From owner-svn-src-head@freebsd.org Thu Jan 5 17:10:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 686A7CA185C; Thu, 5 Jan 2017 17:10:53 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A6F7102F; Thu, 5 Jan 2017 17:10:53 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05HAqT7090935; Thu, 5 Jan 2017 17:10:52 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05HAqBD090933; Thu, 5 Jan 2017 17:10:52 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201701051710.v05HAqBD090933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 5 Jan 2017 17:10:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311449 - in head/sys: arm/conf conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:10:53 -0000 Author: zbb Date: Thu Jan 5 17:10:52 2017 New Revision: 311449 URL: https://svnweb.freebsd.org/changeset/base/311449 Log: Include e6000sw driver in ARMADA38X configuration e6000sw Marvell switch driver was added to files and Armada38x kernel configuration file. Submitted by: Bartosz Szczepanek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8178 Modified: head/sys/arm/conf/ARMADA38X head/sys/conf/files Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Thu Jan 5 17:08:10 2017 (r311448) +++ head/sys/arm/conf/ARMADA38X Thu Jan 5 17:10:52 2017 (r311449) @@ -37,6 +37,9 @@ device vlan device mii device bpf device re +device mdio +device etherswitch +device e6000sw # PCI device pci Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 5 17:08:10 2017 (r311448) +++ head/sys/conf/files Thu Jan 5 17:10:52 2017 (r311449) @@ -1639,6 +1639,7 @@ dev/etherswitch/ip17x/ip17x_phy.c option dev/etherswitch/ip17x/ip17x_vlans.c optional ip17x dev/etherswitch/miiproxy.c optional miiproxy dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb +dev/etherswitch/e6000sw/e6000sw.c optional e6000sw dev/etherswitch/ukswitch/ukswitch.c optional ukswitch dev/evdev/cdev.c optional evdev dev/evdev/evdev.c optional evdev From owner-svn-src-head@freebsd.org Thu Jan 5 17:12:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF1E5CA192B; Thu, 5 Jan 2017 17:12:54 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEE591586; Thu, 5 Jan 2017 17:12:54 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05HCrLi094547; Thu, 5 Jan 2017 17:12:53 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05HCrwl094546; Thu, 5 Jan 2017 17:12:53 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201701051712.v05HCrwl094546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 5 Jan 2017 17:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311450 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:12:55 -0000 Author: zbb Date: Thu Jan 5 17:12:53 2017 New Revision: 311450 URL: https://svnweb.freebsd.org/changeset/base/311450 Log: Add buffer management entries to armada-38x.dtsi Hardware buffer management entries are not used yet by FreeBSD. They were added for compliance with Linux Armada 38x device tree representation and will be used in future network support. Submitted by: Bartosz Szczepanek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8179 Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:10:52 2017 (r311449) +++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:12:53 2017 (r311450) @@ -562,6 +562,14 @@ status = "disabled"; }; + bm: bm@c8000 { + compatible = "marvell,armada-380-neta-bm"; + reg = <0xc8000 0xac>; + clocks = <&gateclk 13>; + internal-mem = <&bm_bppi>; + status = "disabled"; + }; + sata@e0000 { compatible = "marvell,armada-380-ahci"; reg = <0xe0000 0x2000>; @@ -622,6 +630,17 @@ status = "disabled"; }; }; + + bm_bppi: bm-bppi { + compatible = "mmio-sram"; + reg = ; + ranges = <0 MBUS_ID(0x0c, 0x04) 0 0x100000>; + #address-cells = <1>; + #size-cells = <1>; + clocks = <&gateclk 13>; + no-memory-wc; + status = "disabled"; + }; }; pci0: pcie@f1080000 { From owner-svn-src-head@freebsd.org Thu Jan 5 17:13:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A0B9CA1987; Thu, 5 Jan 2017 17:13:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE844172D; Thu, 5 Jan 2017 17:13:26 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id b1so41246963pgc.1; Thu, 05 Jan 2017 09:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YSulPVpv2ZPu7rL/qp6/rMviiOcAmwH2g1ytFvmNA5s=; b=hTMpSlZCVByB6QgMzIssrBDyIjNfgjI4wvmUuxGIsUdnTRFqTfh0uaATgYco8zJnJu IGeI8rEbldVR0sRI51c3gW2+6eJgrWPzSt+PlURziu3XnXqDqN0NZcXlBqHEsl1pZQYj ncIaoT6Sn6j4nwWd3Rxp37VDOPiXqMaPCfKOj00rzyQKae7hF2+hsKg+rHxiXw8AbxFM SvwZO6FHuqfM8f8NwB38W0yrJd8IwWF/6CaUc7usJEx2sEeTZzOGWsbq01XCrzoGEo6M hll0HUM3xEl0wZj/sVM0DYV6+TcFURojErtDuQF5MUHS3yk+w6Onv0TVHZXl/O2vqegW CDgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=YSulPVpv2ZPu7rL/qp6/rMviiOcAmwH2g1ytFvmNA5s=; b=EOpdzTw7Ukz2EeIbph+AHk00rsdDGKkYMeacRCdmPiJ7KfWo340feB6a+EcwY3E6Xi XlMbbX3qra7KejudePAHrin0dwuoIKXzyTE9fdGejNH3goy43JaJkZ/hE8FIl+6+xd0/ keSnMJm+GwvsexWXimMmFZJQqduND9PrmH00v6wt+p+0B3rKKzBszofebNhN2GvyBzXs MSjRvo87HZNSACaHWL0mxVeEj62IUR3UazoI/ZbKAFBwyh1wBfFmHb0jDkOSCroXMwNB fhRhTCwDSgqOnG7BzSyOdriVcwLUqUbZoj82JbtoHixEvqqETSXowLVGlFGorXlUzgzQ GF3Q== X-Gm-Message-State: AIkVDXKLMLYfSxi7mGjUFByhgVPqyzOiOHrnJ7NURN4/sJzhMVjjUPUjFQB1Gg78VqU+Xw== X-Received: by 10.99.112.66 with SMTP id a2mr134372029pgn.43.1483636406403; Thu, 05 Jan 2017 09:13:26 -0800 (PST) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id m19sm47513358pfk.72.2017.01.05.09.13.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 09:13:25 -0800 (PST) Sender: Mark Johnston Date: Thu, 5 Jan 2017 09:13:21 -0800 From: Mark Johnston To: Steven Hartland Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311346 - in head/sys: kern sys vm Message-ID: <20170105171321.GA70590@raichu> References: <201701050144.v051iCso008577@repo.freebsd.org> <3cf413dd-f8d5-4462-9486-0a56adf08b77@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3cf413dd-f8d5-4462-9486-0a56adf08b77@freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:13:27 -0000 On Thu, Jan 05, 2017 at 09:16:02AM +0000, Steven Hartland wrote: > Given the use of the number of CPU's for sizing would this play nice > with hot plug CPU's? > > Regards > Steve Not without some work. I don't think it would be a major obstacle to adding hot-plug CPU support on at least 64-bit systems though. > > On 05/01/2017 01:44, Mark Johnston wrote: > > Author: markj > > Date: Thu Jan 5 01:44:12 2017 > > New Revision: 311346 > > URL: https://svnweb.freebsd.org/changeset/base/311346 > > > > Log: > > Add a small allocator for exec_map entries. > > > > Upon each execve, we allocate a KVA range for use in copying data to the > > new image. Pages must be faulted into the range, and when the range is > > freed, the backing pages are freed and their mappings are destroyed. This > > is a lot of needless overhead, and the exec_map management becomes a > > bottleneck when many CPUs are executing execve concurrently. Moreover, the > > number of available ranges is fixed at 16, which is insufficient on large > > systems and potentially excessive on 32-bit systems. > > > > The new allocator reduces overhead by making exec_map allocations > > persistent. When a range is freed, pages backing the range are marked clean > > and made easy to reclaim. With this change, the exec_map is sized based on > > the number of CPUs. From owner-svn-src-head@freebsd.org Thu Jan 5 17:14:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76040CA19F3; Thu, 5 Jan 2017 17:14:57 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42BC118F8; Thu, 5 Jan 2017 17:14:57 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05HEuHs094653; Thu, 5 Jan 2017 17:14:56 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05HEu3C094652; Thu, 5 Jan 2017 17:14:56 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201701051714.v05HEu3C094652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 5 Jan 2017 17:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311451 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:14:57 -0000 Author: zbb Date: Thu Jan 5 17:14:56 2017 New Revision: 311451 URL: https://svnweb.freebsd.org/changeset/base/311451 Log: Correct CESA node in armada-38x.dtsi CESA resources were invalid, what caused driver to fail during attach call. Submitted by: Bartosz Szczepanek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8180 Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:12:53 2017 (r311450) +++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:14:56 2017 (r311451) @@ -154,7 +154,8 @@ crypto@90000 { compatible = "mrvl,cesa"; - reg = <0x90000 0x10000>; + reg = <0x90000 0x1000 /* tdma base reg chan 0 */ + 0x9D000 0x1000>; /* cesa base reg chan 0 */ interrupts = ; interrupt-parent = <&gic>; sram-handle = <&SRAM0>; From owner-svn-src-head@freebsd.org Thu Jan 5 17:19:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 589A6CA1ADF; Thu, 5 Jan 2017 17:19:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E93E31B58; Thu, 5 Jan 2017 17:19: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 v05HJSUi094861; Thu, 5 Jan 2017 17:19:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05HJQnh094848; Thu, 5 Jan 2017 17:19:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701051719.v05HJQnh094848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 5 Jan 2017 17:19:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311452 - in head/sys: compat/freebsd32 compat/linux compat/svr4 fs/nfs fs/nfsserver fs/nullfs fs/unionfs i386/ibcs2 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:19:29 -0000 Author: kib Date: Thu Jan 5 17:19:26 2017 New Revision: 311452 URL: https://svnweb.freebsd.org/changeset/base/311452 Log: Do not allocate struct statfs on kernel stack. Right now size of the structure is 472 bytes on amd64, which is already large and stack allocations are indesirable. With the ino64 work, MNAMELEN is increased to 1024, which will make it impossible to have struct statfs on the stack. Extracted from: ino64 work by gleb Discussed with: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_stats.c head/sys/compat/svr4/svr4_misc.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/unionfs/union_vfsops.c head/sys/i386/ibcs2/ibcs2_stat.c head/sys/kern/kern_acct.c head/sys/kern/vfs_default.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_syscalls.c head/sys/sys/mount.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 17:19:26 2017 (r311452) @@ -265,7 +265,7 @@ freebsd4_freebsd32_getfsstat(struct thre uap->buf++; copycount--; } - free(buf, M_TEMP); + free(buf, M_STATFS); } if (error == 0) td->td_retval[0] = count; @@ -1394,14 +1394,17 @@ int freebsd4_freebsd32_statfs(struct thread *td, struct freebsd4_freebsd32_statfs_args *uap) { struct statfs32 s32; - struct statfs s; + struct statfs *sp; int error; - error = kern_statfs(td, uap->path, UIO_USERSPACE, &s); - if (error) - return (error); - copy_statfs(&s, &s32); - return (copyout(&s32, uap->buf, sizeof(s32))); + sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, uap->path, UIO_USERSPACE, sp); + if (error == 0) { + copy_statfs(sp, &s32); + error = copyout(&s32, uap->buf, sizeof(s32)); + } + free(sp, M_STATFS); + return (error); } #endif @@ -1410,14 +1413,17 @@ int freebsd4_freebsd32_fstatfs(struct thread *td, struct freebsd4_freebsd32_fstatfs_args *uap) { struct statfs32 s32; - struct statfs s; + struct statfs *sp; int error; - error = kern_fstatfs(td, uap->fd, &s); - if (error) - return (error); - copy_statfs(&s, &s32); - return (copyout(&s32, uap->buf, sizeof(s32))); + sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, uap->fd, sp); + if (error == 0) { + copy_statfs(sp, &s32); + error = copyout(&s32, uap->buf, sizeof(s32)); + } + free(sp, M_STATFS); + return (error); } #endif @@ -1426,17 +1432,20 @@ int freebsd4_freebsd32_fhstatfs(struct thread *td, struct freebsd4_freebsd32_fhstatfs_args *uap) { struct statfs32 s32; - struct statfs s; + struct statfs *sp; fhandle_t fh; int error; if ((error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t))) != 0) return (error); - error = kern_fhstatfs(td, fh, &s); - if (error) - return (error); - copy_statfs(&s, &s32); - return (copyout(&s32, uap->buf, sizeof(s32))); + sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fhstatfs(td, fh, sp); + if (error == 0) { + copy_statfs(sp, &s32); + error = copyout(&s32, uap->buf, sizeof(s32)); + } + free(sp, M_STATFS); + return (error); } #endif Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/compat/linux/linux_stats.c Thu Jan 5 17:19:26 2017 (r311452) @@ -415,7 +415,7 @@ int linux_statfs(struct thread *td, struct linux_statfs_args *args) { struct l_statfs linux_statfs; - struct statfs bsd_statfs; + struct statfs *bsd_statfs; char *path; int error; @@ -425,12 +425,13 @@ linux_statfs(struct thread *td, struct l if (ldebug(statfs)) printf(ARGS(statfs, "%s, *"), path); #endif - error = kern_statfs(td, path, UIO_SYSSPACE, &bsd_statfs); + bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, path, UIO_SYSSPACE, bsd_statfs); LFREEPATH(path); - if (error) - return (error); - error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); - if (error) + if (error == 0) + error = bsd_to_linux_statfs(bsd_statfs, &linux_statfs); + free(bsd_statfs, M_STATFS); + if (error != 0) return (error); return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); } @@ -456,7 +457,7 @@ int linux_statfs64(struct thread *td, struct linux_statfs64_args *args) { struct l_statfs64 linux_statfs; - struct statfs bsd_statfs; + struct statfs *bsd_statfs; char *path; int error; @@ -469,11 +470,14 @@ linux_statfs64(struct thread *td, struct if (ldebug(statfs64)) printf(ARGS(statfs64, "%s, *"), path); #endif - error = kern_statfs(td, path, UIO_SYSSPACE, &bsd_statfs); + bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, path, UIO_SYSSPACE, bsd_statfs); LFREEPATH(path); - if (error) + if (error == 0) + bsd_to_linux_statfs64(bsd_statfs, &linux_statfs); + free(bsd_statfs, M_STATFS); + if (error != 0) return (error); - bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); } @@ -481,7 +485,7 @@ int linux_fstatfs64(struct thread *td, struct linux_fstatfs64_args *args) { struct l_statfs64 linux_statfs; - struct statfs bsd_statfs; + struct statfs *bsd_statfs; int error; #ifdef DEBUG @@ -491,10 +495,13 @@ linux_fstatfs64(struct thread *td, struc if (args->bufsize != sizeof(struct l_statfs64)) return (EINVAL); - error = kern_fstatfs(td, args->fd, &bsd_statfs); - if (error) - return error; - bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); + bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, args->fd, bsd_statfs); + if (error == 0) + bsd_to_linux_statfs64(bsd_statfs, &linux_statfs); + free(bsd_statfs, M_STATFS); + if (error != 0) + return (error); return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); } #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ @@ -503,18 +510,19 @@ int linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args) { struct l_statfs linux_statfs; - struct statfs bsd_statfs; + struct statfs *bsd_statfs; int error; #ifdef DEBUG if (ldebug(fstatfs)) printf(ARGS(fstatfs, "%d, *"), args->fd); #endif - error = kern_fstatfs(td, args->fd, &bsd_statfs); - if (error) - return (error); - error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); - if (error) + bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, args->fd, bsd_statfs); + if (error == 0) + error = bsd_to_linux_statfs(bsd_statfs, &linux_statfs); + free(bsd_statfs, M_STATFS); + if (error != 0) return (error); return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); } Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/compat/svr4/svr4_misc.c Thu Jan 5 17:19:26 2017 (r311452) @@ -1430,17 +1430,20 @@ svr4_sys_statvfs(td, uap) struct svr4_sys_statvfs_args *uap; { struct svr4_statvfs sfs; - struct statfs bfs; + struct statfs *bfs; char *path; int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_statfs(td, path, UIO_SYSSPACE, &bfs); + bfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, path, UIO_SYSSPACE, bfs); free(path, M_TEMP); - if (error) + if (error == 0) + bsd_statfs_to_svr4_statvfs(bfs, &sfs); + free(bfs, M_STATFS); + if (error != 0) return (error); - bsd_statfs_to_svr4_statvfs(&bfs, &sfs); return copyout(&sfs, uap->fs, sizeof(sfs)); } @@ -1451,13 +1454,16 @@ svr4_sys_fstatvfs(td, uap) struct svr4_sys_fstatvfs_args *uap; { struct svr4_statvfs sfs; - struct statfs bfs; + struct statfs *bfs; int error; - error = kern_fstatfs(td, uap->fd, &bfs); - if (error) + bfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, uap->fd, bfs); + if (error == 0) + bsd_statfs_to_svr4_statvfs(bfs, &sfs); + free(bfs, M_STATFS); + if (error != 0) return (error); - bsd_statfs_to_svr4_statvfs(&bfs, &sfs); return copyout(&sfs, uap->fs, sizeof(sfs)); } @@ -1468,17 +1474,20 @@ svr4_sys_statvfs64(td, uap) struct svr4_sys_statvfs64_args *uap; { struct svr4_statvfs64 sfs; - struct statfs bfs; + struct statfs *bfs; char *path; int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_statfs(td, path, UIO_SYSSPACE, &bfs); + bfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, path, UIO_SYSSPACE, bfs); free(path, M_TEMP); - if (error) + if (error == 0) + bsd_statfs_to_svr4_statvfs64(bfs, &sfs); + free(bfs, M_STATFS); + if (error != 0) return (error); - bsd_statfs_to_svr4_statvfs64(&bfs, &sfs); return copyout(&sfs, uap->fs, sizeof(sfs)); } @@ -1489,13 +1498,16 @@ svr4_sys_fstatvfs64(td, uap) struct svr4_sys_fstatvfs64_args *uap; { struct svr4_statvfs64 sfs; - struct statfs bfs; + struct statfs *bfs; int error; - error = kern_fstatfs(td, uap->fd, &bfs); - if (error) + bfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, uap->fd, bfs); + if (error == 0) + bsd_statfs_to_svr4_statvfs64(bfs, &sfs); + free(bfs, M_STATFS); + if (error != 0) return (error); - bsd_statfs_to_svr4_statvfs64(&bfs, &sfs); return copyout(&sfs, uap->fs, sizeof(sfs)); } Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/fs/nfs/nfs_commonsubs.c Thu Jan 5 17:19:26 2017 (r311452) @@ -2047,7 +2047,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd nfsattrbit_t *retbitp = &retbits; u_int32_t freenum, *retnump; u_int64_t uquad; - struct statfs fs; + struct statfs *fs; struct nfsfsinfo fsinf; struct timespec temptime; NFSACL_T *aclp, *naclp = NULL; @@ -2079,11 +2079,13 @@ nfsv4_fillattr(struct nfsrv_descript *nd /* * Get the VFS_STATFS(), since some attributes need them. */ + fs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); if (NFSISSETSTATFS_ATTRBIT(retbitp)) { - error = VFS_STATFS(mp, &fs); + error = VFS_STATFS(mp, fs); if (error != 0) { if (reterr) { nd->nd_repstat = NFSERR_ACCES; + free(fs, M_STATFS); return (0); } NFSCLRSTATFS_ATTRBIT(retbitp); @@ -2115,6 +2117,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd if (error != 0) { if (reterr) { nd->nd_repstat = NFSERR_ACCES; + free(fs, M_STATFS); return (0); } NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACL); @@ -2256,7 +2259,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd /* * Check quota and use min(quota, f_ffree). */ - freenum = fs.f_ffree; + freenum = fs->f_ffree; #ifdef QUOTA /* * ufs_quotactl() insists that the uid argument @@ -2279,13 +2282,13 @@ nfsv4_fillattr(struct nfsrv_descript *nd case NFSATTRBIT_FILESFREE: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); *tl++ = 0; - *tl = txdr_unsigned(fs.f_ffree); + *tl = txdr_unsigned(fs->f_ffree); retnum += NFSX_HYPER; break; case NFSATTRBIT_FILESTOTAL: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); *tl++ = 0; - *tl = txdr_unsigned(fs.f_files); + *tl = txdr_unsigned(fs->f_files); retnum += NFSX_HYPER; break; case NFSATTRBIT_FSLOCATIONS: @@ -2361,9 +2364,9 @@ nfsv4_fillattr(struct nfsrv_descript *nd break; case NFSATTRBIT_QUOTAHARD: if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA, 0)) - freenum = fs.f_bfree; + freenum = fs->f_bfree; else - freenum = fs.f_bavail; + freenum = fs->f_bavail; #ifdef QUOTA /* * ufs_quotactl() insists that the uid argument @@ -2379,15 +2382,15 @@ nfsv4_fillattr(struct nfsrv_descript *nd #endif /* QUOTA */ NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); uquad = (u_int64_t)freenum; - NFSQUOTABLKTOBYTE(uquad, fs.f_bsize); + NFSQUOTABLKTOBYTE(uquad, fs->f_bsize); txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; case NFSATTRBIT_QUOTASOFT: if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA, 0)) - freenum = fs.f_bfree; + freenum = fs->f_bfree; else - freenum = fs.f_bavail; + freenum = fs->f_bavail; #ifdef QUOTA /* * ufs_quotactl() insists that the uid argument @@ -2403,7 +2406,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd #endif /* QUOTA */ NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); uquad = (u_int64_t)freenum; - NFSQUOTABLKTOBYTE(uquad, fs.f_bsize); + NFSQUOTABLKTOBYTE(uquad, fs->f_bsize); txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; @@ -2424,7 +2427,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd #endif /* QUOTA */ NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); uquad = (u_int64_t)freenum; - NFSQUOTABLKTOBYTE(uquad, fs.f_bsize); + NFSQUOTABLKTOBYTE(uquad, fs->f_bsize); txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; @@ -2437,24 +2440,24 @@ nfsv4_fillattr(struct nfsrv_descript *nd case NFSATTRBIT_SPACEAVAIL: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); if (priv_check_cred(cred, PRIV_VFS_BLOCKRESERVE, 0)) - uquad = (u_int64_t)fs.f_bfree; + uquad = (u_int64_t)fs->f_bfree; else - uquad = (u_int64_t)fs.f_bavail; - uquad *= fs.f_bsize; + uquad = (u_int64_t)fs->f_bavail; + uquad *= fs->f_bsize; txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; case NFSATTRBIT_SPACEFREE: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); - uquad = (u_int64_t)fs.f_bfree; - uquad *= fs.f_bsize; + uquad = (u_int64_t)fs->f_bfree; + uquad *= fs->f_bsize; txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; case NFSATTRBIT_SPACETOTAL: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); - uquad = (u_int64_t)fs.f_blocks; - uquad *= fs.f_bsize; + uquad = (u_int64_t)fs->f_blocks; + uquad *= fs->f_bsize; txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; @@ -2531,6 +2534,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd } if (naclp != NULL) acl_free(naclp); + free(fs, M_STATFS); *retnump = txdr_unsigned(retnum); return (retnum + prefixnum); } Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Jan 5 17:19:26 2017 (r311452) @@ -2035,14 +2035,14 @@ nfsrvd_statfs(struct nfsrv_descript *nd, u_int32_t *tl; int getret = 1; struct nfsvattr at; - struct statfs sfs; u_quad_t tval; + sf = NULL; if (nd->nd_repstat) { nfsrv_postopattr(nd, getret, &at); goto out; } - sf = &sfs; + sf = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); nd->nd_repstat = nfsvno_statfs(vp, sf); getret = nfsvno_getattr(vp, &at, nd->nd_cred, p, 1); vput(vp); @@ -2078,6 +2078,7 @@ nfsrvd_statfs(struct nfsrv_descript *nd, } out: + free(sf, M_STATFS); NFSEXITCODE2(0, nd); return (0); } @@ -3603,19 +3604,20 @@ nfsrvd_verify(struct nfsrv_descript *nd, { int error = 0, ret, fhsize = NFSX_MYFH; struct nfsvattr nva; - struct statfs sf; + struct statfs *sf; struct nfsfsinfo fs; fhandle_t fh; + sf = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); nd->nd_repstat = nfsvno_getattr(vp, &nva, nd->nd_cred, p, 1); if (!nd->nd_repstat) - nd->nd_repstat = nfsvno_statfs(vp, &sf); + nd->nd_repstat = nfsvno_statfs(vp, sf); if (!nd->nd_repstat) nd->nd_repstat = nfsvno_getfh(vp, &fh, p); if (!nd->nd_repstat) { nfsvno_getfs(&fs, isdgram); error = nfsv4_loadattr(nd, vp, &nva, NULL, &fh, fhsize, NULL, - &sf, NULL, &fs, NULL, 1, &ret, NULL, NULL, p, nd->nd_cred); + sf, NULL, &fs, NULL, 1, &ret, NULL, NULL, p, nd->nd_cred); if (!error) { if (nd->nd_procnum == NFSV4OP_NVERIFY) { if (ret == 0) @@ -3627,6 +3629,7 @@ nfsrvd_verify(struct nfsrv_descript *nd, } } vput(vp); + free(sf, M_STATFS); NFSEXITCODE2(error, nd); return (error); } Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/fs/nullfs/null_vfsops.c Thu Jan 5 17:19:26 2017 (r311452) @@ -301,29 +301,33 @@ nullfs_statfs(mp, sbp) struct statfs *sbp; { int error; - struct statfs mstat; + struct statfs *mstat; NULLFSDEBUG("nullfs_statfs(mp = %p, vp = %p->%p)\n", (void *)mp, (void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp, (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp)); - bzero(&mstat, sizeof(mstat)); + mstat = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK | M_ZERO); - error = VFS_STATFS(MOUNTTONULLMOUNT(mp)->nullm_vfs, &mstat); - if (error) + error = VFS_STATFS(MOUNTTONULLMOUNT(mp)->nullm_vfs, mstat); + if (error) { + free(mstat, M_STATFS); return (error); + } /* now copy across the "interesting" information and fake the rest */ - sbp->f_type = mstat.f_type; + sbp->f_type = mstat->f_type; sbp->f_flags = (sbp->f_flags & (MNT_RDONLY | MNT_NOEXEC | MNT_NOSUID | - MNT_UNION | MNT_NOSYMFOLLOW)) | (mstat.f_flags & ~MNT_ROOTFS); - sbp->f_bsize = mstat.f_bsize; - sbp->f_iosize = mstat.f_iosize; - sbp->f_blocks = mstat.f_blocks; - sbp->f_bfree = mstat.f_bfree; - sbp->f_bavail = mstat.f_bavail; - sbp->f_files = mstat.f_files; - sbp->f_ffree = mstat.f_ffree; + MNT_UNION | MNT_NOSYMFOLLOW)) | (mstat->f_flags & ~MNT_ROOTFS); + sbp->f_bsize = mstat->f_bsize; + sbp->f_iosize = mstat->f_iosize; + sbp->f_blocks = mstat->f_blocks; + sbp->f_bfree = mstat->f_bfree; + sbp->f_bavail = mstat->f_bavail; + sbp->f_files = mstat->f_files; + sbp->f_ffree = mstat->f_ffree; + + free(mstat, M_STATFS); return (0); } Modified: head/sys/fs/unionfs/union_vfsops.c ============================================================================== --- head/sys/fs/unionfs/union_vfsops.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/fs/unionfs/union_vfsops.c Thu Jan 5 17:19:26 2017 (r311452) @@ -390,7 +390,7 @@ unionfs_statfs(struct mount *mp, struct { struct unionfs_mount *ump; int error; - struct statfs mstat; + struct statfs *mstat; uint64_t lbsize; ump = MOUNTTOUNIONFSMOUNT(mp); @@ -398,39 +398,47 @@ unionfs_statfs(struct mount *mp, struct UNIONFSDEBUG("unionfs_statfs(mp = %p, lvp = %p, uvp = %p)\n", (void *)mp, (void *)ump->um_lowervp, (void *)ump->um_uppervp); - bzero(&mstat, sizeof(mstat)); + mstat = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK | M_ZERO); - error = VFS_STATFS(ump->um_lowervp->v_mount, &mstat); - if (error) + error = VFS_STATFS(ump->um_lowervp->v_mount, mstat); + if (error) { + free(mstat, M_STATFS); return (error); + } /* now copy across the "interesting" information and fake the rest */ - sbp->f_blocks = mstat.f_blocks; - sbp->f_files = mstat.f_files; + sbp->f_blocks = mstat->f_blocks; + sbp->f_files = mstat->f_files; - lbsize = mstat.f_bsize; + lbsize = mstat->f_bsize; - error = VFS_STATFS(ump->um_uppervp->v_mount, &mstat); - if (error) + error = VFS_STATFS(ump->um_uppervp->v_mount, mstat); + if (error) { + free(mstat, M_STATFS); return (error); + } + /* * The FS type etc is copy from upper vfs. * (write able vfs have priority) */ - sbp->f_type = mstat.f_type; - sbp->f_flags = mstat.f_flags; - sbp->f_bsize = mstat.f_bsize; - sbp->f_iosize = mstat.f_iosize; - - if (mstat.f_bsize != lbsize) - sbp->f_blocks = ((off_t)sbp->f_blocks * lbsize) / mstat.f_bsize; - - sbp->f_blocks += mstat.f_blocks; - sbp->f_bfree = mstat.f_bfree; - sbp->f_bavail = mstat.f_bavail; - sbp->f_files += mstat.f_files; - sbp->f_ffree = mstat.f_ffree; + sbp->f_type = mstat->f_type; + sbp->f_flags = mstat->f_flags; + sbp->f_bsize = mstat->f_bsize; + sbp->f_iosize = mstat->f_iosize; + + if (mstat->f_bsize != lbsize) + sbp->f_blocks = ((off_t)sbp->f_blocks * lbsize) / + mstat->f_bsize; + + sbp->f_blocks += mstat->f_blocks; + sbp->f_bfree = mstat->f_bfree; + sbp->f_bavail = mstat->f_bavail; + sbp->f_files += mstat->f_files; + sbp->f_ffree = mstat->f_ffree; + + free(mstat, M_STATFS); return (0); } Modified: head/sys/i386/ibcs2/ibcs2_stat.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_stat.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/i386/ibcs2/ibcs2_stat.c Thu Jan 5 17:19:26 2017 (r311452) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -108,16 +109,18 @@ ibcs2_statfs(td, uap) struct thread *td; struct ibcs2_statfs_args *uap; { - struct statfs sf; + struct statfs *sf; char *path; int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_statfs(td, path, UIO_SYSSPACE, &sf); + sf = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, path, UIO_SYSSPACE, sf); free(path, M_TEMP); - if (error) - return (error); - return cvt_statfs(&sf, (caddr_t)uap->buf, uap->len); + if (error == 0) + error = cvt_statfs(sf, (caddr_t)uap->buf, uap->len); + free(sf, M_STATFS); + return (error); } int @@ -125,13 +128,15 @@ ibcs2_fstatfs(td, uap) struct thread *td; struct ibcs2_fstatfs_args *uap; { - struct statfs sf; + struct statfs *sf; int error; - error = kern_fstatfs(td, uap->fd, &sf); - if (error) - return (error); - return cvt_statfs(&sf, (caddr_t)uap->buf, uap->len); + sf = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, uap->fd, sf); + if (error == 0) + error = cvt_statfs(sf, (caddr_t)uap->buf, uap->len); + free(sf, M_STATFS); + return (error); } int Modified: head/sys/kern/kern_acct.c ============================================================================== --- head/sys/kern/kern_acct.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/kern/kern_acct.c Thu Jan 5 17:19:26 2017 (r311452) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -552,7 +553,7 @@ encode_long(long val) static void acctwatch(void) { - struct statfs sb; + struct statfs *sp; sx_assert(&acct_sx, SX_XLOCKED); @@ -580,21 +581,25 @@ acctwatch(void) * Stopping here is better than continuing, maybe it will be VBAD * next time around. */ - if (VFS_STATFS(acct_vp->v_mount, &sb) < 0) + sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + if (VFS_STATFS(acct_vp->v_mount, sp) < 0) { + free(sp, M_STATFS); return; + } if (acct_suspended) { - if (sb.f_bavail > (int64_t)(acctresume * sb.f_blocks / + if (sp->f_bavail > (int64_t)(acctresume * sp->f_blocks / 100)) { acct_suspended = 0; log(LOG_NOTICE, "Accounting resumed\n"); } } else { - if (sb.f_bavail <= (int64_t)(acctsuspend * sb.f_blocks / + if (sp->f_bavail <= (int64_t)(acctsuspend * sp->f_blocks / 100)) { acct_suspended = 1; log(LOG_NOTICE, "Accounting suspended\n"); } } + free(sp, M_STATFS); } /* Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/kern/vfs_default.c Thu Jan 5 17:19:26 2017 (r311452) @@ -931,7 +931,8 @@ int vop_stdallocate(struct vop_allocate_args *ap) { #ifdef __notyet__ - struct statfs sfs; + struct statfs *sfs; + off_t maxfilesize = 0; #endif struct iovec aiov; struct vattr vattr, *vap; @@ -967,12 +968,16 @@ vop_stdallocate(struct vop_allocate_args * Check if the filesystem sets f_maxfilesize; if not use * VOP_SETATTR to perform the check. */ - error = VFS_STATFS(vp->v_mount, &sfs, td); + sfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = VFS_STATFS(vp->v_mount, sfs, td); + if (error == 0) + maxfilesize = sfs->f_maxfilesize; + free(sfs, M_STATFS); if (error != 0) goto out; - if (sfs.f_maxfilesize) { - if (offset > sfs.f_maxfilesize || len > sfs.f_maxfilesize || - offset + len > sfs.f_maxfilesize) { + if (maxfilesize) { + if (offset > maxfilesize || len > maxfilesize || + offset + len > maxfilesize) { error = EFBIG; goto out; } Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/kern/vfs_mount.c Thu Jan 5 17:19:26 2017 (r311452) @@ -79,6 +79,7 @@ SYSCTL_INT(_vfs, OID_AUTO, usermount, CT "Unprivileged users may mount and unmount file systems"); MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); +MALLOC_DEFINE(M_STATFS, "statfs", "statfs structure"); static uma_zone_t mount_zone; /* List of mounted filesystems. */ Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/kern/vfs_syscalls.c Thu Jan 5 17:19:26 2017 (r311452) @@ -298,12 +298,14 @@ sys_statfs(td, uap) struct statfs *buf; } */ *uap; { - struct statfs sf; + struct statfs *sfp; int error; - error = kern_statfs(td, uap->path, UIO_USERSPACE, &sf); + sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp); if (error == 0) - error = copyout(&sf, uap->buf, sizeof(sf)); + error = copyout(sfp, uap->buf, sizeof(struct statfs)); + free(sfp, M_STATFS); return (error); } @@ -344,12 +346,14 @@ sys_fstatfs(td, uap) struct statfs *buf; } */ *uap; { - struct statfs sf; + struct statfs *sfp; int error; - error = kern_fstatfs(td, uap->fd, &sf); + sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, uap->fd, sfp); if (error == 0) - error = copyout(&sf, uap->buf, sizeof(sf)); + error = copyout(sfp, uap->buf, sizeof(struct statfs)); + free(sfp, M_STATFS); return (error); } @@ -420,7 +424,7 @@ kern_getfsstat(struct thread *td, struct size_t *countp, enum uio_seg bufseg, int mode) { struct mount *mp, *nmp; - struct statfs *sfsp, *sp, sb, *tofree; + struct statfs *sfsp, *sp, *sptmp, *tofree; size_t count, maxcount; int error; @@ -451,7 +455,7 @@ restart: if (maxcount > count) maxcount = count; tofree = sfsp = *buf = malloc(maxcount * sizeof(struct statfs), - M_TEMP, M_WAITOK); + M_STATFS, M_WAITOK); } count = 0; mtx_lock(&mountlist_mtx); @@ -476,7 +480,7 @@ restart: * no other choice than to start over. */ mtx_unlock(&mountlist_mtx); - free(tofree, M_TEMP); + free(tofree, M_STATFS); goto restart; } } else { @@ -508,15 +512,20 @@ restart: } } if (priv_check(td, PRIV_VFS_GENERATION)) { - bcopy(sp, &sb, sizeof(sb)); - sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; - prison_enforce_statfs(td->td_ucred, mp, &sb); - sp = &sb; - } - if (bufseg == UIO_SYSSPACE) + sptmp = malloc(sizeof(struct statfs), M_STATFS, + M_WAITOK); + *sptmp = *sp; + sptmp->f_fsid.val[0] = sptmp->f_fsid.val[1] = 0; + prison_enforce_statfs(td->td_ucred, mp, sptmp); + sp = sptmp; + } else + sptmp = NULL; + if (bufseg == UIO_SYSSPACE) { bcopy(sp, sfsp, sizeof(*sp)); - else /* if (bufseg == UIO_USERSPACE) */ { + free(sptmp, M_STATFS); + } else /* if (bufseg == UIO_USERSPACE) */ { error = copyout(sp, sfsp, sizeof(*sp)); + free(sptmp, M_STATFS); if (error != 0) { vfs_unbusy(mp); return (error); @@ -558,14 +567,17 @@ freebsd4_statfs(td, uap) } */ *uap; { struct ostatfs osb; - struct statfs sf; + struct statfs *sfp; int error; - error = kern_statfs(td, uap->path, UIO_USERSPACE, &sf); - if (error != 0) - return (error); - cvtstatfs(&sf, &osb); - return (copyout(&osb, uap->buf, sizeof(osb))); + sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp); + if (error == 0) { + cvtstatfs(sfp, &osb); + error = copyout(&osb, uap->buf, sizeof(osb)); + } + free(sfp, M_STATFS); + return (error); } /* @@ -586,14 +598,17 @@ freebsd4_fstatfs(td, uap) } */ *uap; { struct ostatfs osb; - struct statfs sf; + struct statfs *sfp; int error; - error = kern_fstatfs(td, uap->fd, &sf); - if (error != 0) - return (error); - cvtstatfs(&sf, &osb); - return (copyout(&osb, uap->buf, sizeof(osb))); + sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, uap->fd, sfp); + if (error == 0) { + cvtstatfs(sfp, &osb); + error = copyout(&osb, uap->buf, sizeof(osb)); + } + free(sfp, M_STATFS); + return (error); } /* @@ -638,7 +653,7 @@ freebsd4_getfsstat(td, uap) uap->buf++; count--; } - free(buf, M_TEMP); + free(buf, M_STATFS); } return (error); } @@ -661,18 +676,21 @@ freebsd4_fhstatfs(td, uap) } */ *uap; { struct ostatfs osb; - struct statfs sf; + struct statfs *sfp; fhandle_t fh; int error; error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t)); if (error != 0) return (error); - error = kern_fhstatfs(td, fh, &sf); - if (error != 0) - return (error); - cvtstatfs(&sf, &osb); - return (copyout(&osb, uap->buf, sizeof(osb))); + sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fhstatfs(td, fh, sfp); + if (error == 0) { + cvtstatfs(sfp, &osb); + error = copyout(&osb, uap->buf, sizeof(osb)); + } + free(sfp, M_STATFS); + return (error); } /* @@ -4407,17 +4425,19 @@ sys_fhstatfs(td, uap) struct statfs *buf; } */ *uap; { - struct statfs sf; + struct statfs *sfp; fhandle_t fh; int error; error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t)); if (error != 0) return (error); - error = kern_fhstatfs(td, fh, &sf); - if (error != 0) - return (error); - return (copyout(&sf, uap->buf, sizeof(sf))); + sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fhstatfs(td, fh, sfp); + if (error == 0) + error = copyout(sfp, uap->buf, sizeof(*sfp)); + free(sfp, M_STATFS); + return (error); } int Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/sys/mount.h Thu Jan 5 17:19:26 2017 (r311452) @@ -597,6 +597,7 @@ struct uio; #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_MOUNT); +MALLOC_DECLARE(M_STATFS); #endif extern int maxvfsconf; /* highest defined filesystem type */ From owner-svn-src-head@freebsd.org Thu Jan 5 17:22:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7370CCA1CEE; Thu, 5 Jan 2017 17:22:10 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 429381FCC; Thu, 5 Jan 2017 17:22:10 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05HM9GH098700; Thu, 5 Jan 2017 17:22:09 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05HM9LM098699; Thu, 5 Jan 2017 17:22:09 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201701051722.v05HM9LM098699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Thu, 5 Jan 2017 17:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311453 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:22:10 -0000 Author: hiren Date: Thu Jan 5 17:22:09 2017 New Revision: 311453 URL: https://svnweb.freebsd.org/changeset/base/311453 Log: sysctl net.inet.tcp.hostcache.list in a jail can see connections from other jails and the host. This commit fixes it. PR: 200361 Submitted by: bz (original version), hiren (minor corrections) Reported by: Marcus Reid Reviewed by: bz, gnn Tested by: Lohith Bellad MFC after: 1 week Sponsored by: Limelight Networks (minor corrections) Modified: head/sys/netinet/tcp_hostcache.c Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Thu Jan 5 17:19:26 2017 (r311452) +++ head/sys/netinet/tcp_hostcache.c Thu Jan 5 17:22:09 2017 (r311453) @@ -69,10 +69,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include +#include #include #include #include @@ -625,6 +627,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) char ip6buf[INET6_ADDRSTRLEN]; #endif + if (jailed_without_vnet(curthread->td_ucred) != 0) + return (EPERM); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), SBUF_INCLUDENUL); From owner-svn-src-head@freebsd.org Thu Jan 5 17:25:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 258CECA1DBC; Thu, 5 Jan 2017 17:25:18 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E23031252; Thu, 5 Jan 2017 17:25:17 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05HPHXi098860; Thu, 5 Jan 2017 17:25:17 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05HPHp7098858; Thu, 5 Jan 2017 17:25:17 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201701051725.v05HPHp7098858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 5 Jan 2017 17:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311454 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:25:18 -0000 Author: zbb Date: Thu Jan 5 17:25:16 2017 New Revision: 311454 URL: https://svnweb.freebsd.org/changeset/base/311454 Log: Add DTS file for Solidrun ClearFog board ClearFog is equipped with Marvell Armada 388 SoC, which is already supported in FreeBSD. Submitted by: Bartosz Szczepanek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7326 Added: head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts (contents, props changed) head/sys/boot/fdt/dts/arm/armada-38x-solidrun-microsom.dtsi (contents, props changed) Added: head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts Thu Jan 5 17:25:16 2017 (r311454) @@ -0,0 +1,463 @@ +/* + * Device Tree file for SolidRun Clearfog revision A1 rev 2.0 (88F6828) + * + * Copyright (C) 2015 Russell King + * + * This board is in development; the contents of this file work with + * the A1 rev 2.0 of the board, which does not represent final + * production board. Things will change, don't expect this file to + * remain compatible info the future. + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * $FreeBSD$ + */ + +/dts-v1/; +#include "armada-388.dtsi" +#include "armada-38x-solidrun-microsom.dtsi" + +/ { + model = "SolidRun Clearfog A1"; + compatible = "solidrun,clearfog-a1", "marvell,armada388", + "marvell,armada385", "marvell,armada380"; + + aliases { + /* So that mvebu u-boot can update the MAC addresses */ + ethernet1 = ð0; + ethernet2 = ð1; + ethernet3 = ð2; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + soc { + internal-regs { + ethernet@30000 { + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <1>; + status = "okay"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + ethernet@34000 { + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <3>; + bm,pool-short = <1>; + status = "okay"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + i2c@11000 { + /* Is there anything on this? */ + clock-frequency = <100000>; + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + status = "okay"; + + /* + * PCA9655 GPIO expander, up to 1MHz clock. + * 0-CON3 CLKREQ# + * 1-CON3 PERST# + * 2-CON2 PERST# + * 3-CON3 W_DISABLE + * 4-CON2 CLKREQ# + * 5-USB3 overcurrent + * 6-USB3 power + * 7-CON2 W_DISABLE + * 8-JP4 P1 + * 9-JP4 P4 + * 10-JP4 P5 + * 11-m.2 DEVSLP + * 12-SFP_LOS + * 13-SFP_TX_FAULT + * 14-SFP_TX_DISABLE + * 15-SFP_MOD_DEF0 + */ + expander0: gpio-expander@20 { + /* + * This is how it should be: + * compatible = "onnn,pca9655", + * "nxp,pca9555"; + * but you can't do this because of + * the way I2C works. + */ + compatible = "nxp,pca9555"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; + + pcie1_0_clkreq { + gpio-hog; + gpios = <0 GPIO_ACTIVE_LOW>; + input; + line-name = "pcie1.0-clkreq"; + }; + pcie1_0_w_disable { + gpio-hog; + gpios = <3 GPIO_ACTIVE_LOW>; + output-low; + line-name = "pcie1.0-w-disable"; + }; + pcie2_0_clkreq { + gpio-hog; + gpios = <4 GPIO_ACTIVE_LOW>; + input; + line-name = "pcie2.0-clkreq"; + }; + pcie2_0_w_disable { + gpio-hog; + gpios = <7 GPIO_ACTIVE_LOW>; + output-low; + line-name = "pcie2.0-w-disable"; + }; + usb3_ilimit { + gpio-hog; + gpios = <5 GPIO_ACTIVE_LOW>; + input; + line-name = "usb3-current-limit"; + }; + usb3_power { + gpio-hog; + gpios = <6 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb3-power"; + }; + m2_devslp { + gpio-hog; + gpios = <11 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "m.2 devslp"; + }; + sfp_los { + /* SFP loss of signal */ + gpio-hog; + gpios = <12 GPIO_ACTIVE_HIGH>; + input; + line-name = "sfp-los"; + }; + sfp_tx_fault { + /* SFP laser fault */ + gpio-hog; + gpios = <13 GPIO_ACTIVE_HIGH>; + input; + line-name = "sfp-tx-fault"; + }; + sfp_tx_disable { + /* SFP transmit disable */ + gpio-hog; + gpios = <14 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "sfp-tx-disable"; + }; + sfp_mod_def0 { + /* SFP module present */ + gpio-hog; + gpios = <15 GPIO_ACTIVE_LOW>; + input; + line-name = "sfp-mod-def0"; + }; + }; + + /* The MCP3021 is 100kHz clock only */ + mikrobus_adc: mcp3021@4c { + compatible = "microchip,mcp3021"; + reg = <0x4c>; + }; + + /* Also something at 0x64 */ + }; + + i2c@11100 { + /* + * Routed to SFP, mikrobus, and PCIe. + * SFP limits this to 100kHz, and requires + * an AT24C01A/02/04 with address pins tied + * low, which takes addresses 0x50 and 0x51. + * Mikrobus doesn't specify beyond an I2C + * bus being present. + * PCIe uses ARP to assign addresses, or + * 0x63-0x64. + */ + clock-frequency = <100000>; + pinctrl-0 = <&clearfog_i2c1_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + + pinctrl@18000 { + clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins { + marvell,pins = "mpp46"; + marvell,function = "ref"; + }; + clearfog_dsa0_pins: clearfog-dsa0-pins { + marvell,pins = "mpp23", "mpp41"; + marvell,function = "gpio"; + }; + clearfog_i2c1_pins: i2c1-pins { + /* SFP, PCIe, mSATA, mikrobus */ + marvell,pins = "mpp26", "mpp27"; + marvell,function = "i2c1"; + }; + clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins { + marvell,pins = "mpp20"; + marvell,function = "gpio"; + }; + clearfog_sdhci_pins: clearfog-sdhci-pins { + marvell,pins = "mpp21", "mpp28", + "mpp37", "mpp38", + "mpp39", "mpp40"; + marvell,function = "sd0"; + }; + clearfog_spi1_cs_pins: spi1-cs-pins { + marvell,pins = "mpp55"; + marvell,function = "spi1"; + }; + mikro_pins: mikro-pins { + /* int: mpp22 rst: mpp29 */ + marvell,pins = "mpp22", "mpp29"; + marvell,function = "gpio"; + }; + mikro_spi_pins: mikro-spi-pins { + marvell,pins = "mpp43"; + marvell,function = "spi1"; + }; + mikro_uart_pins: mikro-uart-pins { + marvell,pins = "mpp24", "mpp25"; + marvell,function = "ua1"; + }; + rear_button_pins: rear-button-pins { + marvell,pins = "mpp34"; + marvell,function = "gpio"; + }; + }; + + sata@a8000 { + /* pinctrl? */ + status = "okay"; + }; + + sata@e0000 { + /* pinctrl? */ + status = "okay"; + }; + + sdhci@d8000 { + bus-width = <4>; + cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; + no-1-8-v; + pinctrl-0 = <&clearfog_sdhci_pins + &clearfog_sdhci_cd_pins>; + pinctrl-names = "default"; + status = "okay"; + vmmc = <®_3p3v>; + wp-inverted; + }; + + serial@12100 { + /* mikrobus uart */ + pinctrl-0 = <&mikro_uart_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + + usb@58000 { + /* CON3, nearest power. */ + status = "okay"; + }; + + crypto@90000 { + status = "okay"; + }; + + crypto@92000 { + status = "okay"; + }; + + usb3@f0000 { + /* CON2, nearest CPU, USB2 only. */ + status = "okay"; + }; + + usb3@f8000 { + /* CON7 */ + status = "okay"; + }; + }; + + pcie-controller { + status = "okay"; + /* + * The two PCIe units are accessible through + * the mini-PCIe connectors on the board. + */ + pcie@2,0 { + /* Port 1, Lane 0. CON3, nearest power. */ + reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + pcie@3,0 { + /* Port 2, Lane 0. CON2, nearest CPU. */ + reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + }; + + dsa@0 { + compatible = "marvell,dsa"; + dsa,ethernet = <ð1>; + dsa,mii-bus = <&mdio>; + pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>; + pinctrl-names = "default"; + #address-cells = <2>; + #size-cells = <0>; + + switch@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4 0>; + + port@0 { + reg = <0>; + label = "lan5"; + vlangroup = <0>; + }; + + port@1 { + reg = <1>; + label = "lan4"; + vlangroup = <0>; + }; + + port@2 { + reg = <2>; + label = "lan3"; + vlangroup = <0>; + }; + + port@3 { + reg = <3>; + label = "lan2"; + vlangroup = <0>; + }; + + port@4 { + reg = <4>; + label = "lan1"; + vlangroup = <0>; + }; + + port@5 { + reg = <5>; + label = "cpu"; + vlangroup = <0>; + }; + + port@6 { + /* 88E1512 external phy */ + reg = <6>; + label = "lan6"; + vlangroup = <0>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-0 = <&rear_button_pins>; + pinctrl-names = "default"; + + button_0 { + /* The rear SW3 button */ + label = "Rear Button"; + gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; + linux,can-disable; + linux,code = ; + }; + }; +}; + +&spi1 { + /* + * We don't seem to have the W25Q32 on the + * A1 Rev 2.0 boards, so disable SPI. + * CS0: W25Q32 (doesn't appear to be present) + * CS1: + * CS2: mikrobus + */ + pinctrl-0 = <&spi1_pins + &clearfog_spi1_cs_pins + &mikro_spi_pins>; + pinctrl-names = "default"; + status = "okay"; + + spi-flash@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "w25q32", "jedec,spi-nor"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <3000000>; + status = "disabled"; + }; +}; Added: head/sys/boot/fdt/dts/arm/armada-38x-solidrun-microsom.dtsi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/armada-38x-solidrun-microsom.dtsi Thu Jan 5 17:25:16 2017 (r311454) @@ -0,0 +1,126 @@ +/* + * Device Tree file for SolidRun Armada 38x Microsom + * + * Copyright (C) 2015 Russell King + * + * This board is in development; the contents of this file work with + * the A1 rev 2.0 of the board, which does not represent final + * production board. Things will change, don't expect this file to + * remain compatible info the future. + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * $FreeBSD$ + */ +#include +#include + +/ { + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; /* 256 MB */ + }; + + soc { + ranges = ; + + internal-regs { + ethernet@70000 { + pinctrl-0 = <&ge0_rgmii_pins>; + pinctrl-names = "default"; + phy = <&phy_dedicated>; + phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <1>; + status = "okay"; + }; + + mdio@72004 { + /* + * Add the phy clock here, so the phy can be + * accessed to read its IDs prior to binding + * with the driver. + */ + pinctrl-0 = <&mdio_pins µsom_phy_clk_pins>; + pinctrl-names = "default"; + + phy_dedicated: ethernet-phy@0 { + /* + * Annoyingly, the marvell phy driver + * configures the LED register, rather + * than preserving reset-loaded setting. + * We undo that rubbish here. + */ + marvell,reg-init = <3 16 0 0x101e>; + reg = <0>; + }; + }; + + pinctrl@18000 { + microsom_phy_clk_pins: microsom-phy-clk-pins { + marvell,pins = "mpp45"; + marvell,function = "ref"; + }; + }; + + rtc@a3800 { + /* + * If the rtc doesn't work, run "date reset" + * twice in u-boot. + */ + status = "okay"; + }; + + serial@12000 { + pinctrl-0 = <&uart0_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + + bm@c8000 { + status = "okay"; + }; + }; + + bm-bppi { + status = "okay"; + }; + + }; +}; From owner-svn-src-head@freebsd.org Thu Jan 5 17:27:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A181CA1E92; Thu, 5 Jan 2017 17:27:51 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74C541493; Thu, 5 Jan 2017 17:27:51 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05HRoRT098985; Thu, 5 Jan 2017 17:27:50 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05HRoup098984; Thu, 5 Jan 2017 17:27:50 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201701051727.v05HRoup098984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 5 Jan 2017 17:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311455 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 17:27:51 -0000 Author: zbb Date: Thu Jan 5 17:27:50 2017 New Revision: 311455 URL: https://svnweb.freebsd.org/changeset/base/311455 Log: Add DTS file for Armada 385 DB-AP board Armada38x is already supported in the tree. This commit adds support for DB-AP board. File was taken from Linux v4.8 and accustomed to FreeBSD in minimal possible way. Submitted by: Bartosz Szczepanek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7327 Added: head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts (contents, props changed) Added: head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts Thu Jan 5 17:27:50 2017 (r311455) @@ -0,0 +1,271 @@ +/* + * Device Tree file for Marvell Armada 385 Access Point Development board + * (DB-88F6820-AP) + * + * Copyright (C) 2014 Marvell + * + * Nadav Haklai + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * $FreeBSD$ + */ + +/dts-v1/; +#include "armada-385.dtsi" + +#include + +/ { + model = "Marvell Armada 385 Access Point Development Board"; + compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada380"; + + chosen { + stdout-path = "serial1"; + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x80000000>; /* 2GB */ + }; + + soc { + ranges = ; + + internal-regs { + i2c0: i2c@11000 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; + + /* + * This bus is wired to two EEPROM + * sockets, one of which holding the + * board ID used by the bootloader. + * Erasing this EEPROM's content will + * brick the board. + * Use this bus with caution. + */ + }; + + mdio@72004 { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + + phy0: ethernet-phy@1 { + reg = <1>; + }; + + phy1: ethernet-phy@4 { + reg = <4>; + }; + + phy2: ethernet-phy@6 { + reg = <6>; + }; + }; + + /* UART0 is exposed through the JP8 connector */ + uart0: serial@12000 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + status = "okay"; + }; + + /* + * UART1 is exposed through a FTDI chip + * wired to the mini-USB connector + */ + uart1: serial@12100 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "okay"; + }; + + pinctrl@18000 { + xhci0_vbus_pins: xhci0-vbus-pins { + marvell,pins = "mpp44"; + marvell,function = "gpio"; + }; + }; + + /* CON3 */ + ethernet@30000 { + status = "okay"; + phy = <&phy2>; + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <1>; + bm,pool-short = <3>; + }; + + /* CON2 */ + ethernet@34000 { + status = "okay"; + phy = <&phy1>; + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <3>; + }; + + usb@58000 { + status = "okay"; + }; + + /* CON4 */ + ethernet@70000 { + pinctrl-names = "default"; + + /* + * The Reference Clock 0 is used to + * provide a clock to the PHY + */ + pinctrl-0 = <&ge0_rgmii_pins>, <&ref_clk0_pins>; + status = "okay"; + phy = <&phy0>; + phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <3>; + }; + + crypto@90000 { + status = "okay"; + }; + + crypto@92000 { + status = "okay"; + }; + + bm@c8000 { + status = "okay"; + }; + + nfc: flash@d0000 { + status = "okay"; + num-cs = <1>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + marvell,nand-keep-config; + marvell,nand-enable-arbiter; + nand-on-flash-bbt; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "U-Boot"; + reg = <0x00000000 0x00800000>; + read-only; + }; + + partition@800000 { + label = "uImage"; + reg = <0x00800000 0x00400000>; + read-only; + }; + + partition@c00000 { + label = "Root"; + reg = <0x00c00000 0x3f400000>; + }; + }; + }; + + usb3@f0000 { + status = "okay"; + usb-phy = <&usb3_phy>; + }; + }; + + bm-bppi { + status = "okay"; + }; + + pcie-controller { + status = "okay"; + + /* + * The three PCIe units are accessible through + * standard mini-PCIe slots on the board. + */ + pcie@1,0 { + /* Port 0, Lane 0 */ + status = "okay"; + }; + + pcie@2,0 { + /* Port 1, Lane 0 */ + status = "okay"; + }; + + pcie@3,0 { + /* Port 2, Lane 0 */ + status = "okay"; + }; + }; + }; + + usb3_phy: usb3_phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <®_xhci0_vbus>; + }; + + reg_xhci0_vbus: xhci0-vbus { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&xhci0_vbus_pins>; + regulator-name = "xhci0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins>; + status = "okay"; + + spi-flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "st,m25p128", "jedec,spi-nor"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <54000000>; + }; +}; From owner-svn-src-head@freebsd.org Thu Jan 5 19:17:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2704CA1ED9; Thu, 5 Jan 2017 19:17:15 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 683D01A63; Thu, 5 Jan 2017 19:17:15 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05JHEF4043265; Thu, 5 Jan 2017 19:17:14 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05JHE1P043260; Thu, 5 Jan 2017 19:17:14 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201701051917.v05JHE1P043260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Thu, 5 Jan 2017 19:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311458 - in head/sys/boot/mips/beri: boot2 common loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 19:17:15 -0000 Author: kan Date: Thu Jan 5 19:17:14 2017 New Revision: 311458 URL: https://svnweb.freebsd.org/changeset/base/311458 Log: Use compiler driver to link BERI boot loaders Do not hardcode elf64-tradbigmips as output format in BERI linker scrips. Unfortunately, in-tree toolchain and external newer versions of binutils mean two different things under that. When creating elf binaries using external toolchain, gcc uses elf64-tradbigmips-freebsd and so linker script file has to match in order for ld to be able to create the final loader binary. Rather than trying to guess, remove hardcoded output format directive from the linker directive files and use CC to invoke the linker instead. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D9050 Modified: head/sys/boot/mips/beri/boot2/Makefile head/sys/boot/mips/beri/common/common.ldscript head/sys/boot/mips/beri/loader/loader.ldscript Modified: head/sys/boot/mips/beri/boot2/Makefile ============================================================================== --- head/sys/boot/mips/beri/boot2/Makefile Thu Jan 5 18:32:53 2017 (r311457) +++ head/sys/boot/mips/beri/boot2/Makefile Thu Jan 5 19:17:14 2017 (r311458) @@ -71,7 +71,7 @@ LDFLAGS= -nostdlib \ CFLAGS+= -I${.CURDIR}/../common flashboot.elf: relocate.o start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${LD} ${_LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ + ${CC} ${_LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSTAND} flashboot: flashboot.elf ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} @@ -79,7 +79,7 @@ flashboot.md5: flashboot md5 flashboot > flashboot.md5 jtagboot: start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${LD} ${_LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ + ${CC} ${_LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSTAND} jtagboot.md5: jtagboot md5 jtagboot > jtagboot.md5 Modified: head/sys/boot/mips/beri/common/common.ldscript ============================================================================== --- head/sys/boot/mips/beri/common/common.ldscript Thu Jan 5 18:32:53 2017 (r311457) +++ head/sys/boot/mips/beri/common/common.ldscript Thu Jan 5 19:17:14 2017 (r311458) @@ -73,5 +73,4 @@ __cheri_sdcard_vaddr__ = __mips64_xkphys __kernel_base__ = 0x100000; __kernel_vaddr__ = __mips64_xkphys_cached__ + __kernel_base__; -OUTPUT_FORMAT("elf64-tradbigmips"); OUTPUT_ARCH(mips) Modified: head/sys/boot/mips/beri/loader/loader.ldscript ============================================================================== --- head/sys/boot/mips/beri/loader/loader.ldscript Thu Jan 5 18:32:53 2017 (r311457) +++ head/sys/boot/mips/beri/loader/loader.ldscript Thu Jan 5 19:17:14 2017 (r311458) @@ -44,7 +44,6 @@ __loader_base_vaddr__ = __mips64_xkphys_ __loader_end__ = 0x100000; __loader_end_vaddr__ = __mips64_xkphys_cached__ + __loader_end__; -OUTPUT_FORMAT("elf64-tradbigmips"); OUTPUT_ARCH(mips) ENTRY(start) SECTIONS From owner-svn-src-head@freebsd.org Thu Jan 5 20:44:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FC35CA1F69; Thu, 5 Jan 2017 20:44:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31885164A; Thu, 5 Jan 2017 20:44:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05KijxX081064; Thu, 5 Jan 2017 20:44:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05KijCA081062; Thu, 5 Jan 2017 20:44:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701052044.v05KijCA081062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Jan 2017 20:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311459 - head/contrib/tcp_wrappers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 20:44:46 -0000 Author: dim Date: Thu Jan 5 20:44:45 2017 New Revision: 311459 URL: https://svnweb.freebsd.org/changeset/base/311459 Log: Put proper prototypes in tcpd.h Clang 4.0.0 complains about tcpd.h's not-really-prototypes, e.g.: /usr/include/tcpd.h:75:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] extern int hosts_access(); /* access control */ ^ To fix this, turn these declarations into real prototypes. While here, garbage collect the incompatible rfc931() function from scaffold.c, as it is never used. Reviewed by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9052 Modified: head/contrib/tcp_wrappers/scaffold.c head/contrib/tcp_wrappers/tcpd.h Modified: head/contrib/tcp_wrappers/scaffold.c ============================================================================== --- head/contrib/tcp_wrappers/scaffold.c Thu Jan 5 19:17:14 2017 (r311458) +++ head/contrib/tcp_wrappers/scaffold.c Thu Jan 5 20:44:45 2017 (r311459) @@ -235,16 +235,6 @@ struct request_info *request; exit(0); } -/* dummy function to intercept the real rfc931() */ - -/* ARGSUSED */ - -void rfc931(request) -struct request_info *request; -{ - strcpy(request->user, unknown); -} - /* check_path - examine accessibility */ int check_path(path, st) Modified: head/contrib/tcp_wrappers/tcpd.h ============================================================================== --- head/contrib/tcp_wrappers/tcpd.h Thu Jan 5 19:17:14 2017 (r311458) +++ head/contrib/tcp_wrappers/tcpd.h Thu Jan 5 20:44:45 2017 (r311459) @@ -6,6 +6,12 @@ * $FreeBSD$ */ +#ifdef INET6 +#define TCPD_SOCKADDR struct sockaddr +#else +#define TCPD_SOCKADDR struct sockaddr_in +#endif + /* Structure to describe one communications endpoint. */ #define STRING_LENGTH 128 /* hosts, users, processes */ @@ -13,11 +19,7 @@ struct host_info { char name[STRING_LENGTH]; /* access via eval_hostname(host) */ char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */ -#ifdef INET6 - struct sockaddr *sin; /* socket address or 0 */ -#else - struct sockaddr_in *sin; /* socket address or 0 */ -#endif + TCPD_SOCKADDR *sin; /* socket address or 0 */ struct t_unitdata *unit; /* TLI transport address or 0 */ struct request_info *request; /* for shared information */ }; @@ -67,21 +69,22 @@ extern char paranoid[]; /* Global functions. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) -extern void fromhost(); /* get/validate client host info */ +extern void fromhost(struct request_info *); /* get/validate client host info */ #else -#define fromhost sock_host /* no TLI support needed */ +#define fromhost sock_host /* no TLI support needed */ #endif -extern int hosts_access(); /* access control */ -extern int hosts_ctl(); /* wrapper around request_init() */ -extern void shell_cmd(); /* execute shell command */ -extern char *percent_x(); /* do % expansion */ -extern void rfc931(); /* client name from RFC 931 daemon */ -extern void clean_exit(); /* clean up and exit */ -extern void refuse(); /* clean up and exit */ -extern char *xgets(); /* fgets() on steroids */ -extern char *split_at(); /* strchr() and split */ -extern unsigned long dot_quad_addr(); /* restricted inet_addr() */ +extern int hosts_access(struct request_info *); /* access control */ +extern int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */ +extern void shell_cmd(char *); /* execute shell command */ +extern char *percent_x(char *, int, char *, struct request_info *); /* do % expansion */ +extern void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */ +extern void clean_exit(struct request_info *); /* clean up and exit */ +extern void refuse(struct request_info *); /* clean up and exit */ +extern char *xgets(char *, int, FILE *); /* fgets() on steroids */ + +extern char *split_at(char *, int); /* strchr() and split */ +extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */ /* Global variables. */ @@ -98,13 +101,8 @@ extern int resident; /* > 0 if residen * attributes. Each attribute has its own key. */ -#ifdef __STDC__ -extern struct request_info *request_init(struct request_info *,...); -extern struct request_info *request_set(struct request_info *,...); -#else -extern struct request_info *request_init(); /* initialize request */ -extern struct request_info *request_set(); /* update request structure */ -#endif +extern struct request_info *request_init(struct request_info *,...); /* initialize request */ +extern struct request_info *request_set(struct request_info *,...); /* update request structure */ #define RQ_FILE 1 /* file descriptor */ #define RQ_DAEMON 2 /* server process (argv[0]) */ @@ -124,27 +122,27 @@ extern struct request_info *request_set( * host_info structures serve as caches for the lookup results. */ -extern char *eval_user(); /* client user */ -extern char *eval_hostname(); /* printable hostname */ -extern char *eval_hostaddr(); /* printable host address */ -extern char *eval_hostinfo(); /* host name or address */ -extern char *eval_client(); /* whatever is available */ -extern char *eval_server(); /* whatever is available */ +extern char *eval_user(struct request_info *); /* client user */ +extern char *eval_hostname(struct host_info *); /* printable hostname */ +extern char *eval_hostaddr(struct host_info *); /* printable host address */ +extern char *eval_hostinfo(struct host_info *); /* host name or address */ +extern char *eval_client(struct request_info *); /* whatever is available */ +extern char *eval_server(struct request_info *); /* whatever is available */ #define eval_daemon(r) ((r)->daemon) /* daemon process name */ #define eval_pid(r) ((r)->pid) /* process id */ /* Socket-specific methods, including DNS hostname lookups. */ -extern void sock_host(); /* look up endpoint addresses */ -extern void sock_hostname(); /* translate address to hostname */ -extern void sock_hostaddr(); /* address to printable address */ +extern void sock_host(struct request_info *); /* look up endpoint addresses */ +extern void sock_hostname(struct host_info *); /* translate address to hostname */ +extern void sock_hostaddr(struct host_info *); /* address to printable address */ #define sock_methods(r) \ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } /* The System V Transport-Level Interface (TLI) interface. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) -extern void tli_host(); /* look up endpoint addresses etc. */ +extern void tli_host(struct request_info *); /* look up endpoint addresses etc. */ #endif /* @@ -153,13 +151,8 @@ extern void tli_host(); /* look up end * everyone would have to include . */ -#ifdef __STDC__ extern void tcpd_warn(char *, ...); /* report problem and proceed */ extern void tcpd_jump(char *, ...); /* report problem and jump */ -#else -extern void tcpd_warn(); -extern void tcpd_jump(); -#endif struct tcpd_context { char *file; /* current file */ @@ -185,42 +178,42 @@ extern struct tcpd_context tcpd_context; * behavior. */ -extern void process_options(); /* execute options */ -extern int dry_run; /* verification flag */ +extern void process_options(char *, struct request_info *); /* execute options */ +extern int dry_run; /* verification flag */ /* Bug workarounds. */ #ifdef INET_ADDR_BUG /* inet_addr() returns struct */ #define inet_addr fix_inet_addr -extern long fix_inet_addr(); +extern long fix_inet_addr(char *); #endif #ifdef BROKEN_FGETS /* partial reads from sockets */ #define fgets fix_fgets -extern char *fix_fgets(); +extern char *fix_fgets(char *, int, FILE *); #endif #ifdef RECVFROM_BUG /* no address family info */ #define recvfrom fix_recvfrom -extern int fix_recvfrom(); +extern int fix_recvfrom(int, char *, int, int, struct sockaddr *, int *); #endif #ifdef GETPEERNAME_BUG /* claims success with UDP */ #define getpeername fix_getpeername -extern int fix_getpeername(); +extern int fix_getpeername(int, struct sockaddr *, int *); #endif #ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */ #define gethostbyname fix_gethostbyname -extern struct hostent *fix_gethostbyname(); +extern struct hostent *fix_gethostbyname(char *); #endif #ifdef USE_STRSEP /* libc calls strtok() */ #define strtok fix_strtok -extern char *fix_strtok(); +extern char *fix_strtok(char *, char *); #endif #ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */ #define strtok my_strtok -extern char *my_strtok(); +extern char *my_strtok(char *, char *); #endif From owner-svn-src-head@freebsd.org Thu Jan 5 21:05:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0E70CA0394; Thu, 5 Jan 2017 21:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38D9A1FCF; Thu, 5 Jan 2017 21:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v05L5KHu038731 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 5 Jan 2017 23:05:21 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v05L5KHu038731 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v05L5KbX038730; Thu, 5 Jan 2017 23:05:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Jan 2017 23:05:20 +0200 From: Konstantin Belousov To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311459 - head/contrib/tcp_wrappers Message-ID: <20170105210520.GT2533@kib.kiev.ua> References: <201701052044.v05KijCA081062@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701052044.v05KijCA081062@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 21:05:26 -0000 On Thu, Jan 05, 2017 at 08:44:45PM +0000, Dimitry Andric wrote: > +extern int hosts_access(struct request_info *); /* access control */ > +extern int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */ The 'extern' keywords there are redundand and could be cleaned since you are changing the code anyway. From owner-svn-src-head@freebsd.org Thu Jan 5 21:17:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A118FCA093E; Thu, 5 Jan 2017 21:17:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B70F172F; Thu, 5 Jan 2017 21:17:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05LHApM093307; Thu, 5 Jan 2017 21:17:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05LHAOa093306; Thu, 5 Jan 2017 21:17:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701052117.v05LHAOa093306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Jan 2017 21:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311461 - head/contrib/tcp_wrappers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 21:17:11 -0000 Author: dim Date: Thu Jan 5 21:17:10 2017 New Revision: 311461 URL: https://svnweb.freebsd.org/changeset/base/311461 Log: Also remove unnecessary extern keywords from tcpd.h. Noticed by: kib X-MFC-With: r311459 Modified: head/contrib/tcp_wrappers/tcpd.h Modified: head/contrib/tcp_wrappers/tcpd.h ============================================================================== --- head/contrib/tcp_wrappers/tcpd.h Thu Jan 5 20:50:44 2017 (r311460) +++ head/contrib/tcp_wrappers/tcpd.h Thu Jan 5 21:17:10 2017 (r311461) @@ -69,22 +69,22 @@ extern char paranoid[]; /* Global functions. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) -extern void fromhost(struct request_info *); /* get/validate client host info */ +void fromhost(struct request_info *); /* get/validate client host info */ #else -#define fromhost sock_host /* no TLI support needed */ +#define fromhost sock_host /* no TLI support needed */ #endif -extern int hosts_access(struct request_info *); /* access control */ -extern int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */ -extern void shell_cmd(char *); /* execute shell command */ -extern char *percent_x(char *, int, char *, struct request_info *); /* do % expansion */ -extern void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */ -extern void clean_exit(struct request_info *); /* clean up and exit */ -extern void refuse(struct request_info *); /* clean up and exit */ -extern char *xgets(char *, int, FILE *); /* fgets() on steroids */ +int hosts_access(struct request_info *); /* access control */ +int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */ +void shell_cmd(char *); /* execute shell command */ +char *percent_x(char *, int, char *, struct request_info *); /* do % expansion */ +void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */ +void clean_exit(struct request_info *); /* clean up and exit */ +void refuse(struct request_info *); /* clean up and exit */ +char *xgets(char *, int, FILE *); /* fgets() on steroids */ -extern char *split_at(char *, int); /* strchr() and split */ -extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */ +char *split_at(char *, int); /* strchr() and split */ +unsigned long dot_quad_addr(char *); /* restricted inet_addr() */ /* Global variables. */ @@ -101,8 +101,8 @@ extern int resident; /* > 0 if residen * attributes. Each attribute has its own key. */ -extern struct request_info *request_init(struct request_info *,...); /* initialize request */ -extern struct request_info *request_set(struct request_info *,...); /* update request structure */ +struct request_info *request_init(struct request_info *,...); /* initialize request */ +struct request_info *request_set(struct request_info *,...); /* update request structure */ #define RQ_FILE 1 /* file descriptor */ #define RQ_DAEMON 2 /* server process (argv[0]) */ @@ -122,27 +122,27 @@ extern struct request_info *request_set( * host_info structures serve as caches for the lookup results. */ -extern char *eval_user(struct request_info *); /* client user */ -extern char *eval_hostname(struct host_info *); /* printable hostname */ -extern char *eval_hostaddr(struct host_info *); /* printable host address */ -extern char *eval_hostinfo(struct host_info *); /* host name or address */ -extern char *eval_client(struct request_info *); /* whatever is available */ -extern char *eval_server(struct request_info *); /* whatever is available */ +char *eval_user(struct request_info *); /* client user */ +char *eval_hostname(struct host_info *); /* printable hostname */ +char *eval_hostaddr(struct host_info *); /* printable host address */ +char *eval_hostinfo(struct host_info *); /* host name or address */ +char *eval_client(struct request_info *); /* whatever is available */ +char *eval_server(struct request_info *); /* whatever is available */ #define eval_daemon(r) ((r)->daemon) /* daemon process name */ #define eval_pid(r) ((r)->pid) /* process id */ /* Socket-specific methods, including DNS hostname lookups. */ -extern void sock_host(struct request_info *); /* look up endpoint addresses */ -extern void sock_hostname(struct host_info *); /* translate address to hostname */ -extern void sock_hostaddr(struct host_info *); /* address to printable address */ +void sock_host(struct request_info *); /* look up endpoint addresses */ +void sock_hostname(struct host_info *); /* translate address to hostname */ +void sock_hostaddr(struct host_info *); /* address to printable address */ #define sock_methods(r) \ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } /* The System V Transport-Level Interface (TLI) interface. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) -extern void tli_host(struct request_info *); /* look up endpoint addresses etc. */ +void tli_host(struct request_info *); /* look up endpoint addresses etc. */ #endif /* @@ -151,8 +151,8 @@ extern void tli_host(struct request_info * everyone would have to include . */ -extern void tcpd_warn(char *, ...); /* report problem and proceed */ -extern void tcpd_jump(char *, ...); /* report problem and jump */ +void tcpd_warn(char *, ...); /* report problem and proceed */ +void tcpd_jump(char *, ...); /* report problem and jump */ struct tcpd_context { char *file; /* current file */ @@ -178,42 +178,42 @@ extern struct tcpd_context tcpd_context; * behavior. */ -extern void process_options(char *, struct request_info *); /* execute options */ -extern int dry_run; /* verification flag */ +void process_options(char *, struct request_info *); /* execute options */ +extern int dry_run; /* verification flag */ /* Bug workarounds. */ #ifdef INET_ADDR_BUG /* inet_addr() returns struct */ #define inet_addr fix_inet_addr -extern long fix_inet_addr(char *); +long fix_inet_addr(char *); #endif #ifdef BROKEN_FGETS /* partial reads from sockets */ #define fgets fix_fgets -extern char *fix_fgets(char *, int, FILE *); +char *fix_fgets(char *, int, FILE *); #endif #ifdef RECVFROM_BUG /* no address family info */ #define recvfrom fix_recvfrom -extern int fix_recvfrom(int, char *, int, int, struct sockaddr *, int *); +int fix_recvfrom(int, char *, int, int, struct sockaddr *, int *); #endif #ifdef GETPEERNAME_BUG /* claims success with UDP */ #define getpeername fix_getpeername -extern int fix_getpeername(int, struct sockaddr *, int *); +int fix_getpeername(int, struct sockaddr *, int *); #endif #ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */ #define gethostbyname fix_gethostbyname -extern struct hostent *fix_gethostbyname(char *); +struct hostent *fix_gethostbyname(char *); #endif #ifdef USE_STRSEP /* libc calls strtok() */ #define strtok fix_strtok -extern char *fix_strtok(char *, char *); +char *fix_strtok(char *, char *); #endif #ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */ #define strtok my_strtok -extern char *my_strtok(char *, char *); +char *my_strtok(char *, char *); #endif From owner-svn-src-head@freebsd.org Thu Jan 5 21:24:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9415CA0D11; Thu, 5 Jan 2017 21:24:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 700691DAB; Thu, 5 Jan 2017 21:24:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::5841:ed22:dad1:c02f] (unknown [IPv6:2001:7b8:3a7:0:5841:ed22:dad1:c02f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A100A362FE; Thu, 5 Jan 2017 22:24:44 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_C0E122A1-DACF-4374-A99F-B99AAB6740DD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r311459 - head/contrib/tcp_wrappers From: Dimitry Andric In-Reply-To: <20170105210520.GT2533@kib.kiev.ua> Date: Thu, 5 Jan 2017 22:24:37 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2A5AE54B-72E5-4F96-A31B-DB8107B8B9E0@FreeBSD.org> References: <201701052044.v05KijCA081062@repo.freebsd.org> <20170105210520.GT2533@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 21:24:52 -0000 --Apple-Mail=_C0E122A1-DACF-4374-A99F-B99AAB6740DD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 05 Jan 2017, at 22:05, Konstantin Belousov = wrote: >=20 > On Thu, Jan 05, 2017 at 08:44:45PM +0000, Dimitry Andric wrote: >> +extern int hosts_access(struct request_info *); = /* access control */ >> +extern int hosts_ctl(char *, char *, char *, char *); = /* wrapper around request_init() */ >=20 > The 'extern' keywords there are redundand and could be cleaned since > you are changing the code anyway. Ah thanks, fixed that in r311461. -Dimitry --Apple-Mail=_C0E122A1-DACF-4374-A99F-B99AAB6740DD Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlhuuZwACgkQsF6jCi4glqPSbQCfaOHdm8vTGf5VUGhteV+LVGOH k9sAoOjwxjm8BbY2CgEZdmfM5rFHhrP+ =rQ4g -----END PGP SIGNATURE----- --Apple-Mail=_C0E122A1-DACF-4374-A99F-B99AAB6740DD-- From owner-svn-src-head@freebsd.org Thu Jan 5 21:28:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BB64CA0DC6; Thu, 5 Jan 2017 21:28:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8614112C; Thu, 5 Jan 2017 21:28:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05LSRD2097533; Thu, 5 Jan 2017 21:28:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05LSQFY097521; Thu, 5 Jan 2017 21:28:26 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201701052128.v05LSQFY097521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 5 Jan 2017 21:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311462 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 21:28:28 -0000 Author: jkim Date: Thu Jan 5 21:28:25 2017 New Revision: 311462 URL: https://svnweb.freebsd.org/changeset/base/311462 Log: Merge ACPICA 20161222. Added: head/sys/contrib/dev/acpica/os_specific/service_layers/osgendbg.c - copied, changed from r310450, vendor-sys/acpica/dist/source/os_specific/service_layers/osgendbg.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/hardware/hwregs.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/include/acclib.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c head/sys/dev/acpica/Osd/OsdDebug.c head/sys/dev/acpica/Osd/OsdHardware.c head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/acpidb/acpidb.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/conf/files Thu Jan 5 21:28:25 2017 (r311462) @@ -496,7 +496,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.c optional acpi contrib/dev/acpica/components/utilities/utxfinit.c optional acpi -#contrib/dev/acpica/components/utilities/utxfmutex.c optional acpi +contrib/dev/acpica/os_specific/service_layers/osgendbg.c optional acpi acpi_debug contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Thu Jan 5 21:28:25 2017 (r311462) @@ -17,7 +17,7 @@ dst="$(realpath .)/acpi_ca_destination" fulldirs="common compiler components include os_specific" # files to remove -stripdirs="generate libraries tests tools" +stripdirs="generate libraries parsers preprocessor tests tools" stripfiles="Makefile README accygwin.h acdragonfly.h acdragonflyex.h \ acefi.h acefiex.h achaiku.h acintel.h aclinux.h aclinuxex.h \ acmacosx.h acmsvc.h acmsvcex.h acnetbsd.h acos2.h acqnx.h \ Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/changes.txt Thu Jan 5 21:28:25 2017 (r311462) @@ -1,4 +1,93 @@ ---------------------------------------- +22 December 2016. Summary of changes for version 20161222: + + +1) ACPICA kernel-resident subsystem: + +AML Debugger: Implemented a new mechanism to simplify and enhance +debugger integration into all environments, including kernel debuggers +and user-space utilities, as well as remote debug services. This +mechanism essentially consists of new OSL interfaces to support debugger +initialization/termination, as well as wait/notify interfaces to perform +the debugger handshake with the host. Lv Zheng. + + New OSL interfaces: + AcpiOsInitializeDebugger (void) + AcpiOsTerminateDebugger (void) + AcpiOsWaitCommandReady (void) + AcpiOsNotifyCommandComplete (void) + + New OS services layer: + osgendbg.c -- Example implementation, and used for AcpiExec + +Update for Generic Address Space (GAS) support: Although the AccessWidth +and/or BitOffset fields of the GAS are not often used, this change now +fully supports these fields. This affects the internal support for FADT +registers, registers in other ACPI data tables, and the AcpiRead and +AcpiWrite public interfaces. Lv Zheng. + +Sleep support: In order to simplify integration of ACPI sleep for the +various host operating systems, a new OSL interface has been introduced. +AcpiOsEnterSleep allows the host to perform any required operations +before the final write to the sleep control register(s) is performed by +ACPICA. Lv Zheng. + + New OSL interface: + AcpiOsEnterSleep(SleepState, RegisterAValue, RegisterBValue) + + Called from these internal interfaces: + AcpiHwLegacySleep + AcpiHwExtendedSleep + +EFI support: Added a very small EFI/ACPICA example application. Provides +a simple demo for EFI integration, as well as assisting with resolution +of issues related to customer ACPICA/EFI integration. Lv Zheng. See: + + source/tools/efihello/efihello.c + +Local C library: Implemented several new functions to enhance ACPICA +portability, for environments where these clib functions are not +available (such as EFI). Lv Zheng: + putchar + getchar + strpbrk + strtok + memmove + +Fixed a regression where occasionally a valid resource descriptor was +incorrectly detected as invalid at runtime, and a +AE_AML_NO_RESOURCE_END_TAG was returned. + +Fixed a problem with the recently implemented support that enables +control method invocations as Target operands to many ASL operators. +Warnings of this form: "Needed type [Reference], found [Processor]" were +seen at runtime for some method invocations. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 141.5K Code, 58.5K Data, 200.0K Total + Debug Version: 201.7K Code, 82.7K Data, 284.4K Total + Previous Release: + Non-Debug Version: 140.5K Code, 58.5K Data, 198.9K Total + Debug Version: 201.3K Code, 82.7K Data, 284.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Enhanced output by adding the capability to detect and +disassemble ASL Switch/Case statements back to the original ASL source +code instead of if/else blocks. David Box. + +AcpiHelp: Split a large file into separate files based upon +functionality/purpose. New files are: + ahaml.c + ahasl.c + +---------------------------------------- 17 November 2016. Summary of changes for version 20161117: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/common/acfileio.c Thu Jan 5 21:28:25 2017 (r311462) @@ -403,7 +403,7 @@ AcValidateTableHeader ( UINT32 i; - ACPI_FUNCTION_TRACE ("AcValidateTableHeader"); + ACPI_FUNCTION_TRACE (AcValidateTableHeader); /* Read a potential table header */ Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/common/ahtable.c Thu Jan 5 21:28:25 2017 (r311462) @@ -51,7 +51,7 @@ const AH_TABLE * AcpiAhGetTableInfo ( char *Signature); -extern const AH_TABLE AcpiSupportedTables[]; +extern const AH_TABLE Gbl_AcpiSupportedTables[]; /******************************************************************************* @@ -73,7 +73,7 @@ AcpiAhGetTableInfo ( const AH_TABLE *Info; - for (Info = AcpiSupportedTables; Info->Signature; Info++) + for (Info = Gbl_AcpiSupportedTables; Info->Signature; Info++) { if (ACPI_COMPARE_NAME (Signature, Info->Signature)) { @@ -89,7 +89,7 @@ AcpiAhGetTableInfo ( * Note: Any tables added here should be duplicated within AcpiDmTableData * in the file common/dmtable.c */ -const AH_TABLE AcpiSupportedTables[] = +const AH_TABLE Gbl_AcpiSupportedTables[] = { {ACPI_SIG_ASF, "Alert Standard Format table"}, {ACPI_SIG_BERT, "Boot Error Record Table"}, Modified: head/sys/contrib/dev/acpica/common/ahuuids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahuuids.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/common/ahuuids.c Thu Jan 5 21:28:25 2017 (r311462) @@ -52,7 +52,7 @@ /* * Table of "known" (ACPI-related) UUIDs */ -const AH_UUID AcpiUuids[] = +const AH_UUID Gbl_AcpiUuids[] = { {"[Controllers]", NULL}, {"GPIO Controller", UUID_GPIO_CONTROLLER}, @@ -112,7 +112,7 @@ AcpiAhMatchUuid ( /* Walk the table of known ACPI-related UUIDs */ - for (Info = AcpiUuids; Info->Description; Info++) + for (Info = Gbl_AcpiUuids; Info->Description; Info++) { /* Null string means desciption is a UUID class */ Modified: head/sys/contrib/dev/acpica/compiler/aslutils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 5 21:28:25 2017 (r311462) @@ -155,7 +155,7 @@ UtDisplaySupportedTables ( /* All ACPI tables with the common table header */ printf ("\n Supported ACPI tables:\n"); - for (TableData = AcpiSupportedTables, i = 1; + for (TableData = Gbl_AcpiSupportedTables, i = 1; TableData->Signature; TableData++, i++) { printf ("%8u) %s %s\n", i, Modified: head/sys/contrib/dev/acpica/components/debugger/dbinput.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbinput.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/components/debugger/dbinput.c Thu Jan 5 21:28:25 2017 (r311462) @@ -64,10 +64,6 @@ AcpiDbMatchCommand ( char *UserCommand); static void -AcpiDbSingleThread ( - void); - -static void AcpiDbDisplayCommandInfo ( const char *Command, BOOLEAN DisplayAll); @@ -1231,61 +1227,17 @@ void ACPI_SYSTEM_XFACE AcpiDbExecuteThread ( void *Context) { - ACPI_STATUS Status = AE_OK; - ACPI_STATUS MStatus; - - - while (Status != AE_CTRL_TERMINATE && !AcpiGbl_DbTerminateLoop) - { - AcpiGbl_MethodExecuting = FALSE; - AcpiGbl_StepToNextCall = FALSE; - MStatus = AcpiOsAcquireMutex (AcpiGbl_DbCommandReady, - ACPI_WAIT_FOREVER); - if (ACPI_FAILURE (MStatus)) - { - return; - } - - Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, NULL, NULL); - - AcpiOsReleaseMutex (AcpiGbl_DbCommandComplete); - } + (void) AcpiDbUserCommands (); AcpiGbl_DbThreadsTerminated = TRUE; } /******************************************************************************* * - * FUNCTION: AcpiDbSingleThread - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Debugger execute thread. Waits for a command line, then - * simply dispatches it. - * - ******************************************************************************/ - -static void -AcpiDbSingleThread ( - void) -{ - - AcpiGbl_MethodExecuting = FALSE; - AcpiGbl_StepToNextCall = FALSE; - - (void) AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, NULL, NULL); -} - - -/******************************************************************************* - * * FUNCTION: AcpiDbUserCommands * - * PARAMETERS: Prompt - User prompt (depends on mode) - * Op - Current executing parse op + * PARAMETERS: None * * RETURN: None * @@ -1296,8 +1248,7 @@ AcpiDbSingleThread ( ACPI_STATUS AcpiDbUserCommands ( - char Prompt, - ACPI_PARSE_OBJECT *Op) + void) { ACPI_STATUS Status = AE_OK; @@ -1308,55 +1259,33 @@ AcpiDbUserCommands ( while (!AcpiGbl_DbTerminateLoop) { - /* Force output to console until a command is entered */ - - AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); - - /* Different prompt if method is executing */ + /* Wait the readiness of the command */ - if (!AcpiGbl_MethodExecuting) - { - AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT); - } - else + Status = AcpiOsWaitCommandReady (); + if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT); + break; } - /* Get the user input line */ + /* Just call to the command line interpreter */ - Status = AcpiOsGetLine (AcpiGbl_DbLineBuf, - ACPI_DB_LINE_BUFFER_SIZE, NULL); - if (ACPI_FAILURE (Status)) - { - ACPI_EXCEPTION ((AE_INFO, Status, "While parsing command line")); - return (Status); - } + AcpiGbl_MethodExecuting = FALSE; + AcpiGbl_StepToNextCall = FALSE; - /* Check for single or multithreaded debug */ + (void) AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, NULL, NULL); - if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED) - { - /* - * Signal the debug thread that we have a command to execute, - * and wait for the command to complete. - */ - AcpiOsReleaseMutex (AcpiGbl_DbCommandReady); - - Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete, - ACPI_WAIT_FOREVER); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - } - else - { - /* Just call to the command line interpreter */ + /* Notify the completion of the command */ - AcpiDbSingleThread (); + Status = AcpiOsNotifyCommandComplete (); + if (ACPI_FAILURE (Status)) + { + break; } } + if (ACPI_FAILURE (Status) && Status != AE_CTRL_TERMINATE) + { + ACPI_EXCEPTION ((AE_INFO, Status, "While parsing command line")); + } return (Status); } Modified: head/sys/contrib/dev/acpica/components/debugger/dbxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbxface.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/components/debugger/dbxface.c Thu Jan 5 21:28:25 2017 (r311462) @@ -95,50 +95,23 @@ AcpiDbStartCommand ( AcpiGbl_MethodExecuting = TRUE; Status = AE_CTRL_TRUE; + while (Status == AE_CTRL_TRUE) { - if (AcpiGbl_DebuggerConfiguration == DEBUGGER_MULTI_THREADED) - { - /* Handshake with the front-end that gets user command lines */ + /* Notify the completion of the command */ - AcpiOsReleaseMutex (AcpiGbl_DbCommandComplete); - - Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandReady, - ACPI_WAIT_FOREVER); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - } - else + Status = AcpiOsNotifyCommandComplete (); + if (ACPI_FAILURE (Status)) { - /* Single threaded, we must get a command line ourselves */ - - /* Force output to console until a command is entered */ - - AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); - - /* Different prompt if method is executing */ - - if (!AcpiGbl_MethodExecuting) - { - AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT); - } - else - { - AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT); - } + goto ErrorExit; + } - /* Get the user input line */ + /* Wait the readiness of the command */ - Status = AcpiOsGetLine (AcpiGbl_DbLineBuf, - ACPI_DB_LINE_BUFFER_SIZE, NULL); - if (ACPI_FAILURE (Status)) - { - ACPI_EXCEPTION ((AE_INFO, Status, - "While parsing command line")); - return (Status); - } + Status = AcpiOsWaitCommandReady (); + if (ACPI_FAILURE (Status)) + { + goto ErrorExit; } Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, WalkState, Op); @@ -146,6 +119,12 @@ AcpiDbStartCommand ( /* AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); */ +ErrorExit: + if (ACPI_FAILURE (Status) && Status != AE_CTRL_TERMINATE) + { + ACPI_EXCEPTION ((AE_INFO, Status, + "While parsing/handling command line")); + } return (Status); } @@ -493,16 +472,7 @@ AcpiInitializeDebugger ( { /* These were created with one unit, grab it */ - Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete, - ACPI_WAIT_FOREVER); - if (ACPI_FAILURE (Status)) - { - AcpiOsPrintf ("Could not get debugger mutex\n"); - return_ACPI_STATUS (Status); - } - - Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandReady, - ACPI_WAIT_FOREVER); + Status = AcpiOsInitializeDebugger (); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could not get debugger mutex\n"); @@ -556,14 +526,14 @@ AcpiTerminateDebugger ( if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED) { - AcpiOsReleaseMutex (AcpiGbl_DbCommandReady); - /* Wait the AML Debugger threads */ while (!AcpiGbl_DbThreadsTerminated) { AcpiOsSleep (100); } + + AcpiOsTerminateDebugger (); } if (AcpiGbl_DbBuffer) Modified: head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c ============================================================================== --- head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c Thu Jan 5 21:28:25 2017 (r311462) @@ -68,6 +68,13 @@ static void AcpiDmPromoteSubtree ( ACPI_PARSE_OBJECT *StartOp); +static BOOLEAN +AcpiDmIsSwitchBlock ( + ACPI_PARSE_OBJECT *Op); + +static BOOLEAN +AcpiDmIsCaseBlock ( + ACPI_PARSE_OBJECT *Op); /******************************************************************************* * @@ -968,6 +975,28 @@ AcpiDmDisassembleOneOp ( AcpiDmNamestring (Op->Common.Value.Name); break; + case AML_WHILE_OP: + + if (AcpiDmIsSwitchBlock(Op)) + { + AcpiOsPrintf ("%s", "Switch"); + break; + } + + AcpiOsPrintf ("%s", OpInfo->Name); + break; + + case AML_IF_OP: + + if (Op->Common.DisasmOpcode == ACPI_DASM_CASE) + { + AcpiOsPrintf ("%s", "Case"); + break; + } + + AcpiOsPrintf ("%s", OpInfo->Name); + break; + case AML_ELSE_OP: AcpiDmConvertToElseIf (Op); @@ -1078,6 +1107,12 @@ AcpiDmConvertToElseIf ( { /* Not a proper Else..If sequence, cannot convert to ElseIf */ + if (OriginalElseOp->Common.DisasmOpcode == ACPI_DASM_DEFAULT) + { + AcpiOsPrintf ("%s", "Default"); + return; + } + AcpiOsPrintf ("%s", "Else"); return; } @@ -1087,13 +1122,42 @@ AcpiDmConvertToElseIf ( ElseOp = IfOp->Common.Next; if (ElseOp && ElseOp->Common.Next) { + if (OriginalElseOp->Common.DisasmOpcode == ACPI_DASM_DEFAULT) + { + AcpiOsPrintf ("%s", "Default"); + return; + } + AcpiOsPrintf ("%s", "Else"); return; } - /* Emit ElseIf, mark the IF as now an ELSEIF */ + if (OriginalElseOp->Common.DisasmOpcode == ACPI_DASM_DEFAULT) + { + /* + * There is an ElseIf but in this case the Else is actually + * a Default block for a Switch/Case statement. No conversion. + */ + AcpiOsPrintf ("%s", "Default"); + return; + } + + if (OriginalElseOp->Common.DisasmOpcode == ACPI_DASM_CASE) + { + /* + * This ElseIf is actually a Case block for a Switch/Case + * statement. Print Case but do not return so that we can + * promote the subtree and keep the indentation level. + */ + AcpiOsPrintf ("%s", "Case"); + } + else + { + /* Emit ElseIf, mark the IF as now an ELSEIF */ + + AcpiOsPrintf ("%s", "ElseIf"); + } - AcpiOsPrintf ("%s", "ElseIf"); IfOp->Common.DisasmFlags |= ACPI_PARSEOP_ELSEIF; /* The IF parent will now be the same as the original ELSE parent */ @@ -1184,3 +1248,400 @@ AcpiDmPromoteSubtree ( Op = Op->Common.Next; } } + +/******************************************************************************* + * + * FUNCTION: AcpiDmIsTempName + * + * PARAMETERS: Op - Object to be examined + * + * RETURN: TRUE if object is a temporary (_T_x) name + * + * DESCRIPTION: Determine if an object is a temporary name and ignore it. + * Temporary names are only used for Switch statements. This + * function depends on this restriced usage. + * + ******************************************************************************/ + +BOOLEAN +AcpiDmIsTempName ( + ACPI_PARSE_OBJECT *Op) +{ + char *Temp; + + if (Op->Common.AmlOpcode != AML_NAME_OP) + { + return (FALSE); + } + + Temp = (char *)(Op->Common.Aml); + ++Temp; + + if (strncmp(Temp, "_T_", 3)) + { + return (FALSE); + } + + /* Ignore Op */ + + Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + + return (TRUE); +} + +/******************************************************************************* + * + * FUNCTION: AcpiDmIsSwitchBlock + * + * PARAMETERS: Op - While Object + * + * RETURN: TRUE if While block can be converted to a Switch/Case block + * + * DESCRIPTION: Determines if While block is a Switch/Case statement. Modifies + * parse tree to allow for Switch/Case disassembly during walk. + * + * EXAMPLE: Example of parse tree to be converted + * + * While + * One + * Store + * ByteConst + * -NamePath- + * If + * LEqual + * -NamePath- + * Zero + * Return + * One + * Else + * Return + * WordConst + * Break + * + ******************************************************************************/ + +static BOOLEAN +AcpiDmIsSwitchBlock ( + ACPI_PARSE_OBJECT *Op) +{ + ACPI_PARSE_OBJECT *OneOp; + ACPI_PARSE_OBJECT *StoreOp; + ACPI_PARSE_OBJECT *NamePathOp; + ACPI_PARSE_OBJECT *PredicateOp; + ACPI_PARSE_OBJECT *CurrentOp; + ACPI_PARSE_OBJECT *TempOp; + + /* Check for One Op Predicate */ + + OneOp = AcpiPsGetArg (Op, 0); + if (!OneOp || (OneOp->Common.AmlOpcode != AML_ONE_OP)) + { + return (FALSE); + } + + /* Check for Store Op */ + + StoreOp = OneOp->Common.Next; + if (!StoreOp || (StoreOp->Common.AmlOpcode != AML_STORE_OP)) + { + return (FALSE); + } + + /* Check for Name Op with _T_ string */ + + NamePathOp = AcpiPsGetArg (StoreOp, 1); + if (!NamePathOp || (NamePathOp->Common.AmlOpcode != AML_INT_NAMEPATH_OP)) + { + return (FALSE); + } + + if (strncmp((char *)(NamePathOp->Common.Aml), "_T_", 3)) + { + return (FALSE); + } + + /* This is a Switch/Case control block */ + + /* Ignore the One Op Predicate */ + + OneOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + + /* Ignore the Store Op, but not the children */ + + StoreOp->Common.DisasmOpcode = ACPI_DASM_IGNORE_SINGLE; + + /* + * First arg of Store Op is the Switch condition. + * Mark it as a Switch predicate and as a parameter list for paren + * closing and correct indentation. + */ + PredicateOp = AcpiPsGetArg (StoreOp, 0); + PredicateOp->Common.DisasmOpcode = ACPI_DASM_SWITCH_PREDICATE; + PredicateOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST; + + /* Ignore the Name Op */ + + NamePathOp->Common.DisasmFlags = ACPI_PARSEOP_IGNORE; + + /* Remaining opcodes are the Case statements (If/ElseIf's) */ + + CurrentOp = StoreOp->Common.Next; + while (AcpiDmIsCaseBlock (CurrentOp)) + { + /* Block is a Case structure */ + + if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) + { + /* ElseIf */ + + CurrentOp->Common.DisasmOpcode = ACPI_DASM_CASE; + CurrentOp = AcpiPsGetArg (CurrentOp, 0); + } + + /* If */ + + CurrentOp->Common.DisasmOpcode = ACPI_DASM_CASE; + + /* + * Mark the parse tree for Case disassembly. There are two + * types of Case statements. The first type of statement begins with + * an LEqual. The second starts with an LNot and uses a Match statement + * on a Package of constants. + */ + TempOp = AcpiPsGetArg (CurrentOp, 0); + switch (TempOp->Common.AmlOpcode) + { + case (AML_LEQUAL_OP): + + /* Ignore just the LEqual Op */ + + TempOp->Common.DisasmOpcode = ACPI_DASM_IGNORE_SINGLE; + + /* Ignore the NamePath Op */ + + TempOp = AcpiPsGetArg (TempOp, 0); + TempOp->Common.DisasmFlags = ACPI_PARSEOP_IGNORE; + + /* + * Second arg of LEqual will be the Case predicate. + * Mark it as a predicate and also as a parameter list for paren + * closing and correct indentation. + */ + PredicateOp = TempOp->Common.Next; + PredicateOp->Common.DisasmOpcode = ACPI_DASM_SWITCH_PREDICATE; + PredicateOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST; + + break; + + case (AML_LNOT_OP): + + /* + * The Package will be the predicate of the Case statement. + * It's under: + * LNOT + * LEQUAL + * MATCH + * PACKAGE + */ + + /* Get the LEqual Op from LNot */ + + TempOp = AcpiPsGetArg (TempOp, 0); + + /* Get the Match Op from LEqual */ + + TempOp = AcpiPsGetArg (TempOp, 0); + + /* Get the Package Op from Match */ + + PredicateOp = AcpiPsGetArg (TempOp, 0); + + /* Mark as parameter list for paren closing */ + + PredicateOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST; + + /* + * The Package list would be too deeply indented if we + * chose to simply ignore the all the parent opcodes, so + * we rearrange the parse tree instead. + */ + + /* + * Save the second arg of the If/Else Op which is the + * block code of code for this Case statement. + */ + TempOp = AcpiPsGetArg (CurrentOp, 1); + + /* + * Move the Package Op to the child (predicate) of the + * Case statement. + */ + CurrentOp->Common.Value.Arg = PredicateOp; + PredicateOp->Common.Parent = CurrentOp; + + /* Add the block code */ + + PredicateOp->Common.Next = TempOp; + + break; + + default: + + /* Should never get here */ + + break; + } + + /* Advance to next Case block */ + + CurrentOp = CurrentOp->Common.Next; + } + + /* If CurrentOp is now an Else, then this is a Default block */ + + if (CurrentOp && CurrentOp->Common.AmlOpcode == AML_ELSE_OP) + { + CurrentOp->Common.DisasmOpcode = ACPI_DASM_DEFAULT; + } + + /* + * From the first If advance to the Break op. It's possible to + * have an Else (Default) op here when there is only one Case + * statement, so check for it. + */ + CurrentOp = StoreOp->Common.Next->Common.Next; + if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) + { + CurrentOp = CurrentOp->Common.Next; + } + + /* Ignore the Break Op */ + + CurrentOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + + return (TRUE); +} + +/******************************************************************************* + * + * FUNCTION: AcpiDmIsCaseBlock + * + * PARAMETERS: Op - Object to test + * + * RETURN: TRUE if Object is beginning of a Case block. + * + * DESCRIPTION: Determines if an Object is the beginning of a Case block for a + * Switch/Case statement. Parse tree must be one of the following + * forms: + * + * Else (Optional) + * If + * LEqual + * -NamePath- _T_x + * + * Else (Optional) + * If + * LNot + * LEqual + * Match + * Package + * ByteConst + * -NamePath- _T_x + * + ******************************************************************************/ + +static BOOLEAN +AcpiDmIsCaseBlock ( + ACPI_PARSE_OBJECT *Op) +{ + ACPI_PARSE_OBJECT *CurrentOp; + + if (!Op) + { + return (FALSE); + } + + /* Look for an If or ElseIf */ + + CurrentOp = Op; + if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) + { + CurrentOp = AcpiPsGetArg (CurrentOp, 0); + if (!CurrentOp) + { + return (FALSE); + } + } + + if (!CurrentOp || CurrentOp->Common.AmlOpcode != AML_IF_OP) + { + return (FALSE); + } + + /* Child must be LEqual or LNot */ + + CurrentOp = AcpiPsGetArg (CurrentOp, 0); + if (!CurrentOp) + { + return (FALSE); + } + + switch (CurrentOp->Common.AmlOpcode) + { + case (AML_LEQUAL_OP): + + /* Next child must be NamePath with string _T_ */ + + CurrentOp = AcpiPsGetArg (CurrentOp, 0); + if (!CurrentOp || !CurrentOp->Common.Value.Name || + strncmp(CurrentOp->Common.Value.Name, "_T_", 3)) + { + return (FALSE); + } + + break; + + case (AML_LNOT_OP): + + /* Child of LNot must be LEqual op */ + + CurrentOp = AcpiPsGetArg (CurrentOp, 0); + if (!CurrentOp || (CurrentOp->Common.AmlOpcode != AML_LEQUAL_OP)) + { + return (FALSE); + } + + /* Child of LNot must be Match op */ + + CurrentOp = AcpiPsGetArg (CurrentOp, 0); + if (!CurrentOp || (CurrentOp->Common.AmlOpcode != AML_MATCH_OP)) + { + return (FALSE); + } + + /* First child of Match must be Package op */ + + CurrentOp = AcpiPsGetArg (CurrentOp, 0); + if (!CurrentOp || (CurrentOp->Common.AmlOpcode != AML_PACKAGE_OP)) + { + return (FALSE); + } + + /* Third child of Match must be NamePath with string _T_ */ + + CurrentOp = AcpiPsGetArg (CurrentOp->Common.Parent, 2); + if (!CurrentOp || !CurrentOp->Common.Value.Name || + strncmp(CurrentOp->Common.Value.Name, "_T_", 3)) + { + return (FALSE); + } + + break; + + default: + + return (FALSE); + } + + return (TRUE); +} Modified: head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c Thu Jan 5 21:28:25 2017 (r311462) @@ -455,6 +455,20 @@ AcpiDmDescendingOp ( return (AE_CTRL_DEPTH); } + if (AcpiDmIsTempName(Op)) + { + /* Ignore compiler generated temporary names */ + + return (AE_CTRL_DEPTH); + } + + if (Op->Common.DisasmOpcode == ACPI_DASM_IGNORE_SINGLE) + { + /* Ignore this op, but not it's children */ + + return (AE_OK); + } + if (Op->Common.AmlOpcode == AML_IF_OP) { NextOp = AcpiPsGetDepthNext (NULL, Op); @@ -889,7 +903,8 @@ AcpiDmAscendingOp ( ACPI_PARSE_OBJECT *ParentOp; - if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE) + if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE || + Op->Common.DisasmOpcode == ACPI_DASM_IGNORE_SINGLE) { /* Ignore this op -- it was handled elsewhere */ @@ -1049,9 +1064,12 @@ AcpiDmAscendingOp ( *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 6 00:07:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B530DCA1E93; Fri, 6 Jan 2017 00:07:37 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 738221BDB; Fri, 6 Jan 2017 00:07:37 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0607aqr062505; Fri, 6 Jan 2017 00:07:36 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0607aIt062504; Fri, 6 Jan 2017 00:07:36 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201701060007.v0607aIt062504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Fri, 6 Jan 2017 00:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311463 - head/sys/mips/ingenic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 00:07:37 -0000 Author: kan Date: Fri Jan 6 00:07:36 2017 New Revision: 311463 URL: https://svnweb.freebsd.org/changeset/base/311463 Log: Remove redundant cache initialization in JZ4780 SMP startup code This was done out of pure paranoia when hunting for bugs in cache and is not really required. Modified: head/sys/mips/ingenic/jz4780_mpboot.S Modified: head/sys/mips/ingenic/jz4780_mpboot.S ============================================================================== --- head/sys/mips/ingenic/jz4780_mpboot.S Thu Jan 5 21:28:25 2017 (r311462) +++ head/sys/mips/ingenic/jz4780_mpboot.S Fri Jan 6 00:07:36 2017 (r311463) @@ -27,36 +27,19 @@ */ #include -#include -#include -#include - #include "assym.s" -#define CACHE_SIZE (32 * 1024) -#define CACHE_LINESIZE 32 - .text .set noat .set noreorder .section .text.mpentry_jz4780 .balign 0x10000 +/* + * JZ4870 has stricter alignment requirement for + * CPU entry point. Enforce it in CPU-specific + * file. + */ GLOBAL(jz4780_mpentry) - - /* Initialize caches */ - li t0, MIPS_KSEG0_START - ori t1, t0, CACHE_SIZE - mtc0 zero, MIPS_COP_0_TAG_LO - COP0_SYNC -1: cache CACHEOP_R4K_INDEX_STORE_TAG | CACHE_R4K_I, 0(t0) - cache CACHEOP_R4K_INDEX_STORE_TAG | CACHE_R4K_D, 0(t0) - bne t0, t1, 1b - addiu t0, t0, CACHE_LINESIZE - - /* Set TLB page mask */ - mtc0 zero, MIPS_COP_0_TLB_PG_MASK - COP0_SYNC - j mpentry nop From owner-svn-src-head@freebsd.org Fri Jan 6 00:41:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8992C9FB2D; Fri, 6 Jan 2017 00:41: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 A886B1EDA; Fri, 6 Jan 2017 00:41: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 v060fUrv077974; Fri, 6 Jan 2017 00:41:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v060fUOb077973; Fri, 6 Jan 2017 00:41:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701060041.v060fUOb077973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Jan 2017 00:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311464 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 00:41:31 -0000 Author: jhb Date: Fri Jan 6 00:41:30 2017 New Revision: 311464 URL: https://svnweb.freebsd.org/changeset/base/311464 Log: Add uintmax_t casts to silence printf format warnings. The format strings weren't checked when stacksave_subr() used a function pointer for printf instead of directly using db_printf(). Reported by: kib Sponsored by: DARPA / AFRL Modified: head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Fri Jan 6 00:07:36 2017 (r311463) +++ head/sys/mips/mips/db_trace.c Fri Jan 6 00:41:30 2017 (r311464) @@ -117,7 +117,7 @@ loop: /* Check for bad SP: could foul up next frame. */ if (!MIPS_IS_VALID_KERNELADDR(sp)) { - db_printf("SP 0x%jx: not in kernel\n", sp); + db_printf("SP 0x%jx: not in kernel\n", (uintmax_t)sp); ra = 0; subr = 0; goto done; @@ -162,7 +162,7 @@ loop: /* Check for bad PC. */ if (!MIPS_IS_VALID_KERNELADDR(pc)) { - db_printf("PC 0x%jx: not in kernel\n", pc); + db_printf("PC 0x%jx: not in kernel\n", (uintmax_t)pc); ra = 0; goto done; } From owner-svn-src-head@freebsd.org Fri Jan 6 04:10:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7305ECA0DD9; Fri, 6 Jan 2017 04:10:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42C4E1EE0; Fri, 6 Jan 2017 04:10:34 +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 v064AXUL062126; Fri, 6 Jan 2017 04:10:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v064AX12062125; Fri, 6 Jan 2017 04:10:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701060410.v064AX12062125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 04:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311469 - head/usr.sbin/ypserv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 04:10:34 -0000 Author: ngie Date: Fri Jan 6 04:10:33 2017 New Revision: 311469 URL: https://svnweb.freebsd.org/changeset/base/311469 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into ypserv. MFC after: 2 weeks Modified: head/usr.sbin/ypserv/Makefile Modified: head/usr.sbin/ypserv/Makefile ============================================================================== --- head/usr.sbin/ypserv/Makefile Fri Jan 6 03:55:28 2017 (r311468) +++ head/usr.sbin/ypserv/Makefile Fri Jan 6 04:10:33 2017 (r311469) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + RPCDIR= ${.CURDIR}/../../include/rpcsvc .PATH: ${RPCDIR} \ ${.CURDIR}/common @@ -10,11 +12,14 @@ SRCS= yp_svc.c yp_server.c yp_dblookup.c ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c \ yplib_host.c -CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I. +CFLAGS+= -DDB_CACHE -I. WARNS?= 0 -LIBADD= wrap +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCP_WRAPPER +LIBADD+= wrap +.endif CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h From owner-svn-src-head@freebsd.org Fri Jan 6 04:13:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B72F1CA0FB0; Fri, 6 Jan 2017 04:13:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8701612FF; Fri, 6 Jan 2017 04:13:09 +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 v064D8wG065860; Fri, 6 Jan 2017 04:13:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v064D8QC065859; Fri, 6 Jan 2017 04:13:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701060413.v064D8QC065859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 04:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311470 - head/usr.sbin/rpcbind X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 04:13:09 -0000 Author: ngie Date: Fri Jan 6 04:13:08 2017 New Revision: 311470 URL: https://svnweb.freebsd.org/changeset/base/311470 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into rpcbind. MFC after: 2 weeks Modified: head/usr.sbin/rpcbind/Makefile Modified: head/usr.sbin/rpcbind/Makefile ============================================================================== --- head/usr.sbin/rpcbind/Makefile Fri Jan 6 04:10:33 2017 (r311469) +++ head/usr.sbin/rpcbind/Makefile Fri Jan 6 04:13:08 2017 (r311470) @@ -8,18 +8,21 @@ MAN= rpcbind.8 SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c -CFLAGS+= -DPORTMAP -DLIBWRAP +CFLAGS+= -DPORTMAP .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif WARNS?= 1 -LIBADD= wrap - .include From owner-svn-src-head@freebsd.org Fri Jan 6 04:16:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47890CA1097; Fri, 6 Jan 2017 04:16: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 172101508; Fri, 6 Jan 2017 04:16: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 v064G3S8066004; Fri, 6 Jan 2017 04:16:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v064G3hT066003; Fri, 6 Jan 2017 04:16:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701060416.v064G3hT066003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 04:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311471 - head/usr.sbin/sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 04:16:04 -0000 Author: ngie Date: Fri Jan 6 04:16:03 2017 New Revision: 311471 URL: https://svnweb.freebsd.org/changeset/base/311471 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into sendmail. MFC after: 2 weeks Modified: head/usr.sbin/sendmail/Makefile Modified: head/usr.sbin/sendmail/Makefile ============================================================================== --- head/usr.sbin/sendmail/Makefile Fri Jan 6 04:13:08 2017 (r311470) +++ head/usr.sbin/sendmail/Makefile Fri Jan 6 04:16:03 2017 (r311471) @@ -38,7 +38,7 @@ NIS= -DNIS MAPS= -DMAP_REGEX -DDNSMAP CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I. -CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} +CFLAGS+= ${DBMDEF} ${NIS} ${MAPS} .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DNETINET6 @@ -46,7 +46,7 @@ CFLAGS+= -DNETINET6 WARNS?= 0 -LIBADD= util wrap sm smutil +LIBADD= util sm smutil SRCS+= sm_os.h CLEANFILES+=sm_os.h @@ -57,6 +57,11 @@ CFLAGS+= -DSTARTTLS -D_FFR_TLS_1 LIBADD+= ssl crypto .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCPWRAPPERS +LIBADD+= wrap +.endif + # User customizations to the sendmail build environment CFLAGS+=${SENDMAIL_CFLAGS} DPADD+=${SENDMAIL_DPADD} From owner-svn-src-head@freebsd.org Fri Jan 6 04:22:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17236CA149F; Fri, 6 Jan 2017 04:22: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 DAD381AE9; Fri, 6 Jan 2017 04:22:26 +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 v064MQMk069963; Fri, 6 Jan 2017 04:22:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v064MPt8069961; Fri, 6 Jan 2017 04:22:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701060422.v064MPt8069961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 04:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311472 - in head/usr.sbin/amd: amd include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 04:22:27 -0000 Author: ngie Date: Fri Jan 6 04:22:25 2017 New Revision: 311472 URL: https://svnweb.freebsd.org/changeset/base/311472 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into amd(8). MFC after: 2 weeks Modified: head/usr.sbin/amd/amd/Makefile head/usr.sbin/amd/include/config.h Modified: head/usr.sbin/amd/amd/Makefile ============================================================================== --- head/usr.sbin/amd/amd/Makefile Fri Jan 6 04:16:03 2017 (r311471) +++ head/usr.sbin/amd/amd/Makefile Fri Jan 6 04:22:25 2017 (r311472) @@ -30,7 +30,7 @@ CFLAGS+= -I${SRCTOP}/contrib/amd/amd \ -I${SRCTOP}/contrib/amd/include \ -I${.OBJDIR}/../../../include/rpcsvc -LIBADD= amu wrap +LIBADD= amu SRCS+= conf_parse.c conf_parse.h conf_tok.c SRCS+= sun_map_parse.c sun_map_parse.h sun_map_tok.c @@ -73,4 +73,9 @@ CFLAGS+= -DHAVE_MAP_HESIOD SRCS+= info_nis.c .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DHAVE_LIBWRAP -DHAVE_TCPD_H +LIBADD+= wrap +.endif + .include Modified: head/usr.sbin/amd/include/config.h ============================================================================== --- head/usr.sbin/amd/include/config.h Fri Jan 6 04:16:03 2017 (r311471) +++ head/usr.sbin/amd/include/config.h Fri Jan 6 04:22:25 2017 (r311472) @@ -530,7 +530,7 @@ /* #undef HAVE_LIBRT */ /* does libwrap exist? */ -#define HAVE_LIBWRAP 1 +/* #undef HAVE_LIBWRAP */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -1207,7 +1207,7 @@ #define HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_TCPD_H 1 +/* #undef HAVE_TCPD_H */ /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 From owner-svn-src-head@freebsd.org Fri Jan 6 04:27:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9E58CA153B; Fri, 6 Jan 2017 04:27:08 +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 567341CC9; Fri, 6 Jan 2017 04:27:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v064R7T4070157; Fri, 6 Jan 2017 04:27:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v064R7N6070155; Fri, 6 Jan 2017 04:27:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701060427.v064R7N6070155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 04:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311473 - head/libexec/tftpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 04:27:08 -0000 Author: ngie Date: Fri Jan 6 04:27:07 2017 New Revision: 311473 URL: https://svnweb.freebsd.org/changeset/base/311473 Log: Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard This will allow the code to stand by itself without libwrap MFC after: 2 weeks Modified: head/libexec/tftpd/Makefile head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/Makefile ============================================================================== --- head/libexec/tftpd/Makefile Fri Jan 6 04:22:25 2017 (r311472) +++ head/libexec/tftpd/Makefile Fri Jan 6 04:27:07 2017 (r311473) @@ -1,12 +1,17 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ +.include + PROG= tftpd MAN= tftpd.8 SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c SRCS+= tftpd.c WFORMAT=0 +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP LIBADD= wrap +.endif .include Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Fri Jan 6 04:22:25 2017 (r311472) +++ head/libexec/tftpd/tftpd.c Fri Jan 6 04:27:07 2017 (r311473) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "tftp-file.h" @@ -75,6 +74,10 @@ __FBSDID("$FreeBSD$"); #include "tftp-transfer.h" #include "tftp-options.h" +#ifdef LIBWRAP +#include +#endif + static void tftp_wrq(int peer, char *, ssize_t); static void tftp_rrq(int peer, char *, ssize_t); @@ -281,6 +284,7 @@ main(int argc, char *argv[]) } } +#ifdef LIBWRAP /* * See if the client is allowed to talk to me. * (This needs to be done before the chroot()) @@ -329,6 +333,7 @@ main(int argc, char *argv[]) "Full access allowed" "in /etc/hosts.allow"); } +#endif /* * Since we exit here, we should do that only after the above From owner-svn-src-head@freebsd.org Fri Jan 6 04:38:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C48F5CA1772; Fri, 6 Jan 2017 04:38:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 869341152; Fri, 6 Jan 2017 04:38:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v064ccSB074278; Fri, 6 Jan 2017 04:38:38 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v064cch7074277; Fri, 6 Jan 2017 04:38:38 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701060438.v064cch7074277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 6 Jan 2017 04:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311474 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 04:38:39 -0000 Author: glebius Date: Fri Jan 6 04:38:38 2017 New Revision: 311474 URL: https://svnweb.freebsd.org/changeset/base/311474 Log: Use getsock_cap() instead of fgetsock(). Reviewed by: dchagin Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Fri Jan 6 04:27:07 2017 (r311473) +++ head/sys/compat/linux/linux_socket.c Fri Jan 6 04:38:38 2017 (r311474) @@ -775,6 +775,7 @@ linux_connect(struct thread *td, struct cap_rights_t rights; struct socket *so; struct sockaddr *sa; + struct file *fp; u_int fflag; int error; @@ -792,24 +793,23 @@ linux_connect(struct thread *td, struct * Linux doesn't return EISCONN the first time it occurs, * when on a non-blocking socket. Instead it returns the * error getsockopt(SOL_SOCKET, SO_ERROR) would return on BSD. - * - * XXXRW: Instead of using fgetsock(), check that it is a - * socket and use the file descriptor reference instead of - * creating a new one. */ - error = fgetsock(td, args->s, cap_rights_init(&rights, CAP_CONNECT), - &so, &fflag); - if (error == 0) { - error = EISCONN; - if (fflag & FNONBLOCK) { - SOCK_LOCK(so); - if (so->so_emuldata == 0) - error = so->so_error; - so->so_emuldata = (void *)1; - SOCK_UNLOCK(so); - } - fputsock(so); + error = getsock_cap(td, args->s, cap_rights_init(&rights, CAP_CONNECT), + &fp, &fflag, NULL); + if (error != 0) + return (error); + + error = EISCONN; + so = fp->f_data; + if (fflag & FNONBLOCK) { + SOCK_LOCK(so); + if (so->so_emuldata == 0) + error = so->so_error; + so->so_emuldata = (void *)1; + SOCK_UNLOCK(so); } + fdrop(fp, td); + return (error); } From owner-svn-src-head@freebsd.org Fri Jan 6 05:10:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB233CA1F9C; Fri, 6 Jan 2017 05:10:50 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F5721D6B; Fri, 6 Jan 2017 05:10:50 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v065AnJM086347; Fri, 6 Jan 2017 05:10:49 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v065AnNE086346; Fri, 6 Jan 2017 05:10:49 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201701060510.v065AnNE086346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 6 Jan 2017 05:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311475 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 05:10:51 -0000 Author: sephe Date: Fri Jan 6 05:10:49 2017 New Revision: 311475 URL: https://svnweb.freebsd.org/changeset/base/311475 Log: if: Defer the if_up until the ifnet.if_ioctl is called. This ensures the interface is initialized by the interface driver before it can be used by the rest of the system. Reviewed by: jhb, karels, gnn MFC after: 3 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8905 Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Fri Jan 6 04:38:38 2017 (r311474) +++ head/sys/net/if.c Fri Jan 6 05:10:49 2017 (r311475) @@ -2300,7 +2300,7 @@ static int ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) { struct ifreq *ifr; - int error = 0; + int error = 0, do_ifup = 0; int new_flags, temp_flags; size_t namelen, onamelen; size_t descrlen; @@ -2427,7 +2427,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if_down(ifp); } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { - if_up(ifp); + do_ifup = 1; } /* See if permanently promiscuous mode bit is about to flip */ if ((ifp->if_flags ^ new_flags) & IFF_PPROMISC) { @@ -2446,6 +2446,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if (ifp->if_ioctl) { (void) (*ifp->if_ioctl)(ifp, cmd, data); } + if (do_ifup) + if_up(ifp); getmicrotime(&ifp->if_lastchange); break; From owner-svn-src-head@freebsd.org Fri Jan 6 07:54:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2372CA1E19; Fri, 6 Jan 2017 07:54:54 +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 829BD1AA1; Fri, 6 Jan 2017 07:54:54 +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 v067srH8055481; Fri, 6 Jan 2017 07:54:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v067srwL055479; Fri, 6 Jan 2017 07:54:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701060754.v067srwL055479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 6 Jan 2017 07:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311504 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblzma/common contrib/xz/src/liblzma/delta contrib/xz/sr... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 07:54:55 -0000 Author: delphij Date: Fri Jan 6 07:54:53 2017 New Revision: 311504 URL: https://svnweb.freebsd.org/changeset/base/311504 Log: MFV r311477: xz 5.2.3. MFC after: 2 weeks Modified: head/contrib/xz/ChangeLog head/contrib/xz/THANKS head/contrib/xz/src/common/tuklib_cpucores.c head/contrib/xz/src/common/tuklib_physmem.c head/contrib/xz/src/liblzma/api/lzma/version.h head/contrib/xz/src/liblzma/check/check.h head/contrib/xz/src/liblzma/common/alone_decoder.c head/contrib/xz/src/liblzma/common/alone_encoder.c head/contrib/xz/src/liblzma/common/auto_decoder.c head/contrib/xz/src/liblzma/common/block_decoder.c head/contrib/xz/src/liblzma/common/block_encoder.c head/contrib/xz/src/liblzma/common/common.h head/contrib/xz/src/liblzma/common/index.c head/contrib/xz/src/liblzma/common/index_decoder.c head/contrib/xz/src/liblzma/common/index_encoder.c head/contrib/xz/src/liblzma/common/stream_decoder.c head/contrib/xz/src/liblzma/common/stream_encoder.c head/contrib/xz/src/liblzma/common/stream_encoder_mt.c head/contrib/xz/src/liblzma/delta/delta_common.c head/contrib/xz/src/liblzma/delta/delta_decoder.c head/contrib/xz/src/liblzma/delta/delta_encoder.c head/contrib/xz/src/liblzma/delta/delta_private.h head/contrib/xz/src/liblzma/lz/lz_decoder.c head/contrib/xz/src/liblzma/lz/lz_decoder.h head/contrib/xz/src/liblzma/lz/lz_encoder.c head/contrib/xz/src/liblzma/lz/lz_encoder.h head/contrib/xz/src/liblzma/lzma/lzma2_decoder.c head/contrib/xz/src/liblzma/lzma/lzma2_encoder.c head/contrib/xz/src/liblzma/lzma/lzma_decoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder.h head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_presets.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_private.h head/contrib/xz/src/liblzma/simple/arm.c head/contrib/xz/src/liblzma/simple/armthumb.c head/contrib/xz/src/liblzma/simple/ia64.c head/contrib/xz/src/liblzma/simple/powerpc.c head/contrib/xz/src/liblzma/simple/simple_coder.c head/contrib/xz/src/liblzma/simple/simple_private.h head/contrib/xz/src/liblzma/simple/sparc.c head/contrib/xz/src/liblzma/simple/x86.c head/contrib/xz/src/xz/args.c head/contrib/xz/src/xz/coder.c head/contrib/xz/src/xz/file_io.c head/contrib/xz/src/xz/file_io.h head/contrib/xz/src/xz/main.c head/contrib/xz/src/xz/private.h head/lib/liblzma/config.h Directory Properties: head/contrib/xz/ (props changed) Modified: head/contrib/xz/ChangeLog ============================================================================== --- head/contrib/xz/ChangeLog Fri Jan 6 07:54:13 2017 (r311503) +++ head/contrib/xz/ChangeLog Fri Jan 6 07:54:53 2017 (r311504) @@ -1,3 +1,563 @@ +commit 3d566cd519017eee1a400e7961ff14058dfaf33c +Author: Lasse Collin +Date: 2016-12-30 13:26:36 +0200 + + Bump version and soname for 5.2.3. + + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 053e624fe33795e779ff736f16ce44a129c829b5 +Author: Lasse Collin +Date: 2016-12-30 13:25:10 +0200 + + Update NEWS for 5.2.3. + + NEWS | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +commit cae412b2b77d7fd88d187ed7659331709311f80d +Author: Lasse Collin +Date: 2015-04-01 14:45:25 +0300 + + xz: Fix the Capsicum rights on user_abort_pipe. + + src/xz/file_io.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 9ccbae41000572193b9a09e7102f9e84dc6d96de +Author: Lasse Collin +Date: 2016-12-28 21:05:22 +0200 + + Mention potential sandboxing bugs in INSTALL. + + INSTALL | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit e013a337d3de77cce24360dffe956ea2339489b6 +Author: Lasse Collin +Date: 2016-11-21 20:24:50 +0200 + + liblzma: Avoid multiple definitions of lzma_coder structures. + + Only one definition was visible in a translation unit. + It avoided a few casts and temp variables but seems that + this hack doesn't work with link-time optimizations in compilers + as it's not C99/C11 compliant. + + Fixes: + http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html + + src/liblzma/common/alone_decoder.c | 44 +++++---- + src/liblzma/common/alone_encoder.c | 34 ++++--- + src/liblzma/common/auto_decoder.c | 35 ++++--- + src/liblzma/common/block_decoder.c | 41 ++++---- + src/liblzma/common/block_encoder.c | 40 ++++---- + src/liblzma/common/common.h | 18 ++-- + src/liblzma/common/index_decoder.c | 33 ++++--- + src/liblzma/common/index_encoder.c | 16 ++-- + src/liblzma/common/stream_decoder.c | 50 +++++----- + src/liblzma/common/stream_encoder.c | 56 ++++++----- + src/liblzma/common/stream_encoder_mt.c | 124 ++++++++++++++----------- + src/liblzma/delta/delta_common.c | 25 ++--- + src/liblzma/delta/delta_decoder.c | 6 +- + src/liblzma/delta/delta_encoder.c | 12 ++- + src/liblzma/delta/delta_private.h | 4 +- + src/liblzma/lz/lz_decoder.c | 60 ++++++------ + src/liblzma/lz/lz_decoder.h | 13 ++- + src/liblzma/lz/lz_encoder.c | 57 +++++++----- + src/liblzma/lz/lz_encoder.h | 9 +- + src/liblzma/lzma/lzma2_decoder.c | 32 ++++--- + src/liblzma/lzma/lzma2_encoder.c | 51 +++++----- + src/liblzma/lzma/lzma_decoder.c | 27 +++--- + src/liblzma/lzma/lzma_encoder.c | 29 +++--- + src/liblzma/lzma/lzma_encoder.h | 9 +- + src/liblzma/lzma/lzma_encoder_optimum_fast.c | 3 +- + src/liblzma/lzma/lzma_encoder_optimum_normal.c | 23 ++--- + src/liblzma/lzma/lzma_encoder_private.h | 6 +- + src/liblzma/simple/arm.c | 2 +- + src/liblzma/simple/armthumb.c | 2 +- + src/liblzma/simple/ia64.c | 2 +- + src/liblzma/simple/powerpc.c | 2 +- + src/liblzma/simple/simple_coder.c | 61 ++++++------ + src/liblzma/simple/simple_private.h | 12 +-- + src/liblzma/simple/sparc.c | 2 +- + src/liblzma/simple/x86.c | 15 +-- + 35 files changed, 532 insertions(+), 423 deletions(-) + +commit 8e0f1af3dcaec00a3879cce8ad7441edc6359d1c +Author: Lasse Collin +Date: 2016-12-26 20:50:25 +0200 + + Document --enable-sandbox configure option in INSTALL. + + INSTALL | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +commit ce2542d220de06acd618fd9f5c0a6683029fb4eb +Author: Lasse Collin +Date: 2015-03-31 22:19:34 +0300 + + xz: Add support for sandboxing with Capsicum (disabled by default). + + In the v5.2 branch this feature is considered experimental + and thus disabled by default. + + The sandboxing is used conditionally as described in main.c. + This isn't optimal but it was much easier to implement than + a full sandboxing solution and it still covers the most common + use cases where xz is writing to standard output. This should + have practically no effect on performance even with small files + as fork() isn't needed. + + C and locale libraries can open files as needed. This has been + fine in the past, but it's a problem with things like Capsicum. + io_sandbox_enter() tries to ensure that various locale-related + files have been loaded before cap_enter() is called, but it's + possible that there are other similar problems which haven't + been seen yet. + + Currently Capsicum is available on FreeBSD 10 and later + and there is a port to Linux too. + + Thanks to Loganaden Velvindron for help. + + configure.ac | 41 +++++++++++++++++++++++++++ + src/xz/Makefile.am | 2 +- + src/xz/file_io.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/xz/file_io.h | 6 ++++ + src/xz/main.c | 18 ++++++++++++ + src/xz/private.h | 4 +++ + 6 files changed, 151 insertions(+), 1 deletion(-) + +commit 3ca1d5e6320111043e19434da881065fadafa0e4 +Author: Lasse Collin +Date: 2015-03-31 21:12:30 +0300 + + Fix bugs and otherwise improve ax_check_capsicum.m4. + + AU_ALIAS was removed because the new version is incompatible + with the old version. + + It no longer checks for separately. + It's enough to test for it as part of AC_CHECK_DECL. + The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and + HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded. + HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough. + + It no longer does a useless search for the Capsicum library + if the header wasn't found. + + Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying + the argument omitted the default action but the given action + wasn't used instead. + + AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum + support is found. Previously it was part of the default + ACTION-IF-FOUND which a custom action would override. Now + the default action only prepends ${CAPSICUM_LIB} to LIBS. + + The documentation was updated. + + Since there as no serial number, "#serial 2" was added. + + m4/ax_check_capsicum.m4 | 103 ++++++++++++++++++++++++------------------------ + 1 file changed, 51 insertions(+), 52 deletions(-) + +commit 5f3a742b64197fe8bedb6f05fc6ce5d177d11145 +Author: Lasse Collin +Date: 2015-03-31 19:20:24 +0300 + + Add m4/ax_check_capsicum.m4 for detecting Capsicum support. + + The file was loaded from this web page: + https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4 + + Thanks to Loganaden Velvindron for pointing it out for me. + + m4/ax_check_capsicum.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 86 insertions(+) + +commit d74377e62b4c649e40294dd441de72c0f092e67c +Author: Lasse Collin +Date: 2015-10-12 20:29:09 +0300 + + liblzma: Fix a memory leak in error path of lzma_index_dup(). + + lzma_index_dup() calls index_dup_stream() which, in case of + an error, calls index_stream_end() to free memory allocated + by index_stream_init(). However, it illogically didn't + actually free the memory. To make it logical, the tree + handling code was modified a bit in addition to changing + index_stream_end(). + + Thanks to Evan Nemerson for the bug report. + + src/liblzma/common/index.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +commit f580732216dcf971f3f006fe8e01cd4979e1d964 +Author: Lasse Collin +Date: 2016-10-24 18:53:25 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 88d7a7fd153bf1355cdf798ffdac7443d0169afc +Author: Lasse Collin +Date: 2016-10-24 18:51:36 +0300 + + tuklib_cpucores: Add support for sched_getaffinity(). + + It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better + than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity() + gives the number of cores available to the process instead of + the total number of cores online. + + As a side effect, this commit fixes a bug on GNU/kFreeBSD where + configure would detect the FreeBSD-specific cpuset_getaffinity() + but it wouldn't actually work because on GNU/kFreeBSD it requires + using -lfreebsd-glue when linking. Now the glibc-specific function + will be used instead. + + Thanks to Sebastian Andrzej Siewior for the original patch + and testing. + + m4/tuklib_cpucores.m4 | 30 +++++++++++++++++++++++++++++- + src/common/tuklib_cpucores.c | 9 +++++++++ + 2 files changed, 38 insertions(+), 1 deletion(-) + +commit 51baf684376903dbeddd840582bfdf9fa91b311b +Author: Lasse Collin +Date: 2016-06-30 20:27:36 +0300 + + xz: Fix copying of timestamps on Windows. + + xz used to call utime() on Windows, but its result gets lost + on close(). Using _futime() seems to work. + + Thanks to Martok for reporting the bug: + http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html + + configure.ac | 2 +- + src/xz/file_io.c | 18 ++++++++++++++++++ + 2 files changed, 19 insertions(+), 1 deletion(-) + +commit 1ddc479851139d6e8202e5835421bfe6578d9e07 +Author: Lasse Collin +Date: 2016-06-16 22:46:02 +0300 + + xz: Silence warnings from -Wlogical-op. + + Thanks to Evan Nemerson. + + src/xz/file_io.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit be647ff5ed5a1c244a65722af6ce250259f3b14a +Author: Lasse Collin +Date: 2016-04-10 20:55:49 +0300 + + Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am. + + Thanks to Christian Kujau. + + src/xz/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit fb6d50c15343831f35305982cefa82053099191d +Author: Lasse Collin +Date: 2016-04-10 20:54:17 +0300 + + Build: Bump GNU Gettext version requirement to 0.19. + + It silences a few warnings and most people probably have + 0.19 even on stable distributions. + + Thanks to Christian Kujau. + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 74f8dad9f912a2993768d93d108ea2b0b2c196e0 +Author: Lasse Collin +Date: 2016-03-13 20:21:49 +0200 + + liblzma: Disable external SHA-256 by default. + + This is the sane thing to do. The conflict with OpenSSL + on some OSes and especially that the OS-provided versions + can be significantly slower makes it clear that it was + a mistake to have the external SHA-256 support enabled by + default. + + Those who want it can now pass --enable-external-sha256 to + configure. INSTALL was updated with notes about OSes where + this can be a bad idea. + + The SHA-256 detection code in configure.ac had some bugs that + could lead to a build failure in some situations. These were + fixed, although it doesn't matter that much now that the + external SHA-256 is disabled by default. + + MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init + in libc instead of libutil. Support for the libutil version + was removed. + + INSTALL | 36 ++++++++++++++++++++++ + configure.ac | 76 +++++++++++++++++++++++------------------------ + src/liblzma/check/check.h | 16 ++++------ + 3 files changed, 79 insertions(+), 49 deletions(-) + +commit ea7f6ff04cb5bb1498088eb09960a4c3f13dfe39 +Author: Lasse Collin +Date: 2016-03-10 20:27:05 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit d0e018016b311232e82d9a98dc68f1e3dabce794 +Author: Lasse Collin +Date: 2016-03-10 20:26:49 +0200 + + Build: Avoid SHA256_Init on FreeBSD and MINIX 3. + + On FreeBSD 10 and older, SHA256_Init from libmd conflicts + with libcrypto from OpenSSL. The OpenSSL version has + different sizeof(SHA256_CTX) and it can cause weird + problems if wrong SHA256_Init gets used. + + Looking at the source, MINIX 3 seems to have a similar issue but + I'm not sure. To be safe, I disabled SHA256_Init on MINIX 3 too. + + NetBSD has SHA256_Init in libc and they had a similar problem, + but they already fixed it in 2009. + + Thanks to Jim Wilcoxson for the bug report that helped + in finding the problem. + + configure.ac | 27 +++++++++++++++++++++------ + 1 file changed, 21 insertions(+), 6 deletions(-) + +commit 5daae123915f32a4ed6dc948b831533c2d1beec3 +Author: Lasse Collin +Date: 2015-11-08 20:16:10 +0200 + + tuklib_physmem: Hopefully silence a warning on Windows. + + src/common/tuklib_physmem.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 491acc406e098167ccb7fce0728b94c2f32cff9f +Author: Lasse Collin +Date: 2015-11-04 23:17:43 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 8173ff8790ad3502d04e1c07d014cb84a3b8187b +Author: Lasse Collin +Date: 2015-11-04 23:14:00 +0200 + + liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma. + + When optimizing, GCC can reorder code so that an uninitialized + value gets used in a comparison, which makes Valgrind unhappy. + It doesn't happen when compiled with -O0, which I tend to use + when running Valgrind. + + Thanks to Rich Prohaska. I remember this being mentioned long + ago by someone else but nothing was done back then. + + src/liblzma/lz/lz_encoder.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 013de2b5ab8094d2c82a2771f3d143eeb656eda9 +Author: Lasse Collin +Date: 2015-11-03 20:55:45 +0200 + + liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c. + + It would be too annoying to update other build systems + just because of this. + + src/liblzma/lzma/Makefile.inc | 2 +- + src/liblzma/lzma/{lzma_presets.c => lzma_encoder_presets.c} | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit a322f70ad96de88968c2c36e6a36bc08ae30bd20 +Author: Lasse Collin +Date: 2015-11-03 20:47:07 +0200 + + Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built. + + They all need decoder support and if that isn't available, + there's no point trying to build them. + + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +commit 8ea49606cf6427e32319de7693eca9e43f1c8ad6 +Author: Lasse Collin +Date: 2015-11-03 20:35:19 +0200 + + Build: Simplify $enable_{encoders,decoders} usage a bit. + + configure.ac | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 42131a25e52bfe400acfa7df93469a96bb78bb78 +Author: Lasse Collin +Date: 2015-11-03 20:31:31 +0200 + + Windows/MSVC: Update config.h. + + windows/config.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit e9184e87cc989d14c7413e6adb3eca98f6ae0290 +Author: Lasse Collin +Date: 2015-11-03 20:29:58 +0200 + + DOS: Update config.h. + + dos/config.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 2296778f3c9a1e3a8699973b09dd3610b8baa402 +Author: Lasse Collin +Date: 2015-11-03 20:29:33 +0200 + + xz: Make xz buildable even when encoders or decoders are disabled. + + The patch is quite long but it's mostly about adding new #ifdefs + to omit code when encoders or decoders have been disabled. + + This adds two new #defines to config.h: HAVE_ENCODERS and + HAVE_DECODERS. + + configure.ac | 4 ++++ + src/xz/Makefile.am | 8 ++++++-- + src/xz/args.c | 16 ++++++++++++++++ + src/xz/coder.c | 33 +++++++++++++++++++++++++-------- + src/xz/main.c | 9 +++++++-- + src/xz/private.h | 5 ++++- + 6 files changed, 62 insertions(+), 13 deletions(-) + +commit 97a3109281e475d9cf1b5095237d672fa0ad25e5 +Author: Lasse Collin +Date: 2015-11-03 18:06:40 +0200 + + Build: Build LZMA1/2 presets also when only decoder is wanted. + + People shouldn't rely on the presets when decoding raw streams, + but xz uses the presets as the starting point for raw decoder + options anyway. + + lzma_encocder_presets.c was renamed to lzma_presets.c to + make it clear it's not used solely by the encoder code. + + src/liblzma/lzma/Makefile.inc | 6 +++++- + src/liblzma/lzma/{lzma_encoder_presets.c => lzma_presets.c} | 3 ++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +commit dc6b78d7f0f6fe43e9d4215146e8581feb8090e7 +Author: Lasse Collin +Date: 2015-11-03 17:54:48 +0200 + + Build: Fix configure to handle LZMA1 dependency with LZMA2. + + Now it gives an error if LZMA1 encoder/decoder is missing + when LZMA2 encoder/decoder was requested. Even better would + be LZMA2 implicitly enabling LZMA1 but it would need more code. + + configure.ac | 5 ----- + 1 file changed, 5 deletions(-) + +commit 46d76c9cd3cb26a31f5ae6c3a8bbcf38e6da1add +Author: Lasse Collin +Date: 2015-11-03 17:41:54 +0200 + + Build: Don't omit lzma_cputhreads() unless using --disable-threads. + + Previously it was omitted if encoders were disabled + with --disable-encoders. It didn't make sense and + it also broke the build. + + src/liblzma/common/Makefile.inc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 16d68f874d89f1e4a1919786a35bbaef7d71a077 +Author: Lasse Collin +Date: 2015-11-02 18:16:51 +0200 + + liblzma: Fix a build failure related to external SHA-256 support. + + If an appropriate header and structure were found by configure, + but a library with a usable SHA-256 functions wasn't, the build + failed. + + src/liblzma/check/check.h | 32 +++++++++++++++++++++++--------- + 1 file changed, 23 insertions(+), 9 deletions(-) + +commit d9311647fc1ab512a3394596221ab8039c00af6b +Author: Lasse Collin +Date: 2015-11-02 15:19:10 +0200 + + xz: Always close the file before trying to delete it. + + unlink() can return EBUSY in errno for open files on some + operating systems and file systems. + + src/xz/file_io.c | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) + +commit f59c4183f3c9066626ce45dc3db4642fa603fa21 +Author: Lasse Collin +Date: 2015-10-12 21:08:42 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 35f189673e280c12e4c5129f9f97e54eef3bbc04 +Author: Lasse Collin +Date: 2015-10-12 21:07:41 +0300 + + Tests: Add tests for the two bugs fixed in index.c. + + tests/test_index.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +commit e10bfdb0fcaff12f3a6dadee51e0a022aadccb51 +Author: Lasse Collin +Date: 2015-10-12 20:45:15 +0300 + + liblzma: Fix lzma_index_dup() for empty Streams. + + Stream Flags and Stream Padding weren't copied from + empty Streams. + + src/liblzma/common/index.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +commit 06f434bd8980f25ca23232eb7bb7df7e37dc8448 +Author: Lasse Collin +Date: 2015-10-12 20:31:44 +0300 + + liblzma: Add a note to index.c for those using static analyzers. + + src/liblzma/common/index.c | 3 +++ + 1 file changed, 3 insertions(+) + commit 9815cdf6987ef91a85493bfcfd1ce2aaf3b47a0a Author: Lasse Collin Date: 2015-09-29 13:59:35 +0300 @@ -129,11 +689,10 @@ Date: 2015-06-19 20:21:30 +0300 Windows: Update the docs. - INSTALL | 29 ++++++---- - windows/INSTALL-MSVC.txt | 47 +++++++++++++++ - windows/INSTALL-MinGW.txt | 138 ++++++++++++++++++++++++++++++++++++++++++++ - windows/INSTALL-Windows.txt | 138 -------------------------------------------- - 4 files changed, 204 insertions(+), 148 deletions(-) + INSTALL | 29 ++++++++----- + windows/INSTALL-MSVC.txt | 47 ++++++++++++++++++++++ + windows/{INSTALL-Windows.txt => INSTALL-MinGW.txt} | 2 +- + 3 files changed, 67 insertions(+), 11 deletions(-) commit 28195e4c877007cc760ecea1d17f740693d66873 Author: Lasse Collin @@ -1587,11 +2146,10 @@ Date: 2014-05-04 11:07:17 +0300 It can be confusing that two header files have the same name. The public API file is still lzma.h. - src/liblzma/api/Makefile.am | 2 +- - src/liblzma/api/lzma.h | 2 +- - src/liblzma/api/lzma/lzma.h | 420 ------------------------------------------ - src/liblzma/api/lzma/lzma12.h | 420 ++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 422 insertions(+), 422 deletions(-) + src/liblzma/api/Makefile.am | 2 +- + src/liblzma/api/lzma.h | 2 +- + src/liblzma/api/lzma/{lzma.h => lzma12.h} | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) commit 1555a9c5664afc7893a2b75e9970105437f01ef1 Author: Lasse Collin @@ -2650,20 +3208,20 @@ Date: 2012-11-19 00:10:10 -0800 with “|-â€. That worked well for a while, but the version string from ‘less’ versions 448 (June, 2012) is misparsed, producing a warning: - $ xzless /tmp/test.xz; echo $? - /usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \ - integer expression expected - 0 + $ xzless /tmp/test.xz; echo $? + /usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \ + integer expression expected + 0 More precisely, modern ‘less’ lists the regexp implementation along with its version number, and xzless passes the entire version number with attached parenthetical phrase as a number to "test $a -gt $b", producing the above confusing message. - $ less-444 -V | head -1 - less 444 - $ less -V | head -1 - less 456 (no regular expressions) + $ less-444 -V | head -1 + less 444 + $ less -V | head -1 + less 456 (no regular expressions) So relax the pattern matched --- instead of expecting "less ", look for a line of the form "less [ (extra parenthetical)]". @@ -3058,11 +3616,9 @@ Date: 2012-06-14 10:33:27 +0300 copied the decompressor bug from xz_pipe_decomp.c he has an example how to easily fix it. - doc/examples/xz_pipe_comp.c | 127 -------------------------------------- - doc/examples/xz_pipe_decomp.c | 123 ------------------------------------ - doc/examples_old/xz_pipe_comp.c | 127 ++++++++++++++++++++++++++++++++++++++ - doc/examples_old/xz_pipe_decomp.c | 123 ++++++++++++++++++++++++++++++++++++ - 4 files changed, 250 insertions(+), 250 deletions(-) + doc/{examples => examples_old}/xz_pipe_comp.c | 0 + doc/{examples => examples_old}/xz_pipe_decomp.c | 0 + 2 files changed, 0 insertions(+), 0 deletions(-) commit 905f0ab5b5ce544d4b68a2ed6077df0f3d021292 Author: Lasse Collin @@ -4159,10 +4715,9 @@ Date: 2011-04-10 14:58:10 +0300 DOS: Update the docs and include notes about 8.3 filenames. - dos/INSTALL.txt | 79 ++++++++++++++++++++++++++++++++++++ - dos/README | 88 ---------------------------------------- - dos/README.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 202 insertions(+), 88 deletions(-) + dos/{README => INSTALL.txt} | 13 +---- + dos/README.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 125 insertions(+), 11 deletions(-) commit ebd54dbd6e481d31e80757f900ac8109ad1423c6 Author: Lasse Collin @@ -4279,10 +4834,9 @@ Date: 2011-04-05 17:12:20 +0300 It was renamed to ax_pthread.m4 in Autoconf Archive. - configure.ac | 2 +- - m4/acx_pthread.m4 | 279 ----------------------------------------------------- - m4/ax_pthread.m4 | 283 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 284 insertions(+), 280 deletions(-) + configure.ac | 2 +- + m4/{acx_pthread.m4 => ax_pthread.m4} | 170 ++++++++++++++++++----------------- + 2 files changed, 88 insertions(+), 84 deletions(-) commit 1039bfcfc098b69d56ecb39d198a092552eacf6d Author: Lasse Collin @@ -4664,10 +5218,10 @@ Date: 2010-11-12 15:22:13 -0600 Builds from a separate build directory with - mkdir build - cd build - ../configure - doxygen Doxyfile + mkdir build + cd build + ../configure + doxygen Doxyfile include an even longer prefix /home/someone/src/xz/src; this patch has the nice side-effect of eliminating that prefix, too. @@ -5232,12 +5786,11 @@ Date: 2010-09-28 10:59:53 +0300 Move version.sh to build-aux. - Makefile.am | 4 ++-- - build-aux/version.sh | 24 ++++++++++++++++++++++++ - configure.ac | 2 +- - version.sh | 24 ------------------------ - windows/build.bash | 2 +- - 5 files changed, 28 insertions(+), 28 deletions(-) + Makefile.am | 4 ++-- + version.sh => build-aux/version.sh | 0 + configure.ac | 2 +- + windows/build.bash | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) commit 84af9d8770451339a692e9b70f96cf56156a6069 Author: Lasse Collin @@ -5739,11 +6292,10 @@ Date: 2010-07-27 20:45:03 +0300 Windows: build.sh is a bash script so name it correctly. - INSTALL | 2 +- - windows/INSTALL-Windows.txt | 6 +- - windows/build.bash | 189 ++++++++++++++++++++++++++++++++++++++++++++ - windows/build.sh | 189 -------------------------------------------- - 4 files changed, 193 insertions(+), 193 deletions(-) + INSTALL | 2 +- + windows/INSTALL-Windows.txt | 6 +++--- + windows/{build.sh => build.bash} | 6 +++--- + 3 files changed, 7 insertions(+), 7 deletions(-) commit b1cbfd40f049a646a639eb78a3e41e9e3ef73339 Author: Lasse Collin @@ -7597,48 +8149,44 @@ Date: 2009-09-19 09:47:30 +0300 building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the original patch. - THANKS | 1 + - configure.ac | 12 ++-- - m4/lc_cpucores.m4 | 57 ---------------- - m4/lc_physmem.m4 | 84 ----------------------- - m4/tuklib_common.m4 | 22 ++++++ - m4/tuklib_cpucores.m4 | 72 ++++++++++++++++++++ - m4/tuklib_physmem.m4 | 119 ++++++++++++++++++++++++++++++++ - m4/tuklib_progname.m4 | 25 +++++++ - src/common/cpucores.h | 51 -------------- - src/common/open_stdxxx.h | 49 -------------- - src/common/physmem.h | 144 --------------------------------------- - src/common/sysdefs.h | 4 -- - src/common/tuklib_common.h | 67 ++++++++++++++++++ - src/common/tuklib_config.h | 1 + - src/common/tuklib_cpucores.c | 46 +++++++++++++ - src/common/tuklib_cpucores.h | 23 +++++++ - src/common/tuklib_exit.c | 57 ++++++++++++++++ - src/common/tuklib_exit.h | 25 +++++++ - src/common/tuklib_gettext.h | 44 ++++++++++++ - src/common/tuklib_open_stdxxx.c | 51 ++++++++++++++ - src/common/tuklib_open_stdxxx.h | 23 +++++++ - src/common/tuklib_physmem.c | 146 ++++++++++++++++++++++++++++++++++++++++ - src/common/tuklib_physmem.h | 28 ++++++++ - src/common/tuklib_progname.c | 50 ++++++++++++++ - src/common/tuklib_progname.h | 32 +++++++++ - src/lzmainfo/Makefile.am | 5 +- - src/lzmainfo/lzmainfo.c | 65 ++++++------------ - src/xz/Makefile.am | 7 +- - src/xz/args.c | 8 +-- - src/xz/file_io.c | 43 ++++++------ - src/xz/hardware.c | 8 +-- - src/xz/main.c | 100 ++++++--------------------- - src/xz/main.h | 7 -- - src/xz/message.c | 30 +++++---- - src/xz/message.h | 8 +-- - src/xz/private.h | 11 +-- - src/xz/signals.c | 2 + - src/xz/signals.h | 17 +++-- - src/xz/suffix.c | 2 +- - src/xzdec/Makefile.am | 13 +++- - src/xzdec/xzdec.c | 55 +++++---------- - 41 files changed, 974 insertions(+), 640 deletions(-) + THANKS | 1 + + configure.ac | 12 +-- + m4/lc_physmem.m4 | 84 --------------- + m4/tuklib_common.m4 | 22 ++++ + m4/{lc_cpucores.m4 => tuklib_cpucores.m4} | 83 ++++++++------ + m4/tuklib_physmem.m4 | 119 +++++++++++++++++++++ + m4/tuklib_progname.m4 | 25 +++++ + src/common/sysdefs.h | 4 - + src/common/tuklib_common.h | 67 ++++++++++++ + src/common/tuklib_config.h | 1 + + src/common/{cpucores.h => tuklib_cpucores.c} | 39 +++---- + src/common/tuklib_cpucores.h | 23 ++++ + src/common/tuklib_exit.c | 57 ++++++++++ + src/common/tuklib_exit.h | 25 +++++ + src/common/tuklib_gettext.h | 44 ++++++++ + src/common/{open_stdxxx.h => tuklib_open_stdxxx.c} | 24 +++-- + src/common/tuklib_open_stdxxx.h | 23 ++++ + src/common/{physmem.h => tuklib_physmem.c} | 58 +++++----- + src/common/tuklib_physmem.h | 28 +++++ + src/common/tuklib_progname.c | 50 +++++++++ + src/common/tuklib_progname.h | 32 ++++++ + src/lzmainfo/Makefile.am | 5 +- + src/lzmainfo/lzmainfo.c | 65 ++++------- + src/xz/Makefile.am | 7 +- + src/xz/args.c | 8 +- + src/xz/file_io.c | 43 ++++---- + src/xz/hardware.c | 8 +- + src/xz/main.c | 100 ++++------------- + src/xz/main.h | 7 -- + src/xz/message.c | 30 +++--- + src/xz/message.h | 8 +- + src/xz/private.h | 11 +- + src/xz/signals.c | 2 + + src/xz/signals.h | 17 ++- + src/xz/suffix.c | 2 +- + src/xzdec/Makefile.am | 13 ++- + src/xzdec/xzdec.c | 55 +++------- + 37 files changed, 768 insertions(+), 434 deletions(-) commit 49cfc8d392cf535f8dd10233225b1fc726fec9ef Author: Lasse Collin @@ -8268,11 +8816,11 @@ Date: 2009-08-09 13:22:12 -0500 It can be somewhat confusing that - less < some_file.txt + less < some_file.txt works fine, whereas - xzless < some_file.txt.xz + xzless < some_file.txt.xz does not. Since version 429, ‘less’ allows a filter specified in the LESSOPEN environment variable to preprocess its input even if @@ -8760,18 +9308,13 @@ Date: 2009-06-27 17:28:01 +0300 Moved the Windows resource files outside the windows directory to prepare for building them with Autotools. - src/common/common_w32res.rc | 46 +++++++++++++++++++++++++++++++++++++++++++ - src/liblzma/liblzma_w32res.rc | 5 +++++ - src/xz/xz_w32res.rc | 5 +++++ - src/xzdec/lzmadec_w32res.rc | 5 +++++ - src/xzdec/xzdec_w32res.rc | 5 +++++ - windows/Makefile | 35 +++++++++++++++++--------------- - windows/common.rc | 46 ------------------------------------------- - windows/liblzma.rc | 5 ----- - windows/lzmadec.rc | 5 ----- - windows/xz.rc | 5 ----- - windows/xzdec.rc | 5 ----- - 11 files changed, 85 insertions(+), 82 deletions(-) + windows/common.rc => src/common/common_w32res.rc | 0 + .../liblzma.rc => src/liblzma/liblzma_w32res.rc | 2 +- + windows/xz.rc => src/xz/xz_w32res.rc | 2 +- + windows/lzmadec.rc => src/xzdec/lzmadec_w32res.rc | 2 +- + windows/xzdec.rc => src/xzdec/xzdec_w32res.rc | 2 +- + windows/Makefile | 35 ++++++++++++---------- + 6 files changed, 23 insertions(+), 20 deletions(-) commit 449c634674f35336a4815d398172e447659a135e Author: Lasse Collin @@ -8853,19 +9396,15 @@ Date: 2009-06-26 20:49:54 +0300 to avoid problems on systems with system headers with those names. - dos/Makefile | 4 +- - src/xz/Makefile.am | 8 +- - src/xz/coder.c | 488 ++++++++++++++++++++++++++++++++++++ - src/xz/coder.h | 57 +++++ - src/xz/file_io.c | 716 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/xz/file_io.h | 86 +++++++ - src/xz/io.c | 716 ----------------------------------------------------- - src/xz/io.h | 86 ------- - src/xz/private.h | 4 +- - src/xz/process.c | 488 ------------------------------------ - src/xz/process.h | 57 ----- - windows/Makefile | 4 +- - 12 files changed, 1357 insertions(+), 1357 deletions(-) + dos/Makefile | 4 ++-- + src/xz/Makefile.am | 8 ++++---- + src/xz/{process.c => coder.c} | 0 + src/xz/{process.h => coder.h} | 0 + src/xz/{io.c => file_io.c} | 0 + src/xz/{io.h => file_io.h} | 0 + src/xz/private.h | 4 ++-- + windows/Makefile | 4 ++-- + 8 files changed, 10 insertions(+), 10 deletions(-) commit 5e1257466dcb66f1d7a3f71814a5ad885cba43e8 Author: Lasse Collin @@ -9247,9 +9786,8 @@ Date: 2009-05-01 11:20:23 +0300 Renamed the file format specification to xz-file-format.txt which is the filename used on the WWW. - doc/file-format.txt | 1127 ------------------------------------------------ - doc/xz-file-format.txt | 1127 ++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 1127 insertions(+), 1127 deletions(-) + doc/{file-format.txt => xz-file-format.txt} | 0 + 1 file changed, 0 insertions(+), 0 deletions(-) commit 21c6b94373d239d7e86bd480fcd558e30391712f Author: Lasse Collin @@ -9318,20 +9856,14 @@ Date: 2009-04-13 14:49:48 +0300 Quick & dirty update to support xz in diff/grep/more scripts. - src/scripts/Makefile.am | 38 +++++++++------ - src/scripts/lzdiff | 67 -------------------------- - src/scripts/lzdiff.1 | 51 -------------------- - src/scripts/lzgrep | 123 ------------------------------------------------ - src/scripts/lzgrep.1 | 61 ------------------------ - src/scripts/lzmore | 74 ----------------------------- - src/scripts/lzmore.1 | 55 ---------------------- - src/scripts/xzdiff | 67 ++++++++++++++++++++++++++ - src/scripts/xzdiff.1 | 58 +++++++++++++++++++++++ - src/scripts/xzgrep | 123 ++++++++++++++++++++++++++++++++++++++++++++++++ - src/scripts/xzgrep.1 | 77 ++++++++++++++++++++++++++++++ - src/scripts/xzmore | 74 +++++++++++++++++++++++++++++ - src/scripts/xzmore.1 | 66 ++++++++++++++++++++++++++ - 13 files changed, 489 insertions(+), 445 deletions(-) + src/scripts/Makefile.am | 38 +++++++++++++++++++----------- + src/scripts/{lzdiff => xzdiff} | 24 +++++++++---------- + src/scripts/{lzdiff.1 => xzdiff.1} | 29 ++++++++++++++--------- + src/scripts/{lzgrep => xzgrep} | 10 ++++---- + src/scripts/{lzgrep.1 => xzgrep.1} | 48 +++++++++++++++++++++++++------------- + src/scripts/{lzmore => xzmore} | 12 +++++----- + src/scripts/{lzmore.1 => xzmore.1} | 33 +++++++++++++++++--------- + 7 files changed, 119 insertions(+), 75 deletions(-) commit 02ddf09bc3079b3e17297729b9e43f14d407b8fc Author: Lasse Collin @@ -9675,16 +10207,15 @@ Date: 2009-02-17 10:43:00 +0200 pieces to avoid unneeded dependencies making statically linked applications bigger than needed. - dos/Makefile | 6 +- - src/liblzma/common/easy.c | 128 ----------------------------- - src/liblzma/common/easy_buffer_encoder.c | 34 ++++++++ - src/liblzma/common/easy_decoder_memusage.c | 31 +++++++ - src/liblzma/common/easy_encoder.c | 87 ++++++++++++++++++++ - src/liblzma/common/easy_encoder_memusage.c | 31 +++++++ - src/liblzma/common/easy_preset.c | 34 ++++++++ - src/liblzma/common/easy_preset.h | 39 +++++++++ - windows/Makefile | 6 +- - 9 files changed, 266 insertions(+), 130 deletions(-) + dos/Makefile | 6 ++- + src/liblzma/common/easy_buffer_encoder.c | 34 +++++++++++++++++ + src/liblzma/common/easy_decoder_memusage.c | 31 ++++++++++++++++ + src/liblzma/common/{easy.c => easy_encoder.c} | 53 +++------------------------ + src/liblzma/common/easy_encoder_memusage.c | 31 ++++++++++++++++ + src/liblzma/common/easy_preset.c | 34 +++++++++++++++++ + src/liblzma/common/easy_preset.h | 39 ++++++++++++++++++++ + windows/Makefile | 6 ++- + 8 files changed, 185 insertions(+), 49 deletions(-) commit 7494816ab08d82f4d6409788825930c4e43cfd0d Author: Lasse Collin @@ -10657,15 +11188,14 @@ Date: 2008-12-31 16:29:39 +0200 The internal implementation is still using the name "simple". It may need some cleanups, so I look at it later. - src/liblzma/api/Makefile.am | 2 +- - src/liblzma/api/lzma.h | 2 +- - src/liblzma/api/lzma/bcj.h | 94 +++++++++++++++++++++++++++++++++++++ - src/liblzma/api/lzma/simple.h | 94 ------------------------------------- - src/liblzma/simple/simple_coder.c | 2 +- - src/liblzma/simple/simple_decoder.c | 4 +- - src/liblzma/simple/simple_encoder.c | 4 +- - tests/test_filter_flags.c | 8 ++-- - 8 files changed, 105 insertions(+), 105 deletions(-) + src/liblzma/api/Makefile.am | 2 +- + src/liblzma/api/lzma.h | 2 +- + src/liblzma/api/lzma/{simple.h => bcj.h} | 22 +++++++++++----------- + src/liblzma/simple/simple_coder.c | 2 +- + src/liblzma/simple/simple_decoder.c | 4 ++-- + src/liblzma/simple/simple_encoder.c | 4 ++-- + tests/test_filter_flags.c | 8 ++++---- + 7 files changed, 22 insertions(+), 22 deletions(-) commit 7eea8bec3abfed883efba66264a1452a1c04f6b0 Author: Lasse Collin @@ -10719,47 +11249,44 @@ Date: 2008-12-31 00:30:49 +0200 as the more bloated uint32_t array on x86; hopefully it's not bad on other architectures. - configure.ac | 29 ++++++++-- - src/common/mythread.h | 34 ++++++++++++ - src/liblzma/api/Makefile.am | 1 - - src/liblzma/api/lzma.h | 1 - - src/liblzma/api/lzma/init.h | 85 ----------------------------- - src/liblzma/check/Makefile.am | 29 ++++------ - src/liblzma/check/check.c | 10 ++-- - src/liblzma/check/check.h | 25 ++++----- - src/liblzma/check/check_init.c | 37 ------------- - src/liblzma/check/crc32.c | 88 ------------------------------- - src/liblzma/check/crc32_fast.c | 88 +++++++++++++++++++++++++++++++ - src/liblzma/check/crc32_init.c | 55 ------------------- - src/liblzma/check/crc32_small.c | 54 +++++++++++++++++++ - src/liblzma/check/crc32_tablegen.c | 55 ++++++++++++++++--- - src/liblzma/check/crc64.c | 75 -------------------------- - src/liblzma/check/crc64_fast.c | 75 ++++++++++++++++++++++++++ - src/liblzma/check/crc64_small.c | 54 +++++++++++++++++++ - src/liblzma/check/crc64_tablegen.c | 55 ++++++++++++++++--- - src/liblzma/common/Makefile.am | 3 -- - src/liblzma/common/common.h | 1 + - src/liblzma/common/init.c | 39 -------------- - src/liblzma/common/init_decoder.c | 31 ----------- - src/liblzma/common/init_encoder.c | 40 -------------- - src/liblzma/liblzma.pc.in | 12 +++++ - src/liblzma/lz/lz_encoder.c | 6 +++ - src/liblzma/lzma.pc.in | 11 ---- - src/liblzma/rangecoder/Makefile.am | 8 +-- - src/liblzma/rangecoder/price.h | 16 +----- - src/liblzma/rangecoder/price_table.c | 2 +- - src/liblzma/rangecoder/price_table_init.c | 55 ------------------- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 6 07:57:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94626CA1EC8; Fri, 6 Jan 2017 07:57:46 +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 64A981C56; Fri, 6 Jan 2017 07:57:46 +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 v067vjds055656; Fri, 6 Jan 2017 07:57:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v067vjuj055655; Fri, 6 Jan 2017 07:57:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701060757.v067vjuj055655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 07:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311505 - head/contrib/bsnmp/snmp_mibII X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 07:57:46 -0000 Author: ngie Date: Fri Jan 6 07:57:45 2017 New Revision: 311505 URL: https://svnweb.freebsd.org/changeset/base/311505 Log: Remove unnecessary __unused attribute attached to `ctx` in op_begemot_mibII(..) MFC after: 3 days Modified: head/contrib/bsnmp/snmp_mibII/mibII_begemot.c Modified: head/contrib/bsnmp/snmp_mibII/mibII_begemot.c ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII_begemot.c Fri Jan 6 07:54:53 2017 (r311504) +++ head/contrib/bsnmp/snmp_mibII/mibII_begemot.c Fri Jan 6 07:57:45 2017 (r311505) @@ -37,7 +37,7 @@ * Scalars */ int -op_begemot_mibII(struct snmp_context *ctx __unused, struct snmp_value *value, +op_begemot_mibII(struct snmp_context *ctx, struct snmp_value *value, u_int sub, u_int idx __unused, enum snmp_op op) { switch (op) { From owner-svn-src-head@freebsd.org Fri Jan 6 10:15:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E4C8CA2AB3; Fri, 6 Jan 2017 10:15:18 +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 6055A19F4; Fri, 6 Jan 2017 10:15:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06AFHXg021058; Fri, 6 Jan 2017 10:15:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06AFHHg021057; Fri, 6 Jan 2017 10:15:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701061015.v06AFHHg021057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 10:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311511 - head/tools/tools/gensnmpdef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 10:15:18 -0000 Author: ngie Date: Fri Jan 6 10:15:17 2017 New Revision: 311511 URL: https://svnweb.freebsd.org/changeset/base/311511 Log: Add integration makefile for contrib/bsnmp/gensnmpdef It's a whole lot less error prone than generating the file completely by hand. MFC after: 1 week Added: head/tools/tools/gensnmpdef/ head/tools/tools/gensnmpdef/Makefile (contents, props changed) Added: head/tools/tools/gensnmpdef/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/gensnmpdef/Makefile Fri Jan 6 10:15:17 2017 (r311511) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/contrib/bsnmp/gensnmpdef + +PROG= gensnmpdef + +SRCS= gensnmpdef.c + +MAN= gensnmpdef.1 + +LOCALBASE?= /usr/local + +BINDIR= ${LOCALBASE}/bin + +MANDIR= ${LOCALBASE}/man/man + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +LDADD+= -lsmi + +.include From owner-svn-src-head@freebsd.org Fri Jan 6 13:12:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97435CA2B16; Fri, 6 Jan 2017 13:12:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 641401240; Fri, 6 Jan 2017 13:12:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06DCuB6093806; Fri, 6 Jan 2017 13:12:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06DCuIk093805; Fri, 6 Jan 2017 13:12:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701061312.v06DCuIk093805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 6 Jan 2017 13:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311517 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 13:12:57 -0000 Author: mav Date: Fri Jan 6 13:12:56 2017 New Revision: 311517 URL: https://svnweb.freebsd.org/changeset/base/311517 Log: Add some more mode page fields. MFC after: 2 weeks Modified: head/share/misc/scsi_modes Modified: head/share/misc/scsi_modes ============================================================================== --- head/share/misc/scsi_modes Fri Jan 6 12:13:03 2017 (r311516) +++ head/share/misc/scsi_modes Fri Jan 6 13:12:56 2017 (r311517) @@ -71,7 +71,7 @@ {TAS} t1 {ATMPE} t1 {RWWP} t1 - {Reserved} *t1 + {SBLP (Supported Block Lengths and Protection)} t1 {Autoload Mode} t3 {Ready AEN Holdoff Period} i2 {Busy Timeout Period} i2 @@ -148,6 +148,15 @@ {Minimum Pre-fetch} i2 {Maximum Pre-fetch} i2 {Maximum Pre-fetch Ceiling} i2 + {FSW (Force Sequential Write)} t1 + {LBCSS (Logical Block Cache Segment Size)} t1 + {DRA (Disable Read-Ahead)} t1 + {Vendor Specific} t2 + {SYNC_PROG} t1 + {NV_DIS} t1 + {Number of Cache Segments} i1 + {Cache Segment Size} i2 + {Reserved} *t4 } 0x05 "Flexible Disk Page" { @@ -224,7 +233,8 @@ {Head Offset Count} i1 {Data Strobe Offset Count} i1 {LBPERE (LBP Error Reporting Enabled)} t1 - {Reserved} *t7 + {MWR (Misaligned Write Reporting)} t2 + {Reserved} *t5 {Write Retry Count} i1 {Reserved} *i1 {Recovery Time Limit} i2 From owner-svn-src-head@freebsd.org Fri Jan 6 14:05:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5113DCA2F5F; Fri, 6 Jan 2017 14:05:33 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0743A1DA1; Fri, 6 Jan 2017 14:05:32 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06E5Wat014141; Fri, 6 Jan 2017 14:05:32 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06E5VS5014138; Fri, 6 Jan 2017 14:05:31 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201701061405.v06E5VS5014138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 6 Jan 2017 14:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311518 - in head: share/man/man4 sys/dev/rtwn/usb sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 14:05:33 -0000 Author: kevlo Date: Fri Jan 6 14:05:31 2017 New Revision: 311518 URL: https://svnweb.freebsd.org/changeset/base/311518 Log: Add new USB device ID. Modified: head/share/man/man4/rtwn_usb.4 head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs Modified: head/share/man/man4/rtwn_usb.4 ============================================================================== --- head/share/man/man4/rtwn_usb.4 Fri Jan 6 13:12:56 2017 (r311517) +++ head/share/man/man4/rtwn_usb.4 Fri Jan 6 14:05:31 2017 (r311518) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd October 17, 2016 +.Dd January 6, 2017 .Dt RTWN_USB 4 .Os .Sh NAME @@ -93,6 +93,8 @@ based USB wireless network adapters, inc .It "TP-Link Archer T4U" Ta USB 3.0 .It "TP-LINK TL-WN723N v3" Ta USB 2.0 .It "TP-LINK TL-WN725N v2" Ta USB 2.0 +.It "TP-LINK TL-WN821N v4" Ta USB 2.0 +.It "TP-LINK TL-WN823N v1" Ta USB 2.0 .It "TRENDnet TEW-805UB" Ta USB 3.0 .It "ZyXEL NWD6605" Ta USB 3.0 .El Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Fri Jan 6 13:12:56 2017 (r311517) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Fri Jan 6 14:05:31 2017 (r311518) @@ -92,6 +92,7 @@ static const STRUCT_USB_HOST_ID rtwn_dev RTWN_RTL8192CU_DEV(REALTEK, RTL8191CU), RTWN_RTL8192CU_DEV(REALTEK, RTL8192CE), RTWN_RTL8192CU_DEV(REALTEK, RTL8192CU), + RTWN_RTL8192CU_DEV(REALTEK, RTL8192CU_1), RTWN_RTL8192CU_DEV(SITECOMEU, RTL8188CU_1), RTWN_RTL8192CU_DEV(SITECOMEU, RTL8188CU_2), RTWN_RTL8192CU_DEV(SITECOMEU, RTL8192CU), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Jan 6 13:12:56 2017 (r311517) +++ head/sys/dev/usb/usbdevs Fri Jan 6 14:05:31 2017 (r311518) @@ -3820,6 +3820,7 @@ product REALTEK RTL8172 0x8172 RTL8172 product REALTEK RTL8173 0x8173 RTL8173 product REALTEK RTL8174 0x8174 RTL8174 product REALTEK RTL8188CU_0 0x8176 RTL8188CU +product REALTEK RTL8192CU_1 0x8178 RTL8192CU product REALTEK RTL8188EU 0x8179 RTL8188EU product REALTEK RTL8188CE_1 0x817e RTL8188CE product REALTEK RTL8188CU_1 0x817a RTL8188CU From owner-svn-src-head@freebsd.org Fri Jan 6 16:43:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DE01CA289C; Fri, 6 Jan 2017 16:43:47 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E19AF1A61; Fri, 6 Jan 2017 16:43:46 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06GhkUm078948; Fri, 6 Jan 2017 16:43:46 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06GhkPJ078947; Fri, 6 Jan 2017 16:43:46 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201701061643.v06GhkPJ078947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 6 Jan 2017 16:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311520 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 16:43:47 -0000 Author: wblock (doc committer) Date: Fri Jan 6 16:43:45 2017 New Revision: 311520 URL: https://svnweb.freebsd.org/changeset/base/311520 Log: Fix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES. PR: 215831 Submitted by: p5B2E9A8F@t-online.de MFC after: 1 week Sponsored by: iXsystems Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Jan 6 16:16:30 2017 (r311519) +++ head/share/man/man5/src.conf.5 Fri Jan 6 16:43:45 2017 (r311520) @@ -1629,7 +1629,7 @@ and related programs. Set to not build USB-related programs and libraries. .It Va WITHOUT_USB_GADGET_EXAMPLES .\" from FreeBSD: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES 274665 2014-11-18 17:06:50Z imp -Set to build USB gadget kernel modules. +Set to not build USB gadget kernel modules. .It Va WITHOUT_UTMPX .\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed Set to not build user accounting tools such as From owner-svn-src-head@freebsd.org Fri Jan 6 16:56:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09A94CA2F81; Fri, 6 Jan 2017 16:56:26 +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 CA8C21363; Fri, 6 Jan 2017 16:56:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06GuO1T083297; Fri, 6 Jan 2017 16:56:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06GuOgA083296; Fri, 6 Jan 2017 16:56:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701061656.v06GuOgA083296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Jan 2017 16:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311521 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 16:56:26 -0000 Author: kib Date: Fri Jan 6 16:56:24 2017 New Revision: 311521 URL: https://svnweb.freebsd.org/changeset/base/311521 Log: Explicitely add "opt_compat.h" to kern_exec.c: fix powerpc LINT builds. sys/ptrace.h includes sys/signal.h, which includes sys/_sigset.h. Note that sys/_sigset.h only defines osigset_t if COMPAT_43 was defined. Two lines later, sys/ptrace.h includes machine/reg.h, which in case of powerpc, includes opt_compat.h. After the include headers reordering in r311345, we have sys/ptrace.h included before sys/sysproto.h. If COMPAT_43 was requested in the kernel config, the result is that sys/_sigset.h does not define osigset_t, but sys/sysproto.h sees COMPAT_43 and uses osigset_t. Fix this by explicitely including opt_compat.h to cover the whole kern/kern_exec.c scope. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Jan 6 16:43:45 2017 (r311520) +++ head/sys/kern/kern_exec.c Fri Jan 6 16:56:24 2017 (r311521) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" +#include "opt_compat.h" #include "opt_hwpmc_hooks.h" #include "opt_ktrace.h" #include "opt_vm.h" From owner-svn-src-head@freebsd.org Fri Jan 6 16:59:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59779CA20C3; Fri, 6 Jan 2017 16:59:36 +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 21EC81657; Fri, 6 Jan 2017 16:59:36 +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 v06GxZiK083453; Fri, 6 Jan 2017 16:59:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06GxXkA083438; Fri, 6 Jan 2017 16:59:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701061659.v06GxXkA083438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Jan 2017 16:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311522 - in head: bin/pax contrib/mtree sbin/fsck_ffs sys/fs/nfsclient sys/fs/tmpfs sys/ufs/ffs sys/ufs/ufs tests/sys/kern/pipe usr.bin/find usr.bin/gzip usr.sbin/fmtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 16:59:36 -0000 Author: kib Date: Fri Jan 6 16:59:33 2017 New Revision: 311522 URL: https://svnweb.freebsd.org/changeset/base/311522 Log: Use type-independent formats for printing nlink_t and ino_t. Extracted from: ino64 work by gleb, mckusick Discussed with: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/bin/pax/gen_subs.c head/contrib/mtree/create.c head/contrib/mtree/spec.c head/contrib/mtree/specspec.c head/sbin/fsck_ffs/suj.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ufs/ufs_vnops.c head/tests/sys/kern/pipe/pipe_ino_test.c head/usr.bin/find/ls.c head/usr.bin/gzip/gzip.c head/usr.sbin/fmtree/compare.c head/usr.sbin/fmtree/create.c head/usr.sbin/fmtree/specspec.c Modified: head/bin/pax/gen_subs.c ============================================================================== --- head/bin/pax/gen_subs.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/bin/pax/gen_subs.c Fri Jan 6 16:59:33 2017 (r311522) @@ -109,7 +109,8 @@ ls_list(ARCHD *arcn, time_t now, FILE *f */ if (strftime(f_date,DATELEN,timefrmt,localtime(&(sbp->st_mtime))) == 0) f_date[0] = '\0'; - (void)fprintf(fp, "%s%2u %-12s %-12s ", f_mode, sbp->st_nlink, + (void)fprintf(fp, "%s%2ju %-12s %-12s ", f_mode, + (uintmax_t)sbp->st_nlink, name_uid(sbp->st_uid, 1), name_gid(sbp->st_gid, 1)); /* Modified: head/contrib/mtree/create.c ============================================================================== --- head/contrib/mtree/create.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/contrib/mtree/create.c Fri Jan 6 16:59:33 2017 (r311522) @@ -224,7 +224,8 @@ statf(FILE *fp, int indent, FTSENT *p) output(fp, indent, &offset, "device=%#jx", (uintmax_t)p->fts_statp->st_rdev); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) - output(fp, indent, &offset, "nlink=%u", p->fts_statp->st_nlink); + output(fp, indent, &offset, "nlink=%ju", + (uintmax_t)p->fts_statp->st_nlink); if (keys & F_SIZE && (flavor == F_FREEBSD9 || S_ISREG(p->fts_statp->st_mode))) output(fp, indent, &offset, "size=%ju", Modified: head/contrib/mtree/spec.c ============================================================================== --- head/contrib/mtree/spec.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/contrib/mtree/spec.c Fri Jan 6 16:59:33 2017 (r311522) @@ -363,7 +363,8 @@ dump_nodes(FILE *fp, const char *dir, NO appendfield(fp, pathlast, "device=%#jx", (uintmax_t)cur->st_rdev); if (MATCHFLAG(F_NLINK)) - appendfield(fp, pathlast, "nlink=%d", cur->st_nlink); + appendfield(fp, pathlast, "nlink=%ju", + (uintmax_t)cur->st_nlink); if (MATCHFLAG(F_SLINK)) appendfield(fp, pathlast, "link=%s", vispath(cur->slink)); Modified: head/contrib/mtree/specspec.c ============================================================================== --- head/contrib/mtree/specspec.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/contrib/mtree/specspec.c Fri Jan 6 16:59:33 2017 (r311522) @@ -73,7 +73,7 @@ shownode(NODE *n, int f, char const *pat if (f & F_MODE) printf(" mode=%o", n->st_mode); if (f & F_NLINK) - printf(" nlink=%d", n->st_nlink); + printf(" nlink=%ju", (uintmax_t)n->st_nlink); if (f & F_SIZE) printf(" size=%jd", (intmax_t)n->st_size); if (f & F_UID) Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/sbin/fsck_ffs/suj.c Fri Jan 6 16:59:33 2017 (r311522) @@ -1396,11 +1396,12 @@ ino_adjust(struct suj_ino *sino) ip = ino_read(ino); mode = DIP(ip, di_mode) & IFMT; if (nlink > LINK_MAX) - err_suj("ino %ju nlink manipulation error, new %d, old %d\n", - (uintmax_t)ino, nlink, DIP(ip, di_nlink)); + err_suj("ino %ju nlink manipulation error, new %ju, old %d\n", + (uintmax_t)ino, (uintmax_t)nlink, DIP(ip, di_nlink)); if (debug) - printf("Adjusting ino %ju, nlink %d, old link %d lastmode %o\n", - (uintmax_t)ino, nlink, DIP(ip, di_nlink), sino->si_mode); + printf("Adjusting ino %ju, nlink %ju, old link %d lastmode %o\n", + (uintmax_t)ino, (uintmax_t)nlink, DIP(ip, di_nlink), + sino->si_mode); if (mode == 0) { if (debug) printf("ino %ju, zero inode freeing bitmap\n", @@ -1419,8 +1420,9 @@ ino_adjust(struct suj_ino *sino) /* If the inode doesn't have enough links to live, free it. */ if (nlink < reqlink) { if (debug) - printf("ino %ju not enough links to live %d < %d\n", - (uintmax_t)ino, nlink, reqlink); + printf("ino %ju not enough links to live %ju < %ju\n", + (uintmax_t)ino, (uintmax_t)nlink, + (uintmax_t)reqlink); ino_reclaim(ip, ino, mode); return; } @@ -1657,10 +1659,12 @@ ino_check(struct suj_ino *sino) err_suj("Inode mode/directory type mismatch %o != %o\n", mode, rrec->jr_mode); if (debug) - printf("jrefrec: op %d ino %ju, nlink %d, parent %d, " + printf("jrefrec: op %d ino %ju, nlink %ju, parent %ju, " "diroff %jd, mode %o, isat %d, isdot %d\n", rrec->jr_op, (uintmax_t)rrec->jr_ino, - rrec->jr_nlink, rrec->jr_parent, rrec->jr_diroff, + (uintmax_t)rrec->jr_nlink, + (uintmax_t)rrec->jr_parent, + (uintmax_t)rrec->jr_diroff, rrec->jr_mode, isat, isdot); mode = rrec->jr_mode & IFMT; if (rrec->jr_op == JOP_REMREF) @@ -1677,8 +1681,10 @@ ino_check(struct suj_ino *sino) * by one. */ if (debug) - printf("ino %ju nlink %d newlinks %d removes %d dotlinks %d\n", - (uintmax_t)ino, nlink, newlinks, removes, dotlinks); + printf( + "ino %ju nlink %ju newlinks %ju removes %ju dotlinks %ju\n", + (uintmax_t)ino, (uintmax_t)nlink, (uintmax_t)newlinks, + (uintmax_t)removes, (uintmax_t)dotlinks); nlink += newlinks; nlink -= removes; sino->si_linkadj = 1; @@ -1962,15 +1968,17 @@ ino_append(union jrec *rec) mvrec = &rec->rec_jmvrec; refrec = &rec->rec_jrefrec; if (debug && mvrec->jm_op == JOP_MVREF) - printf("ino move: ino %d, parent %d, diroff %jd, oldoff %jd\n", - mvrec->jm_ino, mvrec->jm_parent, mvrec->jm_newoff, - mvrec->jm_oldoff); + printf("ino move: ino %ju, parent %ju, " + "diroff %jd, oldoff %jd\n", + (uintmax_t)mvrec->jm_ino, (uintmax_t)mvrec->jm_parent, + (uintmax_t)mvrec->jm_newoff, (uintmax_t)mvrec->jm_oldoff); else if (debug && (refrec->jr_op == JOP_ADDREF || refrec->jr_op == JOP_REMREF)) - printf("ino ref: op %d, ino %d, nlink %d, " - "parent %d, diroff %jd\n", - refrec->jr_op, refrec->jr_ino, refrec->jr_nlink, - refrec->jr_parent, refrec->jr_diroff); + printf("ino ref: op %d, ino %ju, nlink %ju, " + "parent %ju, diroff %jd\n", + refrec->jr_op, (uintmax_t)refrec->jr_ino, + (uintmax_t)refrec->jr_nlink, + (uintmax_t)refrec->jr_parent, (uintmax_t)refrec->jr_diroff); sino = ino_lookup(((struct jrefrec *)rec)->jr_ino, 1); sino->si_hasrecs = 1; srec = errmalloc(sizeof(*srec)); @@ -2182,9 +2190,10 @@ blk_build(struct jblkrec *blkrec) if (debug) printf("blk_build: op %d blkno %jd frags %d oldfrags %d " - "ino %d lbn %jd\n", - blkrec->jb_op, blkrec->jb_blkno, blkrec->jb_frags, - blkrec->jb_oldfrags, blkrec->jb_ino, blkrec->jb_lbn); + "ino %ju lbn %jd\n", + blkrec->jb_op, (uintmax_t)blkrec->jb_blkno, + blkrec->jb_frags, blkrec->jb_oldfrags, + (uintmax_t)blkrec->jb_ino, (uintmax_t)blkrec->jb_lbn); blk = blknum(fs, blkrec->jb_blkno); frag = fragnum(fs, blkrec->jb_blkno); @@ -2232,8 +2241,9 @@ ino_build_trunc(struct jtrncrec *rec) struct suj_ino *sino; if (debug) - printf("ino_build_trunc: op %d ino %d, size %jd\n", - rec->jt_op, rec->jt_ino, rec->jt_size); + printf("ino_build_trunc: op %d ino %ju, size %jd\n", + rec->jt_op, (uintmax_t)rec->jt_ino, + (uintmax_t)rec->jt_size); sino = ino_lookup(rec->jt_ino, 1); if (rec->jt_op == JOP_SYNC) { sino->si_trunc = NULL; Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/sys/fs/nfsclient/nfs_clvnops.c Fri Jan 6 16:59:33 2017 (r311522) @@ -3135,8 +3135,8 @@ nfs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); - printf("\tfileid %ld fsid 0x%x", np->n_vattr.na_fileid, - np->n_vattr.na_fsid); + printf("\tfileid %jd fsid 0x%jx", (uintmax_t)np->n_vattr.na_fileid, + (uintmax_t)np->n_vattr.na_fsid); if (vp->v_type == VFIFO) fifo_printinfo(vp); printf("\n"); Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Fri Jan 6 16:59:33 2017 (r311522) @@ -1286,8 +1286,8 @@ tmpfs_print(struct vop_print_args *v) node = VP_TO_TMPFS_NODE(vp); - printf("tag VT_TMPFS, tmpfs_node %p, flags 0x%lx, links %d\n", - node, node->tn_flags, node->tn_links); + printf("tag VT_TMPFS, tmpfs_node %p, flags 0x%lx, links %jd\n", + node, node->tn_flags, (uintmax_t)node->tn_links); printf("\tmode 0%o, owner %d, group %d, size %jd, status 0x%x\n", node->tn_mode, node->tn_uid, node->tn_gid, (intmax_t)node->tn_size, node->tn_status); Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Jan 6 16:59:33 2017 (r311522) @@ -11525,7 +11525,8 @@ handle_written_inodeblock(inodedep, bp, panic("handle_written_inodeblock: bad size"); if (inodedep->id_savednlink > LINK_MAX) panic("handle_written_inodeblock: Invalid link count " - "%d for inodedep %p", inodedep->id_savednlink, inodedep); + "%jd for inodedep %p", (uintmax_t)inodedep->id_savednlink, + inodedep); if (fstype == UFS1) { if (dp1->di_nlink != inodedep->id_savednlink) { dp1->di_nlink = inodedep->id_savednlink; @@ -14271,13 +14272,14 @@ softdep_error(func, error) static void inodedep_print(struct inodedep *inodedep, int verbose) { - db_printf("%p fs %p st %x ino %jd inoblk %jd delta %d nlink %d" + db_printf("%p fs %p st %x ino %jd inoblk %jd delta %jd nlink %jd" " saveino %p\n", inodedep, inodedep->id_fs, inodedep->id_state, (intmax_t)inodedep->id_ino, (intmax_t)fsbtodb(inodedep->id_fs, ino_to_fsba(inodedep->id_fs, inodedep->id_ino)), - inodedep->id_nlinkdelta, inodedep->id_savednlink, + (intmax_t)inodedep->id_nlinkdelta, + (intmax_t)inodedep->id_savednlink, inodedep->id_savedino1); if (verbose == 0) Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/sys/ufs/ufs/ufs_vnops.c Fri Jan 6 16:59:33 2017 (r311522) @@ -948,8 +948,8 @@ print_bad_link_count(const char *funcnam struct inode *dip; dip = VTOI(dvp); - uprintf("%s: Bad link count %d on parent inode %d in file system %s\n", - funcname, dip->i_effnlink, dip->i_number, + uprintf("%s: Bad link count %d on parent inode %jd in file system %s\n", + funcname, dip->i_effnlink, (intmax_t)dip->i_number, dvp->v_mount->mnt_stat.f_mntonname); } Modified: head/tests/sys/kern/pipe/pipe_ino_test.c ============================================================================== --- head/tests/sys/kern/pipe/pipe_ino_test.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/tests/sys/kern/pipe/pipe_ino_test.c Fri Jan 6 16:59:33 2017 (r311522) @@ -53,9 +53,11 @@ main(void) if (fstat(pipefd[1], &st2) == -1) err(1, "FAIL: fstat st2"); if (st1.st_dev != st2.st_dev || st1.st_dev == 0 || st2.st_dev == 0) - errx(1, "FAIL: wrong dev number %d %d", st1.st_dev, st2.st_dev); + errx(1, "FAIL: wrong dev number %ju %ju", + (uintmax_t)st1.st_dev, (uintmax_t)st2.st_dev); if (st1.st_ino == st2.st_ino) - errx(1, "FAIL: inode numbers are equal: %d", st1.st_ino); + errx(1, "FAIL: inode numbers are equal: %ju", + (uintmax_t)st1.st_ino); close(pipefd[0]); close(pipefd[1]); Modified: head/usr.bin/find/ls.c ============================================================================== --- head/usr.bin/find/ls.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/usr.bin/find/ls.c Fri Jan 6 16:59:33 2017 (r311522) @@ -65,7 +65,8 @@ printlong(char *name, char *accpath, str (void)printf("%6ju %8"PRId64" ", (uintmax_t)sb->st_ino, sb->st_blocks); (void)strmode(sb->st_mode, modep); - (void)printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, MAXLOGNAME - 1, + (void)printf("%s %3ju %-*s %-*s ", modep, (uintmax_t)sb->st_nlink, + MAXLOGNAME - 1, user_from_uid(sb->st_uid, 0), MAXLOGNAME - 1, group_from_gid(sb->st_gid, 0)); Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/usr.bin/gzip/gzip.c Fri Jan 6 16:59:33 2017 (r311522) @@ -1252,8 +1252,8 @@ file_compress(char *file, char *outfile, if (cflag == 0) { #ifndef SMALL if (isb.st_nlink > 1 && fflag == 0) { - maybe_warnx("%s has %d other link%s -- skipping", - file, isb.st_nlink - 1, + maybe_warnx("%s has %ju other link%s -- skipping", + file, (uintmax_t)isb.st_nlink - 1, (isb.st_nlink - 1) == 1 ? "" : "s"); close(in); return (-1); @@ -1448,8 +1448,8 @@ file_uncompress(char *file, char *outfil goto lose; #ifndef SMALL if (isb.st_nlink > 1 && lflag == 0 && fflag == 0) { - maybe_warnx("%s has %d other links -- skipping", - file, isb.st_nlink - 1); + maybe_warnx("%s has %ju other links -- skipping", + file, (uintmax_t)isb.st_nlink - 1); goto lose; } if (nflag == 0 && timestamp) Modified: head/usr.sbin/fmtree/compare.c ============================================================================== --- head/usr.sbin/fmtree/compare.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/usr.sbin/fmtree/compare.c Fri Jan 6 16:59:33 2017 (r311522) @@ -165,8 +165,9 @@ typeerr: LABEL; if (s->flags & F_NLINK && s->type != F_DIR && s->st_nlink != p->fts_statp->st_nlink) { LABEL; - (void)printf("%slink_count expected %u found %u\n", - tab, s->st_nlink, p->fts_statp->st_nlink); + (void)printf("%slink_count expected %ju found %ju\n", + tab, (uintmax_t)s->st_nlink, + (uintmax_t)p->fts_statp->st_nlink); tab = "\t"; } if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size && Modified: head/usr.sbin/fmtree/create.c ============================================================================== --- head/usr.sbin/fmtree/create.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/usr.sbin/fmtree/create.c Fri Jan 6 16:59:33 2017 (r311522) @@ -207,7 +207,8 @@ statf(int indent, FTSENT *p) if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode) output(indent, &offset, "mode=%#o", p->fts_statp->st_mode & MBITS); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) - output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink); + output(indent, &offset, "nlink=%ju", + (uintmax_t)p->fts_statp->st_nlink); if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) output(indent, &offset, "size=%jd", (intmax_t)p->fts_statp->st_size); Modified: head/usr.sbin/fmtree/specspec.c ============================================================================== --- head/usr.sbin/fmtree/specspec.c Fri Jan 6 16:56:24 2017 (r311521) +++ head/usr.sbin/fmtree/specspec.c Fri Jan 6 16:59:33 2017 (r311522) @@ -64,7 +64,7 @@ shownode(NODE *n, int f, char const *pat if (f & F_MODE) printf(" mode=%o", n->st_mode); if (f & F_NLINK) - printf(" nlink=%d", n->st_nlink); + printf(" nlink=%ju", (uintmax_t)n->st_nlink); if (f & F_SIZE) printf(" size=%jd", (intmax_t)n->st_size); if (f & F_UID) From owner-svn-src-head@freebsd.org Fri Jan 6 17:03:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 786C7CA24C6; Fri, 6 Jan 2017 17:03:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48CFD1DBC; Fri, 6 Jan 2017 17:03:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06H38AJ087408; Fri, 6 Jan 2017 17:03:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06H38sC087407; Fri, 6 Jan 2017 17:03:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701061703.v06H38sC087407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Jan 2017 17:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311523 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 17:03:09 -0000 Author: kib Date: Fri Jan 6 17:03:08 2017 New Revision: 311523 URL: https://svnweb.freebsd.org/changeset/base/311523 Log: Remove dead code. Fifos overwrite file ops vector, and fifo VOP_KQFILTER is VOP_PANIC(). Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs_fifoops.c Modified: head/sys/fs/tmpfs/tmpfs_fifoops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_fifoops.c Fri Jan 6 16:59:33 2017 (r311522) +++ head/sys/fs/tmpfs/tmpfs_fifoops.c Fri Jan 6 17:03:08 2017 (r311523) @@ -49,27 +49,6 @@ #include static int -tmpfs_fifo_kqfilter(struct vop_kqfilter_args *ap) -{ - struct vnode *vp; - struct tmpfs_node *node; - - vp = ap->a_vp; - node = VP_TO_TMPFS_NODE(vp); - - switch (ap->a_kn->kn_filter){ - case EVFILT_READ: - node->tn_status |= TMPFS_NODE_ACCESSED; - break; - case EVFILT_WRITE: - node->tn_status |= TMPFS_NODE_MODIFIED; - break; - } - - return fifo_specops.vop_kqfilter(ap); -} - -static int tmpfs_fifo_close(struct vop_close_args *v) { struct tmpfs_node *node; @@ -90,6 +69,5 @@ struct vop_vector tmpfs_fifoop_entries = .vop_access = tmpfs_access, .vop_getattr = tmpfs_getattr, .vop_setattr = tmpfs_setattr, - .vop_kqfilter = tmpfs_fifo_kqfilter, }; From owner-svn-src-head@freebsd.org Fri Jan 6 17:32:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41150CA20BF; Fri, 6 Jan 2017 17:32:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F381E1249; Fri, 6 Jan 2017 17:32:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06HWjSa099654; Fri, 6 Jan 2017 17:32:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06HWjN7099653; Fri, 6 Jan 2017 17:32:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701061732.v06HWjN7099653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Jan 2017 17:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311524 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 17:32:46 -0000 Author: kib Date: Fri Jan 6 17:32:44 2017 New Revision: 311524 URL: https://svnweb.freebsd.org/changeset/base/311524 Log: Use vnode lock assertion expression, and upgrade it to assert the required exclusive state of the vnode lock in tmpfs chflags, chmod, chown, chsize, chtimes operations. Fix nearby style. Reviewed by: mjg Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 6 17:03:08 2017 (r311523) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 6 17:32:44 2017 (r311524) @@ -1462,7 +1462,7 @@ tmpfs_chflags(struct vnode *vp, u_long f int error; struct tmpfs_node *node; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chflags"); node = VP_TO_TMPFS_NODE(vp); @@ -1502,9 +1502,9 @@ tmpfs_chflags(struct vnode *vp, u_long f node->tn_flags = flags; node->tn_status |= TMPFS_NODE_CHANGED; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chflags2"); - return 0; + return (0); } /* @@ -1518,7 +1518,7 @@ tmpfs_chmod(struct vnode *vp, mode_t mod int error; struct tmpfs_node *node; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chmod"); node = VP_TO_TMPFS_NODE(vp); @@ -1558,9 +1558,9 @@ tmpfs_chmod(struct vnode *vp, mode_t mod node->tn_status |= TMPFS_NODE_CHANGED; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chmod2"); - return 0; + return (0); } /* @@ -1579,7 +1579,7 @@ tmpfs_chown(struct vnode *vp, uid_t uid, uid_t ouid; gid_t ogid; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chown"); node = VP_TO_TMPFS_NODE(vp); @@ -1629,9 +1629,9 @@ tmpfs_chown(struct vnode *vp, uid_t uid, node->tn_mode &= ~(S_ISUID | S_ISGID); } - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chown2"); - return 0; + return (0); } /* @@ -1646,7 +1646,7 @@ tmpfs_chsize(struct vnode *vp, u_quad_t int error; struct tmpfs_node *node; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chsize"); node = VP_TO_TMPFS_NODE(vp); @@ -1684,9 +1684,9 @@ tmpfs_chsize(struct vnode *vp, u_quad_t /* tmpfs_truncate will raise the NOTE_EXTEND and NOTE_ATTRIB kevents * for us, as will update tn_status; no need to do that here. */ - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chsize2"); - return error; + return (error); } /* @@ -1701,7 +1701,7 @@ tmpfs_chtimes(struct vnode *vp, struct v int error; struct tmpfs_node *node; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chtimes"); node = VP_TO_TMPFS_NODE(vp); @@ -1730,9 +1730,9 @@ tmpfs_chtimes(struct vnode *vp, struct v if (vap->va_birthtime.tv_sec != VNOVAL) node->tn_birthtime = vap->va_birthtime; - MPASS(VOP_ISLOCKED(vp)); + ASSERT_VOP_ELOCKED(vp, "chtimes2"); - return 0; + return (0); } /* Sync timestamps */ From owner-svn-src-head@freebsd.org Fri Jan 6 17:43:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E878CA23E5; Fri, 6 Jan 2017 17:43:38 +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 39A6A1967; Fri, 6 Jan 2017 17:43:38 +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 v06HhbMP004141; Fri, 6 Jan 2017 17:43:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06HhbIw004137; Fri, 6 Jan 2017 17:43:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701061743.v06HhbIw004137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Jan 2017 17:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311525 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 17:43:38 -0000 Author: kib Date: Fri Jan 6 17:43:36 2017 New Revision: 311525 URL: https://svnweb.freebsd.org/changeset/base/311525 Log: Lock tmpfs node tn_status updates done under the shared vnode lock. If tmpfs vnode is only shared locked, tn_status field still needs updates to note the access time modification. Use the same locking scheme as for UFS, protect tn_status with the node interlock + shared vnode lock. Fix nearby style. Noted and reviewed by: mjg Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_fifoops.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Fri Jan 6 17:32:44 2017 (r311524) +++ head/sys/fs/tmpfs/tmpfs.h Fri Jan 6 17:43:36 2017 (r311525) @@ -199,7 +199,9 @@ struct tmpfs_node { * allocated for it or it has been reclaimed). */ struct vnode * tn_vnode; - /* interlock to protect tn_vpstate */ + /* Interlock to protect tn_vpstate, and tn_status under shared + * vnode lock. + */ struct mtx tn_interlock; /* Identify if current node has vnode assiocate with @@ -420,6 +422,7 @@ int tmpfs_chtimes(struct vnode *, struct void tmpfs_itimes(struct vnode *, const struct timespec *, const struct timespec *); +void tmpfs_set_status(struct tmpfs_node *node, int status); void tmpfs_update(struct vnode *); int tmpfs_truncate(struct vnode *, off_t); Modified: head/sys/fs/tmpfs/tmpfs_fifoops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_fifoops.c Fri Jan 6 17:32:44 2017 (r311524) +++ head/sys/fs/tmpfs/tmpfs_fifoops.c Fri Jan 6 17:43:36 2017 (r311525) @@ -52,11 +52,11 @@ static int tmpfs_fifo_close(struct vop_close_args *v) { struct tmpfs_node *node; - node = VP_TO_TMPFS_NODE(v->a_vp); - node->tn_status |= TMPFS_NODE_ACCESSED; + node = VP_TO_TMPFS_NODE(v->a_vp); + tmpfs_set_status(node, TMPFS_NODE_ACCESSED); tmpfs_update(v->a_vp); - return fifo_specops.vop_close(v); + return (fifo_specops.vop_close(v)); } /* Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 6 17:32:44 2017 (r311524) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 6 17:43:36 2017 (r311525) @@ -1092,9 +1092,9 @@ tmpfs_dir_getdotdent(struct tmpfs_node * else error = uiomove(&dent, dent.d_reclen, uio); - node->tn_status |= TMPFS_NODE_ACCESSED; + tmpfs_set_status(node, TMPFS_NODE_ACCESSED); - return error; + return (error); } /* @@ -1137,9 +1137,9 @@ tmpfs_dir_getdotdotdent(struct tmpfs_nod else error = uiomove(&dent, dent.d_reclen, uio); - node->tn_status |= TMPFS_NODE_ACCESSED; + tmpfs_set_status(node, TMPFS_NODE_ACCESSED); - return error; + return (error); } /* @@ -1282,7 +1282,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no node->tn_dir.tn_readdir_lastn = off; node->tn_dir.tn_readdir_lastp = de; - node->tn_status |= TMPFS_NODE_ACCESSED; + tmpfs_set_status(node, TMPFS_NODE_ACCESSED); return error; } @@ -1735,15 +1735,25 @@ tmpfs_chtimes(struct vnode *vp, struct v return (0); } -/* Sync timestamps */ void -tmpfs_itimes(struct vnode *vp, const struct timespec *acc, +tmpfs_set_status(struct tmpfs_node *node, int status) +{ + + if ((node->tn_status & status) == status) + return; + TMPFS_NODE_LOCK(node); + node->tn_status |= status; + TMPFS_NODE_UNLOCK(node); +} + +/* Sync timestamps */ +static void +tmpfs_itimes_locked(struct tmpfs_node *node, const struct timespec *acc, const struct timespec *mod) { - struct tmpfs_node *node; struct timespec now; - node = VP_TO_TMPFS_NODE(vp); + TMPFS_ASSERT_LOCKED(node); if ((node->tn_status & (TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | TMPFS_NODE_CHANGED)) == 0) @@ -1760,11 +1770,25 @@ tmpfs_itimes(struct vnode *vp, const str mod = &now; node->tn_mtime = *mod; } - if (node->tn_status & TMPFS_NODE_CHANGED) { + if (node->tn_status & TMPFS_NODE_CHANGED) node->tn_ctime = now; - } - node->tn_status &= - ~(TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | TMPFS_NODE_CHANGED); + node->tn_status &= ~(TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | + TMPFS_NODE_CHANGED); +} + +void +tmpfs_itimes(struct vnode *vp, const struct timespec *acc, + const struct timespec *mod) +{ + struct tmpfs_node *node; + + ASSERT_VOP_LOCKED(vp, "tmpfs_itimes"); + node = VP_TO_TMPFS_NODE(vp); + + TMPFS_NODE_LOCK(node); + tmpfs_itimes_locked(node, acc, mod); + TMPFS_NODE_UNLOCK(node); + /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ random_harvest_queue(node, sizeof(*node), 1, RANDOM_FS_ATIME); } @@ -1798,14 +1822,13 @@ tmpfs_truncate(struct vnode *vp, off_t l return (EFBIG); error = tmpfs_reg_resize(vp, length, FALSE); - if (error == 0) { + if (error == 0) node->tn_status |= TMPFS_NODE_CHANGED | TMPFS_NODE_MODIFIED; - } out: tmpfs_update(vp); - return error; + return (error); } static __inline int Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Fri Jan 6 17:32:44 2017 (r311524) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Fri Jan 6 17:43:36 2017 (r311525) @@ -445,7 +445,7 @@ tmpfs_read(struct vop_read_args *v) if (uio->uio_offset < 0) return (EINVAL); node = VP_TO_TMPFS_NODE(vp); - node->tn_status |= TMPFS_NODE_ACCESSED; + tmpfs_set_status(node, TMPFS_NODE_ACCESSED); return (uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio)); } @@ -1082,8 +1082,8 @@ tmpfs_rmdir(struct vop_rmdir_args *v) v->a_cnp->cn_namelen)); /* Check flags to see if we are allowed to remove the directory. */ - if (dnode->tn_flags & APPEND - || node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) { + if ((dnode->tn_flags & APPEND) != 0 || + (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) != 0) { error = EPERM; goto out; } @@ -1099,7 +1099,7 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_ASSERT_ELOCKED(node); node->tn_links--; node->tn_dir.tn_parent = NULL; - node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ + node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | TMPFS_NODE_MODIFIED; TMPFS_NODE_UNLOCK(node); @@ -1107,8 +1107,8 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_NODE_LOCK(dnode); TMPFS_ASSERT_ELOCKED(dnode); dnode->tn_links--; - dnode->tn_status |= TMPFS_NODE_ACCESSED | \ - TMPFS_NODE_CHANGED | TMPFS_NODE_MODIFIED; + dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | + TMPFS_NODE_MODIFIED; TMPFS_NODE_UNLOCK(dnode); cache_purge(dvp); @@ -1220,9 +1220,9 @@ tmpfs_readlink(struct vop_readlink_args error = uiomove(node->tn_link, MIN(node->tn_size, uio->uio_resid), uio); - node->tn_status |= TMPFS_NODE_ACCESSED; + tmpfs_set_status(node, TMPFS_NODE_ACCESSED); - return error; + return (error); } static int From owner-svn-src-head@freebsd.org Fri Jan 6 17:46:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F8C8CA2594; Fri, 6 Jan 2017 17:46:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 705C71C0D; Fri, 6 Jan 2017 17:46:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id 127so20279995pfg.0; Fri, 06 Jan 2017 09:46:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=lixWR83cRJTdhZqNQIbn5pae2xStNy9nOVzfDKJAp+Q=; b=JIaBRKEJkwV9HbJXwC/VFIc86scRIVkgLkksAkT1iXZ2xu+z0fxXolU+Moy60SMu3a k5LNlbERoXpY4Ao3O8GfE/pSxZhsXEtnijpxGDFDg8GvhLs661XIqkybqkJWp8k77aR7 EcNxLbGNEZYwxca9ouJJ5APJkP6ZcxxQfs8hgdFycDcEsA5SmsqKxLC1ear1gMrfwS1M JT0uRkXO+2oZzJubcsi9tYwFN91e7rm9P+xsXiiDRIqYRXdg/bmmCzusTIqLNDbVxI7Y 9rJy7j4oRciomDa7KmKj/LNrmTd6qcNEgaHzgycFKi8BZCUwt03Ytelz05AzRhHIluUk DA1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=lixWR83cRJTdhZqNQIbn5pae2xStNy9nOVzfDKJAp+Q=; b=YjGZaf55JfDIukuFjHHZVq5a/ayEF1HQ4tacYhjvlxvo7uK8TIOSBEtFNEW8GfB9u3 L8hk/CmrFkTcK/pWPiGmOtSOEdJLOna3W0Wn38UHfoiEuzPX/7RUUCsWBtw5LQTAksMn aSt8r5cfOHmW0EIdLffA058RxK4vERHb7KCk3C1mIMdwaTlnNrlzWlhPK708LAXpl7Dz seSg+eyHE3ICpuSjwN9Xk0siDJffEEQ3WHT+xSMI9lUua1FCORBGgWVfXQft4nb9Pjrx Bmm9XpeAbdWfjOzWJrkBsWYVEomrSHKnMBsAEEg3rnn7xA9hNIvdYQoTMvsx+nKZYl3J XjhQ== X-Gm-Message-State: AIkVDXLkW8fX3RJ1fOQtl9LwsRVYpSHr0vuB8hydP9KS03sELfdXMWTuLPL4dZujE0Ezuw== X-Received: by 10.84.213.150 with SMTP id g22mr169226685pli.11.1483724768744; Fri, 06 Jan 2017 09:46:08 -0800 (PST) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id k67sm161354213pfk.69.2017.01.06.09.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 09:46:08 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r311520 - head/share/man/man5 From: Ngie Cooper X-Mailer: iPhone Mail (14C92) In-Reply-To: <201701061643.v06GhkPJ078947@repo.freebsd.org> Date: Fri, 6 Jan 2017 09:46:07 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201701061643.v06GhkPJ078947@repo.freebsd.org> To: Warren Block X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 17:46:09 -0000 > On Jan 6, 2017, at 08:43, Warren Block wrote: >=20 > Author: wblock (doc committer) > Date: Fri Jan 6 16:43:45 2017 > New Revision: 311520 > URL: https://svnweb.freebsd.org/changeset/base/311520 >=20 > Log: > Fix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES. >=20 > PR: 215831 > Submitted by: p5B2E9A8F@t-online.de > MFC after: 1 week > Sponsored by: iXsystems WITH* should be modified and makeman should be run to regenerate src.conf.5-= -any changes made directly to the man page will be wiped out the next time i= t's generated. -Ngie= From owner-svn-src-head@freebsd.org Fri Jan 6 18:01:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85F68CA29FE; Fri, 6 Jan 2017 18:01:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5159515B6; Fri, 6 Jan 2017 18:01:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06I1kC4011345; Fri, 6 Jan 2017 18:01:46 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06I1k99011344; Fri, 6 Jan 2017 18:01:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701061801.v06I1k99011344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 6 Jan 2017 18:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311526 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 18:01:47 -0000 Author: mjg Date: Fri Jan 6 18:01:46 2017 New Revision: 311526 URL: https://svnweb.freebsd.org/changeset/base/311526 Log: tmpfs: enabled MNTK_EXTENDED_SHARED Discussed with: kib Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Fri Jan 6 17:43:36 2017 (r311525) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Fri Jan 6 18:01:46 2017 (r311526) @@ -257,7 +257,7 @@ tmpfs_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); mp->mnt_data = tmp; From owner-svn-src-head@freebsd.org Fri Jan 6 18:04:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9D61CA2C26; Fri, 6 Jan 2017 18:04:35 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BBDE1852; Fri, 6 Jan 2017 18:04:35 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06I4Yg0012209; Fri, 6 Jan 2017 18:04:34 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06I4YW9012208; Fri, 6 Jan 2017 18:04:34 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201701061804.v06I4YW9012208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 6 Jan 2017 18:04:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311527 - head/usr.sbin/crunch/crunchgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 18:04:35 -0000 Author: wblock (doc committer) Date: Fri Jan 6 18:04:34 2017 New Revision: 311527 URL: https://svnweb.freebsd.org/changeset/base/311527 Log: Show that the crunchgen configuration file name is not optional. PR: 215087 Submitted by: Iblis Lin MFC after: 1 week Sponsored by: iXsystems Modified: head/usr.sbin/crunch/crunchgen/crunchgen.1 Modified: head/usr.sbin/crunch/crunchgen/crunchgen.1 ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunchgen.1 Fri Jan 6 18:01:46 2017 (r311526) +++ head/usr.sbin/crunch/crunchgen/crunchgen.1 Fri Jan 6 18:04:34 2017 (r311527) @@ -24,7 +24,7 @@ .\" University of Maryland at College Park .\" $FreeBSD$ .\" -.Dd December 23, 2005 +.Dd January 6, 2017 .Dt CRUNCHGEN 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Op Fl p Ar obj-prefix .Op Fl c Ar c-file-name .Op Fl e Ar exec-file-name -.Op Ar conf-file +.Ar conf-file .Ek .Sh DESCRIPTION A crunched binary is a program made up of many other programs linked @@ -308,7 +308,7 @@ This is normally but some .Pa Makefile Ns s might like to use other conventions or -prepend the program's name to the variable, e.g.\& +prepend the program's name to the variable, e.g., .Va SSHD_OBJS . .It Ic special Ar progname Ic lib Ar library-name ... Specifies libraries to be linked with object files to produce From owner-svn-src-head@freebsd.org Fri Jan 6 18:08:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 399CDCA2E64; Fri, 6 Jan 2017 18:08:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E44261C4D; Fri, 6 Jan 2017 18:08:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06I8sAO012474; Fri, 6 Jan 2017 18:08:54 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06I8rtS012472; Fri, 6 Jan 2017 18:08:53 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201701061808.v06I8rtS012472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 6 Jan 2017 18:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311529 - head/sys/contrib/dev/acpica/compiler X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 18:08:55 -0000 Author: jkim Date: Fri Jan 6 18:08:53 2017 New Revision: 311529 URL: https://svnweb.freebsd.org/changeset/base/311529 Log: Remove '-vd' option to make iasl(8) reproducible. PR: 215421 Modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/asloptions.c Modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelp.c Fri Jan 6 18:08:42 2017 (r311528) +++ head/sys/contrib/dev/acpica/compiler/aslhelp.c Fri Jan 6 18:08:53 2017 (r311529) @@ -73,7 +73,6 @@ Usage ( ACPI_OPTION ("-I ", "Specify additional include directory"); ACPI_OPTION ("-p ", "Specify path/filename prefix for all output files"); ACPI_OPTION ("-v", "Display compiler version"); - ACPI_OPTION ("-vd", "Display compiler build date and time"); ACPI_OPTION ("-vo", "Enable optimization comments"); ACPI_OPTION ("-vs", "Disable signon"); Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Jan 6 18:08:42 2017 (r311528) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Jan 6 18:08:53 2017 (r311529) @@ -70,9 +70,6 @@ AslDoResponseFile ( #define ASL_TOKEN_SEPARATORS " \t\n" #define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z" -static char ASL_BUILD_DATE[] = __DATE__; -static char ASL_BUILD_TIME[] = __TIME__; - /******************************************************************************* * @@ -727,12 +724,6 @@ AslDoOptions ( Gbl_NoErrors = TRUE; break; - case 'd': - - printf ("%s Build date/time: %s %s\n", - ASL_COMPILER_NAME, ASL_BUILD_DATE, ASL_BUILD_TIME); - exit (0); - case 'e': /* Disable all warning/remark messages (errors only) */ From owner-svn-src-head@freebsd.org Fri Jan 6 18:41:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22524CA2C42; Fri, 6 Jan 2017 18:41:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E627815F1; Fri, 6 Jan 2017 18:41:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06IfT4A026269; Fri, 6 Jan 2017 18:41:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06IfTQ2026268; Fri, 6 Jan 2017 18:41:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701061841.v06IfTQ2026268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 6 Jan 2017 18:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311530 - head/sbin/ping X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 18:41:30 -0000 Author: dim Date: Fri Jan 6 18:41:28 2017 New Revision: 311530 URL: https://svnweb.freebsd.org/changeset/base/311530 Log: Fix clang 4.0.0 warnings about taking the address of a packed member of struct ip in ping(8): sbin/ping/ping.c:1684:53: error: taking address of packed member 'ip_src' of class or structure 'ip' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_src.s_addr)); ^~~~~~~~~~~~~~~~~ sbin/ping/ping.c:1685:53: error: taking address of packed member 'ip_dst' of class or structure 'ip' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_dst.s_addr)); ^~~~~~~~~~~~~~~~~ MFC after: 3 days Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Fri Jan 6 18:08:53 2017 (r311529) +++ head/sbin/ping/ping.c Fri Jan 6 18:41:28 2017 (r311530) @@ -1666,6 +1666,7 @@ pr_icmph(struct icmp *icp) static void pr_iph(struct ip *ip) { + struct in_addr ina; u_char *cp; int hlen; @@ -1681,8 +1682,10 @@ pr_iph(struct ip *ip) (u_long) ntohl(ip->ip_off) & 0x1fff); (void)printf(" %02x %02x %04x", ip->ip_ttl, ip->ip_p, ntohs(ip->ip_sum)); - (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_src.s_addr)); - (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_dst.s_addr)); + memcpy(&ina, &ip->ip_src.s_addr, sizeof ina); + (void)printf(" %s ", inet_ntoa(ina)); + memcpy(&ina, &ip->ip_dst.s_addr, sizeof ina); + (void)printf(" %s ", inet_ntoa(ina)); /* dump any option bytes */ while (hlen-- > 20) { (void)printf("%02x", *cp++); From owner-svn-src-head@freebsd.org Fri Jan 6 19:58:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DCF3CA2169; Fri, 6 Jan 2017 19:58:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AB1E106E; Fri, 6 Jan 2017 19:58:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06JwKKK058474; Fri, 6 Jan 2017 19:58:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06JwKIe058473; Fri, 6 Jan 2017 19:58:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701061958.v06JwKIe058473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 6 Jan 2017 19:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311531 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 19:58:21 -0000 Author: mjg Date: Fri Jan 6 19:58:20 2017 New Revision: 311531 URL: https://svnweb.freebsd.org/changeset/base/311531 Log: tmpfs: perform a lockless check in tmpfs_itimes Most of the time the status is 0 as the function is repeatedly called from tmpfs_getattr. Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 6 18:41:28 2017 (r311530) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 6 19:58:20 2017 (r311531) @@ -1747,19 +1747,22 @@ tmpfs_set_status(struct tmpfs_node *node } /* Sync timestamps */ -static void -tmpfs_itimes_locked(struct tmpfs_node *node, const struct timespec *acc, +void +tmpfs_itimes(struct vnode *vp, const struct timespec *acc, const struct timespec *mod) { + struct tmpfs_node *node; struct timespec now; - TMPFS_ASSERT_LOCKED(node); + ASSERT_VOP_LOCKED(vp, "tmpfs_itimes"); + node = VP_TO_TMPFS_NODE(vp); if ((node->tn_status & (TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | TMPFS_NODE_CHANGED)) == 0) return; vfs_timestamp(&now); + TMPFS_NODE_LOCK(node); if (node->tn_status & TMPFS_NODE_ACCESSED) { if (acc == NULL) acc = &now; @@ -1774,19 +1777,6 @@ tmpfs_itimes_locked(struct tmpfs_node *n node->tn_ctime = now; node->tn_status &= ~(TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | TMPFS_NODE_CHANGED); -} - -void -tmpfs_itimes(struct vnode *vp, const struct timespec *acc, - const struct timespec *mod) -{ - struct tmpfs_node *node; - - ASSERT_VOP_LOCKED(vp, "tmpfs_itimes"); - node = VP_TO_TMPFS_NODE(vp); - - TMPFS_NODE_LOCK(node); - tmpfs_itimes_locked(node, acc, mod); TMPFS_NODE_UNLOCK(node); /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ From owner-svn-src-head@freebsd.org Fri Jan 6 21:01:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED3E9CA2482 for ; Fri, 6 Jan 2017 21:01:55 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A59131CBD for ; Fri, 6 Jan 2017 21:01:55 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x235.google.com with SMTP id s140so64126900qke.0 for ; Fri, 06 Jan 2017 13:01:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f9oM60K4Wjy119Oq/FbmKFF1h8uVSH9uUgOWMUOE5jU=; b=JjJ5U3CKvF4O6NpMivlOc5Jtwq/pBykG/Pdvt81BiLgjiqzioUqC0lwwedERDmxHDD WtRgc88nA/d1DqBvFtTMezSMpFg/J55fGUi9Bfi/KoWmWBNjQ9389j2EOcgdgTdZgH2o KVBbxlAFIWV0rDWHizY77z7OPwcNFVcVp+Hq48vVUVd/7xWHkDZ3mac/g6cTp4K6tbmg IjozrnD3mGyCDUVBT4BAK1uSGy0rNC7U7sigCYYTP3T+Fti80xdxcxBpIu2Tjioge8QI OkLzkEf78PtEkQX3oVV8DPj8OcklY3vNmrnkRZ2uDuQ2TFB2EjlII+N9JH2TJw7ugHt6 wsMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f9oM60K4Wjy119Oq/FbmKFF1h8uVSH9uUgOWMUOE5jU=; b=S7g9L23I1nCXiM+6jAk+VJcLrO5bLVB/dbRsc31eyD5Z2DvY7ADDeR1A1r26Sgw2of nM1taChRY3VSmjxRpk6bxvG+F7DHPr/E8+lFBLFZ0ErDhUvltWhbd6mrjVfsL4WsNEWL UQV3GZZiRHVAw5gFlvVJmyd7FBjBbtxbMwYNhC0WWLZUuu8TJe/LNmu6nh/+08aYtDfi BvI0St9Vo4ERrUBTDuIo93gey/swqiOeo7Iln7rH0AfFhBNGAW9YV4vcFjPwaKecwTGd n9KNvy9xjnY6j+AmYxIZMSFqx4brGgWp2zHBe6TUT1AS8qeqUAZt5/Ei+i8hFytH0CTa jwCA== X-Gm-Message-State: AIkVDXIY5C8XUToBDLknq/PWIemc/0qJVgwL8UY8y4hubTS7E3PB8YIKp+pZprXHI9B9BvZp X-Received: by 10.55.5.145 with SMTP id 139mr77279588qkf.77.1483736514837; Fri, 06 Jan 2017 13:01:54 -0800 (PST) Received: from mutt-hardenedbsd (pool-100-16-218-231.bltmmd.fios.verizon.net. [100.16.218.231]) by smtp.gmail.com with ESMTPSA id t7sm51379029qtd.13.2017.01.06.13.01.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2017 13:01:53 -0800 (PST) Date: Fri, 6 Jan 2017 16:01:52 -0500 From: Shawn Webb To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311459 - head/contrib/tcp_wrappers Message-ID: <20170106210152.2f2pvmkekkc7nz64@mutt-hardenedbsd> References: <201701052044.v05KijCA081062@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yhvujjdxgrobjk3r" Content-Disposition: inline In-Reply-To: <201701052044.v05KijCA081062@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20161126 (1.7.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 21:01:56 -0000 --yhvujjdxgrobjk3r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Dimitry, On Thu, Jan 05, 2017 at 08:44:45PM +0000, Dimitry Andric wrote: > Author: dim > Date: Thu Jan 5 20:44:45 2017 > New Revision: 311459 > URL: https://svnweb.freebsd.org/changeset/base/311459 >=20 > Log: > Put proper prototypes in tcpd.h > =20 > Clang 4.0.0 complains about tcpd.h's not-really-prototypes, e.g.: > =20 > /usr/include/tcpd.h:75:24: error: this function declaration is not = a prototype [-Werror,-Wstrict-prototypes] > extern int hosts_access(); /* access control */ > ^ > =20 > To fix this, turn these declarations into real prototypes. While here, > garbage collect the incompatible rfc931() function from scaffold.c, as > it is never used. > =20 > Reviewed by: emaste > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D9052 This and r311461 breaks the build of a ton of ports. A good port to test would be databases/mysql56-client. I've pasted a log here: http://ix.io/1PkX Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --yhvujjdxgrobjk3r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlhwBb0ACgkQaoRlj1JF bu78gg/9HjYBWNsrY3BeYMS+i30umQUR++1eEO4waMn8bHcmVUXBcGPcyhndvSeI bxEzepQNsmBonaExs5a4yA9xiBCnz+P+B6gYN5QwXpzxU2tXe8nFmlto671gueOv 0NM0j3dnfblXj221sO08AuKXG3p/6w7Iqtxm7Wwcj9tnjE52MjZQqHsMxEmYNg9P qla8x2pjJu1kvFrGqMP6dS1OLJCAd5Z1+pyyESCTyzHs3CJnEPHDy/eHYdaVJJKE c1cZLWDUY9JbNbsru3rZwbSnD/k3KD3EvT28hPQ2AUVxET2ccyPXJAR0cLg4dRBy zO7hiBOH36V+J5d1ObijlG8fPsgxAjQwZF3smgQGlhFjaLu+9sm8QqF5nks67wCN +mLKNMfCwLMnECaPd8bh1ftVDim48sAjoWcEYyg3p/w0LYsrPLOQufTHHFxPjYyz YDrirScN4+MbXTa1mV+Pfz3p4Vip00eNIQzraludgifPkKQHjXs3jOpUen9b90gV 0da4S/fb7W8LdQ3BKaaLbJnuogJGfnsAse6zyJY32JIRooyy2Yg7rPcbcbU7rnhl 9wD0Q6sihtlrNVakidYMHF5HBoEfyMPZGIHHwqzUHGS731Y4YKqINkzI/wLUgWg7 IUZXjbizeo/JB0hmwIYQhO1Jw/+xui66AGVm2ilMM+zbUSdKyR0= =FYPg -----END PGP SIGNATURE----- --yhvujjdxgrobjk3r-- From owner-svn-src-head@freebsd.org Fri Jan 6 21:08:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CC62CA26A5; Fri, 6 Jan 2017 21:08:20 +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 5D5701253; Fri, 6 Jan 2017 21:08:20 +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 v06L8J88089656; Fri, 6 Jan 2017 21:08:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06L8JxK089655; Fri, 6 Jan 2017 21:08:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701062108.v06L8JxK089655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 21:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311548 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 21:08:20 -0000 Author: ngie Date: Fri Jan 6 21:08:19 2017 New Revision: 311548 URL: https://svnweb.freebsd.org/changeset/base/311548 Log: Carry over r311520 to tools/build/options/WITHOUT_USB_GADGET_EXAMPLES Discussed with: wblock r311520: Fix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES. PR: 215831 Submitted by: p5B2E9A8F@t-online.de MFC after: 1 week X-MFC with: r311520 Sponsored by: iXsystems Modified: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES Modified: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES ============================================================================== --- head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES Fri Jan 6 20:33:48 2017 (r311547) +++ head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES Fri Jan 6 21:08:19 2017 (r311548) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to build USB gadget kernel modules. +Set to not build USB gadget kernel modules. From owner-svn-src-head@freebsd.org Fri Jan 6 21:14:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 922F7CA28D0; Fri, 6 Jan 2017 21:14:08 +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 50CB11812; Fri, 6 Jan 2017 21:14:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06LE7Si093410; Fri, 6 Jan 2017 21:14:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06LE7NH093409; Fri, 6 Jan 2017 21:14:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701062114.v06LE7NH093409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 6 Jan 2017 21:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311549 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 21:14:08 -0000 Author: ngie Date: Fri Jan 6 21:14:07 2017 New Revision: 311549 URL: https://svnweb.freebsd.org/changeset/base/311549 Log: Regenerate src.conf(5) after r311548 MFC after: 1 week Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Jan 6 21:08:19 2017 (r311548) +++ head/share/man/man5/src.conf.5 Fri Jan 6 21:14:07 2017 (r311549) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 306729 2016-10-05 20:12:00Z emaste .\" $FreeBSD$ -.Dd January 2, 2017 +.Dd January 6, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1628,7 +1628,7 @@ and related programs. .\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. .It Va WITHOUT_USB_GADGET_EXAMPLES -.\" from FreeBSD: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES 274665 2014-11-18 17:06:50Z imp +.\" from FreeBSD: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES 311548 2017-01-06 21:08:19Z ngie Set to not build USB gadget kernel modules. .It Va WITHOUT_UTMPX .\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed From owner-svn-src-head@freebsd.org Fri Jan 6 21:40:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8F57CA35F6; Fri, 6 Jan 2017 21:40:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B897A13D5; Fri, 6 Jan 2017 21:40:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06LeUsu002671; Fri, 6 Jan 2017 21:40:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06LeUWM002670; Fri, 6 Jan 2017 21:40:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701062140.v06LeUWM002670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 6 Jan 2017 21:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311556 - head/contrib/tcp_wrappers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 21:40:32 -0000 Author: dim Date: Fri Jan 6 21:40:30 2017 New Revision: 311556 URL: https://svnweb.freebsd.org/changeset/base/311556 Log: After r311459, some ports can break, because a few of the newly added prototypes in use FILE. Pull in a minimal forward declaration of FILE from to minimize impact. Sorry for the breakage. Reported by: Shawn Webb X-MFC-With: r311459 Modified: head/contrib/tcp_wrappers/tcpd.h Modified: head/contrib/tcp_wrappers/tcpd.h ============================================================================== --- head/contrib/tcp_wrappers/tcpd.h Fri Jan 6 21:36:51 2017 (r311555) +++ head/contrib/tcp_wrappers/tcpd.h Fri Jan 6 21:40:30 2017 (r311556) @@ -12,6 +12,11 @@ #define TCPD_SOCKADDR struct sockaddr_in #endif +#ifndef _STDFILE_DECLARED +#define _STDFILE_DECLARED +typedef struct __sFILE FILE; +#endif + /* Structure to describe one communications endpoint. */ #define STRING_LENGTH 128 /* hosts, users, processes */ From owner-svn-src-head@freebsd.org Fri Jan 6 21:43:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80352CA3788; Fri, 6 Jan 2017 21:43:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46ABE18EB; Fri, 6 Jan 2017 21:43:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::4136:dc2a:25d6:5495] (unknown [IPv6:2001:7b8:3a7:0:4136:dc2a:25d6:5495]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1DA992785C; Fri, 6 Jan 2017 22:43:00 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_771D3547-31D0-49E5-AB82-F5F0C5A3B4A2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r311459 - head/contrib/tcp_wrappers From: Dimitry Andric In-Reply-To: <20170106210152.2f2pvmkekkc7nz64@mutt-hardenedbsd> Date: Fri, 6 Jan 2017 22:42:52 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701052044.v05KijCA081062@repo.freebsd.org> <20170106210152.2f2pvmkekkc7nz64@mutt-hardenedbsd> To: Shawn Webb X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 21:43:03 -0000 --Apple-Mail=_771D3547-31D0-49E5-AB82-F5F0C5A3B4A2 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 06 Jan 2017, at 22:01, Shawn Webb wrote: > > On Thu, Jan 05, 2017 at 08:44:45PM +0000, Dimitry Andric wrote: >> Author: dim >> Date: Thu Jan 5 20:44:45 2017 >> New Revision: 311459 >> URL: https://svnweb.freebsd.org/changeset/base/311459 >> >> Log: >> Put proper prototypes in tcpd.h ... > > This and r311461 breaks the build of a ton of ports. A good port to test > would be databases/mysql56-client. I've pasted a log here: > http://ix.io/1PkX Sorry about that. This was due to FILE not being declared, and it being used in a few of the new prototypes. I have committed a fix in r311556. -Dimitry --Apple-Mail=_771D3547-31D0-49E5-AB82-F5F0C5A3B4A2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEUEARECAAYFAlhwD2MACgkQsF6jCi4glqMlLQCg/XrByAF8mHVlqo7VcCF4Av+C B60AmMVnkycd54Ur/VJOedzDf/Obbuo= =P2wn -----END PGP SIGNATURE----- --Apple-Mail=_771D3547-31D0-49E5-AB82-F5F0C5A3B4A2-- From owner-svn-src-head@freebsd.org Fri Jan 6 23:05:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D06CA2774; Fri, 6 Jan 2017 23:05:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 569BC1AF4; Fri, 6 Jan 2017 23:05:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v06N5TWB039130; Fri, 6 Jan 2017 23:05:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06N5TWU039128; Fri, 6 Jan 2017 23:05:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701062305.v06N5TWU039128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 6 Jan 2017 23:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311565 - in head: tools/build/mk usr.bin/clang/llvm-ar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 23:05:30 -0000 Author: dim Date: Fri Jan 6 23:05:29 2017 New Revision: 311565 URL: https://svnweb.freebsd.org/changeset/base/311565 Log: Link llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled. When invoked as llvm-ranlib, it can create an archive symbol table for archives of objects compiled for LTO by an LLVM compiler. Submitted by: Dan McGregor MFC after: 3 days Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/llvm-ar/Makefile Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 6 22:46:02 2017 (r311564) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 6 23:05:29 2017 (r311565) @@ -1489,6 +1489,7 @@ OLD_FILES+=usr/bin/llvm-lto OLD_FILES+=usr/bin/llvm-mc OLD_FILES+=usr/bin/llvm-nm OLD_FILES+=usr/bin/llvm-pdbdump +OLD_FILES+=usr/bin/llvm-ranlib OLD_FILES+=usr/bin/llvm-rtdyld OLD_FILES+=usr/bin/llvm-symbolizer OLD_FILES+=usr/bin/opt Modified: head/usr.bin/clang/llvm-ar/Makefile ============================================================================== --- head/usr.bin/clang/llvm-ar/Makefile Fri Jan 6 22:46:02 2017 (r311564) +++ head/usr.bin/clang/llvm-ar/Makefile Fri Jan 6 23:05:29 2017 (r311565) @@ -7,4 +7,6 @@ SRCS+= llvm-ar.cpp LIBADD+= z +LINKS+= ${BINDIR}/llvm-ar ${BINDIR}/llvm-ranlib + .include "../llvm.prog.mk" From owner-svn-src-head@freebsd.org Fri Jan 6 23:21:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C8C5CA2ABC; Fri, 6 Jan 2017 23:21:00 +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 4C15812FC; Fri, 6 Jan 2017 23:21:00 +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 v06NKxRO044265; Fri, 6 Jan 2017 23:20:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06NKx5M044264; Fri, 6 Jan 2017 23:20:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701062320.v06NKx5M044264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Jan 2017 23:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311566 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 23:21:00 -0000 Author: jhb Date: Fri Jan 6 23:20:59 2017 New Revision: 311566 URL: https://svnweb.freebsd.org/changeset/base/311566 Log: Set -m32 in MD LIB32CPUCFLAGS rather than MI LIB32CFLAGS. Both amd64 and powerpc64 use -m32 to compile 32-bit binaries, but not all platforms follow this convention. Move the -m32 compile flag into the per-architecture flags to accomodate other architectures. Sponsored by: DARPA / AFRL Modified: head/Makefile.libcompat Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Fri Jan 6 23:05:29 2017 (r311565) +++ head/Makefile.libcompat Fri Jan 6 23:20:59 2017 (r311566) @@ -15,6 +15,7 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif +LIB32CPUFLAGS+= -m32 LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU="i686 mmx sse sse2" LIB32WMAKEFLAGS= \ @@ -28,6 +29,7 @@ LIB32CPUFLAGS= -mcpu=powerpc .else LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif +LIB32CPUFLAGS+= -m32 LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc LIB32WMAKEFLAGS= \ LD="${XLD} -m elf32ppc_fbsd" \ @@ -35,7 +37,7 @@ LIB32WMAKEFLAGS= \ .endif -LIB32CFLAGS= -m32 -DCOMPAT_32BIT +LIB32CFLAGS= -DCOMPAT_32BIT LIB32DTRACE= ${DTRACE} -32 LIB32WMAKEFLAGS+= -DCOMPAT_32BIT From owner-svn-src-head@freebsd.org Fri Jan 6 23:30:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 039C1CA2D10; Fri, 6 Jan 2017 23:30:56 +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 C0C67181A; Fri, 6 Jan 2017 23:30:55 +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 v06NUsnA048530; Fri, 6 Jan 2017 23:30:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06NUs1p048525; Fri, 6 Jan 2017 23:30:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701062330.v06NUs1p048525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Jan 2017 23:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311567 - in head: . gnu/lib/libgcc gnu/usr.bin/binutils/ld sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 23:30:56 -0000 Author: jhb Date: Fri Jan 6 23:30:54 2017 New Revision: 311567 URL: https://svnweb.freebsd.org/changeset/base/311567 Log: Enable /usr/lib32 for o32 binaries on mips64. Build and install an o32 set of libraries on mips64 suitable for running o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 in MALTA64. Reviewed by: jmallett, imp Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D9032 Modified: head/Makefile.inc1 head/Makefile.libcompat head/gnu/lib/libgcc/Makefile head/gnu/usr.bin/binutils/ld/Makefile.mips head/sys/mips/conf/MALTA64 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jan 6 23:20:59 2017 (r311566) +++ head/Makefile.inc1 Fri Jan 6 23:30:54 2017 (r311567) @@ -606,7 +606,7 @@ XCFLAGS+= ${BFLAGS} .endif .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ - ${TARGET_ARCH} == "powerpc64") + ${TARGET_ARCH} == "powerpc64") || ${TARGET_ARCH:Mmips64*} != "" LIBCOMPAT= 32 .include "Makefile.libcompat" .elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6" Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Fri Jan 6 23:20:59 2017 (r311566) +++ head/Makefile.libcompat Fri Jan 6 23:30:54 2017 (r311567) @@ -4,8 +4,7 @@ __<${_this:T}>__: # Makefile for the compatibility libraries. -# - 32-bit compat libraries on PowerPC and AMD64. -# could also be for mips, but that doesn't work today. +# - 32-bit compat libraries on MIPS, PowerPC, and AMD64. # ------------------------------------------------------------------- # 32 bit world @@ -34,6 +33,21 @@ LIB32WMAKEENV= MACHINE=powerpc MACHINE_A LIB32WMAKEFLAGS= \ LD="${XLD} -m elf32ppc_fbsd" \ OBJCOPY="${XOBJCOPY}" + +.elif ${TARGET_ARCH:Mmips64*} != "" +.if empty(TARGET_CPUTYPE) +LIB32CPUFLAGS= -march=mips3 +.else +LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} +.endif +LIB32CPUFLAGS+= -mabi=32 +LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips +.if ${TARGET_ARCH:Mmips64el*} != "" +LIB32WMAKEFLAGS= LD="${XLD} -m elf32ltsmip_fbsd" +.else +LIB32WMAKEFLAGS= LD="${XLD} -m elf32btsmip_fbsd" +.endif +LIB32WMAKEFLAGS+= OBJCOPY="${XOBJCOPY}" .endif Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Fri Jan 6 23:20:59 2017 (r311566) +++ head/gnu/lib/libgcc/Makefile Fri Jan 6 23:30:54 2017 (r311567) @@ -133,7 +133,8 @@ LIBADD+= compiler_rt .if ${TARGET_CPUARCH} == mips LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c # ABIs other than o32 need this -.if ${TARGET_ARCH:Mmips64*} != "" || ${TARGET_ARCH:Mmipsn32*} != "" +.if (${TARGET_ARCH:Mmips64*} != "" || ${TARGET_ARCH:Mmipsn32*} != "") && \ + !defined(COMPAT_32BIT) LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.mips Fri Jan 6 23:20:59 2017 (r311566) +++ head/gnu/usr.bin/binutils/ld/Makefile.mips Fri Jan 6 23:30:54 2017 (r311567) @@ -8,6 +8,7 @@ _EMULATION_ENDIAN=b .if ${TARGET_ARCH:Mmips64*} != "" NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd +LIBSEARCHPATH.elf32${_EMULATION_ENDIAN}tsmip_fbsd=\"=/usr/lib32\" .elif ${TARGET_ARCH:Mmipsn32*} != "" NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd .else Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Fri Jan 6 23:20:59 2017 (r311566) +++ head/sys/mips/conf/MALTA64 Fri Jan 6 23:30:54 2017 (r311567) @@ -11,3 +11,5 @@ machine mips mips64 makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" makeoptions KERNLOADADDR=0xffffffff80100000 + +options COMPAT_FREEBSD32 # Compatible with o32 binaries From owner-svn-src-head@freebsd.org Fri Jan 6 23:41:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18621CA31D7; Fri, 6 Jan 2017 23:41:47 +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 BA78A11C7; Fri, 6 Jan 2017 23:41:46 +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 v06NfjZ5054508; Fri, 6 Jan 2017 23:41:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v06NfjkL054505; Fri, 6 Jan 2017 23:41:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701062341.v06NfjkL054505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Jan 2017 23:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311568 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 23:41:47 -0000 Author: jhb Date: Fri Jan 6 23:41:45 2017 New Revision: 311568 URL: https://svnweb.freebsd.org/changeset/base/311568 Log: Set MORETOCOME for AIO write requests on a socket. Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend* set PRUS_MOREOTOCOME when invoking the protocol send method. The aio worker tasks for sending on a socket set this flag when there are additional write jobs waiting on the socket buffer. Reviewed by: adrian MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D8955 Modified: head/sys/kern/sys_socket.c head/sys/kern/uipc_socket.c head/sys/sys/socket.h Modified: head/sys/kern/sys_socket.c ============================================================================== --- head/sys/kern/sys_socket.c Fri Jan 6 23:30:54 2017 (r311567) +++ head/sys/kern/sys_socket.c Fri Jan 6 23:41:45 2017 (r311568) @@ -604,6 +604,8 @@ retry: if (td->td_ru.ru_msgrcv != ru_before) job->msgrcv = 1; } else { + if (!TAILQ_EMPTY(&sb->sb_aiojobq)) + flags |= MSG_MORETOCOME; uio.uio_rw = UIO_WRITE; ru_before = td->td_ru.ru_msgsnd; #ifdef MAC Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Fri Jan 6 23:30:54 2017 (r311567) +++ head/sys/kern/uipc_socket.c Fri Jan 6 23:41:45 2017 (r311568) @@ -1182,6 +1182,7 @@ sosend_dgram(struct socket *so, struct s (resid <= 0)) ? PRUS_EOF : /* If there is more to send set PRUS_MORETOCOME */ + (flags & MSG_MORETOCOME) || (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, top, addr, control, td); if (dontroute) { @@ -1368,6 +1369,7 @@ restart: (resid <= 0)) ? PRUS_EOF : /* If there is more to send set PRUS_MORETOCOME. */ + (flags & MSG_MORETOCOME) || (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, top, addr, control, td); if (dontroute) { Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Fri Jan 6 23:30:54 2017 (r311567) +++ head/sys/sys/socket.h Fri Jan 6 23:41:45 2017 (r311568) @@ -435,6 +435,7 @@ struct msghdr { #endif #ifdef _KERNEL #define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */ +#define MSG_MORETOCOME 0x20000 /* additional data pending */ #endif /* From owner-svn-src-head@freebsd.org Sat Jan 7 00:08:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDDC8CA38B4; Sat, 7 Jan 2017 00:08:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FAA910BF; Sat, 7 Jan 2017 00:08:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0708tN4063762; Sat, 7 Jan 2017 00:08:55 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0708tts063761; Sat, 7 Jan 2017 00:08:55 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701070008.v0708tts063761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 7 Jan 2017 00:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311569 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 00:08:56 -0000 Author: np Date: Sat Jan 7 00:08:55 2017 New Revision: 311569 URL: https://svnweb.freebsd.org/changeset/base/311569 Log: Fix comment in t4_tom. No functional change. MFC after: 3 days Modified: head/sys/dev/cxgbe/tom/t4_connect.c Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Fri Jan 6 23:41:45 2017 (r311568) +++ head/sys/dev/cxgbe/tom/t4_connect.c Sat Jan 7 00:08:55 2017 (r311569) @@ -107,7 +107,7 @@ free_atid(struct adapter *sc, int atid) } /* - * Active open failed. + * Active open succeeded. */ static int do_act_establish(struct sge_iq *iq, const struct rss_header *rss, @@ -187,6 +187,9 @@ act_open_failure_cleanup(struct adapter INP_INFO_RUNLOCK(&V_tcbinfo); } +/* + * Active open failed. + */ static int do_act_open_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) From owner-svn-src-head@freebsd.org Sat Jan 7 00:17:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC4BCCA3B90; Sat, 7 Jan 2017 00:17:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BDCD1748; Sat, 7 Jan 2017 00:17:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v070H1M5067576; Sat, 7 Jan 2017 00:17:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v070H1xQ067575; Sat, 7 Jan 2017 00:17:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701070017.v070H1xQ067575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Jan 2017 00:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311570 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 00:17:02 -0000 Author: dim Date: Sat Jan 7 00:17:01 2017 New Revision: 311570 URL: https://svnweb.freebsd.org/changeset/base/311570 Log: In tcpdump's print-tcp.c, avoid increasing alignment when taking the addresses of members of struct ip, which is packed. Since the pointers are only used for memcmp'ing, they can be pointing to void instead. Note that upstream has removed the src and dst variables, in the mean time. MFC after: 3 days Modified: head/contrib/tcpdump/print-tcp.c Modified: head/contrib/tcpdump/print-tcp.c ============================================================================== --- head/contrib/tcpdump/print-tcp.c Sat Jan 7 00:08:55 2017 (r311569) +++ head/contrib/tcpdump/print-tcp.c Sat Jan 7 00:17:01 2017 (r311570) @@ -253,7 +253,7 @@ tcp_print(netdissect_options *ndo, if (ip6) { register struct tcp_seq_hash6 *th; struct tcp_seq_hash6 *tcp_seq_hash; - const struct in6_addr *src, *dst; + const void *src, *dst; struct tha6 tha; tcp_seq_hash = tcp_seq_hash6; @@ -309,7 +309,7 @@ tcp_print(netdissect_options *ndo, #endif /*INET6*/ register struct tcp_seq_hash *th; struct tcp_seq_hash *tcp_seq_hash; - const struct in_addr *src, *dst; + const void *src, *dst; struct tha tha; tcp_seq_hash = tcp_seq_hash4; From owner-svn-src-head@freebsd.org Sat Jan 7 00:58:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84FF7B87826 for ; Sat, 7 Jan 2017 00:58:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37C791D3E for ; Sat, 7 Jan 2017 00:58:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x231.google.com with SMTP id v23so93649480qtb.0 for ; Fri, 06 Jan 2017 16:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fTyghZ6HlcoGVw7bwBIXhhch+FC4U0uKlre4LCH8NrE=; b=Dq3/ynWSZdVWQL4cfuQY8JFsbwTjK92G3KFjtHTG/qAKQwxf3QIUoIAF7wUdXmUmVo F66s1mwNe8sEYWnpev/Up0wEFuS42pGiJa6R+sTwd2R9XOBrv0t8OCfBf0Qi3RWhoeFH LiZYpUlASX9SbJ+8u6FzcxCeIM40Hs3+y9GOuHPr0WRyZu3XZZmVlqsikZXp5x3TrRj9 gjOY8FkBql/nOoUy2SOExKhjMiGewtqhb9bOnHjuGNc8cj4suEiEYxTrP9AGV+eGyzMo 5qai8uh/WTJk10C56tfBubaJuN9Q3hHdkPmeQ0DXa9BDPBzxUpXx7p7LYQMwYfBMp552 r9fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fTyghZ6HlcoGVw7bwBIXhhch+FC4U0uKlre4LCH8NrE=; b=WzDcTz92Vz26Hl4/MJf5DHBvDs1n9L8P5by6hmAO5NPeilMG9OuPX8HcQeq1rtU8qV 7I5ljzt4xHmwLCmUH/1l8cJKCsY6jl9dx3/WI8rtGt0NwjbHfrFk3uK2XnuEs1IbqLOI v6ynCdvhiBbtQn8XGtBIh4gOfUFgBt0II6Y6mZ+rtTJoVizXDYSR7pbk+kLo0aswQQFK tMKkLKOiPLCkMJoye52pamwzjISniZabd0a2r261iHnKHapt0vAloAz4K+Utfqq1bIO6 TLtFiwlrTMshnOuP2fQNLZnaJpIWYlpgb4V7izp8G34+Ardynjn586y/RJ/hBc3E+DYk qAaQ== X-Gm-Message-State: AIkVDXIZCeqJx70S+CHC5e7gS5wEcLBjbSPrLQYpBAD3Bobwi5tOlBHGyr6dAR9G00tssQTB X-Received: by 10.237.47.166 with SMTP id m35mr67489269qtd.93.1483750708308; Fri, 06 Jan 2017 16:58:28 -0800 (PST) Received: from mutt-hardenedbsd (pool-100-16-218-231.bltmmd.fios.verizon.net. [100.16.218.231]) by smtp.gmail.com with ESMTPSA id j204sm724292qke.36.2017.01.06.16.58.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2017 16:58:27 -0800 (PST) Date: Fri, 6 Jan 2017 19:58:26 -0500 From: Shawn Webb To: Dimitry Andric Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311459 - head/contrib/tcp_wrappers Message-ID: <20170107005826.s5lnvyr7by3pt2pb@mutt-hardenedbsd> References: <201701052044.v05KijCA081062@repo.freebsd.org> <20170106210152.2f2pvmkekkc7nz64@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cyylisvu4nvvctb4" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20161126 (1.7.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 00:58:29 -0000 --cyylisvu4nvvctb4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 06, 2017 at 10:42:52PM +0100, Dimitry Andric wrote: > On 06 Jan 2017, at 22:01, Shawn Webb wrote: > >=20 > > On Thu, Jan 05, 2017 at 08:44:45PM +0000, Dimitry Andric wrote: > >> Author: dim > >> Date: Thu Jan 5 20:44:45 2017 > >> New Revision: 311459 > >> URL: https://svnweb.freebsd.org/changeset/base/311459 > >>=20 > >> Log: > >> Put proper prototypes in tcpd.h > ... > >=20 > > This and r311461 breaks the build of a ton of ports. A good port to test > > would be databases/mysql56-client. I've pasted a log here: > > http://ix.io/1PkX >=20 > Sorry about that. This was due to FILE not being declared, and it being > used in a few of the new prototypes. I have committed a fix in r311556. No worries. Thanks for the quick fix! --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --cyylisvu4nvvctb4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlhwPTAACgkQaoRlj1JF bu51gA//RoQOCiKnzJw2/eXPBmQX9f7dNNcwOfJlnWrWuSlvncNZNQnyZfMj1xDL odr0eF4KfuEHOpo2TfOaH9tDThN1Cv9Zf8ASgl6Zqf8zNjrBy416/qIdJYADAEu7 miHWX/uhHuM/Qyimlg2IAsVR49PH+W3iuP1+DYKORD/hwiskIzJ1vb0lQViNgHxU lFmOcbe3FesmMa6BQ0HQJLDqoAT9Sh3nmKnrTwmJAwbBcF9R8Lm6wbF0V+nuYbcV BxJJhnvAEEj9XwqU6g5KqFfmgpQl1rpcxr82S5e1+7kZ1DSjek3XJUM19iXvk17h fwLbJK8+HLtkWvvhaA+0wnmhItllsQ6JTZn+dqTmCM1eCMT/v3g3/AbvEr51E/VS tHcUF4WCHxtAufbpKxyjyibFBYjCbbm+iqm6Ard2e/pNxvJDhrXGgaFIXvPuwYsA uBX+S60//5luP41tr3/jxIIhGYgwwkJsedmaiwGYckMgNUuK/9Lar8J6YClL109u nCFhesxDO9hGA4cbXNbQefn0KV/nIknR81bqWT4p6qHAuUN9Id5uK7s2OqRU36xq EJnn7hFo2o3LXW+tUe5eGregvW2Di/2phH66vI4OXUlC7Y+IIrvkxiUOxJUMPADQ PTLRyTdeR8NOL2NZPdx2Qd1R93wX9gRh++OS2BDha5iVrpmRrMs= =sBRl -----END PGP SIGNATURE----- --cyylisvu4nvvctb4-- From owner-svn-src-head@freebsd.org Sat Jan 7 00:59:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D37C2B878BF; Sat, 7 Jan 2017 00:59:07 +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 ADE2D1EBB; Sat, 7 Jan 2017 00:59:07 +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 v070x6Bv084237; Sat, 7 Jan 2017 00:59:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v070x6fI084234; Sat, 7 Jan 2017 00:59:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701070059.v070x6fI084234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 7 Jan 2017 00:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311572 - in head/usr.bin/cmp: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 00:59:07 -0000 Author: asomers Date: Sat Jan 7 00:59:06 2017 New Revision: 311572 URL: https://svnweb.freebsd.org/changeset/base/311572 Log: Fix file descriptor leaks in cmp(1) Also, add a few test cases Reported by: Coverity CID: 271624 275338 Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9074 Added: head/usr.bin/cmp/tests/cmp_test2.sh (contents, props changed) Modified: head/usr.bin/cmp/special.c head/usr.bin/cmp/tests/Makefile Modified: head/usr.bin/cmp/special.c ============================================================================== --- head/usr.bin/cmp/special.c Sat Jan 7 00:18:51 2017 (r311571) +++ head/usr.bin/cmp/special.c Sat Jan 7 00:59:06 2017 (r311572) @@ -99,6 +99,8 @@ eof: if (ferror(fp1)) } else if (feof(fp2)) eofmsg(file2); + fclose(fp2); + fclose(fp1); if (dfound) exit(DIFF_EXIT); } Modified: head/usr.bin/cmp/tests/Makefile ============================================================================== --- head/usr.bin/cmp/tests/Makefile Sat Jan 7 00:18:51 2017 (r311571) +++ head/usr.bin/cmp/tests/Makefile Sat Jan 7 00:59:06 2017 (r311572) @@ -2,6 +2,7 @@ .include +ATF_TESTS_SH+= cmp_test2 NETBSD_ATF_TESTS_SH= cmp_test .include Added: head/usr.bin/cmp/tests/cmp_test2.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/cmp/tests/cmp_test2.sh Sat Jan 7 00:59:06 2017 (r311572) @@ -0,0 +1,67 @@ +# Copyright (c) 2017 Alan Somers +# 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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$ + +atf_test_case special +special_head() { + atf_set "descr" "Test cmp(1)'s handling of non-regular files" +} +special_body() { + echo 0123456789abcdef > a + echo 0123456789abcdeg > b + cat a | atf_check -s exit:0 cmp a - + cat a | atf_check -s exit:0 cmp - a + cat b | atf_check -s not-exit:0 cmp a - + cat b | atf_check -s not-exit:0 cmp - a + true +} + +atf_test_case symlink +symlink_head() { + atf_set "descr" "Test cmp(1)'s handling of symlinks" +} +symlink_body() { + echo 0123456789abcdef > a + echo 0123456789abcdeg > b + ln -s a a.lnk + ln -s b b.lnk + ln -s a a2.lnk + cp a adup + ln -s adup adup.lnk + atf_check -s exit:0 cmp a a.lnk + atf_check -s exit:0 cmp a.lnk a + atf_check -s not-exit:0 -o ignore cmp a b.lnk + atf_check -s not-exit:0 -o ignore cmp b.lnk a + atf_check -s not-exit:0 -o ignore -e ignore cmp -h a a.lnk + atf_check -s not-exit:0 -o ignore -e ignore cmp -h a.lnk a + atf_check -s exit:0 cmp -h a.lnk a2.lnk + atf_check -s not-exit:0 -o ignore -e ignore cmp -h a.lnk adup.lnk +} + +atf_init_test_cases() +{ + atf_add_test_case special + atf_add_test_case symlink +} From owner-svn-src-head@freebsd.org Sat Jan 7 01:49:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83369CA26F3; Sat, 7 Jan 2017 01:49:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37A351389; Sat, 7 Jan 2017 01:49:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v071nYTA004996; Sat, 7 Jan 2017 01:49:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v071nYvd004995; Sat, 7 Jan 2017 01:49:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070149.v071nYvd004995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 01:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311573 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 01:49:35 -0000 Author: adrian Date: Sat Jan 7 01:49:34 2017 New Revision: 311573 URL: https://svnweb.freebsd.org/changeset/base/311573 Log: [net80211] Remove duplicate VHTOPMODE configuration bits. These came from Linux mac80211 headers and are configuration bits, not VHTOPMODE field parameters. Whilst here, add the field names for the VHTCAP bits. Tested: * ath10k, 11ac STA mode Modified: head/sys/net80211/ieee80211.h Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Sat Jan 7 00:59:06 2017 (r311572) +++ head/sys/net80211/ieee80211.h Sat Jan 7 01:49:34 2017 (r311573) @@ -737,16 +737,6 @@ struct ieee80211_ie_htinfo { * 802.11ac definitions - 802.11ac-2013 . */ -/* VHT opmode bits */ -#define IEEE80211_VHT_OPMODE_CHANWIDTH_MASK 3 -#define IEEE80211_VHT_OPMODE_CHANWIDTH_20MHZ 0 -#define IEEE80211_VHT_OPMODE_CHANWIDTH_40MHZ 1 -#define IEEE80211_VHT_OPMODE_CHANWIDTH_80MHZ 2 -#define IEEE80211_VHT_OPMODE_CHANWIDTH_160MHZ 3 -#define IEEE80211_VHT_OPMODE_RX_NSS_MASK 0x70 -#define IEEE80211_VHT_OPMODE_RX_NSS_SHIFT 4 -#define IEEE80211_VHT_OPMODE_RX_NSS_TYPE_BF 0x80 - /* * Maximum length of A-MPDU that the STA can RX in VHT. * Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets) @@ -787,6 +777,7 @@ struct ieee80211_ie_vhtcap { struct ieee80211_vht_mcs_info supp_mcs; } __packed; +/* VHT operation mode subfields - 802.11ac-2013 Table 8.183x */ #define IEEE80211_VHT_CHANWIDTH_USE_HT 0 /* Use HT IE for chw */ #define IEEE80211_VHT_CHANWIDTH_80MHZ 1 /* 80MHz */ #define IEEE80211_VHT_CHANWIDTH_160MHZ 2 /* 160MHz */ @@ -839,6 +830,11 @@ struct ieee80211_ie_vht_operation { #define IEEE80211_VHTCAP_RX_ANTENNA_PATTERN 0x10000000 #define IEEE80211_VHTCAP_TX_ANTENNA_PATTERN 0x20000000 +#define IEEE80211_VHTCAP_BITS \ + "\20\1MPDU7991\2MPDU11454\3CHAN160\4CHAN8080\5RXLDPC\6SHORTGI80" \ + "\7SHORTGI160\10RXSTBC1\11RXSTBC2\12RXSTBC3\13RXSTBC4\14BFERCAP" \ + "\15BFEECAP\27VHT" + /* * VHT Transmit Power Envelope element - 802.11ac-2013 8.4.2.164 * From owner-svn-src-head@freebsd.org Sat Jan 7 01:51:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D3ACA2974; Sat, 7 Jan 2017 01:51:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3846A16AD; Sat, 7 Jan 2017 01:51:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v071psi7008604; Sat, 7 Jan 2017 01:51:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v071psNl008603; Sat, 7 Jan 2017 01:51:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070151.v071psNl008603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 01:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311574 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 01:51:55 -0000 Author: adrian Date: Sat Jan 7 01:51:54 2017 New Revision: 311574 URL: https://svnweb.freebsd.org/changeset/base/311574 Log: [net80211] add FVHT flags for channel widths. The 11n code uses these bits for both configuration /and/ controlling the channel width on softmac chips - it uses it to find the widest width for all VAPs (eg a HT20 vap and a HT40 vap) to know what to configure the ic_curchan. For fullmac devices it isn't /as/ important, as each virtual device exposed by the firmware will likely have its own configuration and the firmware figures out what to do to enable it. Modified: head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Sat Jan 7 01:49:34 2017 (r311573) +++ head/sys/net80211/ieee80211_var.h Sat Jan 7 01:51:54 2017 (r311574) @@ -653,8 +653,12 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FVEN_BITS "\20" #define IEEE80211_FVHT_VHT 0x000000001 /* CONF: VHT supported */ +#define IEEE80211_FVHT_USEVHT40 0x000000002 /* CONF: Use VHT40 */ +#define IEEE80211_FVHT_USEVHT80 0x000000004 /* CONF: Use VHT80 */ +#define IEEE80211_FVHT_USEVHT80P80 0x000000008 /* CONF: Use VHT 80+80 */ +#define IEEE80211_FVHT_USEVHT160 0x000000010 /* CONF: Use VHT160 */ #define IEEE80211_VFHT_BITS \ - "\20\1VHT" + "\20\1VHT\2VHT40\3VHT80\4VHT80P80\5VHT160" int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3); void ieee80211_ifattach(struct ieee80211com *); @@ -830,6 +834,27 @@ ieee80211_htchanflags(const struct ieee8 } /* + * Calculate VHT channel promotion flags for a channel. + * XXX belongs in ieee80211_vht.h but needs IEEE80211_FVHT_* + */ +static __inline int +ieee80211_vhtchanflags(const struct ieee80211_channel *c) +{ + + if (IEEE80211_IS_CHAN_VHT160(c)) + return IEEE80211_FVHT_USEVHT160; + if (IEEE80211_IS_CHAN_VHT80_80(c)) + return IEEE80211_FVHT_USEVHT80P80; + if (IEEE80211_IS_CHAN_VHT80(c)) + return IEEE80211_FVHT_USEVHT80; + if (IEEE80211_IS_CHAN_VHT40(c)) + return IEEE80211_FVHT_USEVHT40; + if (IEEE80211_IS_CHAN_VHT(c)) + return IEEE80211_FVHT_VHT; + return (0); +} + +/* * Fetch the current TX power (cap) for the given node. * * This includes the node and ic/vap TX power limit as needed, From owner-svn-src-head@freebsd.org Sat Jan 7 01:53:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6178FCA2AC1; Sat, 7 Jan 2017 01:53:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30B821A1A; Sat, 7 Jan 2017 01:53:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v071rRgQ008699; Sat, 7 Jan 2017 01:53:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v071rRRq008698; Sat, 7 Jan 2017 01:53:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070153.v071rRRq008698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 01:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311575 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 01:53:28 -0000 Author: adrian Date: Sat Jan 7 01:53:27 2017 New Revision: 311575 URL: https://svnweb.freebsd.org/changeset/base/311575 Log: [net80211] add VHT node flag; parsed chanwidth. The VHT operational element (VHTOPMODE) isn't a uint32_t - it's the MCS sets, freq1/freq2 parameters and channel width. So, store the channel width too in lieu of just storing the IE struct. This changes the VHT parameter layout in ieee80211_node but it doesn't change ABI at all. Modified: head/sys/net80211/ieee80211_node.h Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Sat Jan 7 01:51:54 2017 (r311574) +++ head/sys/net80211/ieee80211_node.h Sat Jan 7 01:53:27 2017 (r311575) @@ -142,6 +142,7 @@ struct ieee80211_node { #define IEEE80211_NODE_ASSOCID 0x020000 /* xmit requires associd */ #define IEEE80211_NODE_AMSDU_RX 0x040000 /* AMSDU rx enabled */ #define IEEE80211_NODE_AMSDU_TX 0x080000 /* AMSDU tx enabled */ +#define IEEE80211_NODE_VHT 0x100000 /* VHT enabled */ uint16_t ni_associd; /* association ID */ uint16_t ni_vlan; /* vlan tag */ uint16_t ni_txpower; /* current transmit power */ @@ -226,11 +227,13 @@ struct ieee80211_node { /* VHT state */ uint32_t ni_vhtcap; - uint32_t ni_vhtinfo; + uint16_t ni_vht_basicmcs; + uint16_t ni_vht_pad2; struct ieee80211_vht_mcs_info ni_vht_mcsinfo; uint8_t ni_vht_chan1; /* 20/40/80/160 - VHT chan1 */ uint8_t ni_vht_chan2; /* 80+80 - VHT chan2 */ - uint16_t ni_vht_pad1; + uint8_t ni_vht_chanwidth; /* IEEE80211_VHT_CHANWIDTH_ */ + uint8_t ni_vht_pad1; uint32_t ni_vht_spare[8]; /* fast-frames state */ From owner-svn-src-head@freebsd.org Sat Jan 7 01:54:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37B7CCA2BC8; Sat, 7 Jan 2017 01:54:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A1C61BE6; Sat, 7 Jan 2017 01:54:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v071sWNd008777; Sat, 7 Jan 2017 01:54:32 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v071sW3T008776; Sat, 7 Jan 2017 01:54:32 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070154.v071sW3T008776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 01:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311576 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 01:54:33 -0000 Author: adrian Date: Sat Jan 7 01:54:32 2017 New Revision: 311576 URL: https://svnweb.freebsd.org/changeset/base/311576 Log: [net80211] add VHT IEs to scan elements. In preparation for VHT station support, we need to store VHT IEs when scanning so we can choose to upgrade to VHT. This doesn't change the ABI - it just steals spare[] entries. Modified: head/sys/net80211/ieee80211_scan.h Modified: head/sys/net80211/ieee80211_scan.h ============================================================================== --- head/sys/net80211/ieee80211_scan.h Sat Jan 7 01:53:27 2017 (r311575) +++ head/sys/net80211/ieee80211_scan.h Sat Jan 7 01:54:32 2017 (r311576) @@ -250,7 +250,9 @@ struct ieee80211_scanparams { uint8_t *quiet; uint8_t *meshid; uint8_t *meshconf; - uint8_t *spare[3]; + uint8_t *vhtcap; + uint8_t *vhtopmode; + uint8_t *spare[1]; }; /* From owner-svn-src-head@freebsd.org Sat Jan 7 01:56:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF7C9CA2CE1; Sat, 7 Jan 2017 01:56:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3B71DB9; Sat, 7 Jan 2017 01:56:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v071uAJA008910; Sat, 7 Jan 2017 01:56:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v071uAnx008908; Sat, 7 Jan 2017 01:56:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070156.v071uAnx008908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 01:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311577 - head/lib/lib80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 01:56:11 -0000 Author: adrian Date: Sat Jan 7 01:56:10 2017 New Revision: 311577 URL: https://svnweb.freebsd.org/changeset/base/311577 Log: [lib80211] add VHT bands and channel flags. This is preparation work for 11ac support. The regulatory database needs to know about VHT channel flags and 80MHz (and later 160MHz) available channel bands. Whilst here, add the 2GHz VHT band (which is a terrible, terrible vendor extension that almost all vendors do) just in preparation, even though I don't (yet) plan on supporting it. Modified: head/lib/lib80211/lib80211_regdomain.c head/lib/lib80211/lib80211_regdomain.h Modified: head/lib/lib80211/lib80211_regdomain.c ============================================================================== --- head/lib/lib80211/lib80211_regdomain.c Sat Jan 7 01:54:32 2017 (r311576) +++ head/lib/lib80211/lib80211_regdomain.c Sat Jan 7 01:56:10 2017 (r311577) @@ -123,6 +123,10 @@ start_element(void *data, const char *na mt->curband = &mt->rd->bands_11ng; else if (iseq(mode, "11na")) mt->curband = &mt->rd->bands_11na; + else if (iseq(mode, "11ac")) + mt->curband = &mt->rd->bands_11ac; + else if (iseq(mode, "11acg")) + mt->curband = &mt->rd->bands_11acg; else warnx("unknown mode \"%s\" at line %ld", __DECONST(char *, mode), @@ -184,6 +188,14 @@ decode_flag(struct mystate *mt, const ch FLAG(IEEE80211_CHAN_G), FLAG(IEEE80211_CHAN_HT20), FLAG(IEEE80211_CHAN_HT40), + FLAG(IEEE80211_CHAN_VHT20), + FLAG(IEEE80211_CHAN_VHT40), + FLAG(IEEE80211_CHAN_VHT80), + /* + * XXX VHT80_80? This likely should be done by + * 80MHz chan logic in net80211 / ifconfig. + */ + FLAG(IEEE80211_CHAN_VHT160), FLAG(IEEE80211_CHAN_ST), FLAG(IEEE80211_CHAN_TURBO), FLAG(IEEE80211_CHAN_PASSIVE), @@ -515,6 +527,24 @@ lib80211_regdomain_readconfig(struct reg } nb->band = id; } + LIST_FOREACH(nb, &dp->bands_11ac, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11ac band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } + LIST_FOREACH(nb, &dp->bands_11acg, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11acg band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } } LIST_FOREACH(cp, &rdp->countries, next) { id = cp->rd; @@ -562,6 +592,8 @@ lib80211_regdomain_cleanup(struct regdat cleanup_bands(&dp->bands_11a); cleanup_bands(&dp->bands_11ng); cleanup_bands(&dp->bands_11na); + cleanup_bands(&dp->bands_11ac); + cleanup_bands(&dp->bands_11acg); if (dp->name != NULL) free(__DECONST(char *, dp->name)); } Modified: head/lib/lib80211/lib80211_regdomain.h ============================================================================== --- head/lib/lib80211/lib80211_regdomain.h Sat Jan 7 01:54:32 2017 (r311576) +++ head/lib/lib80211/lib80211_regdomain.h Sat Jan 7 01:56:10 2017 (r311577) @@ -75,6 +75,8 @@ struct regdomain { netband_head bands_11a; /* 11a operation */ netband_head bands_11ng;/* 11ng operation */ netband_head bands_11na;/* 11na operation */ + netband_head bands_11ac;/* 11ac 5GHz operation */ + netband_head bands_11acg;/* 11ac 2GHz operation */ LIST_ENTRY(regdomain) next; }; From owner-svn-src-head@freebsd.org Sat Jan 7 01:59:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00E81CA2ED2; Sat, 7 Jan 2017 01:59:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C208C1FDA; Sat, 7 Jan 2017 01:59:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v071xdiS009062; Sat, 7 Jan 2017 01:59:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v071xd46009060; Sat, 7 Jan 2017 01:59:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070159.v071xd46009060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 01:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311578 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 01:59:41 -0000 Author: adrian Date: Sat Jan 7 01:59:39 2017 New Revision: 311578 URL: https://svnweb.freebsd.org/changeset/base/311578 Log: [net80211] add VHT ioctl parameters and driver capabilities * Add the VHT capability element to the driver capabilities so ifconfig can see if VHT is available * Add ioctl plumbing for enabling/disabling VHT and each of the VHT widths. Note: this DOES change the ABI (the driver caps ioctl struct size, sigh) so this will require a recompile of at least ifconfig. Modified: head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_ioctl.h Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Sat Jan 7 01:56:10 2017 (r311577) +++ head/sys/net80211/ieee80211_ioctl.c Sat Jan 7 01:59:39 2017 (r311578) @@ -710,6 +710,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80 dc->dc_drivercaps = ic->ic_caps; dc->dc_cryptocaps = ic->ic_cryptocaps; dc->dc_htcaps = ic->ic_htcaps; + dc->dc_vhtcaps = ic->ic_vhtcaps; ci = &dc->dc_chaninfo; ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans); KASSERT(ci->ic_nchans <= maxchans, @@ -1135,6 +1136,22 @@ ieee80211_ioctl_get80211(struct ieee8021 if (vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) ireq->i_val |= 2; break; + + /* VHT */ + case IEEE80211_IOC_VHTCONF: + ireq->i_val = 0; + if (vap->iv_flags_vht & IEEE80211_FVHT_VHT) + ireq->i_val |= 1; + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40) + ireq->i_val |= 2; + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80) + ireq->i_val |= 4; + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80) + ireq->i_val |= 8; + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160) + ireq->i_val |= 16; + break; + default: error = ieee80211_ioctl_getdefault(vap, ireq); break; @@ -1869,6 +1886,8 @@ findchannel(struct ieee80211com *ic, int /* NB: handled specially below */ [IEEE80211_MODE_11NA] = IEEE80211_CHAN_A, [IEEE80211_MODE_11NG] = IEEE80211_CHAN_G, + [IEEE80211_MODE_VHT_5GHZ] = IEEE80211_CHAN_A, + [IEEE80211_MODE_VHT_2GHZ] = IEEE80211_CHAN_G, }; u_int modeflags; int i; @@ -1893,11 +1912,27 @@ findchannel(struct ieee80211com *ic, int !find11gchannel(ic, i, c->ic_freq)) return c; } else { - /* must check HT specially */ + /* must check VHT specifically */ + if ((mode == IEEE80211_MODE_VHT_5GHZ || + mode == IEEE80211_MODE_VHT_2GHZ) && + !IEEE80211_IS_CHAN_VHT(c)) + continue; + + /* + * Must check HT specially - only match on HT, + * not HT+VHT channels + */ if ((mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) && !IEEE80211_IS_CHAN_HT(c)) continue; + + if ((mode == IEEE80211_MODE_11NA || + mode == IEEE80211_MODE_11NG) && + IEEE80211_IS_CHAN_VHT(c)) + continue; + + /* Check that the modeflags above match */ if ((c->ic_flags & modeflags) == modeflags) return c; } @@ -2021,6 +2056,7 @@ ieee80211_ioctl_setchannel(struct ieee80 if (c == NULL) return EINVAL; } + /* * Fine tune channel selection based on desired mode: * if 11b is requested, find the 11b version of any @@ -2031,6 +2067,9 @@ ieee80211_ioctl_setchannel(struct ieee80 * 11a channel returned, * if 11ng is requested, find the ht version of any * 11g channel returned, + * if 11ac is requested, find the 11ac version + * of any 11a/11na channel returned, + * (TBD) 11acg (2GHz VHT) * otherwise we should be ok with what we've got. */ switch (vap->iv_des_mode) { @@ -2067,6 +2106,17 @@ ieee80211_ioctl_setchannel(struct ieee80 c = c2; } break; + case IEEE80211_MODE_VHT_2GHZ: + printf("%s: TBD\n", __func__); + break; + case IEEE80211_MODE_VHT_5GHZ: + if (IEEE80211_IS_CHAN_A(c)) { + c2 = findchannel(ic, ireq->i_val, + IEEE80211_MODE_VHT_5GHZ); + if (c2 != NULL) + c = c2; + } + break; default: /* NB: no static turboG */ break; } @@ -2092,6 +2142,7 @@ ieee80211_ioctl_setcurchan(struct ieee80 error = copyin(ireq->i_data, &chan, sizeof(chan)); if (error != 0) return error; + /* XXX 0xffff overflows 16-bit signed */ if (chan.ic_freq == 0 || chan.ic_freq == IEEE80211_CHAN_ANY) { c = IEEE80211_CHAN_ANYC; @@ -3321,6 +3372,37 @@ ieee80211_ioctl_set80211(struct ieee8021 if (isvapht(vap)) error = ERESTART; break; + + /* VHT */ + case IEEE80211_IOC_VHTCONF: + if (ireq->i_val & 1) + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_VHT); + else + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_VHT); + + if (ireq->i_val & 2) + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT40); + else + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT40); + + if (ireq->i_val & 4) + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT80); + else + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT80); + + if (ireq->i_val & 8) + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT80P80); + else + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT80P80); + + if (ireq->i_val & 16) + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT160); + else + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT160); + + error = ENETRESET; + break; + default: error = ieee80211_ioctl_setdefault(vap, ireq); break; Modified: head/sys/net80211/ieee80211_ioctl.h ============================================================================== --- head/sys/net80211/ieee80211_ioctl.h Sat Jan 7 01:56:10 2017 (r311577) +++ head/sys/net80211/ieee80211_ioctl.h Sat Jan 7 01:59:39 2017 (r311578) @@ -556,6 +556,7 @@ struct ieee80211_devcaps_req { uint32_t dc_drivercaps; /* general driver caps */ uint32_t dc_cryptocaps; /* hardware crypto support */ uint32_t dc_htcaps; /* HT/802.11n support */ + uint32_t dc_vhtcaps; /* VHT/802.11ac capabilities */ struct ieee80211req_chaninfo dc_chaninfo; }; #define IEEE80211_DEVCAPS_SIZE(_nchan) \ @@ -704,6 +705,9 @@ struct ieee80211req { #define IEEE80211_IOC_STBC 113 /* STBC Tx/RX (on, off) */ #define IEEE80211_IOC_LDPC 114 /* LDPC Tx/RX (on, off) */ +/* VHT */ +#define IEEE80211_IOC_VHTCONF 130 /* VHT config (off, on; widths) */ + #define IEEE80211_IOC_MESH_ID 170 /* mesh identifier */ #define IEEE80211_IOC_MESH_AP 171 /* accepting peerings */ #define IEEE80211_IOC_MESH_FWRD 172 /* forward frames */ From owner-svn-src-head@freebsd.org Sat Jan 7 02:07:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7137CA32A6; Sat, 7 Jan 2017 02:07:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7239C15DD; Sat, 7 Jan 2017 02:07:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07275sF012868; Sat, 7 Jan 2017 02:07:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07275AV012867; Sat, 7 Jan 2017 02:07:05 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070207.v07275AV012867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 02:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311579 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 02:07:06 -0000 Author: adrian Date: Sat Jan 7 02:07:05 2017 New Revision: 311579 URL: https://svnweb.freebsd.org/changeset/base/311579 Log: [ifconfig] add initial VHT (802.11ac) configuration and channel support to ifconfig. This is very preliminary and mostly enough for me (with other patches) to work on VHT support. It adds: * VHT20, VHT40 and VHT80 regulatory/band awareness * VHT20, VHT40 and VHT80 channel configuration / population * Parses vht channel specifications (eg ifconfig wlan0 create wlandev athp0 wlanmode monitor channel 36:vht/80) * Configuration of VHT, VHT40, VHT80, VHT80+80, VHT160 channel width (IEEE80211_FVHT_VHT* flags in net80211) TODO: * No VHT80+80 or VHT160 channels yet - I don't yet have hardware, and I'm not yet sure how to support/populate VHT80+80 channels. * No, I won't update the manpage until this is "more done", lest someone tries using vht and gets upset with me. * No, I won't commit the regulatory database I'm testing with, so you'll just end up with no VHT channels ever populated. Which is good, as there isn't an 11ac driver in-tree yet to try it with. Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sat Jan 7 01:59:39 2017 (r311578) +++ head/sbin/ifconfig/ifieee80211.c Sat Jan 7 02:07:05 2017 (r311579) @@ -119,6 +119,7 @@ #define IEEE80211_NODE_ASSOCID 0x020000 /* xmit requires associd */ #define IEEE80211_NODE_AMSDU_RX 0x040000 /* AMSDU rx enabled */ #define IEEE80211_NODE_AMSDU_TX 0x080000 /* AMSDU tx enabled */ +#define IEEE80211_NODE_VHT 0x100000 /* VHT enabled */ #endif #define MAXCHAN 1536 /* max 1.5K channels */ @@ -143,7 +144,9 @@ static const char *modename[IEEE80211_MO [IEEE80211_MODE_11NA] = "11na", [IEEE80211_MODE_11NG] = "11ng", [IEEE80211_MODE_HALF] = "half", - [IEEE80211_MODE_QUARTER] = "quarter" + [IEEE80211_MODE_QUARTER] = "quarter", + [IEEE80211_MODE_VHT_2GHZ] = "11acg", + [IEEE80211_MODE_VHT_5GHZ] = "11ac", }; static void set80211(int s, int type, int val, int len, void *data); @@ -183,6 +186,20 @@ gethtconf(int s) gothtconf = 1; } +/* VHT */ +static int vhtconf = 0; +static int gotvhtconf = 0; + +static void +getvhtconf(int s) +{ + if (gotvhtconf) + return; + if (get80211val(s, IEEE80211_IOC_VHTCONF, &vhtconf) < 0) + warn("unable to get VHT configuration information"); + gotvhtconf = 1; +} + /* * Collect channel info from the kernel. We use this (mostly) * to handle mapping between frequency and IEEE channel number. @@ -200,6 +217,7 @@ getchaninfo(int s) err(1, "unable to get channel information"); ifmr = ifmedia_getstate(s); gethtconf(s); + getvhtconf(s); } static struct regdata * @@ -255,6 +273,9 @@ canpromote(int i, int from, int to) * channe list (e.g. mode 11a); we want to honor that to avoid * confusing behaviour. */ +/* + * XXX VHT + */ static int promote(int i) { @@ -361,6 +382,10 @@ getcurchan(int s) static enum ieee80211_phymode chan2mode(const struct ieee80211_channel *c) { + if (IEEE80211_IS_CHAN_VHTA(c)) + return IEEE80211_MODE_VHT_5GHZ; + if (IEEE80211_IS_CHAN_VHTG(c)) + return IEEE80211_MODE_VHT_2GHZ; if (IEEE80211_IS_CHAN_HTA(c)) return IEEE80211_MODE_11NA; if (IEEE80211_IS_CHAN_HTG(c)) @@ -502,9 +527,12 @@ setregdomain_cb(int s, void *arg) printf("drivercaps: 0x%x\n", dc->dc_drivercaps); printf("cryptocaps: 0x%x\n", dc->dc_cryptocaps); printf("htcaps : 0x%x\n", dc->dc_htcaps); + printf("vhtcaps : 0x%x\n", dc->dc_vhtcaps); +#if 0 memcpy(chaninfo, &dc->dc_chaninfo, IEEE80211_CHANINFO_SPACE(&dc->dc_chaninfo)); print_channels(s, &dc->dc_chaninfo, 1/*allchans*/, 1/*verbose*/); +#endif } #endif req = malloc(IEEE80211_REGDOMAIN_SIZE(dc->dc_chaninfo.ic_nchans)); @@ -616,6 +644,7 @@ getchannelflags(const char *val, int fre #define _CHAN_HT 0x80000000 const char *cp; int flags; + int is_vht = 0; flags = 0; @@ -636,6 +665,9 @@ getchannelflags(const char *val, int fre case 'g': /* 802.11g */ flags |= IEEE80211_CHAN_G; break; + case 'v': /* vht: 802.11ac */ + is_vht = 1; + /* Fallthrough */ case 'h': /* ht = 802.11n */ case 'n': /* 802.11n */ flags |= _CHAN_HT; /* NB: private */ @@ -674,6 +706,15 @@ getchannelflags(const char *val, int fre flags |= IEEE80211_CHAN_HT20; break; case 40: + case 80: + case 160: + /* Handle the 80/160 VHT flag */ + if (cw == 80) + flags |= IEEE80211_CHAN_VHT80; + else if (cw == 160) + flags |= IEEE80211_CHAN_VHT160; + + /* Fallthrough */ if (ep != NULL && *ep == '+') flags |= IEEE80211_CHAN_HT40U; else if (ep != NULL && *ep == '-') @@ -683,6 +724,7 @@ getchannelflags(const char *val, int fre errx(-1, "%s: Invalid channel width\n", val); } } + /* * Cleanup specifications. */ @@ -695,6 +737,7 @@ getchannelflags(const char *val, int fre * are also usable for legacy operation; e.g. freq:n/40. */ flags &= ~IEEE80211_CHAN_HT; + flags &= ~IEEE80211_CHAN_VHT; } else { /* * Remove private indicator that this is an HT channel @@ -714,6 +757,25 @@ getchannelflags(const char *val, int fre mapchan(&chan, freq, 0); flags |= (chan.ic_flags & IEEE80211_CHAN_HT); } + + /* + * If VHT is enabled, then also set the VHT flag and the + * relevant channel up/down. + */ + if (is_vht && (flags & IEEE80211_CHAN_HT)) { + /* + * XXX yes, maybe we should just have VHT, and reuse + * HT20/HT40U/HT40D + */ + if (flags & IEEE80211_CHAN_VHT80) + ; + else if (flags & IEEE80211_CHAN_HT20) + flags |= IEEE80211_CHAN_VHT20; + else if (flags & IEEE80211_CHAN_HT40U) + flags |= IEEE80211_CHAN_VHT40U; + else if (flags & IEEE80211_CHAN_HT40D) + flags |= IEEE80211_CHAN_VHT40D; + } } return flags; #undef _CHAN_HT @@ -1447,6 +1509,10 @@ getmodeflags(const char *val) case 'q': /* 1/4-width channels */ flags |= IEEE80211_CHAN_QUARTER; break; + case 'v': + /* XXX set HT too? */ + flags |= IEEE80211_CHAN_VHT; + break; default: errx(-1, "%s: Invalid mode attribute %c\n", val, *cp); @@ -1863,6 +1929,21 @@ set80211rifs(const char *val, int d, int set80211(s, IEEE80211_IOC_RIFS, d, 0, NULL); } +static void +set80211vhtconf(const char *val, int d, int s, const struct afswtch *rafp) +{ + if (get80211val(s, IEEE80211_IOC_VHTCONF, &vhtconf) < 0) + errx(-1, "cannot set VHT setting"); + printf("%s: vhtconf=0x%08x, d=%d\n", __func__, vhtconf, d); + if (d < 0) { + d = -d; + vhtconf &= ~d; + } else + vhtconf |= d; + printf("%s: vhtconf is now 0x%08x\n", __func__, vhtconf); + set80211(s, IEEE80211_IOC_VHTCONF, vhtconf, 0, NULL); +} + static DECL_CMD_FUNC(set80211tdmaslot, val, d) { @@ -2035,6 +2116,7 @@ regdomain_addchans(struct ieee80211req_c hi_adj = (chanFlags & IEEE80211_CHAN_HT40U) ? -20 : 0; lo_adj = (chanFlags & IEEE80211_CHAN_HT40D) ? 20 : 0; channelSep = (chanFlags & IEEE80211_CHAN_2GHZ) ? 0 : 40; + LIST_FOREACH(nb, bands, next) { b = nb->band; if (verbose) { @@ -2045,6 +2127,7 @@ regdomain_addchans(struct ieee80211req_c putchar('\n'); } prev = NULL; + for (freq = b->freqStart + lo_adj; freq <= b->freqEnd + hi_adj; freq += b->chanSep) { /* @@ -2055,6 +2138,40 @@ regdomain_addchans(struct ieee80211req_c * then constrained according by channel separation. */ flags = nb->flags | b->flags; + + /* + * VHT first - HT is a subset. + * + * XXX TODO: VHT80p80, VHT160 is not yet done. + */ + if (flags & IEEE80211_CHAN_VHT) { + if ((chanFlags & IEEE80211_CHAN_VHT20) && + (flags & IEEE80211_CHAN_VHT20) == 0) { + if (verbose) + printf("%u: skip, not a " + "VHT20 channel\n", freq); + continue; + } + if ((chanFlags & IEEE80211_CHAN_VHT40) && + (flags & IEEE80211_CHAN_VHT40) == 0) { + if (verbose) + printf("%u: skip, not a " + "VHT40 channel\n", freq); + continue; + } + if ((chanFlags & IEEE80211_CHAN_VHT80) && + (flags & IEEE80211_CHAN_VHT80) == 0) { + if (verbose) + printf("%u: skip, not a " + "VHT80 channel\n", freq); + continue; + } + + flags &= ~IEEE80211_CHAN_VHT; + flags |= chanFlags & IEEE80211_CHAN_VHT; + } + + /* Now, constrain HT */ if (flags & IEEE80211_CHAN_HT) { /* * HT channels are generated specially; we're @@ -2127,7 +2244,7 @@ regdomain_addchans(struct ieee80211req_c memset(c, 0, sizeof(*c)); c->ic_freq = freq; c->ic_flags = flags; - if (c->ic_flags & IEEE80211_CHAN_DFS) + if (c->ic_flags & IEEE80211_CHAN_DFS) c->ic_maxregpower = nb->maxPowerDFS; else c->ic_maxregpower = nb->maxPower; @@ -2204,6 +2321,40 @@ regdomain_makechannels( &dc->dc_chaninfo); } } + if (!LIST_EMPTY(&rd->bands_11ac) && dc->dc_vhtcaps != 0) { + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT20 | + IEEE80211_CHAN_VHT20, + &dc->dc_chaninfo); + + /* VHT40 is a function of HT40.. */ + if (dc->dc_htcaps & IEEE80211_HTCAP_CHWIDTH40) { + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT40U, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT40D, + &dc->dc_chaninfo); + } + + /* VHT80 */ + /* XXX dc_vhtcap? */ + if (1) { + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT80, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT80, + &dc->dc_chaninfo); + } + + /* XXX TODO: VHT80_80, VHT160 */ + } + if (!LIST_EMPTY(&rd->bands_11ng) && dc->dc_htcaps != 0) { regdomain_addchans(ci, &rd->bands_11ng, reg, IEEE80211_CHAN_G | IEEE80211_CHAN_HT20, @@ -2435,6 +2586,8 @@ getflags(int flags) if (flags & IEEE80211_NODE_HTCOMPAT) *cp++ = '+'; } + if (flags & IEEE80211_NODE_VHT) + *cp++ = 'V'; if (flags & IEEE80211_NODE_WPS) *cp++ = 'W'; if (flags & IEEE80211_NODE_TSN) @@ -3574,14 +3727,31 @@ get_chaninfo(const struct ieee80211_chan if (IEEE80211_IS_CHAN_TURBO(c)) strlcat(buf, " Turbo", bsize); if (precise) { - if (IEEE80211_IS_CHAN_HT20(c)) + /* XXX should make VHT80U, VHT80D */ + if (IEEE80211_IS_CHAN_VHT80(c) && + IEEE80211_IS_CHAN_HT40D(c)) + strlcat(buf, " vht/80-", bsize); + else if (IEEE80211_IS_CHAN_VHT80(c) && + IEEE80211_IS_CHAN_HT40U(c)) + strlcat(buf, " vht/80+", bsize); + else if (IEEE80211_IS_CHAN_VHT80(c)) + strlcat(buf, " vht/80", bsize); + else if (IEEE80211_IS_CHAN_VHT40D(c)) + strlcat(buf, " vht/40-", bsize); + else if (IEEE80211_IS_CHAN_VHT40U(c)) + strlcat(buf, " vht/40+", bsize); + else if (IEEE80211_IS_CHAN_VHT20(c)) + strlcat(buf, " vht/20", bsize); + else if (IEEE80211_IS_CHAN_HT20(c)) strlcat(buf, " ht/20", bsize); else if (IEEE80211_IS_CHAN_HT40D(c)) strlcat(buf, " ht/40-", bsize); else if (IEEE80211_IS_CHAN_HT40U(c)) strlcat(buf, " ht/40+", bsize); } else { - if (IEEE80211_IS_CHAN_HT(c)) + if (IEEE80211_IS_CHAN_VHT(c)) + strlcat(buf, " vht", bsize); + else if (IEEE80211_IS_CHAN_HT(c)) strlcat(buf, " ht", bsize); } return buf; @@ -3612,6 +3782,16 @@ print_chaninfo(const struct ieee80211_ch static int chanpref(const struct ieee80211_channel *c) { + if (IEEE80211_IS_CHAN_VHT160(c)) + return 80; + if (IEEE80211_IS_CHAN_VHT80_80(c)) + return 75; + if (IEEE80211_IS_CHAN_VHT80(c)) + return 70; + if (IEEE80211_IS_CHAN_VHT40(c)) + return 60; + if (IEEE80211_IS_CHAN_VHT20(c)) + return 50; if (IEEE80211_IS_CHAN_HT40(c)) return 40; if (IEEE80211_IS_CHAN_HT20(c)) @@ -3807,6 +3987,11 @@ list_capabilities(int s) putchar('\n'); printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS); } + if (dc->dc_vhtcaps != 0 || verbose) { + putchar('\n'); + printb("vhtcaps", dc->dc_vhtcaps, IEEE80211_VHTCAP_BITS); + } + putchar('\n'); if (verbose) { chaninfo = &dc->dc_chaninfo; /* XXX */ @@ -4847,6 +5032,30 @@ end: } } + if (IEEE80211_IS_CHAN_VHT(c) || verbose) { + getvhtconf(s); + if (vhtconf & 0x1) + LINE_CHECK("vht"); + else + LINE_CHECK("-vht"); + if (vhtconf & 0x2) + LINE_CHECK("vht40"); + else + LINE_CHECK("-vht40"); + if (vhtconf & 0x4) + LINE_CHECK("vht80"); + else + LINE_CHECK("-vht80"); + if (vhtconf & 0x8) + LINE_CHECK("vht80p80"); + else + LINE_CHECK("-vht80p80"); + if (vhtconf & 0x10) + LINE_CHECK("vht160"); + else + LINE_CHECK("-vht160"); + } + if (get80211val(s, IEEE80211_IOC_WME, &wme) != -1) { if (wme) LINE_CHECK("wme"); @@ -5426,6 +5635,16 @@ static struct cmd ieee80211_cmds[] = { DEF_CMD("-ht40", 0, set80211htconf), DEF_CMD("ht", 3, set80211htconf), /* NB: 20+40 */ DEF_CMD("-ht", 0, set80211htconf), + DEF_CMD("vht", 1, set80211vhtconf), + DEF_CMD("-vht", 0, set80211vhtconf), + DEF_CMD("vht40", 2, set80211vhtconf), + DEF_CMD("-vht40", -2, set80211vhtconf), + DEF_CMD("vht80", 4, set80211vhtconf), + DEF_CMD("-vht80", -4, set80211vhtconf), + DEF_CMD("vht80p80", 8, set80211vhtconf), + DEF_CMD("-vht80p80", -8, set80211vhtconf), + DEF_CMD("vht160", 16, set80211vhtconf), + DEF_CMD("-vht160", -16, set80211vhtconf), DEF_CMD("rifs", 1, set80211rifs), DEF_CMD("-rifs", 0, set80211rifs), DEF_CMD("smps", IEEE80211_HTCAP_SMPS_ENA, set80211smps), From owner-svn-src-head@freebsd.org Sat Jan 7 02:16:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E967CCA383B; Sat, 7 Jan 2017 02:16:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B99B01C1E; Sat, 7 Jan 2017 02:16:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v072GmcD016913; Sat, 7 Jan 2017 02:16:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v072Gmc2016912; Sat, 7 Jan 2017 02:16:48 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070216.v072Gmc2016912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 02:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311580 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 02:16:50 -0000 Author: adrian Date: Sat Jan 7 02:16:48 2017 New Revision: 311580 URL: https://svnweb.freebsd.org/changeset/base/311580 Log: [net80211] add some more bits. Modified: head/sys/net80211/ieee80211.h Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Sat Jan 7 02:07:05 2017 (r311579) +++ head/sys/net80211/ieee80211.h Sat Jan 7 02:16:48 2017 (r311580) @@ -830,10 +830,13 @@ struct ieee80211_ie_vht_operation { #define IEEE80211_VHTCAP_RX_ANTENNA_PATTERN 0x10000000 #define IEEE80211_VHTCAP_TX_ANTENNA_PATTERN 0x20000000 +/* + * XXX TODO: add the rest of the bits + */ #define IEEE80211_VHTCAP_BITS \ "\20\1MPDU7991\2MPDU11454\3CHAN160\4CHAN8080\5RXLDPC\6SHORTGI80" \ "\7SHORTGI160\10RXSTBC1\11RXSTBC2\12RXSTBC3\13RXSTBC4\14BFERCAP" \ - "\15BFEECAP\27VHT" + "\15BFEECAP\27VHT\37RXANTPTN\40TXANTPTN" /* * VHT Transmit Power Envelope element - 802.11ac-2013 8.4.2.164 From owner-svn-src-head@freebsd.org Sat Jan 7 04:57:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22D04CA3FBC; Sat, 7 Jan 2017 04:57:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E878D168D; Sat, 7 Jan 2017 04:57:22 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v074vMkp082050; Sat, 7 Jan 2017 04:57:22 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v074vMHB082049; Sat, 7 Jan 2017 04:57:22 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201701070457.v074vMHB082049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 7 Jan 2017 04:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311581 - head/usr.bin/users X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 04:57:23 -0000 Author: allanjude Date: Sat Jan 7 04:57:21 2017 New Revision: 311581 URL: https://svnweb.freebsd.org/changeset/base/311581 Log: Capsicum: add capability mode to users binary Submitted by: Tyler Littlefield Reviewed by: cem, oshogbo Differential Revision: https://reviews.freebsd.org/D9046 Modified: head/usr.bin/users/users.cc Modified: head/usr.bin/users/users.cc ============================================================================== --- head/usr.bin/users/users.cc Sat Jan 7 02:16:48 2017 (r311580) +++ head/usr.bin/users/users.cc Sat Jan 7 04:57:21 2017 (r311581) @@ -27,9 +27,12 @@ * SUCH DAMAGE. */ +#include #include __FBSDID("$FreeBSD$"); +#include +#include #include #include @@ -51,6 +54,10 @@ main(int argc, char **) } setutxent(); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "Failed to enter capability mode."); + while ((ut = getutxent()) != NULL) if (ut->ut_type == USER_PROCESS) names.insert(ut->ut_user); From owner-svn-src-head@freebsd.org Sat Jan 7 05:41:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B4BFCA2384; Sat, 7 Jan 2017 05:41:47 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EBBF1B7F; Sat, 7 Jan 2017 05:41:46 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id Pjl4cG8jLW5f5Pjl5cUq7Q; Fri, 06 Jan 2017 22:41:39 -0700 X-Authority-Analysis: v=2.2 cv=IOdyMknG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=IgFoBzBjUZAA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=tgAb9Q3GBywBYEuO_zsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id D99151896; Fri, 6 Jan 2017 21:41:37 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v075fbbv044042; Fri, 6 Jan 2017 21:41:37 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201701070541.v075fbbv044042@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: John Baldwin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311568 - in head/sys: kern sys In-Reply-To: Message from John Baldwin of "Fri, 06 Jan 2017 23:41:45 +0000." <201701062341.v06NfjkL054505@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 06 Jan 2017 21:41:37 -0800 X-CMAE-Envelope: MS4wfGypuM1Ye1PCdukwZ319slfdIAYayPeXxHvqzmXoDMg9PdYiJ31bfxNS8c/7eGf7ZEiKbixyTENPe43EcT6UWgWekG0oyU3OQDjlDgKf9aaCxc8FB3Qu x7z4HFqGexXpQnZxUrThIZvylvYoa6vfx3qQymN1nAKDHoZEj3ZQT1BenHBzMicoEAjYEgAWOqdRr2nh9aBg/ivzRaPTf8g7U6e1VR4wQo96IF8SK6/Amr2r wh8H0fVhAjqXtBVYACNvQyA3yjiOhpStcFqTCNIDkhJ/6bijfjih9rL/q7ZBWs85 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 05:41:47 -0000 In message <201701062341.v06NfjkL054505@repo.freebsd.org>, John Baldwin writes: > Author: jhb > Date: Fri Jan 6 23:41:45 2017 > New Revision: 311568 > URL: https://svnweb.freebsd.org/changeset/base/311568 > > Log: > Set MORETOCOME for AIO write requests on a socket. > > Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend* > set PRUS_MOREOTOCOME when invoking the protocol send method. The aio > worker tasks for sending on a socket set this flag when there are > additional write jobs waiting on the socket buffer. > > Reviewed by: adrian > MFC after: 1 month > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D8955 > > Modified: > head/sys/kern/sys_socket.c > head/sys/kern/uipc_socket.c > head/sys/sys/socket.h > > Modified: head/sys/kern/sys_socket.c > ============================================================================= > = > --- head/sys/kern/sys_socket.c Fri Jan 6 23:30:54 2017 (r31156 > 7) > +++ head/sys/kern/sys_socket.c Fri Jan 6 23:41:45 2017 (r31156 > 8) > @@ -604,6 +604,8 @@ retry: > if (td->td_ru.ru_msgrcv != ru_before) > job->msgrcv = 1; > } else { > + if (!TAILQ_EMPTY(&sb->sb_aiojobq)) > + flags |= MSG_MORETOCOME; > uio.uio_rw = UIO_WRITE; > ru_before = td->td_ru.ru_msgsnd; > #ifdef MAC > > Modified: head/sys/kern/uipc_socket.c > ============================================================================= > = > --- head/sys/kern/uipc_socket.c Fri Jan 6 23:30:54 2017 (r31156 > 7) > +++ head/sys/kern/uipc_socket.c Fri Jan 6 23:41:45 2017 (r31156 > 8) > @@ -1182,6 +1182,7 @@ sosend_dgram(struct socket *so, struct s > (resid <= 0)) ? > PRUS_EOF : > /* If there is more to send set PRUS_MORETOCOME */ > + (flags & MSG_MORETOCOME) || > (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, > top, addr, control, td); > if (dontroute) { > @@ -1368,6 +1369,7 @@ restart: > (resid <= 0)) ? > PRUS_EOF : > /* If there is more to send set PRUS_MORETOCOME. */ > + (flags & MSG_MORETOCOME) || > (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, > top, addr, control, td); > if (dontroute) { > > Modified: head/sys/sys/socket.h > ============================================================================= > = > --- head/sys/sys/socket.h Fri Jan 6 23:30:54 2017 (r311567) > +++ head/sys/sys/socket.h Fri Jan 6 23:41:45 2017 (r311568) > @@ -435,6 +435,7 @@ struct msghdr { > #endif > #ifdef _KERNEL > #define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks > - soreceive (TCP) */ > +#define MSG_MORETOCOME 0x20000 /* additional data pending */ This broke buildworld. It needs to be after the #endif below. > #endif > > /* > > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat Jan 7 05:46:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24E21CA2721; Sat, 7 Jan 2017 05:46:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CEAD61DF6; Sat, 7 Jan 2017 05:46:22 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id Pjpbc2WJMBSTMPjpccI7YG; Fri, 06 Jan 2017 22:46:20 -0700 X-Authority-Analysis: v=2.2 cv=MKYQoIRl c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=IgFoBzBjUZAA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=YuQMQudxoms_l3NowE4A:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 218E218B2; Fri, 6 Jan 2017 21:46:19 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v075kIGD052277; Fri, 6 Jan 2017 21:46:18 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201701070546.v075kIGD052277@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Adrian Chadd cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311578 - head/sys/net80211 In-Reply-To: Message from Adrian Chadd of "Sat, 07 Jan 2017 01:59:39 +0000." <201701070159.v071xd46009060@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 06 Jan 2017 21:46:18 -0800 X-CMAE-Envelope: MS4wfPq1JLOFe+xS9oGnz1lhs1cVU6Ne1pL+Fhft+jeFSNKJ/xfrvg+T103KDjAzS850OnKzuwuCDud6PfuVDGsEqIAogUjXeIToQx/f6d65vFcXbFGhgdcN Mj6F4iKoFw9PBomzo5BDGzkEONqu/s6LtmxdFkv/TXc8Aipus8fEzXsh8eMCgCzVdUhxlaa1bT9SOelSW3+Xj5vP1RI1C4t8WL6dM8I6oklKtnSYeStqu3NS m7l7MC0J9kUanJBNMCPhTOTygleGUkgKl8wM7A5vzprkmmoVcDTL3d3L1WmGf3sj X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 05:46:23 -0000 In message <201701070159.v071xd46009060@repo.freebsd.org>, Adrian Chadd writes: > Author: adrian > Date: Sat Jan 7 01:59:39 2017 > New Revision: 311578 > URL: https://svnweb.freebsd.org/changeset/base/311578 > > Log: > [net80211] add VHT ioctl parameters and driver capabilities > > * Add the VHT capability element to the driver capabilities so ifconfig > can see if VHT is available > * Add ioctl plumbing for enabling/disabling VHT and each of the VHT > widths. > > Note: this DOES change the ABI (the driver caps ioctl struct size, sigh) > so this will require a recompile of at least ifconfig. > > Modified: > head/sys/net80211/ieee80211_ioctl.c > head/sys/net80211/ieee80211_ioctl.h > > Modified: head/sys/net80211/ieee80211_ioctl.c > ============================================================================= > = > --- head/sys/net80211/ieee80211_ioctl.c Sat Jan 7 01:56:10 2017 > (r311577) > +++ head/sys/net80211/ieee80211_ioctl.c Sat Jan 7 01:59:39 2017 > (r311578) > @@ -710,6 +710,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80 > dc->dc_drivercaps = ic->ic_caps; > dc->dc_cryptocaps = ic->ic_cryptocaps; > dc->dc_htcaps = ic->ic_htcaps; > + dc->dc_vhtcaps = ic->ic_vhtcaps; > ci = &dc->dc_chaninfo; > ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans); > KASSERT(ci->ic_nchans <= maxchans, > @@ -1135,6 +1136,22 @@ ieee80211_ioctl_get80211(struct ieee8021 > if (vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) > ireq->i_val |= 2; > break; > + > + /* VHT */ > + case IEEE80211_IOC_VHTCONF: > + ireq->i_val = 0; > + if (vap->iv_flags_vht & IEEE80211_FVHT_VHT) > + ireq->i_val |= 1; > + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40) > + ireq->i_val |= 2; > + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80) > + ireq->i_val |= 4; > + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80) > + ireq->i_val |= 8; > + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160) > + ireq->i_val |= 16; > + break; > + > default: > error = ieee80211_ioctl_getdefault(vap, ireq); > break; > @@ -1869,6 +1886,8 @@ findchannel(struct ieee80211com *ic, int > /* NB: handled specially below */ > [IEEE80211_MODE_11NA] = IEEE80211_CHAN_A, > [IEEE80211_MODE_11NG] = IEEE80211_CHAN_G, > + [IEEE80211_MODE_VHT_5GHZ] = IEEE80211_CHAN_A, > + [IEEE80211_MODE_VHT_2GHZ] = IEEE80211_CHAN_G, > }; > u_int modeflags; > int i; > @@ -1893,11 +1912,27 @@ findchannel(struct ieee80211com *ic, int > !find11gchannel(ic, i, c->ic_freq)) > return c; > } else { > - /* must check HT specially */ > + /* must check VHT specifically */ > + if ((mode == IEEE80211_MODE_VHT_5GHZ || > + mode == IEEE80211_MODE_VHT_2GHZ) && > + !IEEE80211_IS_CHAN_VHT(c)) > + continue; > + > + /* > + * Must check HT specially - only match on HT, > + * not HT+VHT channels > + */ > if ((mode == IEEE80211_MODE_11NA || > mode == IEEE80211_MODE_11NG) && > !IEEE80211_IS_CHAN_HT(c)) > continue; > + > + if ((mode == IEEE80211_MODE_11NA || > + mode == IEEE80211_MODE_11NG) && > + IEEE80211_IS_CHAN_VHT(c)) > + continue; > + > + /* Check that the modeflags above match */ > if ((c->ic_flags & modeflags) == modeflags) > return c; > } > @@ -2021,6 +2056,7 @@ ieee80211_ioctl_setchannel(struct ieee80 > if (c == NULL) > return EINVAL; > } > + > /* > * Fine tune channel selection based on desired mode: > * if 11b is requested, find the 11b version of any > @@ -2031,6 +2067,9 @@ ieee80211_ioctl_setchannel(struct ieee80 > * 11a channel returned, > * if 11ng is requested, find the ht version of any > * 11g channel returned, > + * if 11ac is requested, find the 11ac version > + * of any 11a/11na channel returned, > + * (TBD) 11acg (2GHz VHT) > * otherwise we should be ok with what we've got. > */ > switch (vap->iv_des_mode) { > @@ -2067,6 +2106,17 @@ ieee80211_ioctl_setchannel(struct ieee80 > c = c2; > } > break; > + case IEEE80211_MODE_VHT_2GHZ: > + printf("%s: TBD\n", __func__); > + break; > + case IEEE80211_MODE_VHT_5GHZ: > + if (IEEE80211_IS_CHAN_A(c)) { > + c2 = findchannel(ic, ireq->i_val, > + IEEE80211_MODE_VHT_5GHZ); > + if (c2 != NULL) > + c = c2; > + } > + break; > default: /* NB: no static turboG */ > break; > } > @@ -2092,6 +2142,7 @@ ieee80211_ioctl_setcurchan(struct ieee80 > error = copyin(ireq->i_data, &chan, sizeof(chan)); > if (error != 0) > return error; > + > /* XXX 0xffff overflows 16-bit signed */ > if (chan.ic_freq == 0 || chan.ic_freq == IEEE80211_CHAN_ANY) { > c = IEEE80211_CHAN_ANYC; > @@ -3321,6 +3372,37 @@ ieee80211_ioctl_set80211(struct ieee8021 > if (isvapht(vap)) > error = ERESTART; > break; > + > + /* VHT */ > + case IEEE80211_IOC_VHTCONF: > + if (ireq->i_val & 1) > + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_VHT); > + else > + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_VHT); > + > + if (ireq->i_val & 2) > + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT40); > + else > + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT40); > + > + if (ireq->i_val & 4) > + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT80); > + else > + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT80); > + > + if (ireq->i_val & 8) > + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT80P80) > ; > + else > + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT80P80 > ); > + > + if (ireq->i_val & 16) > + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT160); > + else > + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT160); Buildkernel is broken. Should these calls be to ieee80211_syncflag_ht instead or is there a missing new function? > + > + error = ENETRESET; > + break; > + > default: > error = ieee80211_ioctl_setdefault(vap, ireq); > break; > > Modified: head/sys/net80211/ieee80211_ioctl.h > ============================================================================= > = > --- head/sys/net80211/ieee80211_ioctl.h Sat Jan 7 01:56:10 2017 > (r311577) > +++ head/sys/net80211/ieee80211_ioctl.h Sat Jan 7 01:59:39 2017 > (r311578) > @@ -556,6 +556,7 @@ struct ieee80211_devcaps_req { > uint32_t dc_drivercaps; /* general driver caps */ > uint32_t dc_cryptocaps; /* hardware crypto support */ > uint32_t dc_htcaps; /* HT/802.11n support */ > + uint32_t dc_vhtcaps; /* VHT/802.11ac capabilities */ > struct ieee80211req_chaninfo dc_chaninfo; > }; > #define IEEE80211_DEVCAPS_SIZE(_nchan) \ > @@ -704,6 +705,9 @@ struct ieee80211req { > #define IEEE80211_IOC_STBC 113 /* STBC Tx/RX (on, off) > */ > #define IEEE80211_IOC_LDPC 114 /* LDPC Tx/RX (on, off) > */ > > +/* VHT */ > +#define IEEE80211_IOC_VHTCONF 130 /* VHT config (off, on; > widths) */ > + > #define IEEE80211_IOC_MESH_ID 170 /* mesh identifier */ > #define IEEE80211_IOC_MESH_AP 171 /* accepting peerings * > / > #define IEEE80211_IOC_MESH_FWRD 172 /* forward frames */ > > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat Jan 7 07:16:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A711CCA4E48; Sat, 7 Jan 2017 07:16:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6A914A0; Sat, 7 Jan 2017 07:16:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id l2so9632750wml.2; Fri, 06 Jan 2017 23:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U5b1KexWtA2N6iqjdE0/CksR5nQt4EYBW6KwSu1ruaQ=; b=j+zYCCr2jUmcIXe06pMM3SCUhgzx81Dqd8le23j85Nqg5nQIc7/ESPwyf9pLmBdt2d PyTCHLwN1n0ZSxIw0vZroQlTDgugdmwBs9BwiQ90qvjVd+CFLHUM4qK7SeZqioGT45kh wJc2cUE11jVxliwox7ktWFWCoMo6pfouuIUeL/eoMHcZeVAHio1STv9Vtd9S8lLR6LCm XjZB1Ocr97bR+KL3qAlLyYeNd8pi6AjkQTOCg2sAcII/4OCNiUzjnueYwH0ZrTRXVoOL pgcZ0LFAg2d7foBr1E3Z4H2tWZEuPjLTfZXi7dC257RxMxtfcCZfBxqf3YidKB/6Jc+N 3CZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U5b1KexWtA2N6iqjdE0/CksR5nQt4EYBW6KwSu1ruaQ=; b=G+6XxlPLrsmh57i9V/cS7cybPKAQUPYBm3Kl2EOB0rktsvBG31aMD1z9NS9Q470DMK EB7MSJs6dOqV38GvUtzk31YlfIoONAE0HQI8BBkBjGcv0hUMQfA3tCfpssQfLnQ75ZmF 829JAtQ24NW11mfY+V6N+Inw4WsjK0wOl5QXrGjMjJU+u6NP/ts0f3LGVzokdjVasA1t Ca4t7Z21INUs6TTw14wcOQmMO4XNCPlA03zQqyCeX/dMV/29wt1va5fYQZYgFJpzJyyU quY3P0kvNdRFOSba/2n46EjUxtHhpdIarbW9zDG/VPGNu0GvfvXZttfhtPqj37D1VxHW ypYQ== X-Gm-Message-State: AIkVDXIXoubVW6JJUQ0Q8Ec9Mbs20min4XkhNtWAtvwvh4WTYwf/v/rKKsVhMpG0g1QMqsRmSq3BLhpvDerkvw== X-Received: by 10.223.150.240 with SMTP id u103mr4028277wrb.9.1483773402432; Fri, 06 Jan 2017 23:16:42 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.194.51.162 with HTTP; Fri, 6 Jan 2017 23:16:41 -0800 (PST) In-Reply-To: <201701070546.v075kIGD052277@slippy.cwsent.com> References: <201701070159.v071xd46009060@repo.freebsd.org> <201701070546.v075kIGD052277@slippy.cwsent.com> From: Adrian Chadd Date: Fri, 6 Jan 2017 23:16:41 -0800 X-Google-Sender-Auth: MMvrS5Z9IbPJU23xQr78UGj5zgc Message-ID: Subject: Re: svn commit: r311578 - head/sys/net80211 To: Cy Schubert Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 07:16:44 -0000 god damnit let me go fix that. Sorry, i have to commit another file. -a On 6 January 2017 at 21:46, Cy Schubert wrote: > In message <201701070159.v071xd46009060@repo.freebsd.org>, Adrian Chadd > writes: >> Author: adrian >> Date: Sat Jan 7 01:59:39 2017 >> New Revision: 311578 >> URL: https://svnweb.freebsd.org/changeset/base/311578 >> >> Log: >> [net80211] add VHT ioctl parameters and driver capabilities >> >> * Add the VHT capability element to the driver capabilities so ifconfig >> can see if VHT is available >> * Add ioctl plumbing for enabling/disabling VHT and each of the VHT >> widths. >> >> Note: this DOES change the ABI (the driver caps ioctl struct size, sigh) >> so this will require a recompile of at least ifconfig. >> >> Modified: >> head/sys/net80211/ieee80211_ioctl.c >> head/sys/net80211/ieee80211_ioctl.h >> >> Modified: head/sys/net80211/ieee80211_ioctl.c >> ============================================================================= >> = >> --- head/sys/net80211/ieee80211_ioctl.c Sat Jan 7 01:56:10 2017 >> (r311577) >> +++ head/sys/net80211/ieee80211_ioctl.c Sat Jan 7 01:59:39 2017 >> (r311578) >> @@ -710,6 +710,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80 >> dc->dc_drivercaps = ic->ic_caps; >> dc->dc_cryptocaps = ic->ic_cryptocaps; >> dc->dc_htcaps = ic->ic_htcaps; >> + dc->dc_vhtcaps = ic->ic_vhtcaps; >> ci = &dc->dc_chaninfo; >> ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans); >> KASSERT(ci->ic_nchans <= maxchans, >> @@ -1135,6 +1136,22 @@ ieee80211_ioctl_get80211(struct ieee8021 >> if (vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) >> ireq->i_val |= 2; >> break; >> + >> + /* VHT */ >> + case IEEE80211_IOC_VHTCONF: >> + ireq->i_val = 0; >> + if (vap->iv_flags_vht & IEEE80211_FVHT_VHT) >> + ireq->i_val |= 1; >> + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40) >> + ireq->i_val |= 2; >> + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80) >> + ireq->i_val |= 4; >> + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80) >> + ireq->i_val |= 8; >> + if (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160) >> + ireq->i_val |= 16; >> + break; >> + >> default: >> error = ieee80211_ioctl_getdefault(vap, ireq); >> break; >> @@ -1869,6 +1886,8 @@ findchannel(struct ieee80211com *ic, int >> /* NB: handled specially below */ >> [IEEE80211_MODE_11NA] = IEEE80211_CHAN_A, >> [IEEE80211_MODE_11NG] = IEEE80211_CHAN_G, >> + [IEEE80211_MODE_VHT_5GHZ] = IEEE80211_CHAN_A, >> + [IEEE80211_MODE_VHT_2GHZ] = IEEE80211_CHAN_G, >> }; >> u_int modeflags; >> int i; >> @@ -1893,11 +1912,27 @@ findchannel(struct ieee80211com *ic, int >> !find11gchannel(ic, i, c->ic_freq)) >> return c; >> } else { >> - /* must check HT specially */ >> + /* must check VHT specifically */ >> + if ((mode == IEEE80211_MODE_VHT_5GHZ || >> + mode == IEEE80211_MODE_VHT_2GHZ) && >> + !IEEE80211_IS_CHAN_VHT(c)) >> + continue; >> + >> + /* >> + * Must check HT specially - only match on HT, >> + * not HT+VHT channels >> + */ >> if ((mode == IEEE80211_MODE_11NA || >> mode == IEEE80211_MODE_11NG) && >> !IEEE80211_IS_CHAN_HT(c)) >> continue; >> + >> + if ((mode == IEEE80211_MODE_11NA || >> + mode == IEEE80211_MODE_11NG) && >> + IEEE80211_IS_CHAN_VHT(c)) >> + continue; >> + >> + /* Check that the modeflags above match */ >> if ((c->ic_flags & modeflags) == modeflags) >> return c; >> } >> @@ -2021,6 +2056,7 @@ ieee80211_ioctl_setchannel(struct ieee80 >> if (c == NULL) >> return EINVAL; >> } >> + >> /* >> * Fine tune channel selection based on desired mode: >> * if 11b is requested, find the 11b version of any >> @@ -2031,6 +2067,9 @@ ieee80211_ioctl_setchannel(struct ieee80 >> * 11a channel returned, >> * if 11ng is requested, find the ht version of any >> * 11g channel returned, >> + * if 11ac is requested, find the 11ac version >> + * of any 11a/11na channel returned, >> + * (TBD) 11acg (2GHz VHT) >> * otherwise we should be ok with what we've got. >> */ >> switch (vap->iv_des_mode) { >> @@ -2067,6 +2106,17 @@ ieee80211_ioctl_setchannel(struct ieee80 >> c = c2; >> } >> break; >> + case IEEE80211_MODE_VHT_2GHZ: >> + printf("%s: TBD\n", __func__); >> + break; >> + case IEEE80211_MODE_VHT_5GHZ: >> + if (IEEE80211_IS_CHAN_A(c)) { >> + c2 = findchannel(ic, ireq->i_val, >> + IEEE80211_MODE_VHT_5GHZ); >> + if (c2 != NULL) >> + c = c2; >> + } >> + break; >> default: /* NB: no static turboG */ >> break; >> } >> @@ -2092,6 +2142,7 @@ ieee80211_ioctl_setcurchan(struct ieee80 >> error = copyin(ireq->i_data, &chan, sizeof(chan)); >> if (error != 0) >> return error; >> + >> /* XXX 0xffff overflows 16-bit signed */ >> if (chan.ic_freq == 0 || chan.ic_freq == IEEE80211_CHAN_ANY) { >> c = IEEE80211_CHAN_ANYC; >> @@ -3321,6 +3372,37 @@ ieee80211_ioctl_set80211(struct ieee8021 >> if (isvapht(vap)) >> error = ERESTART; >> break; >> + >> + /* VHT */ >> + case IEEE80211_IOC_VHTCONF: >> + if (ireq->i_val & 1) >> + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_VHT); >> + else >> + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_VHT); >> + >> + if (ireq->i_val & 2) >> + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT40); >> + else >> + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT40); >> + >> + if (ireq->i_val & 4) >> + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT80); >> + else >> + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT80); >> + >> + if (ireq->i_val & 8) >> + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT80P80) >> ; >> + else >> + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT80P80 >> ); >> + >> + if (ireq->i_val & 16) >> + ieee80211_syncflag_vht(vap, IEEE80211_FVHT_USEVHT160); >> + else >> + ieee80211_syncflag_vht(vap, -IEEE80211_FVHT_USEVHT160); > > Buildkernel is broken. Should these calls be to ieee80211_syncflag_ht > instead or is there a missing new function? > >> + >> + error = ENETRESET; >> + break; >> + >> default: >> error = ieee80211_ioctl_setdefault(vap, ireq); >> break; >> >> Modified: head/sys/net80211/ieee80211_ioctl.h >> ============================================================================= >> = >> --- head/sys/net80211/ieee80211_ioctl.h Sat Jan 7 01:56:10 2017 >> (r311577) >> +++ head/sys/net80211/ieee80211_ioctl.h Sat Jan 7 01:59:39 2017 >> (r311578) >> @@ -556,6 +556,7 @@ struct ieee80211_devcaps_req { >> uint32_t dc_drivercaps; /* general driver caps */ >> uint32_t dc_cryptocaps; /* hardware crypto support */ >> uint32_t dc_htcaps; /* HT/802.11n support */ >> + uint32_t dc_vhtcaps; /* VHT/802.11ac capabilities */ >> struct ieee80211req_chaninfo dc_chaninfo; >> }; >> #define IEEE80211_DEVCAPS_SIZE(_nchan) \ >> @@ -704,6 +705,9 @@ struct ieee80211req { >> #define IEEE80211_IOC_STBC 113 /* STBC Tx/RX (on, off) >> */ >> #define IEEE80211_IOC_LDPC 114 /* LDPC Tx/RX (on, off) >> */ >> >> +/* VHT */ >> +#define IEEE80211_IOC_VHTCONF 130 /* VHT config (off, on; >> widths) */ >> + >> #define IEEE80211_IOC_MESH_ID 170 /* mesh identifier */ >> #define IEEE80211_IOC_MESH_AP 171 /* accepting peerings * >> / >> #define IEEE80211_IOC_MESH_FWRD 172 /* forward frames */ >> >> > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > From owner-svn-src-head@freebsd.org Sat Jan 7 07:35:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02D59CA43D3; Sat, 7 Jan 2017 07:35:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6FE01EE3; Sat, 7 Jan 2017 07:35:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v077ZSLw052574; Sat, 7 Jan 2017 07:35:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v077ZRJH052572; Sat, 7 Jan 2017 07:35:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701070735.v077ZRJH052572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Jan 2017 07:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311583 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 07:35:29 -0000 Author: adrian Date: Sat Jan 7 07:35:27 2017 New Revision: 311583 URL: https://svnweb.freebsd.org/changeset/base/311583 Log: [net80211] add syncflags methods for the VHT flags configuration. I missed this in my last commit. Pointy hat to me. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Sat Jan 7 05:10:06 2017 (r311582) +++ head/sys/net80211/ieee80211.c Sat Jan 7 07:35:27 2017 (r311583) @@ -90,6 +90,7 @@ const uint8_t ieee80211broadcastaddr[IEE static void ieee80211_syncflag_locked(struct ieee80211com *ic, int flag); static void ieee80211_syncflag_ht_locked(struct ieee80211com *ic, int flag); static void ieee80211_syncflag_ext_locked(struct ieee80211com *ic, int flag); +static void ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag); static int ieee80211_media_setup(struct ieee80211com *ic, struct ifmedia *media, int caps, int addsta, ifm_change_cb_t media_change, ifm_stat_cb_t media_stat); @@ -652,6 +653,12 @@ ieee80211_vap_attach(struct ieee80211vap ieee80211_syncflag_locked(ic, IEEE80211_F_BURST); ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT); ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40); + + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160); IEEE80211_UNLOCK(ic); return 1; @@ -699,6 +706,13 @@ ieee80211_vap_detach(struct ieee80211vap ieee80211_syncflag_locked(ic, IEEE80211_F_BURST); ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT); ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40); + + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160); + /* NB: this handles the bpfdetach done below */ ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_BPF); if (vap->iv_ifflags & IFF_PROMISC) @@ -853,6 +867,46 @@ ieee80211_syncflag_ht(struct ieee80211va } /* + * Synchronize flags_vht bit state in the com structure + * according to the state of all vap's. This is used, + * for example, to handle state changes via ioctls. + */ +static void +ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag) +{ + struct ieee80211vap *vap; + int bit; + + IEEE80211_LOCK_ASSERT(ic); + + bit = 0; + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) + if (vap->iv_flags_vht & flag) { + bit = 1; + break; + } + if (bit) + ic->ic_flags_vht |= flag; + else + ic->ic_flags_vht &= ~flag; +} + +void +ieee80211_syncflag_vht(struct ieee80211vap *vap, int flag) +{ + struct ieee80211com *ic = vap->iv_ic; + + IEEE80211_LOCK(ic); + if (flag < 0) { + flag = -flag; + vap->iv_flags_vht &= ~flag; + } else + vap->iv_flags_vht |= flag; + ieee80211_syncflag_vht_locked(ic, flag); + IEEE80211_UNLOCK(ic); +} + +/* * Synchronize flags_ext bit state in the com structure * according to the state of all vap's. This is used, * for example, to handle state changes via ioctls. Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Sat Jan 7 05:10:06 2017 (r311582) +++ head/sys/net80211/ieee80211_proto.h Sat Jan 7 07:35:27 2017 (r311583) @@ -77,6 +77,7 @@ void ieee80211_promisc(struct ieee80211v void ieee80211_allmulti(struct ieee80211vap *, bool); void ieee80211_syncflag(struct ieee80211vap *, int flag); void ieee80211_syncflag_ht(struct ieee80211vap *, int flag); +void ieee80211_syncflag_vht(struct ieee80211vap *, int flag); void ieee80211_syncflag_ext(struct ieee80211vap *, int flag); #define ieee80211_input(ni, m, rssi, nf) \ @@ -361,7 +362,8 @@ struct ieee80211_beacon_offsets { uint8_t *bo_csa; /* start of CSA element */ uint8_t *bo_quiet; /* start of Quiet element */ uint8_t *bo_meshconf; /* start of MESHCONF element */ - uint8_t *bo_spare[3]; + uint8_t *bo_vhtinfo; /* start of VHT info element (XXX VHTCAP?) */ + uint8_t *bo_spare[2]; }; struct mbuf *ieee80211_beacon_alloc(struct ieee80211_node *); From owner-svn-src-head@freebsd.org Sat Jan 7 07:54:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE60FCA4F70; Sat, 7 Jan 2017 07:54: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 7B8A01C6B; Sat, 7 Jan 2017 07:54: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 v077sNfq060808; Sat, 7 Jan 2017 07:54:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v077sNog060807; Sat, 7 Jan 2017 07:54:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701070754.v077sNog060807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 7 Jan 2017 07:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311584 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 07:54:24 -0000 Author: ngie Date: Sat Jan 7 07:54:23 2017 New Revision: 311584 URL: https://svnweb.freebsd.org/changeset/base/311584 Log: Unbreak lib/libsysdecode after r311568 by decoding MSG_MORETOCOME flag in msgflags MFC after: 1 month X-MFC with: r311568 Pointyhat to: jhb Reported by: cy Submitted by: Michael Butler Sponsored by: Dell EMC Isilon Modified: head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Sat Jan 7 07:35:27 2017 (r311583) +++ head/lib/libsysdecode/mktables Sat Jan 7 07:54:23 2017 (r311584) @@ -142,7 +142,7 @@ gen_table "seekwhence" "SEEK_[A-Z]+ gen_table "fcntlcmd" "F_[A-Z0-9_]+[[:space:]]+[0-9]+[[:space:]]+" "sys/fcntl.h" "F_CANCEL|F_..LCK" gen_table "mmapflags" "MAP_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" gen_table "rtpriofuncs" "RTP_[A-Z]+[[:space:]]+[0-9]+" "sys/rtprio.h" -gen_table "msgflags" "MSG_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" "MSG_SOCALLBCK" +gen_table "msgflags" "MSG_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" "MSG_SOCALLBCK|MSG_MORETOCOME" gen_table "sigcode" "SI_[A-Z]+[[:space:]]+0(x[0-9abcdef]+)?" "sys/signal.h" gen_table "umtxcvwaitflags" "CVWAIT_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/umtx.h" gen_table "umtxrwlockflags" "URWLOCK_PREFER_READER[[:space:]]+0x[0-9]+" "sys/umtx.h" From owner-svn-src-head@freebsd.org Sat Jan 7 08:08:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28C8CCA4630; Sat, 7 Jan 2017 08:08:37 +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 EED7B151F; Sat, 7 Jan 2017 08:08: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 v0788av1064975; Sat, 7 Jan 2017 08:08:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0788aEi064973; Sat, 7 Jan 2017 08:08:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701070808.v0788aEi064973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 7 Jan 2017 08:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311585 - in head: crypto/openssh secure/usr.sbin/sshd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 08:08:37 -0000 Author: ngie Date: Sat Jan 7 08:08:35 2017 New Revision: 311585 URL: https://svnweb.freebsd.org/changeset/base/311585 Log: Conditionalize building libwrap support into sshd Only build libwrap support into sshd if MK_TCP_WRAPPERS != no This will unbreak the build if libwrap has been removed from the system MFC after: 2 weeks PR: 210141 Submitted by: kpect@protonmail.com Differential Revision: D9049 Modified: head/crypto/openssh/config.h head/secure/usr.sbin/sshd/Makefile Modified: head/crypto/openssh/config.h ============================================================================== --- head/crypto/openssh/config.h Sat Jan 7 07:54:23 2017 (r311584) +++ head/crypto/openssh/config.h Sat Jan 7 08:08:35 2017 (r311585) @@ -1408,7 +1408,7 @@ /* #undef LASTLOG_WRITE_PUTUTXLINE */ /* Define if you want TCP Wrappers support */ -#define LIBWRAP 1 +/* #undef LIBWRAP */ /* Define to whatever link() returns for "not supported" if it doesn't return EOPNOTSUPP. */ Modified: head/secure/usr.sbin/sshd/Makefile ============================================================================== --- head/secure/usr.sbin/sshd/Makefile Sat Jan 7 07:54:23 2017 (r311584) +++ head/secure/usr.sbin/sshd/Makefile Sat Jan 7 08:08:35 2017 (r311585) @@ -27,7 +27,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= ssh_namespace.h # pam should always happen before ssh here for static linking -LIBADD= pam ssh util wrap +LIBADD= pam ssh util .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -53,6 +53,11 @@ SRCS+= krb5_config.h LIBADD+= gssapi_krb5 gssapi krb5 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + LIBADD+= crypto .if defined(LOCALBASE) From owner-svn-src-head@freebsd.org Sat Jan 7 09:03:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27D6DCA3D3E; Sat, 7 Jan 2017 09:03:42 +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 E859D1272; Sat, 7 Jan 2017 09:03:41 +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 v0793fMe090240; Sat, 7 Jan 2017 09:03:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0793fFo090239; Sat, 7 Jan 2017 09:03:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701070903.v0793fFo090239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 7 Jan 2017 09:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311601 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 09:03:42 -0000 Author: ngie Date: Sat Jan 7 09:03:40 2017 New Revision: 311601 URL: https://svnweb.freebsd.org/changeset/base/311601 Log: Move the mibII module up so uncommenting the bridge module works Add a note about how module ordering and dependent modules MFC after: 1 week Modified: head/etc/snmpd.config Modified: head/etc/snmpd.config ============================================================================== --- head/etc/snmpd.config Sat Jan 7 08:58:07 2017 (r311600) +++ head/etc/snmpd.config Sat Jan 7 09:03:40 2017 (r311601) @@ -122,6 +122,14 @@ snmpEnableAuthenTraps = 2 # order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)` # can only be used if %usm is uncommented. # +# Modules are loaded in the order listed, so they must be before any +# dependent modules, e.g. "mibII" vs "bridge". +# + +# +# MIB-2 module +# +begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" # # Bridge module @@ -141,11 +149,6 @@ snmpEnableAuthenTraps = 2 #begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so" # -# MIB-2 module -# -begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" - -# # Netgraph module # #begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" From owner-svn-src-head@freebsd.org Sat Jan 7 09:33:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25357C9F075; Sat, 7 Jan 2017 09:33:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA44E1C9E; Sat, 7 Jan 2017 09:33:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v079XCWW003828; Sat, 7 Jan 2017 09:33:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v079XB2r003826; Sat, 7 Jan 2017 09:33:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701070933.v079XB2r003826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 7 Jan 2017 09:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311623 - in head: lib/libcam sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 09:33:13 -0000 Author: mav Date: Sat Jan 7 09:33:11 2017 New Revision: 311623 URL: https://svnweb.freebsd.org/changeset/base/311623 Log: Make do_buff_decode() not read past the end of the buffer. Abort format processing as soon as we have no enough data. MFC after: 2 weeks Modified: head/lib/libcam/scsi_cmdparse.c head/sbin/camcontrol/modeedit.c Modified: head/lib/libcam/scsi_cmdparse.c ============================================================================== --- head/lib/libcam/scsi_cmdparse.c Sat Jan 7 09:30:53 2017 (r311622) +++ head/lib/libcam/scsi_cmdparse.c Sat Jan 7 09:33:11 2017 (r311623) @@ -100,10 +100,11 @@ __FBSDID("$FreeBSD$"); */ static int -do_buff_decode(u_int8_t *databuf, size_t len, +do_buff_decode(u_int8_t *buff, size_t len, void (*arg_put)(void *, int , void *, int, char *), void *puthook, const char *fmt, va_list *ap) { + int ind = 0; int assigned = 0; int width; int suppress; @@ -112,21 +113,17 @@ do_buff_decode(u_int8_t *databuf, size_t static u_char mask[] = {0, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff}; int value; - u_char *base = databuf; char *intendp; char letter; char field_name[80]; -# define ARG_PUT(ARG) \ - do \ - { \ - if (!suppress) \ - { \ +#define ARG_PUT(ARG) \ + do { \ + if (!suppress) { \ if (arg_put) \ - (*arg_put)(puthook, (letter == 't' ? \ - 'b' : letter), \ - (void *)((long)(ARG)), width, \ - field_name); \ + (*arg_put)(puthook, (letter == 't' ? 'b' : \ + letter), (void *)((long)(ARG)), width, \ + field_name); \ else \ *(va_arg(*ap, int *)) = (ARG); \ assigned++; \ @@ -187,7 +184,11 @@ do_buff_decode(u_int8_t *databuf, size_t done = 1; else { if (shift <= 0) { - bits = *databuf++; + if (ind >= len) { + done = 1; + break; + } + bits = buff[ind++]; shift = 8; } value = (bits >> (shift - width)) & @@ -209,29 +210,31 @@ do_buff_decode(u_int8_t *databuf, size_t fmt++; width = strtol(fmt, &intendp, 10); fmt = intendp; + if (ind + width > len) { + done = 1; + break; + } switch(width) { case 1: - ARG_PUT(*databuf); - databuf++; + ARG_PUT(buff[ind]); + ind++; break; case 2: - ARG_PUT((*databuf) << 8 | *(databuf + 1)); - databuf += 2; + ARG_PUT(buff[ind] << 8 | buff[ind + 1]); + ind += 2; break; case 3: - ARG_PUT((*databuf) << 16 | - (*(databuf + 1)) << 8 | *(databuf + 2)); - databuf += 3; + ARG_PUT(buff[ind] << 16 | + buff[ind + 1] << 8 | buff[ind + 2]); + ind += 3; break; case 4: - ARG_PUT((*databuf) << 24 | - (*(databuf + 1)) << 16 | - (*(databuf + 2)) << 8 | - *(databuf + 3)); - databuf += 4; + ARG_PUT(buff[ind] << 24 | buff[ind + 1] << 16 | + buff[ind + 2] << 8 | buff[ind + 3]); + ind += 4; break; default: @@ -242,32 +245,35 @@ do_buff_decode(u_int8_t *databuf, size_t break; case 'c': /* Characters (i.e., not swapped) */ - case 'z': /* Characters with zeroed trailing - spaces */ + case 'z': /* Characters with zeroed trailing spaces */ shift = 0; fmt++; width = strtol(fmt, &intendp, 10); fmt = intendp; + if (ind + width > len) { + done = 1; + break; + } if (!suppress) { if (arg_put) (*arg_put)(puthook, - (letter == 't' ? 'b' : letter), - databuf, width, field_name); + (letter == 't' ? 'b' : letter), + &buff[ind], width, field_name); else { char *dest; dest = va_arg(*ap, char *); - bcopy(databuf, dest, width); + bcopy(&buff[ind], dest, width); if (letter == 'z') { char *p; for (p = dest + width - 1; - (p >= (char *)dest) - && (*p == ' '); p--) + p >= dest && *p == ' '; + p--) *p = 0; } } assigned++; } - databuf += width; + ind += width; field_name[0] = 0; suppress = 0; break; @@ -295,9 +301,9 @@ do_buff_decode(u_int8_t *databuf, size_t } if (plus) - databuf += width; /* Relative seek */ + ind += width; /* Relative seek */ else - databuf = base + width; /* Absolute seek */ + ind = width; /* Absolute seek */ break; Modified: head/sbin/camcontrol/modeedit.c ============================================================================== --- head/sbin/camcontrol/modeedit.c Sat Jan 7 09:30:53 2017 (r311622) +++ head/sbin/camcontrol/modeedit.c Sat Jan 7 09:33:11 2017 (r311623) @@ -193,7 +193,14 @@ editentry_save(void *hook __unused, char struct editentry *src; /* Entry value to save. */ src = editentry_lookup(name); - assert(src != NULL); + if (src == 0) { + /* + * This happens if field does not fit into read page size. + * It also means that this field won't be written, so the + * returned value does not really matter. + */ + return (0); + } switch (src->type) { case 'i': /* Byte-sized integral type. */ From owner-svn-src-head@freebsd.org Sat Jan 7 09:56:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1895CA2006; Sat, 7 Jan 2017 09:56:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB0A617CF; Sat, 7 Jan 2017 09:56:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v079uCY5012581; Sat, 7 Jan 2017 09:56:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v079uCg4012574; Sat, 7 Jan 2017 09:56:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701070956.v079uCg4012574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 7 Jan 2017 09:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311636 - in head: sbin/camcontrol share/misc sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 09:56:14 -0000 Author: mav Date: Sat Jan 7 09:56:12 2017 New Revision: 311636 URL: https://svnweb.freebsd.org/changeset/base/311636 Log: Make 'camcontrol modepage' support subpages. MFC after: 2 weeks Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sbin/camcontrol/camcontrol.h head/sbin/camcontrol/modeedit.c head/share/misc/scsi_modes head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h head/sys/cam/scsi/scsi_ch.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sat Jan 7 09:45:00 2017 (r311635) +++ head/sbin/camcontrol/camcontrol.8 Sat Jan 7 09:56:12 2017 (r311636) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 30, 2016 +.Dd January 6, 2017 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -121,7 +121,7 @@ .Ic modepage .Op device id .Op generic args -.Aq Fl m Ar page | Fl l +.Aq Fl m Ar page[,subpage] | Fl l .Op Fl P Ar pgctl .Op Fl b | Fl e .Op Fl d @@ -702,9 +702,10 @@ The editor will be invoked if detects that standard input is terminal. .It Fl l Lists all available mode pages. -.It Fl m Ar mode_page -This specifies the number of the mode page the user would like to view -and/or edit. +If specified more then once, also lists subpages. +.It Fl m Ar page[,subpage] +This specifies the number of the mode page and optionally subpage the user +would like to view and/or edit. This argument is mandatory unless .Fl l is specified. Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sat Jan 7 09:45:00 2017 (r311635) +++ head/sbin/camcontrol/camcontrol.c Sat Jan 7 09:56:12 2017 (r311636) @@ -125,12 +125,9 @@ typedef enum { CAM_ARG_GET_STDINQ = 0x00002000, CAM_ARG_GET_XFERRATE = 0x00004000, CAM_ARG_INQ_MASK = 0x00007000, - CAM_ARG_MODE_EDIT = 0x00008000, - CAM_ARG_PAGE_CNTL = 0x00010000, CAM_ARG_TIMEOUT = 0x00020000, CAM_ARG_CMD_IN = 0x00040000, CAM_ARG_CMD_OUT = 0x00080000, - CAM_ARG_DBD = 0x00100000, CAM_ARG_ERR_RECOVER = 0x00200000, CAM_ARG_RETRIES = 0x00400000, CAM_ARG_START_UNIT = 0x00800000, @@ -3987,8 +3984,8 @@ reassignblocks(struct cam_device *device #ifndef MINIMALISTIC void -mode_sense(struct cam_device *device, int mode_page, int page_control, - int dbd, int retry_count, int timeout, u_int8_t *data, int datalen) +mode_sense(struct cam_device *device, int dbd, int pc, int page, int subpage, + int retry_count, int timeout, u_int8_t *data, int datalen) { union ccb *ccb; int retval; @@ -4000,15 +3997,17 @@ mode_sense(struct cam_device *device, in CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - scsi_mode_sense(&ccb->csio, + scsi_mode_sense_subpage(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, /* tag_action */ MSG_SIMPLE_Q_TAG, /* dbd */ dbd, - /* page_code */ page_control << 6, - /* page */ mode_page, + /* pc */ pc << 6, + /* page */ page, + /* subpage */ subpage, /* param_buf */ data, /* param_len */ datalen, + /* minimum_cmd_size */ 0, /* sense_len */ SSD_FULL_SIZE, /* timeout */ timeout ? timeout : 5000); @@ -4089,8 +4088,9 @@ void modepage(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout) { - int c, mode_page = -1, page_control = 0; - int binary = 0, list = 0; + char *str_subpage; + int c, page = -1, subpage = -1, pc = 0; + int binary = 0, dbd = 0, edit = 0, list = 0; while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { @@ -4098,40 +4098,44 @@ modepage(struct cam_device *device, int binary = 1; break; case 'd': - arglist |= CAM_ARG_DBD; + dbd = 1; break; case 'e': - arglist |= CAM_ARG_MODE_EDIT; + edit = 1; break; case 'l': - list = 1; + list++; break; case 'm': - mode_page = strtol(optarg, NULL, 0); - if (mode_page < 0) - errx(1, "invalid mode page %d", mode_page); + str_subpage = optarg; + strsep(&str_subpage, ","); + page = strtol(optarg, NULL, 0); + if (str_subpage) + subpage = strtol(str_subpage, NULL, 0); + else + subpage = 0; + if (page < 0) + errx(1, "invalid mode page %d", page); + if (subpage < 0) + errx(1, "invalid mode subpage %d", subpage); break; case 'P': - page_control = strtol(optarg, NULL, 0); - if ((page_control < 0) || (page_control > 3)) - errx(1, "invalid page control field %d", - page_control); - arglist |= CAM_ARG_PAGE_CNTL; + pc = strtol(optarg, NULL, 0); + if ((pc < 0) || (pc > 3)) + errx(1, "invalid page control field %d", pc); break; default: break; } } - if (mode_page == -1 && list == 0) + if (page == -1 && list == 0) errx(1, "you must specify a mode page!"); - if (list) { - mode_list(device, page_control, arglist & CAM_ARG_DBD, - retry_count, timeout); + if (list != 0) { + mode_list(device, dbd, pc, list > 1, retry_count, timeout); } else { - mode_edit(device, mode_page, page_control, - arglist & CAM_ARG_DBD, arglist & CAM_ARG_MODE_EDIT, binary, + mode_edit(device, dbd, pc, page, subpage, edit, binary, retry_count, timeout); } } Modified: head/sbin/camcontrol/camcontrol.h ============================================================================== --- head/sbin/camcontrol/camcontrol.h Sat Jan 7 09:45:00 2017 (r311635) +++ head/sbin/camcontrol/camcontrol.h Sat Jan 7 09:56:12 2017 (r311636) @@ -84,14 +84,14 @@ int epc(struct cam_device *device, int a int timestamp(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout, int verbosemode); -void mode_sense(struct cam_device *device, int mode_page, int page_control, - int dbd, int retry_count, int timeout, u_int8_t *data, +void mode_sense(struct cam_device *device, int dbd, int pc, int page, + int subpage, int retry_count, int timeout, uint8_t *data, int datalen); void mode_select(struct cam_device *device, int save_pages, int retry_count, int timeout, u_int8_t *data, int datalen); -void mode_edit(struct cam_device *device, int page, int page_control, int dbd, +void mode_edit(struct cam_device *device, int dbd, int pc, int page, int subpage, int edit, int binary, int retry_count, int timeout); -void mode_list(struct cam_device *device, int page_control, int dbd, +void mode_list(struct cam_device *device, int dbd, int pc, int subpages, int retry_count, int timeout); int scsidoinquiry(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); Modified: head/sbin/camcontrol/modeedit.c ============================================================================== --- head/sbin/camcontrol/modeedit.c Sat Jan 7 09:45:00 2017 (r311635) +++ head/sbin/camcontrol/modeedit.c Sat Jan 7 09:56:12 2017 (r311636) @@ -66,9 +66,6 @@ __FBSDID("$FreeBSD$"); #define MODE_PAGE_HEADER(mh) \ (struct scsi_mode_page_header *)find_mode_page_6(mh) -#define MODE_PAGE_DATA(mph) \ - (u_int8_t *)(mph) + sizeof(struct scsi_mode_page_header) - struct editentry { STAILQ_ENTRY(editentry) link; @@ -86,7 +83,8 @@ static int editlist_changed = 0; /* Whet struct pagename { SLIST_ENTRY(pagename) link; - int pagenum; + int page; + int subpage; char *name; }; static SLIST_HEAD(, pagename) namelist; /* Page number to name mappings. */ @@ -106,21 +104,22 @@ static int editentry_save(void *hook, static struct editentry *editentry_lookup(char *name); static int editentry_set(char *name, char *newvalue, int editonly); -static void editlist_populate(struct cam_device *device, - int modepage, int page_control, - int dbd, int retries, int timeout); -static void editlist_save(struct cam_device *device, int modepage, - int page_control, int dbd, int retries, - int timeout); -static void nameentry_create(int pagenum, char *name); -static struct pagename *nameentry_lookup(int pagenum); -static int load_format(const char *pagedb_path, int page); +static void editlist_populate(struct cam_device *device, int dbd, + int pc, int page, int subpage, + int retries, int timeout); +static void editlist_save(struct cam_device *device, int dbd, + int pc, int page, int subpage, + int retries, int timeout); +static void nameentry_create(int page, int subpage, char *name); +static struct pagename *nameentry_lookup(int page, int subpage); +static int load_format(const char *pagedb_path, int lpage, + int lsubpage); static int modepage_write(FILE *file, int editonly); static int modepage_read(FILE *file); static void modepage_edit(void); -static void modepage_dump(struct cam_device *device, int page, - int page_control, int dbd, int retries, - int timeout); +static void modepage_dump(struct cam_device *device, int dbd, + int pc, int page, int subpage, int retries, + int timeout); static void cleanup_editfile(void); @@ -325,10 +324,10 @@ editentry_set(char *name, char *newvalue } static void -nameentry_create(int pagenum, char *name) { +nameentry_create(int page, int subpage, char *name) { struct pagename *newentry; - if (pagenum < 0 || name == NULL || name[0] == '\0') + if (page < 0 || subpage < 0 || name == NULL || name[0] == '\0') return; /* Allocate memory for the new entry and a copy of the entry name. */ @@ -339,16 +338,17 @@ nameentry_create(int pagenum, char *name /* Trim any trailing whitespace for the page name. */ RTRIM(newentry->name); - newentry->pagenum = pagenum; + newentry->page = page; + newentry->subpage = subpage; SLIST_INSERT_HEAD(&namelist, newentry, link); } static struct pagename * -nameentry_lookup(int pagenum) { +nameentry_lookup(int page, int subpage) { struct pagename *scan; SLIST_FOREACH(scan, &namelist, link) { - if (pagenum == scan->pagenum) + if (page == scan->page && subpage == scan->subpage) return (scan); } @@ -357,12 +357,14 @@ nameentry_lookup(int pagenum) { } static int -load_format(const char *pagedb_path, int page) +load_format(const char *pagedb_path, int lpage, int lsubpage) { FILE *pagedb; - char str_pagenum[MAX_PAGENUM_LEN]; + char str_page[MAX_PAGENUM_LEN]; + char *str_subpage; char str_pagename[MAX_PAGENAME_LEN]; - int pagenum; + int page; + int subpage; int depth; /* Quoting depth. */ int found; int lineno; @@ -371,9 +373,10 @@ load_format(const char *pagedb_path, int char c; #define SETSTATE_LOCATE do { \ - str_pagenum[0] = '\0'; \ + str_page[0] = '\0'; \ str_pagename[0] = '\0'; \ - pagenum = -1; \ + page = -1; \ + subpage = -1; \ state = LOCATE; \ } while (0) @@ -450,32 +453,46 @@ load_format(const char *pagedb_path, int * modes without providing a mode definition). */ /* Record the name of this page. */ - pagenum = strtol(str_pagenum, NULL, 0); - nameentry_create(pagenum, str_pagename); + str_subpage = str_page; + strsep(&str_subpage, ","); + page = strtol(str_page, NULL, 0); + if (str_subpage) + subpage = strtol(str_subpage, NULL, 0); + else + subpage = 0; + nameentry_create(page, subpage, str_pagename); SETSTATE_LOCATE; } else if (depth == 0 && c == PAGENAME_START) { SETSTATE_PAGENAME; } else if (c == PAGEDEF_START) { - pagenum = strtol(str_pagenum, NULL, 0); + str_subpage = str_page; + strsep(&str_subpage, ","); + page = strtol(str_page, NULL, 0); + if (str_subpage) + subpage = strtol(str_subpage, NULL, 0); + else + subpage = 0; if (depth == 1) { /* Record the name of this page. */ - nameentry_create(pagenum, str_pagename); + nameentry_create(page, subpage, + str_pagename); /* * Only record the format if this is * the page we are interested in. */ - if (page == pagenum && !found) + if (lpage == page && + lsubpage == subpage && !found) SETSTATE_PAGEDEF; } } else if (c == PAGEDEF_END) { /* Reset the processor state. */ SETSTATE_LOCATE; - } else if (depth == 0 && ! BUFFERFULL(str_pagenum)) { - strncat(str_pagenum, &c, 1); + } else if (depth == 0 && ! BUFFERFULL(str_page)) { + strncat(str_page, &c, 1); } else if (depth == 0) { errx(EX_OSFILE, "%s:%d: %s %zd %s", pagedb_path, lineno, "page identifier exceeds", - sizeof(str_pagenum) - 1, "characters"); + sizeof(str_page) - 1, "characters"); } break; @@ -491,7 +508,7 @@ load_format(const char *pagedb_path, int } else { errx(EX_OSFILE, "%s:%d: %s %zd %s", pagedb_path, lineno, "page name exceeds", - sizeof(str_pagenum) - 1, "characters"); + sizeof(str_page) - 1, "characters"); } break; @@ -532,88 +549,95 @@ load_format(const char *pagedb_path, int } static void -editlist_populate(struct cam_device *device, int modepage, int page_control, - int dbd, int retries, int timeout) +editlist_populate(struct cam_device *device, int dbd, int pc, int page, + int subpage, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ struct scsi_mode_header_6 *mh; /* Location of mode header. */ struct scsi_mode_page_header *mph; + struct scsi_mode_page_header_sp *mphsp; + int len; STAILQ_INIT(&editlist); /* Fetch changeable values; use to build initial editlist. */ - mode_sense(device, modepage, 1, dbd, retries, timeout, data, + mode_sense(device, dbd, 1, page, subpage, retries, timeout, data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; mph = MODE_PAGE_HEADER(mh); - mode_pars = MODE_PAGE_DATA(mph); + if ((mph->page_code & SMPH_SPF) == 0) { + mode_pars = (uint8_t *)(mph + 1); + len = mph->page_length; + } else { + mphsp = (struct scsi_mode_page_header_sp *)mph; + mode_pars = (uint8_t *)(mphsp + 1); + len = scsi_2btoul(mphsp->page_length); + } /* Decode the value data, creating edit_entries for each value. */ - buff_decode_visit(mode_pars, mh->data_length, format, - editentry_create, 0); + buff_decode_visit(mode_pars, len, format, editentry_create, 0); /* Fetch the current/saved values; use to set editentry values. */ - mode_sense(device, modepage, page_control, dbd, retries, timeout, data, - sizeof(data)); - buff_decode_visit(mode_pars, mh->data_length, format, - editentry_update, 0); + mode_sense(device, dbd, pc, page, subpage, retries, timeout, + data, sizeof(data)); + buff_decode_visit(mode_pars, len, format, editentry_update, 0); } static void -editlist_save(struct cam_device *device, int modepage, int page_control, - int dbd, int retries, int timeout) +editlist_save(struct cam_device *device, int dbd, int pc, int page, + int subpage, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ struct scsi_mode_header_6 *mh; /* Location of mode header. */ struct scsi_mode_page_header *mph; + struct scsi_mode_page_header_sp *mphsp; + int len, hlen; /* Make sure that something changed before continuing. */ if (! editlist_changed) return; - /* - * Preload the CDB buffer with the current mode page data. - * XXX If buff_encode_visit would return the number of bytes encoded - * we *should* use that to build a header from scratch. As it is - * now, we need mode_sense to find out the page length. - */ - mode_sense(device, modepage, page_control, dbd, retries, timeout, data, - sizeof(data)); + /* Preload the CDB buffer with the current mode page data. */ + mode_sense(device, dbd, pc, page, subpage, retries, timeout, + data, sizeof(data)); /* Initial headers & offsets. */ mh = (struct scsi_mode_header_6 *)data; mph = MODE_PAGE_HEADER(mh); - mode_pars = MODE_PAGE_DATA(mph); + if ((mph->page_code & SMPH_SPF) == 0) { + hlen = sizeof(*mph); + mode_pars = (uint8_t *)(mph + 1); + len = mph->page_length; + } else { + mphsp = (struct scsi_mode_page_header_sp *)mph; + hlen = sizeof(*mphsp); + mode_pars = (uint8_t *)(mphsp + 1); + len = scsi_2btoul(mphsp->page_length); + } /* Encode the value data to be passed back to the device. */ - buff_encode_visit(mode_pars, mh->data_length, format, - editentry_save, 0); + buff_encode_visit(mode_pars, len, format, editentry_save, 0); /* Eliminate block descriptors. */ - bcopy(mph, ((u_int8_t *)mh) + sizeof(*mh), - sizeof(*mph) + mph->page_length); + bcopy(mph, mh + 1, hlen + len); /* Recalculate headers & offsets. */ - mh->blk_desc_len = 0; /* No block descriptors. */ + mh->data_length = 0; /* Reserved for MODE SELECT command. */ mh->dev_spec = 0; /* Clear device-specific parameters. */ + mh->blk_desc_len = 0; /* No block descriptors. */ mph = MODE_PAGE_HEADER(mh); - mode_pars = MODE_PAGE_DATA(mph); - - mph->page_code &= SMS_PAGE_CODE;/* Isolate just the page code. */ - mh->data_length = 0; /* Reserved for MODE SELECT command. */ + mph->page_code &= ~SMPH_PS; /* Reserved for MODE SELECT command. */ /* * Write the changes back to the device. If the user editted control * page 3 (saved values) then request the changes be permanently * recorded. */ - mode_select(device, - (page_control << PAGE_CTRL_SHIFT == SMS_PAGE_CTRL_SAVED), - retries, timeout, (u_int8_t *)mh, - sizeof(*mh) + mh->blk_desc_len + sizeof(*mph) + mph->page_length); + mode_select(device, (pc << PAGE_CTRL_SHIFT == SMS_PAGE_CTRL_SAVED), + retries, timeout, (u_int8_t *)mh, sizeof(*mh) + hlen + len); } static int @@ -782,24 +806,32 @@ modepage_edit(void) } static void -modepage_dump(struct cam_device *device, int page, int page_control, int dbd, +modepage_dump(struct cam_device *device, int dbd, int pc, int page, int subpage, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ struct scsi_mode_header_6 *mh; /* Location of mode header. */ struct scsi_mode_page_header *mph; - int indx; /* Index for scanning mode params. */ + struct scsi_mode_page_header_sp *mphsp; + int indx, len; - mode_sense(device, page, page_control, dbd, retries, timeout, data, - sizeof(data)); + mode_sense(device, dbd, pc, page, subpage, retries, timeout, + data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; mph = MODE_PAGE_HEADER(mh); - mode_pars = MODE_PAGE_DATA(mph); + if ((mph->page_code & SMPH_SPF) == 0) { + mode_pars = (uint8_t *)(mph + 1); + len = mph->page_length; + } else { + mphsp = (struct scsi_mode_page_header_sp *)mph; + mode_pars = (uint8_t *)(mphsp + 1); + len = scsi_2btoul(mphsp->page_length); + } /* Print the raw mode page data with newlines each 8 bytes. */ - for (indx = 0; indx < mph->page_length; indx++) { + for (indx = 0; indx < len; indx++) { printf("%02x%c",mode_pars[indx], (((indx + 1) % 8) == 0) ? '\n' : ' '); } @@ -817,7 +849,7 @@ cleanup_editfile(void) } void -mode_edit(struct cam_device *device, int page, int page_control, int dbd, +mode_edit(struct cam_device *device, int dbd, int pc, int page, int subpage, int edit, int binary, int retry_count, int timeout) { const char *pagedb_path; /* Path to modepage database. */ @@ -829,15 +861,17 @@ mode_edit(struct cam_device *device, int if ((pagedb_path = getenv("SCSI_MODES")) == NULL) pagedb_path = DEFAULT_SCSI_MODE_DB; - if (load_format(pagedb_path, page) != 0 && (edit || verbose)) { + if (load_format(pagedb_path, page, subpage) != 0 && + (edit || verbose)) { if (errno == ENOENT) { /* Modepage database file not found. */ warn("cannot open modepage database \"%s\"", pagedb_path); } else if (errno == ESRCH) { /* Modepage entry not found in database. */ - warnx("modepage %d not found in database" - "\"%s\"", page, pagedb_path); + warnx("modepage 0x%02x,0x%02x not found in " + "database \"%s\"", page, subpage, + pagedb_path); } /* We can recover in display mode, otherwise we exit. */ if (!edit) { @@ -847,22 +881,20 @@ mode_edit(struct cam_device *device, int exit(EX_OSFILE); } - editlist_populate(device, page, page_control, dbd, retry_count, + editlist_populate(device, dbd, pc, page, subpage, retry_count, timeout); } if (edit) { - if (page_control << PAGE_CTRL_SHIFT != SMS_PAGE_CTRL_CURRENT && - page_control << PAGE_CTRL_SHIFT != SMS_PAGE_CTRL_SAVED) + if (pc << PAGE_CTRL_SHIFT != SMS_PAGE_CTRL_CURRENT && + pc << PAGE_CTRL_SHIFT != SMS_PAGE_CTRL_SAVED) errx(EX_USAGE, "it only makes sense to edit page 0 " "(current) or page 3 (saved values)"); modepage_edit(); - editlist_save(device, page, page_control, dbd, retry_count, - timeout); + editlist_save(device, dbd, pc, page, subpage, retry_count, timeout); } else if (binary || STAILQ_EMPTY(&editlist)) { /* Display without formatting information. */ - modepage_dump(device, page, page_control, dbd, retry_count, - timeout); + modepage_dump(device, dbd, pc, page, subpage, retry_count, timeout); } else { /* Display with format. */ modepage_write(stdout, 0); @@ -870,44 +902,55 @@ mode_edit(struct cam_device *device, int } void -mode_list(struct cam_device *device, int page_control, int dbd, +mode_list(struct cam_device *device, int dbd, int pc, int subpages, int retry_count, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ struct scsi_mode_header_6 *mh; /* Location of mode header. */ struct scsi_mode_page_header *mph; + struct scsi_mode_page_header_sp *mphsp; struct pagename *nameentry; const char *pagedb_path; - int len; + int len, page, subpage; if ((pagedb_path = getenv("SCSI_MODES")) == NULL) pagedb_path = DEFAULT_SCSI_MODE_DB; - if (load_format(pagedb_path, 0) != 0 && verbose && errno == ENOENT) { + if (load_format(pagedb_path, 0, 0) != 0 && verbose && errno == ENOENT) { /* Modepage database file not found. */ warn("cannot open modepage database \"%s\"", pagedb_path); } /* Build the list of all mode pages by querying the "all pages" page. */ - mode_sense(device, SMS_ALL_PAGES_PAGE, page_control, dbd, retry_count, - timeout, data, sizeof(data)); + mode_sense(device, dbd, pc, SMS_ALL_PAGES_PAGE, + subpages ? SMS_SUBPAGE_ALL : 0, + retry_count, timeout, data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; len = sizeof(*mh) + mh->blk_desc_len; /* Skip block descriptors. */ /* Iterate through the pages in the reply. */ while (len < mh->data_length) { /* Locate the next mode page header. */ - mph = (struct scsi_mode_page_header *) - ((intptr_t)mh + len); + mph = (struct scsi_mode_page_header *)((intptr_t)mh + len); - mph->page_code &= SMS_PAGE_CODE; - nameentry = nameentry_lookup(mph->page_code); + if ((mph->page_code & SMPH_SPF) == 0) { + page = mph->page_code & SMS_PAGE_CODE; + subpage = 0; + len += sizeof(*mph) + mph->page_length; + } else { + mphsp = (struct scsi_mode_page_header_sp *)mph; + page = mphsp->page_code & SMS_PAGE_CODE; + subpage = mphsp->subpage; + len += sizeof(*mphsp) + scsi_2btoul(mphsp->page_length); + } - if (nameentry == NULL || nameentry->name == NULL) - printf("0x%02x\n", mph->page_code); - else - printf("0x%02x\t%s\n", mph->page_code, - nameentry->name); - len += mph->page_length + sizeof(*mph); + nameentry = nameentry_lookup(page, subpage); + if (subpage == 0) { + printf("0x%02x\t%s\n", page, + nameentry ? nameentry->name : ""); + } else { + printf("0x%02x,0x%02x\t%s\n", page, subpage, + nameentry ? nameentry->name : ""); + } } } Modified: head/share/misc/scsi_modes ============================================================================== --- head/share/misc/scsi_modes Sat Jan 7 09:45:00 2017 (r311635) +++ head/share/misc/scsi_modes Sat Jan 7 09:56:12 2017 (r311636) @@ -49,7 +49,11 @@ # ALL DEVICE TYPES -0x0a "Control Mode Page" { +0x0a,0x03 "Command Duration Limit A"; + +0x0a,0x04 "Command Duration Limit B"; + +0x0a "Control" { {TST} t3 {TMF_ONLY} t1 {DPICZ} t1 @@ -78,7 +82,18 @@ {Extended Self-Test Completion Time} i2 } -0x02 "Disconnect-Reconnect Page" { +0x0a,0x01 "Control Extension" { + {Reserved} *t4 + {DLC} t1 + {TCMOS} t1 + {SCSIP} t1 + {IALUAE} t1 + {Reserved} *t4 + {Initial Command Priority} t4 + {Maximum Sense Data Length} i1 +} + +0x02 "Disconnect-Reconnect" { {Buffer Full Ratio} i1 {Buffer Empty Ratio} i1 {Bus Inactivity Limit} i2 @@ -92,26 +107,11 @@ {Reserved} *i1 } -0x15 "Extended Page"; +0x15 "Extended"; -0x16 "Extended Device-Type Specific Page"; +0x16 "Extended Device-Type Specific"; -0x1c "Informational Exceptions Control Page" { - {PERF} t1 - {Reserved} *t1 - {EBF} t1 - {EWasc} t1 - {DExcpt} t1 - {TEST} t1 - {EBACKERR} t1 - {LogErr} t1 - {Reserved} *t4 - {MRIE} t4 - {Interval Timer} i4 - {Report Count} i4 -} - -0x09 "Peripheral Device Page" { +0x09 "Peripheral Device" { {Interface Identifier} i2 {Reserved} *i1 {Reserved} *i1 @@ -119,21 +119,69 @@ {Reserved} *i1 } -0x1a "Power Condition Page" { - {Reserved} *i1 +0x1a "Power Condition" { + {PM_BG_PRECEDENCE} t1 + {Reserved} *t6 + {STANDBY_Y} t1 + {Reserved} *t4 + {IDLE_C} t1 + {IDLE_B} t1 + {IDLE_A} t1 + {STANDBY_Z} t1 + {IDLE_A Condition Timer} i4 + {STANDBY_Z Condition Timer} i4 + {IDLE_B Condition Timer} i4 + {IDLE_C Condition Timer} i4 + {STANDBY_Y Condition Timer} i4 + {Reserved} *i4 + {Reserved} *i4 + {Reserved} *i4 + {Reserved} *i3 + {CCF Idle} t2 + {CCF Standby} t2 + {CCF Stopped} t2 + {Reserved} *t2 +} + +0x1a,0x01 "Power Consumption" { + {Reserved} *i2 {Reserved} *t6 - {Idle} t1 - {Standby} t1 - {Idle Condition Timer} i4 - {Standby Condition Timer} i4 + {Active Level} t2 + {Power Consumption Identifier} i1 + {Reserved} *i4 + {Reserved} *i4 } -0x18 "Protocol-Specific LUN Page"; +0x18 "Protocol-Specific Logical Unit"; -0x19 "Protocol-Specific Port Page"; +0x19 "Protocol-Specific Port"; # DIRECT ACCESS DEVICES -0x08 "Caching Page" { + +0x0a,0x02 "Application Tag"; + +0x1a,0xf1 "ATA Power Condition"; + +0x1c,0x01 "Background Control" { + {Reserved} *t5 + {S_L_FULL} *t1 + {LOWIR} *t1 + {EN_BMS} *t1 + {Reserved} *t7 + {EN_PS} *t1 + {Background Medium Scan Interval Time} i2 + {Background Pre-Scan Time Limit} i2 + {Minimum Idle Time Before Background Scan} i2 + {Maximum Time To Suspend Background Scan} i2 + {Reserved} *i2 +} + +0x0a,0x06 "Background Operation Control" { + {BO_MODE} t2 + {Reserved} *t6 +} + +0x08 "Caching" { {IC} t1 {ABPF} t1 {CAP} t1 @@ -159,7 +207,7 @@ {Reserved} *t4 } -0x05 "Flexible Disk Page" { +0x05 "Flexible Disk" { {Transfer rate} i2 {Number of heads} i1 {Sectors per track} i1 @@ -190,7 +238,7 @@ {Reserved} *i1 } -0x03 "Format Device Page" { +0x03 "Format Device" { {Tracks per Zone} i2 {Alternate Sectors per Zone} i2 {Alternate Tracks per Zone} i2 @@ -207,7 +255,34 @@ {Reserved} *t4 } -0x0b "Medium Types Supported Page" { +0x0a,0x05 "I/O Advice Hints Grouping"; + +0x1c "Informational Exceptions Control" { + {PERF} t1 + {Reserved} *t1 + {EBF} t1 + {EWasc} t1 + {DExcpt} t1 + {TEST} t1 + {EBACKERR} t1 + {LogErr} t1 + {Reserved} *t4 + {MRIE} t4 + {Interval Timer} i4 + {Report Count} i4 +} + +0x1c,0x02 "Logical Block Provisioning" { + {Reserved} *t7 + {SITUA} t1 + {Reserved} *i1 + {Reserved} *i1 + {Reserved} *i1 + {Reserved} *i4 + {Reserved} *i4 +} + +0x0b "Medium Types Supported" { {Reserved} *i1 {Reserved} *i1 {Medium type one supported} i1 @@ -216,10 +291,11 @@ {Medium type four supported} i1 } -# Notch page (0x0c) -0x0c "Notch and Partition Page"; +0x0c "Notch and Partition"; + +0x0a,0xf1 "PATA Control"; -0x01 "Read-Write Error Recovery Page" { +0x01 "Read-Write Error Recovery" { {AWRE (Auto Write Reallocation Enbld)} t1 {ARRE (Auto Read Reallocation Enbld)} t1 {TB (Transfer Block)} t1 @@ -240,7 +316,7 @@ {Recovery Time Limit} i2 } -0x04 "Rigid Disk Drive Geometry Page" { +0x04 "Rigid Disk Drive Geometry" { {Number of Cylinders} i3 {Number of Heads} i1 {Starting Cylinder-Write Precompensation} i3 @@ -256,7 +332,7 @@ {Reserved} *i1 } -0x07 "Verify Error Recovery Page" { +0x07 "Verify Error Recovery" { {Reserved} *t4 {EER} t1 {PER} t1 @@ -272,7 +348,7 @@ {Verify Recovery Time Limit} i2 } -0x0E "CD-ROM Audio Control Parameters Page" { +0x0E "CD-ROM Audio Control Parameters" { {Reserved} *t5 {Immed} t1 {SOTC} t1 @@ -297,7 +373,7 @@ } # SEQUENTIAL ACCESS DEVICES -0x10 "Device Configuration Page" { +0x10 "Device Configuration" { {Reserved} *t1 {Change Active Partition} t1 {Change Active Format} t1 @@ -326,7 +402,7 @@ {SCSI-3 Permanent Write Protect} t1 } -0x0f "Data Compression Page" { +0x0f "Data Compression" { {Data Compression Enabled} t1 {Date Compression Capable} t1 {Reserved} *t6 @@ -339,7 +415,7 @@ } # Removable devices -0x1b "Removable Block Access Capacities Page" { +0x1b "Removable Block Access Capacities" { {System Floppy Type Device} t1 {Supports Reporting Format Progress} t1 {Reserved} *t6 @@ -351,7 +427,7 @@ } # CD-ROM (and CD-R[W]) devices -0x2a "CD capabilities and mechanical status page" { +0x2a "CD capabilities and mechanical status" { {Reserved} *t4 {Method 2} t1 {CD-RW Read} t1 Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Sat Jan 7 09:45:00 2017 (r311635) +++ head/sys/cam/scsi/scsi_all.c Sat Jan 7 09:56:12 2017 (r311636) @@ -7622,24 +7622,34 @@ scsi_inquiry(struct ccb_scsiio *csio, u_ } void -scsi_mode_sense(struct ccb_scsiio *csio, u_int32_t retries, - void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, int dbd, u_int8_t page_code, - u_int8_t page, u_int8_t *param_buf, u_int32_t param_len, - u_int8_t sense_len, u_int32_t timeout) +scsi_mode_sense(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, + int dbd, uint8_t pc, uint8_t page, uint8_t *param_buf, uint32_t param_len, + uint8_t sense_len, uint32_t timeout) { - scsi_mode_sense_len(csio, retries, cbfcnp, tag_action, dbd, - page_code, page, param_buf, param_len, 0, - sense_len, timeout); + scsi_mode_sense_subpage(csio, retries, cbfcnp, tag_action, dbd, + pc, page, 0, param_buf, param_len, 0, sense_len, timeout); } void -scsi_mode_sense_len(struct ccb_scsiio *csio, u_int32_t retries, - void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, int dbd, u_int8_t page_code, - u_int8_t page, u_int8_t *param_buf, u_int32_t param_len, - int minimum_cmd_size, u_int8_t sense_len, u_int32_t timeout) +scsi_mode_sense_len(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, + int dbd, uint8_t pc, uint8_t page, uint8_t *param_buf, uint32_t param_len, + int minimum_cmd_size, uint8_t sense_len, uint32_t timeout) +{ + + scsi_mode_sense_subpage(csio, retries, cbfcnp, tag_action, dbd, + pc, page, 0, param_buf, param_len, minimum_cmd_size, + sense_len, timeout); +} + +void +scsi_mode_sense_subpage(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, + int dbd, uint8_t pc, uint8_t page, uint8_t subpage, uint8_t *param_buf, + uint32_t param_len, int minimum_cmd_size, uint8_t sense_len, + uint32_t timeout) { u_int8_t cdb_len; @@ -7658,7 +7668,8 @@ scsi_mode_sense_len(struct ccb_scsiio *c scsi_cmd->opcode = MODE_SENSE_6; if (dbd != 0) scsi_cmd->byte2 |= SMS_DBD; - scsi_cmd->page = page_code | page; + scsi_cmd->page = pc | page; + scsi_cmd->subpage = subpage; scsi_cmd->length = param_len; cdb_len = sizeof(*scsi_cmd); } else { @@ -7672,7 +7683,8 @@ scsi_mode_sense_len(struct ccb_scsiio *c scsi_cmd->opcode = MODE_SENSE_10; if (dbd != 0) scsi_cmd->byte2 |= SMS_DBD; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jan 7 10:51:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8137CA4138; Sat, 7 Jan 2017 10:51:13 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84632119A; Sat, 7 Jan 2017 10:51:13 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07ApCdd034990; Sat, 7 Jan 2017 10:51:12 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07ApCiW034989; Sat, 7 Jan 2017 10:51:12 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701071051.v07ApCiW034989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 7 Jan 2017 10:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311638 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 10:51:13 -0000 Author: arybchik Date: Sat Jan 7 10:51:12 2017 New Revision: 311638 URL: https://svnweb.freebsd.org/changeset/base/311638 Log: sfxge(4): use SFXGE_LINK_UP() to report link up state Reviewed by: philip Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9059 Modified: head/sys/dev/sfxge/sfxge_port.c Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Sat Jan 7 09:56:50 2017 (r311637) +++ head/sys/dev/sfxge/sfxge_port.c Sat Jan 7 10:51:12 2017 (r311638) @@ -311,8 +311,7 @@ sfxge_mac_link_update(struct sfxge_softc port->link_mode = mode; /* Push link state update to the OS */ - link_state = (port->link_mode != EFX_LINK_DOWN ? - LINK_STATE_UP : LINK_STATE_DOWN); + link_state = (SFXGE_LINK_UP(sc) ? LINK_STATE_UP : LINK_STATE_DOWN); sc->ifnet->if_baudrate = sfxge_link_baudrate[port->link_mode]; if_link_state_change(sc->ifnet, link_state); } From owner-svn-src-head@freebsd.org Sat Jan 7 10:52:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D98CCA419D; Sat, 7 Jan 2017 10:52:03 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F60B1529; Sat, 7 Jan 2017 10:52:03 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07Aq2m8035060; Sat, 7 Jan 2017 10:52:02 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07Aq2IG035059; Sat, 7 Jan 2017 10:52:02 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701071052.v07Aq2IG035059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 7 Jan 2017 10:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311639 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 10:52:03 -0000 Author: arybchik Date: Sat Jan 7 10:52:02 2017 New Revision: 311639 URL: https://svnweb.freebsd.org/changeset/base/311639 Log: sfxge(4): treat EFX_LINK_UNKOWN as link down It is safer to consider EFX_LINK_UNKNOWN as link down. link_mode is set to EFX_LINK_UNKNOWN on port stop and fini. Reviewed by: philip Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9060 Modified: head/sys/dev/sfxge/sfxge.h Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Sat Jan 7 10:51:12 2017 (r311638) +++ head/sys/dev/sfxge/sfxge.h Sat Jan 7 10:52:02 2017 (r311639) @@ -326,7 +326,9 @@ struct sfxge_softc { #endif }; -#define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) +#define SFXGE_LINK_UP(sc) \ + ((sc)->port.link_mode != EFX_LINK_DOWN && \ + (sc)->port.link_mode != EFX_LINK_UNKNOWN) #define SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING) #define SFXGE_PARAM(_name) "hw.sfxge." #_name From owner-svn-src-head@freebsd.org Sat Jan 7 10:55:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96D71CA42B3; Sat, 7 Jan 2017 10:55:40 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 722E31952; Sat, 7 Jan 2017 10:55:40 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07AtdLm038473; Sat, 7 Jan 2017 10:55:39 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07AtcXU038466; Sat, 7 Jan 2017 10:55:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701071055.v07AtcXU038466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 7 Jan 2017 10:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311640 - in head/sys/dev/sfxge: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 10:55:40 -0000 Author: arybchik Date: Sat Jan 7 10:55:38 2017 New Revision: 311640 URL: https://svnweb.freebsd.org/changeset/base/311640 Log: sfxge(4): allow DMA descs to cross 4k boundary on EF10 Siena has limitation on maximum byte count and 4k boundary crosssing (which is stricter than maximum byte count). EF10 has limitation on maximum byte count only. Reviewed by: philip Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9061 Modified: head/sys/dev/sfxge/common/ef10_tx.c head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_tx.c head/sys/dev/sfxge/common/hunt_nic.c head/sys/dev/sfxge/common/medford_nic.c head/sys/dev/sfxge/common/siena_nic.c head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/common/ef10_tx.c ============================================================================== --- head/sys/dev/sfxge/common/ef10_tx.c Sat Jan 7 10:52:02 2017 (r311639) +++ head/sys/dev/sfxge/common/ef10_tx.c Sat Jan 7 10:55:38 2017 (r311640) @@ -438,8 +438,9 @@ ef10_tx_qpost( size_t offset; efx_qword_t qword; - /* Fragments must not span 4k boundaries. */ - EFSYS_ASSERT(P2ROUNDUP(addr + 1, 4096) >= (addr + size)); + /* No limitations on boundary crossing */ + EFSYS_ASSERT(size <= + etp->et_enp->en_nic_cfg.enc_tx_dma_desc_size_max); id = added++ & etp->et_mask; offset = id * sizeof (efx_qword_t); @@ -584,8 +585,8 @@ ef10_tx_qdesc_dma_create( __in boolean_t eop, __out efx_desc_t *edp) { - /* Fragments must not span 4k boundaries. */ - EFSYS_ASSERT(P2ROUNDUP(addr + 1, 4096) >= addr + size); + /* No limitations on boundary crossing */ + EFSYS_ASSERT(size <= etp->et_enp->en_nic_cfg.enc_tx_dma_desc_size_max); EFSYS_PROBE4(tx_desc_dma_create, unsigned int, etp->et_index, efsys_dma_addr_t, addr, Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Sat Jan 7 10:52:02 2017 (r311639) +++ head/sys/dev/sfxge/common/efx.h Sat Jan 7 10:55:38 2017 (r311640) @@ -1154,6 +1154,13 @@ typedef struct efx_nic_cfg_s { uint32_t enc_rx_batch_max; /* Number of rx descriptors the hardware requires for a push. */ uint32_t enc_rx_push_align; + /* Maximum amount of data in DMA descriptor */ + uint32_t enc_tx_dma_desc_size_max; + /* + * Boundary which DMA descriptor data must not cross or 0 if no + * limitation. + */ + uint32_t enc_tx_dma_desc_boundary; /* * Maximum number of bytes into the packet the TCP header can start for * the hardware to apply TSO packet edits. Modified: head/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_tx.c Sat Jan 7 10:52:02 2017 (r311639) +++ head/sys/dev/sfxge/common/efx_tx.c Sat Jan 7 10:55:38 2017 (r311640) @@ -748,8 +748,12 @@ siena_tx_qpost( size_t size = ebp->eb_size; efsys_dma_addr_t end = start + size; - /* Fragments must not span 4k boundaries. */ - EFSYS_ASSERT(P2ROUNDUP(start + 1, 4096) >= end); + /* + * Fragments must not span 4k boundaries. + * Here it is a stricter requirement than the maximum length. + */ + EFSYS_ASSERT(P2ROUNDUP(start + 1, + etp->et_enp->en_nic_cfg.enc_tx_dma_desc_boundary) >= end); EFX_TX_DESC(etp, start, size, ebp->eb_eop, added); } @@ -1009,8 +1013,12 @@ siena_tx_qdesc_dma_create( __in boolean_t eop, __out efx_desc_t *edp) { - /* Fragments must not span 4k boundaries. */ - EFSYS_ASSERT(P2ROUNDUP(addr + 1, 4096) >= addr + size); + /* + * Fragments must not span 4k boundaries. + * Here it is a stricter requirement than the maximum length. + */ + EFSYS_ASSERT(P2ROUNDUP(addr + 1, + etp->et_enp->en_nic_cfg.enc_tx_dma_desc_boundary) >= addr + size); EFSYS_PROBE4(tx_desc_dma_create, unsigned int, etp->et_index, efsys_dma_addr_t, addr, Modified: head/sys/dev/sfxge/common/hunt_nic.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c Sat Jan 7 10:52:02 2017 (r311639) +++ head/sys/dev/sfxge/common/hunt_nic.c Sat Jan 7 10:55:38 2017 (r311640) @@ -304,6 +304,10 @@ hunt_board_cfg( /* Alignment for WPTR updates */ encp->enc_rx_push_align = EF10_RX_WPTR_ALIGN; + encp->enc_tx_dma_desc_size_max = EFX_MASK32(ESF_DZ_RX_KER_BYTE_CNT); + /* No boundary crossing limits */ + encp->enc_tx_dma_desc_boundary = 0; + /* * Set resource limits for MC_CMD_ALLOC_VIS. Note that we cannot use * MC_CMD_GET_RESOURCE_LIMITS here as that reports the available Modified: head/sys/dev/sfxge/common/medford_nic.c ============================================================================== --- head/sys/dev/sfxge/common/medford_nic.c Sat Jan 7 10:52:02 2017 (r311639) +++ head/sys/dev/sfxge/common/medford_nic.c Sat Jan 7 10:55:38 2017 (r311640) @@ -301,6 +301,10 @@ medford_board_cfg( /* Alignment for WPTR updates */ encp->enc_rx_push_align = EF10_RX_WPTR_ALIGN; + encp->enc_tx_dma_desc_size_max = EFX_MASK32(ESF_DZ_RX_KER_BYTE_CNT); + /* No boundary crossing limits */ + encp->enc_tx_dma_desc_boundary = 0; + /* * Set resource limits for MC_CMD_ALLOC_VIS. Note that we cannot use * MC_CMD_GET_RESOURCE_LIMITS here as that reports the available Modified: head/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nic.c Sat Jan 7 10:52:02 2017 (r311639) +++ head/sys/dev/sfxge/common/siena_nic.c Sat Jan 7 10:55:38 2017 (r311640) @@ -138,6 +138,10 @@ siena_board_cfg( /* Alignment for WPTR updates */ encp->enc_rx_push_align = 1; + encp->enc_tx_dma_desc_size_max = EFX_MASK32(FSF_AZ_TX_KER_BYTE_COUNT); + /* Fragments must not span 4k boundaries. */ + encp->enc_tx_dma_desc_boundary = 4096; + /* Resource limits */ rc = efx_mcdi_get_resource_limits(enp, &nevq, &nrxq, &ntxq); if (rc != 0) { Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Sat Jan 7 10:52:02 2017 (r311639) +++ head/sys/dev/sfxge/sfxge_tx.c Sat Jan 7 10:55:38 2017 (r311640) @@ -1720,6 +1720,7 @@ static int sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index, enum sfxge_txq_type type, unsigned int evq_index) { + const efx_nic_cfg_t *encp = efx_nic_cfg_get(sc->enp); char name[16]; struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->dev); struct sysctl_oid *txq_node; @@ -1750,9 +1751,11 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u &txq->buf_base_id); /* Create a DMA tag for packet mappings. */ - if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, + if (bus_dma_tag_create(sc->parent_dma_tag, 1, + encp->enc_tx_dma_desc_boundary, MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, - NULL, 0x11000, SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL, + NULL, 0x11000, SFXGE_TX_MAPPING_MAX_SEG, + encp->enc_tx_dma_desc_size_max, 0, NULL, NULL, &txq->packet_dma_tag) != 0) { device_printf(sc->dev, "Couldn't allocate txq DMA tag\n"); rc = ENOMEM; From owner-svn-src-head@freebsd.org Sat Jan 7 12:24:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EDA9CA364B; Sat, 7 Jan 2017 12:24:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F3D815E5; Sat, 7 Jan 2017 12:24:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07COjI1074369; Sat, 7 Jan 2017 12:24:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07COjUo074368; Sat, 7 Jan 2017 12:24:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701071224.v07COjUo074368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Jan 2017 12:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311646 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 12:24:46 -0000 Author: kib Date: Sat Jan 7 12:24:45 2017 New Revision: 311646 URL: https://svnweb.freebsd.org/changeset/base/311646 Log: Define _POSIX_PRIORITY_SCHEDULING as 0. sched_*(2) syscalls might be not available at runtime. Defining this constant as zero directs POSIX-compliant code to call sysconf(3) to detect the feature at runtime, and forces libc sysconf(3) to ask kernel. Noted by: ngie Reviewed by: jilles, ngie Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D9055 Modified: head/sys/sys/unistd.h Modified: head/sys/sys/unistd.h ============================================================================== --- head/sys/sys/unistd.h Sat Jan 7 12:04:30 2017 (r311645) +++ head/sys/sys/unistd.h Sat Jan 7 12:24:45 2017 (r311646) @@ -65,7 +65,7 @@ #define _POSIX_MONOTONIC_CLOCK 200112L #define _POSIX_NO_TRUNC 1 #define _POSIX_PRIORITIZED_IO (-1) -#define _POSIX_PRIORITY_SCHEDULING 200112L +#define _POSIX_PRIORITY_SCHEDULING 0 #define _POSIX_RAW_SOCKETS 200112L #define _POSIX_REALTIME_SIGNALS 200112L #define _POSIX_SEMAPHORES 200112L From owner-svn-src-head@freebsd.org Sat Jan 7 14:40:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF7E7CA4DB8; Sat, 7 Jan 2017 14:40:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87930112A; Sat, 7 Jan 2017 14:40:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07Eew6d028371; Sat, 7 Jan 2017 14:40:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07EewUR028369; Sat, 7 Jan 2017 14:40:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701071440.v07EewUR028369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 7 Jan 2017 14:40:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311647 - head/contrib/llvm/projects/libunwind/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 14:40:59 -0000 Author: emaste Date: Sat Jan 7 14:40:58 2017 New Revision: 311647 URL: https://svnweb.freebsd.org/changeset/base/311647 Log: libunwind: add noexec stack annotation Reported by: vangyzen Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9075 Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S ============================================================================== --- head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Sat Jan 7 12:24:45 2017 (r311646) +++ head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Sat Jan 7 14:40:58 2017 (r311647) @@ -527,3 +527,5 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9li ret // jump to ra #endif + + .section .note.GNU-stack,"",@progbits Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S ============================================================================== --- head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Sat Jan 7 12:24:45 2017 (r311646) +++ head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Sat Jan 7 14:40:58 2017 (r311647) @@ -469,3 +469,5 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext /* RISCVTODO */ #endif + + .section .note.GNU-stack,"",@progbits From owner-svn-src-head@freebsd.org Sat Jan 7 15:57:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95C57CA46DA; Sat, 7 Jan 2017 15:57:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 662581E92; Sat, 7 Jan 2017 15:57:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07FvCVI063156; Sat, 7 Jan 2017 15:57:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07FvCUD063155; Sat, 7 Jan 2017 15:57:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701071557.v07FvCUD063155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Jan 2017 15:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311649 - head/contrib/ngatm/snmp_atm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 15:57:13 -0000 Author: dim Date: Sat Jan 7 15:57:12 2017 New Revision: 311649 URL: https://svnweb.freebsd.org/changeset/base/311649 Log: Fix the following clang 4.0.0 warning in ngatm's snmp_atm.c: contrib/ngatm/snmp_atm/snmp_atm.c:173:6: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if (!ifmr.ifm_status & IFM_AVALID) { ^ ~ Obviously, the masking needs to be done before the logical not operation. Add parentheses to make it so. MFC after: 3 days Modified: head/contrib/ngatm/snmp_atm/snmp_atm.c Modified: head/contrib/ngatm/snmp_atm/snmp_atm.c ============================================================================== --- head/contrib/ngatm/snmp_atm/snmp_atm.c Sat Jan 7 15:18:49 2017 (r311648) +++ head/contrib/ngatm/snmp_atm/snmp_atm.c Sat Jan 7 15:57:12 2017 (r311649) @@ -170,7 +170,7 @@ atmif_check_carrier(struct atmif_priv *a aif->pub.carrier = ATMIF_CARRIER_UNKNOWN; return; } - if (!ifmr.ifm_status & IFM_AVALID) { + if (!(ifmr.ifm_status & IFM_AVALID)) { aif->pub.carrier = ATMIF_CARRIER_UNKNOWN; return; } From owner-svn-src-head@freebsd.org Sat Jan 7 15:58:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81C29CA474D; Sat, 7 Jan 2017 15:58:58 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5028E101C; Sat, 7 Jan 2017 15:58:58 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07Fwvm7063247; Sat, 7 Jan 2017 15:58:57 GMT (envelope-from lifanov@FreeBSD.org) Received: (from lifanov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07FwvQp063246; Sat, 7 Jan 2017 15:58:57 GMT (envelope-from lifanov@FreeBSD.org) Message-Id: <201701071558.v07FwvQp063246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lifanov set sender to lifanov@FreeBSD.org using -f From: Nikolai Lifanov Date: Sat, 7 Jan 2017 15:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311650 - head/sys/dev/kbd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 15:58:58 -0000 Author: lifanov (ports committer) Date: Sat Jan 7 15:58:57 2017 New Revision: 311650 URL: https://svnweb.freebsd.org/changeset/base/311650 Log: Restore priority value for OGIO_KEYMAP PR: 206678 Submitted by: ecturt@gmail.com Reviewed by: cem Approved by: cem, matthew (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5095 Modified: head/sys/dev/kbd/kbd.c Modified: head/sys/dev/kbd/kbd.c ============================================================================== --- head/sys/dev/kbd/kbd.c Sat Jan 7 15:57:12 2017 (r311649) +++ head/sys/dev/kbd/kbd.c Sat Jan 7 15:58:57 2017 (r311650) @@ -884,7 +884,7 @@ genkbd_commonioctl(keyboard_t *kbd, u_lo omapp->key[i].spcl = mapp->key[i].spcl; omapp->key[i].flgs = mapp->key[i].flgs; } - return (0); + break; case PIO_KEYMAP: /* set keyboard translation table */ case OPIO_KEYMAP: /* set keyboard translation table (compat) */ #ifndef KBD_DISABLE_KEYMAP_LOAD From owner-svn-src-head@freebsd.org Sat Jan 7 16:05:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6B7CCA4B16; Sat, 7 Jan 2017 16:05:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7742E15B6; Sat, 7 Jan 2017 16:05:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07G5Jpf067348; Sat, 7 Jan 2017 16:05:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07G5JDb067343; Sat, 7 Jan 2017 16:05:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701071605.v07G5JDb067343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Jan 2017 16:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311651 - in head/lib/libc: include stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 16:05:20 -0000 Author: kib Date: Sat Jan 7 16:05:19 2017 New Revision: 311651 URL: https://svnweb.freebsd.org/changeset/base/311651 Log: Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit. libstdc++ before gcc r244057 expected that libc provided __cxa_thread_atexit_impl, and libstdc++ implemented __cxa_thread_atexit, by forwarding the calls to _impl. Mentioned gcc revision checks for __cxa_thread_atexit in libc and does not provide the symbol from libstdc++ if found. This change helps older gcc, in particular, all released versions which implement thread_local, by consolidating the implementation into libc. For that versions, if configured with the current libc, the __cxa_thread_atexit is exported from libstdc++ as a trivial wrapper around libc::__cxa_thread_atexit_impl. The __cxa_thread_atexit implementation is put into separate source file to allow for static linking with older libstdc++.a. gcc bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968 Reported by: Hannes Hauswedell PR: 215709 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Added: head/lib/libc/stdlib/cxa_thread_atexit_impl.c - copied, changed from r311650, head/lib/libc/stdlib/cxa_thread_atexit.c Modified: head/lib/libc/include/libc_private.h head/lib/libc/stdlib/Makefile.inc head/lib/libc/stdlib/Symbol.map head/lib/libc/stdlib/cxa_thread_atexit.c Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Sat Jan 7 15:58:57 2017 (r311650) +++ head/lib/libc/include/libc_private.h Sat Jan 7 16:05:19 2017 (r311651) @@ -272,6 +272,8 @@ void _malloc_thread_cleanup(void); * thread is exiting, so its thread-local dtors should be called. */ void __cxa_thread_call_dtors(void); +int __cxa_thread_atexit_hidden(void (*dtor_func)(void *), void *obj, + void *dso_symbol) __hidden; /* * These functions are used by the threading libraries in order to protect Modified: head/lib/libc/stdlib/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/Makefile.inc Sat Jan 7 15:58:57 2017 (r311650) +++ head/lib/libc/stdlib/Makefile.inc Sat Jan 7 16:05:19 2017 (r311651) @@ -5,7 +5,9 @@ .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ - bsearch.c cxa_thread_atexit.c div.c exit.c getenv.c getopt.c getopt_long.c \ + bsearch.c \ + cxa_thread_atexit.c cxa_thread_atexit_impl.c \ + div.c exit.c getenv.c getopt.c getopt_long.c \ getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ hsearch_r.c imaxabs.c imaxdiv.c \ insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ Modified: head/lib/libc/stdlib/Symbol.map ============================================================================== --- head/lib/libc/stdlib/Symbol.map Sat Jan 7 15:58:57 2017 (r311650) +++ head/lib/libc/stdlib/Symbol.map Sat Jan 7 16:05:19 2017 (r311651) @@ -118,6 +118,7 @@ FBSD_1.4 { FBSD_1.5 { __cxa_thread_atexit; + __cxa_thread_atexit_impl; }; FBSDprivate_1.0 { Modified: head/lib/libc/stdlib/cxa_thread_atexit.c ============================================================================== --- head/lib/libc/stdlib/cxa_thread_atexit.c Sat Jan 7 15:58:57 2017 (r311650) +++ head/lib/libc/stdlib/cxa_thread_atexit.c Sat Jan 7 16:05:19 2017 (r311651) @@ -1,7 +1,10 @@ /*- - * Copyright (c) 2016 Mahdi Mokhtari + * Copyright (c) 2017 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -27,114 +30,11 @@ #include __FBSDID("$FreeBSD$"); -#include -#include "namespace.h" -#include -#include -#include -#include -#include -#include -#include "un-namespace.h" #include "libc_private.h" -/* - * C++11 introduces the thread_local scope (like __thread with some - * additions). As a key-feature it should support non-trivial - * destructors, registered with __cxa_thread_atexit() to be executed - * at the thread termination. - * - * The implemention keeps a _Thread_local list of destructors per each - * thread, and calls __cxa_thread_call_dtors() on each thread's exit - * to do cleanup. For a thread calling exit(3), in particular, for - * the initial thread returning from main(), we call - * __cxa_thread_call_dtors() inside exit(). - * - * It could be possible that a dynamically loaded library, use - * thread_local variable but is dlclose()'d before thread exit. The - * destructor of this variable will then try to access the address, - * for calling it but it's unloaded, so it'll crash. We're using - * __elf_phdr_match_addr() to detect and prevent such cases and so - * prevent the crash. - */ - -#define CXA_DTORS_ITERATIONS 4 - -struct cxa_thread_dtor { - void *obj; - void (*func)(void *); - void *dso; - LIST_ENTRY(cxa_thread_dtor) entry; -}; -static _Thread_local LIST_HEAD(dtor_list, cxa_thread_dtor) dtors = - LIST_HEAD_INITIALIZER(dtors); - int __cxa_thread_atexit(void (*dtor_func)(void *), void *obj, void *dso_symbol) { - struct cxa_thread_dtor *new_dtor; - - new_dtor = malloc(sizeof(*new_dtor)); - if (new_dtor == NULL) { - errno = ENOMEM; /* forcibly override malloc(3) error */ - return (-1); - } - - new_dtor->obj = obj; - new_dtor->func = dtor_func; - new_dtor->dso = dso_symbol; - LIST_INSERT_HEAD(&dtors, new_dtor, entry); - return (0); -} - -static void -walk_cb_call(struct cxa_thread_dtor *dtor) -{ - struct dl_phdr_info phdr_info; - - if (_rtld_addr_phdr(dtor->dso, &phdr_info) && - __elf_phdr_match_addr(&phdr_info, dtor->func)) - dtor->func(dtor->obj); - else - fprintf(stderr, "__cxa_thread_call_dtors: dtr %p from " - "unloaded dso, skipping\n", (void *)(dtor->func)); -} - -static void -walk_cb_nocall(struct cxa_thread_dtor *dtor __unused) -{ -} - -static void -cxa_thread_walk(void (*cb)(struct cxa_thread_dtor *)) -{ - struct cxa_thread_dtor *dtor, *tdtor; - - LIST_FOREACH_SAFE(dtor, &dtors, entry, tdtor) { - LIST_REMOVE(dtor, entry); - cb(dtor); - free(dtor); - } -} - -/* - * This is the callback function we use to call destructors, once for - * each thread. It is called in exit(3) in libc/stdlib/exit.c and - * before exit_thread() in libthr/thread/thr_exit.c. - */ -void -__cxa_thread_call_dtors(void) -{ - int i; - - for (i = 0; i < CXA_DTORS_ITERATIONS && !LIST_EMPTY(&dtors); i++) - cxa_thread_walk(walk_cb_call); - if (!LIST_EMPTY(&dtors)) { - fprintf(stderr, "Thread %p is exiting with more " - "thread-specific dtors created after %d iterations " - "of destructor calls\n", - _pthread_self(), i); - cxa_thread_walk(walk_cb_nocall); - } + return (__cxa_thread_atexit_hidden(dtor_func, obj, dso_symbol)); } Copied and modified: head/lib/libc/stdlib/cxa_thread_atexit_impl.c (from r311650, head/lib/libc/stdlib/cxa_thread_atexit.c) ============================================================================== --- head/lib/libc/stdlib/cxa_thread_atexit.c Sat Jan 7 15:58:57 2017 (r311650, copy source) +++ head/lib/libc/stdlib/cxa_thread_atexit_impl.c Sat Jan 7 16:05:19 2017 (r311651) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2016 Mahdi Mokhtari + * Copyright (c) 2016, 2017 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -70,7 +74,16 @@ static _Thread_local LIST_HEAD(dtor_list LIST_HEAD_INITIALIZER(dtors); int -__cxa_thread_atexit(void (*dtor_func)(void *), void *obj, void *dso_symbol) +__cxa_thread_atexit_impl(void (*dtor_func)(void *), void *obj, + void *dso_symbol) +{ + + return (__cxa_thread_atexit_hidden(dtor_func, obj, dso_symbol)); +} + +int +__cxa_thread_atexit_hidden(void (*dtor_func)(void *), void *obj, + void *dso_symbol) { struct cxa_thread_dtor *new_dtor; From owner-svn-src-head@freebsd.org Sat Jan 7 17:37:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF103CA4B01; Sat, 7 Jan 2017 17:37:40 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A36791A5E; Sat, 7 Jan 2017 17:37:40 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07Hbdnh004207; Sat, 7 Jan 2017 17:37:39 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07HbdIe004206; Sat, 7 Jan 2017 17:37:39 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201701071737.v07HbdIe004206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 7 Jan 2017 17:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311652 - head/usr.bin/users X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 17:37:41 -0000 Author: allanjude Date: Sat Jan 7 17:37:39 2017 New Revision: 311652 URL: https://svnweb.freebsd.org/changeset/base/311652 Log: style(9) fix Submitted by: jmallett Modified: head/usr.bin/users/users.cc Modified: head/usr.bin/users/users.cc ============================================================================== --- head/usr.bin/users/users.cc Sat Jan 7 16:05:19 2017 (r311651) +++ head/usr.bin/users/users.cc Sat Jan 7 17:37:39 2017 (r311652) @@ -27,10 +27,11 @@ * SUCH DAMAGE. */ -#include #include __FBSDID("$FreeBSD$"); +#include + #include #include #include From owner-svn-src-head@freebsd.org Sat Jan 7 19:23:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6B6BCA4A81; Sat, 7 Jan 2017 19:23:22 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:c:538::196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7526C1515; Sat, 7 Jan 2017 19:23:22 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from [192.168.0.162] (unknown [IPv6:2604:2000:8113:7200:e885:a241:9f9c:e4a6]) (Authenticated sender: gnn@neville-neil.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 8707A17209B; Sat, 7 Jan 2017 20:23:19 +0100 (CET) From: "George Neville-Neil" To: "Mark Johnston" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311225 - head/sys/netinet Date: Sat, 07 Jan 2017 14:23:17 -0500 Message-ID: <4C01D080-64D9-4862-AFD5-42CC49B5CC0B@freebsd.org> In-Reply-To: <20170104182630.GA26522@wkstn-mjohnston.west.isilon.com> References: <201701040219.v042JDEk026544@repo.freebsd.org> <20170104182630.GA26522@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; markup=markdown X-Mailer: MailMate (1.9.6r5319) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 19:23:22 -0000 On 4 Jan 2017, at 13:26, Mark Johnston wrote: > On Wed, Jan 04, 2017 at 02:19:13AM +0000, George V. Neville-Neil > wrote: >> Author: gnn >> Date: Wed Jan 4 02:19:13 2017 >> New Revision: 311225 >> URL: https://svnweb.freebsd.org/changeset/base/311225 >> >> Log: >> Fix DTrace TCP tracepoints to not use mtod() as it is both >> unnecessary and >> dangerous. Those wanting data from an mbuf should use DTrace >> itself to get >> the data. > > I think you also need to update the types in in_kdtrace.c, and add a > translator for struct mbuf * to ipinfo_t. Fair points. Best, George From owner-svn-src-head@freebsd.org Sat Jan 7 19:26:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82BD4CA4C93; Sat, 7 Jan 2017 19:26:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 520C016E2; Sat, 7 Jan 2017 19:26:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07JQP3o050931; Sat, 7 Jan 2017 19:26:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07JQP0L050930; Sat, 7 Jan 2017 19:26:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701071926.v07JQP0L050930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 7 Jan 2017 19:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311655 - head/sys/crypto/skein/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 19:26:26 -0000 Author: emaste Date: Sat Jan 7 19:26:25 2017 New Revision: 311655 URL: https://svnweb.freebsd.org/changeset/base/311655 Log: libmd: add noexec stack annotation in skein_block_asm.s MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/crypto/skein/amd64/skein_block_asm.s Modified: head/sys/crypto/skein/amd64/skein_block_asm.s ============================================================================== --- head/sys/crypto/skein/amd64/skein_block_asm.s Sat Jan 7 19:16:53 2017 (r311654) +++ head/sys/crypto/skein/amd64/skein_block_asm.s Sat Jan 7 19:26:25 2017 (r311655) @@ -1326,4 +1326,6 @@ _SP_OFFS_ = _SP_OFFS_-8 ret .endif #---------------------------------------------------------------- + .section .note.GNU-stack,"",@progbits + .end From owner-svn-src-head@freebsd.org Sat Jan 7 19:31:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18B61CA4E95; Sat, 7 Jan 2017 19:31:33 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:c:538::195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC2F81A53; Sat, 7 Jan 2017 19:31:32 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from [192.168.0.162] (unknown [IPv6:2604:2000:8113:7200:e885:a241:9f9c:e4a6]) (Authenticated sender: gnn@neville-neil.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 589D8A80C2; Sat, 7 Jan 2017 20:31:30 +0100 (CET) From: "George Neville-Neil" To: "Mark Johnston" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311225 - head/sys/netinet Date: Sat, 07 Jan 2017 14:31:28 -0500 Message-ID: In-Reply-To: <4C01D080-64D9-4862-AFD5-42CC49B5CC0B@freebsd.org> References: <201701040219.v042JDEk026544@repo.freebsd.org> <20170104182630.GA26522@wkstn-mjohnston.west.isilon.com> <4C01D080-64D9-4862-AFD5-42CC49B5CC0B@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; markup=markdown X-Mailer: MailMate (1.9.6r5319) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 19:31:33 -0000 On 7 Jan 2017, at 14:23, George Neville-Neil wrote: > On 4 Jan 2017, at 13:26, Mark Johnston wrote: > >> On Wed, Jan 04, 2017 at 02:19:13AM +0000, George V. Neville-Neil >> wrote: >>> Author: gnn >>> Date: Wed Jan 4 02:19:13 2017 >>> New Revision: 311225 >>> URL: https://svnweb.freebsd.org/changeset/base/311225 >>> >>> Log: >>> Fix DTrace TCP tracepoints to not use mtod() as it is both >>> unnecessary and >>> dangerous. Those wanting data from an mbuf should use DTrace >>> itself to get >>> the data. >> >> I think you also need to update the types in in_kdtrace.c, and add a >> translator for struct mbuf * to ipinfo_t. > > Fair points. > Actually, following up to myself, this does not need to be done just yet. The pkt_info stuff is currently always NULL. I'm working on a copyoutmbuf() subroutine that will make all of this much cleaner. Best, George From owner-svn-src-head@freebsd.org Sat Jan 7 19:43:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5451CA3C10; Sat, 7 Jan 2017 19:43:41 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6912F110A; Sat, 7 Jan 2017 19:43:41 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07JherX059201; Sat, 7 Jan 2017 19:43:40 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07JheGK059200; Sat, 7 Jan 2017 19:43:40 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201701071943.v07JheGK059200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 7 Jan 2017 19:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311656 - head/sbin/md5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 19:43:41 -0000 Author: allanjude Date: Sat Jan 7 19:43:40 2017 New Revision: 311656 URL: https://svnweb.freebsd.org/changeset/base/311656 Log: Add skein(3) front ends to the md5 manpage Reported by: emaste Modified: head/sbin/md5/md5.1 Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Sat Jan 7 19:26:25 2017 (r311655) +++ head/sbin/md5/md5.1 Sat Jan 7 19:43:40 2017 (r311656) @@ -1,9 +1,10 @@ .\" $FreeBSD$ -.Dd April 22, 2016 +.Dd January 7, 2017 .Dt MD5 1 .Os .Sh NAME -.Nm md5 , sha1 , sha256 , sha384 , sha512, sha512t256, rmd160 +.Nm md5 , sha1 , sha256 , sha384 , sha512 , sha512t256 , rmd160 , +.Nm skein256 , skein512 , skein1024 .Nd calculate a message-digest fingerprint (checksum) for a file .Sh SYNOPSIS .Nm md5 @@ -41,11 +42,27 @@ .Op Fl c Ar string .Op Fl s Ar string .Op Ar +.Nm skein256 +.Op Fl pqrtx +.Op Fl c Ar string +.Op Fl s Ar string +.Op Ar +.Nm skein512 +.Op Fl pqrtx +.Op Fl c Ar string +.Op Fl s Ar string +.Op Ar +.Nm skein1024 +.Op Fl pqrtx +.Op Fl c Ar string +.Op Fl s Ar string +.Op Ar .Sh DESCRIPTION The -.Nm md5 , sha1 , sha256 , sha384 , sha512, sha512t256 +.Nm md5 , sha1 , sha256 , sha384 , sha512, sha512t256, rmd160, +.Nm skein256, skein512, and -.Nm rmd160 +.Nm skein1024 utilities take as input a message of arbitrary length and produce as output a .Dq fingerprint @@ -56,9 +73,9 @@ It is conjectured that it is computation produce two messages having the same message digest, or to produce any message having a given prespecified target message digest. The -.Tn MD5 , SHA-1 , SHA-256 , SHA-384 , SHA-512 +.Tn MD5 , SHA-1 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160, and -.Tn RIPEMD-160 +.Tn SKEIN algorithms are intended for digital signature applications, where a large file must be .Dq compressed @@ -128,9 +145,10 @@ Run a built-in test script. .El .Sh EXIT STATUS The -.Nm md5 , sha1 , sha256 , sha512, sha512t256 +.Nm md5 , sha1 , sha256 , sha512, sha512t256, rmd160, +.Nm skein256, skein512, and -.Nm rmd160 +.Nm skein1024 utilities exit 0 on success, 1 if at least one of the input files could not be read, and 2 if at least one file does not have the same hash as the @@ -143,7 +161,8 @@ option. .Xr sha 3 , .Xr sha256 3 , .Xr sha384 3 , -.Xr sha512 3 +.Xr sha512 3 , +.Xr skein 3 .Rs .%A R. Rivest .%T The MD5 Message-Digest Algorithm From owner-svn-src-head@freebsd.org Sat Jan 7 20:26:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65880CA49A1; Sat, 7 Jan 2017 20:26:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 286C51162; Sat, 7 Jan 2017 20:26:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07KQKv6075725; Sat, 7 Jan 2017 20:26:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07KQK0d075721; Sat, 7 Jan 2017 20:26:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701072026.v07KQK0d075721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 7 Jan 2017 20:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311657 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 20:26:21 -0000 Author: np Date: Sat Jan 7 20:26:19 2017 New Revision: 311657 URL: https://svnweb.freebsd.org/changeset/base/311657 Log: cxgbe/t4_tom: Fix tid accounting. An offloaded IPv6 connection uses 2 tids, not 1, in the hardware. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Sat Jan 7 19:43:40 2017 (r311656) +++ head/sys/dev/cxgbe/tom/t4_connect.c Sat Jan 7 20:26:19 2017 (r311657) @@ -128,7 +128,7 @@ do_act_establish(struct sge_iq *iq, cons INP_WLOCK(inp); toep->tid = tid; - insert_tid(sc, tid, toep); + insert_tid(sc, tid, toep, inp->inp_vflag & INP_IPV6 ? 2 : 1); if (inp->inp_flags & INP_DROPPED) { /* socket closed by the kernel before hw told us it connected */ Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Sat Jan 7 19:43:40 2017 (r311656) +++ head/sys/dev/cxgbe/tom/t4_listen.c Sat Jan 7 20:26:19 2017 (r311657) @@ -824,14 +824,16 @@ done_with_synqe(struct adapter *sc, stru struct inpcb *inp = lctx->inp; struct vi_info *vi = synqe->syn->m_pkthdr.rcvif->if_softc; struct l2t_entry *e = &sc->l2t->l2tab[synqe->l2e_idx]; + int ntids; INP_WLOCK_ASSERT(inp); + ntids = inp->inp_vflag & INP_IPV6 ? 2 : 1; TAILQ_REMOVE(&lctx->synq, synqe, link); inp = release_lctx(sc, lctx); if (inp) INP_WUNLOCK(inp); - remove_tid(sc, synqe->tid); + remove_tid(sc, synqe->tid, ntids); release_tid(sc, synqe->tid, &sc->sge.ctrlq[vi->pi->port_id]); t4_l2t_release(e); release_synqe(synqe); /* removed from synq list */ @@ -1180,7 +1182,7 @@ do_pass_accept_req(struct sge_iq *iq, co struct l2t_entry *e = NULL; int rscale, mtu_idx, rx_credits, rxqid, ulp_mode; struct synq_entry *synqe = NULL; - int reject_reason, v; + int reject_reason, v, ntids; uint16_t vid; #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); @@ -1254,6 +1256,8 @@ found: */ if (!in6_ifhasaddr(ifp, &inc.inc6_laddr)) REJECT_PASS_ACCEPT(); + + ntids = 2; } else { /* Don't offload if the ifcap isn't enabled */ @@ -1266,6 +1270,8 @@ found: */ if (!in_ifhasaddr(ifp, inc.inc_laddr)) REJECT_PASS_ACCEPT(); + + ntids = 1; } e = get_l2te_for_nexthop(pi, ifp, &inc); @@ -1343,7 +1349,7 @@ found: synqe->rcv_bufsize = rx_credits; atomic_store_rel_ptr(&synqe->wr, (uintptr_t)wr); - insert_tid(sc, tid, synqe); + insert_tid(sc, tid, synqe, ntids); TAILQ_INSERT_TAIL(&lctx->synq, synqe, link); hold_synqe(synqe); /* hold for the duration it's in the synq */ hold_lctx(lctx); /* A synqe on the list has a ref on its lctx */ @@ -1372,7 +1378,7 @@ found: if (m) m->m_pkthdr.rcvif = hw_ifp; - remove_tid(sc, synqe->tid); + remove_tid(sc, synqe->tid, ntids); free(wr, M_CXGBE); /* Yank the synqe out of the lctx synq. */ Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Sat Jan 7 19:43:40 2017 (r311656) +++ head/sys/dev/cxgbe/tom/t4_tom.c Sat Jan 7 20:26:19 2017 (r311657) @@ -307,7 +307,7 @@ release_offload_resources(struct toepcb t4_l2t_release(toep->l2te); if (tid >= 0) { - remove_tid(sc, tid); + remove_tid(sc, tid, toep->ce ? 2 : 1); release_tid(sc, tid, toep->ctrlq); } @@ -420,12 +420,12 @@ final_cpl_received(struct toepcb *toep) } void -insert_tid(struct adapter *sc, int tid, void *ctx) +insert_tid(struct adapter *sc, int tid, void *ctx, int ntids) { struct tid_info *t = &sc->tids; t->tid_tab[tid] = ctx; - atomic_add_int(&t->tids_in_use, 1); + atomic_add_int(&t->tids_in_use, ntids); } void * @@ -445,12 +445,12 @@ update_tid(struct adapter *sc, int tid, } void -remove_tid(struct adapter *sc, int tid) +remove_tid(struct adapter *sc, int tid, int ntids) { struct tid_info *t = &sc->tids; t->tid_tab[tid] = NULL; - atomic_subtract_int(&t->tids_in_use, 1); + atomic_subtract_int(&t->tids_in_use, ntids); } void Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Sat Jan 7 19:43:40 2017 (r311656) +++ head/sys/dev/cxgbe/tom/t4_tom.h Sat Jan 7 20:26:19 2017 (r311657) @@ -306,10 +306,10 @@ void free_toepcb(struct toepcb *); void offload_socket(struct socket *, struct toepcb *); void undo_offload_socket(struct socket *); void final_cpl_received(struct toepcb *); -void insert_tid(struct adapter *, int, void *); +void insert_tid(struct adapter *, int, void *, int); void *lookup_tid(struct adapter *, int); void update_tid(struct adapter *, int, void *); -void remove_tid(struct adapter *, int); +void remove_tid(struct adapter *, int, int); void release_tid(struct adapter *, int, struct sge_wrq *); int find_best_mtu_idx(struct adapter *, struct in_conninfo *, int); u_long select_rcv_wnd(struct socket *); From owner-svn-src-head@freebsd.org Sat Jan 7 22:55:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43CB3CA4048; Sat, 7 Jan 2017 22:55:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 128311E3D; Sat, 7 Jan 2017 22:55:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07MtNUB039637; Sat, 7 Jan 2017 22:55:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07MtNPb039636; Sat, 7 Jan 2017 22:55:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701072255.v07MtNPb039636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 7 Jan 2017 22:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311658 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 22:55:24 -0000 Author: ian Date: Sat Jan 7 22:55:23 2017 New Revision: 311658 URL: https://svnweb.freebsd.org/changeset/base/311658 Log: Only write to *active once, even when GPIO_ACTIVE_LOW is set. Modified: head/sys/dev/gpio/ofw_gpiobus.c Modified: head/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- head/sys/dev/gpio/ofw_gpiobus.c Sat Jan 7 20:26:19 2017 (r311657) +++ head/sys/dev/gpio/ofw_gpiobus.c Sat Jan 7 22:55:23 2017 (r311658) @@ -178,9 +178,10 @@ gpio_pin_is_active(gpio_pin_t pin, bool return (rv); } - *active = tmp != 0; if (pin->flags & GPIO_ACTIVE_LOW) - *active = !(*active); + *active = tmp == 0; + else + *active = tmp != 0; return (0); } From owner-svn-src-head@freebsd.org Sat Jan 7 23:42:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B80F3CA40AD; Sat, 7 Jan 2017 23:42:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 705F318CF; Sat, 7 Jan 2017 23:42:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v07NgHKE059835; Sat, 7 Jan 2017 23:42:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v07NgHrk059834; Sat, 7 Jan 2017 23:42:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201701072342.v07NgHrk059834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Jan 2017 23:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311659 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 23:42:18 -0000 Author: bapt Date: Sat Jan 7 23:42:17 2017 New Revision: 311659 URL: https://svnweb.freebsd.org/changeset/base/311659 Log: remove network mask calculation for Classful network Nowadays it's not necessary to compute network mask from the IP address and compare to given by DHCP. Submitted by: kczekirda Reviewed by: glebius, bapt MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D8740 Modified: head/lib/libstand/bootp.c Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Sat Jan 7 22:55:23 2017 (r311658) +++ head/lib/libstand/bootp.c Sat Jan 7 23:42:17 2017 (r311659) @@ -62,8 +62,6 @@ __FBSDID("$FreeBSD$"); struct in_addr servip; -static n_long nmask, smask; - static time_t bot; static char vm_rfc1048[4] = VM_RFC1048; @@ -223,30 +221,19 @@ bootp(sock, flag) bcopy(rbuf.rbootp.bp_file, bootfile, sizeof(bootfile)); bootfile[sizeof(bootfile) - 1] = '\0'; - if (IN_CLASSA(ntohl(myip.s_addr))) - nmask = htonl(IN_CLASSA_NET); - else if (IN_CLASSB(ntohl(myip.s_addr))) - nmask = htonl(IN_CLASSB_NET); - else - nmask = htonl(IN_CLASSC_NET); -#ifdef BOOTP_DEBUG - if (debug) - printf("'native netmask' is %s\n", intoa(nmask)); -#endif - - /* Check subnet mask against net mask; toss if bogus */ - if ((nmask & smask) != nmask) { + if (!netmask) { + if (IN_CLASSA(ntohl(myip.s_addr))) + netmask = htonl(IN_CLASSA_NET); + else if (IN_CLASSB(ntohl(myip.s_addr))) + netmask = htonl(IN_CLASSB_NET); + else + netmask = htonl(IN_CLASSC_NET); #ifdef BOOTP_DEBUG if (debug) - printf("subnet mask (%s) bad\n", intoa(smask)); + printf("'native netmask' is %s\n", intoa(netmask)); #endif - smask = 0; } - /* Get subnet (or natural net) mask */ - netmask = nmask; - if (smask) - netmask = smask; #ifdef BOOTP_DEBUG if (debug) printf("mask: %s\n", intoa(netmask)); @@ -385,7 +372,7 @@ vend_rfc1048(cp, len) break; if (tag == TAG_SUBNET_MASK) { - bcopy(cp, &smask, sizeof(smask)); + bcopy(cp, &netmask, sizeof(netmask)); } if (tag == TAG_GATEWAY) { bcopy(cp, &gateip.s_addr, sizeof(gateip.s_addr)); @@ -445,7 +432,7 @@ vend_cmu(cp) vp = (struct cmu_vend *)cp; if (vp->v_smask.s_addr != 0) { - smask = vp->v_smask.s_addr; + netmask = vp->v_smask.s_addr; } if (vp->v_dgate.s_addr != 0) { gateip = vp->v_dgate;