From owner-svn-src-head@freebsd.org Sun Apr 23 01:18: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 8775ED3F837; Sun, 23 Apr 2017 01:18:00 +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 57248CE2; Sun, 23 Apr 2017 01:18:00 +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 v3N1HxPR090503; Sun, 23 Apr 2017 01:17:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N1Hxh9090502; Sun, 23 Apr 2017 01:17:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704230117.v3N1Hxh9090502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 23 Apr 2017 01:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317310 - head/lib/libgeom 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, 23 Apr 2017 01:18:00 -0000 Author: ngie Date: Sun Apr 23 01:17:59 2017 New Revision: 317310 URL: https://svnweb.freebsd.org/changeset/base/317310 Log: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libgeom/geom_stats.c Modified: head/lib/libgeom/geom_stats.c ============================================================================== --- head/lib/libgeom/geom_stats.c Sat Apr 22 23:30:02 2017 (r317309) +++ head/lib/libgeom/geom_stats.c Sun Apr 23 01:17:59 2017 (r317310) @@ -29,20 +29,18 @@ * $FreeBSD$ */ -#include +#include +#include +#include +#include #include #include +#include #include #include #include #include -#include -#include -#include -#include - - /************************************************************/ static uint npages, pagesize, spp; static int statsfd = -1; @@ -67,7 +65,7 @@ geom_stats_resync(void) if (statsfd == -1) return; for (;;) { - p = mmap(statp, (npages + 1) * pagesize, + p = mmap(statp, (npages + 1) * pagesize, PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) break; From owner-svn-src-head@freebsd.org Sun Apr 23 01:47: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 514A2D40718; Sun, 23 Apr 2017 01:47: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 168A01C0A; Sun, 23 Apr 2017 01:47: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 v3N1lqbc002817; Sun, 23 Apr 2017 01:47:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N1lqsO002816; Sun, 23 Apr 2017 01:47:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704230147.v3N1lqsO002816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 23 Apr 2017 01:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317311 - head/lib/libgeom 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, 23 Apr 2017 01:47:53 -0000 Author: ngie Date: Sun Apr 23 01:47:51 2017 New Revision: 317311 URL: https://svnweb.freebsd.org/changeset/base/317311 Log: Check for failures from getpagesize(3) Return errno on failure, similar to the open(2) call above it. MFC after: 5 weeks Reported by: Coverity CID: 1193753 Sponsored by: Dell EMC Isilon Modified: head/lib/libgeom/geom_stats.c Modified: head/lib/libgeom/geom_stats.c ============================================================================== --- head/lib/libgeom/geom_stats.c Sun Apr 23 01:17:59 2017 (r317310) +++ head/lib/libgeom/geom_stats.c Sun Apr 23 01:47:51 2017 (r317311) @@ -87,6 +87,8 @@ geom_stats_open(void) if (statsfd < 0) return (errno); pagesize = getpagesize(); + if (pagesize == -1) + return (errno); spp = pagesize / sizeof(struct devstat); p = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) { From owner-svn-src-head@freebsd.org Sun Apr 23 01:50: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 6CDEAD40886; Sun, 23 Apr 2017 01:50:48 +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 3A1401E57; Sun, 23 Apr 2017 01:50:48 +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 v3N1ol58003957; Sun, 23 Apr 2017 01:50:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N1olNu003937; Sun, 23 Apr 2017 01:50:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704230150.v3N1olNu003937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 23 Apr 2017 01:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317312 - head/lib/libgeom 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, 23 Apr 2017 01:50:48 -0000 Author: ngie Date: Sun Apr 23 01:50:47 2017 New Revision: 317312 URL: https://svnweb.freebsd.org/changeset/base/317312 Log: Fix type for `pagesize` to match the return type for getpagesize(3) to fix the build MFC after: 5 weeks X-MFC with: r317311 Pointyhat to: ngie Sponsored by: Dell EMC Isilon Modified: head/lib/libgeom/geom_stats.c Modified: head/lib/libgeom/geom_stats.c ============================================================================== --- head/lib/libgeom/geom_stats.c Sun Apr 23 01:47:51 2017 (r317311) +++ head/lib/libgeom/geom_stats.c Sun Apr 23 01:50:47 2017 (r317312) @@ -42,8 +42,8 @@ #include /************************************************************/ -static uint npages, pagesize, spp; -static int statsfd = -1; +static uint npages, spp; +static int pagesize, statsfd = -1; static u_char *statp; void From owner-svn-src-head@freebsd.org Sun Apr 23 02:30: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 4ADCDD3F9C8; Sun, 23 Apr 2017 02:30: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 F0094653; Sun, 23 Apr 2017 02:30: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 v3N2U7MU019264; Sun, 23 Apr 2017 02:30:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N2U7mj019263; Sun, 23 Apr 2017 02:30:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704230230.v3N2U7mj019263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 23 Apr 2017 02:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317313 - head/tools/regression/geom_gpt 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, 23 Apr 2017 02:30:08 -0000 Author: ngie Date: Sun Apr 23 02:30:06 2017 New Revision: 317313 URL: https://svnweb.freebsd.org/changeset/base/317313 Log: gctl_test.t: catch errors with the mdcfg directive While here, add a note about certain testcases relying on `count=1024` in the "create" portion. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Modified: head/tools/regression/geom_gpt/gctl_test.t Modified: head/tools/regression/geom_gpt/gctl_test.t ============================================================================== --- head/tools/regression/geom_gpt/gctl_test.t Sun Apr 23 01:50:47 2017 (r317312) +++ head/tools/regression/geom_gpt/gctl_test.t Sun Apr 23 02:30:06 2017 (r317313) @@ -172,20 +172,32 @@ foreach my $key (sort keys %steps) { ($errmsg eq "" ? "" : " - $errmsg")); unlink $out; } elsif ($action =~ "^mdcfg") { + my $errmsg = ""; if ($args =~ "^create") { - system("dd if=/dev/zero of=$disk count=1024 2>&1"); - if ($args =~ "corrupted") { - system("gpt create -p $disk"); + # NOTE: `count=1024` affects $key => {"025" "054", "065"}. + if (system("dd if=/dev/zero of=$disk count=1024 2>&1") == 0) { + chomp($dev = `mdconfig -a -t vnode -f $disk`); + if ($? == 0) { + if (system("gpart create -s GPT $dev") != 0) { + $errmsg = "gpart create failed"; + } + } else { + $errmsg = "mdconfig -a failed"; + } + } else { + $errmsg = "dd failed"; } - $dev = `mdconfig -a -t vnode -f $disk`; - chomp $dev; } elsif ($args =~ "^destroy") { $dev =~ s/md/-u /g; - system("mdconfig -d $dev"); + if (system("mdconfig -d $dev") != 0) { + $errmsg = "mdconfig -d failed"; + } unlink $disk; $dev = "n/a"; } - print "ok $nr \# mdcfg($key)\n"; + printf("%sok $nr # mdcfg($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); } elsif ($action =~ "^conf") { system("sysctl -b kern.geom.conftxt | grep -a $dev | sed -e s:$disk:DISK:g -e s:$dev:DEV:g | sort | md5 -p | tee $out 2>&1"); $st = `tail -1 $out`; From owner-svn-src-head@freebsd.org Sun Apr 23 03:17: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 B18E2D40ED9; Sun, 23 Apr 2017 03:17:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 838AF8D0; Sun, 23 Apr 2017 03:17:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3N3HWEi040006; Sun, 23 Apr 2017 03:17:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N3HWtd040005; Sun, 23 Apr 2017 03:17:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704230317.v3N3HWtd040005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 23 Apr 2017 03:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317315 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 23 Apr 2017 03:17:33 -0000 Author: ngie Date: Sun Apr 23 03:17:32 2017 New Revision: 317315 URL: https://svnweb.freebsd.org/changeset/base/317315 Log: Note that getpagesize(3) can return -1 on failure MFC after: 5 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/getpagesize.3 Modified: head/lib/libc/gen/getpagesize.3 ============================================================================== --- head/lib/libc/gen/getpagesize.3 Sun Apr 23 03:16:38 2017 (r317314) +++ head/lib/libc/gen/getpagesize.3 Sun Apr 23 03:17:32 2017 (r317315) @@ -28,7 +28,7 @@ .\" @(#)getpagesize.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd April 22, 2017 .Dt GETPAGESIZE 3 .Os .Sh NAME @@ -51,6 +51,9 @@ management calls. The page size is a system page size and may not be the same as the underlying hardware page size. +.Sh RETURN VALUES +.Nm +returns the number of bytes in a page on success, -1 on failure. .Sh SEE ALSO .Xr pagesize 1 , .Xr sbrk 2 From owner-svn-src-head@freebsd.org Sun Apr 23 03:36: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 4DFD3D3F64F; Sun, 23 Apr 2017 03:36: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 1E55D644; Sun, 23 Apr 2017 03:36: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 v3N3a3Np048494; Sun, 23 Apr 2017 03:36:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N3a3Xn048493; Sun, 23 Apr 2017 03:36:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704230336.v3N3a3Xn048493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 23 Apr 2017 03:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317316 - head/lib/libgeom 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, 23 Apr 2017 03:36:04 -0000 Author: ngie Date: Sun Apr 23 03:36:03 2017 New Revision: 317316 URL: https://svnweb.freebsd.org/changeset/base/317316 Log: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libgeom/geom_ctl.c Modified: head/lib/libgeom/geom_ctl.c ============================================================================== --- head/lib/libgeom/geom_ctl.c Sun Apr 23 03:17:32 2017 (r317315) +++ head/lib/libgeom/geom_ctl.c Sun Apr 23 03:36:03 2017 (r317316) @@ -29,23 +29,22 @@ * $FreeBSD$ */ -#include +#include +#include #include #include -#include -#include +#include #include -#include -#include +#include +#include #include -#include - -#include +#include +#include #define GCTL_TABLE 1 #include -/* +/* * Global pointer to a string that is used to avoid an errorneous free in * gctl_free. */ @@ -172,7 +171,7 @@ gctl_param_add(struct gctl_req *req, con ap->len = len; else if (len < 0) { ap->flag |= GCTL_PARAM_ASCII; - ap->len = strlen(value) + 1; + ap->len = strlen(value) + 1; } } From owner-svn-src-head@freebsd.org Sun Apr 23 07:43: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 2CCCFD4C253; Sun, 23 Apr 2017 07:43:52 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0827C62F; Sun, 23 Apr 2017 07:43:51 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3N7hpFZ050010; Sun, 23 Apr 2017 07:43:51 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N7hptZ050008; Sun, 23 Apr 2017 07:43:51 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201704230743.v3N7hptZ050008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 23 Apr 2017 07:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317323 - 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: Sun, 23 Apr 2017 07:43:52 -0000 Author: dchagin Date: Sun Apr 23 07:43:50 2017 New Revision: 317323 URL: https://svnweb.freebsd.org/changeset/base/317323 Log: Add Evdev ioctl handler to the Linuxulator. PR: 218627 Submitted by: Jan Kokemüller Reported by: Jan Kokemüller MFC after: 1 week Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Sun Apr 23 07:37:14 2017 (r317322) +++ head/sys/compat/linux/linux_ioctl.c Sun Apr 23 07:43:50 2017 (r317323) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #ifdef COMPAT_LINUX32 @@ -83,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -110,6 +112,7 @@ static linux_ioctl_function_t linux_ioct static linux_ioctl_function_t linux_ioctl_v4l2; static linux_ioctl_function_t linux_ioctl_special; static linux_ioctl_function_t linux_ioctl_fbsd_usb; +static linux_ioctl_function_t linux_ioctl_evdev; static struct linux_ioctl_handler cdrom_handler = { linux_ioctl_cdrom, LINUX_IOCTL_CDROM_MIN, LINUX_IOCTL_CDROM_MAX }; @@ -139,6 +142,8 @@ static struct linux_ioctl_handler video2 { linux_ioctl_v4l2, LINUX_IOCTL_VIDEO2_MIN, LINUX_IOCTL_VIDEO2_MAX }; static struct linux_ioctl_handler fbsd_usb = { linux_ioctl_fbsd_usb, FBSD_LUSB_MIN, FBSD_LUSB_MAX }; +static struct linux_ioctl_handler evdev_handler = +{ linux_ioctl_evdev, LINUX_IOCTL_EVDEV_MIN, LINUX_IOCTL_EVDEV_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, vfat_handler); @@ -154,6 +159,7 @@ DATA_SET(linux_ioctl_handler_set, sg_han DATA_SET(linux_ioctl_handler_set, video_handler); DATA_SET(linux_ioctl_handler_set, video2_handler); DATA_SET(linux_ioctl_handler_set, fbsd_usb); +DATA_SET(linux_ioctl_handler_set, evdev_handler); struct handler_element { @@ -3621,6 +3627,65 @@ linux_ioctl_fbsd_usb(struct thread *td, } /* + * Some evdev ioctls must be translated. + * - EVIOCGMTSLOTS is a IOC_READ ioctl on Linux although it has input data + * (must be IOC_INOUT on FreeBSD). + * - On Linux, EVIOCGRAB, EVIOCREVOKE and EVIOCRMFF are defined as _IOW with + * an int argument. You don't pass an int pointer to the ioctl(), however, + * but just the int directly. On FreeBSD, they are defined as _IOWINT for + * this to work. + */ +static int +linux_ioctl_evdev(struct thread *td, struct linux_ioctl_args *args) +{ + cap_rights_t rights; + struct file *fp; + clockid_t clock; + int error; + + args->cmd = SETDIR(args->cmd); + + switch (args->cmd) { + case (EVIOCGRAB & ~IOC_DIRMASK) | IOC_IN: + args->cmd = EVIOCGRAB; + break; + case (EVIOCREVOKE & ~IOC_DIRMASK) | IOC_IN: + args->cmd = EVIOCREVOKE; + break; + case (EVIOCRMFF & ~IOC_DIRMASK) | IOC_IN: + args->cmd = EVIOCRMFF; + break; + case EVIOCSCLOCKID: { + error = copyin(PTRIN(args->arg), &clock, sizeof(clock)); + if (error != 0) + return (error); + if (clock & ~(LINUX_IOCTL_EVDEV_CLK)) + return (EINVAL); + error = linux_to_native_clockid(&clock, clock); + if (error != 0) + return (error); + + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) + return (error); + + error = fo_ioctl(fp, EVIOCSCLOCKID, &clock, td->td_ucred, td); + fdrop(fp, td); + return (error); + } + default: + break; + } + + if (IOCBASECMD(args->cmd) == + ((EVIOCGMTSLOTS(0) & ~IOC_DIRMASK) | IOC_OUT)) + args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_INOUT; + + return (sys_ioctl(td, (struct ioctl_args *)args)); +} + +/* * main ioctl syscall function */ Modified: head/sys/compat/linux/linux_ioctl.h ============================================================================== --- head/sys/compat/linux/linux_ioctl.h Sun Apr 23 07:37:14 2017 (r317322) +++ head/sys/compat/linux/linux_ioctl.h Sun Apr 23 07:43:50 2017 (r317323) @@ -750,7 +750,13 @@ */ #define LINUX_BTRFS_IOC_CLONE 0x9409 /* 0x40049409 */ - +/* + * Linux evdev ioctl min and max + */ +#define LINUX_IOCTL_EVDEV_MIN 0x4500 +#define LINUX_IOCTL_EVDEV_MAX 0x45ff +#define LINUX_IOCTL_EVDEV_CLK LINUX_CLOCK_REALTIME | \ + LINUX_CLOCK_MONOTONIC |LINUX_CLOCK_BOOTTIME /* * Pluggable ioctl handlers */ From owner-svn-src-head@freebsd.org Sun Apr 23 07:57: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 569CFD4C762; Sun, 23 Apr 2017 07:57:31 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28A12E8B; Sun, 23 Apr 2017 07:57:31 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3N7vUIs054269; Sun, 23 Apr 2017 07:57:30 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N7vU7B054268; Sun, 23 Apr 2017 07:57:30 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201704230757.v3N7vU7B054268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 23 Apr 2017 07:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317324 - 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: Sun, 23 Apr 2017 07:57:31 -0000 Author: dchagin Date: Sun Apr 23 07:57:30 2017 New Revision: 317324 URL: https://svnweb.freebsd.org/changeset/base/317324 Log: Map Linux CLOCK_BOOTTIME to native CLOCK_UPTIME. MFC after: 1 week Modified: head/sys/compat/linux/linux_time.c Modified: head/sys/compat/linux/linux_time.c ============================================================================== --- head/sys/compat/linux/linux_time.c Sun Apr 23 07:43:50 2017 (r317323) +++ head/sys/compat/linux/linux_time.c Sun Apr 23 07:57:30 2017 (r317324) @@ -207,8 +207,10 @@ linux_to_native_clockid(clockid_t *n, cl case LINUX_CLOCK_MONOTONIC_COARSE: *n = CLOCK_MONOTONIC_FAST; break; - case LINUX_CLOCK_MONOTONIC_RAW: case LINUX_CLOCK_BOOTTIME: + *n = CLOCK_UPTIME; + break; + case LINUX_CLOCK_MONOTONIC_RAW: case LINUX_CLOCK_REALTIME_ALARM: case LINUX_CLOCK_BOOTTIME_ALARM: case LINUX_CLOCK_SGI_CYCLE: From owner-svn-src-head@freebsd.org Sun Apr 23 08:59: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 20111D4C492; Sun, 23 Apr 2017 08:59:37 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F184AE27; Sun, 23 Apr 2017 08:59:36 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3N8xat5080444; Sun, 23 Apr 2017 08:59:36 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3N8xaJW080443; Sun, 23 Apr 2017 08:59:36 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704230859.v3N8xaJW080443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 23 Apr 2017 08:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317334 - head/sys/dev/syscons 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, 23 Apr 2017 08:59:37 -0000 Author: bde Date: Sun Apr 23 08:59:35 2017 New Revision: 317334 URL: https://svnweb.freebsd.org/changeset/base/317334 Log: Change the drawing method for the mouse cursor in planar mode to support colors. Colors are still hard-coded as 15 (normally lightwhite) for the interior and 0 (normally black) for the border, but these are now values used in 2 expressions instead of built in to the algorithm. The algorithm used a fancy and/or method, but this gives no control over the colors except and'ing all color planes off gives black and or'ing all color planes on gives lightwhite. Just draw the border and interior in separate colors using the same method as for characters, including its complications to optimize for VGA adaptors. Optimization is not really needed here, but for the VGA case it avoids being slower than the and/or method. The optimization is worth about 30%. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Sun Apr 23 08:58:50 2017 (r317333) +++ head/sys/dev/syscons/scvgarndr.c Sun Apr 23 08:59:35 2017 (r317334) @@ -1009,23 +1009,34 @@ draw_pxlmouse_planar(scr_stat *scp, int yoff = y - rounddown(y, line_width); ymax = imin(y + mdp->md_height, scp->ypixel); - outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ - outw(GDCIDX, 0x0001); /* set/reset enable */ - outw(GDCIDX, 0xff08); /* bit mask */ - outw(GDCIDX, 0x0803); /* data rotate/function select (and) */ + if (scp->sc->adp->va_type == KD_VGA) { + outw(GDCIDX, 0x0305); /* read mode 0, write mode 3 */ + outw(GDCIDX, 0xff08); /* bit mask */ + } else + outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ + outw(GDCIDX, 0x0003); /* data rotate/function select */ + outw(GDCIDX, 0x0f01); /* set/reset enable */ + + outw(GDCIDX, (0 << 8) | 0x00); /* set/reset */ p = scp->sc->adp->va_window + line_width*y + x/8; for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~(mdp->md_border[j] << 8 >> xoff); + m = mdp->md_border[j] << 8 >> xoff; for (k = 0; k < 3; ++k) { m1 = m >> (8 * (2 - k)); - if (m1 != 0xff && x + 8 * k < scp->xpixel) { + if (m1 != 0 && x + 8 * k < scp->xpixel) { readb(p + k); - writeb(p + k, m1); - } + if (scp->sc->adp->va_type == KD_VGA) + writeb(p + k, m1); + else { + /* bit mask: */ + outw(GDCIDX, (m1 << 8) | 0x08); + writeb(p + k, 0); + } + } } p += line_width; } - outw(GDCIDX, 0x1003); /* data rotate/function select (or) */ + outw(GDCIDX, (15 << 8) | 0x00); /* set/reset */ p = scp->sc->adp->va_window + line_width*y + x/8; for (i = y, j = 0; i < ymax; ++i, ++j) { m = mdp->md_interior[j] << 8 >> xoff; @@ -1033,12 +1044,23 @@ draw_pxlmouse_planar(scr_stat *scp, int m1 = m >> (8 * (2 - k)); if (m1 != 0 && x + 8 * k < scp->xpixel) { readb(p + k); - writeb(p + k, m1); + if (scp->sc->adp->va_type == KD_VGA) + writeb(p + k, m1); + else { + /* bit mask: */ + outw(GDCIDX, (m1 << 8) | 0x08); + writeb(p + k, 0); + } } } p += line_width; } - outw(GDCIDX, 0x0003); /* data rotate/function select */ + if (scp->sc->adp->va_type == KD_VGA) + outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ + else + outw(GDCIDX, 0xff08); /* bit mask */ + outw(GDCIDX, 0x0000); /* set/reset */ + outw(GDCIDX, 0x0001); /* set/reset enable */ } static void From owner-svn-src-head@freebsd.org Sun Apr 23 09:55: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 E8B31D4BDD5; Sun, 23 Apr 2017 09:55:50 +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 5F090188C; Sun, 23 Apr 2017 09:55:50 +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 v3N9rjjZ005999 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 23 Apr 2017 12:53:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v3N9rjjZ005999 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v3N9rjVT005998; Sun, 23 Apr 2017 12:53:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 23 Apr 2017 12:53:45 +0300 From: Konstantin Belousov To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317315 - head/lib/libc/gen Message-ID: <20170423095345.GC57674@kib.kiev.ua> References: <201704230317.v3N3HWtd040005@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704230317.v3N3HWtd040005@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) 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: Sun, 23 Apr 2017 09:55:51 -0000 On Sun, Apr 23, 2017 at 03:17:32AM +0000, Ngie Cooper wrote: > Author: ngie > Date: Sun Apr 23 03:17:32 2017 > New Revision: 317315 > URL: https://svnweb.freebsd.org/changeset/base/317315 > > Log: > Note that getpagesize(3) can return -1 on failure getpagesize() cannot fail. This change only confuses the readers. > > MFC after: 5 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/lib/libc/gen/getpagesize.3 > > Modified: head/lib/libc/gen/getpagesize.3 > ============================================================================== > --- head/lib/libc/gen/getpagesize.3 Sun Apr 23 03:16:38 2017 (r317314) > +++ head/lib/libc/gen/getpagesize.3 Sun Apr 23 03:17:32 2017 (r317315) > @@ -28,7 +28,7 @@ > .\" @(#)getpagesize.3 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd June 4, 1993 > +.Dd April 22, 2017 > .Dt GETPAGESIZE 3 > .Os > .Sh NAME > @@ -51,6 +51,9 @@ management calls. > The page size is a system > page size and may not be the same as the underlying > hardware page size. > +.Sh RETURN VALUES > +.Nm > +returns the number of bytes in a page on success, -1 on failure. > .Sh SEE ALSO > .Xr pagesize 1 , > .Xr sbrk 2 From owner-svn-src-head@freebsd.org Sun Apr 23 13:07: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 A6719D4BF7C; Sun, 23 Apr 2017 13:07:39 +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 757738E9; Sun, 23 Apr 2017 13:07:39 +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 5290866; Sun, 23 Apr 2017 15:07:36 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 407B528497; Sun, 23 Apr 2017 15:07:36 +0200 (CEST) Date: Sun, 23 Apr 2017 15:07:36 +0200 From: Jilles Tjoelker To: Konstantin Belousov Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317315 - head/lib/libc/gen Message-ID: <20170423130736.GA53007@stack.nl> References: <201704230317.v3N3HWtd040005@repo.freebsd.org> <20170423095345.GC57674@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170423095345.GC57674@kib.kiev.ua> 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, 23 Apr 2017 13:07:39 -0000 On Sun, Apr 23, 2017 at 12:53:45PM +0300, Konstantin Belousov wrote: > On Sun, Apr 23, 2017 at 03:17:32AM +0000, Ngie Cooper wrote: > > Author: ngie > > Date: Sun Apr 23 03:17:32 2017 > > New Revision: 317315 > > URL: https://svnweb.freebsd.org/changeset/base/317315 > > Log: > > Note that getpagesize(3) can return -1 on failure > getpagesize() cannot fail. This change only confuses the readers. Although I agree that getpagesize() cannot fail and that it is inappropriate to check for it, the code in lib/libc/gen/getpagesize.c has a path where it returns -1 (if sysctl CTL_HW HW_PAGESIZE fails). It probably makes more sense to abort() here to avoid confusing both humans and static analyzers, and allow easier debugging if a bug causes it to fail (instead of calculating bogus sizes from the -1 return value). -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Sun Apr 23 13:11: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 8B665D4C27A; Sun, 23 Apr 2017 13:11:03 +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 07FB1C30; Sun, 23 Apr 2017 13:11:02 +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 v3NDAuW3034877 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 23 Apr 2017 16:10:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v3NDAuW3034877 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v3NDAuBC034875; Sun, 23 Apr 2017 16:10:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 23 Apr 2017 16:10:56 +0300 From: Konstantin Belousov To: Jilles Tjoelker Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317315 - head/lib/libc/gen Message-ID: <20170423131056.GA1622@kib.kiev.ua> References: <201704230317.v3N3HWtd040005@repo.freebsd.org> <20170423095345.GC57674@kib.kiev.ua> <20170423130736.GA53007@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170423130736.GA53007@stack.nl> User-Agent: Mutt/1.8.2 (2017-04-18) 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: Sun, 23 Apr 2017 13:11:03 -0000 On Sun, Apr 23, 2017 at 03:07:36PM +0200, Jilles Tjoelker wrote: > On Sun, Apr 23, 2017 at 12:53:45PM +0300, Konstantin Belousov wrote: > > On Sun, Apr 23, 2017 at 03:17:32AM +0000, Ngie Cooper wrote: > > > Author: ngie > > > Date: Sun Apr 23 03:17:32 2017 > > > New Revision: 317315 > > > URL: https://svnweb.freebsd.org/changeset/base/317315 > > > > Log: > > > Note that getpagesize(3) can return -1 on failure > > > getpagesize() cannot fail. This change only confuses the readers. > > Although I agree that getpagesize() cannot fail and that it is > inappropriate to check for it, the code in lib/libc/gen/getpagesize.c > has a path where it returns -1 (if sysctl CTL_HW HW_PAGESIZE fails). It > probably makes more sense to abort() here to avoid confusing both humans > and static analyzers, and allow easier debugging if a bug causes it to > fail (instead of calculating bogus sizes from the -1 return value). If the sysctl() call fails there, I think it does not make any sense to bother with abort(), since we do not run on a FreeBSD(-like) kernel. Might be, it would be cleaner to change return (-1) to return (PAGE_SIZE) in the 'error case'. From owner-svn-src-head@freebsd.org Sun Apr 23 14: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 73555D4C10F; Sun, 23 Apr 2017 14:25:53 +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 37902130E; Sun, 23 Apr 2017 14:25:53 +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 v3NEPqW2015352; Sun, 23 Apr 2017 14:25:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NEPpBQ015347; Sun, 23 Apr 2017 14:25:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704231425.v3NEPpBQ015347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 23 Apr 2017 14:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317340 - in head/sys/dev/ntb: . if_ntb 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, 23 Apr 2017 14:25:53 -0000 Author: mav Date: Sun Apr 23 14:25:51 2017 New Revision: 317340 URL: https://svnweb.freebsd.org/changeset/base/317340 Log: Report NTB link speed to console and interface. MFC after: 2 weeks Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb.c head/sys/dev/ntb/ntb_if.m head/sys/dev/ntb/ntb_transport.c head/sys/dev/ntb/ntb_transport.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Apr 23 10:29:09 2017 (r317339) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Apr 23 14:25:51 2017 (r317340) @@ -225,6 +225,7 @@ ntb_net_init(void *arg) if_t ifp = sc->ifp; if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); + if_setbaudrate(ifp, ntb_transport_link_speed(sc->queues[0].qp)); if_link_state_change(ifp, ntb_transport_link_query(sc->queues[0].qp) ? LINK_STATE_UP : LINK_STATE_DOWN); } @@ -474,20 +475,10 @@ static void ntb_net_event_handler(void *data, enum ntb_link_event status) { struct ntb_net_queue *q = data; - int new_state; - switch (status) { - case NTB_LINK_DOWN: - new_state = LINK_STATE_DOWN; - break; - case NTB_LINK_UP: - new_state = LINK_STATE_UP; - break; - default: - new_state = LINK_STATE_UNKNOWN; - break; - } - if_link_state_change(q->ifp, new_state); + if_setbaudrate(q->ifp, ntb_transport_link_speed(q->qp)); + if_link_state_change(q->ifp, (status == NTB_LINK_UP) ? LINK_STATE_UP : + LINK_STATE_DOWN); } /* Helper functions */ Modified: head/sys/dev/ntb/ntb.c ============================================================================== --- head/sys/dev/ntb/ntb.c Sun Apr 23 10:29:09 2017 (r317339) +++ head/sys/dev/ntb/ntb.c Sun Apr 23 14:25:51 2017 (r317340) @@ -168,7 +168,15 @@ ntb_link_event(device_t dev) struct ntb_child **cpp = device_get_softc(dev); struct ntb_child *nc; struct rm_priotracker ctx_tracker; + enum ntb_speed speed; + enum ntb_width width; + if (NTB_LINK_IS_UP(dev, &speed, &width)) { + device_printf(dev, "Link is up (PCIe %d.x / x%d)\n", + (int)speed, (int)width); + } else { + device_printf(dev, "Link is down\n"); + } for (nc = *cpp; nc != NULL; nc = nc->next) { rm_rlock(&nc->ctx_lock, &ctx_tracker); if (nc->ctx_ops != NULL && nc->ctx_ops->link_event != NULL) Modified: head/sys/dev/ntb/ntb_if.m ============================================================================== --- head/sys/dev/ntb/ntb_if.m Sun Apr 23 10:29:09 2017 (r317339) +++ head/sys/dev/ntb/ntb_if.m Sun Apr 23 14:25:51 2017 (r317340) @@ -38,6 +38,7 @@ HEADER { NTB_SPEED_GEN1 = 1, NTB_SPEED_GEN2 = 2, NTB_SPEED_GEN3 = 3, + NTB_SPEED_GEN4 = 4, }; enum ntb_width { Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sun Apr 23 10:29:09 2017 (r317339) +++ head/sys/dev/ntb/ntb_transport.c Sun Apr 23 14:25:51 2017 (r317340) @@ -202,6 +202,8 @@ struct ntb_transport_ctx { unsigned qp_count; uint64_t qp_bitmap; volatile bool link_is_up; + enum ntb_speed link_speed; + enum ntb_width link_width; struct callout link_work; struct callout link_watchdog; struct task link_cleanup; @@ -1024,7 +1026,7 @@ ntb_transport_event_callback(void *data) { struct ntb_transport_ctx *nt = data; - if (ntb_link_is_up(nt->dev, NULL, NULL)) { + if (ntb_link_is_up(nt->dev, &nt->link_speed, &nt->link_width)) { ntb_printf(1, "HW link up\n"); callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); } else { @@ -1105,7 +1107,7 @@ free_mws: for (i = 0; i < nt->mw_count; i++) ntb_free_mw(nt, i); out: - if (ntb_link_is_up(dev, NULL, NULL)) + if (ntb_link_is_up(dev, &nt->link_speed, &nt->link_width)) callout_reset(&nt->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_transport_link_work, nt); } @@ -1379,6 +1381,43 @@ ntb_transport_link_query(struct ntb_tran return (qp->link_is_up); } +/** + * ntb_transport_link_speed - Query transport link speed + * @qp: NTB transport layer queue to be queried + * + * Query connection speed to the remote system of the NTB transport queue + * + * RETURNS: link speed in bits per second + */ +uint64_t +ntb_transport_link_speed(struct ntb_transport_qp *qp) +{ + struct ntb_transport_ctx *nt = qp->transport; + uint64_t rate; + + if (!nt->link_is_up) + return (0); + switch (nt->link_speed) { + case NTB_SPEED_GEN1: + rate = 2500000000 * 8 / 10; + break; + case NTB_SPEED_GEN2: + rate = 5000000000 * 8 / 10; + break; + case NTB_SPEED_GEN3: + rate = 8000000000 * 128 / 130; + break; + case NTB_SPEED_GEN4: + rate = 16000000000 * 128 / 130; + break; + default: + return (0); + } + if (nt->link_width <= 0) + return (0); + return (rate * nt->link_width); +} + static void ntb_send_link_down(struct ntb_transport_qp *qp) { Modified: head/sys/dev/ntb/ntb_transport.h ============================================================================== --- head/sys/dev/ntb/ntb_transport.h Sun Apr 23 10:29:09 2017 (r317339) +++ head/sys/dev/ntb/ntb_transport.h Sun Apr 23 14:25:51 2017 (r317340) @@ -58,4 +58,5 @@ void *ntb_transport_rx_remove(struct ntb void ntb_transport_link_up(struct ntb_transport_qp *qp); void ntb_transport_link_down(struct ntb_transport_qp *qp); bool ntb_transport_link_query(struct ntb_transport_qp *qp); +uint64_t ntb_transport_link_speed(struct ntb_transport_qp *qp); unsigned int ntb_transport_tx_free_entry(struct ntb_transport_qp *qp); From owner-svn-src-head@freebsd.org Sun Apr 23 17:39: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 A10E9D4C145; Sun, 23 Apr 2017 17:39:32 +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 714761D98; Sun, 23 Apr 2017 17:39:32 +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 v3NHdV4D095622; Sun, 23 Apr 2017 17:39:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NHdVPn095621; Sun, 23 Apr 2017 17:39:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201704231739.v3NHdVPn095621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Apr 2017 17:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317341 - 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, 23 Apr 2017 17:39:32 -0000 Author: trasz Date: Sun Apr 23 17:39:31 2017 New Revision: 317341 URL: https://svnweb.freebsd.org/changeset/base/317341 Log: Improve BUF_TRACKING by not displaying NULL entries. Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10443 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Apr 23 14:25:51 2017 (r317340) +++ head/sys/kern/vfs_bio.c Sun Apr 23 17:39:31 2017 (r317341) @@ -4927,9 +4927,12 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) db_printf("b_io_tracking: b_io_tcnt = %u\n", bp->b_io_tcnt); i = bp->b_io_tcnt % BUF_TRACKING_SIZE; - for (j = 1; j <= BUF_TRACKING_SIZE; j++) + for (j = 1; j <= BUF_TRACKING_SIZE; j++) { + if (bp->b_io_tracking[BUF_TRACKING_ENTRY(i - j)] == NULL) + continue; db_printf(" %2u: %s\n", j, bp->b_io_tracking[BUF_TRACKING_ENTRY(i - j)]); + } #elif defined(BUF_TRACKING) db_printf("b_io_tracking: %s\n", bp->b_io_tracking); #endif From owner-svn-src-head@freebsd.org Sun Apr 23 21:18: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 EE5F9D4D2BC; Sun, 23 Apr 2017 21:18:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEFD1F58; Sun, 23 Apr 2017 21:18:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3NLHxAS086048; Sun, 23 Apr 2017 21:17:59 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NLHxXp086047; Sun, 23 Apr 2017 21:17:59 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201704232117.v3NLHxXp086047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 23 Apr 2017 21:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317343 - head/sbin/ipfw 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, 23 Apr 2017 21:18:01 -0000 Author: marius Date: Sun Apr 23 21:17:59 2017 New Revision: 317343 URL: https://svnweb.freebsd.org/changeset/base/317343 Log: In fill_ip6(), the value of the pointer av changes before it is free(3)ed. Thus, introduce a new variable to track the original value. Submitted by: Tom Rix Differential Revision: https://reviews.freebsd.org/D9962 Modified: head/sbin/ipfw/ipv6.c Modified: head/sbin/ipfw/ipv6.c ============================================================================== --- head/sbin/ipfw/ipv6.c Sun Apr 23 20:32:46 2017 (r317342) +++ head/sbin/ipfw/ipv6.c Sun Apr 23 21:17:59 2017 (r317343) @@ -339,6 +339,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i { int len = 0; struct in6_addr *d = &(cmd->addr6); + char *oav; /* * Needed for multiple address. * Note d[1] points to struct in6_add r mask6 of cmd @@ -365,7 +366,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i return (1); } - av = strdup(av); + oav = av = strdup(av); while (av) { /* * After the address we can have '/' indicating a mask, @@ -446,7 +447,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; - free(av); + free(oav); return (1); } From owner-svn-src-head@freebsd.org Sun Apr 23 21:36: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 474BCD4D7CF; Sun, 23 Apr 2017 21:36:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 190B0B38; Sun, 23 Apr 2017 21:36:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3NLaWAa094200; Sun, 23 Apr 2017 21:36:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NLaWAf094199; Sun, 23 Apr 2017 21:36:32 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704232136.v3NLaWAf094199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 23 Apr 2017 21:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317344 - head/sys/fs/nfsclient 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, 23 Apr 2017 21:36:33 -0000 Author: rmacklem Date: Sun Apr 23 21:36:32 2017 New Revision: 317344 URL: https://svnweb.freebsd.org/changeset/base/317344 Log: Don't set the connection-back-channel flag for DS sessions. The NFSv4.1/pNFS client does not use/need a backchannel for the Data Server (DS) sessions, so the flag should only be set for MetaData Server (MDS) sessions. This patch should have been a part of r317275. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 23 21:17:59 2017 (r317343) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 23 21:36:32 2017 (r317344) @@ -4613,7 +4613,7 @@ nfsrpc_createsession(struct nfsmount *nm *tl++ = sep->nfsess_clientid.lval[1]; *tl++ = txdr_unsigned(sequenceid); crflags = (NFSMNT_RDONLY(nmp->nm_mountp) ? 0 : NFSV4CRSESS_PERSIST); - if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0) + if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0 && mds != 0) crflags |= NFSV4CRSESS_CONNBACKCHAN; *tl = txdr_unsigned(crflags); From owner-svn-src-head@freebsd.org Sun Apr 23 21:51: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 160BED4DC43; Sun, 23 Apr 2017 21:51:31 +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 E5901387; Sun, 23 Apr 2017 21:51:30 +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 v3NLpUTC002102; Sun, 23 Apr 2017 21:51:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NLpTK0002095; Sun, 23 Apr 2017 21:51:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704232151.v3NLpTK0002095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 23 Apr 2017 21:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317346 - head/lib/libc/regex 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, 23 Apr 2017 21:51:31 -0000 Author: pfg Date: Sun Apr 23 21:51:29 2017 New Revision: 317346 URL: https://svnweb.freebsd.org/changeset/base/317346 Log: regex: unsign and constify some variables. Taking some hints from the regex variant in nvi(1) and higher-level compiler warnings, update some types in our regex(3) implementation. Joint work with: Kyle Evans MFC after: 2 weeks Modified: head/lib/libc/regex/cname.h head/lib/libc/regex/regcomp.c head/lib/libc/regex/regerror.c head/lib/libc/regex/regex2.h head/lib/libc/regex/regexec.c head/lib/libc/regex/regfree.c Modified: head/lib/libc/regex/cname.h ============================================================================== --- head/lib/libc/regex/cname.h Sun Apr 23 21:51:28 2017 (r317345) +++ head/lib/libc/regex/cname.h Sun Apr 23 21:51:29 2017 (r317346) @@ -36,7 +36,7 @@ /* character-name table */ static struct cname { - char *name; + const char *name; char code; } cnames[] = { {"NUL", '\0'}, Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Sun Apr 23 21:51:28 2017 (r317345) +++ head/lib/libc/regex/regcomp.c Sun Apr 23 21:51:29 2017 (r317346) @@ -66,8 +66,8 @@ __FBSDID("$FreeBSD$"); * other clumsinesses */ struct parse { - char *next; /* next character in RE */ - char *end; /* end of string (-> NUL normally) */ + const char *next; /* next character in RE */ + const char *end; /* end of string (-> NUL normally) */ int error; /* has an error been seen? */ sop *strip; /* malloced strip */ sopno ssize; /* malloced strip size (allocated) */ @@ -207,7 +207,7 @@ regcomp(regex_t * __restrict preg, return(REG_INVARG); len = preg->re_endp - pattern; } else - len = strlen((char *)pattern); + len = strlen(pattern); /* do the mallocs early so failure handling is easy */ g = (struct re_guts *)malloc(sizeof(struct re_guts)); @@ -239,7 +239,7 @@ regcomp(regex_t * __restrict preg, /* set things up */ p->g = g; - p->next = (char *)pattern; /* convenience; we do not modify it */ + p->next = pattern; /* convenience; we do not modify it */ p->end = p->next + len; p->error = 0; p->ncsalloc = 0; @@ -840,7 +840,7 @@ p_b_term(struct parse *p, cset *cs) static void p_b_cclass(struct parse *p, cset *cs) { - char *sp = p->next; + const char *sp = p->next; size_t len; wctype_t wct; char clname[16]; @@ -903,12 +903,11 @@ static wint_t /* value of collating el p_b_coll_elem(struct parse *p, wint_t endc) /* name ended by endc,']' */ { - char *sp = p->next; + const char *sp = p->next; struct cname *cp; - int len; mbstate_t mbs; wchar_t wc; - size_t clen; + size_t clen, len; while (MORE() && !SEETWO(endc, ']')) NEXT(); @@ -955,8 +954,8 @@ othercase(wint_t ch) static void bothcases(struct parse *p, wint_t ch) { - char *oldnext = p->next; - char *oldend = p->end; + const char *oldnext = p->next; + const char *oldend = p->end; char bracket[3 + MB_LEN_MAX]; size_t n; mbstate_t mbs; @@ -1009,8 +1008,8 @@ ordinary(struct parse *p, wint_t ch) static void nonnewline(struct parse *p) { - char *oldnext = p->next; - char *oldend = p->end; + const char *oldnext = p->next; + const char *oldend = p->end; char bracket[4]; p->next = bracket; Modified: head/lib/libc/regex/regerror.c ============================================================================== --- head/lib/libc/regex/regerror.c Sun Apr 23 21:51:28 2017 (r317345) +++ head/lib/libc/regex/regerror.c Sun Apr 23 21:51:29 2017 (r317346) @@ -54,7 +54,7 @@ extern "C" { #endif /* === regerror.c === */ -static char *regatoi(const regex_t *preg, char *localbuf); +static const char *regatoi(const regex_t *preg, char *localbuf); #ifdef __cplusplus } @@ -83,8 +83,8 @@ static char *regatoi(const regex_t *preg */ static struct rerr { int code; - char *name; - char *explain; + const char *name; + const char *explain; } rerrs[] = { {REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match"}, {REG_BADPAT, "REG_BADPAT", "invalid regular expression"}, @@ -120,7 +120,7 @@ regerror(int errcode, struct rerr *r; size_t len; int target = errcode &~ REG_ITOA; - char *s; + const char *s; char convbuf[50]; if (errcode == REG_ATOI) @@ -158,7 +158,7 @@ regerror(int errcode, - regatoi - internal routine to implement REG_ATOI == static char *regatoi(const regex_t *preg, char *localbuf); */ -static char * +static const char * regatoi(const regex_t *preg, char *localbuf) { struct rerr *r; Modified: head/lib/libc/regex/regex2.h ============================================================================== --- head/lib/libc/regex/regex2.h Sun Apr 23 21:51:28 2017 (r317345) +++ head/lib/libc/regex/regex2.h Sun Apr 23 21:51:29 2017 (r317346) @@ -73,7 +73,7 @@ * immediately *preceding* "execution" of that operator. */ typedef unsigned long sop; /* strip operator */ -typedef long sopno; +typedef unsigned long sopno; #define OPRMASK 0xf8000000L #define OPDMASK 0x07ffffffL #define OPSHIFT ((unsigned)27) @@ -113,11 +113,11 @@ typedef struct { typedef struct { unsigned char bmp[NC / 8]; wctype_t *types; - int ntypes; + unsigned int ntypes; wint_t *wides; - int nwides; + unsigned int nwides; crange *ranges; - int nranges; + unsigned int nranges; int invert; int icase; } cset; @@ -125,7 +125,7 @@ typedef struct { static int CHIN1(cset *cs, wint_t ch) { - int i; + unsigned int i; assert(ch >= 0); if (ch < NC) @@ -165,7 +165,7 @@ struct re_guts { int magic; # define MAGIC2 ((('R'^0200)<<8)|'E') sop *strip; /* malloced area for strip */ - int ncsets; /* number of csets in use */ + unsigned int ncsets; /* number of csets in use */ cset *sets; /* -> cset [ncsets] */ int cflags; /* copy of regcomp() cflags argument */ sopno nstates; /* = number of sops */ Modified: head/lib/libc/regex/regexec.c ============================================================================== --- head/lib/libc/regex/regexec.c Sun Apr 23 21:51:28 2017 (r317345) +++ head/lib/libc/regex/regexec.c Sun Apr 23 21:51:29 2017 (r317346) @@ -225,9 +225,9 @@ regexec(const regex_t * __restrict preg, eflags = GOODFLAGS(eflags); if (MB_CUR_MAX > 1) - return(mmatcher(g, (char *)string, nmatch, pmatch, eflags)); + return(mmatcher(g, string, nmatch, pmatch, eflags)); else if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE)) - return(smatcher(g, (char *)string, nmatch, pmatch, eflags)); + return(smatcher(g, string, nmatch, pmatch, eflags)); else - return(lmatcher(g, (char *)string, nmatch, pmatch, eflags)); + return(lmatcher(g, string, nmatch, pmatch, eflags)); } Modified: head/lib/libc/regex/regfree.c ============================================================================== --- head/lib/libc/regex/regfree.c Sun Apr 23 21:51:28 2017 (r317345) +++ head/lib/libc/regex/regfree.c Sun Apr 23 21:51:29 2017 (r317346) @@ -58,7 +58,7 @@ void regfree(regex_t *preg) { struct re_guts *g; - int i; + unsigned int i; if (preg->re_magic != MAGIC1) /* oops */ return; /* nice to complain, but hard */ From owner-svn-src-head@freebsd.org Sun Apr 23 21:51: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 67E3AD4DC3D; Sun, 23 Apr 2017 21:51:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39D4F385; Sun, 23 Apr 2017 21:51:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3NLpTc1002083; Sun, 23 Apr 2017 21:51:29 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NLpTEe002060; Sun, 23 Apr 2017 21:51:29 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704232151.v3NLpTEe002060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 23 Apr 2017 21:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317345 - in head/sys/fs: nfs nfsclient 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, 23 Apr 2017 21:51:30 -0000 Author: rmacklem Date: Sun Apr 23 21:51:28 2017 New Revision: 317345 URL: https://svnweb.freebsd.org/changeset/base/317345 Log: Make the NFSv4 client to use a write open for reading if allowed by the server. An NFSv4 server has the option of allowing a Read to be done using a Write Open. If this is not allowed, the server will return NFSERR_OPENMODE. This patch attempts the read with a write open and then disables this if the server replies NFSERR_OPENMODE. This change will avoid some uses of the special stateids. This will be useful for pNFS/DS Reads, since they cannot use special stateids. It will also be useful for any NFSv4 server that does not support reading via the special stateids. It has been tested against both types of NFSv4 server. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sun Apr 23 21:36:32 2017 (r317344) +++ head/sys/fs/nfs/nfsport.h Sun Apr 23 21:51:28 2017 (r317345) @@ -899,6 +899,7 @@ int newnfs_realign(struct mbuf **, int); */ #define NFSSTA_HASWRITEVERF 0x00040000 /* Has write verifier */ #define NFSSTA_GOTFSINFO 0x00100000 /* Got the fsinfo */ +#define NFSSTA_OPENMODE 0x00200000 /* Must use correct open mode */ #define NFSSTA_NOLAYOUTCOMMIT 0x04000000 /* Don't do LayoutCommit */ #define NFSSTA_SESSPERSIST 0x08000000 /* Has a persistent session */ #define NFSSTA_TIMEO 0x10000000 /* Experiencing a timeout */ @@ -929,6 +930,7 @@ int newnfs_realign(struct mbuf **, int); #define NFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT) #define NFSHASSESSPERSIST(n) ((n)->nm_state & NFSSTA_SESSPERSIST) #define NFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS) +#define NFSHASOPENMODE(n) ((n)->nm_state & NFSSTA_OPENMODE) #define NFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \ (n)->nm_minorvers > 0) Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 23 21:36:32 2017 (r317344) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 23 21:51:28 2017 (r317345) @@ -1134,6 +1134,11 @@ nfsrpc_setattr(vnode_t vp, struct vattr else error = nfsrpc_setaclrpc(vp, cred, p, aclp, &stateid, stuff); + if (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); + } if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) @@ -1154,7 +1159,9 @@ nfsrpc_setattr(vnode_t vp, struct vattr error == NFSERR_BADSESSION || (error == NFSERR_OLDSTATEID && retrycnt < 20) || ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) && - expireret == 0 && clidrev != 0 && retrycnt < 4)); + expireret == 0 && clidrev != 0 && retrycnt < 4) || + (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD && + retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; return (error); @@ -1391,6 +1398,11 @@ nfsrpc_read(vnode_t vp, struct uio *uiop &lckp); error = nfsrpc_readrpc(vp, uiop, newcred, &stateid, p, nap, attrflagp, stuff); + if (error == NFSERR_OPENMODE) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); + } if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) @@ -1409,7 +1421,8 @@ nfsrpc_read(vnode_t vp, struct uio *uiop error == NFSERR_BADSESSION || (error == NFSERR_OLDSTATEID && retrycnt < 20) || ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) && - expireret == 0 && clidrev != 0 && retrycnt < 4)); + expireret == 0 && clidrev != 0 && retrycnt < 4) || + (error == NFSERR_OPENMODE && retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; if (NFSHASNFSV4(nmp)) @@ -5594,6 +5607,11 @@ nfscl_doiods(vnode_t vp, struct uio *uio if (lastbyte > layp->nfsly_lastbyte) layp->nfsly_lastbyte = lastbyte; NFSUNLOCKCLSTATE(); + } else if (error == NFSERR_OPENMODE && + rwaccess == NFSV4OPEN_ACCESSREAD) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); } } else error = EIO; Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sun Apr 23 21:36:32 2017 (r317344) +++ head/sys/fs/nfsclient/nfs_clstate.c Sun Apr 23 21:51:28 2017 (r317345) @@ -500,10 +500,11 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n { struct nfsclclient *clp; struct nfsclowner *owp; - struct nfsclopen *op = NULL; + struct nfsclopen *op = NULL, *top; struct nfscllockowner *lp; struct nfscldeleg *dp; struct nfsnode *np; + struct nfsmount *nmp; u_int8_t own[NFSV4CL_LOCKNAMELEN]; int error, done; @@ -521,8 +522,9 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n if (vnode_vtype(vp) != VREG) return (EISDIR); np = VTONFS(vp); + nmp = VFSTONFS(vnode_mount(vp)); NFSLOCKCLSTATE(); - clp = nfscl_findcl(VFSTONFS(vnode_mount(vp))); + clp = nfscl_findcl(nmp); if (clp == NULL) { NFSUNLOCKCLSTATE(); return (EACCES); @@ -592,23 +594,33 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n } if (op == NULL) { /* If not found, just look for any OpenOwner that will work. */ + top = NULL; done = 0; owp = LIST_FIRST(&clp->nfsc_owner); while (!done && owp != NULL) { LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { if (op->nfso_fhlen == fhlen && - !NFSBCMP(op->nfso_fh, nfhp, fhlen) && - (mode & op->nfso_mode) == mode) { - done = 1; - break; + !NFSBCMP(op->nfso_fh, nfhp, fhlen)) { + if (top == NULL && (op->nfso_mode & + NFSV4OPEN_ACCESSWRITE) != 0 && + (mode & NFSV4OPEN_ACCESSREAD) != 0) + top = op; + if ((mode & op->nfso_mode) == mode) { + done = 1; + break; + } } } if (!done) owp = LIST_NEXT(owp, nfsow_list); } if (!done) { - NFSUNLOCKCLSTATE(); - return (ENOENT); + NFSCL_DEBUG(2, "openmode top=%p\n", top); + if (top == NULL || NFSHASOPENMODE(nmp)) { + NFSUNLOCKCLSTATE(); + return (ENOENT); + } else + op = top; } /* * For read aheads or write behinds, use the open cred. From owner-svn-src-head@freebsd.org Sun Apr 23 21:58: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 423F7D4DE8E; Sun, 23 Apr 2017 21:58:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 118039B9; Sun, 23 Apr 2017 21:58:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3NLwIU8002390; Sun, 23 Apr 2017 21:58:18 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NLwIm3002388; Sun, 23 Apr 2017 21:58:18 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201704232158.v3NLwIm3002388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 23 Apr 2017 21:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317347 - head/bin/sh/tests/expansion 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, 23 Apr 2017 21:58:19 -0000 Author: jilles Date: Sun Apr 23 21:58:17 2017 New Revision: 317347 URL: https://svnweb.freebsd.org/changeset/base/317347 Log: sh: Add tests for NUL byte in command substitution output. Added: head/bin/sh/tests/expansion/cmdsubst24.0 (contents, props changed) Modified: head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/tests/expansion/Makefile ============================================================================== --- head/bin/sh/tests/expansion/Makefile Sun Apr 23 21:51:29 2017 (r317346) +++ head/bin/sh/tests/expansion/Makefile Sun Apr 23 21:58:17 2017 (r317347) @@ -45,6 +45,7 @@ ${PACKAGE}FILES+= cmdsubst20.0 ${PACKAGE}FILES+= cmdsubst21.0 ${PACKAGE}FILES+= cmdsubst22.0 ${PACKAGE}FILES+= cmdsubst23.0 +${PACKAGE}FILES+= cmdsubst24.0 ${PACKAGE}FILES+= export1.0 ${PACKAGE}FILES+= export2.0 ${PACKAGE}FILES+= export3.0 Added: head/bin/sh/tests/expansion/cmdsubst24.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/cmdsubst24.0 Sun Apr 23 21:58:17 2017 (r317347) @@ -0,0 +1,24 @@ +# $FreeBSD$ +# POSIX leaves the effect of NUL bytes in command substitution output +# unspecified but we have always discarded them. + +failures=0 + +check() { + if [ "$2" != "$3" ]; then + printf "Failed at line %s: got \"%s\" expected \"%s\"\n" "$1" "$2" "$3" + : $((failures += 1)) + fi +} + +fmt='\0a\0 \0b\0c d\0' +assign_builtin=$(printf "$fmt") +check "$LINENO" "$assign_builtin" "a bc d" +assign_pipeline=$(printf "$fmt" | cat) +check "$LINENO" "$assign_pipeline" "a bc d" +set -- $(printf "$fmt") $(printf "$fmt" | cat) "$(printf "$fmt")" "$(printf "$fmt" | cat)" +IFS=@ +splits="$*" +check "$LINENO" "$splits" "a@bc@d@a@bc@d@a bc d@a bc d" + +[ "$failures" = 0 ] From owner-svn-src-head@freebsd.org Sun Apr 23 22:20: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 F411AD4C7D1; Sun, 23 Apr 2017 22:20:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C11608A6; Sun, 23 Apr 2017 22:20:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3NMKP3n010690; Sun, 23 Apr 2017 22:20:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NMKP2x010689; Sun, 23 Apr 2017 22:20:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201704232220.v3NMKP2x010689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Apr 2017 22:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317348 - 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, 23 Apr 2017 22:20:27 -0000 Author: trasz Date: Sun Apr 23 22:20:25 2017 New Revision: 317348 URL: https://svnweb.freebsd.org/changeset/base/317348 Log: Make it possible to terminate "show lockedbufs" by pressing "q". MFC after: 2 weeks Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Apr 23 21:58:17 2017 (r317347) +++ head/sys/kern/vfs_bio.c Sun Apr 23 22:20:25 2017 (r317348) @@ -4950,6 +4950,8 @@ DB_SHOW_COMMAND(lockedbufs, lockedbufs) if (BUF_ISLOCKED(bp)) { db_show_buffer((uintptr_t)bp, 1, 0, NULL); db_printf("\n"); + if (db_pager_quit) + break; } } } From owner-svn-src-head@freebsd.org Sun Apr 23 22:31: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 7F110D4CA7B; Sun, 23 Apr 2017 22:31:13 +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 4F7B8E89; Sun, 23 Apr 2017 22:31:13 +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 v3NMVCeC015999; Sun, 23 Apr 2017 22:31:12 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NMVClf015998; Sun, 23 Apr 2017 22:31:12 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704232231.v3NMVClf015998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 23 Apr 2017 22:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317349 - head/lib/msun/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: Sun, 23 Apr 2017 22:31:13 -0000 Author: pfg Date: Sun Apr 23 22:31:12 2017 New Revision: 317349 URL: https://svnweb.freebsd.org/changeset/base/317349 Log: msun: Remove trailing space in Sunsoft copyright statement. Submittedby: kargl Modified: head/lib/msun/src/e_asin.c Modified: head/lib/msun/src/e_asin.c ============================================================================== --- head/lib/msun/src/e_asin.c Sun Apr 23 22:20:25 2017 (r317348) +++ head/lib/msun/src/e_asin.c Sun Apr 23 22:31:12 2017 (r317349) @@ -6,7 +6,7 @@ * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ From owner-svn-src-head@freebsd.org Sun Apr 23 23:09: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 1D5C8D4D479; Sun, 23 Apr 2017 23:09:04 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E36041F2E; Sun, 23 Apr 2017 23:09:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3NN93T7030903; Sun, 23 Apr 2017 23:09:03 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NN93Tu030902; Sun, 23 Apr 2017 23:09:03 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704232309.v3NN93Tu030902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 23 Apr 2017 23:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317350 - head/usr.sbin/nfsuserd 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, 23 Apr 2017 23:09:04 -0000 Author: rmacklem Date: Sun Apr 23 23:09:02 2017 New Revision: 317350 URL: https://svnweb.freebsd.org/changeset/base/317350 Log: Fix the default uid/gid values in nfsuserd.c This patch sets the default uid/gid values for "nobody" and "nogroup" to the values in the password and group databases. Normally nfsuserd(8) will override these with whatever is in the password/group databases, so these values are only used when the databases entries aren't available. It would be nice to use the definitions in sys/conf.h, but those are in the _KERNEL section of the file. Reported by: tez@pkgsrc.org Submitted by: tez@pkgsrc.org MFC after: 2 weeks Modified: head/usr.sbin/nfsuserd/nfsuserd.c Modified: head/usr.sbin/nfsuserd/nfsuserd.c ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.c Sun Apr 23 22:31:12 2017 (r317349) +++ head/usr.sbin/nfsuserd/nfsuserd.c Sun Apr 23 23:09:02 2017 (r317350) @@ -88,9 +88,9 @@ struct info { u_char *dnsname = "default.domain"; u_char *defaultuser = "nobody"; -uid_t defaultuid = (uid_t)32767; +uid_t defaultuid = 65534; u_char *defaultgroup = "nogroup"; -gid_t defaultgid = (gid_t)32767; +gid_t defaultgid = 65533; int verbose = 0, im_a_slave = 0, nfsuserdcnt = -1, forcestart = 0; int defusertimeout = DEFUSERTIMEOUT, manage_gids = 0; pid_t slaves[MAXNFSUSERD]; From owner-svn-src-head@freebsd.org Mon Apr 24 07:52: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 051E1D4C34F; Mon, 24 Apr 2017 07:52:29 +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 D0D0C1AFE; Mon, 24 Apr 2017 07:52:28 +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 v3O7qRQh044371; Mon, 24 Apr 2017 07:52:27 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3O7qRZB044370; Mon, 24 Apr 2017 07:52:27 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201704240752.v3O7qRZB044370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 24 Apr 2017 07:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317353 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 24 Apr 2017 07:52:29 -0000 Author: sephe Date: Mon Apr 24 07:52:27 2017 New Revision: 317353 URL: https://svnweb.freebsd.org/changeset/base/317353 Log: hyperv/hn: Use channel0, i.e. TX ring0, for TCP SYN/SYN|ACK. Hyper-V hot channel effect: Operation latency on hot channel is only _half_ of the operation latency on cold channels. This commit takes the advantage of the above Hyper-V host channel effect, and can reduce more than 75% latency and more than 50% latency stdev, i.e. lower and more stable/predictable latency, for various types of web server workloads. MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Mon Apr 24 06:33:08 2017 (r317352) +++ head/sys/dev/hyperv/netvsc/if_hn.c Mon Apr 24 07:52:27 2017 (r317353) @@ -622,6 +622,16 @@ hn_chim_free(struct hn_softc *sc, uint32 } #if defined(INET6) || defined(INET) + +#define PULLUP_HDR(m, len) \ +do { \ + if (__predict_false((m)->m_len < (len))) { \ + (m) = m_pullup((m), (len)); \ + if ((m) == NULL) \ + return (NULL); \ + } \ +} while (0) + /* * NOTE: If this function failed, the m_head would be freed. */ @@ -634,15 +644,6 @@ hn_tso_fixup(struct mbuf *m_head) KASSERT(M_WRITABLE(m_head), ("TSO mbuf not writable")); -#define PULLUP_HDR(m, len) \ -do { \ - if (__predict_false((m)->m_len < (len))) { \ - (m) = m_pullup((m), (len)); \ - if ((m) == NULL) \ - return (NULL); \ - } \ -} while (0) - PULLUP_HDR(m_head, sizeof(*evl)); evl = mtod(m_head, struct ether_vlan_header *); if (evl->evl_encap_proto == ntohs(ETHERTYPE_VLAN)) @@ -691,8 +692,65 @@ do { \ #endif return (m_head); -#undef PULLUP_HDR } + +/* + * NOTE: If this function failed, the m_head would be freed. + */ +static __inline struct mbuf * +hn_check_tcpsyn(struct mbuf *m_head, int *tcpsyn) +{ + const struct ether_vlan_header *evl; + const struct tcphdr *th; + int ehlen; + + *tcpsyn = 0; + + PULLUP_HDR(m_head, sizeof(*evl)); + evl = mtod(m_head, const struct ether_vlan_header *); + if (evl->evl_encap_proto == ntohs(ETHERTYPE_VLAN)) + ehlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + else + ehlen = ETHER_HDR_LEN; + +#ifdef INET + if (m_head->m_pkthdr.csum_flags & CSUM_IP_TCP) { + const struct ip *ip; + int iphlen; + + PULLUP_HDR(m_head, ehlen + sizeof(*ip)); + ip = mtodo(m_head, ehlen); + iphlen = ip->ip_hl << 2; + + PULLUP_HDR(m_head, ehlen + iphlen + sizeof(*th)); + th = mtodo(m_head, ehlen + iphlen); + if (th->th_flags & TH_SYN) + *tcpsyn = 1; + } +#endif +#if defined(INET6) && defined(INET) + else +#endif +#ifdef INET6 + { + const struct ip6_hdr *ip6; + + PULLUP_HDR(m_head, ehlen + sizeof(*ip6)); + ip6 = mtodo(m_head, ehlen); + if (ip6->ip6_nxt != IPPROTO_TCP) + return (m_head); + + PULLUP_HDR(m_head, ehlen + sizeof(*ip6) + sizeof(*th)); + th = mtodo(m_head, ehlen + sizeof(*ip6)); + if (th->th_flags & TH_SYN) + *tcpsyn = 1; + } +#endif + return (m_head); +} + +#undef PULLUP_HDR + #endif /* INET6 || INET */ static int @@ -4369,7 +4427,29 @@ hn_transmit(struct ifnet *ifp, struct mb idx = bid % sc->hn_tx_ring_inuse; else #endif - idx = m->m_pkthdr.flowid % sc->hn_tx_ring_inuse; + { +#if defined(INET6) || defined(INET) + int tcpsyn = 0; + + if (m->m_pkthdr.len < 128 && + (m->m_pkthdr.csum_flags & + (CSUM_IP_TCP | CSUM_IP6_TCP)) && + (m->m_pkthdr.csum_flags & CSUM_TSO) == 0) { + m = hn_check_tcpsyn(m, &tcpsyn); + if (__predict_false(m == NULL)) { + if_inc_counter(ifp, + IFCOUNTER_OERRORS, 1); + return (EIO); + } + } +#else + const int tcpsyn = 0; +#endif + if (tcpsyn) + idx = 0; + else + idx = m->m_pkthdr.flowid % sc->hn_tx_ring_inuse; + } } txr = &sc->hn_tx_ring[idx]; From owner-svn-src-head@freebsd.org Mon Apr 24 08:44: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 1C403D4D2A4; Mon, 24 Apr 2017 08:44:53 +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 E080C1674; Mon, 24 Apr 2017 08:44:52 +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 v3O8iqbY064934; Mon, 24 Apr 2017 08:44:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3O8iqBG064933; Mon, 24 Apr 2017 08:44:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704240844.v3O8iqBG064933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Apr 2017 08:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317355 - head/sys/dev/cxgbe/cxgbei 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, 24 Apr 2017 08:44:53 -0000 Author: mav Date: Mon Apr 24 08:44:51 2017 New Revision: 317355 URL: https://svnweb.freebsd.org/changeset/base/317355 Log: Use proper alignment constant for uma_zcreate(). Previous code panicked on KASSERT with INVARIANTS enabled. MFC after: 2 weeks Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Mon Apr 24 07:52:44 2017 (r317354) +++ head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Mon Apr 24 08:44:51 2017 (r317355) @@ -1070,7 +1070,7 @@ icl_cxgbei_mod_load(void) */ prsv_zone = uma_zcreate("Pagepod reservations", sizeof(struct ppod_reservation), NULL, NULL, NULL, NULL, - CACHE_LINE_SIZE, 0); + UMA_ALIGN_CACHE, 0); refcount_init(&icl_cxgbei_ncons, 0); From owner-svn-src-head@freebsd.org Mon Apr 24 10:16: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 0ADD7D4D1DB; Mon, 24 Apr 2017 10:16:14 +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 C0E5E827; Mon, 24 Apr 2017 10:16: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 v3OAGC1h001544; Mon, 24 Apr 2017 10:16:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OAGCgw001543; Mon, 24 Apr 2017 10:16:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704241016.v3OAGCgw001543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Apr 2017 10:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317356 - head/sys/dev/isp 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, 24 Apr 2017 10:16:14 -0000 Author: mav Date: Mon Apr 24 10:16:12 2017 New Revision: 317356 URL: https://svnweb.freebsd.org/changeset/base/317356 Log: Switch isp_reset to scratchpad not requiring ISP_MBOXDMASETUP. MFC after: 1 week Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Apr 24 08:44:51 2017 (r317355) +++ head/sys/dev/isp/isp.c Mon Apr 24 10:16:12 2017 (r317356) @@ -1012,7 +1012,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d fwt = isp->isp_fwattr; if (IS_24XX(isp)) { - buf = FCPARAM(isp, 0)->isp_scratch; + buf = FCPARAM(isp, 0)->isp_scanscratch; ISP_SNPRINTF(buf, ISP_FC_SCRLEN, "Attributes:"); if (fwt & ISP2400_FW_ATTR_CLASS2) { fwt ^=ISP2400_FW_ATTR_CLASS2; @@ -1101,7 +1101,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d } isp_prt(isp, ISP_LOGCONFIG, "%s", buf); } else if (IS_FC(isp)) { - buf = FCPARAM(isp, 0)->isp_scratch; + buf = FCPARAM(isp, 0)->isp_scanscratch; ISP_SNPRINTF(buf, ISP_FC_SCRLEN, "Attributes:"); if (fwt & ISP_FW_ATTR_TMODE) { fwt ^=ISP_FW_ATTR_TMODE; From owner-svn-src-head@freebsd.org Mon Apr 24 11:06: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 1E734D4D451; Mon, 24 Apr 2017 11:06:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0324DB3; Mon, 24 Apr 2017 11:06:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OB6AER022693; Mon, 24 Apr 2017 11:06:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OB6ATg022689; Mon, 24 Apr 2017 11:06:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704241106.v3OB6ATg022689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 24 Apr 2017 11:06:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317361 - in head/sys: arm64/arm64 conf dev/psci 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, 24 Apr 2017 11:06:12 -0000 Author: andrew Date: Mon Apr 24 11:06:10 2017 New Revision: 317361 URL: https://svnweb.freebsd.org/changeset/base/317361 Log: Call the PSCI reset from cpu_reset on arm64. When rebooting from DDB the kernel calls this directly so the event handler is not called, meaning the computer fails to reboot. Tested by: cognet MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/vm_machdep.c head/sys/conf/options.arm64 head/sys/dev/psci/psci.c head/sys/dev/psci/psci.h Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Mon Apr 24 10:21:13 2017 (r317360) +++ head/sys/arm64/arm64/vm_machdep.c Mon Apr 24 11:06:10 2017 (r317361) @@ -25,6 +25,8 @@ * */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -52,6 +54,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef DEV_PSCI +#include +#endif + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -113,7 +119,11 @@ void cpu_reset(void) { - printf("cpu_reset"); +#ifdef DEV_PSCI + psci_reset(); +#endif + + printf("cpu_reset failed"); while(1) __asm volatile("wfi" ::: "memory"); } Modified: head/sys/conf/options.arm64 ============================================================================== --- head/sys/conf/options.arm64 Mon Apr 24 10:21:13 2017 (r317360) +++ head/sys/conf/options.arm64 Mon Apr 24 11:06:10 2017 (r317361) @@ -7,6 +7,8 @@ SOCDEV_VA opt_global.h THUNDERX_PASS_1_1_ERRATA opt_global.h VFP opt_global.h +DEV_PSCI opt_platform.h + # SoC Support SOC_ALLWINNER_A64 opt_soc.h SOC_BRCM_BCM2837 opt_soc.h Modified: head/sys/dev/psci/psci.c ============================================================================== --- head/sys/dev/psci/psci.c Mon Apr 24 10:21:13 2017 (r317360) +++ head/sys/dev/psci/psci.c Mon Apr 24 11:06:10 2017 (r317361) @@ -412,6 +412,13 @@ psci_shutdown(void *xsc, int howto) /* System reset and off do not return. */ } +void +psci_reset(void) +{ + + psci_shutdown(NULL, 0); +} + #ifdef FDT /* Only support PSCI 0.1 on FDT */ static int Modified: head/sys/dev/psci/psci.h ============================================================================== --- head/sys/dev/psci/psci.h Mon Apr 24 10:21:13 2017 (r317360) +++ head/sys/dev/psci/psci.h Mon Apr 24 11:06:10 2017 (r317361) @@ -36,7 +36,7 @@ typedef int (*psci_callfn_t)(register_t, extern int psci_present; -void psci_system_reset(void); +void psci_reset(void); int psci_cpu_on(unsigned long, unsigned long, unsigned long); int psci_hvc_despatch(register_t, register_t, register_t, register_t); int psci_smc_despatch(register_t, register_t, register_t, register_t); From owner-svn-src-head@freebsd.org Mon Apr 24 12:44: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 658EDD4BEF1; Mon, 24 Apr 2017 12:44:06 +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 1F2289CA; Mon, 24 Apr 2017 12:44:06 +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 v3OCi5ta064129; Mon, 24 Apr 2017 12:44:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OCi5lc064127; Mon, 24 Apr 2017 12:44:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704241244.v3OCi5lc064127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Apr 2017 12:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317369 - 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: Mon, 24 Apr 2017 12:44:06 -0000 Author: mav Date: Mon Apr 24 12:44:04 2017 New Revision: 317369 URL: https://svnweb.freebsd.org/changeset/base/317369 Log: Slightly compact the code. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Mon Apr 24 11:34:02 2017 (r317368) +++ head/sys/cam/ctl/ctl_backend_block.c Mon Apr 24 12:44:04 2017 (r317369) @@ -2650,11 +2650,8 @@ bailout_error: static void ctl_be_block_lun_shutdown(void *be_lun) { - struct ctl_be_block_lun *lun; - struct ctl_be_block_softc *softc; - - lun = (struct ctl_be_block_lun *)be_lun; - softc = lun->softc; + struct ctl_be_block_lun *lun = be_lun; + struct ctl_be_block_softc *softc = lun->softc; mtx_lock(&softc->lock); lun->flags |= CTL_BE_BLOCK_LUN_UNCONFIGURED; Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Mon Apr 24 11:34:02 2017 (r317368) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Mon Apr 24 12:44:04 2017 (r317369) @@ -1287,13 +1287,8 @@ bailout_error: static void ctl_backend_ramdisk_lun_shutdown(void *be_lun) { - struct ctl_be_ramdisk_lun *lun; - struct ctl_be_ramdisk_softc *softc; - int do_free; - - lun = (struct ctl_be_ramdisk_lun *)be_lun; - softc = lun->softc; - do_free = 0; + struct ctl_be_ramdisk_lun *lun = be_lun; + struct ctl_be_ramdisk_softc *softc = lun->softc; mtx_lock(&softc->lock); lun->flags |= CTL_BE_RAMDISK_LUN_UNCONFIGURED; @@ -1303,12 +1298,9 @@ ctl_backend_ramdisk_lun_shutdown(void *b STAILQ_REMOVE(&softc->lun_list, lun, ctl_be_ramdisk_lun, links); softc->num_luns--; - do_free = 1; + free(be_lun, M_RAMDISK); } mtx_unlock(&softc->lock); - - if (do_free != 0) - free(be_lun, M_RAMDISK); } static void From owner-svn-src-head@freebsd.org Mon Apr 24 12:52: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 07EF0D4C0E2; Mon, 24 Apr 2017 12:52:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF690E6F; Mon, 24 Apr 2017 12:52:43 +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 v3OCqgaR067947; Mon, 24 Apr 2017 12:52:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OCqgPH067946; Mon, 24 Apr 2017 12:52:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704241252.v3OCqgPH067946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Apr 2017 12:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317370 - 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: Mon, 24 Apr 2017 12:52:44 -0000 Author: mav Date: Mon Apr 24 12:52:42 2017 New Revision: 317370 URL: https://svnweb.freebsd.org/changeset/base/317370 Log: Change ctl_free_lun() locking. This fixes potential callout_drain() sleep under non-sleepable lock. PR: 218167 MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Apr 24 12:44:04 2017 (r317369) +++ head/sys/cam/ctl/ctl.c Mon Apr 24 12:52:42 2017 (r317370) @@ -4731,18 +4731,20 @@ ctl_free_lun(struct ctl_lun *lun) struct ctl_lun *nlun; int i; - mtx_assert(&softc->ctl_lock, MA_OWNED); + KASSERT(TAILQ_EMPTY(&lun->ooa_queue), + ("Freeing a LUN %p with outstanding I/O!\n", lun)); + mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->lun_list, lun, ctl_lun, links); - ctl_clear_mask(softc->ctl_lun_mask, lun->lun); - softc->ctl_luns[lun->lun] = NULL; - - if (!TAILQ_EMPTY(&lun->ooa_queue)) - panic("Freeing a LUN %p with outstanding I/O!!\n", lun); - softc->num_luns--; + STAILQ_FOREACH(nlun, &softc->lun_list, links) { + mtx_lock(&nlun->lun_lock); + ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE); + mtx_unlock(&nlun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); /* * Tell the backend to free resources, if this LUN has a backend. @@ -4752,7 +4754,6 @@ ctl_free_lun(struct ctl_lun *lun) lun->ie_reportcnt = UINT32_MAX; callout_drain(&lun->ie_callout); - ctl_tpc_lun_shutdown(lun); mtx_destroy(&lun->lun_lock); free(lun->lun_devid, M_CTL); @@ -4765,12 +4766,6 @@ ctl_free_lun(struct ctl_lun *lun) if (lun->flags & CTL_LUN_MALLOCED) free(lun, M_CTL); - STAILQ_FOREACH(nlun, &softc->lun_list, links) { - mtx_lock(&nlun->lun_lock); - ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE); - mtx_unlock(&nlun->lun_lock); - } - return (0); } @@ -5027,9 +5022,7 @@ ctl_invalidate_lun(struct ctl_be_lun *be */ if (TAILQ_EMPTY(&lun->ooa_queue)) { mtx_unlock(&lun->lun_lock); - mtx_lock(&softc->ctl_lock); ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); } else mtx_unlock(&lun->lun_lock); @@ -13068,9 +13061,7 @@ ctl_process_done(union ctl_io *io) if ((lun->flags & CTL_LUN_INVALID) && TAILQ_EMPTY(&lun->ooa_queue)) { mtx_unlock(&lun->lun_lock); - mtx_lock(&softc->ctl_lock); ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); } else mtx_unlock(&lun->lun_lock); From owner-svn-src-head@freebsd.org Mon Apr 24 14: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 4C6E8D4E546; Mon, 24 Apr 2017 14:51:55 +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 1E506147C; Mon, 24 Apr 2017 14:51:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OEpsBW014027; Mon, 24 Apr 2017 14:51:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OEpsfa014026; Mon, 24 Apr 2017 14:51:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704241451.v3OEpsfa014026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 24 Apr 2017 14:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317371 - head/contrib/elftoolchain/elfcopy 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, 24 Apr 2017 14:51:55 -0000 Author: emaste Date: Mon Apr 24 14:51:53 2017 New Revision: 317371 URL: https://svnweb.freebsd.org/changeset/base/317371 Log: elfcopy: allow empty symbol list files Reported by: bz MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10441 Modified: head/contrib/elftoolchain/elfcopy/main.c Modified: head/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/main.c Mon Apr 24 12:52:42 2017 (r317370) +++ head/contrib/elftoolchain/elfcopy/main.c Mon Apr 24 14:51:53 2017 (r317371) @@ -1285,8 +1285,9 @@ parse_symlist_file(struct elfcopy *ecp, err(EXIT_FAILURE, "can not open %s", fn); if ((data = malloc(sb.st_size + 1)) == NULL) err(EXIT_FAILURE, "malloc failed"); - if (fread(data, 1, sb.st_size, fp) == 0 || ferror(fp)) - err(EXIT_FAILURE, "fread failed"); + if (sb.st_size > 0) + if (fread(data, sb.st_size, 1, fp) != 1) + err(EXIT_FAILURE, "fread failed"); fclose(fp); data[sb.st_size] = '\0'; From owner-svn-src-head@freebsd.org Mon Apr 24 14:56: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 A12C8D4E66E; Mon, 24 Apr 2017 14:56:42 +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 7343017DC; Mon, 24 Apr 2017 14:56:42 +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 v3OEufKS017842; Mon, 24 Apr 2017 14:56:41 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OEufpT017841; Mon, 24 Apr 2017 14:56:41 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704241456.v3OEufpT017841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 24 Apr 2017 14:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317372 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 24 Apr 2017 14:56:42 -0000 Author: pfg Date: Mon Apr 24 14:56:41 2017 New Revision: 317372 URL: https://svnweb.freebsd.org/changeset/base/317372 Log: scandir(3): promote arraysz to size_t to match numitems. The internal array size goes through a loop and is compared with numitems which at its limits makes can be unreachably higher than arraysz. Prevent an hypothetical overflow by matching the types. MFC after: 1 week Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Mon Apr 24 14:51:53 2017 (r317371) +++ head/lib/libc/gen/scandir.c Mon Apr 24 14:56:41 2017 (r317372) @@ -82,8 +82,7 @@ scandir(const char *dirname, struct dire #endif { struct dirent *d, *p, **names = NULL; - size_t numitems; - long arraysz; + size_t arraysz, numitems; DIR *dirp; if ((dirp = opendir(dirname)) == NULL) From owner-svn-src-head@freebsd.org Mon Apr 24 16:37: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 2E5A2D4EB3E; Mon, 24 Apr 2017 16:37:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2C3C1B06; Mon, 24 Apr 2017 16:37: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 v3OGbP6O063576; Mon, 24 Apr 2017 16:37:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OGbPkf063575; Mon, 24 Apr 2017 16:37:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704241637.v3OGbPkf063575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 24 Apr 2017 16:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317376 - head/release/scripts 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, 24 Apr 2017 16:37:27 -0000 Author: emaste Date: Mon Apr 24 16:37:25 2017 New Revision: 317376 URL: https://svnweb.freebsd.org/changeset/base/317376 Log: Add sysutils/tmux to the DVD package set The zsh + tmux combination is commonly wanted. Approved by: gjb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Mon Apr 24 16:31:28 2017 (r317375) +++ head/release/scripts/pkg-stage.sh Mon Apr 24 16:37:25 2017 (r317376) @@ -24,6 +24,7 @@ shells/bash shells/zsh security/sudo sysutils/screen +sysutils/tmux www/firefox www/links x11-drivers/xf86-video-vmware From owner-svn-src-head@freebsd.org Mon Apr 24 16:52: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 63BB9D4E0F1; Mon, 24 Apr 2017 16:52:28 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30B4A9AB; Mon, 24 Apr 2017 16:52:28 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OGqRUb071500; Mon, 24 Apr 2017 16:52:27 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OGqRrR071499; Mon, 24 Apr 2017 16:52:27 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201704241652.v3OGqRrR071499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Mon, 24 Apr 2017 16:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317378 - head/usr.bin/sed 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, 24 Apr 2017 16:52:28 -0000 Author: bcr (doc committer) Date: Mon Apr 24 16:52:26 2017 New Revision: 317378 URL: https://svnweb.freebsd.org/changeset/base/317378 Log: Fix the last example to really replace all occurrences of the search string in the file by adding the global (g) option at the end. Without it, only the first match is replaced, subsequent ones are ignored. The intention of the example is to demonstrate something else, but adding the g matches the example to what the description says. Discussed with: brd (on IRC) MFC after: 1 week Modified: head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/sed.1 ============================================================================== --- head/usr.bin/sed/sed.1 Mon Apr 24 16:49:30 2017 (r317377) +++ head/usr.bin/sed/sed.1 Mon Apr 24 16:52:26 2017 (r317378) @@ -614,7 +614,7 @@ in the file .Pa test.txt , without creating a backup of the file: .Bd -literal -offset indent -sed -i '' -e 's/foo/bar/' test.txt +sed -i '' -e 's/foo/bar/g' test.txt .Ed .Sh SEE ALSO .Xr awk 1 , From owner-svn-src-head@freebsd.org Mon Apr 24 18:09: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 19B30D4E79E; Mon, 24 Apr 2017 18:09:54 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDCFEB5F; Mon, 24 Apr 2017 18:09:53 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OI9qRf001653; Mon, 24 Apr 2017 18:09:52 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OI9qdi001652; Mon, 24 Apr 2017 18:09:52 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201704241809.v3OI9qdi001652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Mon, 24 Apr 2017 18:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317379 - head/sys/dev/bhnd/nvram 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, 24 Apr 2017 18:09:54 -0000 Author: landonf Date: Mon Apr 24 18:09:52 2017 New Revision: 317379 URL: https://svnweb.freebsd.org/changeset/base/317379 Log: Drop unused/unnecessary return statement. Reported by: Coverity CID: 1373118 Approved by: adrian (mentor, implicit) Modified: head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c Modified: head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c ============================================================================== --- head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c Mon Apr 24 16:52:26 2017 (r317378) +++ head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c Mon Apr 24 18:09:52 2017 (r317379) @@ -1256,7 +1256,6 @@ bhnd_nvram_sprom_read_var(struct bhnd_sp /* Provide value wrapper */ return (bhnd_nvram_val_init(val, var->fmt, inp, ilen, var->type, BHND_NVRAM_VAL_BORROW_DATA)); - return (error); } From owner-svn-src-head@freebsd.org Mon Apr 24 18:35: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 32917D4D1C0; Mon, 24 Apr 2017 18:35:27 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F16CF9F; Mon, 24 Apr 2017 18:35:26 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OIZQbs013900; Mon, 24 Apr 2017 18:35:26 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OIZPAu013895; Mon, 24 Apr 2017 18:35:25 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201704241835.v3OIZPAu013895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Mon, 24 Apr 2017 18:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317380 - in head/sys: dev/bhnd dev/bhnd/bcma dev/bhnd/siba mips/broadcom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 24 Apr 2017 18:35:27 -0000 Author: landonf Date: Mon Apr 24 18:35:25 2017 New Revision: 317380 URL: https://svnweb.freebsd.org/changeset/base/317380 Log: Add support for dumping bcma/siba EROM tables to the console via a new BHND_EROM_DUMP() method. Dump the EROM tables to the coneole on mips/broadcom devices if bootverbose is enabled; this functionality is primarily useful when debugging SoC EROM parsing and device matching issues during early boot. Reviewed by: mizhka Approved by: adrian (mentor) Sponsored by: Plausible Labs Differential Revision: https://reviews.freebsd.org/D10122 Modified: head/sys/dev/bhnd/bcma/bcma_erom.c head/sys/dev/bhnd/bhnd_erom.h head/sys/dev/bhnd/bhnd_erom_if.m head/sys/dev/bhnd/siba/siba_erom.c head/sys/mips/broadcom/bcm_machdep.c Modified: head/sys/dev/bhnd/bcma/bcma_erom.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_erom.c Mon Apr 24 18:09:52 2017 (r317379) +++ head/sys/dev/bhnd/bcma/bcma_erom.c Mon Apr 24 18:35:25 2017 (r317380) @@ -1367,6 +1367,157 @@ failed: return error; } +static int +bcma_erom_dump(bhnd_erom_t *erom) +{ + struct bcma_erom *sc; + uint32_t entry; + int error; + + sc = (struct bcma_erom *)erom; + + bcma_erom_reset(sc); + + while (!(error = bcma_erom_read32(sc, &entry))) { + /* Handle EOF */ + if (entry == BCMA_EROM_TABLE_EOF) { + EROM_LOG(sc, "EOF\n"); + return (0); + } + + /* Invalid entry */ + if (!BCMA_EROM_GET_ATTR(entry, ENTRY_ISVALID)) { + EROM_LOG(sc, "invalid EROM entry %#x\n", entry); + return (EINVAL); + } + + switch (BCMA_EROM_GET_ATTR(entry, ENTRY_TYPE)) { + case BCMA_EROM_ENTRY_TYPE_CORE: { + /* CoreDescA */ + EROM_LOG(sc, "coreA (0x%x)\n", entry); + EROM_LOG(sc, "\tdesigner:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREA_DESIGNER)); + EROM_LOG(sc, "\tid:\t\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREA_ID)); + EROM_LOG(sc, "\tclass:\t\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREA_CLASS)); + + /* CoreDescB */ + if ((error = bcma_erom_read32(sc, &entry))) { + EROM_LOG(sc, "error reading CoreDescB: %d\n", + error); + return (error); + } + + if (!BCMA_EROM_ENTRY_IS(entry, CORE)) { + EROM_LOG(sc, "invalid core descriptor; found " + "unexpected entry %#x (type=%s)\n", + entry, bcma_erom_entry_type_name(entry)); + return (EINVAL); + } + + EROM_LOG(sc, "coreB (0x%x)\n", entry); + EROM_LOG(sc, "\trev:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREB_REV)); + EROM_LOG(sc, "\tnummp:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREB_NUM_MP)); + EROM_LOG(sc, "\tnumdp:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREB_NUM_DP)); + EROM_LOG(sc, "\tnumwmp:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREB_NUM_WMP)); + EROM_LOG(sc, "\tnumwsp:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, COREB_NUM_WMP)); + + break; + } + case BCMA_EROM_ENTRY_TYPE_MPORT: + EROM_LOG(sc, "\tmport 0x%x\n", entry); + EROM_LOG(sc, "\t\tport:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, MPORT_NUM)); + EROM_LOG(sc, "\t\tid:\t\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, MPORT_ID)); + break; + + case BCMA_EROM_ENTRY_TYPE_REGION: { + bool addr64; + uint8_t size_type; + + addr64 = (BCMA_EROM_GET_ATTR(entry, REGION_64BIT) != 0); + size_type = BCMA_EROM_GET_ATTR(entry, REGION_SIZE); + + EROM_LOG(sc, "\tregion 0x%x:\n", entry); + EROM_LOG(sc, "\t\t%s:\t0x%x\n", + addr64 ? "baselo" : "base", + BCMA_EROM_GET_ATTR(entry, REGION_BASE)); + EROM_LOG(sc, "\t\tport:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, REGION_PORT)); + EROM_LOG(sc, "\t\ttype:\t0x%x\n", + BCMA_EROM_GET_ATTR(entry, REGION_TYPE)); + EROM_LOG(sc, "\t\tsztype:\t0x%hhx\n", size_type); + + /* Read the base address high bits */ + if (addr64) { + if ((error = bcma_erom_read32(sc, &entry))) { + EROM_LOG(sc, "error reading region " + "base address high bits %d\n", + error); + return (error); + } + + EROM_LOG(sc, "\t\tbasehi:\t0x%x\n", entry); + } + + /* Read extended size descriptor */ + if (size_type == BCMA_EROM_REGION_SIZE_OTHER) { + bool size64; + + if ((error = bcma_erom_read32(sc, &entry))) { + EROM_LOG(sc, "error reading region " + "size descriptor %d\n", + error); + return (error); + } + + if (BCMA_EROM_GET_ATTR(entry, RSIZE_64BIT)) + size64 = true; + else + size64 = false; + + EROM_LOG(sc, "\t\t%s:\t0x%x\n", + size64 ? "sizelo" : "size", + BCMA_EROM_GET_ATTR(entry, RSIZE_VAL)); + + if (size64) { + error = bcma_erom_read32(sc, &entry); + if (error) { + EROM_LOG(sc, "error reading " + "region size high bits: " + "%d\n", error); + return (error); + } + + EROM_LOG(sc, "\t\tsizehi:\t0x%x\n", + entry); + } + } + break; + } + + default: + EROM_LOG(sc, "unknown EROM entry 0x%x (type=%s)\n", + entry, bcma_erom_entry_type_name(entry)); + return (EINVAL); + } + } + + if (error == ENOENT) + EROM_LOG(sc, "BCMA EROM table missing terminating EOF\n"); + else if (error) + EROM_LOG(sc, "EROM read failed: %d\n", error); + + return (error); +} + static kobj_method_t bcma_erom_methods[] = { KOBJMETHOD(bhnd_erom_probe, bcma_erom_probe), KOBJMETHOD(bhnd_erom_probe_static, bcma_erom_probe_static), @@ -1377,6 +1528,7 @@ static kobj_method_t bcma_erom_methods[] KOBJMETHOD(bhnd_erom_free_core_table, bcma_erom_free_core_table), KOBJMETHOD(bhnd_erom_lookup_core, bcma_erom_lookup_core), KOBJMETHOD(bhnd_erom_lookup_core_addr, bcma_erom_lookup_core_addr), + KOBJMETHOD(bhnd_erom_dump, bcma_erom_dump), KOBJMETHOD_END }; Modified: head/sys/dev/bhnd/bhnd_erom.h ============================================================================== --- head/sys/dev/bhnd/bhnd_erom.h Mon Apr 24 18:09:52 2017 (r317379) +++ head/sys/dev/bhnd/bhnd_erom.h Mon Apr 24 18:35:25 2017 (r317380) @@ -240,4 +240,19 @@ bhnd_erom_lookup_core_addr(bhnd_erom_t * core, addr, size)); }; +/** + * Enumerate and print all entries in @p erom. + * + * @param erom The erom parser to be enumerated. + * + * @retval 0 success + * @retval non-zero If an error occurs parsing the EROM table, a regular + * unix error code will be returned. + */ +static inline int +bhnd_erom_dump(bhnd_erom_t *erom) +{ + return (BHND_EROM_DUMP(erom)); +} + #endif /* _BHND_EROM_BHND_EROM_H_ */ Modified: head/sys/dev/bhnd/bhnd_erom_if.m ============================================================================== --- head/sys/dev/bhnd/bhnd_erom_if.m Mon Apr 24 18:09:52 2017 (r317379) +++ head/sys/dev/bhnd/bhnd_erom_if.m Mon Apr 24 18:35:25 2017 (r317380) @@ -241,3 +241,16 @@ METHOD int lookup_core_addr { bhnd_addr_t *addr; bhnd_size_t *size; }; + +/** + * Enumerate and print all EROM table entries. + * + * @param erom The erom parser to be enumerated. + * + * @retval 0 success + * @retval non-zero If an error occurs reading the EROM table, a regular + * unix error code will be returned. + */ +METHOD int dump { + bhnd_erom_t *erom; +}; Modified: head/sys/dev/bhnd/siba/siba_erom.c ============================================================================== --- head/sys/dev/bhnd/siba/siba_erom.c Mon Apr 24 18:09:52 2017 (r317379) +++ head/sys/dev/bhnd/siba/siba_erom.c Mon Apr 24 18:35:25 2017 (r317380) @@ -519,6 +519,65 @@ siba_erom_free_core_table(bhnd_erom_t *e free(cores, M_BHND); } +/* BHND_EROM_DUMP() */ +static int +siba_erom_dump(bhnd_erom_t *erom) +{ + struct siba_erom *sc; + int error; + + sc = (struct siba_erom *)erom; + + /* Enumerate all cores. */ + for (u_int i = 0; i < sc->io.ncores; i++) { + uint32_t idhigh, idlow; + uint32_t nraddr; + + idhigh = siba_eio_read_4(&sc->io, i, + SB0_REG_ABS(SIBA_CFG0_IDHIGH)); + idlow = siba_eio_read_4(&sc->io, i, + SB0_REG_ABS(SIBA_CFG0_IDLOW)); + + printf("siba core %u:\n", i); + printf("\tvendor:\t0x%04x\n", SIBA_REG_GET(idhigh, IDH_VENDOR)); + printf("\tdevice:\t0x%04x\n", SIBA_REG_GET(idhigh, IDH_DEVICE)); + printf("\trev:\t0x%04x\n", SIBA_IDH_CORE_REV(idhigh)); + printf("\tsbrev:\t0x%02x\n", SIBA_REG_GET(idlow, IDL_SBREV)); + + /* Enumerate the address match registers */ + nraddr = SIBA_REG_GET(idlow, IDL_NRADDR); + printf("\tnraddr\t0x%04x\n", nraddr); + + for (size_t addrspace = 0; addrspace < nraddr; addrspace++) { + uint32_t am, am_addr, am_size; + u_int am_offset; + + /* Determine the register offset */ + am_offset = siba_admatch_offset(addrspace); + if (am_offset == 0) { + printf("addrspace %zu unsupported", + addrspace); + break; + } + + /* Read and parse the address match register */ + am = siba_eio_read_4(&sc->io, i, am_offset); + error = siba_parse_admatch(am, &am_addr, &am_size); + if (error) { + printf("failed to decode address match " + "register value 0x%x\n", am); + continue; + } + + printf("\taddrspace %zu\n", addrspace); + printf("\t\taddr: 0x%08x\n", am_addr); + printf("\t\tsize: 0x%08x\n", am_size); + } + } + + return (0); +} + static kobj_method_t siba_erom_methods[] = { KOBJMETHOD(bhnd_erom_probe, siba_erom_probe), KOBJMETHOD(bhnd_erom_probe_static, siba_erom_probe_static), @@ -529,6 +588,7 @@ static kobj_method_t siba_erom_methods[] KOBJMETHOD(bhnd_erom_free_core_table, siba_erom_free_core_table), KOBJMETHOD(bhnd_erom_lookup_core, siba_erom_lookup_core), KOBJMETHOD(bhnd_erom_lookup_core_addr, siba_erom_lookup_core_addr), + KOBJMETHOD(bhnd_erom_dump, siba_erom_dump), KOBJMETHOD_END }; Modified: head/sys/mips/broadcom/bcm_machdep.c ============================================================================== --- head/sys/mips/broadcom/bcm_machdep.c Mon Apr 24 18:09:52 2017 (r317379) +++ head/sys/mips/broadcom/bcm_machdep.c Mon Apr 24 18:35:25 2017 (r317380) @@ -343,6 +343,9 @@ bcm_init_platform_data(struct bcm_platfo return (error); } + if (bootverbose) + bhnd_erom_dump(&bp->erom.obj); + /* Fetch chipcommon core info */ error = bcm_find_core(bp, bcm_chipc_cores, nitems(bcm_chipc_cores), &bp->cc_id, &bp->cc_addr); From owner-svn-src-head@freebsd.org Mon Apr 24 20:34: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 645A4D4E912; Mon, 24 Apr 2017 20:34:58 +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 1CB95E26; Mon, 24 Apr 2017 20:34:58 +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 v3OKYvTC062715; Mon, 24 Apr 2017 20:34:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OKYvHl062714; Mon, 24 Apr 2017 20:34:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201704242034.v3OKYvHl062714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Apr 2017 20:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317381 - head/usr.bin/diff 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, 24 Apr 2017 20:34:58 -0000 Author: dim Date: Mon Apr 24 20:34:56 2017 New Revision: 317381 URL: https://svnweb.freebsd.org/changeset/base/317381 Log: Fix the following warning from gcc 4.2 in usr.bin/diff: usr.bin/diff/diffreg.c: In function 'change': usr.bin/diff/diffreg.c:1085: warning: 'i' may be used uninitialized in this function This version of gcc is not smart enough to see that 'i' cannot actually be used unitialized. However, the variable is confusingly re-used, so it is better to give it another name, and clearly initialize it before attempting to use it. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10484 Modified: head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Mon Apr 24 18:35:25 2017 (r317380) +++ head/usr.bin/diff/diffreg.c Mon Apr 24 20:34:56 2017 (r317381) @@ -1082,7 +1082,7 @@ change(char *file1, FILE *f1, char *file { static size_t max_context = 64; long curpos; - int i, nc; + int i, nc, f; const char *walk; restart: @@ -1214,9 +1214,10 @@ proceed: if (a <= b && c <= d && diff_format == D_NORMAL) diff_output("---\n"); } + f = 0; if (diff_format != D_GFORMAT) - i = fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags); - if (i != 0 && diff_format == D_EDIT) { + f = fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags); + if (f != 0 && diff_format == D_EDIT) { /* * A non-zero return value for D_EDIT indicates that the * last line printed was a bare dot (".") that has been @@ -1225,10 +1226,10 @@ proceed: * back and restart where we left off. */ diff_output(".\n"); - diff_output("%ds/.//\n", a + i - 1); - b = a + i - 1; + diff_output("%ds/.//\n", a + f - 1); + b = a + f - 1; a = b + 1; - c += i; + c += f; goto restart; } if ((diff_format == D_EDIT || diff_format == D_REVERSE) && c <= d) From owner-svn-src-head@freebsd.org Mon Apr 24 20:46: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 D8009D4EDE2; Mon, 24 Apr 2017 20:46:20 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7CF171C; Mon, 24 Apr 2017 20:46:20 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OKkJjm066681; Mon, 24 Apr 2017 20:46:19 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OKkJW7066680; Mon, 24 Apr 2017 20:46:19 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704242046.v3OKkJW7066680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 24 Apr 2017 20:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317382 - 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, 24 Apr 2017 20:46:20 -0000 Author: rmacklem Date: Mon Apr 24 20:46:19 2017 New Revision: 317382 URL: https://svnweb.freebsd.org/changeset/base/317382 Log: Allow use of a write open stateid for reading in the NFSv4 server. The NFSv4 RFCs give a server the option of allowing the use of an open stateid for write access to be used for a Read operation. This patch enables this by default and adds a sysctl to disable it, for anyone who does not want this capability. Allowing this is particularily useful for a pNFS Data Server (DS), since they are not permitted to allow the use of special stateids. Discovered during recent testing of the pNFS server under development. MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Apr 24 20:34:56 2017 (r317381) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Apr 24 20:46:19 2017 (r317382) @@ -75,6 +75,11 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, writedel &nfsrv_writedelegifpos, 0, "Issue a write delegation for read opens if possible"); +static int nfsrv_allowreadforwriteopen = 1; +SYSCTL_INT(_vfs_nfsd, OID_AUTO, allowreadforwriteopen, CTLFLAG_RW, + &nfsrv_allowreadforwriteopen, 0, + "Allow Reads to be done with Write Access StateIDs"); + /* * Hash lists for nfs V4. */ @@ -1872,7 +1877,8 @@ tryagain: mystp->ls_flags & NFSLCK_ACCESSBITS)) || ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_READACCESS)) == (NFSLCK_CHECK | NFSLCK_READACCESS) && - !(mystp->ls_flags & NFSLCK_READACCESS)) || + !(mystp->ls_flags & NFSLCK_READACCESS) && + nfsrv_allowreadforwriteopen == 0) || ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) == (NFSLCK_CHECK | NFSLCK_WRITEACCESS) && !(mystp->ls_flags & NFSLCK_WRITEACCESS))) { From owner-svn-src-head@freebsd.org Mon Apr 24 21:21: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 2832CD4E8B0; Mon, 24 Apr 2017 21:21:53 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA0ACED1; Mon, 24 Apr 2017 21:21:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OLLqOA083234; Mon, 24 Apr 2017 21:21:52 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OLLoR2082346; Mon, 24 Apr 2017 21:21:50 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704242121.v3OLLoR2082346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 24 Apr 2017 21:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... 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, 24 Apr 2017 21:21:53 -0000 Author: brooks Date: Mon Apr 24 21:21:49 2017 New Revision: 317383 URL: https://svnweb.freebsd.org/changeset/base/317383 Log: Remove the NATM framework including the en(4), fatm(4), hatm(4), and patm(4) devices. Maintaining an address family and framework has real costs when we make infrastructure improvements. In the case of NATM we support no devices manufactured in the last 20 years and some will not even work in modern motherboards (some newer devices that patm(4) could be updated to support apparently exist, but we do not currently have support). With this change, support remains for some netgraph modules that don't require NATM support code. It is unclear if all these should remain, though ng_atmllc certainly stands alone. Note well: FreeBSD 11 supports NATM and will continue to do so until at least September 30, 2021. Improvements to the code in FreeBSD 11 are certainly welcome. Reviewed by: philip Approved by: harti Deleted: head/sbin/atm/Makefile head/sbin/atm/Makefile.inc head/sbin/atm/atmconfig/Makefile head/sbin/atm/atmconfig/Makefile.depend head/sbin/atm/atmconfig/atm_oid.list head/sbin/atm/atmconfig/atmconfig.8 head/sbin/atm/atmconfig/atmconfig.h head/sbin/atm/atmconfig/atmconfig.help head/sbin/atm/atmconfig/atmconfig_device.c head/sbin/atm/atmconfig/atmconfig_device.h head/sbin/atm/atmconfig/atmconfig_device.help head/sbin/atm/atmconfig/diag.c head/sbin/atm/atmconfig/diag.h head/sbin/atm/atmconfig/main.c head/sbin/atm/atmconfig/natm.c head/sbin/atm/atmconfig/private.h head/share/man/man4/en.4 head/share/man/man4/fatm.4 head/share/man/man4/hatm.4 head/share/man/man4/natm.4 head/share/man/man4/natmip.4 head/share/man/man4/ng_atm.4 head/share/man/man4/patm.4 head/share/man/man4/utopia.4 head/sys/dev/en/if_en_pci.c head/sys/dev/en/midway.c head/sys/dev/en/midwayreg.h head/sys/dev/en/midwayvar.h head/sys/dev/fatm/firmware.h head/sys/dev/fatm/if_fatm.c head/sys/dev/fatm/if_fatm_rate.h head/sys/dev/fatm/if_fatmreg.h head/sys/dev/fatm/if_fatmvar.h head/sys/dev/hatm/if_hatm.c head/sys/dev/hatm/if_hatm_intr.c head/sys/dev/hatm/if_hatm_ioctl.c head/sys/dev/hatm/if_hatm_rx.c head/sys/dev/hatm/if_hatm_tx.c head/sys/dev/hatm/if_hatmconf.h head/sys/dev/hatm/if_hatmreg.h head/sys/dev/hatm/if_hatmvar.h head/sys/dev/patm/genrtab/Makefile head/sys/dev/patm/genrtab/genrtab.c head/sys/dev/patm/idt77252reg.h head/sys/dev/patm/if_patm.c head/sys/dev/patm/if_patm_attach.c head/sys/dev/patm/if_patm_intr.c head/sys/dev/patm/if_patm_ioctl.c head/sys/dev/patm/if_patm_rtables.c head/sys/dev/patm/if_patm_rx.c head/sys/dev/patm/if_patm_tx.c head/sys/dev/patm/if_patmvar.h head/sys/dev/utopia/idtphy.c head/sys/dev/utopia/idtphy.h head/sys/dev/utopia/suni.c head/sys/dev/utopia/suni.h head/sys/dev/utopia/utopia.c head/sys/dev/utopia/utopia.h head/sys/dev/utopia/utopia_priv.h head/sys/modules/en/Makefile head/sys/modules/fatm/Makefile head/sys/modules/hatm/Makefile head/sys/modules/netgraph/atm/atm/Makefile head/sys/modules/patm/Makefile head/sys/modules/utopia/Makefile head/sys/net/if_atm.h head/sys/net/if_atmsubr.c head/sys/netgraph/atm/ng_atm.c head/sys/netgraph/atm/ng_atm.h head/sys/netinet/if_atm.c head/sys/netinet/if_atm.h head/sys/netnatm/natm.c head/sys/netnatm/natm.h head/sys/netnatm/natm_pcb.c head/sys/netnatm/natm_proto.c head/usr.sbin/bsnmpd/modules/snmp_atm/BEGEMOT-ATM-FREEBSD-MIB.txt head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def head/usr.sbin/bsnmpd/modules/snmp_atm/atm_sys.c head/usr.sbin/ppp/atm.c head/usr.sbin/ppp/atm.h Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist head/include/Makefile head/lib/libc/net/getnameinfo.c head/rescue/rescue/Makefile head/sbin/Makefile head/share/man/man4/Makefile head/sys/boot/forth/loader.conf head/sys/conf/NOTES head/sys/conf/config.mk head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile head/sys/modules/netgraph/atm/Makefile head/sys/net/netisr.h head/sys/netgraph/ng_atmllc.c head/sys/sys/param.h head/usr.sbin/bsnmpd/modules/Makefile head/usr.sbin/ppp/Makefile head/usr.sbin/ppp/physical.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Apr 24 20:46:19 2017 (r317382) +++ head/ObsoleteFiles.inc Mon Apr 24 21:21:49 2017 (r317383) @@ -38,6 +38,44 @@ # xargs -n1 | sort | uniq -d; # done +# 20170424: NATM support removed +OLD_FILES+=rescue/atmconfig +OLD_FILES+=sbin/atmconfig +OLD_FILES+=usr/include/bsnmp/snmp_atm.h +OLD_FILES+=usr/include/dev/utopia/idtphy.h +OLD_FILES+=usr/include/dev/utopia/suni.h +OLD_FILES+=usr/include/dev/utopia/utopia.h +OLD_FILES+=usr/include/dev/utopia/utopia_priv.h +OLD_DIRS+=usr/include/dev/utopia +OLD_FILES+=usr/include/net/if_atm.h +OLD_FILES+=usr/include/netgraph/atm/ng_atm.h +OLD_FILES+=usr/include/netinet/if_atm.h +OLD_FILES+=usr/include/netnatm/natm.h +OLD_FILES+=usr/lib/debug/sbin/atmconfig.debug +OLD_FILES+=usr/lib/debug/usr/lib/snmp_atm.so.6.debug +OLD_FILES+=usr/lib/snmp_atm.so +OLD_FILES+=usr/lib/snmp_atm.so.6 +OLD_FILES+=usr/share/doc/atm/atmconfig.help +OLD_FILES+=usr/share/doc/atm/atmconfig_device.help +OLD_DIRS+=usr/share/doc/atm +OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz +OLD_FILES+=usr/share/man/man4/en.4.gz +OLD_FILES+=usr/share/man/man4/fatm.4.gz +OLD_FILES+=usr/share/man/man4/hatm.4.gz +OLD_FILES+=usr/share/man/man4/if_en.4.gz +OLD_FILES+=usr/share/man/man4/if_fatm.4.gz +OLD_FILES+=usr/share/man/man4/if_hatm.4.gz +OLD_FILES+=usr/share/man/man4/if_patm.4.gz +OLD_FILES+=usr/share/man/man4/natm.4.gz +OLD_FILES+=usr/share/man/man4/natmip.4.gz +OLD_FILES+=usr/share/man/man4/ng_atm.4.gz +OLD_FILES+=usr/share/man/man4/patm.4.gz +OLD_FILES+=usr/share/man/man4/utopia.4.gz +OLD_FILES+=usr/share/man/man8/atmconfig.8.gz +OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def +OLD_FILES+=usr/share/snmp/defs/atm_tree.def +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt # 20170420: remove GNU diff OLD_FILES+=usr/share/man/man7/diff.7.gz # 20170322: rename to _test to match the FreeBSD test suite name scheme Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Mon Apr 24 20:46:19 2017 (r317382) +++ head/etc/mtree/BSD.usr.dist Mon Apr 24 21:21:49 2017 (r317383) @@ -189,8 +189,6 @@ .. atf .. - atm - .. legal .. llvm Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/include/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -40,14 +40,14 @@ LHDRS= aio.h errno.h fcntl.h linker_set. syslog.h ucontext.h LDIRS= bsm cam geom net net80211 netgraph netinet netinet6 \ - netipsec netnatm netsmb nfs nfsclient nfsserver sys vm + netipsec netsmb nfs nfsclient nfsserver sys vm LSUBDIRS= cam/ata cam/nvme cam/scsi \ dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/mmc dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ - dev/speaker dev/utopia dev/vkbd dev/wi \ + dev/speaker dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ Modified: head/lib/libc/net/getnameinfo.c ============================================================================== --- head/lib/libc/net/getnameinfo.c Mon Apr 24 20:46:19 2017 (r317382) +++ head/lib/libc/net/getnameinfo.c Mon Apr 24 21:21:49 2017 (r317383) @@ -455,7 +455,6 @@ getnameinfo_link(const struct afd *afd, host, hostlen); /* * The following have zero-length addresses. - * IFT_ATM (net/if_atmsubr.c) * IFT_GIF (net/if_gif.c) * IFT_LOOP (net/if_loop.c) * IFT_PPP (net/if_ppp.c, net/if_spppsubr.c) Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/rescue/rescue/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -101,10 +101,6 @@ CRUNCH_PROGS_sbin= badsect \ restore rcorder route savecore \ shutdown spppcontrol swapon sysctl tunefs umount -.if ${MK_ATM} != "no" -CRUNCH_PROGS_sbin+= atmconfig -.endif - .if ${MK_CCD} != "no" CRUNCH_PROGS_sbin+= ccdconfig .endif Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/sbin/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -70,7 +70,6 @@ SUBDIR=adjkerntz \ tunefs \ umount -SUBDIR.${MK_ATM}+= atm SUBDIR.${MK_CCD}+= ccdconfig SUBDIR.${MK_CXX}+= devd SUBDIR.${MK_HAST}+= hastctl Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/share/man/man4/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -144,7 +144,6 @@ MAN= aac.4 \ edsc.4 \ ehci.4 \ em.4 \ - en.4 \ enc.4 \ epair.4 \ esp.4 \ @@ -153,7 +152,6 @@ MAN= aac.4 \ etherswitch.4 \ eventtimers.4 \ exca.4 \ - fatm.4 \ fd.4 \ fdc.4 \ fdt.4 \ @@ -181,7 +179,6 @@ MAN= aac.4 \ gpioled.4 \ gre.4 \ h_ertt.4 \ - hatm.4 \ hifn.4 \ hme.4 \ hpet.4 \ @@ -307,8 +304,6 @@ MAN= aac.4 \ my.4 \ nand.4 \ nandsim.4 \ - natm.4 \ - natmip.4 \ ncr.4 \ ncv.4 \ ${_ndis.4} \ @@ -320,7 +315,6 @@ MAN= aac.4 \ ${_nfe.4} \ ${_nfsmb.4} \ ng_async.4 \ - ng_atm.4 \ ngatmbase.4 \ ng_atmllc.4 \ ng_bpf.4 \ @@ -397,7 +391,6 @@ MAN= aac.4 \ owc.4 \ ${_padlock.4} \ pass.4 \ - patm.4 \ pccard.4 \ pccbb.4 \ pcf.4 \ @@ -627,11 +620,9 @@ MLINKS+=disc.4 if_disc.4 MLINKS+=ed.4 if_ed.4 MLINKS+=edsc.4 if_edsc.4 MLINKS+=em.4 if_em.4 -MLINKS+=en.4 if_en.4 MLINKS+=enc.4 if_enc.4 MLINKS+=epair.4 if_epair.4 MLINKS+=et.4 if_et.4 -MLINKS+=fatm.4 if_fatm.4 MLINKS+=fd.4 stderr.4 \ fd.4 stdin.4 \ fd.4 stdout.4 @@ -645,7 +636,6 @@ MLINKS+=geom.4 GEOM.4 MLINKS+=gif.4 if_gif.4 MLINKS+=gpio.4 gpiobus.4 MLINKS+=gre.4 if_gre.4 -MLINKS+=hatm.4 if_hatm.4 MLINKS+=hme.4 if_hme.4 MLINKS+=hpet.4 acpi_hpet.4 MLINKS+=${_hptrr.4} ${_rr232x.4} @@ -695,7 +685,6 @@ MLINKS+=nge.4 if_nge.4 MLINKS+=${_ntb_hw.4} ${_ntb.4} MLINKS+=${_nxge.4} ${_if_nxge.4} MLINKS+=ow.4 onewire.4 -MLINKS+=patm.4 if_patm.4 MLINKS+=pccbb.4 cbb.4 MLINKS+=pcm.4 snd.4 \ pcm.4 sound.4 @@ -966,7 +955,6 @@ MAN+= \ usb_template.4 \ usfs.4 \ uslcom.4 \ - utopia.4 \ uvisor.4 \ uvscom.4 \ zyd.4 Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/boot/forth/loader.conf Mon Apr 24 21:21:49 2017 (r317383) @@ -327,16 +327,13 @@ if_de_load="NO" # DEC DC21x4x Ethernet if_ed_load="NO" # National Semiconductor DS8390/WD83C690 # Ethernet if_em_load="NO" # Intel(R) PRO/1000 Gigabit Ethernet -if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) if_et_load="NO" # Agere ET1310 10/100/Gigabit Ethernet if_ex_load="NO" # Intel EtherExpress Pro/10 Ethernet -if_fatm_load="NO" # Fore PCA200E ATM if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet # adapters if_fxp_load="NO" # Intel EtherExpress PRO/100B (82557, 82558) if_gem_load="NO" # Sun GEM/Sun ERI/Apple GMAC -if_hatm_load="NO" # Fore/Marconi HE155 and HE622 if_hme_load="NO" # Sun Microelectronics STP2002-STQ Ethernet if_ie_load="NO" # Intel 82586 if_ipw_load="NO" # Intel PRO/Wireless 2100 wireless @@ -360,7 +357,6 @@ if_my_load="NO" # Myson PCI Fast Ether if_nfe_load="NO" # NVIDIA nForce MCP Networking Adapter if_nge_load="NO" # National Semiconductor PCI Gigabit Ethernet if_nxge_load="NO" # Neterion Xframe 10Gb Ethernet -if_patm_load="NO" # IDT77252 ATM if_pcn_load="NO" # AMD PCnet PCI if_ral_load="NO" # Ralink Technology wireless if_re_load="NO" # RealTek 8139C+/8169/8169S/8110S @@ -395,7 +391,6 @@ if_wpi_load="NO" # Intel 3945ABG Wirele if_xe_load="NO" # Xircom CreditCard PCMCIA if_xl_load="NO" # 3Com Etherlink XL (3c900, 3c905, 3c905B) sfxge_load="NO" # Solarflare 10Gb Ethernet adapter driver -utopia_load="NO" # ATM PHY driver ############################################################## Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/conf/NOTES Mon Apr 24 21:21:49 2017 (r317383) @@ -2212,42 +2212,7 @@ device rtwnfw options MCLSHIFT=12 # mbuf cluster shift in bits, 12 == 4KB options MSIZE=512 # mbuf size in bytes -# -# ATM related options (Cranor version) -# (note: this driver cannot be used with the HARP ATM stack) -# -# The `en' device provides support for Efficient Networks (ENI) -# ENI-155 PCI midway cards, and the Adaptec 155Mbps PCI ATM cards (ANA-59x0). -# -# The `hatm' device provides support for Fore/Marconi HE155 and HE622 -# ATM PCI cards. -# -# The `fatm' device provides support for Fore PCA200E ATM PCI cards. -# -# The `patm' device provides support for IDT77252 based cards like -# ProSum's ProATM-155 and ProATM-25 and IDT's evaluation boards. -# -# atm device provides generic atm functions and is required for -# atm devices. -# NATM enables the netnatm protocol family that can be used to -# bypass TCP/IP. -# -# utopia provides the access to the ATM PHY chips and is required for en, -# hatm and fatm. -# -# the current driver supports only PVC operations (no atm-arp, no multicast). -# for more details, please read the original documents at -# http://www.ccrc.wustl.edu/pub/chuck/tech/bsdatm/bsdatm.html -# -device atm -device en -device fatm #Fore PCA200E -device hatm #Fore/Marconi HE155/622 -device patm #IDT77252 cards (ProATM and IDT) -device utopia #ATM PHY driver -options NATM #native ATM - -options LIBMBPOOL #needed by patm, iatm +options LIBMBPOOL # # Sound drivers Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/conf/config.mk Mon Apr 24 21:21:49 2017 (r317383) @@ -25,8 +25,6 @@ opt_ratelimit.h: .endif opt_mrouting.h: echo "#define MROUTING 1" > ${.TARGET} -opt_natm.h: - echo "#define NATM 1" > ${.TARGET} opt_printf.h: echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET} opt_scsi.h: @@ -38,7 +36,7 @@ opt_wlan.h: KERN_OPTS.i386=NEW_PCIB DEV_PCI KERN_OPTS.amd64=NEW_PCIB DEV_PCI KERN_OPTS.powerpc=NEW_PCIB DEV_PCI -KERN_OPTS=MROUTING NATM IEEE80211_DEBUG \ +KERN_OPTS=MROUTING IEEE80211_DEBUG \ IEEE80211_AMPDU_AGE IEEE80211_SUPPORT_MESH DEV_BPF \ ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA} .if ${MK_INET_SUPPORT} != "no" Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/conf/files Mon Apr 24 21:21:49 2017 (r317383) @@ -1579,8 +1579,6 @@ dev/e1000/e1000_mbx.c optional em \ dev/e1000/e1000_osdep.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/et/if_et.c optional et -dev/en/if_en_pci.c optional en pci -dev/en/midway.c optional en dev/ep/if_ep.c optional ep dev/ep/if_ep_isa.c optional ep isa dev/ep/if_ep_pccard.c optional ep pccard @@ -1636,7 +1634,6 @@ dev/extres/regulator/regnode_if.m option dev/extres/regulator/regulator.c optional ext_resources regulator fdt dev/extres/regulator/regulator_bus.c optional ext_resources regulator fdt dev/extres/regulator/regulator_fixed.c optional ext_resources regulator fdt -dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash @@ -1688,11 +1685,6 @@ dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio dev/gpio/gpiopps.c optional gpiopps dev/gpio/ofw_gpiobus.c optional fdt gpio -dev/hatm/if_hatm.c optional hatm pci -dev/hatm/if_hatm_intr.c optional hatm pci -dev/hatm/if_hatm_ioctl.c optional hatm pci -dev/hatm/if_hatm_rx.c optional hatm pci -dev/hatm/if_hatm_tx.c optional hatm pci dev/hifn/hifn7751.c optional hifn dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci @@ -2374,13 +2366,6 @@ dev/ow/owll_if.m optional ow dev/ow/own_if.m optional ow dev/ow/ow_temp.c optional ow_temp dev/ow/owc_gpiobus.c optional owc gpio -dev/patm/if_patm.c optional patm pci -dev/patm/if_patm_attach.c optional patm pci -dev/patm/if_patm_intr.c optional patm pci -dev/patm/if_patm_ioctl.c optional patm pci -dev/patm/if_patm_rtables.c optional patm pci -dev/patm/if_patm_rx.c optional patm pci -dev/patm/if_patm_tx.c optional patm pci dev/pbio/pbio.c optional pbio isa dev/pccard/card_if.m standard dev/pccard/pccard.c optional pccard @@ -3202,9 +3187,6 @@ dev/videomode/videomode.c optional vide dev/videomode/edid.c optional videomode dev/videomode/pickmode.c optional videomode dev/videomode/vesagtf.c optional videomode -dev/utopia/idtphy.c optional utopia -dev/utopia/suni.c optional utopia -dev/utopia/utopia.c optional utopia dev/vge/if_vge.c optional vge dev/viapm/viapm.c optional viapm pci dev/virtio/virtio.c optional virtio @@ -3884,7 +3866,6 @@ net/flowtable.c optional flowtable ine net/ieee8023ad_lacp.c optional lagg net/if.c standard net/if_arcsubr.c optional arcnet -net/if_atmsubr.c optional atm net/if_bridge.c optional bridge inet | if_bridge inet net/if_clone.c standard net/if_dead.c standard @@ -3981,7 +3962,6 @@ net80211/ieee80211_xauth.c optional wlan net80211/ieee80211_alq.c optional wlan ieee80211_alq netgraph/atm/ccatm/ng_ccatm.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" -netgraph/atm/ng_atm.c optional ngatm_atm netgraph/atm/ngatmbase.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/sscfu/ng_sscfu.c optional ngatm_sscfu \ @@ -4063,7 +4043,6 @@ netgraph/ng_vlan.c optional netgraph_vl netinet/accf_data.c optional accept_filter_data inet netinet/accf_dns.c optional accept_filter_dns inet netinet/accf_http.c optional accept_filter_http inet -netinet/if_atm.c optional atm netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet @@ -4188,9 +4167,6 @@ netipsec/xform_ipcomp.c optional ipsec netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | \ ipsec_support inet6 tcp_signature -netnatm/natm.c optional natm -netnatm/natm_pcb.c optional natm -netnatm/natm_proto.c optional natm netpfil/ipfw/dn_aqm_codel.c optional inet dummynet netpfil/ipfw/dn_aqm_pie.c optional inet dummynet netpfil/ipfw/dn_heap.c optional inet dummynet Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/conf/options Mon Apr 24 21:21:49 2017 (r317383) @@ -553,10 +553,6 @@ DRM_DEBUG opt_drm.h TI_SF_BUF_JUMBO opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h -# XXX Conflict: # of devices vs network protocol (Native ATM). -# This makes "atm.h" unusable. -NATM - # DPT driver debug flags DPT_MEASURE_PERFORMANCE opt_dpt.h DPT_RESET_HBA opt_dpt.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/modules/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -107,7 +107,6 @@ SUBDIR= \ ${_efirt} \ ${_elink} \ ${_em} \ - en \ ${_ep} \ ${_epic} \ esp \ @@ -116,7 +115,6 @@ SUBDIR= \ ${_ex} \ ${_exca} \ ext2fs \ - ${_fatm} \ fdc \ fdescfs \ ${_fe} \ @@ -130,7 +128,6 @@ SUBDIR= \ ${_glxiic} \ ${_glxsb} \ gpio \ - hatm \ hifn \ hme \ ${_hpt27xx} \ @@ -289,7 +286,6 @@ SUBDIR= \ ow \ ${_padlock} \ ${_padlock_rng} \ - patm \ ${_pccard} \ ${_pcfclock} \ pcn \ @@ -380,7 +376,6 @@ SUBDIR= \ uinput \ unionfs \ usb \ - utopia \ ${_vesa} \ ${_virtio} \ vge \ @@ -500,7 +495,6 @@ _pfsync= pfsync .if ${MK_SOURCELESS_UCODE} != "no" _bce= bce -_fatm= fatm _fxp= fxp _ispfw= ispfw _sf= sf Modified: head/sys/modules/netgraph/atm/Makefile ============================================================================== --- head/sys/modules/netgraph/atm/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/modules/netgraph/atm/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -1,7 +1,6 @@ # $FreeBSD$ SUBDIR= \ - atm \ atmbase \ ccatm \ sscfu \ Modified: head/sys/net/netisr.h ============================================================================== --- head/sys/net/netisr.h Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/net/netisr.h Mon Apr 24 21:21:49 2017 (r317383) @@ -55,7 +55,6 @@ #define NETISR_ARP 4 /* same as AF_LINK */ #define NETISR_ETHER 5 /* ethernet input */ #define NETISR_IPV6 6 -#define NETISR_NATM 7 #define NETISR_EPAIR 8 /* if_epair(4) */ #define NETISR_IP_DIRECT 9 /* direct-dispatch IPv4 */ #define NETISR_IPV6_DIRECT 10 /* direct-dispatch IPv6 */ Modified: head/sys/netgraph/ng_atmllc.c ============================================================================== --- head/sys/netgraph/ng_atmllc.c Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/netgraph/ng_atmllc.c Mon Apr 24 21:21:49 2017 (r317383) @@ -40,7 +40,6 @@ #include #include /* for M_HASFCS and ETHER_HDR_LEN */ -#include /* for struct atmllc */ #define NG_ATMLLC_HEADER "\252\252\3\0\200\302" #define NG_ATMLLC_HEADER_LEN (sizeof(struct atmllc)) @@ -55,6 +54,18 @@ struct ng_atmllc_priv { hook_p fddi; }; +struct atmllc { + uint8_t llchdr[6]; /* aa.aa.03.00.00.00 */ + uint8_t type[2]; /* "ethernet" type */ +}; + +/* ATM_LLC macros: note type code in host byte order */ +#define ATM_LLC_TYPE(X) (((X)->type[0] << 8) | ((X)->type[1])) +#define ATM_LLC_SETTYPE(X, V) do { \ + (X)->type[0] = ((V) >> 8) & 0xff; \ + (X)->type[1] = ((V) & 0xff); \ + } while (0) + /* Netgraph methods. */ static ng_constructor_t ng_atmllc_constructor; static ng_shutdown_t ng_atmllc_shutdown; Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Apr 24 20:46:19 2017 (r317382) +++ head/sys/sys/param.h Mon Apr 24 21:21:49 2017 (r317383) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200029 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200030 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/usr.sbin/bsnmpd/modules/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/usr.sbin/bsnmpd/modules/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -4,11 +4,7 @@ .PATH: ${SRCTOP}/contrib/bsnmp/snmpd -.if ${MK_ATM} != "no" -_snmp_atm= snmp_atm -.endif - -SUBDIR= ${_snmp_atm} \ +SUBDIR= \ snmp_bridge \ snmp_hostres \ snmp_lm75 \ Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Mon Apr 24 20:46:19 2017 (r317382) +++ head/usr.sbin/ppp/Makefile Mon Apr 24 21:21:49 2017 (r317383) @@ -13,7 +13,6 @@ SRCS= acf.c arp.c async.c auth.c bundle. WARNS?= 3 .if defined(RELEASE_CRUNCH) CFLAGS+=-DRELEASE_CRUNCH -PPP_NO_ATM= PPP_NO_DES= PPP_NO_KLDLOAD= PPP_NO_NAT= @@ -25,9 +24,6 @@ CONFS= ppp.conf CONFSDIR= ${CONFDIR}/ppp CONFSMODE= 600 -.if ${MK_ATM} == "no" -PPP_NO_ATM= -.endif .if ${MK_NETGRAPH} == "no" PPP_NO_NETGRAPH= .endif @@ -68,12 +64,6 @@ SRCS+= nat_cmd.c LIBADD+= alias .endif -.if defined(PPP_NO_ATM) -CFLAGS+=-DNOATM -.else -SRCS+= atm.c -.endif - .if defined(PPP_NO_SUID) CFLAGS+=-DNOSUID .else Modified: head/usr.sbin/ppp/physical.c ============================================================================== --- head/usr.sbin/ppp/physical.c Mon Apr 24 20:46:19 2017 (r317382) +++ head/usr.sbin/ppp/physical.c Mon Apr 24 21:21:49 2017 (r317383) @@ -102,9 +102,6 @@ #include "ether.h" #include "netgraph.h" #endif -#ifndef NOATM -#include "atm.h" -#endif #include "tcpmss.h" static int physical_DescriptorWrite(struct fdescriptor *, struct bundle *, @@ -133,10 +130,6 @@ struct { { ng_Create, ng_iov2device, ng_DeviceSize }, #endif #endif -#ifndef NOATM - /* Ditto for ATM devices */ - { atm_Create, atm_iov2device, atm_DeviceSize }, -#endif { tcp_Create, tcp_iov2device, tcp_DeviceSize }, { udp_Create, udp_iov2device, udp_DeviceSize }, { exec_Create, exec_iov2device, exec_DeviceSize } From owner-svn-src-head@freebsd.org Mon Apr 24 21:24: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 3FD75D4EABD; Mon, 24 Apr 2017 21:24:00 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D5EF111D; Mon, 24 Apr 2017 21:23:59 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 0FDE35A9F15; Mon, 24 Apr 2017 21:23:58 +0000 (UTC) Date: Mon, 24 Apr 2017 21:23:58 +0000 From: Brooks Davis To: Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... Message-ID: <20170424212358.GB83491@spindle.one-eyed-alien.net> References: <201704242121.v3OLLoR2082346@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <201704242121.v3OLLoR2082346@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-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, 24 Apr 2017 21:24:00 -0000 --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 24, 2017 at 09:21:50PM +0000, Brooks Davis wrote: > Author: brooks > Date: Mon Apr 24 21:21:49 2017 > New Revision: 317383 > URL: https://svnweb.freebsd.org/changeset/base/317383 >=20 > Log: > Remove the NATM framework including the en(4), fatm(4), hatm(4), and > patm(4) devices. > =20 > Maintaining an address family and framework has real costs when we make > infrastructure improvements. In the case of NATM we support no devices > manufactured in the last 20 years and some will not even work in modern > motherboards (some newer devices that patm(4) could be updated to > support apparently exist, but we do not currently have support). > =20 > With this change, support remains for some netgraph modules that don't > require NATM support code. It is unclear if all these should remain, > though ng_atmllc certainly stands alone. > =20 > Note well: FreeBSD 11 supports NATM and will continue to do so until at > least September 30, 2021. Improvements to the code in FreeBSD 11 are > certainly welcome. > =20 > Reviewed by: philip > Approved by: harti Should have included: Differential revision: https://reviews.freebsd.org/D9883 -- Brooks --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJY/mztAAoJEKzQXbSebgfAgAwIAIJkqt0EwulmYYulat2EXJvn E/xN5R5YeS8i3p7KYXn+5u+RUqpT27LhC76JZfz9pLEYZHLMyoarJii/Vs9xjlAY WbQ1L4U/Q2llIdhfNEtqQo8ff3wLB5fc57S4bqxL0Joge3iKoDNHRbfXJUSadW2k v1WhZep3sR8DZnHgt7zqBCzbF/hzhYZQ/idFSGbymoeJ5pwCV1PprxglEDetV5YG /o6IEQ0By9hlA5rcaR9RgbEX3pOaKGozY1FhGLavfdw6iU0af0fn4QnHyJzOI3GV 0Acxl3mkv0p2z/EdfN2APh7yA8JC3OdwO81g0ZPfKV+yYB2wcd0S/fS6/eDaJ+Y= =l7s3 -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3-- From owner-svn-src-head@freebsd.org Mon Apr 24 21:27: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 DB197D4EC5E; Mon, 24 Apr 2017 21:27:38 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB7D71464; Mon, 24 Apr 2017 21:27:38 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OLRb5t083491; Mon, 24 Apr 2017 21:27:37 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OLRbOi083490; Mon, 24 Apr 2017 21:27:37 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704242127.v3OLRbOi083490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 24 Apr 2017 21:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317384 - 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, 24 Apr 2017 21:27:39 -0000 Author: brooks Date: Mon Apr 24 21:27:37 2017 New Revision: 317384 URL: https://svnweb.freebsd.org/changeset/base/317384 Log: Document the removal of NATM. Relnotes: yes Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Apr 24 21:21:49 2017 (r317383) +++ head/UPDATING Mon Apr 24 21:27:37 2017 (r317384) @@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170424: + The NATM framework including the en(4), fatm(4), hatm(4), and + patm(4) devices has been removed. Consumers should plan a + migration before the end-of-life date for FreeBSD 11. + 20170420: GNU diff has been replaced by a BSD licensed diff. Some features of GNU diff has not been implemented, if those are needed a newer version of From owner-svn-src-head@freebsd.org Mon Apr 24 21:31: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 46765D4EE14; Mon, 24 Apr 2017 21:31:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 136A41809; Mon, 24 Apr 2017 21:31:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OLVSAR084353; Mon, 24 Apr 2017 21:31:28 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OLVS7V084352; Mon, 24 Apr 2017 21:31:28 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704242131.v3OLVS7V084352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 24 Apr 2017 21:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317385 - head/usr.bin/getaddrinfo 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, 24 Apr 2017 21:31:29 -0000 Author: brooks Date: Mon Apr 24 21:31:27 2017 New Revision: 317385 URL: https://svnweb.freebsd.org/changeset/base/317385 Log: Clean up Makefile. Prefer SRCTOP vs .CURDIR relative paths. Find libnetbsd using LIBADD infrastructure rather than manual hackery. Reviewed by: ngie, bapt Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10461 Modified: head/usr.bin/getaddrinfo/Makefile Modified: head/usr.bin/getaddrinfo/Makefile ============================================================================== --- head/usr.bin/getaddrinfo/Makefile Mon Apr 24 21:27:37 2017 (r317384) +++ head/usr.bin/getaddrinfo/Makefile Mon Apr 24 21:31:27 2017 (r317385) @@ -3,19 +3,15 @@ .include PROG= getaddrinfo +SRCS= getaddrinfo.c tables.h -CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd -LIBNETBSDDIR= ${.OBJDIR}/../../lib/libnetbsd -LIBNETBSD= ${LIBNETBSDDIR}/libnetbsd.a -DPADD+= ${LIBNETBSD} -LDADD+= ${LIBNETBSD} +CFLAGS+= -I${SRCTOP}/lib/libnetbsd -LIBADD+= util +LIBADD+= netbsd util -SYS_SOCKET_H?= ${.CURDIR}/../../sys/sys/socket.h +SYS_SOCKET_H?= ${SRCTOP}/sys/sys/socket.h -CFLAGS+= -I. -DPSRCS+= tables.h +CFLAGS+= -I${.OBJDIR} CLEANFILES+= tables.h tables.h: tables.awk ${SYS_SOCKET_H} LC_ALL=C awk -f ${.ALLSRC} > ${.TARGET} From owner-svn-src-head@freebsd.org Mon Apr 24 21:56: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 5C080D4E695; Mon, 24 Apr 2017 21:56:01 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B728D6A; Mon, 24 Apr 2017 21:56:01 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OLu07G095517; Mon, 24 Apr 2017 21:56:00 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OLu0QV095516; Mon, 24 Apr 2017 21:56:00 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704242156.v3OLu0QV095516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 24 Apr 2017 21:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317388 - head/usr.sbin/ntp/sntp 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, 24 Apr 2017 21:56:01 -0000 Author: brooks Date: Mon Apr 24 21:55:59 2017 New Revision: 317388 URL: https://svnweb.freebsd.org/changeset/base/317388 Log: Use the approved syntax to build no man pages. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/usr.sbin/ntp/sntp/Makefile Modified: head/usr.sbin/ntp/sntp/Makefile ============================================================================== --- head/usr.sbin/ntp/sntp/Makefile Mon Apr 24 21:41:04 2017 (r317387) +++ head/usr.sbin/ntp/sntp/Makefile Mon Apr 24 21:55:59 2017 (r317388) @@ -5,7 +5,7 @@ .PATH: ${SRCTOP}/contrib/ntp/sntp PROG= sntp -MK_MAN= no +MAN= SRCS= crypto.c kod_management.c log.c main.c networking.c \ sntp-opts.c sntp.c utilities.c From owner-svn-src-head@freebsd.org Mon Apr 24 22:31: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 612CBD4E150; Mon, 24 Apr 2017 22:31:58 +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 25B9014A9; Mon, 24 Apr 2017 22:31:58 +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 v3OMVvwq008777; Mon, 24 Apr 2017 22:31:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OMVvlj008776; Mon, 24 Apr 2017 22:31:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704242231.v3OMVvlj008776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 24 Apr 2017 22:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317389 - 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: Mon, 24 Apr 2017 22:31:58 -0000 Author: np Date: Mon Apr 24 22:31:56 2017 New Revision: 317389 URL: https://svnweb.freebsd.org/changeset/base/317389 Log: Frames that are not considered for LRO should not be counted in LRO statistics. Reviewed by: gnn@, hselasky@, gallatin@ MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D10430 Modified: head/sys/netinet/tcp_lro.c Modified: head/sys/netinet/tcp_lro.c ============================================================================== --- head/sys/netinet/tcp_lro.c Mon Apr 24 21:55:59 2017 (r317388) +++ head/sys/netinet/tcp_lro.c Mon Apr 24 22:31:56 2017 (r317389) @@ -953,8 +953,6 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, /* check if packet is not LRO capable */ if (__predict_false(mb->m_pkthdr.csum_flags == 0 || (lc->ifp->if_capenable & IFCAP_LRO) == 0)) { - lc->lro_flushed++; - lc->lro_queued++; /* input packet to network layer */ (*lc->ifp->if_input) (lc->ifp, mb); From owner-svn-src-head@freebsd.org Mon Apr 24 22:35: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 9A0EED4E20B; Mon, 24 Apr 2017 22:35:01 +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 6C4001714; Mon, 24 Apr 2017 22:35:01 +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 v3OMZ0Ar011915; Mon, 24 Apr 2017 22:35:00 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OMZ0vO011914; Mon, 24 Apr 2017 22:35:00 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704242235.v3OMZ0vO011914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 24 Apr 2017 22:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317390 - 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: Mon, 24 Apr 2017 22:35:01 -0000 Author: np Date: Mon Apr 24 22:35:00 2017 New Revision: 317390 URL: https://svnweb.freebsd.org/changeset/base/317390 Log: Flush the LRO ctrl as soon as lro_mbufs fills up. There is no need to wait for the next enqueue from the driver. Reviewed by: gnn@, hselasky@, gallatin@ MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D10432 Modified: head/sys/netinet/tcp_lro.c Modified: head/sys/netinet/tcp_lro.c ============================================================================== --- head/sys/netinet/tcp_lro.c Mon Apr 24 22:31:56 2017 (r317389) +++ head/sys/netinet/tcp_lro.c Mon Apr 24 22:35:00 2017 (r317390) @@ -959,10 +959,6 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, return; } - /* check if array is full */ - if (__predict_false(lc->lro_mbuf_count == lc->lro_mbuf_max)) - tcp_lro_flush_all(lc); - /* create sequence number */ lc->lro_mbuf_data[lc->lro_mbuf_count].seq = (((uint64_t)M_HASHTYPE_GET(mb)) << 56) | @@ -970,7 +966,11 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, ((uint64_t)lc->lro_mbuf_count); /* enter mbuf */ - lc->lro_mbuf_data[lc->lro_mbuf_count++].mb = mb; + lc->lro_mbuf_data[lc->lro_mbuf_count].mb = mb; + + /* flush if array is full */ + if (__predict_false(++lc->lro_mbuf_count == lc->lro_mbuf_max)) + tcp_lro_flush_all(lc); } /* end */ From owner-svn-src-head@freebsd.org Mon Apr 24 23:38: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 74D3DD4E4D0; Mon, 24 Apr 2017 23:38:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50F29B7C; Mon, 24 Apr 2017 23:38:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3ONc8s0058883; Mon, 24 Apr 2017 16:38:08 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3ONc7KA058882; Mon, 24 Apr 2017 16:38:07 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704242338.v3ONc7KA058882@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... In-Reply-To: <20170424212358.GB83491@spindle.one-eyed-alien.net> To: Brooks Davis Date: Mon, 24 Apr 2017 16:38:07 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 24 Apr 2017 23:38:12 -0000 -- Start of PGP signed section. > On Mon, Apr 24, 2017 at 09:21:50PM +0000, Brooks Davis wrote: > > Author: brooks > > Date: Mon Apr 24 21:21:49 2017 > > New Revision: 317383 > > URL: https://svnweb.freebsd.org/changeset/base/317383 > > > > Log: > > Remove the NATM framework including the en(4), fatm(4), hatm(4), and > > patm(4) devices. > > > > Maintaining an address family and framework has real costs when we make > > infrastructure improvements. In the case of NATM we support no devices > > manufactured in the last 20 years and some will not even work in modern > > motherboards (some newer devices that patm(4) could be updated to > > support apparently exist, but we do not currently have support). > > > > With this change, support remains for some netgraph modules that don't > > require NATM support code. It is unclear if all these should remain, > > though ng_atmllc certainly stands alone. > > > > Note well: FreeBSD 11 supports NATM and will continue to do so until at > > least September 30, 2021. Improvements to the code in FreeBSD 11 are > > certainly welcome. > > > > Reviewed by: philip > > Approved by: harti > > Should have included: > > Differential revision: https://reviews.freebsd.org/D9883 Should have further included: Release Notes: yes -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Apr 25 00:21: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 46E11D4D94A; Tue, 25 Apr 2017 00:21:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A3E61974; Tue, 25 Apr 2017 00:21:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3P0L3gD059034; Mon, 24 Apr 2017 17:21:03 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3P0L3t1059033; Mon, 24 Apr 2017 17:21:03 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704250021.v3P0L3t1059033@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... In-Reply-To: <201704242338.v3ONc7KA058882@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org Date: Mon, 24 Apr 2017 17:21:03 -0700 (PDT) CC: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 00:21:05 -0000 > -- Start of PGP signed section. > > On Mon, Apr 24, 2017 at 09:21:50PM +0000, Brooks Davis wrote: > > > Author: brooks > > > Date: Mon Apr 24 21:21:49 2017 > > > New Revision: 317383 > > > URL: https://svnweb.freebsd.org/changeset/base/317383 > > > > > > Log: > > > Remove the NATM framework including the en(4), fatm(4), hatm(4), and > > > patm(4) devices. > > > > > > Maintaining an address family and framework has real costs when we make > > > infrastructure improvements. In the case of NATM we support no devices > > > manufactured in the last 20 years and some will not even work in modern > > > motherboards (some newer devices that patm(4) could be updated to > > > support apparently exist, but we do not currently have support). > > > > > > With this change, support remains for some netgraph modules that don't > > > require NATM support code. It is unclear if all these should remain, > > > though ng_atmllc certainly stands alone. > > > > > > Note well: FreeBSD 11 supports NATM and will continue to do so until at > > > least September 30, 2021. Improvements to the code in FreeBSD 11 are > > > certainly welcome. > > > > > > Reviewed by: philip > > > Approved by: harti > > > > Should have included: > > > > Differential revision: https://reviews.freebsd.org/D9883 > > Should have further included: > Release Notes: yes Ignore me I see you got it on your change to Updating. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Apr 25 01:09: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 07E93D4C821; Tue, 25 Apr 2017 01:09:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B101A681; Tue, 25 Apr 2017 01:09:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22e.google.com with SMTP id y33so128589267qta.2; Mon, 24 Apr 2017 18:09:06 -0700 (PDT) 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=dwiez96fLdpXkw022AZGbz5X3wlwaXLM+gQ/4VrPiXE=; b=Jgolv+0H9J7JshypgNCk1IbCTRiWNL6U0af/iQh7mynEfArc7qMPw8X0FrIWYZgN8r eWNO1VcATU0MmRHwpHIT5SOxh8ZHrZjHVUem5dYRHWJsUL7vRxm9ZZ1VOAzwBKIP7ldk 8dUzQmmeuBt3fAN+69YusyvidjgPTVrfxx9SGk0ZcpvZd30iDSAkUR7e+Zuag4TNqjn8 lFIupDBwUhpdLltYxvRNz43U48QViPtgpQwRDnOxxWb0hpFGTQuaPfTppJlWsLsSCyVn krXlX8fry4yL+P1gMFfAtBZbUsyJ8bHBKsu1W/w2xQTC3HCYhKHfzrAhXVtZ/52BSSDA +Hkg== 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=dwiez96fLdpXkw022AZGbz5X3wlwaXLM+gQ/4VrPiXE=; b=H/XHadFoagO2HJKWxYpTAEBbq8JU4bcSrbTq28XormQrSi0/0i6P7P5ny6CitA8Q1C LslljuXr8E4pGgJETzq2SkIfkBLJijZlsnyXhH4EEfvuV8/9M8xP7zCJIEwZbZWDbtv1 lBNhjFwbTkrEiC56SW8Z6rHGS2iNheNrc3O/6o8JsLV0k9a+2fg2gxqCoxeNYxWeqM9F h5rMffqAGl0Ni4s4GQ5CQIYovWdPqQon1wPclJaKRVqv4F6ubjDwrnUS5v+3S7IQ7HAo Tw8+lKa4r1J9rFWkcd3nQMdiCD2hGqKeDoBVoDE9h7oDi63VqckjMcLcqGgq5vlT2HkF nlBA== X-Gm-Message-State: AN3rC/6OPaRNHw51jjmlqL3ap0O7/6LhoXl1N50pKjoAV3COevWvpUD4 psg5HYUKXKwzivPLhyqhPBLUVuOI92wJ X-Received: by 10.200.50.48 with SMTP id x45mr30416700qta.246.1493082545586; Mon, 24 Apr 2017 18:09:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.83 with HTTP; Mon, 24 Apr 2017 18:09:05 -0700 (PDT) In-Reply-To: <201704250021.v3P0L3t1059033@pdx.rh.CN85.dnsmgr.net> References: <201704242338.v3ONc7KA058882@pdx.rh.CN85.dnsmgr.net> <201704250021.v3P0L3t1059033@pdx.rh.CN85.dnsmgr.net> From: Ngie Cooper Date: Mon, 24 Apr 2017 18:09:05 -0700 Message-ID: Subject: Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... To: "Rodney W. Grimes" Cc: Brooks Davis , "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: Tue, 25 Apr 2017 01:09:07 -0000 On Mon, Apr 24, 2017 at 5:21 PM, Rodney W. Grimes wrote: ... > Ignore me I see you got it on your change to Updating. `Relnotes: yes` and adding UPDATING entries are complementary IMHO. UPDATING is meant more for those who upgrade via src (might contain workarounds, etc), whereas `Relnotes: yes` targets release notes, which can be used by those doing a binary or src based upgrade. Thanks for catching this! -Ngie From owner-svn-src-head@freebsd.org Tue Apr 25 03:29: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 DC775D4E8C5; Tue, 25 Apr 2017 03:29:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FB66660; Tue, 25 Apr 2017 03:29:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3P3TZ3B032051; Tue, 25 Apr 2017 03:29:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3P3TZY8032050; Tue, 25 Apr 2017 03:29:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201704250329.v3P3TZY8032050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 25 Apr 2017 03:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317396 - head/contrib/less 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, 25 Apr 2017 03:29:37 -0000 Author: delphij Date: Tue Apr 25 03:29:35 2017 New Revision: 317396 URL: https://svnweb.freebsd.org/changeset/base/317396 Log: Note r317395 as merged. Modified: Directory Properties: head/contrib/less/ (props changed) From owner-svn-src-head@freebsd.org Tue Apr 25 08:30: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 29FFED4EC5B; Tue, 25 Apr 2017 08:30:30 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0CE11CB3; Tue, 25 Apr 2017 08:30:29 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3P8USId068892; Tue, 25 Apr 2017 08:30:28 GMT (envelope-from zec@FreeBSD.org) Received: (from zec@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3P8USKR068891; Tue, 25 Apr 2017 08:30:28 GMT (envelope-from zec@FreeBSD.org) Message-Id: <201704250830.v3P8USKR068891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zec set sender to zec@FreeBSD.org using -f From: Marko Zec Date: Tue, 25 Apr 2017 08:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317399 - head/sys/netpfil/pf 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, 25 Apr 2017 08:30:30 -0000 Author: zec Date: Tue Apr 25 08:30:28 2017 New Revision: 317399 URL: https://svnweb.freebsd.org/changeset/base/317399 Log: Since curvnet is already properly set on entry to event handlers, there's no need to override it, particularly not unconditionally with vnet0. Submitted by: Peter Blok Reviewed by: kp Modified: head/sys/netpfil/pf/pf_if.c Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Tue Apr 25 03:43:06 2017 (r317398) +++ head/sys/netpfil/pf/pf_if.c Tue Apr 25 08:30:28 2017 (r317399) @@ -89,9 +89,9 @@ static int pfi_skip_if(const char *, st static int pfi_unmask(void *); static void pfi_attach_ifnet_event(void * __unused, struct ifnet *); static void pfi_detach_ifnet_event(void * __unused, struct ifnet *); -static void pfi_attach_group_event(void *, struct ifg_group *); -static void pfi_change_group_event(void *, char *); -static void pfi_detach_group_event(void *, struct ifg_group *); +static void pfi_attach_group_event(void * __unused, struct ifg_group *); +static void pfi_change_group_event(void * __unused, char *); +static void pfi_detach_group_event(void * __unused, struct ifg_group *); static void pfi_ifaddr_event(void * __unused, struct ifnet *); RB_HEAD(pfi_ifhead, pfi_kif); @@ -143,11 +143,11 @@ pfi_initialize(void) pfi_detach_cookie = EVENTHANDLER_REGISTER(ifnet_departure_event, pfi_detach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); pfi_attach_group_cookie = EVENTHANDLER_REGISTER(group_attach_event, - pfi_attach_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_attach_group_event, NULL, EVENTHANDLER_PRI_ANY); pfi_change_group_cookie = EVENTHANDLER_REGISTER(group_change_event, - pfi_change_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_change_group_event, NULL, EVENTHANDLER_PRI_ANY); pfi_detach_group_cookie = EVENTHANDLER_REGISTER(group_detach_event, - pfi_detach_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_detach_group_event, NULL, EVENTHANDLER_PRI_ANY); pfi_ifaddr_event_cookie = EVENTHANDLER_REGISTER(ifaddr_event, pfi_ifaddr_event, NULL, EVENTHANDLER_PRI_ANY); } @@ -800,10 +800,8 @@ static void pfi_attach_ifnet_event(void *arg __unused, struct ifnet *ifp) { - CURVNET_SET(ifp->if_vnet); if (V_pf_vnet_active == 0) { /* Avoid teardown race in the least expensive way. */ - CURVNET_RESTORE(); return; } pfi_attach_ifnet(ifp); @@ -812,7 +810,6 @@ pfi_attach_ifnet_event(void *arg __unuse pf_altq_ifnet_event(ifp, 0); PF_RULES_WUNLOCK(); #endif - CURVNET_RESTORE(); } static void @@ -823,10 +820,8 @@ pfi_detach_ifnet_event(void *arg __unuse if (kif == NULL) return; - CURVNET_SET(ifp->if_vnet); if (V_pf_vnet_active == 0) { /* Avoid teardown race in the least expensive way. */ - CURVNET_RESTORE(); return; } PF_RULES_WLOCK(); @@ -839,32 +834,26 @@ pfi_detach_ifnet_event(void *arg __unuse pf_altq_ifnet_event(ifp, 1); #endif PF_RULES_WUNLOCK(); - CURVNET_RESTORE(); } static void -pfi_attach_group_event(void *arg , struct ifg_group *ifg) +pfi_attach_group_event(void *arg __unused, struct ifg_group *ifg) { - CURVNET_SET((struct vnet *)arg); if (V_pf_vnet_active == 0) { /* Avoid teardown race in the least expensive way. */ - CURVNET_RESTORE(); return; } pfi_attach_ifgroup(ifg); - CURVNET_RESTORE(); } static void -pfi_change_group_event(void *arg, char *gname) +pfi_change_group_event(void *arg __unused, char *gname) { struct pfi_kif *kif; - CURVNET_SET((struct vnet *)arg); if (V_pf_vnet_active == 0) { /* Avoid teardown race in the least expensive way. */ - CURVNET_RESTORE(); return; } @@ -874,21 +863,18 @@ pfi_change_group_event(void *arg, char * kif = pfi_kif_attach(kif, gname); pfi_kif_update(kif); PF_RULES_WUNLOCK(); - CURVNET_RESTORE(); } static void -pfi_detach_group_event(void *arg, struct ifg_group *ifg) +pfi_detach_group_event(void *arg __unused, struct ifg_group *ifg) { struct pfi_kif *kif = (struct pfi_kif *)ifg->ifg_pf_kif; if (kif == NULL) return; - CURVNET_SET((struct vnet *)arg); if (V_pf_vnet_active == 0) { /* Avoid teardown race in the least expensive way. */ - CURVNET_RESTORE(); return; } PF_RULES_WLOCK(); @@ -897,7 +883,6 @@ pfi_detach_group_event(void *arg, struct kif->pfik_group = NULL; ifg->ifg_pf_kif = NULL; PF_RULES_WUNLOCK(); - CURVNET_RESTORE(); } static void @@ -906,10 +891,8 @@ pfi_ifaddr_event(void *arg __unused, str if (ifp->if_pf_kif == NULL) return; - CURVNET_SET(ifp->if_vnet); if (V_pf_vnet_active == 0) { /* Avoid teardown race in the least expensive way. */ - CURVNET_RESTORE(); return; } PF_RULES_WLOCK(); @@ -918,5 +901,4 @@ pfi_ifaddr_event(void *arg __unused, str pfi_kif_update(ifp->if_pf_kif); } PF_RULES_WUNLOCK(); - CURVNET_RESTORE(); } From owner-svn-src-head@freebsd.org Tue Apr 25 08:34: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 B4C07D4EFE7; Tue, 25 Apr 2017 08:34:40 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77DBE34D; Tue, 25 Apr 2017 08:34:40 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3P8YdDm072681; Tue, 25 Apr 2017 08:34:39 GMT (envelope-from zec@FreeBSD.org) Received: (from zec@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3P8YdXN072680; Tue, 25 Apr 2017 08:34:39 GMT (envelope-from zec@FreeBSD.org) Message-Id: <201704250834.v3P8YdXN072680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zec set sender to zec@FreeBSD.org using -f From: Marko Zec Date: Tue, 25 Apr 2017 08:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317400 - head/sys/netpfil/pf 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, 25 Apr 2017 08:34:40 -0000 Author: zec Date: Tue Apr 25 08:34:39 2017 New Revision: 317400 URL: https://svnweb.freebsd.org/changeset/base/317400 Log: Fix VNET leakages in PF by V_irtualizing pfr_ktables and friends. Apparently this resolves a PF-triggered panic when destroying VNET jails. Submitted by: Peter Blok Reviewed by: kp Modified: head/sys/netpfil/pf/pf_table.c Modified: head/sys/netpfil/pf/pf_table.c ============================================================================== --- head/sys/netpfil/pf/pf_table.c Tue Apr 25 08:30:28 2017 (r317399) +++ head/sys/netpfil/pf/pf_table.c Tue Apr 25 08:34:39 2017 (r317400) @@ -184,9 +184,14 @@ static struct pfr_kentry static RB_PROTOTYPE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); static RB_GENERATE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); -struct pfr_ktablehead pfr_ktables; -struct pfr_table pfr_nulltable; -int pfr_ktable_cnt; +static VNET_DEFINE(struct pfr_ktablehead, pfr_ktables); +#define V_pfr_ktables VNET(pfr_ktables) + +static VNET_DEFINE(struct pfr_table, pfr_nulltable); +#define V_pfr_nulltable VNET(pfr_nulltable) + +static VNET_DEFINE(int, pfr_ktable_cnt); +#define V_pfr_ktable_cnt VNET(pfr_ktable_cnt) void pfr_initialize(void) @@ -256,7 +261,7 @@ pfr_add_addrs(struct pfr_table *tbl, str return (ESRCH); if (kt->pfrkt_flags & PFR_TFLAG_CONST) return (EPERM); - tmpkt = pfr_create_ktable(&pfr_nulltable, 0, 0); + tmpkt = pfr_create_ktable(&V_pfr_nulltable, 0, 0); if (tmpkt == NULL) return (ENOMEM); SLIST_INIT(&workq); @@ -408,7 +413,7 @@ pfr_set_addrs(struct pfr_table *tbl, str return (ESRCH); if (kt->pfrkt_flags & PFR_TFLAG_CONST) return (EPERM); - tmpkt = pfr_create_ktable(&pfr_nulltable, 0, 0); + tmpkt = pfr_create_ktable(&V_pfr_nulltable, 0, 0); if (tmpkt == NULL) return (ENOMEM); pfr_mark_addrs(kt); @@ -1083,7 +1088,7 @@ pfr_clr_tables(struct pfr_table *filter, return (ENOENT); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (!strcmp(p->pfrkt_anchor, PF_RESERVED_ANCHOR)) @@ -1118,7 +1123,7 @@ pfr_add_tables(struct pfr_table *tbl, in flags & PFR_FLAG_USERIOCTL)) senderr(EINVAL); key.pfrkt_flags |= PFR_TFLAG_ACTIVE; - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p == NULL) { p = pfr_create_ktable(&key.pfrkt_t, tzero, 1); if (p == NULL) @@ -1134,7 +1139,7 @@ pfr_add_tables(struct pfr_table *tbl, in /* find or create root table */ bzero(key.pfrkt_anchor, sizeof(key.pfrkt_anchor)); - r = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + r = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (r != NULL) { p->pfrkt_root = r; goto _skip; @@ -1190,7 +1195,7 @@ pfr_del_tables(struct pfr_table *tbl, in if (pfr_validate_table(&key.pfrkt_t, 0, flags & PFR_FLAG_USERIOCTL)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p != NULL && (p->pfrkt_flags & PFR_TFLAG_ACTIVE)) { SLIST_FOREACH(q, &workq, pfrkt_workq) if (!pfr_ktable_compare(p, q)) @@ -1229,7 +1234,7 @@ pfr_get_tables(struct pfr_table *filter, *size = n; return (0); } - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (n-- <= 0) @@ -1264,7 +1269,7 @@ pfr_get_tstats(struct pfr_table *filter, return (0); } SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (n-- <= 0) @@ -1296,7 +1301,7 @@ pfr_clr_tstats(struct pfr_table *tbl, in bcopy(tbl + i, &key.pfrkt_t, sizeof(key.pfrkt_t)); if (pfr_validate_table(&key.pfrkt_t, 0, 0)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p != NULL) { SLIST_INSERT_HEAD(&workq, p, pfrkt_workq); xzero++; @@ -1328,7 +1333,7 @@ pfr_set_tflags(struct pfr_table *tbl, in if (pfr_validate_table(&key.pfrkt_t, 0, flags & PFR_FLAG_USERIOCTL)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p != NULL && (p->pfrkt_flags & PFR_TFLAG_ACTIVE)) { p->pfrkt_nflags = (p->pfrkt_flags | setflag) & ~clrflag; @@ -1370,7 +1375,7 @@ pfr_ina_begin(struct pfr_table *trs, u_i if (rs == NULL) return (ENOMEM); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1415,7 +1420,7 @@ pfr_ina_define(struct pfr_table *tbl, st return (EBUSY); tbl->pfrt_flags |= PFR_TFLAG_INACTIVE; SLIST_INIT(&tableq); - kt = RB_FIND(pfr_ktablehead, &pfr_ktables, (struct pfr_ktable *)tbl); + kt = RB_FIND(pfr_ktablehead, &V_pfr_ktables, (struct pfr_ktable *)tbl); if (kt == NULL) { kt = pfr_create_ktable(tbl, 0, 1); if (kt == NULL) @@ -1428,7 +1433,7 @@ pfr_ina_define(struct pfr_table *tbl, st /* find or create root table */ bzero(&key, sizeof(key)); strlcpy(key.pfrkt_name, tbl->pfrt_name, sizeof(key.pfrkt_name)); - rt = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + rt = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (rt != NULL) { kt->pfrkt_root = rt; goto _skip; @@ -1505,7 +1510,7 @@ pfr_ina_rollback(struct pfr_table *trs, if (rs == NULL || !rs->topen || ticket != rs->tticket) return (0); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1541,7 +1546,7 @@ pfr_ina_commit(struct pfr_table *trs, u_ return (EBUSY); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1687,7 +1692,7 @@ pfr_table_count(struct pfr_table *filter PF_RULES_ASSERT(); if (flags & PFR_FLAG_ALLRSETS) - return (pfr_ktable_cnt); + return (V_pfr_ktable_cnt); if (filter->pfrt_anchor[0]) { rs = pf_find_ruleset(filter->pfrt_anchor); return ((rs != NULL) ? rs->tables : -1); @@ -1720,8 +1725,8 @@ pfr_insert_ktable(struct pfr_ktable *kt) PF_RULES_WASSERT(); - RB_INSERT(pfr_ktablehead, &pfr_ktables, kt); - pfr_ktable_cnt++; + RB_INSERT(pfr_ktablehead, &V_pfr_ktables, kt); + V_pfr_ktable_cnt++; if (kt->pfrkt_root != NULL) if (!kt->pfrkt_root->pfrkt_refcnt[PFR_REFCNT_ANCHOR]++) pfr_setflags_ktable(kt->pfrkt_root, @@ -1752,14 +1757,14 @@ pfr_setflags_ktable(struct pfr_ktable *k if (!(newf & PFR_TFLAG_ACTIVE)) newf &= ~PFR_TFLAG_USRMASK; if (!(newf & PFR_TFLAG_SETMASK)) { - RB_REMOVE(pfr_ktablehead, &pfr_ktables, kt); + RB_REMOVE(pfr_ktablehead, &V_pfr_ktables, kt); if (kt->pfrkt_root != NULL) if (!--kt->pfrkt_root->pfrkt_refcnt[PFR_REFCNT_ANCHOR]) pfr_setflags_ktable(kt->pfrkt_root, kt->pfrkt_root->pfrkt_flags & ~PFR_TFLAG_REFDANCHOR); pfr_destroy_ktable(kt, 1); - pfr_ktable_cnt--; + V_pfr_ktable_cnt--; return; } if (!(newf & PFR_TFLAG_ACTIVE) && kt->pfrkt_cnt) { @@ -1880,7 +1885,7 @@ static struct pfr_ktable * pfr_lookup_table(struct pfr_table *tbl) { /* struct pfr_ktable start like a struct pfr_table */ - return (RB_FIND(pfr_ktablehead, &pfr_ktables, + return (RB_FIND(pfr_ktablehead, &V_pfr_ktables, (struct pfr_ktable *)tbl)); } From owner-svn-src-head@freebsd.org Tue Apr 25 10:29: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 15F15D4FEBD; Tue, 25 Apr 2017 10:29:10 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA89D397; Tue, 25 Apr 2017 10:29:09 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3PAT8QU017326; Tue, 25 Apr 2017 10:29:08 GMT (envelope-from dfr@FreeBSD.org) Received: (from dfr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PAT8tw017325; Tue, 25 Apr 2017 10:29:08 GMT (envelope-from dfr@FreeBSD.org) Message-Id: <201704251029.v3PAT8tw017325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dfr set sender to dfr@FreeBSD.org using -f From: Doug Rabson Date: Tue, 25 Apr 2017 10:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317402 - head/lib/librpcsec_gss 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, 25 Apr 2017 10:29:10 -0000 Author: dfr Date: Tue Apr 25 10:29:08 2017 New Revision: 317402 URL: https://svnweb.freebsd.org/changeset/base/317402 Log: Fix a potential problem where we might try to shift by more than 31 bits CID: 1198859 Modified: head/lib/librpcsec_gss/svc_rpcsec_gss.c Modified: head/lib/librpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- head/lib/librpcsec_gss/svc_rpcsec_gss.c Tue Apr 25 09:08:44 2017 (r317401) +++ head/lib/librpcsec_gss/svc_rpcsec_gss.c Tue Apr 25 10:29:08 2017 (r317402) @@ -913,7 +913,9 @@ svc_rpc_gss_update_seq(struct svc_rpc_gs { int offset, i, word, bit; uint32_t carry, newcarry; + uint32_t* maskp; + maskp = client->cl_seqmask; if (seq > client->cl_seqlast) { /* * This request has a sequence number greater @@ -923,28 +925,29 @@ svc_rpc_gss_update_seq(struct svc_rpc_gs * number) */ offset = seq - client->cl_seqlast; - while (offset > 32) { + while (offset >= 32) { for (i = (SVC_RPC_GSS_SEQWINDOW / 32) - 1; i > 0; i--) { - client->cl_seqmask[i] = client->cl_seqmask[i-1]; + maskp[i] = maskp[i-1]; } - client->cl_seqmask[0] = 0; + maskp[0] = 0; offset -= 32; } - carry = 0; - for (i = 0; i < SVC_RPC_GSS_SEQWINDOW / 32; i++) { - newcarry = client->cl_seqmask[i] >> (32 - offset); - client->cl_seqmask[i] = - (client->cl_seqmask[i] << offset) | carry; - carry = newcarry; + if (offset > 0) { + carry = 0; + for (i = 0; i < SVC_RPC_GSS_SEQWINDOW / 32; i++) { + newcarry = maskp[i] >> (32 - offset); + maskp[i] = (maskp[i] << offset) | carry; + carry = newcarry; + } } - client->cl_seqmask[0] |= 1; + maskp[0] |= 1; client->cl_seqlast = seq; } else { offset = client->cl_seqlast - seq; word = offset / 32; bit = offset % 32; - client->cl_seqmask[word] |= (1 << bit); + maskp[word] |= (1 << bit); } } From owner-svn-src-head@freebsd.org Tue Apr 25 15:56: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 E26C2D50AA3; Tue, 25 Apr 2017 15:56:47 +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 AF2331C45; Tue, 25 Apr 2017 15:56:47 +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 v3PFuksw053548; Tue, 25 Apr 2017 15:56:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PFuk5U053547; Tue, 25 Apr 2017 15:56:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704251556.v3PFuk5U053547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 25 Apr 2017 15:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317409 - 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: Tue, 25 Apr 2017 15:56:48 -0000 Author: glebius Date: Tue Apr 25 15:56:46 2017 New Revision: 317409 URL: https://svnweb.freebsd.org/changeset/base/317409 Log: Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use after free if tcpdump(1) is run on non-existent interface. Suggested by: zeising Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Tue Apr 25 13:17:34 2017 (r317408) +++ head/contrib/tcpdump/tcpdump.c Tue Apr 25 15:56:46 2017 (r317409) @@ -1085,9 +1085,9 @@ open_interface(const char *device, netdi /* * Return an error for our caller to handle. */ - pcap_close(pc); snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s: %s\n(%s)", device, pcap_statustostr(status), cp); + pcap_close(pc); return (NULL); } else if (status == PCAP_ERROR_PERM_DENIED && *cp != '\0') error("%s: %s\n(%s)", device, From owner-svn-src-head@freebsd.org Tue Apr 25 16:21: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 78DE0D4F2E7; Tue, 25 Apr 2017 16:21:07 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5187577; Tue, 25 Apr 2017 16:21:07 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id EB7035A9F15; Tue, 25 Apr 2017 16:20:59 +0000 (UTC) Date: Tue, 25 Apr 2017 16:20:59 +0000 From: Brooks Davis To: Ngie Cooper Cc: "Rodney W. Grimes" , Brooks Davis , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... Message-ID: <20170425162059.GA2994@spindle.one-eyed-alien.net> References: <201704242338.v3ONc7KA058882@pdx.rh.CN85.dnsmgr.net> <201704250021.v3P0L3t1059033@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-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: Tue, 25 Apr 2017 16:21:07 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 24, 2017 at 06:09:05PM -0700, Ngie Cooper wrote: > On Mon, Apr 24, 2017 at 5:21 PM, Rodney W. Grimes > wrote: >=20 > ... >=20 > > Ignore me I see you got it on your change to Updating. >=20 > `Relnotes: yes` and adding UPDATING entries are complementary > IMHO. UPDATING is meant more for those who upgrade via src (might > contain workarounds, etc), whereas `Relnotes: yes` targets release > notes, which can be used by those doing a binary or src based upgrade. > Thanks for catching this! It should have been included here, but I closed the editor too soon and figured getting it in the UPDATING entry was sufficent. -- Brooks --/04w6evG8XlLl3ft Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJY/3dqAAoJEKzQXbSebgfAFawIAKReRUcjgpbGmHqiPpd6Qe0m vH8wSMiVXcVknw+Ay5DXguraVMah7WzSbccQXvSC11T6vFTU2FsMaAX9GW8g10wM 2CMG6yXmTB+cjk2TFTr0CW/EzTWb2wISH+Y9k4O4SbnrB7npzcsAxnq1LTodHpbW ZrjchfMNyi1RkqE0kIZn5fp4LXI1ryVbbhSqbDl7N8BRRbNolhHu1lm/4zUaBZfg LPrBzH0UHxRutP1sAH+uqRS3rt+TashUd1hBzwC7UDHK6SjJ+kmFXvFnIONVwmas ArOKrJsUdyErnONnZizH9hA+WoIkqM3v0RZkjMBuhUSWc38r7uFKdE296VYfS0c= =nsjQ -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From owner-svn-src-head@freebsd.org Tue Apr 25 16: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 D59EED50366; Tue, 25 Apr 2017 16:54:28 +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 973861B71; Tue, 25 Apr 2017 16:54:28 +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 v3PGsRvi078229; Tue, 25 Apr 2017 16:54:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PGsROU078228; Tue, 25 Apr 2017 16:54:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704251654.v3PGsROU078228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 25 Apr 2017 16:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317410 - head/sys/dev/cxgbe/iw_cxgbe 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, 25 Apr 2017 16:54:28 -0000 Author: np Date: Tue Apr 25 16:54:27 2017 New Revision: 317410 URL: https://svnweb.freebsd.org/changeset/base/317410 Log: cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the iw_cxgb4 Linux driver. Obtained from: Chelsio Communications MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Tue Apr 25 15:56:46 2017 (r317409) +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Tue Apr 25 16:54:27 2017 (r317410) @@ -157,49 +157,70 @@ static inline int c4iw_num_stags(struct return (int)(rdev->adap->vres.stag.size >> 5); } -#define C4IW_WR_TO (10*HZ) +#define C4IW_WR_TO (60*HZ) struct c4iw_wr_wait { int ret; - atomic_t completion; + struct completion completion; }; static inline void c4iw_init_wr_wait(struct c4iw_wr_wait *wr_waitp) { wr_waitp->ret = 0; - atomic_set(&wr_waitp->completion, 0); + init_completion(&wr_waitp->completion); } static inline void c4iw_wake_up(struct c4iw_wr_wait *wr_waitp, int ret) { wr_waitp->ret = ret; - atomic_set(&wr_waitp->completion, 1); - wakeup(wr_waitp); + complete(&wr_waitp->completion); } static inline int c4iw_wait_for_reply(struct c4iw_rdev *rdev, struct c4iw_wr_wait *wr_waitp, - u32 hwtid, u32 qpid, const char *func) + u32 hwtid, u32 qpid, const char *func) { struct adapter *sc = rdev->adap; unsigned to = C4IW_WR_TO; + int ret; + int timedout = 0; + struct timeval t1, t2; + + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + goto out; + } - while (!atomic_read(&wr_waitp->completion)) { - tsleep(wr_waitp, 0, "c4iw_wait", to); - if (SIGPENDING(curthread)) { - printf("%s - Device %s not responding - " - "tid %u qpid %u\n", func, - device_get_nameunit(sc->dev), hwtid, qpid); - if (c4iw_fatal_error(rdev)) { - wr_waitp->ret = -EIO; - break; - } - to = to << 2; - } - } + getmicrotime(&t1); + do { + ret = wait_for_completion_timeout(&wr_waitp->completion, to); + if (!ret) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s not responding after %ld.%06ld " + "seconds - tid %u qpid %u\n", func, + device_get_nameunit(sc->dev), t2.tv_sec, t2.tv_usec, + hwtid, qpid); + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + break; + } + to = to << 2; + timedout = 1; + } + } while (!ret); + +out: + if (timedout) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s reply after %ld.%06ld seconds - " + "tid %u qpid %u\n", func, device_get_nameunit(sc->dev), + t2.tv_sec, t2.tv_usec, hwtid, qpid); + } if (wr_waitp->ret) - CTR4(KTR_IW_CXGBE, "%s: FW reply %d tid %u qpid %u", - device_get_nameunit(sc->dev), wr_waitp->ret, hwtid, qpid); + CTR4(KTR_IW_CXGBE, "%p: FW reply %d tid %u qpid %u", sc, + wr_waitp->ret, hwtid, qpid); return (wr_waitp->ret); } From owner-svn-src-head@freebsd.org Tue Apr 25 17:00: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 CB42ED5052F; Tue, 25 Apr 2017 17:00:09 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC1D1EA4; Tue, 25 Apr 2017 17:00:09 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3PH08D2078610; Tue, 25 Apr 2017 17:00:08 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PH08ge078609; Tue, 25 Apr 2017 17:00:08 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704251700.v3PH08ge078609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 25 Apr 2017 17:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317411 - in head: sbin/atm sys/dev/ahb sys/dev/eisa sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/ieee488 sys/dev/patm sys/dev/utopia sys/modules/ahb sys/modules/aic7xxx/ahc/ahc_eisa sy... 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, 25 Apr 2017 17:00:09 -0000 Author: brooks Date: Tue Apr 25 17:00:08 2017 New Revision: 317411 URL: https://svnweb.freebsd.org/changeset/base/317411 Log: Remove directories made empty by NATM, EISA, and IEEE488 removals. Reported by: ak Deleted: head/sbin/atm/ head/sys/dev/ahb/ head/sys/dev/eisa/ head/sys/dev/en/ head/sys/dev/fatm/ head/sys/dev/hatm/ head/sys/dev/ieee488/ head/sys/dev/patm/ head/sys/dev/utopia/ head/sys/modules/ahb/ head/sys/modules/aic7xxx/ahc/ahc_eisa/ head/sys/modules/en/ head/sys/modules/fatm/ head/sys/modules/hatm/ head/sys/modules/netgraph/atm/atm/ head/sys/modules/patm/ head/sys/modules/utopia/ head/sys/netnatm/ head/usr.sbin/bsnmpd/modules/snmp_atm/ From owner-svn-src-head@freebsd.org Tue Apr 25 17:02: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 2A3F7D5079E; Tue, 25 Apr 2017 17:02:21 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D70D405; Tue, 25 Apr 2017 17:02:21 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2EC456BC7; Tue, 25 Apr 2017 17:02:20 +0000 (UTC) Date: Tue, 25 Apr 2017 17:02:20 +0000 From: Alexey Dokuchaev To: Navdeep Parhar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317410 - head/sys/dev/cxgbe/iw_cxgbe Message-ID: <20170425170220.GA52705@FreeBSD.org> References: <201704251654.v3PGsROU078228@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704251654.v3PGsROU078228@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 17:02:21 -0000 On Tue, Apr 25, 2017 at 04:54:27PM +0000, Navdeep Parhar wrote: > New Revision: 317410 > URL: https://svnweb.freebsd.org/changeset/base/317410 > > Log: > cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the > iw_cxgb4 Linux driver. Don't these changes deserve more elaborate commit message? ./danfe From owner-svn-src-head@freebsd.org Tue Apr 25 17:07:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81E4FD50893; Tue, 25 Apr 2017 17:07:43 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::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 50FA6881; Tue, 25 Apr 2017 17:07:43 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id t7so8866355pgt.1; Tue, 25 Apr 2017 10:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JWJfDBE+eGixj6bn58iIU6D9+wA8k8cEZWpN1stYAfg=; b=rPyB7jtl01QSVGqmXHQPEMsvwLAx4eF82YGbGgTMGw8uY9CzZEiewRhpLEMeEPc5Y8 16ULvcJvmtR6hYDDtDaoCAiyV/qnSqkuK8VYwY014tz2shDSJ1MEo+mZ057VGR9LDQaR p+raldVmgxrnaD6MHjMzNi2X9pzZgZ2GWrRVX8FzC/Omd1mGfWykOV4o8e2b6u42y6PJ miNggwmvq//OU232DWtOTK0RPHtGly949MqJvkREOeM6iv/xJch5yLboaqwlNCR2TGeA NFIXz4VCkKYv79WeOHlkDSiwFXMtNGNoltee7TWJO3H+h/xdRWoa0tEBnxVFQNTz2fEt DEjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JWJfDBE+eGixj6bn58iIU6D9+wA8k8cEZWpN1stYAfg=; b=bT4tFw+CStAZ6Nu45a+MXnt4I2gX/hke+/QhYNCxwBHyr+juqbxJ6YaKBofNRu9BOd Ws42v0meRxpoEhYoHWHPQTdL3a7G4UGXz9uaTGqPAQps1T3KYUcpdHtGAAB6bOtFwAee 4Pfr6cjJXlzax4SAkNZH9jIFVlK+yg3FYkoWsNVJObRBTz7I1pcw0iMsp9fnQhbdFL5q QsErC756YoRGr//Vv+wHSJNOyT3RnVqCcFj7utu8QmDSgLIPt5Brr3jtjnudSmIfVI17 fu/Qp2pis6BI8CdglKcfD5M5Btyj6XEK8clS0YvZzc8P8dp6kT5gNOoEMqWX1HVAyZRz Yhuw== X-Gm-Message-State: AN3rC/6GwqeELFil+I1eeZ1/sGQc10Qxkqo0oxT4o8jQeQzghk3YL/VF cZG91aNNeucq9+6w X-Received: by 10.99.56.66 with SMTP id h2mr29656545pgn.40.1493140062727; Tue, 25 Apr 2017 10:07:42 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [12.32.117.8]) by smtp.googlemail.com with ESMTPSA id 133sm24940253pfv.127.2017.04.25.10.07.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Apr 2017 10:07:42 -0700 (PDT) Sender: Navdeep Parhar Subject: Re: svn commit: r317410 - head/sys/dev/cxgbe/iw_cxgbe To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704251654.v3PGsROU078228@repo.freebsd.org> <20170425170220.GA52705@FreeBSD.org> From: Navdeep Parhar Message-ID: <8ab954e2-2f7f-ea4b-1bee-107749a55a1f@FreeBSD.org> Date: Tue, 25 Apr 2017 10:07:41 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <20170425170220.GA52705@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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, 25 Apr 2017 17:07:43 -0000 On 04/25/2017 10:02, Alexey Dokuchaev wrote: > On Tue, Apr 25, 2017 at 04:54:27PM +0000, Navdeep Parhar wrote: >> New Revision: 317410 >> URL: https://svnweb.freebsd.org/changeset/base/317410 >> >> Log: >> cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the >> iw_cxgb4 Linux driver. > > Don't these changes deserve more elaborate commit message? > > ./danfe > Sure, this one could have had a more elaborate commit message. My bad. Regards, Navdeep From owner-svn-src-head@freebsd.org Tue Apr 25 17:45: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 4DF60D505B4; Tue, 25 Apr 2017 17:45:28 +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 1E64F1F6C; Tue, 25 Apr 2017 17:45:28 +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 v3PHjRR8098369; Tue, 25 Apr 2017 17:45:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PHjRlZ098368; Tue, 25 Apr 2017 17:45:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704251745.v3PHjRlZ098368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 25 Apr 2017 17:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317412 - 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: Tue, 25 Apr 2017 17:45:28 -0000 Author: jhb Date: Tue Apr 25 17:45:26 2017 New Revision: 317412 URL: https://svnweb.freebsd.org/changeset/base/317412 Log: Add info files for GCC 4.2 to the list of info files to remove. This would only affect upgrades from older versions of non-clang platforms. MFC after: 1 week Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Apr 25 17:00:08 2017 (r317411) +++ head/ObsoleteFiles.inc Tue Apr 25 17:45:26 2017 (r317412) @@ -2102,8 +2102,12 @@ OLD_FILES+=usr/share/info/am-utils.info. OLD_FILES+=usr/share/info/as.info.gz OLD_FILES+=usr/share/info/binutils.info.gz OLD_FILES+=usr/share/info/com_err.info.gz +OLD_FILES+=usr/share/info/cpp.info.gz +OLD_FILES+=usr/share/info/cppinternals.info.gz OLD_FILES+=usr/share/info/diff.info.gz OLD_FILES+=usr/share/info/dir +OLD_FILES+=usr/share/info/gcc.info.gz +OLD_FILES+=usr/share/info/gccint.info.gz OLD_FILES+=usr/share/info/gdb.info.gz OLD_FILES+=usr/share/info/gdbint.info.gz OLD_FILES+=usr/share/info/gperf.info.gz From owner-svn-src-head@freebsd.org Tue Apr 25 17:46: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 AD502D50680; Tue, 25 Apr 2017 17:46:45 +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 6081F221; Tue, 25 Apr 2017 17:46:45 +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 v3PHki74098564; Tue, 25 Apr 2017 17:46:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PHki3a098563; Tue, 25 Apr 2017 17:46:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704251746.v3PHki3a098563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 25 Apr 2017 17:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317413 - 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: Tue, 25 Apr 2017 17:46:45 -0000 Author: jhb Date: Tue Apr 25 17:46:44 2017 New Revision: 317413 URL: https://svnweb.freebsd.org/changeset/base/317413 Log: Remove info files from optional old files. Info files are now all removed unconditionally after the removal of texinfo. MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 17:45:26 2017 (r317412) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 17:46:44 2017 (r317413) @@ -66,7 +66,6 @@ OLD_FILES+=usr/sbin/hlfsd OLD_FILES+=usr/sbin/mk-amd-map OLD_FILES+=usr/sbin/wire-test OLD_FILES+=usr/share/examples/etc/amd.map -OLD_FILES+=usr/share/info/am-utils.info.gz OLD_FILES+=usr/share/man/man1/pawd.1.gz OLD_FILES+=usr/share/man/man5/amd.conf.5.gz OLD_FILES+=usr/share/man/man8/amd.8.gz @@ -2420,11 +2419,6 @@ OLD_LIBS+=usr/lib32/libgomp.so.1 OLD_FILES+=usr/lib32/libgomp_p.a OLD_FILES+=usr/libexec/cc1 OLD_FILES+=usr/libexec/cc1plus -OLD_FILES+=usr/share/info/cpp.info.gz -OLD_FILES+=usr/share/info/cppinternals.info.gz -OLD_FILES+=usr/share/info/gcc.info.gz -OLD_FILES+=usr/share/info/gccint.info.gz -OLD_FILES+=usr/share/info/gperf.info.gz OLD_FILES+=usr/share/man/man1/g++.1.gz OLD_FILES+=usr/share/man/man1/gcc.1.gz OLD_FILES+=usr/share/man/man1/gcov.1.gz @@ -2443,9 +2437,6 @@ OLD_FILES+=usr/bin/gdb OLD_FILES+=usr/bin/gdbserver OLD_FILES+=usr/bin/gdbtui OLD_FILES+=usr/bin/kgdb -OLD_FILES+=usr/share/info/gdb.info.gz -OLD_FILES+=usr/share/info/gdbint.info.gz -OLD_FILES+=usr/share/info/stabs.info.gz OLD_FILES+=usr/share/man/man1/gdb.1.gz OLD_FILES+=usr/share/man/man1/gdbserver.1.gz OLD_FILES+=usr/share/man/man1/kgdb.1.gz @@ -2928,7 +2919,6 @@ OLD_FILES+=usr/share/groff_font/devutf8/ OLD_FILES+=usr/share/groff_font/devutf8/S OLD_DIRS+=usr/share/groff_font/devutf8 OLD_DIRS+=usr/share/groff_font -OLD_FILES+=usr/share/info/groff.info.gz OLD_FILES+=usr/share/man/man1/addftinfo.1.gz OLD_FILES+=usr/share/man/man1/afmtodit.1.gz OLD_FILES+=usr/share/man/man1/eqn.1.gz @@ -3736,7 +3726,6 @@ OLD_FILES+=usr/libexec/kpasswdd OLD_FILES+=usr/sbin/kstash OLD_FILES+=usr/sbin/ktutil OLD_FILES+=usr/sbin/iprop-log -OLD_FILES+=usr/share/info/heimdal.info.gz OLD_FILES+=usr/share/man/man1/kdestroy.1.gz OLD_FILES+=usr/share/man/man1/kf.1.gz OLD_FILES+=usr/share/man/man1/kinit.1.gz From owner-svn-src-head@freebsd.org Tue Apr 25 17:57: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 E2B8ED50025; Tue, 25 Apr 2017 17:57:45 +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 7B096FBB; Tue, 25 Apr 2017 17:57:45 +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 v3PHviFR002909; Tue, 25 Apr 2017 17:57:44 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PHvh8i002900; Tue, 25 Apr 2017 17:57:43 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201704251757.v3PHvh8i002900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 25 Apr 2017 17:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317414 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common s... 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, 25 Apr 2017 17:57:46 -0000 Author: jpaetzel Date: Tue Apr 25 17:57:43 2017 New Revision: 317414 URL: https://svnweb.freebsd.org/changeset/base/317414 Log: MFV 316894 7252 7628 compressed zfs send / receive illumos/illumos-gate@5602294fda888d923d57a78bafdaf48ae6223dea https://github.com/illumos/illumos-gate/commit/5602294fda888d923d57a78bafdaf48ae6223dea https://www.illumos.org/issues/7252 This feature includes code to allow a system with compressed ARC enabled to send data in its compressed form straight out of the ARC, and receive data in its compressed form directly into the ARC. https://www.illumos.org/issues/7628 We should have longer, more readable versions of the ZFS send / recv options. 7628 create long versions of ZFS send / receive options Reviewed by: George Wilson Reviewed by: John Kennedy Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Pavel Zakharov Reviewed by: Sebastien Roy Reviewed by: David Quigley Reviewed by: Thomas Caputi Approved by: Dan McDonald Author: Dan Kimmel Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 25 17:46:44 2017 (r317413) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 25 17:57:43 2017 (r317414) @@ -180,12 +180,12 @@ .Ar bookmark .Nm .Cm send -.Op Fl DnPpRveL +.Op Fl DLPRcenpv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Nm .Cm send -.Op Fl eL +.Op Fl Lce .Op Fl i Ar snapshot Ns | Ns bookmark .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm @@ -2535,7 +2535,7 @@ feature. .It Xo .Nm .Cm send -.Op Fl DnPpRveL +.Op Fl DLPRcenpv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Xc @@ -2580,7 +2580,7 @@ The incremental source may be specified as with the .Fl i option. -.It Fl R +.It Fl R, -replicate Generate a replication stream package, which will replicate the specified filesystem, and all descendent file systems, up to the named snapshot. When received, all properties, snapshots, descendent file systems, and clones are @@ -2598,7 +2598,7 @@ is received. If the .Fl F flag is specified when this stream is received, snapshots and file systems that do not exist on the sending side are destroyed. -.It Fl D +.It Fl D, -dedup Generate a deduplicated stream. Blocks which would have been sent multiple times in the send stream will only be sent once. The receiving system must also support this feature to receive a deduplicated stream. This flag can @@ -2607,7 +2607,7 @@ be used regardless of the dataset's property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. .Sy sha256 ) . -.It Fl L +.It Fl L, -large-block Generate a stream which may contain blocks larger than 128KB. This flag has no effect if the @@ -2623,7 +2623,7 @@ See for details on ZFS feature flags and the .Sy large_blocks feature. -.It Fl e +.It Fl e, -embed Generate a more compact stream by using WRITE_EMBEDDED records for blocks which are stored more compactly on disk by the .Sy embedded_data @@ -2646,11 +2646,25 @@ See for details on ZFS feature flags and the .Sy embedded_data feature. -.It Fl p +.It Fl c, -compressed +Generate a more compact stream by using compressed WRITE records for blocks +which are compressed on disk and in memory (see the +.Sy compression property for details). If the +.Sy lz4_compress +feature is active on the sending system, then the receiving system must have that +feature enabled as well. If the +.Sy large_blocks +feature is enabled on the sending system but the +.Fl L +option is not supplied in conjunction with +.Fl c +then the data will be decompressed before sending so it can be split +into smaller block sizes. +.It Fl p, -props Include the dataset's properties in the stream. This flag is implicit when .Fl R is specified. The receiving system must also support this feature. -.It Fl n +.It Fl n, -dryrun Do a dry-run ("No-op") send. Do not generate any actual send data. This is useful in conjunction with the .Fl v @@ -2660,9 +2674,9 @@ flags to determine what data will be sen In this case, the verbose output will be written to standard output (contrast with a non-dry-run, where the stream is written to standard output and the verbose output goes to standard error). -.It Fl P +.It Fl P, -parsable Print machine-parsable verbose information about the stream package generated. -.It Fl v +.It Fl v, -verbose Print verbose information about the stream package generated. This information includes a per-second report of how much data has been sent. .El @@ -2673,7 +2687,7 @@ on future versions of .It Xo .Nm .Cm send -.Op Fl eL +.Op Fl Lce .Op Fl i Ar snapshot Ns | Ns Ar bookmark .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc @@ -2699,7 +2713,7 @@ specified as the last component of the n If the incremental target is a clone, the incremental source can be the origin snapshot, or an earlier snapshot in the origin's filesystem, or the origin's origin, etc. -.It Fl L +.It Fl L, -large-block Generate a stream which may contain blocks larger than 128KB. This flag has no effect if the @@ -2715,7 +2729,22 @@ See for details on ZFS feature flags and the .Sy large_blocks feature. -.It Fl e +.It Fl c, -compressed +Generate a more compact stream by using compressed WRITE records for blocks +which are compressed on disk and in memory (see the +.Sy compression +property for details). If the +.Sy lz4_compress +feature is active on the sending system, then the receiving system must have +that feature enabled as well. If the +.Sy large_blocks +feature is enabled on the sending system but the +.Fl L +option is not supplied in conjunction with +.Fl c +then the data will be decompressed before sending so it can be split +into smaller block sizes. +.It Fl e, -embed Generate a more compact stream by using WRITE_EMBEDDED records for blocks which are stored more compactly on disk by the .Sy embedded_data Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Apr 25 17:46:44 2017 (r317413) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Apr 25 17:57:43 2017 (r317414) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -278,7 +279,7 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-DnPpRvLe] [-[iI] snapshot] " + return (gettext("\tsend [-DnPpRvLec] [-[iI] snapshot] " "\n" "\tsend [-Le] [-i snapshot|bookmark] " "\n" @@ -3771,8 +3772,23 @@ zfs_do_send(int argc, char **argv) nvlist_t *dbgnv = NULL; boolean_t extraverbose = B_FALSE; + struct option long_options[] = { + {"replicate", no_argument, NULL, 'R'}, + {"props", no_argument, NULL, 'p'}, + {"parsable", no_argument, NULL, 'P'}, + {"dedup", no_argument, NULL, 'D'}, + {"verbose", no_argument, NULL, 'v'}, + {"dryrun", no_argument, NULL, 'n'}, + {"large-block", no_argument, NULL, 'L'}, + {"embed", no_argument, NULL, 'e'}, + {"resume", required_argument, NULL, 't'}, + {"compressed", no_argument, NULL, 'c'}, + {0, 0, 0, 0} + }; + /* check options */ - while ((c = getopt(argc, argv, ":i:I:RDpvnPLet:")) != -1) { + while ((c = getopt_long(argc, argv, ":i:I:RbDpvnPLet:c", long_options, + NULL)) != -1) { switch (c) { case 'i': if (fromname) @@ -3816,12 +3832,17 @@ zfs_do_send(int argc, char **argv) case 't': resume_token = optarg; break; + case 'c': + flags.compress = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); usage(B_FALSE); break; case '?': + /*FALLTHROUGH*/ + default: (void) fprintf(stderr, gettext("invalid option '%c'\n"), optopt); usage(B_FALSE); @@ -3892,6 +3913,8 @@ zfs_do_send(int argc, char **argv) lzc_flags |= LZC_SEND_FLAG_LARGE_BLOCK; if (flags.embed_data) lzc_flags |= LZC_SEND_FLAG_EMBED_DATA; + if (flags.compress) + lzc_flags |= LZC_SEND_FLAG_COMPRESS; if (fromname != NULL && (fromname[0] == '#' || fromname[0] == '@')) { Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Apr 25 17:46:44 2017 (r317413) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Apr 25 17:57:43 2017 (r317414) @@ -25,8 +25,8 @@ */ /* - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -39,6 +39,7 @@ #include #include +#include #include /* @@ -251,6 +252,7 @@ main(int argc, char *argv[]) (void) fprintf(stderr, "invalid option '%c'\n", optopt); usage(); + break; } } @@ -453,38 +455,50 @@ main(int argc, char *argv[]) drrw->drr_object = BSWAP_64(drrw->drr_object); drrw->drr_type = BSWAP_32(drrw->drr_type); drrw->drr_offset = BSWAP_64(drrw->drr_offset); - drrw->drr_length = BSWAP_64(drrw->drr_length); + drrw->drr_logical_size = + BSWAP_64(drrw->drr_logical_size); drrw->drr_toguid = BSWAP_64(drrw->drr_toguid); drrw->drr_key.ddk_prop = BSWAP_64(drrw->drr_key.ddk_prop); + drrw->drr_compressed_size = + BSWAP_64(drrw->drr_compressed_size); } + + uint64_t payload_size = DRR_WRITE_PAYLOAD_SIZE(drrw); + /* * If this is verbose and/or dump output, * print info on the modified block */ if (verbose) { (void) printf("WRITE object = %llu type = %u " - "checksum type = %u\n" - " offset = %llu length = %llu " + "checksum type = %u compression type = %u\n" + " offset = %llu logical_size = %llu " + "compressed_size = %llu " + "payload_size = %llu " "props = %llx\n", (u_longlong_t)drrw->drr_object, drrw->drr_type, drrw->drr_checksumtype, + drrw->drr_compressiontype, (u_longlong_t)drrw->drr_offset, - (u_longlong_t)drrw->drr_length, + (u_longlong_t)drrw->drr_logical_size, + (u_longlong_t)drrw->drr_compressed_size, + (u_longlong_t)payload_size, (u_longlong_t)drrw->drr_key.ddk_prop); } + /* * Read the contents of the block in from STDIN to buf */ - (void) ssread(buf, drrw->drr_length, &zc); + (void) ssread(buf, payload_size, &zc); /* * If in dump mode */ if (dump) { - print_block(buf, drrw->drr_length); + print_block(buf, payload_size); } - total_write_size += drrw->drr_length; + total_write_size += payload_size; break; case DRR_WRITE_BYREF: Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Apr 25 17:46:44 2017 (r317413) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Apr 25 17:57:43 2017 (r317414) @@ -616,6 +616,9 @@ typedef struct sendflags { /* WRITE_EMBEDDED records of type DATA are permitted */ boolean_t embed_data; + + /* compressed WRITE records are permitted */ + boolean_t compress; } sendflags_t; typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Apr 25 17:46:44 2017 (r317413) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Apr 25 17:57:43 2017 (r317414) @@ -354,8 +354,10 @@ cksummer(void *arg) { struct drr_write *drrw = &drr->drr_u.drr_write; dataref_t dataref; + uint64_t payload_size; - (void) ssread(buf, drrw->drr_length, ofp); + payload_size = DRR_WRITE_PAYLOAD_SIZE(drrw); + (void) ssread(buf, payload_size, ofp); /* * Use the existing checksum if it's dedup-capable, @@ -369,7 +371,7 @@ cksummer(void *arg) zio_cksum_t tmpsha256; SHA256Init(&ctx); - SHA256Update(&ctx, buf, drrw->drr_length); + SHA256Update(&ctx, buf, payload_size); SHA256Final(&tmpsha256, &ctx); drrw->drr_key.ddk_cksum.zc_word[0] = BE_64(tmpsha256.zc_word[0]); @@ -399,7 +401,7 @@ cksummer(void *arg) wbr_drrr->drr_object = drrw->drr_object; wbr_drrr->drr_offset = drrw->drr_offset; - wbr_drrr->drr_length = drrw->drr_length; + wbr_drrr->drr_length = drrw->drr_logical_size; wbr_drrr->drr_toguid = drrw->drr_toguid; wbr_drrr->drr_refguid = dataref.ref_guid; wbr_drrr->drr_refobject = @@ -421,7 +423,7 @@ cksummer(void *arg) goto out; } else { /* block not previously seen */ - if (dump_record(drr, buf, drrw->drr_length, + if (dump_record(drr, buf, payload_size, &stream_cksum, outfd) != 0) goto out; } @@ -924,7 +926,7 @@ typedef struct send_dump_data { uint64_t prevsnap_obj; boolean_t seenfrom, seento, replicate, doall, fromorigin; boolean_t verbose, dryrun, parsable, progress, embed_data, std_out; - boolean_t large_block; + boolean_t large_block, compress; int outfd; boolean_t err; nvlist_t *fss; @@ -940,7 +942,7 @@ typedef struct send_dump_data { static int estimate_ioctl(zfs_handle_t *zhp, uint64_t fromsnap_obj, - boolean_t fromorigin, uint64_t *sizep) + boolean_t fromorigin, enum lzc_send_flags flags, uint64_t *sizep) { zfs_cmd_t zc = { 0 }; libzfs_handle_t *hdl = zhp->zfs_hdl; @@ -953,6 +955,7 @@ estimate_ioctl(zfs_handle_t *zhp, uint64 zc.zc_sendobj = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID); zc.zc_fromobj = fromsnap_obj; zc.zc_guid = 1; /* estimate flag */ + zc.zc_flags = flags; if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_SEND, &zc) != 0) { char errbuf[1024]; @@ -1192,6 +1195,7 @@ dump_snapshot(zfs_handle_t *zhp, void *a progress_arg_t pa = { 0 }; pthread_t tid; char *thissnap; + enum lzc_send_flags flags = 0; int err; boolean_t isfromsnap, istosnap, fromorigin; boolean_t exclude = B_FALSE; @@ -1220,6 +1224,13 @@ dump_snapshot(zfs_handle_t *zhp, void *a if (istosnap) sdd->seento = B_TRUE; + if (sdd->large_block) + flags |= LZC_SEND_FLAG_LARGE_BLOCK; + if (sdd->embed_data) + flags |= LZC_SEND_FLAG_EMBED_DATA; + if (sdd->compress) + flags |= LZC_SEND_FLAG_COMPRESS; + if (!sdd->doall && !isfromsnap && !istosnap) { if (sdd->replicate) { char *snapname; @@ -1266,7 +1277,7 @@ dump_snapshot(zfs_handle_t *zhp, void *a if (sdd->verbose) { uint64_t size = 0; (void) estimate_ioctl(zhp, sdd->prevsnap_obj, - fromorigin, &size); + fromorigin, flags, &size); send_print_verbose(fout, zhp->zfs_name, sdd->prevsnap[0] ? sdd->prevsnap : NULL, @@ -1291,12 +1302,6 @@ dump_snapshot(zfs_handle_t *zhp, void *a } } - enum lzc_send_flags flags = 0; - if (sdd->large_block) - flags |= LZC_SEND_FLAG_LARGE_BLOCK; - if (sdd->embed_data) - flags |= LZC_SEND_FLAG_EMBED_DATA; - err = dump_ioctl(zhp, sdd->prevsnap, sdd->prevsnap_obj, fromorigin, sdd->outfd, flags, sdd->debugnv); @@ -1602,8 +1607,12 @@ zfs_send_resume(libzfs_handle_t *hdl, se fromguid = 0; (void) nvlist_lookup_uint64(resume_nvl, "fromguid", &fromguid); + if (flags->largeblock || nvlist_exists(resume_nvl, "largeblockok")) + lzc_flags |= LZC_SEND_FLAG_LARGE_BLOCK; if (flags->embed_data || nvlist_exists(resume_nvl, "embedok")) lzc_flags |= LZC_SEND_FLAG_EMBED_DATA; + if (flags->compress || nvlist_exists(resume_nvl, "compressok")) + lzc_flags |= LZC_SEND_FLAG_COMPRESS; if (guid_to_name(hdl, toname, toguid, B_FALSE, name) != 0) { if (zfs_dataset_exists(hdl, toname, ZFS_TYPE_DATASET)) { @@ -1636,7 +1645,8 @@ zfs_send_resume(libzfs_handle_t *hdl, se if (flags->verbose) { uint64_t size = 0; - error = lzc_send_space(zhp->zfs_name, fromname, &size); + error = lzc_send_space(zhp->zfs_name, fromname, + lzc_flags, &size); if (error == 0) size = MAX(0, (int64_t)(size - bytes)); send_print_verbose(stderr, zhp->zfs_name, fromname, @@ -1866,6 +1876,7 @@ zfs_send(zfs_handle_t *zhp, const char * sdd.dryrun = flags->dryrun; sdd.large_block = flags->largeblock; sdd.embed_data = flags->embed_data; + sdd.compress = flags->compress; sdd.filter_cb = filter_func; sdd.filter_cb_arg = cb_arg; if (debugnvp) @@ -2960,11 +2971,17 @@ recv_skip(libzfs_handle_t *hdl, int fd, case DRR_WRITE: if (byteswap) { - drr->drr_u.drr_write.drr_length = - BSWAP_64(drr->drr_u.drr_write.drr_length); + drr->drr_u.drr_write.drr_logical_size = + BSWAP_64( + drr->drr_u.drr_write.drr_logical_size); + drr->drr_u.drr_write.drr_compressed_size = + BSWAP_64( + drr->drr_u.drr_write.drr_compressed_size); } + uint64_t payload_size = + DRR_WRITE_PAYLOAD_SIZE(&drr->drr_u.drr_write); (void) recv_read(hdl, fd, buf, - drr->drr_u.drr_write.drr_length, B_FALSE, NULL); + payload_size, B_FALSE, NULL); break; case DRR_SPILL: if (byteswap) { Modified: head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Apr 25 17:46:44 2017 (r317413) +++ head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Apr 25 17:57:43 2017 (r317414) @@ -534,6 +534,8 @@ lzc_send_resume(const char *snapname, co fnvlist_add_boolean(args, "largeblockok"); if (flags & LZC_SEND_FLAG_EMBED_DATA) fnvlist_add_boolean(args, "embedok"); + if (flags & LZC_SEND_FLAG_COMPRESS) + fnvlist_add_boolean(args, "compressok"); if (resumeobj != 0 || resumeoff != 0) { fnvlist_add_uint64(args, "resume_object", resumeobj); fnvlist_add_uint64(args, "resume_offset", resumeoff); @@ -559,7 +561,8 @@ lzc_send_resume(const char *snapname, co * an equivalent snapshot. */ int -lzc_send_space(const char *snapname, const char *from, uint64_t *spacep) +lzc_send_space(const char *snapname, const char *from, + enum lzc_send_flags flags, uint64_t *spacep) { nvlist_t *args; nvlist_t *result; @@ -568,6 +571,12 @@ lzc_send_space(const char *snapname, con args = fnvlist_alloc(); if (from != NULL) fnvlist_add_string(args, "from", from); + if (flags & LZC_SEND_FLAG_LARGE_BLOCK) + fnvlist_add_boolean(args, "largeblockok"); + if (flags & LZC_SEND_FLAG_EMBED_DATA) + fnvlist_add_boolean(args, "embedok"); + if (flags & LZC_SEND_FLAG_COMPRESS) + fnvlist_add_boolean(args, "compressok"); err = lzc_ioctl(ZFS_IOC_SEND_SPACE, snapname, args, &result); nvlist_free(args); if (err == 0) Modified: head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Apr 25 17:46:44 2017 (r317413) +++ head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Apr 25 17:57:43 2017 (r317414) @@ -62,13 +62,14 @@ int lzc_get_holds(const char *, nvlist_t enum lzc_send_flags { LZC_SEND_FLAG_EMBED_DATA = 1 << 0, - LZC_SEND_FLAG_LARGE_BLOCK = 1 << 1 + LZC_SEND_FLAG_LARGE_BLOCK = 1 << 1, + LZC_SEND_FLAG_COMPRESS = 1 << 2 }; int lzc_send(const char *, const char *, int, enum lzc_send_flags); int lzc_send_resume(const char *, const char *, int, enum lzc_send_flags, uint64_t, uint64_t); -int lzc_send_space(const char *, const char *, uint64_t *); +int lzc_send_space(const char *, const char *, enum lzc_send_flags, uint64_t *); struct dmu_replay_record; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Apr 25 17:46:44 2017 (r317413) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Apr 25 17:57:43 2017 (r317414) @@ -77,10 +77,10 @@ * A new reference to a cache buffer can be obtained in two * ways: 1) via a hash table lookup using the DVA as a key, * or 2) via one of the ARC lists. The arc_read() interface - * uses method 1, while the internal arc algorithms for + * uses method 1, while the internal ARC algorithms for * adjusting the cache use method 2. We therefore provide two * types of locks: 1) the hash table lock array, and 2) the - * arc list locks. + * ARC list locks. * * Buffers do not have their own mutexes, rather they rely on the * hash table mutexes for the bulk of their protection (i.e. most @@ -93,21 +93,12 @@ * buf_hash_remove() expects the appropriate hash mutex to be * already held before it is invoked. * - * Each arc state also has a mutex which is used to protect the + * Each ARC state also has a mutex which is used to protect the * buffer list associated with the state. When attempting to - * obtain a hash table lock while holding an arc list lock you + * obtain a hash table lock while holding an ARC list lock you * must use: mutex_tryenter() to avoid deadlock. Also note that * the active state mutex must be held before the ghost state mutex. * - * Arc buffers may have an associated eviction callback function. - * This function will be invoked prior to removing the buffer (e.g. - * in arc_do_user_evicts()). Note however that the data associated - * with the buffer may be evicted prior to the callback. The callback - * must be made with *no locks held* (to prevent deadlock). Additionally, - * the users of callbacks must ensure that their private data is - * protected from simultaneous callbacks from arc_clear_callback() - * and arc_do_user_evicts(). - * * Note that the majority of the performance stats are manipulated * with atomic operations. * @@ -136,67 +127,81 @@ * are cached in the L1ARC. The L1ARC (l1arc_buf_hdr_t) is a structure within * the arc_buf_hdr_t that will point to the data block in memory. A block can * only be read by a consumer if it has an l1arc_buf_hdr_t. The L1ARC - * caches data in two ways -- in a list of arc buffers (arc_buf_t) and + * caches data in two ways -- in a list of ARC buffers (arc_buf_t) and * also in the arc_buf_hdr_t's private physical data block pointer (b_pdata). - * Each arc buffer (arc_buf_t) is being actively accessed by a specific ARC - * consumer, and always contains uncompressed data. The ARC will provide - * references to this data and will keep it cached until it is no longer in - * use. Typically, the arc will try to cache only the L1ARC's physical data - * block and will aggressively evict any arc_buf_t that is no longer referenced. - * The amount of memory consumed by the arc_buf_t's can be seen via the - * "overhead_size" kstat. - * * - * arc_buf_hdr_t - * +-----------+ - * | | - * | | - * | | - * +-----------+ - * l2arc_buf_hdr_t| | - * | | - * +-----------+ - * l1arc_buf_hdr_t| | - * | | arc_buf_t - * | b_buf +------------>+---------+ arc_buf_t - * | | |b_next +---->+---------+ - * | b_pdata +-+ |---------| |b_next +-->NULL - * +-----------+ | | | +---------+ - * | |b_data +-+ | | - * | +---------+ | |b_data +-+ - * +->+------+ | +---------+ | - * (potentially) | | | | - * compressed | | | | - * data +------+ | v - * +->+------+ +------+ - * uncompressed | | | | - * data | | | | - * +------+ +------+ - * - * The L1ARC's data pointer, however, may or may not be uncompressed. The - * ARC has the ability to store the physical data (b_pdata) associated with - * the DVA of the arc_buf_hdr_t. Since the b_pdata is a copy of the on-disk - * physical block, it will match its on-disk compression characteristics. - * If the block on-disk is compressed, then the physical data block - * in the cache will also be compressed and vice-versa. This behavior - * can be disabled by setting 'zfs_compressed_arc_enabled' to B_FALSE. When the + * The L1ARC's data pointer may or may not be uncompressed. The ARC has the + * ability to store the physical data (b_pdata) associated with the DVA of the + * arc_buf_hdr_t. Since the b_pdata is a copy of the on-disk physical block, + * it will match its on-disk compression characteristics. This behavior can be + * disabled by setting 'zfs_compressed_arc_enabled' to B_FALSE. When the * compressed ARC functionality is disabled, the b_pdata will point to an * uncompressed version of the on-disk data. * + * Data in the L1ARC is not accessed by consumers of the ARC directly. Each + * arc_buf_hdr_t can have multiple ARC buffers (arc_buf_t) which reference it. + * Each ARC buffer (arc_buf_t) is being actively accessed by a specific ARC + * consumer. The ARC will provide references to this data and will keep it + * cached until it is no longer in use. The ARC caches only the L1ARC's physical + * data block and will evict any arc_buf_t that is no longer referenced. The + * amount of memory consumed by the arc_buf_ts' data buffers can be seen via the + * "overhead_size" kstat. + * + * Depending on the consumer, an arc_buf_t can be requested in uncompressed or + * compressed form. The typical case is that consumers will want uncompressed + * data, and when that happens a new data buffer is allocated where the data is + * decompressed for them to use. Currently the only consumer who wants + * compressed arc_buf_t's is "zfs send", when it streams data exactly as it + * exists on disk. When this happens, the arc_buf_t's data buffer is shared + * with the arc_buf_hdr_t. + * + * Here is a diagram showing an arc_buf_hdr_t referenced by two arc_buf_t's. The + * first one is owned by a compressed send consumer (and therefore references + * the same compressed data buffer as the arc_buf_hdr_t) and the second could be + * used by any other consumer (and has its own uncompressed copy of the data + * buffer). + * + * arc_buf_hdr_t + * +-----------+ + * | fields | + * | common to | + * | L1- and | + * | L2ARC | + * +-----------+ + * | l2arc_buf_hdr_t + * | | + * +-----------+ + * | l1arc_buf_hdr_t + * | | arc_buf_t + * | b_buf +------------>+-----------+ arc_buf_t + * | b_pdata +-+ |b_next +---->+-----------+ + * +-----------+ | |-----------| |b_next +-->NULL + * | |b_comp = T | +-----------+ + * | |b_data +-+ |b_comp = F | + * | +-----------+ | |b_data +-+ + * +->+------+ | +-----------+ | + * compressed | | | | + * data | |<--------------+ | uncompressed + * +------+ compressed, | data + * shared +-->+------+ + * data | | + * | | + * +------+ + * * When a consumer reads a block, the ARC must first look to see if the - * arc_buf_hdr_t is cached. If the hdr is cached and already has an arc_buf_t, - * then an additional arc_buf_t is allocated and the uncompressed data is - * bcopied from the existing arc_buf_t. If the hdr is cached but does not - * have an arc_buf_t, then the ARC allocates a new arc_buf_t and decompresses - * the b_pdata contents into the arc_buf_t's b_data. If the arc_buf_hdr_t's - * b_pdata is not compressed, then the block is shared with the newly - * allocated arc_buf_t. This block sharing only occurs with one arc_buf_t - * in the arc buffer chain. Sharing the block reduces the memory overhead - * required when the hdr is caching uncompressed blocks or the compressed - * arc functionality has been disabled via 'zfs_compressed_arc_enabled'. + * arc_buf_hdr_t is cached. If the hdr is cached then the ARC allocates a new + * arc_buf_t and either copies uncompressed data into a new data buffer from an + * existing uncompressed arc_buf_t, decompresses the hdr's b_pdata buffer into a + * new data buffer, or shares the hdr's b_pdata buffer, depending on whether the + * hdr is compressed and the desired compression characteristics of the + * arc_buf_t consumer. If the arc_buf_t ends up sharing data with the + * arc_buf_hdr_t and both of them are uncompressed then the arc_buf_t must be + * the last buffer in the hdr's b_buf list, however a shared compressed buf can + * be anywhere in the hdr's list. * * The diagram below shows an example of an uncompressed ARC hdr that is - * sharing its data with an arc_buf_t: + * sharing its data with an arc_buf_t (note that the shared uncompressed buf is + * the last element in the buf list): * * arc_buf_hdr_t * +-----------+ @@ -225,20 +230,24 @@ * | +------+ | * +---------------------------------+ * - * Writing to the arc requires that the ARC first discard the b_pdata + * Writing to the ARC requires that the ARC first discard the hdr's b_pdata * since the physical block is about to be rewritten. The new data contents - * will be contained in the arc_buf_t (uncompressed). As the I/O pipeline - * performs the write, it may compress the data before writing it to disk. - * The ARC will be called with the transformed data and will bcopy the - * transformed on-disk block into a newly allocated b_pdata. + * will be contained in the arc_buf_t. As the I/O pipeline performs the write, + * it may compress the data before writing it to disk. The ARC will be called + * with the transformed data and will bcopy the transformed on-disk block into + * a newly allocated b_pdata. Writes are always done into buffers which have + * either been loaned (and hence are new and don't have other readers) or + * buffers which have been released (and hence have their own hdr, if there + * were originally other readers of the buf's original hdr). This ensures that + * the ARC only needs to update a single buf and its hdr after a write occurs. * * When the L2ARC is in use, it will also take advantage of the b_pdata. The * L2ARC will always write the contents of b_pdata to the L2ARC. This means - * that when compressed arc is enabled that the L2ARC blocks are identical + * that when compressed ARC is enabled that the L2ARC blocks are identical * to the on-disk block in the main data pool. This provides a significant * advantage since the ARC can leverage the bp's checksum when reading from the * L2ARC to determine if the contents are valid. However, if the compressed - * arc is disabled, then the L2ARC's block must be transformed to look + * ARC is disabled, then the L2ARC's block must be transformed to look * like the physical block in the main data pool before comparing the * checksum and determining its validity. */ @@ -910,6 +919,7 @@ struct arc_callback { void *acb_private; arc_done_func_t *acb_done; arc_buf_t *acb_buf; + boolean_t acb_compressed; zio_t *acb_zio_dummy; arc_callback_t *acb_next; }; @@ -961,7 +971,7 @@ typedef struct l1arc_buf_hdr { zio_cksum_t *b_freeze_cksum; #ifdef ZFS_DEBUG /* - * used for debugging wtih kmem_flags - by allocating and freeing + * Used for debugging with kmem_flags - by allocating and freeing * b_thawed when the buffer is thawed, we get a record of the stack * trace that thawed it. */ @@ -1172,6 +1182,8 @@ sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_AR HDR_COMPRESS_OFFSET, SPA_COMPRESSBITS, (cmp)); #define ARC_BUF_LAST(buf) ((buf)->b_next == NULL) +#define ARC_BUF_SHARED(buf) ((buf)->b_flags & ARC_BUF_FLAG_SHARED) +#define ARC_BUF_COMPRESSED(buf) ((buf)->b_flags & ARC_BUF_FLAG_COMPRESSED) /* * Other sizes @@ -1332,7 +1344,7 @@ static kmutex_t l2arc_free_on_write_mtx; static uint64_t l2arc_ndev; /* number of devices */ typedef struct l2arc_read_callback { - arc_buf_hdr_t *l2rcb_hdr; /* read buffer */ + arc_buf_hdr_t *l2rcb_hdr; /* read header */ blkptr_t l2rcb_bp; /* original blkptr */ zbookmark_phys_t l2rcb_zb; /* original bookmark */ int l2rcb_flags; /* original flags */ @@ -1682,6 +1694,31 @@ retry: } } +/* + * This is the size that the buf occupies in memory. If the buf is compressed, + * it will correspond to the compressed size. You should use this method of + * getting the buf size unless you explicitly need the logical size. + */ +int32_t +arc_buf_size(arc_buf_t *buf) +{ + return (ARC_BUF_COMPRESSED(buf) ? + HDR_GET_PSIZE(buf->b_hdr) : HDR_GET_LSIZE(buf->b_hdr)); +} + +int32_t +arc_buf_lsize(arc_buf_t *buf) +{ + return (HDR_GET_LSIZE(buf->b_hdr)); +} + +enum zio_compress +arc_get_compression(arc_buf_t *buf) +{ + return (ARC_BUF_COMPRESSED(buf) ? + HDR_GET_COMPRESS(buf->b_hdr) : ZIO_COMPRESS_OFF); +} + #define ARC_MINTIME (hz>>4) /* 62 ms */ static inline boolean_t @@ -1690,9 +1727,21 @@ arc_buf_is_shared(arc_buf_t *buf) boolean_t shared = (buf->b_data != NULL && buf->b_data == buf->b_hdr->b_l1hdr.b_pdata); IMPLY(shared, HDR_SHARED_DATA(buf->b_hdr)); + IMPLY(shared, ARC_BUF_SHARED(buf)); + IMPLY(shared, ARC_BUF_COMPRESSED(buf) || ARC_BUF_LAST(buf)); + + /* + * It would be nice to assert arc_can_share() too, but the "hdr isn't + * already being shared" requirement prevents us from doing that. + */ + return (shared); } +/* + * Free the checksum associated with this header. If there is no checksum, this + * is a no-op. + */ static inline void arc_cksum_free(arc_buf_hdr_t *hdr) { @@ -1705,6 +1754,25 @@ arc_cksum_free(arc_buf_hdr_t *hdr) mutex_exit(&hdr->b_l1hdr.b_freeze_lock); } +/* + * Return true iff at least one of the bufs on hdr is not compressed. + */ +static boolean_t +arc_hdr_has_uncompressed_buf(arc_buf_hdr_t *hdr) +{ + for (arc_buf_t *b = hdr->b_l1hdr.b_buf; b != NULL; b = b->b_next) { + if (!ARC_BUF_COMPRESSED(b)) { + return (B_TRUE); + } + } + return (B_FALSE); +} + +/* + * If we've turned on the ZFS_DEBUG_MODIFY flag, verify that the buf's data + * matches the checksum that is stored in the hdr. If there is no checksum, + * or if the buf is compressed, this is a no-op. + */ static void arc_cksum_verify(arc_buf_t *buf) { @@ -1714,6 +1782,12 @@ arc_cksum_verify(arc_buf_t *buf) if (!(zfs_flags & ZFS_DEBUG_MODIFY)) return; + if (ARC_BUF_COMPRESSED(buf)) { + ASSERT(hdr->b_l1hdr.b_freeze_cksum == NULL || + arc_hdr_has_uncompressed_buf(hdr)); + return; + } + ASSERT(HDR_HAS_L1HDR(hdr)); mutex_enter(&hdr->b_l1hdr.b_freeze_lock); @@ -1721,7 +1795,8 @@ arc_cksum_verify(arc_buf_t *buf) mutex_exit(&hdr->b_l1hdr.b_freeze_lock); return; } - fletcher_2_native(buf->b_data, HDR_GET_LSIZE(hdr), NULL, &zc); + + fletcher_2_native(buf->b_data, arc_buf_size(buf), NULL, &zc); if (!ZIO_CHECKSUM_EQUAL(*hdr->b_l1hdr.b_freeze_cksum, zc)) panic("buffer modified while frozen!"); mutex_exit(&hdr->b_l1hdr.b_freeze_lock); @@ -1795,6 +1870,12 @@ arc_cksum_is_equal(arc_buf_hdr_t *hdr, z return (valid_cksum); } +/* + * Given a buf full of data, if ZFS_DEBUG_MODIFY is enabled this computes a + * checksum and attaches it to the buf's hdr so that we can ensure that the buf + * isn't modified later on. If buf is compressed or there is already a checksum + * on the hdr, this is a no-op (we only checksum uncompressed bufs). + */ static void arc_cksum_compute(arc_buf_t *buf) { @@ -1804,14 +1885,21 @@ arc_cksum_compute(arc_buf_t *buf) return; ASSERT(HDR_HAS_L1HDR(hdr)); + mutex_enter(&buf->b_hdr->b_l1hdr.b_freeze_lock); if (hdr->b_l1hdr.b_freeze_cksum != NULL) { + ASSERT(arc_hdr_has_uncompressed_buf(hdr)); + mutex_exit(&hdr->b_l1hdr.b_freeze_lock); + return; + } else if (ARC_BUF_COMPRESSED(buf)) { mutex_exit(&hdr->b_l1hdr.b_freeze_lock); return; } + + ASSERT(!ARC_BUF_COMPRESSED(buf)); hdr->b_l1hdr.b_freeze_cksum = kmem_alloc(sizeof (zio_cksum_t), KM_SLEEP); - fletcher_2_native(buf->b_data, HDR_GET_LSIZE(hdr), NULL, + fletcher_2_native(buf->b_data, arc_buf_size(buf), NULL, hdr->b_l1hdr.b_freeze_cksum); mutex_exit(&hdr->b_l1hdr.b_freeze_lock); #ifdef illumos @@ -1855,7 +1943,7 @@ arc_buf_watch(arc_buf_t *buf) procctl_t ctl; ctl.cmd = PCWATCH; ctl.prwatch.pr_vaddr = (uintptr_t)buf->b_data; - ctl.prwatch.pr_size = HDR_GET_LSIZE(buf->b_hdr); + ctl.prwatch.pr_size = arc_buf_size(buf); ctl.prwatch.pr_wflags = WA_WRITE; result = write(arc_procfd, &ctl, sizeof (ctl)); ASSERT3U(result, ==, sizeof (ctl)); @@ -1877,6 +1965,12 @@ arc_buf_type(arc_buf_hdr_t *hdr) return (type); } +boolean_t +arc_is_metadata(arc_buf_t *buf) +{ + return (HDR_ISTYPE_METADATA(buf->b_hdr) != 0); +} + static uint32_t arc_bufc_to_flags(arc_buf_contents_t type) { @@ -1898,12 +1992,19 @@ arc_buf_thaw(arc_buf_t *buf) { arc_buf_hdr_t *hdr = buf->b_hdr; - if (zfs_flags & ZFS_DEBUG_MODIFY) { - if (hdr->b_l1hdr.b_state != arc_anon) - panic("modifying non-anon buffer!"); - if (HDR_IO_IN_PROGRESS(hdr)) - panic("modifying buffer while i/o in progress!"); - arc_cksum_verify(buf); + ASSERT3P(hdr->b_l1hdr.b_state, ==, arc_anon); + ASSERT(!HDR_IO_IN_PROGRESS(hdr)); + + arc_cksum_verify(buf); + + /* + * Compressed buffers do not manipulate the b_freeze_cksum or + * allocate b_thawed. + */ + if (ARC_BUF_COMPRESSED(buf)) { + ASSERT(hdr->b_l1hdr.b_freeze_cksum == NULL || + arc_hdr_has_uncompressed_buf(hdr)); + return; } ASSERT(HDR_HAS_L1HDR(hdr)); @@ -1934,6 +2035,12 @@ arc_buf_freeze(arc_buf_t *buf) if (!(zfs_flags & ZFS_DEBUG_MODIFY)) return; + if (ARC_BUF_COMPRESSED(buf)) { + ASSERT(hdr->b_l1hdr.b_freeze_cksum == NULL || + arc_hdr_has_uncompressed_buf(hdr)); + return; + } + hash_lock = HDR_LOCK(hdr); mutex_enter(hash_lock); @@ -1942,7 +2049,6 @@ arc_buf_freeze(arc_buf_t *buf) hdr->b_l1hdr.b_state == arc_anon); arc_cksum_compute(buf); mutex_exit(hash_lock); - } /* @@ -1999,47 +2105,157 @@ arc_hdr_set_compress(arc_buf_hdr_t *hdr, } } +/* + * Looks for another buf on the same hdr which has the data decompressed, copies + * from it, and returns true. If no such buf exists, returns false. + */ +static boolean_t +arc_buf_try_copy_decompressed_data(arc_buf_t *buf) +{ + arc_buf_hdr_t *hdr = buf->b_hdr; + boolean_t copied = B_FALSE; + + ASSERT(HDR_HAS_L1HDR(hdr)); + ASSERT3P(buf->b_data, !=, NULL); + ASSERT(!ARC_BUF_COMPRESSED(buf)); + + for (arc_buf_t *from = hdr->b_l1hdr.b_buf; from != NULL; + from = from->b_next) { + /* can't use our own data buffer */ + if (from == buf) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Apr 25 18:07: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 0A326D50926; Tue, 25 Apr 2017 18:07:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D02681C58; Tue, 25 Apr 2017 18:07:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3PI7mYh007045; Tue, 25 Apr 2017 18:07:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PI7mPL007042; Tue, 25 Apr 2017 18:07:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201704251807.v3PI7mPL007042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 25 Apr 2017 18:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317415 - 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: Tue, 25 Apr 2017 18:07:50 -0000 Author: gjb Date: Tue Apr 25 18:07:48 2017 New Revision: 317415 URL: https://svnweb.freebsd.org/changeset/base/317415 Log: Remove an incorrect MLINK for tree(3) introduced in r310728. Reported by: many PR: 216476 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/lib/libbsnmp/libbsnmp/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile Tue Apr 25 17:57:43 2017 (r317414) +++ head/lib/libbsnmp/libbsnmp/Makefile Tue Apr 25 18:07:48 2017 (r317415) @@ -72,7 +72,6 @@ MLINKS+= bsnmpagent.3 snmp_make_errresp. MLINKS+= bsnmpagent.3 snmp_op_t.3 MLINKS+= bsnmpagent.3 snmp_set.3 MLINKS+= bsnmpagent.3 snmp_trace.3 -MLINKS+= bsnmpagent.3 tree.3 MLINKS+= bsnmpagent.3 tree_size.3 MLINKS+= bsnmpclient.3 snmp_add_binding.3 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 17:57:43 2017 (r317414) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 18:07:48 2017 (r317415) @@ -870,7 +870,6 @@ OLD_FILES+=usr/share/man/man3/snmp_trace OLD_FILES+=usr/share/man/man3/snmp_value_copy.3.gz OLD_FILES+=usr/share/man/man3/snmp_value_free.3.gz OLD_FILES+=usr/share/man/man3/snmp_value_parse.3.gz -OLD_FILES+=usr/share/man/man3/tree.3.gz OLD_FILES+=usr/share/man/man3/tree_size.3.gz # usr.sbin/bsnmpd/bsnmpd OLD_FILES+=usr/share/man/man3/FIND_OBJECT_INT.3.gz From owner-svn-src-head@freebsd.org Tue Apr 25 18:08: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 19A54D50A01; Tue, 25 Apr 2017 18:08:58 +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 E84251F02; Tue, 25 Apr 2017 18:08:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3PI8uVP007253; Tue, 25 Apr 2017 18:08:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PI8uAj007246; Tue, 25 Apr 2017 18:08:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704251808.v3PI8uAj007246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 25 Apr 2017 18:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317416 - in head: gnu/usr.bin/gdb share/mk tools/build/mk tools/build/options usr.sbin/crashinfo 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, 25 Apr 2017 18:08:58 -0000 Author: jhb Date: Tue Apr 25 18:08:56 2017 New Revision: 317416 URL: https://svnweb.freebsd.org/changeset/base/317416 Log: Add a new GDB_LIBEXEC option to install gdb and kgdb to /usr/libexec. When this option is enabled, only gdb and kgdb are installed to /usr/libexec for use by crashinfo(8). Other bits of GDB such as gdbserver and gdbtui are not installed. For this option to be effective, GDB must be enabled. Rework r317094 to re-enable GDB on all platforms but enable GDB_LIBEXEC on platforms for which the GDB in ports is a superset of functionality. Reviewed by: emaste, kib Suggested by: kib Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10449 Added: head/tools/build/options/WITHOUT_GDB_LIBEXEC (contents, props changed) head/tools/build/options/WITH_GDB_LIBEXEC (contents, props changed) Modified: head/gnu/usr.bin/gdb/Makefile head/gnu/usr.bin/gdb/Makefile.inc head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/crashinfo/crashinfo.sh Modified: head/gnu/usr.bin/gdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/Makefile Tue Apr 25 18:07:48 2017 (r317415) +++ head/gnu/usr.bin/gdb/Makefile Tue Apr 25 18:08:56 2017 (r317416) @@ -1,9 +1,15 @@ # $FreeBSD$ -SUBDIR= libgdb gdb gdbtui kgdb +.include + +SUBDIR= libgdb gdb kgdb + +.if ${MK_GDB_LIBEXEC} == "no" +SUBDIR+= gdbtui .if exists(${.CURDIR}/gdbserver/reg-${MACHINE_CPUARCH}.c) SUBDIR+=gdbserver .endif +.endif .include Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Tue Apr 25 18:07:48 2017 (r317415) +++ head/gnu/usr.bin/gdb/Makefile.inc Tue Apr 25 18:08:56 2017 (r317416) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + VERSION= "6.1.1 [FreeBSD]" VENDOR= marcel @@ -53,6 +55,9 @@ GENSRCS+= nm.h tm.h CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H} GDB_SUFFIX= -${TARGET_ARCH} MAN= +.elif ${MK_GDB_LIBEXEC} != "no" +BINDIR?= /usr/libexec +MAN= .endif .include "${TARGET_SUBDIR}/Makefile" Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Apr 25 18:07:48 2017 (r317415) +++ head/share/mk/src.opts.mk Tue Apr 25 18:08:56 2017 (r317416) @@ -97,6 +97,7 @@ __DEFAULT_YES_OPTIONS = \ FTP \ GAMES \ GCOV \ + GDB \ GNU_DIFF \ GNU_GREP \ GPIO \ @@ -267,9 +268,9 @@ BROKEN_OPTIONS+=LLDB # does not yet contain kernel support for arm, and sparc64 kernel support # has not been tested. .if ${__T:Marm*} != "" || ${__T} == "sparc64" -__DEFAULT_YES_OPTIONS+=GDB +__DEFAULT_NO_OPTIONS+=GDB_LIBEXEC .else -__DEFAULT_NO_OPTIONS+=GDB +__DEFAULT_YES_OPTIONS+=GDB_LIBEXEC .endif # Only doing soft float API stuff on armv6 .if ${__T} != "armv6" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 18:07:48 2017 (r317415) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 18:08:56 2017 (r317416) @@ -2431,7 +2431,7 @@ OLD_FILES+=usr/bin/gcov OLD_FILES+=usr/share/man/man1/gcov.1.gz .endif -.if ${MK_GDB} == no +.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == yes OLD_FILES+=usr/bin/gdb OLD_FILES+=usr/bin/gdbserver OLD_FILES+=usr/bin/gdbtui @@ -2441,6 +2441,11 @@ OLD_FILES+=usr/share/man/man1/gdbserver. OLD_FILES+=usr/share/man/man1/kgdb.1.gz .endif +.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == no +OLD_FILES+=usr/libexec/gdb +OLD_FILES+=usr/libexec/kgdb +.endif + .if ${MK_GPIO} == no OLD_FILES+=usr/include/libgpio.h OLD_FILES+=usr/lib/libgpio.a Added: head/tools/build/options/WITHOUT_GDB_LIBEXEC ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_GDB_LIBEXEC Tue Apr 25 18:08:56 2017 (r317416) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to install +.Xr gdb 1 +into +.Pa /usr/bin . Added: head/tools/build/options/WITH_GDB_LIBEXEC ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_GDB_LIBEXEC Tue Apr 25 18:08:56 2017 (r317416) @@ -0,0 +1,10 @@ +.\" $FreeBSD$ +Set to install +.Xr gdb 1 +into +.Pa /usr/libexec . +This permits +.Xr gdb 1 +to be used as a fallback for +.Xr crashinfo 8 +if a newer version is not installed. Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Tue Apr 25 18:07:48 2017 (r317415) +++ head/usr.sbin/crashinfo/crashinfo.sh Tue Apr 25 18:08:56 2017 (r317416) @@ -35,6 +35,19 @@ usage() exit 1 } +# Find a gdb binary to use and save the value in GDB. +find_gdb() +{ + local binary + + for binary in /usr/local/bin/gdb /usr/libexec/gdb /usr/bin/gdb; do + if [ -x ${binary} ]; then + GDB=${binary} + return + fi + done +} + # Run a single gdb command against a kernel file in batch mode. # The kernel file is specified as the first argument and the command # is given in the remaining arguments. @@ -44,10 +57,10 @@ gdb_command() k=$1 ; shift - if [ -x /usr/local/bin/gdb ]; then - /usr/local/bin/gdb -batch -ex "$@" $k + if [ ${GDB} = /usr/local/bin/gdb ]; then + ${GDB} -batch -ex "$@" $k else - echo -e "$@" | /usr/bin/gdb -x /dev/stdin -batch $k + echo -e "$@" | ${GDB} -x /dev/stdin -batch $k fi } @@ -140,6 +153,12 @@ INFO=$CRASHDIR/info.$DUMPNR FILE=$CRASHDIR/core.txt.$DUMPNR HOSTNAME=`hostname` +find_gdb +if [ -z "$GDB" ]; then + echo "Unable to find a kernel debugger." + exit 1 +fi + if [ ! -e $VMCORE ]; then echo "$VMCORE not found" exit 1 @@ -189,11 +208,7 @@ file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then echo "bt" >> $file echo "quit" >> $file - if [ -x /usr/local/bin/kgdb ]; then - /usr/local/bin/kgdb $KERNEL $VMCORE < $file - else - kgdb $KERNEL $VMCORE < $file - fi + ${GDB%gdb}kgdb $KERNEL $VMCORE < $file rm -f $file echo fi From owner-svn-src-head@freebsd.org Tue Apr 25 18:30: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 18F6FD50218; Tue, 25 Apr 2017 18:30:21 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEBCBEA8; Tue, 25 Apr 2017 18:30:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3PIUHwL062646; Tue, 25 Apr 2017 11:30:17 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3PIUHdb062645; Tue, 25 Apr 2017 11:30:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704251830.v3PIUHdb062645@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317409 - head/contrib/tcpdump In-Reply-To: <201704251556.v3PFuk5U053547@repo.freebsd.org> To: Gleb Smirnoff Date: Tue, 25 Apr 2017 11:30:17 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 18:30:21 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: glebius > Date: Tue Apr 25 15:56:46 2017 > New Revision: 317409 > URL: https://svnweb.freebsd.org/changeset/base/317409 > > Log: > Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use after free Lets not use git hashes as references in commit messages, it has very little value for someone reading a log of changes looking for something. There is no promise that it can be found later (github can go Poof). > if tcpdump(1) is run on non-existent interface. > > Suggested by: zeising > > Modified: > head/contrib/tcpdump/tcpdump.c > > Modified: head/contrib/tcpdump/tcpdump.c > ============================================================================== > --- head/contrib/tcpdump/tcpdump.c Tue Apr 25 13:17:34 2017 (r317408) > +++ head/contrib/tcpdump/tcpdump.c Tue Apr 25 15:56:46 2017 (r317409) > @@ -1085,9 +1085,9 @@ open_interface(const char *device, netdi > /* > * Return an error for our caller to handle. > */ > - pcap_close(pc); > snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s: %s\n(%s)", > device, pcap_statustostr(status), cp); > + pcap_close(pc); > return (NULL); > } else if (status == PCAP_ERROR_PERM_DENIED && *cp != '\0') > error("%s: %s\n(%s)", device, > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Apr 25 18:33: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 1F2B5D503A3; Tue, 25 Apr 2017 18:33:40 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x22b.google.com (mail-oi0-x22b.google.com [IPv6:2607:f8b0:4003:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D767737D; Tue, 25 Apr 2017 18:33:39 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x22b.google.com with SMTP id x184so183325039oia.1; Tue, 25 Apr 2017 11:33:39 -0700 (PDT) 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=xUQUCUm9zYbvKUA9mU1Q+KKv7NRdkP4b3Oy3MvetNvQ=; b=kQWdp1mFma+40vVNHtIVQBnCc4p06EQnVTH6zb4Z2cagdkz8wUZD+Bbp+qKI72aYXH 7jmi9Yd/2X9PDX26U8vWbpJK1EfiJBXAHvBqCAfVEM1P95jhQRNfBC+Lx1k7pC+7okkv 51Jm+8g7zNr8k0X6Mvg9A6aiuSkCgeLE69wNpd9Z2ItUTu+wyCofiUY1BX/rz1bADqu0 3/1LBpeJ/5IErHKRCLJ/TvAeSfDS/xlUVTq49F48JEkabynalkc7h1dBmqRgxYnYAb4w DbS8i7mejT7IlPHJeD5XWoFGQqFVdACDmcqMjZWtEOMfmXcv/rgKrIeSaawWVpT71hdZ 9gJg== 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=xUQUCUm9zYbvKUA9mU1Q+KKv7NRdkP4b3Oy3MvetNvQ=; b=o1+5KVynUyAo2oUJ8N5UbfDFy0fzpA9MTyRv2WQP1VfstP/ckF+U5loQsLNCBDzAP4 0D0gEUeoqnmM4QZe7FQzBtQsuu/CO+w4dzUGwM3eeOon4t/VUocpJCqdlFrnV8SfwsMP 7aqltctMCE2gYlMRJ63UH+P4VrsX5E4adp1LaG1ruwAmtkWPAQhOqsrz7HQgigzJUjvM 1a8hcn+xNyylIlADH9ryl9AjXgndItnB5bTAXvNh1jZa1oxn5fHqmLsiQNxoZg+zvzbz 5EpGwfXA0xfK6wz3V9T0E6Cpx5denpShK2zCF79jWUgzTz13lvzYaaz016CNoC4agJxZ OJ9g== X-Gm-Message-State: AN3rC/5d6XXft8nuZvati1EFKwULYGC+OEgG9Vein62FJ4izN4oepbNB /51jWP/PRwsDIYz8dncDvQcWMfpCgQ== X-Received: by 10.157.2.101 with SMTP id 92mr20463985otb.52.1493145219097; Tue, 25 Apr 2017 11:33:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.50.133 with HTTP; Tue, 25 Apr 2017 11:33:38 -0700 (PDT) In-Reply-To: <201704251830.v3PIUHdb062645@pdx.rh.CN85.dnsmgr.net> References: <201704251556.v3PFuk5U053547@repo.freebsd.org> <201704251830.v3PIUHdb062645@pdx.rh.CN85.dnsmgr.net> From: Benjamin Kaduk Date: Tue, 25 Apr 2017 13:33:38 -0500 Message-ID: Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: rgrimes@freebsd.org Cc: Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Tue, 25 Apr 2017 18:33:40 -0000 On Tue, Apr 25, 2017 at 1:30 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: glebius > > Date: Tue Apr 25 15:56:46 2017 > > New Revision: 317409 > > URL: https://svnweb.freebsd.org/changeset/base/317409 > > > > Log: > > Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use > after free > > Lets not use git hashes as references in commit messages, > it has very little value for someone reading a log of changes > looking for something. There is no promise that it can be > found later (github can go Poof). > On the contrary, a git SHA1 seems like an eminently stable and unique search parameter! I agree that a commit log should inline some summary of the change as well as provide a link to the external source, but I am not worried that a future reader will be unable to find the referenced commit. -Ben From owner-svn-src-head@freebsd.org Tue Apr 25 19:07: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 62EDDD50ED2; Tue, 25 Apr 2017 19:07:24 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3665ECBB; Tue, 25 Apr 2017 19:07:24 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3PJ7MTs062850; Tue, 25 Apr 2017 12:07:22 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3PJ7Mxv062849; Tue, 25 Apr 2017 12:07:22 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704251907.v3PJ7Mxv062849@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317409 - head/contrib/tcpdump In-Reply-To: To: Benjamin Kaduk Date: Tue, 25 Apr 2017 12:07:22 -0700 (PDT) CC: rgrimes@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 19:07:24 -0000 [ Charset UTF-8 unsupported, converting... ] > On Tue, Apr 25, 2017 at 1:30 PM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > > Author: glebius > > > Date: Tue Apr 25 15:56:46 2017 > > > New Revision: 317409 > > > URL: https://svnweb.freebsd.org/changeset/base/317409 > > > > > > Log: > > > Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use > > after free > > > > Lets not use git hashes as references in commit messages, > > it has very little value for someone reading a log of changes > > looking for something. There is no promise that it can be > > found later (github can go Poof). > > > > On the contrary, a git SHA1 seems like an eminently stable and unique > search parameter! > I agree that a commit log should inline some summary of the change as well > as provide a > link to the external source, but I am not worried that a future reader will > be unable to find > the referenced commit. There is no administrative policy in place that says github users shall maintain there history. I had too many indirections to find this change on github: commitlog -> google -> wrong article that references this sha1 -> actual commit I re-iterate lets NOT start to use git hashes in our commit messages. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Apr 25 19:29: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 72FDDD50648; Tue, 25 Apr 2017 19:29:03 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37EFDCC0; Tue, 25 Apr 2017 19:29:03 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-oi0-x235.google.com with SMTP id w12so72205499oiw.3; Tue, 25 Apr 2017 12:29:03 -0700 (PDT) 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=svozjf1ekSzWNJS3UFfZTYfvNzf2ocD+brmTfiEYasw=; b=EySjX6H6Dt0zkoMhW0auAtWjANY56ZMFPLmamVxSpU+EWV+j7Hise9qzeRI2qA9UXq dRoMaGxFRzMHjF16Q15FVeT6ySfol14diVPptrOSlV7NIX6mMm6OmkZwziTd+ACNYXnd zUpoVcOpgOS8DtSN0Z/zwbX5AbPturcmvVQD7u6J+MSaKvBty+oJutSCUirEs0xWhmB2 XcFP+14SAXrBN5naTEzjcKBSP2KI0GjLuc1pqv2EscatQGRm5Avvhuo2ZGbJK8mXHU0I q/eJt+DXsyu+Llq/HNkklSXbWlXGhybrRDXvnQv0AWmE2Mg55eRd3Ym+xzoLx9VwyF4W Mygg== 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=svozjf1ekSzWNJS3UFfZTYfvNzf2ocD+brmTfiEYasw=; b=ZSQczeBP0ufUO7l+bs2sZBPFBLCtgA8SzXr7SSkVTQHlIWIw+myp8oJc7ED2fd+Z7R 1/+0U2QWnsHAIgJbfZImdSLZYnCEi5B4Q6pgNrJP6Lr39MKiGWLw7sgo5ghZOSZbK07Z I8y8vWOmjD4yADIq3St/usgbPJOebg0h7uSgofp5K5bYCoUiyOeRYkELwZSUm94xFHbl FfAP6C+grQ8sknhRTWY2+XDOjNaNE4xjKVzikcLwjM32CVpiBT53lagJ4qcuoC1xE76J DeCWP4n89YFgCAwYmiMmBISViMfgHz/KKTVotsy3y8ULujE6BnExfkGD8Utxxn0+U4UL cK1Q== X-Gm-Message-State: AN3rC/58OzzFmrShvUVl9JeoTgk4RlHDlxIyrz8AlPUmeSl796Py3Si9 HeBVKsP5OuAekMCMTVjC9uCOs0avsw== X-Received: by 10.202.102.206 with SMTP id m75mr16146770oik.206.1493148542491; Tue, 25 Apr 2017 12:29:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.22.141 with HTTP; Tue, 25 Apr 2017 12:29:01 -0700 (PDT) In-Reply-To: <201704251907.v3PJ7Mxv062849@pdx.rh.CN85.dnsmgr.net> References: <201704251907.v3PJ7Mxv062849@pdx.rh.CN85.dnsmgr.net> From: Xin LI Date: Tue, 25 Apr 2017 12:29:01 -0700 Message-ID: Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: rgrimes@freebsd.org Cc: Benjamin Kaduk , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Tue, 25 Apr 2017 19:29:03 -0000 On Tue, Apr 25, 2017 at 12:07 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> On Tue, Apr 25, 2017 at 1:30 PM, Rodney W. Grimes < >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: >> >> > [ Charset UTF-8 unsupported, converting... ] >> > > Author: glebius >> > > Date: Tue Apr 25 15:56:46 2017 >> > > New Revision: 317409 >> > > URL: https://svnweb.freebsd.org/changeset/base/317409 >> > > >> > > Log: >> > > Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use >> > after free >> > >> > Lets not use git hashes as references in commit messages, >> > it has very little value for someone reading a log of changes >> > looking for something. There is no promise that it can be >> > found later (github can go Poof). >> > >> >> On the contrary, a git SHA1 seems like an eminently stable and unique >> search parameter! >> I agree that a commit log should inline some summary of the change as well >> as provide a >> link to the external source, but I am not worried that a future reader will >> be unable to find >> the referenced commit. > > There is no administrative policy in place that says github users shall > maintain there history. Anyone who have a copy of the git repository would be able to 'git show 5d3c5151c2b885aab36627bafb8539238da27b2d' and prove (arguably, SHA1 is now broken, but it's still better than referencing e.g. a CVS or SVN revision), and the location of the repository is publicly known. > I had too many indirections to find this change on github: > commitlog -> google -> wrong article that references this sha1 -> actual commit > > I re-iterate lets NOT start to use git hashes in our commit messages. I don't see any problem with Gleb's commit message, it have referenced the original commit using the right notion (Git SHA1) and have included a brief description of what was done at the same time. From owner-svn-src-head@freebsd.org Tue Apr 25 19:33: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 62F5DD50873; Tue, 25 Apr 2017 19:33:23 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::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 2634B1174; Tue, 25 Apr 2017 19:33:23 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x230.google.com with SMTP id w12so72348304oiw.3; Tue, 25 Apr 2017 12:33:23 -0700 (PDT) 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=e8JEklOHsaIcRfy9NMKa8JL7UaQahwucGF+VSmo9M0s=; b=DF+3/DkGyzaECe7ScqwBrqrtRqduCtmtZqpyFjl05Rq+JxPX0fw/45wjQTPv3rU2vq cH0not8JDHOmkNbbqIklfg74l1L1OHSaSwQMSP9eguENgPzQFuDQlnv3Gp+g6Nb4KUHP BdWu+dcDXvsmNITqLgF5dYoWOwMtAvt/0kFs0h+EUGGtQTQCwggFv/yOyKbnBmdf9XDN MX4QEth2ZUvOatt/6LHTYXnCJGywtawM0EGoYEn869W+h+n7KuR5bG/H0ok+0rkFz/6q L/FRSfplvYWlz/qIh+A2UJbyTZpwvRhSRFILQOEKuyypOB2XCIpXlSu5AwkvgMVwBtVK 6x6Q== 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=e8JEklOHsaIcRfy9NMKa8JL7UaQahwucGF+VSmo9M0s=; b=LiOHe9KtOsPN9w7BqKMyUSM2TENa+eojg7430LxBpS0KL33LTeS3kd2Sl4oyxik0rq 1UX7EWP1QgASyJEsWcbYnGzaDzKcNNN2aeYvL6D909CILUcGevQ93CtSz1XSpBRES9PU tVs2wqvqW0DJzl56wLYCF59LowUASV3iKqyTEJL2i/lev6T9e4q9Xu8HCyL18qZHuMrv /30wYW9WMmy5O8WDlR1jdV1ozNtrhOk8oWkQ082VdhqQx+PJUVe4PrEiD6Dz1U+FLKmY +d77dYEwxGAEnhFP58MkwpccXVQCZTd3wQ2AWkchAs2P2L2f1JpcpGB47oCiIvMM2sAp 671A== X-Gm-Message-State: AN3rC/6MAZUXpETaV4QJFtE4GpoVChu2JXYXYnLJKpImYdBvgDmG7p5y I2GpZxKLFBeQqo0jtiWkfIkBVcREEw== X-Received: by 10.157.17.82 with SMTP id p18mr22362775otp.222.1493148802288; Tue, 25 Apr 2017 12:33:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.50.133 with HTTP; Tue, 25 Apr 2017 12:33:21 -0700 (PDT) In-Reply-To: <201704251907.v3PJ7Mxv062849@pdx.rh.CN85.dnsmgr.net> References: <201704251907.v3PJ7Mxv062849@pdx.rh.CN85.dnsmgr.net> From: Benjamin Kaduk Date: Tue, 25 Apr 2017 14:33:21 -0500 Message-ID: Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: rgrimes@freebsd.org Cc: Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Tue, 25 Apr 2017 19:33:23 -0000 On Tue, Apr 25, 2017 at 2:07 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > > > On the contrary, a git SHA1 seems like an eminently stable and unique > > search parameter! > > I agree that a commit log should inline some summary of the change as > well > > as provide a > > link to the external source, but I am not worried that a future reader > will > > be unable to find > > the referenced commit. > > There is no administrative policy in place that says github users shall > maintain there history. > > That is correct. Nor should there be! (However, even if they change their history, the direct link to a commit will still work, due to the way the github implementation works -- you have to delete and recreate a repository in order to fully expunge a commit.) I don't expect the previous parenthetical to provide any persuasive value, of course, as you have to know where to look before it's useful. But, right now there are some 300-odd forks of tcpdump on github, no doubt including Gleb. If the-tcpdump-group goes away, there's a lot of backups, not just in github forks but also the local clones of people using github. Do you really think that the collapse of such a prominent project would leave an unarchived void? I don't understand what scenario you're trying to protect against, basically. > I had too many indirections to find this change on github: > commitlog -> google -> wrong article that references this sha1 -> actual > commit > > I re-iterate lets NOT start to use git hashes in our commit messages. > I'm sorry, but I must continue to oppose this sentiment. I would prefer a full (github or otherwise) URL including the commit hash to just a bare commit hash, but find either acceptable and adequate for the purpose. (FWIW, the correct commit was the top google hit for me.) I hope we are in agreement that commit messages ought to still include some description of what change is being brought in, in addition to the hash/link, though. -Ben From owner-svn-src-head@freebsd.org Tue Apr 25 19:54: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 542CFD5007C; Tue, 25 Apr 2017 19:54:36 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 261B9CA; Tue, 25 Apr 2017 19:54:36 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3PJsZ8S051985; Tue, 25 Apr 2017 19:54:35 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PJsZhY051984; Tue, 25 Apr 2017 19:54:35 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201704251954.v3PJsZhY051984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Tue, 25 Apr 2017 19:54:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317421 - 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, 25 Apr 2017 19:54:36 -0000 Author: pkelsey Date: Tue Apr 25 19:54:34 2017 New Revision: 317421 URL: https://svnweb.freebsd.org/changeset/base/317421 Log: Remove unnecessary check for NULL mbuf in soreceive_generic(). This check has been redundant since it was introduced in r162554. Reviewed by: emaste, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10322 Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Apr 25 19:48:25 2017 (r317420) +++ head/sys/kern/uipc_socket.c Tue Apr 25 19:54:34 2017 (r317421) @@ -1766,7 +1766,7 @@ dontblock: * requires MT_SONAME mbufs at the head of * each record. */ - if (m && pr->pr_flags & PR_ATOMIC && + if (pr->pr_flags & PR_ATOMIC && ((flags & MSG_PEEK) == 0)) (void)sbdroprecord_locked(&so->so_rcv); SOCKBUF_UNLOCK(&so->so_rcv); From owner-svn-src-head@freebsd.org Tue Apr 25 20:10: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 9D68ED504E1; Tue, 25 Apr 2017 20:10:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57CE8A78; Tue, 25 Apr 2017 20:10:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3PKA1Mo063113; Tue, 25 Apr 2017 13:10:01 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3PKA0ba063109; Tue, 25 Apr 2017 13:10:00 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317409 - head/contrib/tcpdump In-Reply-To: To: Benjamin Kaduk Date: Tue, 25 Apr 2017 13:10:00 -0700 (PDT) CC: rgrimes@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 20:10:05 -0000 > On Tue, Apr 25, 2017 at 2:07 PM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > On the contrary, a git SHA1 seems like an eminently stable and unique > > > search parameter! > > > I agree that a commit log should inline some summary of the change as > > well > > > as provide a > > > link to the external source, but I am not worried that a future reader > > will > > > be unable to find > > > the referenced commit. > > > > There is no administrative policy in place that says github users shall > > maintain there history. > > > > > That is correct. Nor should there be! > > (However, even if they change their history, the direct link to a commit > will still work, > due to the way the github implementation works -- you have to delete and > recreate > a repository in order to fully expunge a commit.) > > I don't expect the previous parenthetical to provide any persuasive value, > of course, > as you have to know where to look before it's useful. But, right now there > are some > 300-odd forks of tcpdump on github, no doubt including Gleb. If > the-tcpdump-group > goes away, there's a lot of backups, not just in github forks but also the > local clones > of people using github. Do you really think that the collapse of such a > prominent > project would leave an unarchived void? I don't understand what scenario > you're trying > to protect against, basically. This is the first time I have seen a raw git1 sha used in the body of the commit message, at best it should be in a Obtained From: Are there other commits that use a raw git sha1 as the explination for the commit, with or without supporting text? > > I had too many indirections to find this change on github: > > commitlog -> google -> wrong article that references this sha1 -> actual > > commit > > > > I re-iterate lets NOT start to use git hashes in our commit messages. > > > > I'm sorry, but I must continue to oppose this sentiment. I would prefer a And so we stand opposed. > full > (github or otherwise) URL including the commit hash to just a bare commit > hash, > but find either acceptable and adequate for the purpose. (FWIW, the > correct commit > was the top google hit for me.) > > I hope we are in agreement that commit messages ought to still include some > description of what change is being brought in, in addition to the > hash/link, though. Commit messages should stand complete and alone, without need to refernce outside material to understand what was changed and why it was changed. Again, at best Obtained From: should of been a usable url. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Apr 25 20:24: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 5CE13D50E4B; Tue, 25 Apr 2017 20:24:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E43D69CA; Tue, 25 Apr 2017 20:24:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA12043; Tue, 25 Apr 2017 23:24:39 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1d370p-0003a6-LN; Tue, 25 Apr 2017 23:24:39 +0300 Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: rgrimes@FreeBSD.org, Benjamin Kaduk Cc: Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> From: Andriy Gapon Message-ID: <80e98486-d917-1338-c1ea-e1f38d40f4fd@FreeBSD.org> Date: Tue, 25 Apr 2017 23:23:35 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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, 25 Apr 2017 20:24:49 -0000 On 25/04/2017 23:10, Rodney W. Grimes wrote: > This is the first time I have seen a raw git1 sha used in the body of > the commit message, at best it should be in a Obtained From: > > Are there other commits that use a raw git sha1 as the explination > for the commit, with or without supporting text? All OpenZFS imports use a Git commit ID as a reference to the original commit. -- Andriy Gapon From owner-svn-src-head@freebsd.org Tue Apr 25 20:28: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 274E0D50F2C; Tue, 25 Apr 2017 20:28: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 F1FEEBB5; Tue, 25 Apr 2017 20:28:35 +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 B745B10A7B9; Tue, 25 Apr 2017 16:28:27 -0400 (EDT) From: John Baldwin To: rgrimes@freebsd.org Cc: Benjamin Kaduk , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r317409 - head/contrib/tcpdump Date: Tue, 25 Apr 2017 13:28:19 -0700 Message-ID: <9709200.gDHZIeQ1vL@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> 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); Tue, 25 Apr 2017 16:28:27 -0400 (EDT) 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: Tue, 25 Apr 2017 20:28:36 -0000 On Tuesday, April 25, 2017 01:10:00 PM Rodney W. Grimes wrote: > > full > > (github or otherwise) URL including the commit hash to just a bare commit > > hash, > > but find either acceptable and adequate for the purpose. (FWIW, the > > correct commit > > was the top google hit for me.) > > > > I hope we are in agreement that commit messages ought to still include some > > description of what change is being brought in, in addition to the > > hash/link, though. > > Commit messages should stand complete and alone, without need to refernce > outside material to understand what was changed and why it was changed. > Again, at best Obtained From: should of been a usable url. I think this is perhaps the point of contention, and I think while the sentiment is correct, I would not apply it to this commit. The commit message should indeed describe what is going on, but having a citation inline vs in the footnotes isn't invalid in and of itself. (FWIW, Obtained From generally references another project rather than a single commit, so 'Obtained From: FooBSD', or 'Obtained from: tcpdump') We also make several references to other source code revisions in outside repositories in commits. Just look at commits to makefs that refer to CVS revisions when merging changes from NetBSD, or any of the changes to ZFS that always reference the revision identifier from illumos. I do think that when referring to a Git hash the citation should also include something to identify which repository it came from. It doesn't have to be a URL per se (we just use 'NetBSD' for makefs, not a full URL to NetBSD's cvsweb), but it should be clear enough that one can find the corresponding repository. Probably that information belongs in 'Obtained From'. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Apr 25 20:38: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 C572DD4F2F1; Tue, 25 Apr 2017 20:38:33 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8973D137B; Tue, 25 Apr 2017 20:38:33 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x236.google.com with SMTP id w12so74395664oiw.3; Tue, 25 Apr 2017 13:38:33 -0700 (PDT) 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=pN+V0mZJhsk/P07ONcunuJ0twJZZ23SeeWXzOVSTvzU=; b=mwcz0AThBUPxPqQ/hsD7YbNCjkgr6nZmRnQwjSuL08rhEszoa449LYopK1QGm+JqPg mRGd2eAkG8yRwEFQPYVl9zxTBlRwn8ojz74hrmegc2IDV6g94aOYzknkQ9O/Q1RlEZF5 EHo6jt1sIWGmsLaCIyReQwBXZRFyJJ2gBwLK3WUlC3VNkRXo8zvK6RY/umAyK60fxsqx lO8fZ9TPpzvQn5VSbZrJMqrSl6fx8UHFjxuYb+GeQbDCI36G5NUOffIh/LNV++VCaP9K 2hIhTI0AvQCZh2ytfZllRlP0C4Rk4+MW9i6MYtcVzJfW66AeRryElSYnrakRsVgElTfH Rk7Q== 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=pN+V0mZJhsk/P07ONcunuJ0twJZZ23SeeWXzOVSTvzU=; b=W9Ih9OC0aPleAZ/cCZGPwmeb0k6gs2SCIB1A7n0oKz5iuFrq3BMhg1BrPC6aDQ3nDY LcMFbFAX5dWzzX13cgVhRFm5v0eCLYBdWWCK+EWQEqGXDf/WiBCUnTxAxqqlPnVw2DFF Jj/PGP9kapHsjkL8ftNKB/7bHGpFELVx0x6yHWh6x0jrTqfa5dIvctwoVkXUEoJl8mmg j4VNyOZ4wZlI2caLV7dZzGkK+shNzeglgWHLPr18sHofmoB/g0VbYVICYofJVD7RB4VI 6kIlSXGsZPlM1q54xA2zFN/q7x4gAyyO0Vw+TuCbGpxcnP08/+NgneagTxYUtFwdKbPK DTZw== X-Gm-Message-State: AN3rC/7fI+NvGO5E51TglciWCRjScPMuSoRvxfCjdLTdrA5l0iQTanpK bUTXgi9PrBE+OnPUjMxNVA3AX1Fr+YDz X-Received: by 10.157.7.170 with SMTP id 39mr19229019oto.120.1493152712829; Tue, 25 Apr 2017 13:38:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.50.133 with HTTP; Tue, 25 Apr 2017 13:38:32 -0700 (PDT) In-Reply-To: <9709200.gDHZIeQ1vL@ralph.baldwin.cx> References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> <9709200.gDHZIeQ1vL@ralph.baldwin.cx> From: Benjamin Kaduk Date: Tue, 25 Apr 2017 15:38:32 -0500 Message-ID: Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: John Baldwin Cc: rgrimes@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Tue, 25 Apr 2017 20:38:33 -0000 On Tue, Apr 25, 2017 at 3:28 PM, John Baldwin wrote: > > I do think that when referring to a Git hash the citation should also > include > something to identify which repository it came from. It doesn't have to > be a > URL per se (we just use 'NetBSD' for makefs, not a full URL to NetBSD's > cvsweb), but it should be clear enough that one can find the corresponding > repository. Probably that information belongs in 'Obtained From'. > Since Rodney asked and I already have the svn log up, here are some existing commits that are doing similar sorts of things: r317267 is typical of the illumos/ZFS imports though sometimes a full github URL is used, as in r316695 r316665 pulls from Concurrency Kit (I think; CK was not expanded in the commit message :( ) r315947 from libcxxrt r315926 and a few previous revisions from dragonflybsd.git r315745 from libcxxrt r314435 again from CK and we're not even out of 2017 yet. -Ben From owner-svn-src-head@freebsd.org Tue Apr 25 21: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 11A2FD503EC; Tue, 25 Apr 2017 21:26:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD12F135; Tue, 25 Apr 2017 21:26:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id E89F736F7; Tue, 25 Apr 2017 21:26:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id B533B79E9; Tue, 25 Apr 2017 21:26:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 3WzPXhTwbSxH; Tue, 25 Apr 2017 21:26:15 +0000 (UTC) Subject: Re: svn commit: r317409 - head/contrib/tcpdump DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com F2B9279E4 To: Benjamin Kaduk , John Baldwin References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> <9709200.gDHZIeQ1vL@ralph.baldwin.cx> Cc: rgrimes@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Tue, 25 Apr 2017 14:26:06 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WMlkGTGa6kleJW1gNWMJkCATnISu5dEml" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 21:26:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WMlkGTGa6kleJW1gNWMJkCATnISu5dEml Content-Type: multipart/mixed; boundary="8rSAfEUsWKNufUJ4lJdmaagpfJAejjWtX"; protected-headers="v1" From: Bryan Drewery To: Benjamin Kaduk , John Baldwin Cc: rgrimes@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Message-ID: Subject: Re: svn commit: r317409 - head/contrib/tcpdump References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> <9709200.gDHZIeQ1vL@ralph.baldwin.cx> In-Reply-To: --8rSAfEUsWKNufUJ4lJdmaagpfJAejjWtX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/25/2017 1:38 PM, Benjamin Kaduk wrote: > On Tue, Apr 25, 2017 at 3:28 PM, John Baldwin > wrote: >=20 >=20 > I do think that when referring to a Git hash the citation should > also include > something to identify which repository it came from. It doesn't > have to be a > URL per se (we just use 'NetBSD' for makefs, not a full URL to NetB= SD's > cvsweb), but it should be clear enough that one can find the > corresponding > repository. Probably that information belongs in 'Obtained From'. >=20 >=20 > Since Rodney asked and I already have the svn log up, here are some exi= sting > commits that are doing similar sorts of things: > r317267 is typical of the illumos/ZFS imports > though sometimes a full github URL is used, as in r316695 > r316665 pulls from Concurrency Kit (I think; CK was not expanded in the= > commit message :( ) > r315947 from libcxxrt > r315926 and a few previous revisions from dragonflybsd.git > r315745 from libcxxrt > r314435 again from CK >=20 > and we're not even out of 2017 yet. >=20 Plus if tcpdump were using SVN then we would refer to an SVN revision here. If it were using CVS then a CVS revision. Like this commit in FreeBSD: > -----------------------------------------------------------------------= - > r306349 | pfg | 2016-09-26 09:06:50 -0700 (Mon, 26 Sep 2016) | 7 lines > Changed paths: > M /head/lib/libc/db/hash/hash_page.c >=20 > hash(3): protect in-memory page when using cross-endianness. >=20 > When writing out pages in the "other endian" format, make a copy > instead of trashing the in-memory one. >=20 > Obtained from: NetBSD (CVS rev. 1.29) >=20 > -----------------------------------------------------------------------= - It is definitely more useful to note which repository and what VCS system the revision/hash/version refers to. But there's nothing inherently wrong about using a git hash. Github !=3D git. It is merely a= n interface to git and is not required to use any of the git repositories on it given another mirror or local checkout. If a project uses git as their official VCS then a git hash is the proper reference. --=20 Regards, Bryan Drewery --8rSAfEUsWKNufUJ4lJdmaagpfJAejjWtX-- --WMlkGTGa6kleJW1gNWMJkCATnISu5dEml Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJY/774AAoJEDXXcbtuRpfPqK8IAJa5cJknpC1utjzGN4oJbzU0 CRrKWxaP1Qujlu5yY1lYLmRn2X1k5poxQY6Pb5VeGx5H7b6eDJMnhLIx8mx8RMBe YFZ8oQ33Zh3ynsx6t5EXvaU8+oHOXS+xiHwgKVeHGsI75LQD/WEGgyKErRJjoK6D xuSdDZOAxEYekEoMr5mltZGkWqtj+dAPj9wyGZAFXrM1CmBKVbiOlWugZDbiXJOP fRw7tKr+2l0L6iWSzWcDjFIvOvKum2/VOj7zAwEhZha03JAS9+gzF0hRZ31tywLt odNLIw0trvG18Uxg/Qg4j7VdLzPLgMmDqP7HTeQX32qT4HwNa6W/3JEVBPgzVsM= =mFu4 -----END PGP SIGNATURE----- --WMlkGTGa6kleJW1gNWMJkCATnISu5dEml-- From owner-svn-src-head@freebsd.org Tue Apr 25 21:59: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 0ED20D50F7F; Tue, 25 Apr 2017 21:59:37 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF29814E2; Tue, 25 Apr 2017 21:59:36 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3PLxZ5e000554; Tue, 25 Apr 2017 21:59:35 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PLxYRR000543; Tue, 25 Apr 2017 21:59:34 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704252159.v3PLxYRR000543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 25 Apr 2017 21:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317424 - in head: . etc etc/defaults etc/rc.d rescue/rescue share/man/man5 share/man/man7 tools/build/mk 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, 25 Apr 2017 21:59:37 -0000 Author: brooks Date: Tue Apr 25 21:59:34 2017 New Revision: 317424 URL: https://svnweb.freebsd.org/changeset/base/317424 Log: Remove NATM configuration bits and assorted NATM and ATM remnants. Reported by: ak Reviewed by: ngie (first version) Differential Revision: https://reviews.freebsd.org/D10497 Deleted: head/etc/rc.d/atm1 head/etc/rc.d/atm2 head/etc/rc.d/atm3 Modified: head/ObsoleteFiles.inc head/etc/defaults/rc.conf head/etc/netstart head/etc/network.subr head/etc/rc.d/Makefile head/etc/rc.d/routing head/rescue/rescue/Makefile head/share/man/man5/rc.conf.5 head/share/man/man7/hier.7 head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/kdump/kdump.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Apr 25 20:34:56 2017 (r317423) +++ head/ObsoleteFiles.inc Tue Apr 25 21:59:34 2017 (r317424) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20170425: NATM configuration support removed +OLD_FILES+=etc/rc.d/atm1 +OLD_FILES+=etc/rc.d/atm2 +OLD_FILES+=etc/rc.d/atm3 # 20170424: NATM support removed OLD_FILES+=rescue/atmconfig OLD_FILES+=sbin/atmconfig Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Tue Apr 25 20:34:56 2017 (r317423) +++ head/etc/defaults/rc.conf Tue Apr 25 21:59:34 2017 (r317424) @@ -408,7 +408,6 @@ defaultrouter="NO" # Set to default gat static_arp_pairs="" # Set to static ARP list (or leave empty). static_ndp_pairs="" # Set to static NDP list (or leave empty). static_routes="" # Set to static route list (or leave empty). -natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. routed_enable="NO" # Set to YES to enable a routing daemon. routed_program="/sbin/routed" # Name of routing daemon to use if enabled. @@ -417,17 +416,6 @@ arpproxy_all="NO" # replaces obsolete k forward_sourceroute="NO" # do source routing (only if gateway_enable is set to "YES") accept_sourceroute="NO" # accept source routed packets to us -### ATM interface options: ### -atm_enable="NO" # Configure ATM interfaces (or NO). -#atm_netif_hea0="atm 1" # Network interfaces for physical interface. -#atm_sigmgr_hea0="uni31" # Signalling manager for physical interface. -#atm_prefix_hea0="ILMI" # NSAP prefix (UNI interfaces only) (or ILMI). -#atm_macaddr_hea0="NO" # Override physical MAC address (or NO). -#atm_arpserver_atm0="0x47.0005.80.999999.9999.9999.9999.999999999999.00" # ATMARP server address (or local). -#atm_scsparp_atm0="NO" # Run SCSP/ATMARP on network interface (or NO). -atm_pvcs="" # Set to PVC list (or leave empty). -atm_arps="" # Set to permanent ARP list (or leave empty). - ### Bluetooth ### hcsecd_enable="NO" # Enable hcsecd(8) (or NO) hcsecd_config="/etc/bluetooth/hcsecd.conf" # hcsecd(8) configuration file Modified: head/etc/netstart ============================================================================== --- head/etc/netstart Tue Apr 25 20:34:56 2017 (r317423) +++ head/etc/netstart Tue Apr 25 21:59:34 2017 (r317424) @@ -44,9 +44,6 @@ _start=quietstart /etc/rc.d/ipnat ${_start} /etc/rc.d/ipfs ${_start} /etc/rc.d/sppp ${_start} -# /etc/rc.d/atm1 ${_start} -# . /etc/rc.d/atm2.sh ${_start} -# . /etc/rc.d/atm3.sh ${_start} /etc/rc.d/netif ${_start} /etc/rc.d/ipsec ${_start} /etc/rc.d/ppp ${_start} Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Tue Apr 25 20:34:56 2017 (r317423) +++ head/etc/network.subr Tue Apr 25 21:59:34 2017 (r317424) @@ -489,13 +489,6 @@ afexists() inet|inet6) check_kern_features ${_af} ;; - atm) - if [ -x /sbin/atmconfig ]; then - /sbin/atmconfig diag list > /dev/null 2>&1 - else - return 1 - fi - ;; link|ether) return 0 ;; Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Tue Apr 25 20:34:56 2017 (r317423) +++ head/etc/rc.d/Makefile Tue Apr 25 21:59:34 2017 (r317424) @@ -159,14 +159,6 @@ APM+= apmd APMPACKAGE= apm .endif -.if ${MK_ATM} != "no" -FILESGROUPS+= ATM -ATM+= atm1 -ATM+= atm2 -ATM+= atm3 -ATMPACKAGE= atm -.endif - .if ${MK_AUTOFS} != "no" FILES+= automount FILES+= automountd Modified: head/etc/rc.d/routing ============================================================================== --- head/etc/rc.d/routing Tue Apr 25 20:34:56 2017 (r317423) +++ head/etc/rc.d/routing Tue Apr 25 21:59:34 2017 (r317424) @@ -36,7 +36,7 @@ routing_start() case $_af in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) - for _a in inet inet6 atm; do + for _a in inet inet6; do afexists $_a || continue setroutes $_cmd $_a $_if || _ret=1 done @@ -65,7 +65,7 @@ routing_stop() case $_af in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) - for _a in inet inet6 atm; do + for _a in inet inet6; do afexists $_a || continue eval static_${_a} delete $_if # When $_if is specified, do not flush routes. @@ -126,11 +126,6 @@ routing_stop_inet6() done } -routing_stop_atm() -{ - return 0 -} - get_fibmod() { local _fibs @@ -289,23 +284,6 @@ static_inet6() sysctl net.inet6.ip6.use_defaultzone=1 } -static_atm() -{ - local _action i route_args - _action=$1 - - if [ -n "${natm_static_routes}" ]; then - for i in ${natm_static_routes}; do - route_args=`get_if_var $i route_IF` - if [ -n "$route_args" ]; then - atmconfig natm ${_action} ${route_args} - else - warn "route_${i} not found." - fi - done - fi -} - ropts_init() { if [ -z "${_ropts_initdone}" ]; then @@ -391,12 +369,5 @@ options_inet6() [ -n "${_ropts_initdone}" ] && echo '.' } -options_atm() -{ - _ropts_initdone= - - [ -n "${_ropts_initdone}" ] && echo '.' -} - load_rc_config $name run_rc_command "$@" Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Tue Apr 25 20:34:56 2017 (r317423) +++ head/rescue/rescue/Makefile Tue Apr 25 21:59:34 2017 (r317424) @@ -156,9 +156,6 @@ CRUNCH_PROGS_sbin+= bsdlabel fdisk CRUNCH_ALIAS_bsdlabel= disklabel .endif -CRUNCH_SRCDIR_atm= ${SRCTOP}/sbin/atm/atm -CRUNCH_SRCDIR_atmconfig= ${SRCTOP}/sbin/atm/atmconfig -CRUNCH_SRCDIR_fore_dnld= ${SRCTOP}/sbin/atm/fore_dnld CRUNCH_SRCDIR_ilmid= ${SRCTOP}/sbin/atm/ilmid CRUNCH_SRCDIR_rtquery= ${SRCTOP}/sbin/routed/rtquery CRUNCH_SRCDIR_ipf= ${SRCTOP}/sbin/ipf/ipf Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Apr 25 20:34:56 2017 (r317423) +++ head/share/man/man5/rc.conf.5 Tue Apr 25 21:59:34 2017 (r317424) @@ -2753,19 +2753,6 @@ variable is assumed to exist whose contents will later be passed to a .Dq Nm route Cm add Fl inet6 operation. -.It Va natm_static_routes -.Pq Vt str -The -.Xr natmip 4 -equivalent of -.Va static_routes . -If not empty then for each whitespace separated -.Ar element -in the value, a -.Va route_ Ns Aq Ar element -variable is assumed to exist whose contents will later be passed to a -.Dq Nm atmconfig Cm natm Cm add -operation. .It Va gateway_enable .Pq Vt bool If set to @@ -2946,136 +2933,6 @@ is mutually exclusive to .Va rtsol_flags ; .Va rtsold_enable takes precedence. -.It Va atm_enable -.Pq Vt bool -Set to -.Dq Li YES -to enable the configuration of ATM interfaces at system boot time. -For all of the ATM variables described below, please refer to the -.Xr atm 8 -manual page for further details on the available command parameters. -Also refer to the files in -.Pa /usr/share/examples/atm -for more detailed configuration information. -.It Va atm_load -.Pq Vt str -This is a list of physical ATM interface drivers to load. -Typical values are -.Dq Li hfa_pci -and/or -.Dq Li hea_pci . -.It Va atm_netif_ Ns Aq Ar intf -.Pq Vt str -For the ATM physical interface -.Ar intf , -this variable defines the name prefix and count for the ATM network -interfaces to be created. -The value will be passed as the parameters of an -.Dq Nm atm Cm "set netif" Ar intf -command. -.It Va atm_sigmgr_ Ns Aq Ar intf -.Pq Vt str -For the ATM physical interface -.Ar intf , -this variable defines the ATM signalling manager to be used. -The value will be passed as the parameters of an -.Dq Nm atm Cm attach Ar intf -command. -.It Va atm_prefix_ Ns Aq Ar intf -.Pq Vt str -For the ATM physical interface -.Ar intf , -this variable defines the NSAP prefix for interfaces using a UNI signalling -manager. -If set to -.Dq Li ILMI , -the prefix will automatically be set via the -.Xr ilmid 8 -daemon. -Otherwise, the value will be passed as the parameters of an -.Dq Nm atm Cm "set prefix" Ar intf -command. -.It Va atm_macaddr_ Ns Aq Ar intf -.Pq Vt str -For the ATM physical interface -.Ar intf , -this variable defines the MAC address for interfaces using a UNI signalling -manager. -If set to -.Dq Li NO , -the hardware MAC address contained in the ATM interface card will be used. -Otherwise, the value will be passed as the parameters of an -.Dq Nm atm Cm "set mac" Ar intf -command. -.It Va atm_arpserver_ Ns Aq Ar netif -.Pq Vt str -For the ATM network interface -.Ar netif , -this variable defines the ATM address for a host which is to provide ATMARP -service. -This variable is only applicable to interfaces using a UNI signalling -manager. -If set to -.Dq Li local , -this host will become an ATMARP server. -The value will be passed as the parameters of an -.Dq Nm atm Cm "set arpserver" Ar netif -command. -.It Va atm_scsparp_ Ns Aq Ar netif -.Pq Vt bool -If set to -.Dq Li YES , -SCSP/ATMARP service for the network interface -.Ar netif -will be initiated using the -.Xr scspd 8 -and -.Xr atmarpd 8 -daemons. -This variable is only applicable if -.Va atm_arpserver_ Ns Aq Ar netif -is set to -.Dq Li local . -.It Va atm_pvcs -.Pq Vt str -Set to the list of ATM PVCs to be added at system -boot time. -For each whitespace separated -.Ar element -in the value, an -.Va atm_pvc_ Ns Aq Ar element -variable is assumed to exist. -The value of each of these variables -will be passed as the parameters of an -.Dq Nm atm Cm "add pvc" -command. -.It Va atm_arps -.Pq Vt str -Set to the list of permanent ATM ARP entries to be added -at system boot time. -For each whitespace separated -.Ar element -in the value, an -.Va atm_arp_ Ns Aq Ar element -variable is assumed to exist. -The value of each of these variables -will be passed as the parameters of an -.Dq Nm atm Cm "add arp" -command. -.It Va natm_interfaces -.Pq Vt str -Set to the list of -.Xr natm 4 -interfaces that will also be used for HARP through -.Xr harp 4 . -If this list is not empty all interfaces in the list will be brought up -with -.Xr ifconfig 8 -and -.Xr harp 4 -will be loaded. -For this to work the interface drivers must be either compiled into the -kernel or must reside on the root partition. .It Va keybell .Pq Vt str The keyboard bell sound. @@ -4592,7 +4449,6 @@ configuration file. .Xr accton 8 , .Xr amd 8 , .Xr apm 8 , -.Xr atm 8 , .Xr bsdinstall 8 , .Xr bthidd 8 , .Xr chkprintcap 8 , Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Tue Apr 25 20:34:56 2017 (r317423) +++ head/share/man/man7/hier.7 Tue Apr 25 21:59:34 2017 (r317424) @@ -293,21 +293,6 @@ see kernel key-management service; see .Xr ipsec 4 -.It Pa netnatm/ -NATM include files; -see -.Xr natm 4 -.Bl -tag -width "kerberos5/" -compact -.It Pa api/ -include files for the signalling API -.It Pa msg/ -include files that describe signalling messages and -declare associated functions -.It Pa saal/ -include files for the signalling AAL layer -.It Pa sig/ -include files for the UNI signalling protocol -.El .It Pa netsmb/ SMB/CIFS requester .It Pa nfs/ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 20:34:56 2017 (r317423) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Apr 25 21:59:34 2017 (r317424) @@ -102,13 +102,7 @@ OLD_FILES+=usr/share/man/man8/atrun.8.gz .endif .if ${MK_ATM} == no -OLD_FILES+=etc/rc.d/atm1 -OLD_FILES+=etc/rc.d/atm2 -OLD_FILES+=etc/rc.d/atm3 -OLD_FILES+=rescue/atmconfig -OLD_FILES+=sbin/atmconfig OLD_FILES+=usr/bin/sscop -OLD_FILES+=usr/include/bsnmp/snmp_atm.h OLD_FILES+=usr/include/netnatm/addr.h OLD_FILES+=usr/include/netnatm/api/atmapi.h OLD_FILES+=usr/include/netnatm/api/ccatm.h @@ -136,30 +130,19 @@ OLD_FILES+=usr/lib/libngatm.a OLD_FILES+=usr/lib/libngatm.so OLD_LIBS+=usr/lib/libngatm.so.4 OLD_FILES+=usr/lib/libngatm_p.a -OLD_FILES+=usr/lib/snmp_atm.so -OLD_LIBS+=usr/lib/snmp_atm.so.6 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libngatm.a OLD_FILES+=usr/lib32/libngatm.so OLD_LIBS+=usr/lib32/libngatm.so.4 OLD_FILES+=usr/lib32/libngatm_p.a .endif -OLD_FILES+=usr/share/doc/atm/atmconfig.help -OLD_FILES+=usr/share/doc/atm/atmconfig_device.help -OLD_DIRS+=usr/share/doc/atm OLD_FILES+=usr/share/man/man1/sscop.1.gz OLD_FILES+=usr/share/man/man3/libngatm.3.gz -OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz OLD_FILES+=usr/share/man/man3/uniaddr.3.gz OLD_FILES+=usr/share/man/man3/unifunc.3.gz OLD_FILES+=usr/share/man/man3/unimsg.3.gz OLD_FILES+=usr/share/man/man3/unisap.3.gz OLD_FILES+=usr/share/man/man3/unistruct.3.gz -OLD_FILES+=usr/share/man/man8/atmconfig.8.gz -OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def -OLD_FILES+=usr/share/snmp/defs/atm_tree.def -OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt -OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt .endif .if ${MK_AUDIT} == no @@ -731,7 +714,6 @@ OLD_FILES+=usr/bin/bsnmpwalk OLD_FILES+=usr/include/bsnmp/asn1.h OLD_FILES+=usr/include/bsnmp/bridge_snmp.h OLD_FILES+=usr/include/bsnmp/snmp.h -OLD_FILES+=usr/include/bsnmp/snmp_atm.h OLD_FILES+=usr/include/bsnmp/snmp_mibII.h OLD_FILES+=usr/include/bsnmp/snmp_netgraph.h OLD_FILES+=usr/include/bsnmp/snmpagent.h @@ -745,8 +727,6 @@ OLD_FILES+=usr/lib/libbsnmptools.a OLD_FILES+=usr/lib/libbsnmptools.so OLD_LIBS+=usr/lib/libbsnmptools.so.0 OLD_FILES+=usr/lib/libbsnmptools_p.a -OLD_FILES+=usr/lib/snmp_atm.so -OLD_LIBS+=usr/lib/snmp_atm.so.6 OLD_FILES+=usr/lib/snmp_bridge.so OLD_LIBS+=usr/lib/snmp_bridge.so.6 OLD_FILES+=usr/lib/snmp_hast.so @@ -929,7 +909,6 @@ OLD_FILES+=usr/share/man/man3/reqid_base OLD_FILES+=usr/share/man/man3/reqid_istype.3.gz OLD_FILES+=usr/share/man/man3/reqid_next.3.gz OLD_FILES+=usr/share/man/man3/reqid_type.3.gz -OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz OLD_FILES+=usr/share/man/man3/snmp_bridge.3.gz OLD_FILES+=usr/share/man/man3/snmp_hast.3.gz OLD_FILES+=usr/share/man/man3/snmp_hostres.3.gz @@ -985,8 +964,6 @@ OLD_FILES+=usr/share/man/man3/usm_flush_ OLD_FILES+=usr/share/man/man3/usm_next_user.3.gz OLD_FILES+=usr/share/man/man3/usm_new_user.3.gz OLD_FILES+=usr/share/man/man3/usm_user.3.gz -OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def -OLD_FILES+=usr/share/snmp/defs/atm_tree.def OLD_FILES+=usr/share/snmp/defs/bridge_tree.def OLD_FILES+=usr/share/snmp/defs/hast_tree.def OLD_FILES+=usr/share/snmp/defs/hostres_tree.def @@ -9397,7 +9374,6 @@ OLD_FILES+=usr/share/man/man4/usb_quirk. OLD_FILES+=usr/share/man/man4/usb_template.4.gz OLD_FILES+=usr/share/man/man4/usfs.4.gz OLD_FILES+=usr/share/man/man4/uslcom.4.gz -OLD_FILES+=usr/share/man/man4/utopia.4.gz OLD_FILES+=usr/share/man/man4/uvisor.4.gz OLD_FILES+=usr/share/man/man4/uvscom.4.gz OLD_FILES+=usr/share/man/man4/zyd.4.gz Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Apr 25 20:34:56 2017 (r317423) +++ head/usr.bin/kdump/kdump.c Tue Apr 25 21:59:34 2017 (r317424) @@ -1736,8 +1736,6 @@ ktrsockaddr(struct sockaddr *sa) { /* TODO: Support additional address families - #include - struct sockaddr_natm *natm; #include struct sockaddr_nb *nb; */ From owner-svn-src-head@freebsd.org Tue Apr 25 22:00: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 4D3F5D33029; Tue, 25 Apr 2017 22:00:16 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09F231671; Tue, 25 Apr 2017 22:00:16 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22c.google.com with SMTP id g60so152429175qtd.3; Tue, 25 Apr 2017 15:00:16 -0700 (PDT) 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=4e48BadS7j9HCgXf/IStPJ0iIjj5uYUXg6AJaQWmv0M=; b=sykYTzjpDjmFX+FZ9tSdZ8uPP2YJ60LfKQdw48i5UEfmCwG3og9n/KIWCLnRBdiJSm flBglktBT9nbd6SVFFAq/0nlG6p07//MLCzkgvtTGAP6DXxQgC8hxZodpjtsSSwKzUA7 v3aJS6vCDC+PsCx30skWpmqCs5LQD7YP/WmT1mvKFkYhEsCgHet9tmvWVS7M6hCNn7am ZNzxC++x3e6OMG9HZp2ikgjnjsw1J+WATnBoXM/LmwjjCsfG9DM61JtpHt2blQWp9fOg qp6jbXVhnlIgVA/UjiaKxTQWNg+A3I484pdJI3pQaamduwJyJa+FFfOVdnLw2zFrQnyA Szpw== 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=4e48BadS7j9HCgXf/IStPJ0iIjj5uYUXg6AJaQWmv0M=; b=FzBIv9Pav/fjueSzG68NxVeBmjfdQhtXPdhH8HTJyPy9lrIvf5ACNDBptTydJ8cTJn XxakJEmh1910egvpx+q4taHyaEeqZNVYcPoU8AGPrlEB8jPVczSsTZXNke+xevBWic6G ftpJyD2wT9MNbO8cI9PBBsidG+o5yM3kl0fZ4p7HJ4dKfc1zXvW+h+wIyQHF5uMQfC9A RJXMGSJzQanFpAcDdx443IQe2z0pd5RuvzH3u5xQxNQ59ymtSxByBKXcV9BmDUmImiFn L2NvMfI2WNm9r80EAj/JaHTvLVAF5y10XW240GXRn6CzjMjmxE+aHFsbe2GYUXKEpAbG jXdA== X-Gm-Message-State: AN3rC/7pkuoalE/XVMxnBt0wGFQUvbwwZ/+ZIoxagcAi+cNcvTX3Slh6 BW9N8BIqkGdqtxVNjQUXRP8wRr6tI2ghpHs= X-Received: by 10.200.37.136 with SMTP id e8mr34063329qte.30.1493157614870; Tue, 25 Apr 2017 15:00:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.83 with HTTP; Tue, 25 Apr 2017 15:00:14 -0700 (PDT) In-Reply-To: <201704251807.v3PI7mPL007042@repo.freebsd.org> References: <201704251807.v3PI7mPL007042@repo.freebsd.org> From: Ngie Cooper Date: Tue, 25 Apr 2017 15:00:14 -0700 Message-ID: Subject: Re: svn commit: r317415 - in head: lib/libbsnmp/libbsnmp tools/build/mk To: Glen Barber 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: Tue, 25 Apr 2017 22:00:16 -0000 On Tue, Apr 25, 2017 at 11:07 AM, Glen Barber wrote: > Author: gjb > Date: Tue Apr 25 18:07:48 2017 > New Revision: 317415 > URL: https://svnweb.freebsd.org/changeset/base/317415 > > Log: > Remove an incorrect MLINK for tree(3) introduced in r310728. > > Reported by: many > PR: 216476 > MFC after: 3 days > Sponsored by: The FreeBSD Foundation In wasn't an incorrect MLINK. From bsnmpagent(3): 34 .Dd October 4, 2005 35 .Dt BSNMPAGENT 3 36 .Os 37 .Sh NAME 38 .Nm bsnmpagent , 39 .Nm snmp_depop_t , 40 .Nm snmp_op_t , 41 .Nm tree , 42 .Nm tree_size , I'll rename it to something else, but that's a pretty horrible variable name/function call. Thanks, -Ngie From owner-svn-src-head@freebsd.org Tue Apr 25 22:00: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 902D5D330EE; Tue, 25 Apr 2017 22:00:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::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 4C523194C; Tue, 25 Apr 2017 22:00:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x230.google.com with SMTP id y33so152200842qta.2; Tue, 25 Apr 2017 15:00:52 -0700 (PDT) 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=ShtlmhKTMM4tIwIfNHygiLcpW/hVJxt3h3Z02KJ6MR4=; b=MF3sEjIM7AtoYf4Ruo6u729XRMRq20LMPp3rqTNNFR8vEhDy/bAN6WczEo1WIt94L9 jdHCuHGqQDsxYkcqpOKy4C672DBhBpC/T353jYOMcSWLMQ1RqVLILZ6j4oK/tFWCrhBy 7Mh28IjhSsDiuiyd0bvlRtyJS1VEFRTMewgEfMQXeTzahFoVvn6dHPUrWBGNdcmOakij APGlgF34R4PMawxsVyWi4mdukBU65GZsTdzhuk6YHqT4UDVbXjYBbcY53KHL+C1Q+5MN ZAwp+fV7TfYosXW9Ld0gMlEDzxCZgfJY86PND2mKBAyLRmikon9R2AYCYWgqjrbSsx58 WViw== 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=ShtlmhKTMM4tIwIfNHygiLcpW/hVJxt3h3Z02KJ6MR4=; b=Y5B2popuf3xjGDvW/Ty7dWL6UM4z90Jnmz1OiIh6XxADi+Ma+RsQ0IQJ28TFA8tSal iL8cw1+xtF/KR1k1uCcPkd2kRvTpf4+NiIqpzxGOULryg7kkIDbHZsFLBMTtq4MrcGHR hGnPePROUYEmJxOv9NSPbgNhU6KijbQnwf5RoEeS9wtgRHn5scDmf2lchFj2hGWZFKTA R/InliHdQWsaxtEVIpt7NFpTMuVUvvkwam5eXAyCTkj3TskGxPjYDKO7xHzW0xuyx6Xp e8OXYKMStFC/XSSENb+orCU9Ihl/Q/pKD/JXnqeDAmHgLc+ABQXniB3JYIfiTCkAjsm4 SQbQ== X-Gm-Message-State: AN3rC/7/wSW6OGTEvXr+ZYx4P46qX1b6GspNgLVA+TjzzvpqAYQjev/G 36G6K4JpajOtpGerSenC+XeqLDX7otaX X-Received: by 10.200.48.168 with SMTP id v37mr35150733qta.84.1493157650497; Tue, 25 Apr 2017 15:00:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.83 with HTTP; Tue, 25 Apr 2017 15:00:50 -0700 (PDT) In-Reply-To: References: <201704251807.v3PI7mPL007042@repo.freebsd.org> From: Ngie Cooper Date: Tue, 25 Apr 2017 15:00:50 -0700 Message-ID: Subject: Re: svn commit: r317415 - in head: lib/libbsnmp/libbsnmp tools/build/mk To: Glen Barber 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: Tue, 25 Apr 2017 22:00:52 -0000 On Tue, Apr 25, 2017 at 3:00 PM, Ngie Cooper wrote: > On Tue, Apr 25, 2017 at 11:07 AM, Glen Barber wrote: >> Author: gjb >> Date: Tue Apr 25 18:07:48 2017 >> New Revision: 317415 >> URL: https://svnweb.freebsd.org/changeset/base/317415 >> >> Log: >> Remove an incorrect MLINK for tree(3) introduced in r310728. >> >> Reported by: many >> PR: 216476 >> MFC after: 3 days >> Sponsored by: The FreeBSD Foundation > > In wasn't an incorrect MLINK. From bsnmpagent(3): *It > 34 .Dd October 4, 2005 > 35 .Dt BSNMPAGENT 3 > 36 .Os > 37 .Sh NAME > 38 .Nm bsnmpagent , > 39 .Nm snmp_depop_t , > 40 .Nm snmp_op_t , > 41 .Nm tree , > 42 .Nm tree_size , > > I'll rename it to something else, but that's a pretty horrible > variable name/function call. ... to begin with. Thanks, -Ngie From owner-svn-src-head@freebsd.org Tue Apr 25 22:12: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 3E3A9D33713; Tue, 25 Apr 2017 22:12:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::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 05E8B304; Tue, 25 Apr 2017 22:12:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x230.google.com with SMTP id g66so28494246ite.1; Tue, 25 Apr 2017 15:12:46 -0700 (PDT) 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=qLo9Hc99PFgFBx3FDjloRysWQPFo8/P6DEVlB+RPVqs=; b=jXxfABgq4YKu2zwz+Lr6XQgawlxEy8GYt8j4L+dv6zxmmlrUJfnhuiLTOO3umAd/mY AXTZfTVEqPGSxS934JFJ00YAXvDClnCqBkH1IKhFckYNyTq5v3utbK0tYKG1g95C5q/U tVSmrPz/jlaCQtg5SlJaBXlCXOO8vPYOQcHnqPTsjS6Ppy8FO4FF9ORouyrkNFjnSX+j /YtL1SoajXHINRyUmUGSvSQz4pZ23eK56h2WQP2O6QiQOjsJuAF1/g+JwLftwQB8hmE4 VjUtY+n96O01Rl+qrAJBdxUm2zC5B+Qhxje0AYsmv+tqpeoMnwyIiqXPlkUJ9XoNaFJX hLpQ== 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=qLo9Hc99PFgFBx3FDjloRysWQPFo8/P6DEVlB+RPVqs=; b=IMKl2y0aZEt7HEwmqAYEAolXrjd/vjcQJi2BSLYKSsMToJAf3HDVoxRAoMZgN+i9Zw pNhZ7kkwj7VlC3m8u7KxtTHTX0/NLVlcVloghVpNeSBQNX8y+ZSk8ak1UqwNntpUiKbF lP2fKLgxI/8xhvrzKwKhRLtVHI4crdlTVEvkPzwIlekBWhbeox8n+L8aEKIP6aAV7yKg RvI4apczqeip0Ij3W0xJPz0OtMq0jOmpqSAovJkGby98N0FfNMshDTWTO2nJUOby3+xt xDgiRtc+FNB4f2SlhbAoeIqH5d9uziGQ/tr9npfMmFe2J8AsaSe/Eo7DcOUzHjGSaG5B jOIQ== X-Gm-Message-State: AN3rC/4AGUV/Yq22wyRyNb7cabtq1/RynkjLSuo22LzK/ykWI1w+jnzJ uazAb+nfJtQFp/aGrCNaClIf7P55uQ== X-Received: by 10.36.101.210 with SMTP id u201mr3445127itb.118.1493158365365; Tue, 25 Apr 2017 15:12:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.164.170 with HTTP; Tue, 25 Apr 2017 15:12:44 -0700 (PDT) In-Reply-To: References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> <9709200.gDHZIeQ1vL@ralph.baldwin.cx> From: Ngie Cooper Date: Tue, 25 Apr 2017 15:12:44 -0700 Message-ID: Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: Bryan Drewery Cc: Benjamin Kaduk , John Baldwin , "Rodney W. Grimes" , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Tue, 25 Apr 2017 22:12:46 -0000 On Tue, Apr 25, 2017 at 2:26 PM, Bryan Drewery wrote: ... > It is definitely more useful to note which repository and what VCS > system the revision/hash/version refers to. But there's nothing > inherently wrong about using a git hash. Github != git. It is merely an > interface to git and is not required to use any of the git repositories > on it given another mirror or local checkout. If a project uses git as > their official VCS then a git hash is the proper reference. The only issues with using git hashes stems from forced pushes and the fact that only hashes can be garbage collected, but if we're using an upstream that does that, they are using git wrong (it should only be done for non-development mainlines). Then again, at least the history will have been somewhat correct, as cvs/svn history can be rewritten :/... Thanks, -Ngie From owner-svn-src-head@freebsd.org Tue Apr 25 23:19: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 B7928D50C35; Tue, 25 Apr 2017 23:19:28 +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 87E167F7; Tue, 25 Apr 2017 23:19:28 +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 v3PNJR9L033119; Tue, 25 Apr 2017 23:19:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PNJRGd033118; Tue, 25 Apr 2017 23:19:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704252319.v3PNJRGd033118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 25 Apr 2017 23:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317425 - head/sys/x86/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, 25 Apr 2017 23:19:28 -0000 Author: jhb Date: Tue Apr 25 23:19:27 2017 New Revision: 317425 URL: https://svnweb.freebsd.org/changeset/base/317425 Log: Remove the LSOL26CALLS_SEL constant. It is no longer used after SVR4/i386 ABI support was removed. Reported by: kib Modified: head/sys/x86/include/segments.h Modified: head/sys/x86/include/segments.h ============================================================================== --- head/sys/x86/include/segments.h Tue Apr 25 21:59:34 2017 (r317424) +++ head/sys/x86/include/segments.h Tue Apr 25 23:19:27 2017 (r317425) @@ -249,7 +249,6 @@ union descriptor { #define LSYS5SIGR_SEL 1 #define L43BSDCALLS_SEL 2 /* notyet */ #define LUCODE_SEL 3 -#define LSOL26CALLS_SEL 4 /* Solaris >= 2.6 system call gate */ #define LUDATA_SEL 5 /* separate stack, es,fs,gs sels ? */ /* #define LPOSIXCALLS_SEL 5*/ /* notyet */ From owner-svn-src-head@freebsd.org Tue Apr 25 23:29: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 B105BD50FA3; Tue, 25 Apr 2017 23:29:42 +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 6973CD55; Tue, 25 Apr 2017 23:29:42 +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 v3PNTfqf037229; Tue, 25 Apr 2017 23:29:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PNTfcI037228; Tue, 25 Apr 2017 23:29:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704252329.v3PNTfcI037228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 25 Apr 2017 23:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317426 - head/sys/dev/digi 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, 25 Apr 2017 23:29:42 -0000 Author: jhb Date: Tue Apr 25 23:29:41 2017 New Revision: 317426 URL: https://svnweb.freebsd.org/changeset/base/317426 Log: Remove the source to digi(4). This was forgotten when the driver was removed in r305235. Deleted: head/sys/dev/digi/ From owner-svn-src-head@freebsd.org Tue Apr 25 23:46: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 9CF12D5061B; Tue, 25 Apr 2017 23:46:54 +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 6D36618B0; Tue, 25 Apr 2017 23:46:54 +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 v3PNkrBR045140; Tue, 25 Apr 2017 23:46:53 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PNkrdq045139; Tue, 25 Apr 2017 23:46:53 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201704252346.v3PNkrdq045139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 25 Apr 2017 23:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317428 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 23:46:54 -0000 Author: cognet Date: Tue Apr 25 23:46:53 2017 New Revision: 317428 URL: https://svnweb.freebsd.org/changeset/base/317428 Log: In arm_gicv2m_alloc_msi(), if we found a suitable irq range, leave the loop before we increase irq again, or we'd end up choosing an irq, and then really using the next one, even if it's not available. Also in the inner loop, correct the end check so that we check every irq, even the last one. This makes the msk(4) adapter able to use MSI on Softiron Overdrive 1000. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Tue Apr 25 23:43:37 2017 (r317427) +++ head/sys/arm/arm/gic.c Tue Apr 25 23:46:53 2017 (r317428) @@ -1429,7 +1429,7 @@ arm_gicv2m_alloc_msi(device_t dev, devic mtx_lock(&sc->sc_mutex); found = false; - for (irq = sc->sc_spi_start; irq < sc->sc_spi_end && !found; irq++) { + for (irq = sc->sc_spi_start; irq < sc->sc_spi_end; irq++) { /* Start on an aligned interrupt */ if ((irq & (maxcount - 1)) != 0) continue; @@ -1438,7 +1438,7 @@ arm_gicv2m_alloc_msi(device_t dev, devic found = true; /* Check this range is valid */ - for (end_irq = irq; end_irq != irq + count - 1; end_irq++) { + for (end_irq = irq; end_irq != irq + count; end_irq++) { /* No free interrupts */ if (end_irq == sc->sc_spi_end) { found = false; @@ -1455,6 +1455,8 @@ arm_gicv2m_alloc_msi(device_t dev, devic break; } } + if (found) + break; } /* Not enough interrupts were found */ From owner-svn-src-head@freebsd.org Tue Apr 25 23:51: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 83863D50836; Tue, 25 Apr 2017 23:51:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2B51AF1; Tue, 25 Apr 2017 23:51:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 4931B5444; Tue, 25 Apr 2017 23:51:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id E58C17D79; Tue, 25 Apr 2017 23:51:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 5ZYHFJtNNw_a; Tue, 25 Apr 2017 23:51:23 +0000 (UTC) Subject: Re: svn commit: r317409 - head/contrib/tcpdump DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6CEB37D74 To: Ngie Cooper References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> <9709200.gDHZIeQ1vL@ralph.baldwin.cx> Cc: Benjamin Kaduk , John Baldwin , "Rodney W. Grimes" , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Tue, 25 Apr 2017 16:51:09 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1av2RsgcVk5Jaqpwq0lLXKGuk4W6im5Hb" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 25 Apr 2017 23:51:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1av2RsgcVk5Jaqpwq0lLXKGuk4W6im5Hb Content-Type: multipart/mixed; boundary="4q40ISJpAo5TKdibfNNkojVDsSetcAbhI"; protected-headers="v1" From: Bryan Drewery To: Ngie Cooper Cc: Benjamin Kaduk , John Baldwin , "Rodney W. Grimes" , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Message-ID: Subject: Re: svn commit: r317409 - head/contrib/tcpdump References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> <9709200.gDHZIeQ1vL@ralph.baldwin.cx> In-Reply-To: --4q40ISJpAo5TKdibfNNkojVDsSetcAbhI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/25/2017 3:12 PM, Ngie Cooper wrote: > On Tue, Apr 25, 2017 at 2:26 PM, Bryan Drewery w= rote: >=20 > ... >=20 >> It is definitely more useful to note which repository and what VCS >> system the revision/hash/version refers to. But there's nothing >> inherently wrong about using a git hash. Github !=3D git. It is merel= y an >> interface to git and is not required to use any of the git repositorie= s >> on it given another mirror or local checkout. If a project uses git a= s >> their official VCS then a git hash is the proper reference. >=20 > The only issues with using git hashes stems from forced pushes and > the fact that only hashes can be garbage collected, but if we're using > an upstream that does that, they are using git wrong (it should only > be done for non-development mainlines). Then again, at least the > history will have been somewhat correct, as cvs/svn history can be > rewritten :/... > Thanks, > -Ngie >=20 "Force push". This exact same thing can happen with SVN and CVS by a repository admin. Respectable projects that are using git officially won't rebase their main branches unless under severe circumstance. Same for SVN/CVS. SVN->GIT mirrors or CVS->GIT mirrors may be prone to that naturally though, but we should not be cherry-picking from that since it is not the source of truth for the project. --=20 Regards, Bryan Drewery --4q40ISJpAo5TKdibfNNkojVDsSetcAbhI-- --1av2RsgcVk5Jaqpwq0lLXKGuk4W6im5Hb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJY/+DtAAoJEDXXcbtuRpfPNsYIALSGtV8O8zXZyFU1X0uV7A/S q3WmBafTHo6ddamTWbOJwSBncyivznOofnS6BKXSER59hsjhxGF5JYUp1hz7xBr1 nvGbqqZVxyBzLlBfSWVNWzZoeg33EpFakamaQEOKxeLb8IEFd4wJ2QCfQfCMlVkH mmbLrKxgYIVp9bhsYvx8RLIxPg0GMdG+O5h//nHGfmfp7p2TU3bQZp7J5VaAo909 vuZcBYj3JLnZ9dp4CagouqFcqIq8zhJDyToTc8AVdrV8cAWgm4+50SZstZOoE5Y8 LTabiRYEjQ7AslgA2m0r5OnVLPbf9GIHBwiT/QTK7s3MzH1wvXjJxOfAQpDvoqc= =+jZh -----END PGP SIGNATURE----- --1av2RsgcVk5Jaqpwq0lLXKGuk4W6im5Hb-- From owner-svn-src-head@freebsd.org Wed Apr 26 00:07: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 05D0BD50E31; Wed, 26 Apr 2017 00:07:53 +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 CA0E062D; Wed, 26 Apr 2017 00:07:52 +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 v3Q07pEG053452; Wed, 26 Apr 2017 00:07:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3Q07pqp053451; Wed, 26 Apr 2017 00:07:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201704260007.v3Q07pqp053451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 26 Apr 2017 00:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317430 - head/tools/tools/net80211/scripts 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, 26 Apr 2017 00:07:53 -0000 Author: adrian Date: Wed Apr 26 00:07:51 2017 New Revision: 317430 URL: https://svnweb.freebsd.org/changeset/base/317430 Log: [net80211] document having to enable privacy on the dynamic plumbed VAPs. Modified: head/tools/tools/net80211/scripts/setup.wdsmain Modified: head/tools/tools/net80211/scripts/setup.wdsmain ============================================================================== --- head/tools/tools/net80211/scripts/setup.wdsmain Wed Apr 26 00:03:03 2017 (r317429) +++ head/tools/tools/net80211/scripts/setup.wdsmain Wed Apr 26 00:07:51 2017 (r317430) @@ -8,6 +8,13 @@ # created). The WDSUP script is invoked for each wds vap that # gets created--to add the vap to a bridge. # +# Notes! +# +# * If the main AP VAP is running with encryption, the plumbed up +# WDS VAP needs to have privacy enabled (wepmode mixed, for example) +# otherwise frames transmitted from the WDS AP to the WDS STA +# will not be encrypted. +# # $FreeBSD$ # PATH=.:$PATH From owner-svn-src-head@freebsd.org Wed Apr 26 00:34: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 F2ADFD4F667; Wed, 26 Apr 2017 00:34:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C30A4794; Wed, 26 Apr 2017 00:34:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3Q0Y5Vr065377; Wed, 26 Apr 2017 00:34:05 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3Q0Y5uw065376; Wed, 26 Apr 2017 00:34:05 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704260034.v3Q0Y5uw065376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 26 Apr 2017 00:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317431 - head/sys/netipsec 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, 26 Apr 2017 00:34:07 -0000 Author: ae Date: Wed Apr 26 00:34:05 2017 New Revision: 317431 URL: https://svnweb.freebsd.org/changeset/base/317431 Log: Fix SP refcount leak. PCB SP cache acquires extra reference, when SP is stored in the cache. Release this reference when PCB is destroyed in ipsec_delete_pcbpolicy(). In ipsec_copy_pcbpolicy() release reference to SP in case if sp_in or sp_out are not NULL. Reported by: Slawa Olhovchenkov MFC after: 1 week Modified: head/sys/netipsec/ipsec_pcb.c Modified: head/sys/netipsec/ipsec_pcb.c ============================================================================== --- head/sys/netipsec/ipsec_pcb.c Wed Apr 26 00:07:51 2017 (r317430) +++ head/sys/netipsec/ipsec_pcb.c Wed Apr 26 00:34:05 2017 (r317431) @@ -172,10 +172,10 @@ ipsec_delete_pcbpolicy(struct inpcb *inp if (inp->inp_sp == NULL) return (0); - if (inp->inp_sp->flags & INP_INBOUND_POLICY) + if (inp->inp_sp->sp_in != NULL) key_freesp(&inp->inp_sp->sp_in); - if (inp->inp_sp->flags & INP_OUTBOUND_POLICY) + if (inp->inp_sp->sp_out != NULL) key_freesp(&inp->inp_sp->sp_out); free(inp->inp_sp, M_IPSEC_INPCB); @@ -250,6 +250,8 @@ ipsec_copy_pcbpolicy(struct inpcb *old, if (sp == NULL) return (ENOBUFS); ipsec_setspidx_inpcb(new, &sp->spidx, IPSEC_DIR_INBOUND); + if (new->inp_sp->sp_in != NULL) + key_freesp(&new->inp_sp->sp_in); new->inp_sp->sp_in = sp; new->inp_sp->flags |= INP_INBOUND_POLICY; } @@ -258,6 +260,8 @@ ipsec_copy_pcbpolicy(struct inpcb *old, if (sp == NULL) return (ENOBUFS); ipsec_setspidx_inpcb(new, &sp->spidx, IPSEC_DIR_OUTBOUND); + if (new->inp_sp->sp_out != NULL) + key_freesp(&new->inp_sp->sp_out); new->inp_sp->sp_out = sp; new->inp_sp->flags |= INP_OUTBOUND_POLICY; } From owner-svn-src-head@freebsd.org Wed Apr 26 00:41: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 76427D4F9A9; Wed, 26 Apr 2017 00:41:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48625C52; Wed, 26 Apr 2017 00:41:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3Q0fImt065777; Wed, 26 Apr 2017 00:41:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3Q0fI4x065776; Wed, 26 Apr 2017 00:41:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201704260041.v3Q0fI4x065776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 26 Apr 2017 00:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317432 - 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: Wed, 26 Apr 2017 00:41:19 -0000 Author: bdrewery Date: Wed Apr 26 00:41:18 2017 New Revision: 317432 URL: https://svnweb.freebsd.org/changeset/base/317432 Log: Remove entry for r304436 removed in r316527. Sponsored by: Dell EMC Isilon Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Apr 26 00:34:05 2017 (r317431) +++ head/UPDATING Wed Apr 26 00:41:18 2017 (r317432) @@ -215,14 +215,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 to 1200005. 20160818: - The UDP receive code has been updated to only treat incoming UDP - packets that were addressed to an L2 broadcast address as L3 - broadcast packets. It is not expected that this will affect any - standards-conforming UDP application. The new behaviour can be - disabled by setting the sysctl net.inet.udp.require_l2_bcast to - 0. - -20160818: Remove the openbsd_poll system call. __FreeBSD_version has been bumped because of this. From owner-svn-src-head@freebsd.org Wed Apr 26 01:08: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 3B681D50360; Wed, 26 Apr 2017 01:08:27 +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 089F0F1A; Wed, 26 Apr 2017 01:08:26 +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 v3Q18Qhm077943; Wed, 26 Apr 2017 01:08:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3Q18Q3e077942; Wed, 26 Apr 2017 01:08:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201704260108.v3Q18Q3e077942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 26 Apr 2017 01:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317433 - head/tools/tools/net80211/wlanwds 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, 26 Apr 2017 01:08:27 -0000 Author: adrian Date: Wed Apr 26 01:08:25 2017 New Revision: 317433 URL: https://svnweb.freebsd.org/changeset/base/317433 Log: [net80211] [wlanwds] allow logging to stderr as well as syslog. By default this logs to syslog only, not stderr. It makes it difficult to debug exactly what's going on. So allow '-e' to log to stderr so I have a chance of actually debugging wlanwds /dynamic WDS (DWDS) issues. Modified: head/tools/tools/net80211/wlanwds/wlanwds.c Modified: head/tools/tools/net80211/wlanwds/wlanwds.c ============================================================================== --- head/tools/tools/net80211/wlanwds/wlanwds.c Wed Apr 26 00:41:18 2017 (r317432) +++ head/tools/tools/net80211/wlanwds/wlanwds.c Wed Apr 26 01:08:25 2017 (r317433) @@ -96,7 +96,7 @@ static int wds_vap_destroy(const char *i static void usage(const char *progname) { - fprintf(stderr, "usage: %s [-fjtv] [-P pidfile] [-s ] [ifnet0 ... | any]\n", + fprintf(stderr, "usage: %s [-efjtv] [-P pidfile] [-s ] [ifnet0 ... | any]\n", progname); exit(-1); } @@ -108,10 +108,14 @@ main(int argc, char *argv[]) const char *pidfile = NULL; int s, c, logmask, bg = 1; char msg[2048]; + int log_stderr = 0; logmask = LOG_UPTO(LOG_INFO); - while ((c = getopt(argc, argv, "fjP:s:tv")) != -1) + while ((c = getopt(argc, argv, "efjP:s:tv")) != -1) switch (c) { + case 'e': + log_stderr = LOG_PERROR; + break; case 'f': bg = 0; break; @@ -155,7 +159,7 @@ main(int argc, char *argv[]) if (bg && daemon(0, 0) < 0) err(EX_OSERR, "daemon"); - openlog("wlanwds", LOG_PID | LOG_CONS, LOG_DAEMON); + openlog("wlanwds", log_stderr | LOG_PID | LOG_CONS, LOG_DAEMON); setlogmask(logmask); for (;;) { From owner-svn-src-head@freebsd.org Wed Apr 26 02:50: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 3659BD503D0 for ; Wed, 26 Apr 2017 02:50:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 051706DC for ; Wed, 26 Apr 2017 02:50:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id r16so222143018ioi.2 for ; Tue, 25 Apr 2017 19:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4OqqRj90BUmYYITD8SahvsOwops+2xQbyAxbPgpPowY=; b=HvF5NM3R8MD30GIglq6PCb5J4sjH4KkRbVnfm7jPMgkPiyFZfnnQMD327Mpd783PSo 0Wzg8mGd9e4JjGWe34MKgV5h2fx2Zr8jD1jwVVQ7+VPFPk5tlJYzT8B6LhPy+YuGAKLr mk/PO952VjdGmMILK1A7QWBzmm9PCYMO+xDB9bkYiG3la7DbVqm+Wb9ceolI2TaLxOt0 NfljzJPRTfJ93v2tqQ9z8TnZhGIOiZg3rHx+5L0Td6S5YIYLdun5gv31Vt0iFfYI/0No xp6MS0zFom0q2AHBxH8H0fPowwR/yCgJIRW5YFjNXsNL/CuTtiaCHWaOM+AamY8zPa6V bYXA== 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=4OqqRj90BUmYYITD8SahvsOwops+2xQbyAxbPgpPowY=; b=UsWOMCzyL8gFfVtLPMB5TfbfUjkRxpX7JG5DX5tkcmwN4QYZTsfGHq/9Xqp3rnrlc5 +Mg8gdWo8DSHpwfdx1MBZyXAr5U2BdRY8E5puDg56HHmHFD0v9yid5uoD6GkqStmTdtY GkhCA92CM1CdW2stozgu+OKqnxsgtEaUh/Bap7E70oRLUsgZ3KP1mvbAKoj8PJ02xo0m zvcIxpcdWSaiSF49OYqMEm/ffSVOYfe6Fj/H0ZkuoGOUJ3iZbabgTePRu6YwGkACQcSQ NsYso/wDJ3LC0+hiIg6mnelpwoZmvJ3UImMVDCcYCg8W+h6zUAU3S16Lkde28G9zuC2y GGZA== X-Gm-Message-State: AN3rC/42o391KoNfMxM3uwwQmbmGBnZUMOQHriDW8III4815a+8i+daf P+pholZg3fv16QUHDQen71P2+Mr9NA== X-Received: by 10.107.8.136 with SMTP id h8mr21591191ioi.134.1493175021241; Tue, 25 Apr 2017 19:50:21 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Tue, 25 Apr 2017 19:50:20 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:c51e:1271:abbc:e621] In-Reply-To: <201704260041.v3Q0fI4x065776@repo.freebsd.org> References: <201704260041.v3Q0fI4x065776@repo.freebsd.org> From: Warner Losh Date: Tue, 25 Apr 2017 20:50:20 -0600 X-Google-Sender-Auth: ucO-I9hHoDNJ2nvNdrv43HznCYU Message-ID: Subject: Re: svn commit: r317432 - head To: Bryan Drewery 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: Wed, 26 Apr 2017 02:50:22 -0000 I'd very much prefer if you created a new entry saying this one isn't relevant any more. It's still relevant to all versions between 304436 and 316527. Warner On Tue, Apr 25, 2017 at 6:41 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Apr 26 00:41:18 2017 > New Revision: 317432 > URL: https://svnweb.freebsd.org/changeset/base/317432 > > Log: > Remove entry for r304436 removed in r316527. > > Sponsored by: Dell EMC Isilon > > Modified: > head/UPDATING > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Wed Apr 26 00:34:05 2017 (r317431) > +++ head/UPDATING Wed Apr 26 00:41:18 2017 (r317432) > @@ -215,14 +215,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 > to 1200005. > > 20160818: > - The UDP receive code has been updated to only treat incoming UDP > - packets that were addressed to an L2 broadcast address as L3 > - broadcast packets. It is not expected that this will affect any > - standards-conforming UDP application. The new behaviour can be > - disabled by setting the sysctl net.inet.udp.require_l2_bcast to > - 0. > - > -20160818: > Remove the openbsd_poll system call. > __FreeBSD_version has been bumped because of this. > > From owner-svn-src-head@freebsd.org Wed Apr 26 03:08: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 D1EF6D509F9; Wed, 26 Apr 2017 03:08:48 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABBBD1665; Wed, 26 Apr 2017 03:08:48 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3Q38h4Z064664; Tue, 25 Apr 2017 20:08:43 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3Q38fh2064663; Tue, 25 Apr 2017 20:08:41 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704260308.v3Q38fh2064663@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317432 - head In-Reply-To: To: Warner Losh Date: Tue, 25 Apr 2017 20:08:41 -0700 (PDT) CC: Bryan Drewery , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 26 Apr 2017 03:08:48 -0000 > I'd very much prefer if you created a new entry saying this one isn't > relevant any more. It's still relevant to all versions between 304436 > and 316527. > > Warner Won't it appear in the copy of UPDATING in any checked out tree checked out between those revisions? > On Tue, Apr 25, 2017 at 6:41 PM, Bryan Drewery wrote: > > Author: bdrewery > > Date: Wed Apr 26 00:41:18 2017 > > New Revision: 317432 > > URL: https://svnweb.freebsd.org/changeset/base/317432 > > > > Log: > > Remove entry for r304436 removed in r316527. > > > > Sponsored by: Dell EMC Isilon > > > > Modified: > > head/UPDATING > > > > Modified: head/UPDATING > > ============================================================================== > > --- head/UPDATING Wed Apr 26 00:34:05 2017 (r317431) > > +++ head/UPDATING Wed Apr 26 00:41:18 2017 (r317432) > > @@ -215,14 +215,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 > > to 1200005. > > > > 20160818: > > - The UDP receive code has been updated to only treat incoming UDP > > - packets that were addressed to an L2 broadcast address as L3 > > - broadcast packets. It is not expected that this will affect any > > - standards-conforming UDP application. The new behaviour can be > > - disabled by setting the sysctl net.inet.udp.require_l2_bcast to > > - 0. > > - > > -20160818: > > Remove the openbsd_poll system call. > > __FreeBSD_version has been bumped because of this. > > > > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Apr 26 03:10: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 1ED4ED50AFA for ; Wed, 26 Apr 2017 03:10:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DABF017FD for ; Wed, 26 Apr 2017 03:10:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22b.google.com with SMTP id r16so222334097ioi.2 for ; Tue, 25 Apr 2017 20:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=rjjrSCulfsaozYFktAnksb/V51prE5D7wfKeEfL88AI=; b=jOrVNUr3kQYoOAEAFpVaVapRsQ8rHtp9ssaggm2MuTW0izYhzUrikN8ibiaoFimpQ6 3vwq4oOLzWvk25hYax1B2yZqyykm/HtYxYMWT82dwL7aCeyKi9vIZe0QU5whDM/yeWpm //oyB/gv2kv+46rAoyUfL+kD8SDZrIPHYcP1PCkHjW431hy1TER4rc5wKpX9sas8Z3uT HYfmSJlAi0R/uqIAk+NJAH6/Gk/0+Nz2SQ0S1/p/GFNBOA52GyieZQlg3VvyUmIpRxhN AuPWyuxG+ip8GpVBbPh5b76fC0BWwxXRBxFzpOlhhZj8JCDDvIOrB23OYf33kfgiDmxk Z5vQ== 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=rjjrSCulfsaozYFktAnksb/V51prE5D7wfKeEfL88AI=; b=Rq7lBRAynyOPsO7q3Oyletn9UDTFIeOXbLTq5WFcfDJ+Qjej87wG32NYRZ4VGeuI0u tTdQgPVYtcuJeyD9+3fJYCNCH1GZw0Zcv+UikjBm7bKf+s3BhdXeEsMvZLh2jw2z/Fau AVXrmKAe1O7TKM3sYNmEzvlYR0A8nvrXaU1nN3mrwYjwN+RVN2aQaEKLvKOMp6fGnhwM ZqDXxhyxlsefkm420GXX9PdBbE64FxKViVmFV6boj3FBcKnarf/SeyrWGejq27vKwYEI L5cReD7qOHAzl3NbC05Z2S+u/SCdhe/j9S2p1q+r/M1Otpk+KQXjs25+CctwdiXarZQx aU9A== X-Gm-Message-State: AN3rC/4UX1ZWeifk4pSca5opmjQ5UpQLILm+ZBaEEj9DNecQXJu3ie9u 2zDoR2irzTkH5YCY7EEZPxHRPGRD+g== X-Received: by 10.107.143.146 with SMTP id r140mr21133239iod.148.1493176246172; Tue, 25 Apr 2017 20:10:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Tue, 25 Apr 2017 20:10:45 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:c51e:1271:abbc:e621] In-Reply-To: <201704260308.v3Q38fh2064663@pdx.rh.CN85.dnsmgr.net> References: <201704260308.v3Q38fh2064663@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Tue, 25 Apr 2017 21:10:45 -0600 X-Google-Sender-Auth: xAnw8xxAr0nx4MmM9Hks6K941h8 Message-ID: Subject: Re: svn commit: r317432 - head To: rgrimes@freebsd.org Cc: Bryan Drewery , 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, 26 Apr 2017 03:10:47 -0000 On Tue, Apr 25, 2017 at 9:08 PM, Rodney W. Grimes wrote: >> I'd very much prefer if you created a new entry saying this one isn't >> relevant any more. It's still relevant to all versions between 304436 >> and 316527. >> >> Warner > > Won't it appear in the copy of UPDATING in any checked out tree > checked out between those revisions? That's beside the point. UPDATING is suppose to be a strict ticker of interesting events. Hence my rather strong preference. You don't delete from it, you tell people when things change so they can look at the latest one and know if there will be issues moving forward, and where they might want to move forward to. It's been that way since I invented it almost 20 years ago. Warner >> On Tue, Apr 25, 2017 at 6:41 PM, Bryan Drewery wrote: >> > Author: bdrewery >> > Date: Wed Apr 26 00:41:18 2017 >> > New Revision: 317432 >> > URL: https://svnweb.freebsd.org/changeset/base/317432 >> > >> > Log: >> > Remove entry for r304436 removed in r316527. >> > >> > Sponsored by: Dell EMC Isilon >> > >> > Modified: >> > head/UPDATING >> > >> > Modified: head/UPDATING >> > ============================================================================== >> > --- head/UPDATING Wed Apr 26 00:34:05 2017 (r317431) >> > +++ head/UPDATING Wed Apr 26 00:41:18 2017 (r317432) >> > @@ -215,14 +215,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 >> > to 1200005. >> > >> > 20160818: >> > - The UDP receive code has been updated to only treat incoming UDP >> > - packets that were addressed to an L2 broadcast address as L3 >> > - broadcast packets. It is not expected that this will affect any >> > - standards-conforming UDP application. The new behaviour can be >> > - disabled by setting the sysctl net.inet.udp.require_l2_bcast to >> > - 0. >> > - >> > -20160818: >> > Remove the openbsd_poll system call. >> > __FreeBSD_version has been bumped because of this. >> > >> > >> >> > > -- > Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Apr 26 03:28: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 26484D500E3; Wed, 26 Apr 2017 03:28:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB1691F6; Wed, 26 Apr 2017 03:28:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 0530D45A; Wed, 26 Apr 2017 03:28:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 97539822B; Wed, 26 Apr 2017 03:28:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id WPLmierpNmPx; Wed, 26 Apr 2017 03:28:45 +0000 (UTC) Subject: Re: svn commit: r317432 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 0A169821D To: Warner Losh , rgrimes@freebsd.org References: <201704260308.v3Q38fh2064663@pdx.rh.CN85.dnsmgr.net> Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Organization: FreeBSD Message-ID: <3ebc242b-1e1c-4d67-c88d-207b9ee7623c@FreeBSD.org> Date: Tue, 25 Apr 2017 20:28:27 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="V7DXsH51joJhP5dVsl0MhjEtMpiMdIxcw" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 26 Apr 2017 03:28:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V7DXsH51joJhP5dVsl0MhjEtMpiMdIxcw Content-Type: multipart/mixed; boundary="3ETQGXw8In63JmM77PMSVbxIjWiPj01DM"; protected-headers="v1" From: Bryan Drewery To: Warner Losh , rgrimes@freebsd.org Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-ID: <3ebc242b-1e1c-4d67-c88d-207b9ee7623c@FreeBSD.org> Subject: Re: svn commit: r317432 - head References: <201704260308.v3Q38fh2064663@pdx.rh.CN85.dnsmgr.net> In-Reply-To: --3ETQGXw8In63JmM77PMSVbxIjWiPj01DM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/25/17 8:10 PM, Warner Losh wrote: > On Tue, Apr 25, 2017 at 9:08 PM, Rodney W. Grimes > wrote: >>> I'd very much prefer if you created a new entry saying this one isn't= >>> relevant any more. It's still relevant to all versions between 304436= >>> and 316527. >>> >>> Warner >> >> Won't it appear in the copy of UPDATING in any checked out tree >> checked out between those revisions? >=20 > That's beside the point. UPDATING is suppose to be a strict ticker of > interesting events. Hence my rather strong preference. You don't > delete from it, you tell people when things change so they can look at > the latest one and know if there will be issues moving forward, and > where they might want to move forward to. It's been that way since I > invented it almost 20 years ago. >=20 > Warner >=20 Sure, I'll revert and add a new entry tomorrow. My concern was mostly because the entry is irrelevant for the eventual releng/12.0. >>> On Tue, Apr 25, 2017 at 6:41 PM, Bryan Drewery = wrote: >>>> Author: bdrewery >>>> Date: Wed Apr 26 00:41:18 2017 >>>> New Revision: 317432 >>>> URL: https://svnweb.freebsd.org/changeset/base/317432 >>>> >>>> Log: >>>> Remove entry for r304436 removed in r316527. >>>> >>>> Sponsored by: Dell EMC Isilon >>>> >>>> Modified: >>>> head/UPDATING >>>> >>>> Modified: head/UPDATING >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/UPDATING Wed Apr 26 00:34:05 2017 (r317431) >>>> +++ head/UPDATING Wed Apr 26 00:41:18 2017 (r317432) >>>> @@ -215,14 +215,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 >>>> to 1200005. >>>> >>>> 20160818: >>>> - The UDP receive code has been updated to only treat incoming= UDP >>>> - packets that were addressed to an L2 broadcast address as L3= >>>> - broadcast packets. It is not expected that this will affect= any >>>> - standards-conforming UDP application. The new behaviour can= be >>>> - disabled by setting the sysctl net.inet.udp.require_l2_bcast= to >>>> - 0. >>>> - >>>> -20160818: >>>> Remove the openbsd_poll system call. >>>> __FreeBSD_version has been bumped because of this. >>>> >>>> >>> >>> >> >> -- >> Rod Grimes rgrimes@fre= ebsd.org --=20 Regards, Bryan Drewery --3ETQGXw8In63JmM77PMSVbxIjWiPj01DM-- --V7DXsH51joJhP5dVsl0MhjEtMpiMdIxcw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJZABPcAAoJEDXXcbtuRpfPmrEH/1WIz4sg0fCyHYTYmsHzBdvI /3CdNngv98bl/ja1CKtoHkYepBfMoibXuorEgxDtXhy/EOnIW+Dksl5i/FHjHuKK kNcJF8DSS5st+y7qI01iCqRD4BRt+i6dfz0hsqhOYHJ5kbKtfH9x6nmNb38tKOQ3 W8H8VAKXKvqMGwEZ3sQGBLWat4kqO7BLA4Fz/6ldGV0ANUvIsEIJvMH53JIqRkCc I3iCwXjYeBA6Mw6xPAzHjiKeRv2fnmrhNSS3O3FXw3RIml2GHQSXVridU9t6S6rw DNybSAA+TXEYWbSBwviaD9LwYIlJK5dJLqBlNKVQaB8Gck90fXs8u+FLVYYa7Vk= =aAzp -----END PGP SIGNATURE----- --V7DXsH51joJhP5dVsl0MhjEtMpiMdIxcw-- From owner-svn-src-head@freebsd.org Wed Apr 26 06:20: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 D0D95D507FA; Wed, 26 Apr 2017 06:20:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD56E951; Wed, 26 Apr 2017 06:20:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3Q6KwfD005066; Wed, 26 Apr 2017 06:20:58 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3Q6Kwlb005064; Wed, 26 Apr 2017 06:20:58 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704260620.v3Q6Kwlb005064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 26 Apr 2017 06:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317435 - in 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, 26 Apr 2017 06:20:59 -0000 Author: tuexen Date: Wed Apr 26 06:20:58 2017 New Revision: 317435 URL: https://svnweb.freebsd.org/changeset/base/317435 Log: When a SYN-ACK is received in SYN-SENT state, RFC 793 requires the validation of SEG.ACK as the first step. If the ACK is not acceptable, a RST segment should be sent and the segment should be dropped. Up to now, the segment was partially processed. This patch moves the check for the SEG.ACK validation up to the front as required. Reviewed by: hiren, gnn MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D10424 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/fastpath.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Wed Apr 26 02:37:25 2017 (r317434) +++ head/sys/netinet/tcp_input.c Wed Apr 26 06:20:58 2017 (r317435) @@ -1624,6 +1624,16 @@ tcp_do_segment(struct mbuf *m, struct tc } /* + * If a segment with the ACK-bit set arrives in the SYN-SENT state + * check SEQ.ACK first. + */ + if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && + (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { + rstreason = BANDLIM_UNLIMITED; + goto dropwithreset; + } + + /* * Segment received on connection. * Reset idle time and keep-alive timer. * XXX: This should be done after segment @@ -2001,7 +2011,6 @@ tcp_do_segment(struct mbuf *m, struct tc /* * If the state is SYN_SENT: - * if seg contains an ACK, but not for our SYN, drop the input. * if seg contains a RST, then drop the connection. * if seg does not contain SYN, then drop it. * Otherwise this is an acceptable SYN segment @@ -2014,12 +2023,6 @@ tcp_do_segment(struct mbuf *m, struct tc * continue processing rest of data/controls, beginning with URG */ case TCPS_SYN_SENT: - if ((thflags & TH_ACK) && - (SEQ_LEQ(th->th_ack, tp->iss) || - SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_UNLIMITED; - goto dropwithreset; - } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { TCP_PROBE5(connect__refused, NULL, tp, m, tp, th); Modified: head/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- head/sys/netinet/tcp_stacks/fastpath.c Wed Apr 26 02:37:25 2017 (r317434) +++ head/sys/netinet/tcp_stacks/fastpath.c Wed Apr 26 06:20:58 2017 (r317435) @@ -497,7 +497,6 @@ tcp_do_slowpath(struct mbuf *m, struct t /* * If the state is SYN_SENT: - * if seg contains an ACK, but not for our SYN, drop the input. * if seg contains a RST, then drop the connection. * if seg does not contain SYN, then drop it. * Otherwise this is an acceptable SYN segment @@ -510,12 +509,6 @@ tcp_do_slowpath(struct mbuf *m, struct t * continue processing rest of data/controls, beginning with URG */ case TCPS_SYN_SENT: - if ((thflags & TH_ACK) && - (SEQ_LEQ(th->th_ack, tp->iss) || - SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_UNLIMITED; - goto dropwithreset; - } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { TCP_PROBE5(connect__refused, NULL, tp, m, tp, th); tp = tcp_drop(tp, ECONNREFUSED); @@ -1775,6 +1768,20 @@ tcp_do_segment_fastslow(struct mbuf *m, m_freem(m); return; } + + /* + * If a segment with the ACK-bit set arrives in the SYN-SENT state + * check SEQ.ACK first. + */ + if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && + (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { + tcp_dropwithreset(m, th, tp, tlen, BANDLIM_UNLIMITED); + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + return; + } tp->sackhint.last_sack_ack = 0; @@ -2237,6 +2244,20 @@ tcp_do_segment_fastack(struct mbuf *m, s return; } + /* + * If a segment with the ACK-bit set arrives in the SYN-SENT state + * check SEQ.ACK first. + */ + if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && + (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { + tcp_dropwithreset(m, th, tp, tlen, BANDLIM_UNLIMITED); + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + return; + } + tp->sackhint.last_sack_ack = 0; /* From owner-svn-src-head@freebsd.org Wed Apr 26 12:10: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 F124CD5176F; Wed, 26 Apr 2017 12:10:45 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B051221F; Wed, 26 Apr 2017 12:10:45 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (124-168-240-29.dyn.iinet.net.au [124.168.240.29]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v3QCATCU041480 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 26 Apr 2017 05:10:34 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: Xin LI , rgrimes@freebsd.org References: <201704251907.v3PJ7Mxv062849@pdx.rh.CN85.dnsmgr.net> Cc: Benjamin Kaduk , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Julian Elischer Message-ID: Date: Wed, 26 Apr 2017 20:10:24 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 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: Wed, 26 Apr 2017 12:10:46 -0000 On 26/4/17 3:29 am, Xin LI wrote: > On Tue, Apr 25, 2017 at 12:07 PM, Rodney W. Grimes > wrote: >> [ Charset UTF-8 unsupported, converting... ] >>> On Tue, Apr 25, 2017 at 1:30 PM, Rodney W. Grimes < >>> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: >>> >>>> [ Charset UTF-8 unsupported, converting... ] >>>>> Author: glebius >>>>> Date: Tue Apr 25 15:56:46 2017 >>>>> New Revision: 317409 >>>>> URL: https://svnweb.freebsd.org/changeset/base/317409 >>>>> >>>>> Log: >>>>> Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use >>>> after free >>>> >>>> Lets not use git hashes as references in commit messages, >>>> it has very little value for someone reading a log of changes >>>> looking for something. There is no promise that it can be >>>> found later (github can go Poof). >>>> >>> On the contrary, a git SHA1 seems like an eminently stable and unique >>> search parameter! >>> I agree that a commit log should inline some summary of the change as well >>> as provide a >>> link to the external source, but I am not worried that a future reader will >>> be unable to find >>> the referenced commit. >> There is no administrative policy in place that says github users shall >> maintain there history. > Anyone who have a copy of the git repository would be able to 'git > show 5d3c5151c2b885aab36627bafb8539238da27b2d' and prove (arguably, > SHA1 is now broken, but it's still better than referencing e.g. a CVS > or SVN revision), and the location of the repository is publicly > known. > >> I had too many indirections to find this change on github: >> commitlog -> google -> wrong article that references this sha1 -> actual commit >> >> I re-iterate lets NOT start to use git hashes in our commit messages. > I don't see any problem with Gleb's commit message, it have referenced > the original commit using the right notion (Git SHA1) and have > included a brief description of what was done at the same time. I see no reason to not add a hash *as secondary data*. Just not primary. Copy the commit message.. > > From owner-svn-src-head@freebsd.org Wed Apr 26 12:17: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 1115ED519E9; Wed, 26 Apr 2017 12:17:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D4793A30; Wed, 26 Apr 2017 12:16:59 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (124-168-240-29.dyn.iinet.net.au [124.168.240.29]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v3QCGp5V041573 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 26 Apr 2017 05:16:54 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r317409 - head/contrib/tcpdump To: Benjamin Kaduk , John Baldwin References: <201704252010.v3PKA0ba063109@pdx.rh.CN85.dnsmgr.net> <9709200.gDHZIeQ1vL@ralph.baldwin.cx> Cc: rgrimes@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Julian Elischer Message-ID: Date: Wed, 26 Apr 2017 20:16:45 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: 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: Wed, 26 Apr 2017 12:17:00 -0000 On 26/4/17 4:38 am, Benjamin Kaduk wrote: > On Tue, Apr 25, 2017 at 3:28 PM, John Baldwin > wrote: > > > I do think that when referring to a Git hash the citation should > also include > something to identify which repository it came from. It doesn't > have to be a > URL per se (we just use 'NetBSD' for makefs, not a full URL to > NetBSD's > cvsweb), but it should be clear enough that one can find the > corresponding > repository. Probably that information belongs in 'Obtained From'. > > > Since Rodney asked and I already have the svn log up, here are some > existing > commits that are doing similar sorts of things: > r317267 is typical of the illumos/ZFS imports it also has an exhaustive explantion of the fix and bug. With that, the hash is a 'convenience field'. > though sometimes a full github URL is used, as in r316695 > r316665 pulls from Concurrency Kit (I think; CK was not expanded in > the commit message :( ) > r315947 from libcxxrt > r315926 and a few previous revisions from dragonflybsd.git > r315745 from libcxxrt > r314435 again from CK > > and we're not even out of 2017 yet. > > -Ben From owner-svn-src-head@freebsd.org Wed Apr 26 14:25: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 76CF6D51826; Wed, 26 Apr 2017 14:25:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46DCA791; Wed, 26 Apr 2017 14:25:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3QEP1oF005122; Wed, 26 Apr 2017 14:25:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QEP1P8005121; Wed, 26 Apr 2017 14:25:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704261425.v3QEP1P8005121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 26 Apr 2017 14:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317436 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 26 Apr 2017 14:25:02 -0000 Author: kib Date: Wed Apr 26 14:25:01 2017 New Revision: 317436 URL: https://svnweb.freebsd.org/changeset/base/317436 Log: getpagesize(3) cannot fail. The sysctl(HW_PAGESIZE) call cannot fail on FreeBSD kernels at least. And even if it failed for some improbable reason, PAGE_SIZE is a safe value to return. Discussed with: jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/gen/getpagesize.c Modified: head/lib/libc/gen/getpagesize.c ============================================================================== --- head/lib/libc/gen/getpagesize.c Wed Apr 26 06:20:58 2017 (r317435) +++ head/lib/libc/gen/getpagesize.c Wed Apr 26 14:25:01 2017 (r317436) @@ -69,7 +69,7 @@ getpagesize(void) mib[1] = HW_PAGESIZE; size = sizeof value; if (sysctl(mib, nitems(mib), &value, &size, NULL, 0) == -1) - return (-1); + return (PAGE_SIZE); return (value); } From owner-svn-src-head@freebsd.org Wed Apr 26 14: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 80271D51A34; Wed, 26 Apr 2017 14:28:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D2E3AD3; Wed, 26 Apr 2017 14:28: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 v3QESRva005316; Wed, 26 Apr 2017 14:28:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QESRjW005315; Wed, 26 Apr 2017 14:28:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704261428.v3QESRjW005315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 26 Apr 2017 14:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317437 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 26 Apr 2017 14:28:28 -0000 Author: kib Date: Wed Apr 26 14:28:27 2017 New Revision: 317437 URL: https://svnweb.freebsd.org/changeset/base/317437 Log: getpagesize(3) cannot fail. Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/gen/getpagesize.3 Modified: head/lib/libc/gen/getpagesize.3 ============================================================================== --- head/lib/libc/gen/getpagesize.3 Wed Apr 26 14:25:01 2017 (r317436) +++ head/lib/libc/gen/getpagesize.3 Wed Apr 26 14:28:27 2017 (r317437) @@ -28,7 +28,7 @@ .\" @(#)getpagesize.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 22, 2017 +.Dd April 26, 2017 .Dt GETPAGESIZE 3 .Os .Sh NAME @@ -51,9 +51,6 @@ management calls. The page size is a system page size and may not be the same as the underlying hardware page size. -.Sh RETURN VALUES -.Nm -returns the number of bytes in a page on success, -1 on failure. .Sh SEE ALSO .Xr pagesize 1 , .Xr sbrk 2 From owner-svn-src-head@freebsd.org Wed Apr 26 16:13: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 92E52D51E9B; Wed, 26 Apr 2017 16:13:24 +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 497AA12CF; Wed, 26 Apr 2017 16:13:24 +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 v3QGDNbX050303; Wed, 26 Apr 2017 16:13:23 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QGDN37050300; Wed, 26 Apr 2017 16:13:23 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201704261613.v3QGDN37050300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Wed, 26 Apr 2017 16:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317441 - head/sys/dev/ahci 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, 26 Apr 2017 16:13:24 -0000 Author: cognet Date: Wed Apr 26 16:13:22 2017 New Revision: 317441 URL: https://svnweb.freebsd.org/changeset/base/317441 Log: Check if the device is marked as dma-coherent in the FDT, and if so, let busdma know, so that on architectures where dma isn't always coherent, we know we don't have to write-back/invalidates cachelines on DMA operations. Reviewed by: andrew, mav Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahci_generic.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Apr 26 14:50:06 2017 (r317440) +++ head/sys/dev/ahci/ahci.c Wed Apr 26 16:13:22 2017 (r317441) @@ -249,7 +249,8 @@ ahci_attach(device_t dev) (ctlr->caps & AHCI_CAP_64BIT) ? BUS_SPACE_MAXADDR : BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE, - 0, NULL, NULL, &ctlr->dma_tag)) { + ctlr->dma_coherent ? BUS_DMA_COHERENT : 0, NULL, NULL, + &ctlr->dma_tag)) { ahci_free_mem(dev); rman_fini(&ctlr->sc_iomem); return (ENXIO); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Wed Apr 26 14:50:06 2017 (r317440) +++ head/sys/dev/ahci/ahci.h Wed Apr 26 16:13:22 2017 (r317441) @@ -519,6 +519,7 @@ struct ahci_controller { void *argument; } interrupt[AHCI_MAX_PORTS]; void (*ch_start)(struct ahci_channel *); + int dma_coherent; /* DMA is cache-coherent */ }; enum ahci_err_type { Modified: head/sys/dev/ahci/ahci_generic.c ============================================================================== --- head/sys/dev/ahci/ahci_generic.c Wed Apr 26 14:50:06 2017 (r317440) +++ head/sys/dev/ahci/ahci_generic.c Wed Apr 26 16:13:22 2017 (r317441) @@ -68,6 +68,8 @@ static struct ofw_compat_data compat_dat static int ahci_fdt_probe(device_t dev) { + struct ahci_controller *ctlr = device_get_softc(dev); + phandle_t node; if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -76,6 +78,8 @@ ahci_fdt_probe(device_t dev) return (ENXIO); device_set_desc_copy(dev, "AHCI SATA controller"); + node = ofw_bus_get_node(dev); + ctlr->dma_coherent = OF_hasprop(node, "dma-coherent"); return (BUS_PROBE_DEFAULT); } #endif From owner-svn-src-head@freebsd.org Wed Apr 26 16:50: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 B4182D512A5; Wed, 26 Apr 2017 16:50:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 858A11E82; Wed, 26 Apr 2017 16:50:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3QGosTL064887; Wed, 26 Apr 2017 16:50:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QGosAR064886; Wed, 26 Apr 2017 16:50:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201704261650.v3QGosAR064886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 26 Apr 2017 16:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317443 - 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: Wed, 26 Apr 2017 16:50:55 -0000 Author: bdrewery Date: Wed Apr 26 16:50:54 2017 New Revision: 317443 URL: https://svnweb.freebsd.org/changeset/base/317443 Log: Revert r317432 and add a new entry for r316527. Requested by: imp Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Apr 26 16:27:20 2017 (r317442) +++ head/UPDATING Wed Apr 26 16:50:54 2017 (r317443) @@ -76,6 +76,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 installed. To continue using aarch64-binutils, set CROSS_BINUTILS_PREFIX=/usr/local/aarch64-freebsd/bin . +20170405: + The UDP optimization in entry 20160818 that added the sysctl + net.inet.udp.require_l2_bcast has been reverted. L2 broadcast + packets will no longer be treated as L3 broadcast packets. + 20170331: Binds and sends to the loopback addresses, IPv6 and IPv4, will now use any explicitly assigned loopback address available in the jail @@ -215,6 +220,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 to 1200005. 20160818: + The UDP receive code has been updated to only treat incoming UDP + packets that were addressed to an L2 broadcast address as L3 + broadcast packets. It is not expected that this will affect any + standards-conforming UDP application. The new behaviour can be + disabled by setting the sysctl net.inet.udp.require_l2_bcast to + 0. + +20160818: Remove the openbsd_poll system call. __FreeBSD_version has been bumped because of this. From owner-svn-src-head@freebsd.org Wed Apr 26 17:55: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 75963D51834; Wed, 26 Apr 2017 17:55:45 +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 2C0A81000; Wed, 26 Apr 2017 17:55:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3QHtiTc091907; Wed, 26 Apr 2017 17:55:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QHtibV091905; Wed, 26 Apr 2017 17:55:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704261755.v3QHtibV091905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 26 Apr 2017 17:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317444 - 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: Wed, 26 Apr 2017 17:55:45 -0000 Author: glebius Date: Wed Apr 26 17:55:43 2017 New Revision: 317444 URL: https://svnweb.freebsd.org/changeset/base/317444 Log: UMA_ZONE_REFCNT was removed. PR: 209715 Submitted by: Fabian Keil MFC after: 3 days Modified: head/share/man/man9/Makefile head/share/man/man9/zone.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed Apr 26 16:50:54 2017 (r317443) +++ head/share/man/man9/Makefile Wed Apr 26 17:55:43 2017 (r317444) @@ -1994,7 +1994,6 @@ MLINKS+=vrele.9 vput.9 \ vrele.9 vunref.9 MLINKS+=vslock.9 vsunlock.9 MLINKS+=zone.9 uma.9 \ - zone.9 uma_find_refcnt.9 \ zone.9 uma_zalloc.9 \ zone.9 uma_zalloc_arg.9 \ zone.9 uma_zcreate.9 \ Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Wed Apr 26 16:50:54 2017 (r317443) +++ head/share/man/man9/zone.9 Wed Apr 26 17:55:43 2017 (r317444) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2015 +.Dd April 26, 2017 .Dt ZONE 9 .Os .Sh NAME @@ -34,7 +34,6 @@ .Nm uma_zalloc_arg , .Nm uma_zfree , .Nm uma_zfree_arg , -.Nm uma_find_refcnt , .Nm uma_zdestroy , .Nm uma_zone_set_max, .Nm uma_zone_get_max, @@ -60,8 +59,6 @@ .Fn uma_zfree "uma_zone_t zone" "void *item" .Ft void .Fn uma_zfree_arg "uma_zone_t zone" "void *item" "void *arg" -.Ft "uint32_t *" -.Fn uma_find_refcnt "uma_zone_t zone" "void *item" .Ft void .Fn uma_zdestroy "uma_zone_t zone" .Ft int @@ -155,10 +152,6 @@ is a subset of the following flags: .Bl -tag -width "foo" .It Dv UMA_ZONE_NOFREE Slabs of the zone are never returned back to VM. -.It Dv UMA_ZONE_REFCNT -Each item in the zone would have internal reference counter associated with it. -See -.Fn uma_find_refcnt . .It Dv UMA_ZONE_NODUMP Pages belonging to the zone will not be included into mini-dumps. .It Dv UMA_ZONE_PCPU @@ -257,13 +250,6 @@ and .Dv dtor functions, respectively. .Pp -If zone was created with -.Dv UMA_ZONE_REFCNT -flag, then pointer to reference counter for an item can be retrieved with -help of the -.Fn uma_find_refcnt -function. -.Pp Created zones, which are empty, can be destroyed using From owner-svn-src-head@freebsd.org Wed Apr 26 17:58: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 25CA5D5197E; Wed, 26 Apr 2017 17:58:12 +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 EB5522F3; Wed, 26 Apr 2017 17:58:11 +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 v3QHwBHV092162; Wed, 26 Apr 2017 17:58:11 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QHwBxp092161; Wed, 26 Apr 2017 17:58:11 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704261758.v3QHwBxp092161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 26 Apr 2017 17:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317445 - head/tools/tools/umastat 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, 26 Apr 2017 17:58:12 -0000 Author: glebius Date: Wed Apr 26 17:58:10 2017 New Revision: 317445 URL: https://svnweb.freebsd.org/changeset/base/317445 Log: Fix build of tools/tools/umastat. PR: 218887 Submitted by: Fabian Keil Obtained from: ElectroBSD Modified: head/tools/tools/umastat/umastat.c Modified: head/tools/tools/umastat/umastat.c ============================================================================== --- head/tools/tools/umastat/umastat.c Wed Apr 26 17:55:43 2017 (r317444) +++ head/tools/tools/umastat/umastat.c Wed Apr 26 17:58:10 2017 (r317445) @@ -129,7 +129,6 @@ static const struct flaginfo { { UMA_ZONE_VM, "vm" }, { UMA_ZONE_HASH, "hash" }, { UMA_ZONE_SECONDARY, "secondary" }, - { UMA_ZONE_REFCNT, "refcnt" }, { UMA_ZONE_MAXBUCKET, "maxbucket" }, { UMA_ZONE_CACHESPREAD, "cachespread" }, { UMA_ZONE_VTOSLAB, "vtoslab" }, From owner-svn-src-head@freebsd.org Wed Apr 26 18:23: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 58D38D50488; Wed, 26 Apr 2017 18:23:11 +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 2853B75B; Wed, 26 Apr 2017 18:23:11 +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 v3QINAcf004387; Wed, 26 Apr 2017 18:23:10 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QIN9JT004384; Wed, 26 Apr 2017 18:23:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704261823.v3QIN9JT004384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Apr 2017 18:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317446 - in head: . share/man/man4 sys/conf sys/dev/cy 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, 26 Apr 2017 18:23:11 -0000 Author: jhb Date: Wed Apr 26 18:23:09 2017 New Revision: 317446 URL: https://svnweb.freebsd.org/changeset/base/317446 Log: Remove the cy(4) driver for Cyclades serial adapters. This driver has been disconnected from the build since the new tty layer was introduced in 8.0 and was never updated for new tty. Deleted: head/share/man/man4/cy.4 head/sys/dev/cy/ Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile head/sys/conf/files Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Apr 26 17:58:10 2017 (r317445) +++ head/ObsoleteFiles.inc Wed Apr 26 18:23:09 2017 (r317446) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170426: Remove cy(4) +OLD_FILES+=usr/share/man/man4/cy.4.gz # 20170425: NATM configuration support removed OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Apr 26 17:58:10 2017 (r317445) +++ head/share/man/man4/Makefile Wed Apr 26 18:23:09 2017 (r317446) @@ -118,7 +118,6 @@ MAN= aac.4 \ cxgb.4 \ cxgbe.4 \ cxgbev.4 \ - cy.4 \ cyapa.4 \ da.4 \ dc.4 \ Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 26 17:58:10 2017 (r317445) +++ head/sys/conf/files Wed Apr 26 18:23:09 2017 (r317446) @@ -1425,9 +1425,6 @@ t6fw.fw optional cxgbe \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" -dev/cy/cy.c optional cy -dev/cy/cy_isa.c optional cy isa -dev/cy/cy_pci.c optional cy pci dev/cyapa/cyapa.c optional cyapa iicbus dev/dc/if_dc.c optional dc pci dev/dc/dcphy.c optional dc pci From owner-svn-src-head@freebsd.org Wed Apr 26 19:26: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 EBBC2D51F6F; Wed, 26 Apr 2017 19:26:41 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8CE71584; Wed, 26 Apr 2017 19:26:41 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3QJQe06030985; Wed, 26 Apr 2017 19:26:40 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QJQel2030980; Wed, 26 Apr 2017 19:26:40 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704261926.v3QJQel2030980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 26 Apr 2017 19:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317457 - in head/sys: netinet netinet6 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, 26 Apr 2017 19:26:42 -0000 Author: tuexen Date: Wed Apr 26 19:26:40 2017 New Revision: 317457 URL: https://svnweb.freebsd.org/changeset/base/317457 Log: Use consistently uint32_t for mtu values. This does not change functionality, but this cleanup is need for further improvements of ICMP handling. MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/sctp6_var.h Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed Apr 26 19:25:01 2017 (r317456) +++ head/sys/netinet/sctp_usrreq.c Wed Apr 26 19:26:40 2017 (r317457) @@ -152,7 +152,7 @@ sctp_notify(struct sctp_inpcb *inp, uint8_t icmp_type, uint8_t icmp_code, uint16_t ip_len, - uint16_t next_mtu) + uint32_t next_mtu) { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -328,7 +328,7 @@ sctp_ctlinput(int cmd, struct sockaddr * icmp->icmp_type, icmp->icmp_code, ntohs(inner_ip->ip_len), - ntohs(icmp->icmp_nextmtu)); + (uint32_t)ntohs(icmp->icmp_nextmtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce ref-count */ Modified: head/sys/netinet/sctp_var.h ============================================================================== --- head/sys/netinet/sctp_var.h Wed Apr 26 19:25:01 2017 (r317456) +++ head/sys/netinet/sctp_var.h Wed Apr 26 19:26:40 2017 (r317457) @@ -341,7 +341,7 @@ void sctp_drain(void); void sctp_init(void); void sctp_notify(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, - uint8_t, uint8_t, uint16_t, uint16_t); + uint8_t, uint8_t, uint16_t, uint32_t); int sctp_flush(struct socket *, int); int sctp_shutdown(struct socket *); int Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Apr 26 19:25:01 2017 (r317456) +++ head/sys/netinet/sctputil.c Wed Apr 26 19:26:40 2017 (r317457) @@ -6971,7 +6971,7 @@ sctp_recv_icmp_tunneled_packet(int cmd, } sctp_notify(inp, stcb, net, type, code, ntohs(inner_ip->ip_len), - ntohs(icmp->icmp_nextmtu)); + (uint32_t)ntohs(icmp->icmp_nextmtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce ref-count */ @@ -7113,7 +7113,7 @@ sctp_recv_icmp6_tunneled_packet(int cmd, code = ICMP6_PARAMPROB_NEXTHEADER; } sctp6_notify(inp, stcb, net, type, code, - (uint16_t)ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); + ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce inp's ref-count */ Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Wed Apr 26 19:25:01 2017 (r317456) +++ head/sys/netinet6/sctp6_usrreq.c Wed Apr 26 19:26:40 2017 (r317457) @@ -183,7 +183,7 @@ sctp6_notify(struct sctp_inpcb *inp, struct sctp_nets *net, uint8_t icmp6_type, uint8_t icmp6_code, - uint16_t next_mtu) + uint32_t next_mtu) { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -383,7 +383,7 @@ sctp6_ctlinput(int cmd, struct sockaddr sctp6_notify(inp, stcb, net, ip6cp->ip6c_icmp6->icmp6_type, ip6cp->ip6c_icmp6->icmp6_code, - (uint16_t)ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); + ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce inp's ref-count */ Modified: head/sys/netinet6/sctp6_var.h ============================================================================== --- head/sys/netinet6/sctp6_var.h Wed Apr 26 19:25:01 2017 (r317456) +++ head/sys/netinet6/sctp6_var.h Wed Apr 26 19:26:40 2017 (r317457) @@ -49,6 +49,6 @@ sctp6_output(struct sctp_inpcb *, struct void sctp6_ctlinput(int, struct sockaddr *, void *); void sctp6_notify(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, - uint8_t, uint8_t, uint16_t); + uint8_t, uint8_t, uint32_t); #endif #endif From owner-svn-src-head@freebsd.org Wed Apr 26 19:33: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 1F528D511B3; Wed, 26 Apr 2017 19:33:58 +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 ECF831AD0; Wed, 26 Apr 2017 19:33:57 +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 v3QJXunb035217; Wed, 26 Apr 2017 19:33:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QJXuVx035211; Wed, 26 Apr 2017 19:33:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201704261933.v3QJXuVx035211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 26 Apr 2017 19:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317458 - in head/contrib/llvm: include/llvm/CodeGen include/llvm/MC include/llvm/MC/MCParser lib/CodeGen/AsmPrinter lib/MC lib/MC/MCParser 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, 26 Apr 2017 19:33:58 -0000 Author: dim Date: Wed Apr 26 19:33:56 2017 New Revision: 317458 URL: https://svnweb.freebsd.org/changeset/base/317458 Log: Pull in r294458 from upstream llvm trunk (by Sanne Wouda): [Assembler] Enable nicer diagnostics for inline assembly. Fixed test. Summary: Enables source location in diagnostic messages from the backend. This is after parsing, during finalization. This requires the SourceMgr, the inline assembly string buffer, and DiagInfo to still be alive after EmitInlineAsm returns. This patch creates a single SourceMgr for inline assembly inside the AsmPrinter. MCContext gets a pointer to this SourceMgr. Using one SourceMgr per call to EmitInlineAsm would make it difficult for MCContext to figure out in which SourceMgr the SMLoc is located, while a single SourceMgr can figure it out if it has multiple buffers. The Str argument to EmitInlineAsm is copied into a buffer and owned by the inline asm SourceMgr. This ensures that DiagHandlers won't print garbage. (Clang emits a "note: instantiated into assembly here", which refers to this string.) The AsmParser gets destroyed before finalization, which means that the DiagHandlers the AsmParser installs into the SourceMgr will be stale. Restore the saved DiagHandlers. Since now we're using just one SourceMgr for multiple inline asm strings, we need to tell the AsmParser which buffer it needs to parse currently. Hand a buffer id -- returned from SourceMgr:: AddNewSourceBuffer -- to the AsmParser. Reviewers: rnk, grosbach, compnerd, rengolin, rovka, anemet Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29441 This improves error reporting for some inline assembly constructs that clang does not approve of: instead of crashing with a "fatal backend error", it will now show a normal error message, and point out the location of the problematic assembly. Reported by: mmel MFC after: 1 week Modified: head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Modified: head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h Wed Apr 26 19:26:40 2017 (r317457) +++ head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h Wed Apr 26 19:33:56 2017 (r317458) @@ -23,6 +23,7 @@ #include "llvm/IR/InlineAsm.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/SourceMgr.h" namespace llvm { class AsmPrinterHandler; @@ -137,6 +138,19 @@ private: /// maintains ownership of the emitters. SmallVector Handlers; +public: + struct SrcMgrDiagInfo { + SourceMgr SrcMgr; + const MDNode *LocInfo; + LLVMContext::InlineAsmDiagHandlerTy DiagHandler; + void *DiagContext; + }; + +private: + /// Structure for generating diagnostics for inline assembly. Only initialised + /// when necessary. + mutable std::unique_ptr DiagInfo; + /// If the target supports dwarf debug info, this pointer is non-null. DwarfDebug *DD; Modified: head/contrib/llvm/include/llvm/MC/MCContext.h ============================================================================== --- head/contrib/llvm/include/llvm/MC/MCContext.h Wed Apr 26 19:26:40 2017 (r317457) +++ head/contrib/llvm/include/llvm/MC/MCContext.h Wed Apr 26 19:33:56 2017 (r317458) @@ -59,6 +59,9 @@ namespace llvm { /// The SourceMgr for this object, if any. const SourceMgr *SrcMgr; + /// The SourceMgr for inline assembly, if any. + SourceMgr *InlineSrcMgr; + /// The MCAsmInfo for this target. const MCAsmInfo *MAI; @@ -240,6 +243,8 @@ namespace llvm { const SourceMgr *getSourceManager() const { return SrcMgr; } + void setInlineSourceManager(SourceMgr *SM) { InlineSrcMgr = SM; } + const MCAsmInfo *getAsmInfo() const { return MAI; } const MCRegisterInfo *getRegisterInfo() const { return MRI; } Modified: head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h ============================================================================== --- head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h Wed Apr 26 19:26:40 2017 (r317457) +++ head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h Wed Apr 26 19:33:56 2017 (r317458) @@ -258,7 +258,7 @@ public: /// \brief Create an MCAsmParser instance. MCAsmParser *createMCAsmParser(SourceMgr &, MCContext &, MCStreamer &, - const MCAsmInfo &); + const MCAsmInfo &, unsigned CB = 0); } // End llvm namespace Modified: head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Wed Apr 26 19:26:40 2017 (r317457) +++ head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Wed Apr 26 19:33:56 2017 (r317458) @@ -40,19 +40,12 @@ using namespace llvm; #define DEBUG_TYPE "asm-printer" -namespace { - struct SrcMgrDiagInfo { - const MDNode *LocInfo; - LLVMContext::InlineAsmDiagHandlerTy DiagHandler; - void *DiagContext; - }; -} - /// srcMgrDiagHandler - This callback is invoked when the SourceMgr for an /// inline asm has an error in it. diagInfo is a pointer to the SrcMgrDiagInfo /// struct above. static void srcMgrDiagHandler(const SMDiagnostic &Diag, void *diagInfo) { - SrcMgrDiagInfo *DiagInfo = static_cast(diagInfo); + AsmPrinter::SrcMgrDiagInfo *DiagInfo = + static_cast(diagInfo); assert(DiagInfo && "Diagnostic context not passed down?"); // If the inline asm had metadata associated with it, pull out a location @@ -99,35 +92,34 @@ void AsmPrinter::EmitInlineAsm(StringRef return; } - SourceMgr SrcMgr; - SrcMgr.setIncludeDirs(MCOptions.IASSearchPaths); + if (!DiagInfo) { + DiagInfo = make_unique(); - SrcMgrDiagInfo DiagInfo; + MCContext &Context = MMI->getContext(); + Context.setInlineSourceManager(&DiagInfo->SrcMgr); - // If the current LLVMContext has an inline asm handler, set it in SourceMgr. - LLVMContext &LLVMCtx = MMI->getModule()->getContext(); - bool HasDiagHandler = false; - if (LLVMCtx.getInlineAsmDiagnosticHandler() != nullptr) { - // If the source manager has an issue, we arrange for srcMgrDiagHandler - // to be invoked, getting DiagInfo passed into it. - DiagInfo.LocInfo = LocMDNode; - DiagInfo.DiagHandler = LLVMCtx.getInlineAsmDiagnosticHandler(); - DiagInfo.DiagContext = LLVMCtx.getInlineAsmDiagnosticContext(); - SrcMgr.setDiagHandler(srcMgrDiagHandler, &DiagInfo); - HasDiagHandler = true; + LLVMContext &LLVMCtx = MMI->getModule()->getContext(); + if (LLVMCtx.getInlineAsmDiagnosticHandler()) { + DiagInfo->DiagHandler = LLVMCtx.getInlineAsmDiagnosticHandler(); + DiagInfo->DiagContext = LLVMCtx.getInlineAsmDiagnosticContext(); + DiagInfo->SrcMgr.setDiagHandler(srcMgrDiagHandler, DiagInfo.get()); + } } + SourceMgr &SrcMgr = DiagInfo->SrcMgr; + SrcMgr.setIncludeDirs(MCOptions.IASSearchPaths); + DiagInfo->LocInfo = LocMDNode; + std::unique_ptr Buffer; - if (isNullTerminated) - Buffer = MemoryBuffer::getMemBuffer(Str, ""); - else - Buffer = MemoryBuffer::getMemBufferCopy(Str, ""); + // The inline asm source manager will outlive Str, so make a copy of the + // string for SourceMgr to own. + Buffer = MemoryBuffer::getMemBufferCopy(Str, ""); // Tell SrcMgr about this buffer, it takes ownership of the buffer. - SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc()); + unsigned BufNum = SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc()); std::unique_ptr Parser( - createMCAsmParser(SrcMgr, OutContext, *OutStreamer, *MAI)); + createMCAsmParser(SrcMgr, OutContext, *OutStreamer, *MAI, BufNum)); // We create a new MCInstrInfo here since we might be at the module level // and not have a MachineFunction to initialize the TargetInstrInfo from and @@ -151,7 +143,13 @@ void AsmPrinter::EmitInlineAsm(StringRef int Res = Parser->Run(/*NoInitialTextSection*/ true, /*NoFinalize*/ true); emitInlineAsmEnd(STI, &TAP->getSTI()); - if (Res && !HasDiagHandler) + + // LocInfo cannot be used for error generation from the backend. + // FIXME: associate LocInfo with the SourceBuffer to improve backend + // messages. + DiagInfo->LocInfo = nullptr; + + if (Res && !DiagInfo->DiagHandler) report_fatal_error("Error parsing inline asm\n"); } Modified: head/contrib/llvm/lib/MC/MCContext.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCContext.cpp Wed Apr 26 19:26:40 2017 (r317457) +++ head/contrib/llvm/lib/MC/MCContext.cpp Wed Apr 26 19:33:56 2017 (r317458) @@ -510,13 +510,15 @@ CodeViewContext &MCContext::getCVContext void MCContext::reportError(SMLoc Loc, const Twine &Msg) { HadError = true; - // If we have a source manager use it. Otherwise just use the generic - // report_fatal_error(). - if (!SrcMgr) + // If we have a source manager use it. Otherwise, try using the inline source + // manager. + // If that fails, use the generic report_fatal_error(). + if (SrcMgr) + SrcMgr->PrintMessage(Loc, SourceMgr::DK_Error, Msg); + else if (InlineSrcMgr) + InlineSrcMgr->PrintMessage(Loc, SourceMgr::DK_Error, Msg); + else report_fatal_error(Msg, false); - - // Use the source manager to print the message. - SrcMgr->PrintMessage(Loc, SourceMgr::DK_Error, Msg); } void MCContext::reportFatalError(SMLoc Loc, const Twine &Msg) { Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Wed Apr 26 19:26:40 2017 (r317457) +++ head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Wed Apr 26 19:33:56 2017 (r317458) @@ -209,7 +209,7 @@ private: public: AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out, - const MCAsmInfo &MAI); + const MCAsmInfo &MAI, unsigned CB); ~AsmParser() override; bool Run(bool NoInitialTextSection, bool NoFinalize = false) override; @@ -572,9 +572,9 @@ extern MCAsmParserExtension *createCOFFA enum { DEFAULT_ADDRSPACE = 0 }; AsmParser::AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out, - const MCAsmInfo &MAI) + const MCAsmInfo &MAI, unsigned CB = 0) : Lexer(MAI), Ctx(Ctx), Out(Out), MAI(MAI), SrcMgr(SM), - PlatformParser(nullptr), CurBuffer(SM.getMainFileID()), + PlatformParser(nullptr), CurBuffer(CB ? CB : SM.getMainFileID()), MacrosEnabledFlag(true), CppHashInfo(), AssemblerDialect(~0U), IsDarwin(false), ParsingInlineAsm(false) { HadError = false; @@ -608,6 +608,10 @@ AsmParser::AsmParser(SourceMgr &SM, MCCo AsmParser::~AsmParser() { assert((HadError || ActiveMacros.empty()) && "Unexpected active macro instantiation!"); + + // Restore the saved diagnostics handler and context for use during + // finalization. + SrcMgr.setDiagHandler(SavedDiagHandler, SavedDiagContext); } void AsmParser::printMacroInstantiations() { @@ -5518,6 +5522,7 @@ bool parseAssignmentExpression(StringRef /// \brief Create an MCAsmParser instance. MCAsmParser *llvm::createMCAsmParser(SourceMgr &SM, MCContext &C, - MCStreamer &Out, const MCAsmInfo &MAI) { - return new AsmParser(SM, C, Out, MAI); + MCStreamer &Out, const MCAsmInfo &MAI, + unsigned CB) { + return new AsmParser(SM, C, Out, MAI, CB); } From owner-svn-src-head@freebsd.org Wed Apr 26 19:34:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E52FD5124A; Wed, 26 Apr 2017 19:34:43 +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 E2B561CB7; Wed, 26 Apr 2017 19:34:42 +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 v3QJYf5o035293; Wed, 26 Apr 2017 19:34:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QJYfS3035292; Wed, 26 Apr 2017 19:34:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201704261934.v3QJYfS3035292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 26 Apr 2017 19:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317459 - head/usr.sbin/fstyp 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, 26 Apr 2017 19:34:43 -0000 Author: trasz Date: Wed Apr 26 19:34:41 2017 New Revision: 317459 URL: https://svnweb.freebsd.org/changeset/base/317459 Log: Make fstyp(8) recognize exFAT even without the -u option. While it's not directly mountable with mount(8), it's something that's mountable - differently from GELI or zpools. MFC after: 2 weeks Modified: head/usr.sbin/fstyp/fstyp.8 head/usr.sbin/fstyp/fstyp.c Modified: head/usr.sbin/fstyp/fstyp.8 ============================================================================== --- head/usr.sbin/fstyp/fstyp.8 Wed Apr 26 19:33:56 2017 (r317458) +++ head/usr.sbin/fstyp/fstyp.8 Wed Apr 26 19:34:41 2017 (r317459) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 13, 2017 +.Dd April 26, 2017 .Dt FSTYP 8 .Os .Sh NAME @@ -43,7 +43,7 @@ The .Nm utility is used to determine the filesystem type on a given device. -It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems. +It can recognize ISO-9660, exFAT, Ext2, FAT, NTFS, and UFS filesystems. When the .Fl u flag is specified, @@ -51,7 +51,7 @@ flag is specified, also recognizes certain additional metadata formats that cannot be handled using .Xr mount 8 , -such as exFAT filesystems, +such as .Xr geli 8 providers, and ZFS pools. Modified: head/usr.sbin/fstyp/fstyp.c ============================================================================== --- head/usr.sbin/fstyp/fstyp.c Wed Apr 26 19:33:56 2017 (r317458) +++ head/usr.sbin/fstyp/fstyp.c Wed Apr 26 19:34:41 2017 (r317459) @@ -57,7 +57,7 @@ static struct { bool unmountable; } fstypes[] = { { "cd9660", &fstyp_cd9660, false }, - { "exfat", &fstyp_exfat, true }, + { "exfat", &fstyp_exfat, false }, { "ext2fs", &fstyp_ext2fs, false }, { "geli", &fstyp_geli, true }, { "msdosfs", &fstyp_msdosfs, false }, From owner-svn-src-head@freebsd.org Wed Apr 26 19:41: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 297C2D5130E; Wed, 26 Apr 2017 19:41:55 +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 D3E73100; Wed, 26 Apr 2017 19:41:54 +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 v3QJfr6U039384; Wed, 26 Apr 2017 19:41:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QJfrct039380; Wed, 26 Apr 2017 19:41:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201704261941.v3QJfrct039380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 26 Apr 2017 19:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317460 - head/share/man/man4 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, 26 Apr 2017 19:41:55 -0000 Author: trasz Date: Wed Apr 26 19:41:53 2017 New Revision: 317460 URL: https://svnweb.freebsd.org/changeset/base/317460 Log: Add some .Xrs to USB serial driver man pages. MFC after: 2 weeks Modified: head/share/man/man4/ubser.4 head/share/man/man4/ucom.4 head/share/man/man4/ucycom.4 head/share/man/man4/uipaq.4 Modified: head/share/man/man4/ubser.4 ============================================================================== --- head/share/man/man4/ubser.4 Wed Apr 26 19:34:41 2017 (r317459) +++ head/share/man/man4/ubser.4 Wed Apr 26 19:41:53 2017 (r317460) @@ -60,6 +60,7 @@ driver provides support for the BWCT con .El .Sh SEE ALSO .Xr tty 4 , +.Xr ucom 4 , .Xr usb 4 .Sh HISTORY The Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Wed Apr 26 19:34:41 2017 (r317459) +++ head/share/man/man4/ucom.4 Wed Apr 26 19:41:53 2017 (r317460) @@ -99,8 +99,15 @@ Capture pulses on the DCD line. .Sh SEE ALSO .Xr tty 4 , .Xr uark 4 , +.Xr ubsa 4 , +.Xr ubser 4 , .Xr uchcom 4 , +.Xr ucycom 4 , +.Xr ufoma 4 , .Xr uftdi 4 , +.Xr uhso 4 , +.\".Xr ugensa 4 , +.Xr uipaq 4 , .Xr umcs 4 , .Xr umct 4 , .Xr umodem 4 , Modified: head/share/man/man4/ucycom.4 ============================================================================== --- head/share/man/man4/ucycom.4 Wed Apr 26 19:34:41 2017 (r317459) +++ head/share/man/man4/ucycom.4 Wed Apr 26 19:41:53 2017 (r317460) @@ -73,6 +73,7 @@ DeLorme Earthmate USB GPS receiver .El .Sh SEE ALSO .Xr tty 4 , +.Xr ucom 4 , .Xr usb 4 .Sh HISTORY The Modified: head/share/man/man4/uipaq.4 ============================================================================== --- head/share/man/man4/uipaq.4 Wed Apr 26 19:34:41 2017 (r317459) +++ head/share/man/man4/uipaq.4 Wed Apr 26 19:41:53 2017 (r317460) @@ -82,7 +82,6 @@ driver which makes it behave like a .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , -.Xr uhub 4 , .Xr usb 4 .Sh HISTORY The From owner-svn-src-head@freebsd.org Wed Apr 26 19: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 4E57DD51880; Wed, 26 Apr 2017 19:51:13 +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 1A70AC15; Wed, 26 Apr 2017 19:51:13 +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 v3QJpCBQ040806; Wed, 26 Apr 2017 19:51:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QJpAni040783; Wed, 26 Apr 2017 19:51:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201704261951.v3QJpAni040783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 26 Apr 2017 19:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317463 - head/share/man/man4 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, 26 Apr 2017 19:51:13 -0000 Author: trasz Date: Wed Apr 26 19:51:10 2017 New Revision: 317463 URL: https://svnweb.freebsd.org/changeset/base/317463 Log: Add information about device nodes to man pages for USB serial drivers. MFC after: 2 weeks Modified: head/share/man/man4/u3g.4 head/share/man/man4/uark.4 head/share/man/man4/uart.4 head/share/man/man4/ubsa.4 head/share/man/man4/ubser.4 head/share/man/man4/uchcom.4 head/share/man/man4/ucom.4 head/share/man/man4/ucycom.4 head/share/man/man4/uftdi.4 head/share/man/man4/uipaq.4 head/share/man/man4/umcs.4 head/share/man/man4/umct.4 head/share/man/man4/umodem.4 head/share/man/man4/umoscom.4 head/share/man/man4/uplcom.4 head/share/man/man4/uslcom.4 head/share/man/man4/uvisor.4 head/share/man/man4/uvscom.4 Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/u3g.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2013 +.Dd April 26, 2017 .Dt U3G 4 .Os .Sh NAME @@ -97,6 +97,20 @@ See .Xr usbconfig 8 and .Xr usb_quirk 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU?.?.init" -compact +.It Pa /dev/ttyU?.? +for callin ports +.It Pa /dev/ttyU?.?.init +.It Pa /dev/ttyU?.?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU?.? +for callout ports +.It Pa /dev/cuaU?.?.init +.It Pa /dev/cuaU?.?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uark.4 ============================================================================== --- head/share/man/man4/uark.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uark.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UARK 4 .Os .Sh NAME @@ -57,6 +57,20 @@ KQ-U8A Data Cable .It Skymaster USB to RS232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uart.4 ============================================================================== --- head/share/man/man4/uart.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uart.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 9, 2015 +.Dd April 26, 2017 .Dt UART 4 .Os .Sh NAME @@ -226,14 +226,14 @@ level signal at up to 12 volts. A connection to header pins or an edge-connector on an embedded board is typically a TTL signal at 3.3 or 5 volts. .Sh FILES -.Bl -tag -width ".Pa /dev/ttyu?.init" -compact +.Bl -tag -width "/dev/ttyu?.init" -compact .It Pa /dev/ttyu? for callin ports .It Pa /dev/ttyu?.init .It Pa /dev/ttyu?.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuau? +.It Pa /dev/cuau* for callout ports .It Pa /dev/cuau?.init .It Pa /dev/cuau?.lock Modified: head/share/man/man4/ubsa.4 ============================================================================== --- head/share/man/man4/ubsa.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/ubsa.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UBSA 4 .Os .Sh NAME @@ -81,6 +81,20 @@ GoHubs GoCOM232 .It Peracom single port serial adapter .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/ubser.4 ============================================================================== --- head/share/man/man4/ubser.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/ubser.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UBSER 4 .Os .Sh NAME @@ -55,8 +55,18 @@ The .Nm driver provides support for the BWCT console management serial adapters. .Sh FILES -.Bl -tag -width ".Pa /dev/ttyy??" -compact -.It Pa /dev/ttyy?? +.Bl -tag -width "/dev/ttyU?.?.init" -compact +.It Pa /dev/ttyU?.? +for callin ports +.It Pa /dev/ttyU?.?.init +.It Pa /dev/ttyU?.?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU?.? +for callout ports +.It Pa /dev/cuaU?.?.init +.It Pa /dev/cuaU?.?.lock +corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO .Xr tty 4 , Modified: head/share/man/man4/uchcom.4 ============================================================================== --- head/share/man/man4/uchcom.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uchcom.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UCHCOM 4 .Os .Sh NAME @@ -70,6 +70,20 @@ driver supports the following adapters: .It HL USB-RS232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/ucom.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2015 +.Dd April 26, 2017 .Dt UCOM 4 .Os .Sh NAME @@ -92,9 +92,18 @@ Capture pulses on the CTS line. Capture pulses on the DCD line. .El .Sh FILES -.Bl -tag -width ".Pa /dev/cuaU?" -.It Pa /dev/cuaU? +.Bl -tag -width "/dev/ttyU?.init" -compact .It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO .Xr tty 4 , Modified: head/share/man/man4/ucycom.4 ============================================================================== --- head/share/man/man4/ucycom.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/ucycom.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UCYCOM 4 .Os .Sh NAME @@ -71,6 +71,20 @@ Cypress USB to RS232 bridge chips: .It DeLorme Earthmate USB GPS receiver .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uftdi.4 ============================================================================== --- head/share/man/man4/uftdi.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uftdi.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2015 +.Dd April 26, 2017 .Dt UFTDI 4 .Os .Sh NAME @@ -242,6 +242,20 @@ Buffalo PC-OP-RS / Kurouto-shikou KURO-R .It Prologix GPIB-USB Controller .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uipaq.4 ============================================================================== --- head/share/man/man4/uipaq.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uipaq.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UIPAQ 4 .Os .Sh NAME @@ -79,6 +79,20 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/umcs.4 ============================================================================== --- head/share/man/man4/umcs.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/umcs.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd April 26, 2017 .Dt UMCS 4 .Os .Sh NAME @@ -80,6 +80,20 @@ ST Lab U-360 two-port serial USB adapter .It ST Lab U-400 four-port serial USB adapter .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.?.init" -compact +.It Pa /dev/ttyU?.? +for callin ports +.It Pa /dev/ttyU?.?.init +.It Pa /dev/ttyU?.?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU?.? +for callout ports +.It Pa /dev/cuaU?.?.init +.It Pa /dev/cuaU?.?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/umct.4 ============================================================================== --- head/share/man/man4/umct.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/umct.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UMCT 4 .Os .Sh NAME @@ -78,6 +78,20 @@ Magic Control Technology USB-232 .It Sitecom USB-232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/umodem.4 ============================================================================== --- head/share/man/man4/umodem.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/umodem.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2012 +.Dd April 26, 2017 .Dt UMODEM 4 .Os .Sh NAME @@ -95,6 +95,20 @@ Sony Ericsson W810i phone .It Sonim XP5300 Force .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/umoscom.4 ============================================================================== --- head/share/man/man4/umoscom.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/umoscom.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2014 +.Dd April 26, 2017 .Dt UMOSCOM 4 .Os .Sh NAME @@ -56,6 +56,20 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uplcom.4 ============================================================================== --- head/share/man/man4/uplcom.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uplcom.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2012 +.Dd April 26, 2017 .Dt UPLCOM 4 .Os .Sh NAME @@ -180,6 +180,20 @@ YC-Cable USB-Serial Adapter .It Zeagle N2iTion3 Diving Computer .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uslcom.4 ============================================================================== --- head/share/man/man4/uslcom.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uslcom.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2012 +.Dd April 26, 2017 .Dt USLCOM 4 .Os .Sh NAME @@ -192,6 +192,20 @@ WMR RIGblaster Plug&Play and RIGtalk RT1 .It Zephyr Bioharness .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uvisor.4 ============================================================================== --- head/share/man/man4/uvisor.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uvisor.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UVISOR 4 .Os .Sh NAME @@ -118,6 +118,20 @@ Sony Clie S360 .It Sony Clie TJ37 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: head/share/man/man4/uvscom.4 ============================================================================== --- head/share/man/man4/uvscom.4 Wed Apr 26 19:45:07 2017 (r317462) +++ head/share/man/man4/uvscom.4 Wed Apr 26 19:51:10 2017 (r317463) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UVSCOM 4 .Os .Sh NAME @@ -77,6 +77,19 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU?.init" -compact +.It Pa /dev/ttyU? +for callin ports +.It Pa /dev/ttyU?.init +.It Pa /dev/ttyU?.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU? +for callout ports +.It Pa /dev/cuaU?.init +.It Pa /dev/cuaU?.lock +corresponding callout initial-state and lock-state devices .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , From owner-svn-src-head@freebsd.org Wed Apr 26 20:21: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 15F38D51EF2; Wed, 26 Apr 2017 20:21:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D992CA8F; Wed, 26 Apr 2017 20:21:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3QKL5P8053040; Wed, 26 Apr 2017 20:21:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QKL5fV053038; Wed, 26 Apr 2017 20:21:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704262021.v3QKL5fV053038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 26 Apr 2017 20:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317464 - in head/sys: netinet netinet6 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, 26 Apr 2017 20:21:07 -0000 Author: tuexen Date: Wed Apr 26 20:21:05 2017 New Revision: 317464 URL: https://svnweb.freebsd.org/changeset/base/317464 Log: Fix an issue with MTU calculation if an ICMP messaeg is received for an SCTP/UDP packet. MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed Apr 26 19:51:10 2017 (r317463) +++ head/sys/netinet/sctp_usrreq.c Wed Apr 26 20:21:05 2017 (r317464) @@ -220,11 +220,11 @@ sctp_notify(struct sctp_inpcb *inp, timer_stopped = 0; } /* Update the path MTU. */ + if (net->port) { + next_mtu -= sizeof(struct udphdr); + } if (net->mtu > next_mtu) { net->mtu = next_mtu; - if (net->port) { - net->mtu -= sizeof(struct udphdr); - } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Wed Apr 26 19:51:10 2017 (r317463) +++ head/sys/netinet6/sctp6_usrreq.c Wed Apr 26 20:21:05 2017 (r317464) @@ -237,11 +237,11 @@ sctp6_notify(struct sctp_inpcb *inp, timer_stopped = 0; } /* Update the path MTU. */ + if (net->port) { + next_mtu -= sizeof(struct udphdr); + } if (net->mtu > next_mtu) { net->mtu = next_mtu; - if (net->port) { - net->mtu -= sizeof(struct udphdr); - } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { From owner-svn-src-head@freebsd.org Wed Apr 26 21:23: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 60F97D51360; Wed, 26 Apr 2017 21:23:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AF561497; Wed, 26 Apr 2017 21:23:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v3QLN5hm058774 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Apr 2017 14:23:05 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v3QLN50f058773; Wed, 26 Apr 2017 14:23:05 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 26 Apr 2017 14:23:05 -0700 From: Gleb Smirnoff To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317409 - head/contrib/tcpdump Message-ID: <20170426212305.GF56922@FreeBSD.org> References: <201704251556.v3PFuk5U053547@repo.freebsd.org> <201704251830.v3PIUHdb062645@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704251830.v3PIUHdb062645@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.8.0 (2017-02-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, 26 Apr 2017 21:23:07 -0000 Rodney, On Tue, Apr 25, 2017 at 11:30:17AM -0700, Rodney W. Grimes wrote: R> > Author: glebius R> > Date: Tue Apr 25 15:56:46 2017 R> > New Revision: 317409 R> > URL: https://svnweb.freebsd.org/changeset/base/317409 R> > R> > Log: R> > Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use after free R> R> Lets not use git hashes as references in commit messages, R> it has very little value for someone reading a log of changes R> looking for something. There is no promise that it can be R> found later (github can go Poof). Since I did previous import of tcpdump, I find it very useful to see what exactly has been cherry-picked forward, for the person who will do next import, be it me or someone else. I agree that I should have put the hash into "meta data portion of commit message", not in the description. I will do so next time. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Wed Apr 26 21:51: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 F3AB6D51B11; Wed, 26 Apr 2017 21:51:18 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5F8692; Wed, 26 Apr 2017 21:51:18 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3QLpFVD068594; Wed, 26 Apr 2017 14:51:15 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3QLpEMX068593; Wed, 26 Apr 2017 14:51:14 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704262151.v3QLpEMX068593@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317409 - head/contrib/tcpdump In-Reply-To: <20170426212305.GF56922@FreeBSD.org> To: Gleb Smirnoff Date: Wed, 26 Apr 2017 14:51:14 -0700 (PDT) CC: rgrimes@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 26 Apr 2017 21:51:19 -0000 > Rodney, > > On Tue, Apr 25, 2017 at 11:30:17AM -0700, Rodney W. Grimes wrote: > R> > Author: glebius > R> > Date: Tue Apr 25 15:56:46 2017 > R> > New Revision: 317409 > R> > URL: https://svnweb.freebsd.org/changeset/base/317409 > R> > > R> > Log: > R> > Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use after free > R> > R> Lets not use git hashes as references in commit messages, > R> it has very little value for someone reading a log of changes > R> looking for something. There is no promise that it can be > R> found later (github can go Poof). > > Since I did previous import of tcpdump, I find it very useful to > see what exactly has been cherry-picked forward, for the person > who will do next import, be it me or someone else. > > I agree that I should have put the hash into "meta data portion > of commit message", not in the description. I will do so next time. Thank you! Thats really all I wanted -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Apr 26 21: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 4C8EFD51D7F; Wed, 26 Apr 2017 21:54:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19717877; Wed, 26 Apr 2017 21:54:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3QLssgb092286; Wed, 26 Apr 2017 21:54:54 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QLssfr092285; Wed, 26 Apr 2017 21:54:54 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704262154.v3QLssfr092285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 26 Apr 2017 21:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317465 - head/sys/fs/nfsclient 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, 26 Apr 2017 21:54:55 -0000 Author: rmacklem Date: Wed Apr 26 21:54:53 2017 New Revision: 317465 URL: https://svnweb.freebsd.org/changeset/base/317465 Log: Fix handling of a NFSv4.1 callback reply from the session cache. The nfsv4_seqsession() call returns NFSERR_REPLYFROMCACHE when it has a reply in the session, due to a requestor retry. The code erroneously assumed a return of 0 for this case. This patch fixes this and adds a KASSERT(). This would be an extremely rare occurrence. It was found during code inspection during the pNFS server development. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Wed Apr 26 20:21:05 2017 (r317464) +++ head/sys/fs/nfsclient/nfs_clstate.c Wed Apr 26 21:54:53 2017 (r317465) @@ -3560,9 +3560,18 @@ nfscl_docb(struct nfsrv_descript *nd, NF tsep->nfsess_backslots); } NFSUNLOCKCLSTATE(); - if (error == 0) { + if (error == 0 || error == NFSERR_REPLYFROMCACHE) { gotseq_ok = 1; if (rep != NULL) { + /* + * Handle a reply for a retried + * callback. The reply will be + * re-inserted in the session cache + * by the nfsv4_seqsess_cacherep() call + * after out: + */ + KASSERT(error == NFSERR_REPLYFROMCACHE, + ("cbsequence: non-NULL rep")); NFSCL_DEBUG(4, "Got cbretry\n"); m_freem(nd->nd_mreq); nd->nd_mreq = rep; From owner-svn-src-head@freebsd.org Wed Apr 26 22:15: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 D9B5DD512C1; Wed, 26 Apr 2017 22:15:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id A27B43DF; Wed, 26 Apr 2017 22:15:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 768A53C575E; Thu, 27 Apr 2017 08:15:38 +1000 (AEST) Date: Thu, 27 Apr 2017 08:15:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317446 - in head: . share/man/man4 sys/conf sys/dev/cy In-Reply-To: <201704261823.v3QIN9JT004384@repo.freebsd.org> Message-ID: <20170427072027.W3724@besplex.bde.org> References: <201704261823.v3QIN9JT004384@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=aTlrREBF24WYHQnKZIIA:9 a=CjuIK1q_8ugA:10 a=_bBvcJC8wCc67rcU61zu:22 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 26 Apr 2017 22:15:47 -0000 On Wed, 26 Apr 2017, John Baldwin wrote: > Log: > Remove the cy(4) driver for Cyclades serial adapters. > > This driver has been disconnected from the build since the new tty > layer was introduced in 8.0 and was never updated for new tty. Please back this out. I asked you not to remove this. It is updated in my tree, and I discussed this and sent you some patches a couple of years ago: XX From bde@optusnet.com.au Sat Oct 18 19:49:40 2014 +1100 XX Date: Sat, 18 Oct 2014 19:49:36 +1100 (EST) XX From: Bruce Evans XX X-X-Sender: bde@besplex.bde.org XX To: Bruce Evans XX cc: John Baldwin XX Subject: patch #1 for old tty bugs (was: Re: Removing disconnected tty drivers) Patches 2-999 are sort of queued behind this. I started committing again, but these are behind other things in my queue. Patch sizes for tty drivers: 754 2658 19842 cy.c.dif 1072 3817 27687 sio.c.dif 50 177 1158 sio_isa.c.dif 22 68 562 sio_puc.c.dif 714 4249 25211 tree1/tty.c.dif 13 71 548 tree1/tty.h.dif 297 1306 8272 tree1/tty_ttydisc.c.dif 26 68 649 tree1/ttydevsw.h.dif 33 91 822 tree1/ttydisc.h.dif 100 577 3709 tree1/uart_tty.c.dif tree1/... [some small patches not shown] [~10% overlap between tree1 and tree2] 1134 4457 28995 tree2/tty.c.dif 49 302 2099 tree2/tty.h.dif 90 318 2272 tree2/tty_ttydisc.c.dif Not as large as I remembered. Updating to use the new tty driver takes (per driver) about 50 lines for locking, 200 lines for interface renaming, and many hundreds of lines to work around bugs. The bug fixes in tty* are mostly independent (except for partial fixes for flow control) and not needed for the drivers to work as well as other drivers. uart is not updated as completely as the other drivers, but just has a couple of fixes to allow it to pass some POSIX tests. Bruce From owner-svn-src-head@freebsd.org Wed Apr 26 23:04: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 B1161D513D7; Wed, 26 Apr 2017 23:04:13 +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 908ABAD3; Wed, 26 Apr 2017 23:04:12 +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 2252410A82E; Wed, 26 Apr 2017 19:04:11 -0400 (EDT) From: John Baldwin To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317446 - in head: . share/man/man4 sys/conf sys/dev/cy Date: Wed, 26 Apr 2017 16:03:40 -0700 Message-ID: <2758348.2nUzbrrYqX@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170427072027.W3724@besplex.bde.org> References: <201704261823.v3QIN9JT004384@repo.freebsd.org> <20170427072027.W3724@besplex.bde.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); Wed, 26 Apr 2017 19:04:11 -0400 (EDT) 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: Wed, 26 Apr 2017 23:04:13 -0000 On Thursday, April 27, 2017 08:15:34 AM Bruce Evans wrote: > On Wed, 26 Apr 2017, John Baldwin wrote: > > > Log: > > Remove the cy(4) driver for Cyclades serial adapters. > > > > This driver has been disconnected from the build since the new tty > > layer was introduced in 8.0 and was never updated for new tty. > > Please back this out. I asked you not to remove this. It is updated in > my tree, and I discussed this and sent you some patches a couple of years > ago: > > XX From bde@optusnet.com.au Sat Oct 18 19:49:40 2014 +1100 > XX Date: Sat, 18 Oct 2014 19:49:36 +1100 (EST) > XX From: Bruce Evans > XX X-X-Sender: bde@besplex.bde.org > XX To: Bruce Evans > XX cc: John Baldwin > XX Subject: patch #1 for old tty bugs (was: Re: Removing disconnected tty drivers) > > Patches 2-999 are sort of queued behind this. I started committing again, > but these are behind other things in my queue. Oof, I knew you had patches for sio, but had forgotten they covered cy as well. Are you still using cy? -- John Baldwin From owner-svn-src-head@freebsd.org Thu Apr 27 00:02: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 AD4D0D51215; Thu, 27 Apr 2017 00:02:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 751AE8D2; Thu, 27 Apr 2017 00:02:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 1EADDD6B0F7; Thu, 27 Apr 2017 10:01:47 +1000 (AEST) Date: Thu, 27 Apr 2017 10:01:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317446 - in head: . share/man/man4 sys/conf sys/dev/cy In-Reply-To: <2758348.2nUzbrrYqX@ralph.baldwin.cx> Message-ID: <20170427093652.T4284@besplex.bde.org> References: <201704261823.v3QIN9JT004384@repo.freebsd.org> <20170427072027.W3724@besplex.bde.org> <2758348.2nUzbrrYqX@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=YgDJLns1xEQFpHuslZsA:9 a=CjuIK1q_8ugA:10 a=_bBvcJC8wCc67rcU61zu:22 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 27 Apr 2017 00:02:09 -0000 On Wed, 26 Apr 2017, John Baldwin wrote: > On Thursday, April 27, 2017 08:15:34 AM Bruce Evans wrote: >> On Wed, 26 Apr 2017, John Baldwin wrote: >> >>> Log: >>> Remove the cy(4) driver for Cyclades serial adapters. >>> >>> This driver has been disconnected from the build since the new tty >>> layer was introduced in 8.0 and was never updated for new tty. >> >> Please back this out. I asked you not to remove this. It is updated in >> my tree, and I discussed this and sent you some patches a couple of years >> ago: >> >> XX From bde@optusnet.com.au Sat Oct 18 19:49:40 2014 +1100 >> XX Date: Sat, 18 Oct 2014 19:49:36 +1100 (EST) >> XX From: Bruce Evans >> XX X-X-Sender: bde@besplex.bde.org >> XX To: Bruce Evans >> XX cc: John Baldwin >> XX Subject: patch #1 for old tty bugs (was: Re: Removing disconnected tty drivers) >> >> Patches 2-999 are sort of queued behind this. I started committing again, >> but these are behind other things in my queue. > > Oof, I knew you had patches for sio, but had forgotten they covered cy as well. > Are you still using cy? Yes, I still have 2 cy cards with 24 ports total online, with 2 ports actually used for serial console terminals, but the systems with themi usually run old versions of FreeBSD so the patches haven't been tested for a long time. I need to check that they still pass the regression tests last run on FreeBSD-~9 in 2014, after merging patches to newer versions. Bruce From owner-svn-src-head@freebsd.org Thu Apr 27 02:16: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 EB3E2D52656 for ; Thu, 27 Apr 2017 02:16:23 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (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 D27BAFB3 for ; Thu, 27 Apr 2017 02:16:23 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OP100F00PCX0S00@mr11p00im-asmtp001.me.com> for svn-src-head@freebsd.org; Thu, 27 Apr 2017 02:16:04 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1493259364; bh=+129JH1EGbJgtINw1/BgvOHi0PT6twdSBi8m8LrhoJk=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=RAB0CGHn/D5BDJF6TP9yDU8Frtj0w4fNnWq1jHT+hq8pVY8L45+ZTdgLvVdQrKaUp h3bo4UH6wYdMgiFpsrVR/6asexJXXe8oW8wpNdDhpVWC9qHYIABPjMskqQeW/4TAO0 GzjLEdB6yaKgsTU38cNSOD5O+KxkgKbIGsKk+iA799+oTj4a+ywmC+Ksq+Spl5uoiq 38L5kD/C3zUNom+Duu9UfA4SvwduDSco97cYXqMJNc3CCXY4Rofj7Y5PE53AlzCg3B cnaETJHb6rNewgBrXEDg4bVF6VhJNzpWa7zfcid1dNBrYAkQC70hTaZ/wf0JPoVsUy syGGZGZuPm5JQ== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OP1005DBQAQMV20@mr11p00im-asmtp001.me.com> for svn-src-head@freebsd.org; Thu, 27 Apr 2017 02:16:02 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-27_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=probablespam policy=default score=76 spamscore=76 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1704270022 X-Suspected-Spam: true User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Wed, 26 Apr 2017 19:16:01 -0700 Subject: RISCV kernel and world failures in -HEAD From: Ravi Pokala To: "svn-src-head@freebsd.org" Message-id: Thread-topic: RISCV kernel and world failures in -HEAD MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 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: Thu, 27 Apr 2017 02:16:24 -0000 FYI, there are some RISCV failures in -HEAD, as found by `make tinderbox': _.riscv.riscv64sf.buildworld: --- libc.so.7.full --- numa_setaffinity.pico: In function `__sys_numa_setaffinity': (.text+0xc): relocation truncated to fit: R_RISCV_JAL against symbol `cerror' defined in .text section in cerror.pico /usr/local/bin/riscv64-freebsd-ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status *** [libc.so.7.full] Error code 1 _.riscv.LOWRISC --- kernel.full --- linking kernel.full uart_bus_fdt.o: In function `uart_cpu_fdt_probe': /usr/home/rpokala/freebsd/clean/base/head/sys/dev/uart/uart_bus_fdt.c:228:(.text+0x4b0): relocation truncated to fit: R_RISCV_PCREL_HI20 against undefined symbol `__start_set_uart_fdt_class_set' /usr/local/riscv64-freebsd/bin/ld: final link failed: Nonrepresentable section on output *** [kernel.full] Error code 1 Thanks, Ravi (rpokala@) From owner-svn-src-head@freebsd.org Thu Apr 27 05:48: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 92162D525E5; Thu, 27 Apr 2017 05:48:53 +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 640961DE0; Thu, 27 Apr 2017 05:48:53 +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 v3R5mqUK086132; Thu, 27 Apr 2017 05:48:52 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3R5mqEU086131; Thu, 27 Apr 2017 05:48:52 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704270548.v3R5mqEU086131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 27 Apr 2017 05:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317483 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 27 Apr 2017 05:48:53 -0000 Author: glebius Date: Thu Apr 27 05:48:52 2017 New Revision: 317483 URL: https://svnweb.freebsd.org/changeset/base/317483 Log: We need CAP_MMAP_RW on memfd, since init_msix_table() may call mmap(). Modified: head/usr.sbin/bhyve/pci_passthru.c Modified: head/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- head/usr.sbin/bhyve/pci_passthru.c Thu Apr 27 02:17:45 2017 (r317482) +++ head/usr.sbin/bhyve/pci_passthru.c Thu Apr 27 05:48:52 2017 (r317483) @@ -703,6 +703,7 @@ passthru_init(struct vmctx *ctx, struct #ifndef WITHOUT_CAPSICUM cap_rights_clear(&rights, CAP_IOCTL); + cap_rights_set(&rights, CAP_MMAP_RW); if (cap_rights_limit(memfd, &rights) == -1 && errno != ENOSYS) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif From owner-svn-src-head@freebsd.org Thu Apr 27 14:29: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 A2215D53070; Thu, 27 Apr 2017 14:29:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73E78166; Thu, 27 Apr 2017 14:29:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3RETLgX001755; Thu, 27 Apr 2017 14:29:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RETL2x001754; Thu, 27 Apr 2017 14:29:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201704271429.v3RETL2x001754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 27 Apr 2017 14:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317504 - head/sys/compat/linuxkpi/common/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: Thu, 27 Apr 2017 14:29:22 -0000 Author: hselasky Date: Thu Apr 27 14:29:21 2017 New Revision: 317504 URL: https://svnweb.freebsd.org/changeset/base/317504 Log: Prefer to use real virtual address over direct map address in the linux_page_address() function in the LinuxKPI. This solves an issue where the return value from linux_page_address() is passed to kmem_free(). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Thu Apr 27 12:59:14 2017 (r317503) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Thu Apr 27 14:29:21 2017 (r317504) @@ -71,14 +71,16 @@ __FBSDID("$FreeBSD$"); void * linux_page_address(struct page *page) { + + if (page->object != kmem_object && page->object != kernel_object) { #ifdef LINUXKPI_HAVE_DMAP - return ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))); + return ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))); #else - if (page->object != kmem_object && page->object != kernel_object) return (NULL); +#endif + } return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS + IDX_TO_OFF(page->pindex))); -#endif } vm_page_t From owner-svn-src-head@freebsd.org Thu Apr 27 14:39: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 92E5FD53380; Thu, 27 Apr 2017 14:39:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E500B11; Thu, 27 Apr 2017 14:39:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3REdqA0006205; Thu, 27 Apr 2017 14:39:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3REdqeI006203; Thu, 27 Apr 2017 14:39:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201704271439.v3REdqeI006203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 27 Apr 2017 14:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317505 - head/sys/dev/mlx4/mlx4_en 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, 27 Apr 2017 14:39:53 -0000 Author: hselasky Date: Thu Apr 27 14:39:52 2017 New Revision: 317505 URL: https://svnweb.freebsd.org/changeset/base/317505 Log: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision: https://reviews.freebsd.org/D8876 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_en/en.h head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Modified: head/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- head/sys/dev/mlx4/mlx4_en/en.h Thu Apr 27 14:29:21 2017 (r317504) +++ head/sys/dev/mlx4/mlx4_en/en.h Thu Apr 27 14:39:52 2017 (r317505) @@ -587,7 +587,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Thu Apr 27 14:29:21 2017 (r317504) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Thu Apr 27 14:39:52 2017 (r317505) @@ -1639,7 +1639,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(&priv->stat_ctx); } @@ -1754,7 +1754,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(&priv->conf_ctx); kfree(priv->tx_ring); @@ -2573,9 +2573,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); - priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2638,7 +2638,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2649,9 +2648,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, From owner-svn-src-head@freebsd.org Thu Apr 27 15:03: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 BA002D53AE1; Thu, 27 Apr 2017 15:03:26 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 720051B22; Thu, 27 Apr 2017 15:03:26 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3RF3PqV018525; Thu, 27 Apr 2017 15:03:25 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RF3Ovn018517; Thu, 27 Apr 2017 15:03:24 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <201704271503.v3RF3Ovn018517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Thu, 27 Apr 2017 15:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317506 - in head: lib/libbluetooth sys/netgraph/bluetooth/hci sys/netgraph/bluetooth/include usr.sbin/bluetooth/hccontrol 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, 27 Apr 2017 15:03:26 -0000 Author: takawata Date: Thu Apr 27 15:03:24 2017 New Revision: 317506 URL: https://svnweb.freebsd.org/changeset/base/317506 Log: Make cached Bluetooth LE host advertise information visible from userland. Differential Revision: https://reviews.freebsd.org/D10362 Modified: head/lib/libbluetooth/bluetooth.h head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c head/sys/netgraph/bluetooth/hci/ng_hci_main.c head/sys/netgraph/bluetooth/hci/ng_hci_var.h head/sys/netgraph/bluetooth/include/ng_bluetooth.h head/sys/netgraph/bluetooth/include/ng_btsocket.h head/sys/netgraph/bluetooth/include/ng_hci.h head/usr.sbin/bluetooth/hccontrol/node.c Modified: head/lib/libbluetooth/bluetooth.h ============================================================================== --- head/lib/libbluetooth/bluetooth.h Thu Apr 27 14:39:52 2017 (r317505) +++ head/lib/libbluetooth/bluetooth.h Thu Apr 27 15:03:24 2017 (r317506) @@ -46,6 +46,7 @@ #include #include +#include #include #include #include Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Thu Apr 27 14:39:52 2017 (r317505) +++ head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Thu Apr 27 15:03:24 2017 (r317506) @@ -417,7 +417,6 @@ le_advertizing_report(ng_hci_unit_p unit } else getmicrotime(&n->updated); -#if 0 { /* * TODO: Make these information @@ -425,21 +424,36 @@ le_advertizing_report(ng_hci_unit_p unit */ u_int8_t length_data; - char *rssi; - - NG_HCI_M_PULLUP(event, sizeof(u_int8_t)); + event = m_pullup(event, sizeof(u_int8_t)); + if(event == NULL){ + NG_HCI_WARN("%s: Event datasize Pullup Failed\n", __func__); + goto out; + } length_data = *mtod(event, u_int8_t *); m_adj(event, sizeof(u_int8_t)); + n->extinq_size = (length_data < NG_HCI_EXTINQ_MAX)? + length_data : NG_HCI_EXTINQ_MAX; + /*Advertizement data*/ - NG_HCI_M_PULLUP(event, length_data); - m_adj(event, length_data); - NG_HCI_M_PULLUP(event, sizeof(char )); + event = m_pullup(event, n->extinq_size); + if(event == NULL){ + NG_HCI_WARN("%s: Event data pullup Failed\n", __func__); + goto out; + } + m_copydata(event, 0, n->extinq_size, n->extinq_data); + m_adj(event, n->extinq_size); + event = m_pullup(event, sizeof(char )); /*Get RSSI*/ - rssi = mtod(event, char *); + if(event == NULL){ + NG_HCI_WARN("%s: Event rssi pull up Failed\n", __func__); + + goto out; + } + n->page_scan_mode = *mtod(event, char *); m_adj(event, sizeof(u_int8_t)); } -#endif } + out: NG_FREE_M(event); return (error); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_main.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_main.c Thu Apr 27 14:39:52 2017 (r317505) +++ head/sys/netgraph/bluetooth/hci/ng_hci_main.c Thu Apr 27 15:03:24 2017 (r317506) @@ -93,7 +93,22 @@ NETGRAPH_INIT(hci, &typestruct); MODULE_VERSION(ng_hci, NG_BLUETOOTH_VERSION); MODULE_DEPEND(ng_hci, ng_bluetooth, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION); +static int ng_hci_linktype_to_addrtype(int linktype); +static int ng_hci_linktype_to_addrtype(int linktype) +{ + switch(linktype){ + case NG_HCI_LINK_LE_PUBLIC: + return BDADDR_LE_PUBLIC; + case NG_HCI_LINK_LE_RANDOM: + return BDADDR_LE_RANDOM; + case NG_HCI_LINK_ACL: + /*FALLTHROUGH*/ + default: + return BDADDR_BREDR; + } + return BDADDR_BREDR; +} /***************************************************************************** ***************************************************************************** ** Netgraph methods implementation @@ -481,11 +496,15 @@ ng_hci_default_rcvmsg(node_p node, item_ e2->page_scan_rep_mode = n->page_scan_rep_mode; e2->page_scan_mode = n->page_scan_mode; e2->clock_offset = n->clock_offset; + e2->addrtype = + ng_hci_linktype_to_addrtype(n->addrtype); + e2->extinq_size = n->extinq_size; bcopy(&n->bdaddr, &e2->bdaddr, sizeof(e2->bdaddr)); bcopy(&n->features, &e2->features, sizeof(e2->features)); - + bcopy(&n->extinq_data, &e2->extinq_data, + n->extinq_size); e2 ++; if (--s <= 0) break; Modified: head/sys/netgraph/bluetooth/hci/ng_hci_var.h ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_var.h Thu Apr 27 14:39:52 2017 (r317505) +++ head/sys/netgraph/bluetooth/hci/ng_hci_var.h Thu Apr 27 15:03:24 2017 (r317506) @@ -210,7 +210,8 @@ typedef struct ng_hci_neighbor { u_int8_t page_scan_rep_mode; /* PS rep. mode */ u_int8_t page_scan_mode; /* page scan mode */ u_int16_t clock_offset; /* clock offset */ - + uint8_t extinq_size; + uint8_t extinq_data[NG_HCI_EXTINQ_MAX]; LIST_ENTRY(ng_hci_neighbor) next; } ng_hci_neighbor_t; typedef ng_hci_neighbor_t * ng_hci_neighbor_p; Modified: head/sys/netgraph/bluetooth/include/ng_bluetooth.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_bluetooth.h Thu Apr 27 14:39:52 2017 (r317505) +++ head/sys/netgraph/bluetooth/include/ng_bluetooth.h Thu Apr 27 15:03:24 2017 (r317506) @@ -224,5 +224,9 @@ u_int32_t bluetooth_l2cap_rtx_timeout (v u_int32_t bluetooth_l2cap_ertx_timeout (void); u_int32_t bluetooth_sco_rtx_timeout (void); +#define BDADDR_BREDR 0 +#define BDADDR_LE_PUBLIC 1 +#define BDADDR_LE_RANDOM 2 + #endif /* _NETGRAPH_BLUETOOTH_H_ */ Modified: head/sys/netgraph/bluetooth/include/ng_btsocket.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_btsocket.h Thu Apr 27 14:39:52 2017 (r317505) +++ head/sys/netgraph/bluetooth/include/ng_btsocket.h Thu Apr 27 15:03:24 2017 (r317506) @@ -228,10 +228,6 @@ struct sockaddr_l2cap_compat { bdaddr_t l2cap_bdaddr; /* address */ }; -#define BDADDR_BREDR 0 -#define BDADDR_LE_PUBLIC 1 -#define BDADDR_LE_RANDOM 2 - struct sockaddr_l2cap { u_char l2cap_len; /* total length */ u_char l2cap_family; /* address family */ Modified: head/sys/netgraph/bluetooth/include/ng_hci.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_hci.h Thu Apr 27 14:39:52 2017 (r317505) +++ head/sys/netgraph/bluetooth/include/ng_hci.h Thu Apr 27 15:03:24 2017 (r317506) @@ -80,6 +80,7 @@ #define NG_HCI_FEATURES_SIZE 8 /* LMP features */ #define NG_HCI_UNIT_NAME_SIZE 248 /* unit name size */ #define NG_HCI_COMMANDS_SIZE 64 /*Command list BMP size*/ +#define NG_HCI_EXTINQ_MAX 240 /**/ /* HCI specification */ #define NG_HCI_SPEC_V10 0x00 /* v1.0 */ #define NG_HCI_SPEC_V11 0x01 /* v1.1 */ @@ -561,6 +562,9 @@ typedef struct { u_int16_t clock_offset; /* clock offset */ bdaddr_t bdaddr; /* bdaddr */ u_int8_t features[NG_HCI_FEATURES_SIZE]; /* features */ + uint8_t addrtype; + uint8_t extinq_size; /* MAX 240*/ + uint8_t extinq_data[NG_HCI_EXTINQ_MAX]; } ng_hci_node_neighbor_cache_entry_ep; #define NG_HCI_MAX_NEIGHBOR_NUM \ Modified: head/usr.sbin/bluetooth/hccontrol/node.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/node.c Thu Apr 27 14:39:52 2017 (r317505) +++ head/usr.sbin/bluetooth/hccontrol/node.c Thu Apr 27 15:03:24 2017 (r317506) @@ -208,12 +208,59 @@ hci_flush_neighbor_cache(int s, int argc return (OK); } /* hci_flush_neighbor_cache */ +#define MIN(a,b) (((a)>(b)) ? (b) :(a) ) + +static int hci_dump_adv(uint8_t *data, int length) +{ + int elemlen; + int type; + int i; + + while(length>0){ + elemlen = *data; + data++; + length --; + elemlen--; + if(length<=0) + break; + type = *data; + data++; + length --; + elemlen--; + if(length<=0) + break; + switch(type){ + case 0x1: + printf("NDflag:%x\n", *data); + break; + case 0x9: + printf("LocalName:"); + for(i = 0; i < MIN(length,elemlen); i++){ + putchar(data[i]); + } + printf("\n"); + break; + default: + printf("Type%d:", type); + for(i=0; i < MIN(length,elemlen); i++){ + printf("%02x ",data[i]); + } + printf("\n"); + break; + } + data += elemlen; + length -= elemlen; + } + return 0; +} +#undef MIN /* Send Read_Neighbor_Cache command to the node */ static int hci_read_neighbor_cache(int s, int argc, char **argv) { struct ng_btsocket_hci_raw_node_neighbor_cache r; int n, error = OK; + const char *addrtype2str[] = {"B", "P", "R", "E"}; memset(&r, 0, sizeof(r)); r.num_entries = NG_HCI_MAX_NEIGHBOR_NUM; @@ -231,6 +278,7 @@ hci_read_neighbor_cache(int s, int argc, } fprintf(stdout, +"T " \ "BD_ADDR " \ "Features " \ "Clock offset " \ @@ -238,12 +286,16 @@ hci_read_neighbor_cache(int s, int argc, "Rep. scan\n"); for (n = 0; n < r.num_entries; n++) { + uint8_t addrtype = r.entries[n].addrtype; + if(addrtype >= sizeof(addrtype2str)/sizeof(addrtype2str[0])) + addrtype = sizeof(addrtype2str)/sizeof(addrtype2str[0]) - 1; fprintf(stdout, -"%-17.17s " \ +"%1s %-17.17s " \ "%02x %02x %02x %02x %02x %02x %02x %02x " \ "%#12x " \ "%#9x " \ "%#9x\n", + addrtype2str[addrtype], hci_bdaddr2str(&r.entries[n].bdaddr), r.entries[n].features[0], r.entries[n].features[1], r.entries[n].features[2], r.entries[n].features[3], @@ -251,6 +303,9 @@ hci_read_neighbor_cache(int s, int argc, r.entries[n].features[6], r.entries[n].features[7], r.entries[n].clock_offset, r.entries[n].page_scan_mode, r.entries[n].page_scan_rep_mode); + hci_dump_adv(r.entries[n].extinq_data, + r.entries[n].extinq_size); + fprintf(stdout,"\n"); } out: free(r.entries); From owner-svn-src-head@freebsd.org Thu Apr 27 15:10: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 7AC0FD53C57; Thu, 27 Apr 2017 15:10:46 +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 30D3B1D9D; Thu, 27 Apr 2017 15:10:46 +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 v3RFAjXc019600; Thu, 27 Apr 2017 15:10:45 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RFAjOj019599; Thu, 27 Apr 2017 15:10:45 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201704271510.v3RFAjOj019599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Thu, 27 Apr 2017 15:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317507 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 27 Apr 2017 15:10:46 -0000 Author: jpaetzel Date: Thu Apr 27 15:10:45 2017 New Revision: 317507 URL: https://svnweb.freebsd.org/changeset/base/317507 Log: MFV 316895 7606 dmu_objset_find_dp() takes a long time while importing pool illumos/illumos-gate@7588687e6ba67c47bf7c9805086dec4a97fcac7b https://github.com/illumos/illumos-gate/commit/7588687e6ba67c47bf7c9805086dec4a97fcac7b https://www.illumos.org/issues/7606 When importing a pool with a large number of filesystems within the same parent filesystem, we see that dmu_objset_find_dp() takes a long time. It is called from 3 places: spa_check_logs(), spa_ld_claim_log_blocks(), and spa_load_verify(). There are several ways to improve performance here: 1. We don't really need to do spa_check_logs() or spa_ld_claim_log_blocks() if the pool was closed cleanly. 2. spa_load_verify() uses dmu_objset_find_dp() to check that no datasets have too long of names. 3. dmu_objset_find_dp() is slow because it's doing zap_value_search() (which is O(N sibling datasets)) to determine the name of each dsl_dir when it's opened. In this case we actually know the name when we are opening it, so we can provide it and avoid the lookup. This change implements fix #3 from the above list; i.e. make dmu_objset_find_dp() provide the name of the dataset so that we don't have to search for it. Reviewed by: Steve Gonczi Reviewed by: George Wilson Reviewed by: Prashanth Sreenivasa Approved by: Gordon Ross Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Apr 27 15:03:24 2017 (r317506) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Apr 27 15:10:45 2017 (r317507) @@ -1705,6 +1705,7 @@ typedef struct dmu_objset_find_ctx { taskq_t *dc_tq; dsl_pool_t *dc_dp; uint64_t dc_ddobj; + char *dc_ddname; /* last component of ddobj's name */ int (*dc_func)(dsl_pool_t *, dsl_dataset_t *, void *); void *dc_arg; int dc_flags; @@ -1716,7 +1717,6 @@ static void dmu_objset_find_dp_impl(dmu_objset_find_ctx_t *dcp) { dsl_pool_t *dp = dcp->dc_dp; - dmu_objset_find_ctx_t *child_dcp; dsl_dir_t *dd; dsl_dataset_t *ds; zap_cursor_t zc; @@ -1728,7 +1728,12 @@ dmu_objset_find_dp_impl(dmu_objset_find_ if (*dcp->dc_error != 0) goto out; - err = dsl_dir_hold_obj(dp, dcp->dc_ddobj, NULL, FTAG, &dd); + /* + * Note: passing the name (dc_ddname) here is optional, but it + * improves performance because we don't need to call + * zap_value_search() to determine the name. + */ + err = dsl_dir_hold_obj(dp, dcp->dc_ddobj, dcp->dc_ddname, FTAG, &dd); if (err != 0) goto out; @@ -1753,9 +1758,11 @@ dmu_objset_find_dp_impl(dmu_objset_find_ sizeof (uint64_t)); ASSERT3U(attr->za_num_integers, ==, 1); - child_dcp = kmem_alloc(sizeof (*child_dcp), KM_SLEEP); + dmu_objset_find_ctx_t *child_dcp = + kmem_alloc(sizeof (*child_dcp), KM_SLEEP); *child_dcp = *dcp; child_dcp->dc_ddobj = attr->za_first_integer; + child_dcp->dc_ddname = spa_strdup(attr->za_name); if (dcp->dc_tq != NULL) (void) taskq_dispatch(dcp->dc_tq, dmu_objset_find_dp_cb, child_dcp, TQ_SLEEP); @@ -1798,16 +1805,25 @@ dmu_objset_find_dp_impl(dmu_objset_find_ } } - dsl_dir_rele(dd, FTAG); kmem_free(attr, sizeof (zap_attribute_t)); - if (err != 0) + if (err != 0) { + dsl_dir_rele(dd, FTAG); goto out; + } /* * Apply to self. */ err = dsl_dataset_hold_obj(dp, thisobj, FTAG, &ds); + + /* + * Note: we hold the dir while calling dsl_dataset_hold_obj() so + * that the dir will remain cached, and we won't have to re-instantiate + * it (which could be expensive due to finding its name via + * zap_value_search()). + */ + dsl_dir_rele(dd, FTAG); if (err != 0) goto out; err = dcp->dc_func(dp, ds, dcp->dc_arg); @@ -1822,6 +1838,8 @@ out: mutex_exit(dcp->dc_error_lock); } + if (dcp->dc_ddname != NULL) + spa_strfree(dcp->dc_ddname); kmem_free(dcp, sizeof (*dcp)); } @@ -1866,6 +1884,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 dcp->dc_tq = NULL; dcp->dc_dp = dp; dcp->dc_ddobj = ddobj; + dcp->dc_ddname = NULL; dcp->dc_func = func; dcp->dc_arg = arg; dcp->dc_flags = flags; From owner-svn-src-head@freebsd.org Thu Apr 27 16:05: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 60C38D53087; Thu, 27 Apr 2017 16:05:14 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3069A12A; Thu, 27 Apr 2017 16:05:14 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3RG5DE6043016; Thu, 27 Apr 2017 16:05:13 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RG5CCh043007; Thu, 27 Apr 2017 16:05:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704271605.v3RG5CCh043007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 27 Apr 2017 16:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317508 - in head: . release/doc/en_US.ISO8859-1/hardware rescue/rescue share/man/man7 share/man/man8 share/man/man9 usr.sbin/bsdconfig/share 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, 27 Apr 2017 16:05:14 -0000 Author: brooks Date: Thu Apr 27 16:05:12 2017 New Revision: 317508 URL: https://svnweb.freebsd.org/changeset/base/317508 Log: More ATM and NATM removal Submitted by: ak Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D10511 Deleted: head/share/man/man9/utopia.9 Modified: head/ObsoleteFiles.inc head/release/doc/en_US.ISO8859-1/hardware/article.xml head/rescue/rescue/Makefile head/share/man/man7/hier.7 head/share/man/man8/Makefile head/share/man/man8/rc.8 head/share/man/man9/Makefile head/share/man/man9/netisr.9 head/usr.sbin/bsdconfig/share/device.subr Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 27 15:10:45 2017 (r317507) +++ head/ObsoleteFiles.inc Thu Apr 27 16:05:12 2017 (r317508) @@ -38,12 +38,12 @@ # xargs -n1 | sort | uniq -d; # done -# 20170426: Remove cy(4) -OLD_FILES+=usr/share/man/man4/cy.4.gz -# 20170425: NATM configuration support removed +# 20170427: NATM configuration support removed OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 OLD_FILES+=etc/rc.d/atm3 +# 20170426: Remove cy(4) +OLD_FILES+=usr/share/man/man4/cy.4.gz # 20170424: NATM support removed OLD_FILES+=rescue/atmconfig OLD_FILES+=sbin/atmconfig @@ -78,6 +78,7 @@ OLD_FILES+=usr/share/man/man4/ng_atm.4.g OLD_FILES+=usr/share/man/man4/patm.4.gz OLD_FILES+=usr/share/man/man4/utopia.4.gz OLD_FILES+=usr/share/man/man8/atmconfig.8.gz +OLD_FILES+=usr/share/man/man9/utopia.9.gz OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def OLD_FILES+=usr/share/snmp/defs/atm_tree.def OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Apr 27 15:10:45 2017 (r317507) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Apr 27 16:05:12 2017 (r317508) @@ -905,27 +905,6 @@ [&arch.i386;] DEC DEFEA EISA (&man.fpa.4; driver) - - ATM Interfaces - - [&arch.i386;] Midway-based ATM interfaces - (&man.en.4; driver) - - [&arch.i386;, &arch.sparc64;] FORE Systems, - Inc. PCA-200E ATM PCI Adapters (hfa and &man.fatm.4; - drivers) - - [&arch.i386;] IDT NICStAR 77201/211-based ATM - Adapters (&man.idt.4; driver) - - [&arch.i386;, &arch.sparc64;] FORE Systems, - Inc. HE155 and HE622 ATM interfaces (&man.hatm.4; - driver) - - [&arch.i386;] IDT77252-based ATM cards - (&man.patm.4; driver) - - Wireless Network Interfaces Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Thu Apr 27 15:10:45 2017 (r317507) +++ head/rescue/rescue/Makefile Thu Apr 27 16:05:12 2017 (r317508) @@ -156,7 +156,6 @@ CRUNCH_PROGS_sbin+= bsdlabel fdisk CRUNCH_ALIAS_bsdlabel= disklabel .endif -CRUNCH_SRCDIR_ilmid= ${SRCTOP}/sbin/atm/ilmid CRUNCH_SRCDIR_rtquery= ${SRCTOP}/sbin/routed/rtquery CRUNCH_SRCDIR_ipf= ${SRCTOP}/sbin/ipf/ipf .if ${MK_ZFS} != "no" Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Thu Apr 27 15:10:45 2017 (r317507) +++ head/share/man/man7/hier.7 Thu Apr 27 16:05:12 2017 (r317508) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd April 6, 2017 +.Dd April 25, 2017 .Dt HIER 7 .Os .Sh NAME @@ -220,10 +220,6 @@ see .Xr ppbus 4 .It Pa usb/ USB subsystem -.It Pa utopia/ -physical chip driver for ATM interfaces; -see -.Xr utopia 4 .It Pa wi/ .Xr wi 4 WaveLAN driver Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Thu Apr 27 15:10:45 2017 (r317507) +++ head/share/man/man8/Makefile Thu Apr 27 16:05:12 2017 (r317508) @@ -18,7 +18,6 @@ MAN= crash.8 \ MLINKS= \ nanobsd.8 nanobsd.sh.8 \ - rc.8 rc.atm.8 \ rc.8 rc.d.8 \ rc.8 rc.firewall.8 \ rc.8 rc.local.8 \ Modified: head/share/man/man8/rc.8 ============================================================================== --- head/share/man/man8/rc.8 Thu Apr 27 15:10:45 2017 (r317507) +++ head/share/man/man8/rc.8 Thu Apr 27 16:05:12 2017 (r317508) @@ -31,7 +31,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd April 23, 2016 +.Dd April 25, 2017 .Dt RC 8 .Os .Sh NAME @@ -455,15 +455,6 @@ disables the loading of firewall rules will load the rules in the given filename (full path required). .El .Pp -The -.Pa /etc/rc.d/atm* -scripts are used to configure ATM network interfaces. -The interfaces are configured in three passes. -The first pass performs the initial interface configuration. -The second pass completes the interface configuration and defines PVCs and -permanent ATMARP entries. -The third pass starts any ATM daemons. -.Pp Most daemons, including network related daemons, have their own script in .Pa /etc/rc.d/ , which can be used to start, stop, and check the status of the service. Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Apr 27 15:10:45 2017 (r317507) +++ head/share/man/man9/Makefile Thu Apr 27 16:05:12 2017 (r317508) @@ -299,7 +299,6 @@ MAN= accept_filter.9 \ uidinfo.9 \ uio.9 \ unr.9 \ - utopia.9 \ vaccess.9 \ vaccess_acl_nfs4.9 \ vaccess_acl_posix1e.9 \ Modified: head/share/man/man9/netisr.9 ============================================================================== --- head/share/man/man9/netisr.9 Thu Apr 27 15:10:45 2017 (r317507) +++ head/share/man/man9/netisr.9 Thu Apr 27 16:05:12 2017 (r317508) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2016 +.Dd April 25, 2017 .Dt NETISR 9 .Os .Sh NAME @@ -220,8 +220,6 @@ Routing socket loopback ARP .It Dv NETISR_IPV6 IPv6 -.It Dv NETISR_NATM -ATM .It Dv NETISR_EPAIR .Xr netstat 1 , .Xr epair 4 Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Thu Apr 27 15:10:45 2017 (r317507) +++ head/usr.sbin/bsdconfig/share/device.subr Thu Apr 27 16:05:12 2017 (r317508) @@ -1305,7 +1305,6 @@ f_network "disc%d" "Software discard ne f_network "ed%d" "Novell NE1000/2000; 3C503; NE2000-compatible PCMCIA" f_network "el%d" "3Com 3C501 Ethernet card" f_network "em%d" "Intel(R) PRO/1000 Ethernet card" -f_network "en%d" "Efficient Networks ATM PCI card" f_network "ep%d" "3Com 3C509 Ethernet card/3C589 PCMCIA" f_network "et%d" "Agere ET1310 based PCI Express Gigabit Ethernet card" f_network "ex%d" "Intel EtherExpress Pro/10 Ethernet card" From owner-svn-src-head@freebsd.org Thu Apr 27 16:14: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 3C645D532B0; Thu, 27 Apr 2017 16:14:34 +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 E70DA8ED; Thu, 27 Apr 2017 16:14:33 +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 v3RGEXel047137; Thu, 27 Apr 2017 16:14:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RGEW0A047133; Thu, 27 Apr 2017 16:14:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704271614.v3RGEW0A047133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 27 Apr 2017 16:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317509 - in head: . share/man/man4 sys/conf sys/dev/cy 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, 27 Apr 2017 16:14:34 -0000 Author: jhb Date: Thu Apr 27 16:14:32 2017 New Revision: 317509 URL: https://svnweb.freebsd.org/changeset/base/317509 Log: Revert r317446 and bring back cy(4). Requested by: bde Added: head/share/man/man4/cy.4 - copied unchanged from r317445, head/share/man/man4/cy.4 head/sys/dev/cy/ - copied from r317445, head/sys/dev/cy/ Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile head/sys/conf/files Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 27 16:05:12 2017 (r317508) +++ head/ObsoleteFiles.inc Thu Apr 27 16:14:32 2017 (r317509) @@ -42,8 +42,6 @@ OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 OLD_FILES+=etc/rc.d/atm3 -# 20170426: Remove cy(4) -OLD_FILES+=usr/share/man/man4/cy.4.gz # 20170424: NATM support removed OLD_FILES+=rescue/atmconfig OLD_FILES+=sbin/atmconfig Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Apr 27 16:05:12 2017 (r317508) +++ head/share/man/man4/Makefile Thu Apr 27 16:14:32 2017 (r317509) @@ -118,6 +118,7 @@ MAN= aac.4 \ cxgb.4 \ cxgbe.4 \ cxgbev.4 \ + cy.4 \ cyapa.4 \ da.4 \ dc.4 \ Copied: head/share/man/man4/cy.4 (from r317445, head/share/man/man4/cy.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/cy.4 Thu Apr 27 16:14:32 2017 (r317509, copy of r317445, head/share/man/man4/cy.4) @@ -0,0 +1,257 @@ +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" the Systems Programming Group of the University of Utah Computer +.\" Science Department. +.\" 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. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91 +.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp +.\" from: sio.4,v 1.16 1995/06/26 06:05:30 bde Exp $ +.\" $FreeBSD$ +.\" +.Dd May 24, 2004 +.Dt CY 4 +.Os +.Sh NAME +.Nm cy +.Nd Cyclades Cyclom-Y serial driver +.Sh SYNOPSIS +For one ISA card: +.Bd -ragged -offset indent -compact +.Cd "device cy" +.Pp +In +.Pa /boot/device.hints : +.Cd hint.cy.0.at="isa" +.Cd hint.cy.0.irq="10" +.Cd hint.cy.0.maddr="0xd4000" +.Cd hint.cy.0.msize="0x2000" +.Ed +.Pp +For two ISA cards: +.Bd -ragged -offset indent -compact +.Cd "device cy" +.Pp +In +.Pa /boot/device.hints : +.Cd hint.cy.0.at="isa" +.Cd hint.cy.0.irq="10" +.Cd hint.cy.0.maddr="0xd4000" +.Cd hint.cy.0.msize="0x2000" +.Cd hint.cy.1.at="isa" +.Cd hint.cy.1.irq="11" +.Cd hint.cy.1.maddr="0xd6000" +.Cd hint.cy.1.msize="0x2000" +.Ed +.Pp +For PCI cards: +.Bd -ragged -offset indent -compact +.Cd "device cy" +.Cd "options CY_PCI_FASTINTR" +.Pp +No lines are required in +.Pa /boot/device.hints +for PCI cards. +.Ed +.Pp +Minor numbering: +.Bd -literal -offset indent -compact +0b\fIMMMMMMMMMMMMMMMMxxxxxxxxOLIMMMMM\fR + call\fBO\fRut + \fBL\fRock + \fBI\fRnitial + \fBMMMMMMMMMMMMMMMM MMMMMM\fRinor +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Cirrus Logic CD1400-based +.Tn EIA +.Tn RS-232C +.Pf ( Tn CCITT +.Tn V.24 ) +communications interfaces (ports) on Cyclades Cyclom-Y boards. +Each CD1400 provides 4 ports. +Cyclom-Y boards with various numbers of CD1400's are available. +This driver supports up to 8 CD1400's (32 ports) per board. +.Pp +Input and output for each line may set independently +to the following speeds: +50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, +19200, 38400, 57600, or 115200 bps. +Other speeds of up to 150000 are supported by the termios interface +but not by the sgttyb compatibility interface. +The CD1400 is not fast enough to handle speeds above 115200 bps +effectively. +It can transmit on a single line at slightly more than 115200 bps, +but when 4 lines are active in both directions its limit is about +90000 bps on each line. +.\" XXX the following should be true for all serial drivers and +.\" should not be repeated in the man pages for all serial drivers. +.\" It was copied from sio.4. The only change was s/sio/cy/g. +.Pp +Serial ports controlled by the +.Nm +driver can be used for both `callin' and `callout'. +For each port there is a callin device and a callout device. +The minor number of the callout device is 128 higher +than that of the corresponding callin port. +The callin device is general purpose. +Processes opening it normally wait for carrier +and for the callout device to become inactive. +The callout device is used to steal the port from +processes waiting for carrier on the callin device. +Processes opening it do not wait for carrier +and put any processes waiting for carrier on the callin device into +a deeper sleep so that they do not conflict with the callout session. +The callout device is abused for handling programs that are supposed +to work on general ports and need to open the port without waiting +but are too stupid to do so. +.Pp +The +.Nm +driver also supports an initial-state and a lock-state control +device for each of the callin and the callout "data" devices. +The minor number of the initial-state device is 32 higher +than that of the corresponding data device. +The minor number of the lock-state device is 64 higher +than that of the corresponding data device. +The termios settings of a data device are copied +from those of the corresponding initial-state device +on first opens and are not inherited from previous opens. +Use +.Xr stty 1 +in the normal way on the initial-state devices to program +initial termios states suitable for your setup. +.Pp +The lock termios state acts as flags to disable changing +the termios state. +E.g., to lock a flag variable such as +CRTSCTS, use +.Em "stty crtscts" +on the lock-state device. +Speeds and special characters +may be locked by setting the corresponding value in the lock-state +device to any nonzero value. +.Pp +Correct programs talking to correctly wired external devices +work with almost arbitrary initial states and almost no locking, +but other setups may benefit from changing some of the default +initial state and locking the state. +In particular, the initial states for non (POSIX) standard flags +should be set to suit the devices attached and may need to be +locked to prevent buggy programs from changing them. +E.g., CRTSCTS should be locked on for devices that support +RTS/CTS handshaking at all times and off for devices that do not +support it at all. +CLOCAL should be locked on for devices +that do not support carrier. +HUPCL may be locked off if you do not +want to hang up for some reason. +In general, very bad things happen +if something is locked to the wrong state, and things should not +be locked for devices that support more than one setting. +The +CLOCAL flag on callin ports should be locked off for logins +to avoid certain security holes, but this needs to be done by +getty if the callin port is used for anything else. +.Ss Kernel Configuration Options +The +.Em CY_PCI_FASTINTR +option should be used to avoid suboptimal interrupt handling for +PCI Cyclades boards. +The PCI BIOS must be configured with the +.Nm +interrupt not shared with any other active device +for this option to work. +This option is not the default because it is currently harmful in +certain cases where it does not work. +.Sh FILES +.\" XXX more cloning: s/d/c/g and add a ? for the card number. +.Bl -tag -width /dev/ttyic?? -compact +.It Pa /dev/ttyc?? +for callin ports +.It Pa /dev/ttyic?? +.It Pa /dev/ttylc?? +corresponding callin initial-state and lock-state devices +.Pp +.\" XXX more cloning: s/a/c/g. No consistency :-(. +.It Pa /dev/cuac?? +for callout ports +.It Pa /dev/cuaic?? +.It Pa /dev/cualc?? +corresponding callout initial-state and lock-state devices +.El +.Pp +.Bl -tag -width /etc/rc.serial -compact +.It Pa /etc/rc.serial +examples of setting the initial-state and lock-state devices +.El +.Pp +The first question mark in these device names is short for the +card number +(a decimal number between 0 and 65535 inclusive). +The second question mark is short for the port number +(a letter in the range [0-9a-v]). +.Sh DIAGNOSTICS +.Bl -diag +.\" XXX back to s/sio/cy/g. +.It cy%d: silo overflow. +Problem in the interrupt handler. +.El +.Bl -diag +.It cy%d: interrupt-level buffer overflow. +Problem in the bottom half of the driver. +.El +.Bl -diag +.It cy%d: tty-level buffer overflow. +Problem in the application. +Input has arrived faster than the given module could process it +and some has been lost. +.El +.\" .Bl -diag +.\" .It sio%d: reduced fifo trigger level to %d. +.\" Attempting to avoid further silo overflows. +.\" .El +.Sh SEE ALSO +.Xr stty 1 , +.Xr termios 4 , +.Xr tty 4 , +.Xr comcontrol 8 , +.Xr pstat 8 +.Sh HISTORY +The +.Nm +driver is derived from the +.Nm sio +driver and the +.Nx +.Nm +driver and is +.Ud +.Sh BUGS +Serial consoles are not implemented. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 27 16:05:12 2017 (r317508) +++ head/sys/conf/files Thu Apr 27 16:14:32 2017 (r317509) @@ -1425,6 +1425,9 @@ t6fw.fw optional cxgbe \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" +dev/cy/cy.c optional cy +dev/cy/cy_isa.c optional cy isa +dev/cy/cy_pci.c optional cy pci dev/cyapa/cyapa.c optional cyapa iicbus dev/dc/if_dc.c optional dc pci dev/dc/dcphy.c optional dc pci From owner-svn-src-head@freebsd.org Thu Apr 27 16:32:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7DDBD5377B; Thu, 27 Apr 2017 16:32:43 +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 8B3971300; Thu, 27 Apr 2017 16:32:43 +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 v3RGWgV9054995; Thu, 27 Apr 2017 16:32:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RGWgZH054991; Thu, 27 Apr 2017 16:32:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201704271632.v3RGWgZH054991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 27 Apr 2017 16:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317510 - in head/sys/dev: acpica pci 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, 27 Apr 2017 16:32:43 -0000 Author: jhb Date: Thu Apr 27 16:32:42 2017 New Revision: 317510 URL: https://svnweb.freebsd.org/changeset/base/317510 Log: Various fixes for PCI _OSC handling so HotPlug works again. - Rename the default implementation of 'pcib_request_feature' and add a pcib_request_feature() wrapper function (as is often done for new-bus APIs implemented via kobj) that accepts a single function. Previously the call to pcib_request_feature() ended up invoking the method on the great-great-grandparent of the bridge device instead of the grandparent. For a bridge that was a direct child of pci0 on x86 this resulted in the method skipping over the Host-PCI bridge driver and being invoked against nexus0 - When invoking _OSC from a Host-PCI bridge driver, invoke device_get_softc() against the Host-PCI bridge device instead of the child bridge that is requesting HotPlug. Using the wrong softc data resulted in garbage being passed for the ACPI handle causing the _OSC call to fail. - While here, perform some other cleanups to _OSC handling in the ACPI Host-PCI bridge driver: - Don't invoke _OSC when requesting a control that has already been granted by the firmware. - Don't set the first word of the capability array before invoking _OSC. This word is always set explicitly by acpi_EvaluateOSC() since it is UUID-independent. - Don't modify the set of granted controls unless _OSC doesn't exist (which is treated as always successful), or the _OSC method doesn't fail. - Don't require an _OSC status of 0 for success. _OSC always returns the updated control mask even if it returns a non-zero status in the first word. - Whine if _OSC ever tries to revoke a previously-granted control. (It is not supposed to do that.) - While here, add constants for the _OSC status word in acpivar.h (though currently unused). Reported by: adrian Reviewed by: imp MFC after: 1 week Tested on: Lenovo x220 Differential Revision: https://reviews.freebsd.org/D10520 Modified: head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/acpica/acpivar.h head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Thu Apr 27 16:14:32 2017 (r317509) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Thu Apr 27 16:32:42 2017 (r317510) @@ -313,32 +313,42 @@ acpi_pcib_osc(struct acpi_hpcib_softc *s 0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66 }; - /* Status Field */ - cap_set[PCI_OSC_STATUS] = 0; + /* + * Don't invoke _OSC if a control is already granted. + * However, always invoke _OSC during attach when 0 is passed. + */ + if (osc_ctl != 0 && (sc->ap_osc_ctl & osc_ctl) == osc_ctl) + return (0); /* Support Field: Extended PCI Config Space, MSI */ cap_set[PCI_OSC_SUPPORT] = PCIM_OSC_SUPPORT_EXT_PCI_CONF | PCIM_OSC_SUPPORT_MSI; /* Control Field */ - sc->ap_osc_ctl |= osc_ctl; - cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl; + cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl | osc_ctl; status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1, nitems(cap_set), cap_set, cap_set, false); if (ACPI_FAILURE(status)) { - if (status == AE_NOT_FOUND) + if (status == AE_NOT_FOUND) { + sc->ap_osc_ctl |= osc_ctl; return (0); + } device_printf(sc->ap_dev, "_OSC failed: %s\n", AcpiFormatException(status)); return (EIO); } - if (cap_set[PCI_OSC_STATUS] == 0) - sc->ap_osc_ctl = cap_set[PCI_OSC_CTL]; - - if (cap_set[PCI_OSC_STATUS] != 0 || - (cap_set[PCI_OSC_CTL] & osc_ctl) != osc_ctl) + /* + * _OSC may return an error in the status word, but will + * update the control mask always. _OSC should not revoke + * previously-granted controls. + */ + if ((cap_set[PCI_OSC_CTL] & sc->ap_osc_ctl) != sc->ap_osc_ctl) + device_printf(sc->ap_dev, "_OSC revoked %#x\n", + (cap_set[PCI_OSC_CTL] & sc->ap_osc_ctl) ^ sc->ap_osc_ctl); + sc->ap_osc_ctl = cap_set[PCI_OSC_CTL]; + if ((sc->ap_osc_ctl & osc_ctl) != osc_ctl) return (EIO); return (0); @@ -727,7 +737,7 @@ acpi_pcib_request_feature(device_t pcib, uint32_t osc_ctl; struct acpi_hpcib_softc *sc; - sc = device_get_softc(dev); + sc = device_get_softc(pcib); switch (feature) { case PCI_FEATURE_HP: Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Thu Apr 27 16:14:32 2017 (r317509) +++ head/sys/dev/acpica/acpivar.h Thu Apr 27 16:32:42 2017 (r317510) @@ -301,6 +301,12 @@ void acpi_EnterDebugger(void); device_printf(dev, x); \ } while (0) +/* Values for the first status word returned by _OSC. */ +#define ACPI_OSC_FAILURE (1 << 1) +#define ACPI_OSC_BAD_UUID (1 << 2) +#define ACPI_OSC_BAD_REVISION (1 << 3) +#define ACPI_OSC_CAPS_MASKED (1 << 4) + /* Values for the device _STA (status) method. */ #define ACPI_STA_PRESENT (1 << 0) #define ACPI_STA_ENABLED (1 << 1) Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Thu Apr 27 16:14:32 2017 (r317509) +++ head/sys/dev/pci/pci_pci.c Thu Apr 27 16:32:42 2017 (r317510) @@ -76,7 +76,7 @@ static void pcib_pcie_ab_timeout(void * static void pcib_pcie_cc_timeout(void *arg); static void pcib_pcie_dll_timeout(void *arg); #endif -static int pcib_request_feature(device_t pcib, device_t dev, +static int pcib_request_feature_default(device_t pcib, device_t dev, enum pci_feature feature); static device_method_t pcib_methods[] = { @@ -121,7 +121,7 @@ static device_method_t pcib_methods[] = DEVMETHOD(pcib_try_enable_ari, pcib_try_enable_ari), DEVMETHOD(pcib_ari_enabled, pcib_ari_enabled), DEVMETHOD(pcib_decode_rid, pcib_ari_decode_rid), - DEVMETHOD(pcib_request_feature, pcib_request_feature), + DEVMETHOD(pcib_request_feature, pcib_request_feature_default), DEVMETHOD_END }; @@ -964,8 +964,7 @@ pcib_probe_hotplug(struct pcib_softc *sc * Now that we're sure we want to do hot plug, ask the * firmware, if any, if that's OK. */ - if (pcib_request_feature(device_get_parent(device_get_parent(dev)), dev, - PCI_FEATURE_HP) != 0) { + if (pcib_request_feature(dev, PCI_FEATURE_HP) != 0) { if (bootverbose) device_printf(dev, "Unable to activate hot plug feature.\n"); return; @@ -2863,6 +2862,17 @@ pcib_request_feature_allow(device_t pcib return (0); } +int +pcib_request_feature(device_t dev, enum pci_feature feature) +{ + + /* + * Invoke PCIB_REQUEST_FEATURE of this bridge first in case + * the firmware overrides the method of PCI-PCI bridges. + */ + return (PCIB_REQUEST_FEATURE(dev, dev, feature)); +} + /* * Pass the request to use this PCI feature up the tree. Either there's a * firmware like ACPI that's using this feature that will approve (or deny) the @@ -2871,7 +2881,8 @@ pcib_request_feature_allow(device_t pcib * to make use of the feature or render it harmless. */ static int -pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) +pcib_request_feature_default(device_t pcib, device_t dev, + enum pci_feature feature) { device_t bus; Modified: head/sys/dev/pci/pcib_private.h ============================================================================== --- head/sys/dev/pci/pcib_private.h Thu Apr 27 16:14:32 2017 (r317509) +++ head/sys/dev/pci/pcib_private.h Thu Apr 27 16:32:42 2017 (r317510) @@ -193,6 +193,7 @@ int pcib_get_id(device_t pcib, device_t uintptr_t *id); void pcib_decode_rid(device_t pcib, uint16_t rid, int *bus, int *slot, int *func); +int pcib_request_feature(device_t dev, enum pci_feature feature); int pcib_request_feature_allow(device_t pcib, device_t dev, enum pci_feature feature); #endif From owner-svn-src-head@freebsd.org Thu Apr 27 16:38: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 69662D53838; Thu, 27 Apr 2017 16:38:29 +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 466CC156C; Thu, 27 Apr 2017 16:38:29 +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 v3RGcSAo055561; Thu, 27 Apr 2017 16:38:28 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RGcS5F055559; Thu, 27 Apr 2017 16:38:28 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201704271638.v3RGcS5F055559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Thu, 27 Apr 2017 16:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317511 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 27 Apr 2017 16:38:29 -0000 Author: jpaetzel Date: Thu Apr 27 16:38:28 2017 New Revision: 317511 URL: https://svnweb.freebsd.org/changeset/base/317511 Log: MFV 316896 7580 ztest failure in dbuf_read_impl illumos/illumos-gate@1a01181fdc809f40c64d5c6881ae3e4521a9d9c7 https://github.com/illumos/illumos-gate/commit/1a01181fdc809f40c64d5c6881ae3e4521a9d9c7 https://www.illumos.org/issues/7580 We need to prevent any reader whenever we're about the zero out all the blkptrs. To do this we need to grab the dn_struct_rwlock as writer in dbuf_write_children_ready and free_children just prior to calling bzero. Reviewed by: Pavel Zakharov Reviewed by: Steve Gonczi Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: George Wilson Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Apr 27 16:32:42 2017 (r317510) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Apr 27 16:38:28 2017 (r317511) @@ -3317,13 +3317,13 @@ dbuf_write_children_ready(zio_t *zio, ar dmu_buf_impl_t *db = vdb; dnode_t *dn; blkptr_t *bp; - uint64_t i; - int epbs; + unsigned int epbs, i; ASSERT3U(db->db_level, >, 0); DB_DNODE_ENTER(db); dn = DB_DNODE(db); epbs = dn->dn_phys->dn_indblkshift - SPA_BLKPTRSHIFT; + ASSERT3U(epbs, <, 31); /* Determine if all our children are holes */ for (i = 0, bp = db->db.db_data; i < 1 << epbs; i++, bp++) { @@ -3336,8 +3336,14 @@ dbuf_write_children_ready(zio_t *zio, ar * we may get compressed away. */ if (i == 1 << epbs) { - /* didn't find any non-holes */ + /* + * We only found holes. Grab the rwlock to prevent + * anybody from reading the blocks we're about to + * zero out. + */ + rw_enter(&dn->dn_struct_rwlock, RW_WRITER); bzero(db->db.db_data, db->db.db_size); + rw_exit(&dn->dn_struct_rwlock); } DB_DNODE_EXIT(db); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Thu Apr 27 16:32:42 2017 (r317510) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Thu Apr 27 16:38:28 2017 (r317511) @@ -236,8 +236,8 @@ free_children(dmu_buf_impl_t *db, uint64 dnode_t *dn; blkptr_t *bp; dmu_buf_impl_t *subdb; - uint64_t start, end, dbstart, dbend, i; - int epbs, shift; + uint64_t start, end, dbstart, dbend; + unsigned int epbs, shift, i; /* * There is a small possibility that this block will not be cached: @@ -254,6 +254,7 @@ free_children(dmu_buf_impl_t *db, uint64 DB_DNODE_ENTER(db); dn = DB_DNODE(db); epbs = dn->dn_phys->dn_indblkshift - SPA_BLKPTRSHIFT; + ASSERT3U(epbs, <, 31); shift = (db->db_level - 1) * epbs; dbstart = db->db_blkid << epbs; start = blkid >> shift; @@ -273,12 +274,12 @@ free_children(dmu_buf_impl_t *db, uint64 FREE_VERIFY(db, start, end, tx); free_blocks(dn, bp, end-start+1, tx); } else { - for (i = start; i <= end; i++, bp++) { + for (uint64_t id = start; id <= end; id++, bp++) { if (BP_IS_HOLE(bp)) continue; rw_enter(&dn->dn_struct_rwlock, RW_READER); VERIFY0(dbuf_hold_impl(dn, db->db_level - 1, - i, TRUE, FALSE, FTAG, &subdb)); + id, TRUE, FALSE, FTAG, &subdb)); rw_exit(&dn->dn_struct_rwlock); ASSERT3P(bp, ==, subdb->db_blkptr); @@ -293,8 +294,14 @@ free_children(dmu_buf_impl_t *db, uint64 break; } if (i == 1 << epbs) { - /* didn't find any non-holes */ + /* + * We only found holes. Grab the rwlock to prevent + * anybody from reading the blocks we're about to + * zero out. + */ + rw_enter(&dn->dn_struct_rwlock, RW_WRITER); bzero(db->db.db_data, db->db.db_size); + rw_exit(&dn->dn_struct_rwlock); free_blocks(dn, db->db_blkptr, 1, tx); } else { /* From owner-svn-src-head@freebsd.org Thu Apr 27 17:44: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 DD2DDD53EC5; Thu, 27 Apr 2017 17:44:52 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7C211F8D; Thu, 27 Apr 2017 17:44:52 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 07110207B3; Thu, 27 Apr 2017 13:44:50 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Thu, 27 Apr 2017 13:44:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=DHCspMZGhfAn8tb465 NXCivydMgMvu1UVaRWss0GCQM=; b=Z5JV9T6NDPqJJhmkGM1N5fosQSc4oDu2FN QewprPxji9VOJRg/TFuaxAegVuW5Bcs7GIITMalTvQlxTqm0kPuoSrGV/KjuWMQU 6lw1wpmUdeqf18SotFaYzUkDfOn6Zq/AzfeIVj/dEFcHc3Lf3EwdL+9JTVtNxT9b 02AQ7rBk1dlVdG8jt+Ja1/fh6KKLbrT47fgIgcp1WTIajH87Kzhs87S0vJ1TQL4K PoCBWpQj0+QGNebAVPIFJS3sHgm7J4EGYUHqWFBl+shPwGdcHnwxelCuqfgbBe9U 3fP5kbXae48mUPbLKA/BSR5DobkM29+6ZlnPco+5Pi/6jgikIN4w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=DHCspMZGhfAn8tb465NXCivydMgMvu1UVaRWss0GCQM=; b=N4JF6ekE bK0KpJdwCw+xgae067Yfc2ujfC8tlszSWBQ1LVmc5SXVW4Xy/rqFNQP2eaudiMgE MBB+MLmQ1zlXbIXn//n3P46J/z+N+GIxwgR9JhCuVsTeBlz0a4SOCKKyh2Ktxv7a gASunRhdWJ+m/vnQ07g4hqgUgw7py2HGD/mBuFF0O4AWDQvfYV6YKiKBYXMeyvRD p5aYFS+tmR9B8mwiPdf4fjOBERqp9gjOgL7YMG17vVpJP/5TAokz1Xmv+VMujIgz /5yaqUk+pakcWTg+y66nJeM/L5lYXcI8atj06EooAPQWWuFIA3o8YqvLrH/mjPn1 HF4+DbT1IZR6ZQ== X-ME-Sender: X-Sasl-enc: NDfAa41LYfFuKEPrl6tViykmMtp4iQcTrLSBtO8LLuEv 1493315090 Received: from [192.168.1.88] (cpc96954-walt26-2-0-cust843.13-2.cable.virginm.net [82.31.91.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 17CF17E670; Thu, 27 Apr 2017 13:44:50 -0400 (EDT) Subject: Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704242121.v3OLLoR2082346@repo.freebsd.org> From: Bruce Simpson Message-ID: <694497a7-39cd-a648-7e2e-4a6b5f51955e@fastmail.net> Date: Thu, 27 Apr 2017 18:44:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201704242121.v3OLLoR2082346@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Thu, 27 Apr 2017 17:44:53 -0000 Hopefully, with packet mode DSL, none of this should be needed again. From owner-svn-src-head@freebsd.org Thu Apr 27 17:49: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 9AC83D53FAF; Thu, 27 Apr 2017 17:49:50 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AAAE1E2; Thu, 27 Apr 2017 17:49:49 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 159E52069B; Thu, 27 Apr 2017 13:49:49 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Thu, 27 Apr 2017 13:49:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=f0mAqYdQ7gmbLxsziT kreNqjOacuzixGnjN7uYnStIs=; b=FxCiuq3tzrnZbqNkHVXmxJbE2ev4LoODlh wyu3RLu6JGvHpbSfsYs8pUqM+CWfgdBbzuzsevMbB3iO/v6/hQgjoXo2OKlJJDzj e3FpUTnw+t2LKKMcEgjJuUDTHcOd4K3KnIDl+dhIS7WVxnUQLllZVW75XhgK8hdM mJo39HLkd3e2XeNA83cpKdDQeXDeVG4Vmg1j6xmpmvUsPJBvdq0cDKBQe+TcJ+bX nBPn79LCxHwvYizIjjUQvKM/jHkPGjQOIdDEgBcYjBWUZR0AY8Mz9RowLktZEjFm QIi0bJJ5PgY08HGD1lGrDhvzCznuSsHyxvWIFKzfx8jD8ixTnkDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=f0mAqYdQ7gmbLxsziTkreNqjOacuzixGnjN7uYnStIs=; b=TAGRZf+6 f4UZAMItC0E+3CXgBbsHpColntpZcTdh+eNEScN7BDTWRfMU93Jn3vWou7Ii3FlO d8JjQGMfece/QKZUyx3jJcAh09UrccfqFO/5nIVK7Brdpdg4/4x89zRvldI/XcHA eLC+drzNcPqJVNDMmn99OjF10nCW5yymj9hBDy6nndX0y3kkiDDG91LhaYeqALh4 GQv5R7is4EtYxPnJqYvbOaLJrdLkRKAwiY0S5q0DxT54MGyh/+c4qoNBZzISPL40 b2LZH2q/BZYk3Sw273xHZNCsdjlFF3cLOfIQov8hfV0D0bDuBYFTe2T3PypXkWoD QN1tFx7xvS/Qrg== X-ME-Sender: X-Sasl-enc: Ha5UDBEs8qjzfiMKyG/H/1lFZ70hfelCx3/crI4K3B71 1493315388 Received: from [192.168.1.88] (cpc96954-walt26-2-0-cust843.13-2.cable.virginm.net [82.31.91.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 6E3727E320; Thu, 27 Apr 2017 13:49:48 -0400 (EDT) Subject: Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/pa... To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704242121.v3OLLoR2082346@repo.freebsd.org> <694497a7-39cd-a648-7e2e-4a6b5f51955e@fastmail.net> From: Bruce Simpson Message-ID: <6c42d4e5-1b34-2f56-1a31-af12a19be8cd@fastmail.net> Date: Thu, 27 Apr 2017 18:49:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <694497a7-39cd-a648-7e2e-4a6b5f51955e@fastmail.net> Content-Type: text/plain; charset=utf-8 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: Thu, 27 Apr 2017 17:49:50 -0000 On 27/04/17 18:44, Bruce Simpson wrote: > Hopefully, with packet mode DSL, none of this should be needed again. > JFYI I'm referring to ye olde Packet Transfer Mode (PTM) DSL, TR-009... which dispenses with the need for ATM framing on DSL circuits. Some US ISPs have been observed doing this in the wild. DSL isn't going away any time soon, though -- many of us still use it as a backup circuit for other things (vs Metro Ethernet, G.FAST, DOCSIS etc.) From owner-svn-src-head@freebsd.org Thu Apr 27 17:53: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 C647AD531F6; Thu, 27 Apr 2017 17:53:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8975B8B3; Thu, 27 Apr 2017 17:53:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3RHr6g1087669; Thu, 27 Apr 2017 17:53:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RHr6iZ087662; Thu, 27 Apr 2017 17:53:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704271753.v3RHr6iZ087662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 27 Apr 2017 17:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317512 - in head: sys/conf sys/libkern sys/libkern/arm64 sys/sys tests/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, 27 Apr 2017 17:53:07 -0000 Author: tuexen Date: Thu Apr 27 17:53:05 2017 New Revision: 317512 URL: https://svnweb.freebsd.org/changeset/base/317512 Log: armv8 has support for optional CRC32C instructions. This patch checks if they are available and if that is true make use of them. Thank you very much to Andrew Turner for providing help and review the patch! Reviewed by: andrew MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10499 Added: head/sys/libkern/arm64/ head/sys/libkern/arm64/crc32c_armv8.S (contents, props changed) Modified: head/sys/conf/files.arm64 head/sys/libkern/crc32.c head/sys/sys/libkern.h head/tests/sys/kern/Makefile head/tests/sys/kern/libkern_crc32.c Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Apr 27 16:38:28 2017 (r317511) +++ head/sys/conf/files.arm64 Thu Apr 27 17:53:05 2017 (r317512) @@ -191,6 +191,7 @@ libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard libkern/memset.c standard +libkern/arm64/crc32c_armv8.S standard cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S optional zfs | dtrace compile-with "${CDDL_C}" cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" Added: head/sys/libkern/arm64/crc32c_armv8.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm64/crc32c_armv8.S Thu Apr 27 17:53:05 2017 (r317512) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2017 Michael Tuexen + * 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$"); + +/* + * uint32_t + * armv8_crc32c(uint32_t crc, const unsigned char *buf, unsigned int len) + */ + +ENTRY(armv8_crc32c) + cbz w2, end + tbz x1, #0x0, half_word_aligned + sub w2, w2, 0x1 + ldr w10, [x1], #0x1 + crc32cb w0, w0, w10 +half_word_aligned: + cmp w2, #0x2 + b.lo last_byte + tbz x1, #0x1, word_aligned + sub w2, w2, 0x2 + ldr w10, [x1], #0x2 + crc32ch w0, w0, w10 +word_aligned: + cmp w2, #0x4 + b.lo last_half_word + tbz x1, #0x2, double_word_aligned + sub w2, w2, 0x4 + ldr w10, [x1], #0x4 + crc32cw w0, w0, w10 +double_word_aligned: + lsr w9, w2, #0x3 + cbz w9, last_word +loop: + ldr x10, [x1], #0x8 + crc32cx w0, w0, x10 + subs w9, w9, #1 + b.ne loop +last_word: + tbz w2, #0x2, last_half_word + ldr w10, [x1], #0x4 + crc32cw w0, w0, w10 +last_half_word: + tbz w2, #0x1, last_byte + ldr w10, [x1], #0x2 + crc32ch w0, w0, w10 +last_byte: + tbz w2, #0x0, end + ldr w10, [x1], #0x1 + crc32cb w0, w0, w10 +end: + ret +END(armv8_crc32c) Modified: head/sys/libkern/crc32.c ============================================================================== --- head/sys/libkern/crc32.c Thu Apr 27 16:38:28 2017 (r317511) +++ head/sys/libkern/crc32.c Thu Apr 27 17:53:05 2017 (r317512) @@ -54,6 +54,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#if defined(__aarch64__) +#include +#endif + const uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, @@ -760,6 +764,18 @@ calculate_crc32c(uint32_t crc32c, return (sse42_crc32c(crc32c, buffer, length)); } else #endif +#if defined(__aarch64__) + uint64_t reg; + + /* + * We only test for CRC32 support on the CPU with index 0 assuming that + * this applies to all CPUs. + */ + reg = READ_SPECIALREG(id_aa64isar0_el1); + if (ID_AA64ISAR0_CRC32(reg) != ID_AA64ISAR0_CRC32_NONE) { + return (armv8_crc32c(crc32c, buffer, length)); + } else +#endif if (length < 4) { return (singletable_crc32c(crc32c, buffer, length)); } else { Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Thu Apr 27 16:38:28 2017 (r317511) +++ head/sys/sys/libkern.h Thu Apr 27 17:53:05 2017 (r317512) @@ -210,6 +210,9 @@ calculate_crc32c(uint32_t crc32c, const #if defined(__amd64__) || defined(__i386__) uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); #endif +#if defined(__aarch64__) +uint32_t armv8_crc32c(uint32_t, const unsigned char *, unsigned int); +#endif #endif Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Thu Apr 27 16:38:28 2017 (r317511) +++ head/tests/sys/kern/Makefile Thu Apr 27 17:53:05 2017 (r317512) @@ -30,10 +30,16 @@ NETBSD_ATF_TESTS_C+= mqueue_test CFLAGS.mqueue_test+= -I${SRCTOP}/tests LIBADD.mqueue_test+= rt -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "amd64" || \ + ${MACHINE_ARCH} == "i386" || \ + ${MACHINE_ARCH} == "aarch64" ATF_TESTS_C+= libkern_crc32 CFLAGS.libkern_crc32+= -DUSERSPACE_TESTING +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c +.else +LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/arm64/crc32c_armv8.S +.endif .endif # subr_unit.c contains functions whose prototypes lie in headers that cannot be Modified: head/tests/sys/kern/libkern_crc32.c ============================================================================== --- head/tests/sys/kern/libkern_crc32.c Thu Apr 27 16:38:28 2017 (r317511) +++ head/tests/sys/kern/libkern_crc32.c Thu Apr 27 17:53:05 2017 (r317512) @@ -32,7 +32,13 @@ #include +#if defined(__amd64__) || defined(__i386__) extern uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); +#elif defined(__aarch64__) +extern uint32_t armv8_crc32c(uint32_t, const unsigned char *, unsigned); +#else +#error These tests are not supported on this platform +#endif ATF_TC_WITHOUT_HEAD(crc32c_basic_correctness); ATF_TC_BODY(crc32c_basic_correctness, tc) @@ -79,8 +85,13 @@ ATF_TC_BODY(crc32c_basic_correctness, tc ATF_REQUIRE(nitems(inputs) == nitems(results)); for (i = 0; i < nitems(inputs); i++) { +#if defined(__amd64__) || defined(__i386__) act = sse42_crc32c(~0, (const void *)&inputs[i], sizeof(inputs[0])); +#else + act = armv8_crc32c(~0, (const void *)&inputs[i], + sizeof(inputs[0])); +#endif ATF_REQUIRE_MSG(act == results[i], "crc32c(0x%jx) = 0x%08x, got 0x%08x", (uintmax_t)inputs[i], results[i], act); @@ -100,7 +111,11 @@ ATF_TC_BODY(crc32c_alignment, tc) for (i = 1; i < 8; i++) { memcpy(&buf[i], &input, sizeof(input)); +#if defined(__amd64__) || defined(__i386__) act = sse42_crc32c(~0, (const void *)&buf[i], sizeof(input)); +#else + act = armv8_crc32c(~0, (const void *)&buf[i], sizeof(input)); +#endif ATF_REQUIRE_MSG(act == result, "crc32c(0x%jx) = 0x%08x, got 0x%08x", (uintmax_t)input, result, act); @@ -117,7 +132,11 @@ ATF_TC_BODY(crc32c_trailing_bytes, tc) const uint32_t result = 0xec638d62; uint32_t act; +#if defined(__amd64__) || defined(__i386__) act = sse42_crc32c(~0, input, sizeof(input)); +#else + act = armv8_crc32c(~0, input, sizeof(input)); +#endif ATF_REQUIRE_MSG(act == result, "expected 0x%08x, got 0x%08x", result, act); } From owner-svn-src-head@freebsd.org Thu Apr 27 18:52: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 E3C55D53238; Thu, 27 Apr 2017 18:52:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A942C6AE; Thu, 27 Apr 2017 18:52:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3RIqI1B009996; Thu, 27 Apr 2017 18:52:18 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RIqImd009992; Thu, 27 Apr 2017 18:52:18 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201704271852.v3RIqImd009992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 27 Apr 2017 18:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317514 - head/bin/sh/tests/expansion 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, 27 Apr 2017 18:52:20 -0000 Author: jilles Date: Thu Apr 27 18:52:18 2017 New Revision: 317514 URL: https://svnweb.freebsd.org/changeset/base/317514 Log: sh: Add some tests for command substitution final newline stripping. Added: head/bin/sh/tests/expansion/cmdsubst25.0 (contents, props changed) head/bin/sh/tests/expansion/cmdsubst26.0 (contents, props changed) Modified: head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/tests/expansion/Makefile ============================================================================== --- head/bin/sh/tests/expansion/Makefile Thu Apr 27 18:21:38 2017 (r317513) +++ head/bin/sh/tests/expansion/Makefile Thu Apr 27 18:52:18 2017 (r317514) @@ -46,6 +46,8 @@ ${PACKAGE}FILES+= cmdsubst21.0 ${PACKAGE}FILES+= cmdsubst22.0 ${PACKAGE}FILES+= cmdsubst23.0 ${PACKAGE}FILES+= cmdsubst24.0 +${PACKAGE}FILES+= cmdsubst25.0 +${PACKAGE}FILES+= cmdsubst26.0 ${PACKAGE}FILES+= export1.0 ${PACKAGE}FILES+= export2.0 ${PACKAGE}FILES+= export3.0 Added: head/bin/sh/tests/expansion/cmdsubst25.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/cmdsubst25.0 Thu Apr 27 18:52:18 2017 (r317514) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +IFS=' ' +set -- `printf '\n '` +IFS=: +[ "$*" = ' +' ] Added: head/bin/sh/tests/expansion/cmdsubst26.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/cmdsubst26.0 Thu Apr 27 18:52:18 2017 (r317514) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +nl=' +' +v=$nl`printf '\n'` +[ "$v" = "$nl" ] From owner-svn-src-head@freebsd.org Thu Apr 27 19: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 C5ED1D5355A; Thu, 27 Apr 2017 19:03:09 +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 8B9AACB1; Thu, 27 Apr 2017 19:03:09 +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 v3RJ385J016201; Thu, 27 Apr 2017 19:03:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RJ38Lj016200; Thu, 27 Apr 2017 19:03:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704271903.v3RJ38Lj016200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 27 Apr 2017 19:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317515 - head/sbin/geom/class/part 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, 27 Apr 2017 19:03:09 -0000 Author: mav Date: Thu Apr 27 19:03:08 2017 New Revision: 317515 URL: https://svnweb.freebsd.org/changeset/base/317515 Log: Fix withered handling of r280687, broken by r286719. MFC after: 1 week. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Thu Apr 27 18:52:18 2017 (r317514) +++ head/sbin/geom/class/part/geom_part.c Thu Apr 27 19:03:08 2017 (r317515) @@ -73,6 +73,7 @@ volatile sig_atomic_t undo_restore; static struct gclass *find_class(struct gmesh *, const char *); static struct ggeom * find_geom(struct gclass *, const char *); +static int geom_is_withered(struct ggeom *); static const char *find_geomcfg(struct ggeom *, const char *); static const char *find_provcfg(struct gprovider *, const char *); static struct gprovider *find_provider(struct ggeom *, off_t); @@ -215,7 +216,7 @@ find_geom(struct gclass *classp, const c LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { if (strcmp(gp->lg_name, name) != 0) continue; - if (find_geomcfg(gp, "wither") == NULL) + if (!geom_is_withered(gp)) return (gp); else wgp = gp; @@ -223,6 +224,18 @@ find_geom(struct gclass *classp, const c return (wgp); } +static int +geom_is_withered(struct ggeom *gp) +{ + struct gconfig *gc; + + LIST_FOREACH(gc, &gp->lg_config, lg_config) { + if (!strcmp(gc->lg_name, "wither")) + return (1); + } + return (0); +} + static const char * find_geomcfg(struct ggeom *gp, const char *cfg) { @@ -614,7 +627,7 @@ gpart_show_geom(struct ggeom *gp, const off_t length, secsz; int idx, wblocks, wname, wmax; - if (find_geomcfg(gp, "wither")) + if (geom_is_withered(gp)) return; scheme = find_geomcfg(gp, "scheme"); if (scheme == NULL) From owner-svn-src-head@freebsd.org Thu Apr 27 19:48: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 580F7D4B612; Thu, 27 Apr 2017 19:48:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 274AC402; Thu, 27 Apr 2017 19:48:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3RJm1M4033006; Thu, 27 Apr 2017 19:48:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RJm1BI033003; Thu, 27 Apr 2017 19:48:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201704271948.v3RJm1BI033003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Apr 2017 19:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317517 - in head/sbin: kldconfig kldload 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, 27 Apr 2017 19:48:02 -0000 Author: trasz Date: Thu Apr 27 19:48:00 2017 New Revision: 317517 URL: https://svnweb.freebsd.org/changeset/base/317517 Log: Advertise kldxref(8) a little better. MFC after: 2 weeks Modified: head/sbin/kldconfig/kldconfig.8 head/sbin/kldload/kldload.8 Modified: head/sbin/kldconfig/kldconfig.8 ============================================================================== --- head/sbin/kldconfig/kldconfig.8 Thu Apr 27 19:40:53 2017 (r317516) +++ head/sbin/kldconfig/kldconfig.8 Thu Apr 27 19:48:00 2017 (r317517) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2001 +.Dd April 27, 2017 .Dt KLDCONFIG 8 .Os .Sh NAME @@ -98,6 +98,7 @@ The default module search path used by t .Sh SEE ALSO .Xr kldload 2 , .Xr kldload 8 , +.Xr kldxref 8 , .Xr sysctl 8 .Sh HISTORY The Modified: head/sbin/kldload/kldload.8 ============================================================================== --- head/sbin/kldload/kldload.8 Thu Apr 27 19:40:53 2017 (r317516) +++ head/sbin/kldload/kldload.8 Thu Apr 27 19:48:00 2017 (r317517) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2012 +.Dd April 27, 2017 .Dt KLDLOAD 8 .Os .Sh NAME @@ -116,7 +116,8 @@ Modules may also be auto-loaded through .Xr security 7 , .Xr kldconfig 8 , .Xr kldstat 8 , -.Xr kldunload 8 +.Xr kldunload 8 , +.Xr kldxref 8 .Sh HISTORY The .Nm From owner-svn-src-head@freebsd.org Thu Apr 27 19:57: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 BDE3FD4B976; Thu, 27 Apr 2017 19:57:19 +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 76EAAB70; Thu, 27 Apr 2017 19:57:19 +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 v3RJvIrZ037035; Thu, 27 Apr 2017 19:57:18 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RJvI4r037034; Thu, 27 Apr 2017 19:57:18 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201704271957.v3RJvI4r037034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 27 Apr 2017 19:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317518 - head/sys/contrib/ena-com 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, 27 Apr 2017 19:57:19 -0000 Author: zbb Date: Thu Apr 27 19:57:18 2017 New Revision: 317518 URL: https://svnweb.freebsd.org/changeset/base/317518 Log: Import Amazon Elastic Network Adapter (ENA) HAL to sys/contrib/ Import from vendor-sys/ena-com/1.1.4.1 SVN rev.: 317516 Version: 1.1.4.1 Obtained from: Amazon.com, Inc. Added: head/sys/contrib/ena-com/ - copied from r317517, vendor-sys/ena-com/1.1.4.1/ From owner-svn-src-head@freebsd.org Thu Apr 27 21:11: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 E40CCD5394C; Thu, 27 Apr 2017 21:11:58 +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 BF7C31F17; Thu, 27 Apr 2017 21:11:58 +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 v3RLBvJD068707; Thu, 27 Apr 2017 21:11:57 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RLBvLe068705; Thu, 27 Apr 2017 21:11:57 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201704272111.v3RLBvLe068705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Thu, 27 Apr 2017 21:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317522 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/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, 27 Apr 2017 21:11:59 -0000 Author: jpaetzel Date: Thu Apr 27 21:11:57 2017 New Revision: 317522 URL: https://svnweb.freebsd.org/changeset/base/317522 Log: MFV 316897 7586 remove #ifdef __lint hack from dmu.h illumos/illumos-gate@4ba5b9616327ef64e8abc737d29b3faabc6ae68c https://github.com/illumos/illumos-gate/commit/4ba5b9616327ef64e8abc737d29b3faabc6ae68c https://www.illumos.org/issues/7586 The #ifdef __lint in dmu.h is ugly, and it would be nice not to duplicate it if we add other inline functions into header files in ZFS, especially since it is difficult to make any other solution work across all compilation targets. We should switch to disabling the lint flags that are failing instead. Reviewed by: Matthew Ahrens Reviewed by: Pavel Zakharov Approved by: Dan McDonald Author: Dan Kimmel Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Apr 27 20:21:29 2017 (r317521) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Apr 27 21:11:57 2017 (r317522) @@ -567,12 +567,7 @@ typedef struct dmu_buf_user { * NOTE: This function should only be called once on a given dmu_buf_user_t. * To allow enforcement of this, dbu must already be zeroed on entry. */ -#ifdef __lint -/* Very ugly, but it beats issuing suppression directives in many Makefiles. */ -extern void -dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, - dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp); -#else /* __lint */ +/*ARGSUSED*/ inline void dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) @@ -588,7 +583,6 @@ dmu_buf_init_user(dmu_buf_user_t *dbu, d dbu->dbu_clear_on_evict_dbufp = clear_on_evict_dbufp; #endif } -#endif /* __lint */ /* * Attach user data to a dbuf and mark it for normal (when the dbuf's Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu Apr 27 20:21:29 2017 (r317521) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu Apr 27 21:11:57 2017 (r317522) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -611,8 +612,6 @@ _NOTE(CONSTCOND) } while (0) ASSERT(len < size); \ } -#include - #define BP_GET_BUFC_TYPE(bp) \ (((BP_GET_LEVEL(bp) > 0) || (DMU_OT_IS_METADATA(BP_GET_TYPE(bp)))) ? \ ARC_BUFC_METADATA : ARC_BUFC_DATA) From owner-svn-src-head@freebsd.org Thu Apr 27 21:24: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 DD6B2D53D3E; Thu, 27 Apr 2017 21:24:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id A6E7CBCD; Thu, 27 Apr 2017 21:24:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 1A3FB3CC7BD; Fri, 28 Apr 2017 07:24:20 +1000 (AEST) Date: Fri, 28 Apr 2017 07:24:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317509 - in head: . share/man/man4 sys/conf sys/dev/cy In-Reply-To: <201704271614.v3RGEW0A047133@repo.freebsd.org> Message-ID: <20170428072402.U4146@besplex.bde.org> References: <201704271614.v3RGEW0A047133@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=D2gLJ1h8XBRo8zVbZskA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 27 Apr 2017 21:24:24 -0000 On Thu, 27 Apr 2017, John Baldwin wrote: > Author: jhb > Date: Thu Apr 27 16:14:32 2017 > New Revision: 317509 > URL: https://svnweb.freebsd.org/changeset/base/317509 > > Log: > Revert r317446 and bring back cy(4). > > Requested by: bde Thanks. Bruce From owner-svn-src-head@freebsd.org Thu Apr 27 21:24: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 770BAD53DAC; Thu, 27 Apr 2017 21:24:51 +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 52858D3B; Thu, 27 Apr 2017 21:24:51 +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 v3RLOoEa074344; Thu, 27 Apr 2017 21:24:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RLOoLT074343; Thu, 27 Apr 2017 21:24:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704272124.v3RLOoLT074343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 27 Apr 2017 21:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317523 - 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, 27 Apr 2017 21:24:51 -0000 Author: kib Date: Thu Apr 27 21:24:50 2017 New Revision: 317523 URL: https://svnweb.freebsd.org/changeset/base/317523 Log: Add asserts to verify stability of struct proc and struct thread layouts. Some notes: - Only i386 and amd64 layouts are checked, other Tier-1 (or close to it) architectures would benefit from the same check. - Unconditional enabling of the asserts depend on the stability of locks memory layout. If locks are optimized to avoid bloat when some debugging or profiling features turned off, it makes sense to only assert layout for production configs. Reviewed by: badger, emaste, jhb, vangyzen Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D10526 Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Apr 27 21:11:57 2017 (r317522) +++ head/sys/kern/kern_thread.c Thu Apr 27 21:24:50 2017 (r317523) @@ -65,6 +65,57 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * Asserts below verify the stability of struct thread and struct proc + * layout, as exposed by KBI to modules. On head, the KBI is allowed + * to drift, change to the structures must be accompanied by the + * assert update. + * + * On the stable branches after KBI freeze, conditions must not be + * violated. Typically new fields are moved to the end of the + * structures. + */ +#ifdef __amd64__ +_Static_assert(offsetof(struct thread, td_flags) == 0xf4, + "struct thread KBI td_flags"); +_Static_assert(offsetof(struct thread, td_pflags) == 0xfc, + "struct thread KBI td_pflags"); +_Static_assert(offsetof(struct thread, td_frame) == 0x410, + "struct thread KBI td_frame"); +_Static_assert(offsetof(struct thread, td_emuldata) == 0x4b8, + "struct thread KBI td_emuldata"); +_Static_assert(offsetof(struct proc, p_flag) == 0xb0, + "struct proc KBI p_flag"); +_Static_assert(offsetof(struct proc, p_pid) == 0xbc, + "struct proc KBI p_pid"); +_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, + "struct proc KBI p_filemon"); +_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, + "struct proc KBI p_comm"); +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8, + "struct proc KBI p_emuldata"); +#endif +#ifdef __i386__ +_Static_assert(offsetof(struct thread, td_flags) == 0x9c, + "struct thread KBI td_flags"); +_Static_assert(offsetof(struct thread, td_pflags) == 0xa4, + "struct thread KBI td_pflags"); +_Static_assert(offsetof(struct thread, td_frame) == 0x2c8, + "struct thread KBI td_frame"); +_Static_assert(offsetof(struct thread, td_emuldata) == 0x314, + "struct thread KBI td_emuldata"); +_Static_assert(offsetof(struct proc, p_flag) == 0x68, + "struct proc KBI p_flag"); +_Static_assert(offsetof(struct proc, p_pid) == 0x74, + "struct proc KBI p_pid"); +_Static_assert(offsetof(struct proc, p_filemon) == 0x27c, + "struct proc KBI p_filemon"); +_Static_assert(offsetof(struct proc, p_comm) == 0x288, + "struct proc KBI p_comm"); +_Static_assert(offsetof(struct proc, p_emuldata) == 0x314, + "struct proc KBI p_emuldata"); +#endif + SDT_PROVIDER_DECLARE(proc); SDT_PROBE_DEFINE(proc, , , lwp__exit); From owner-svn-src-head@freebsd.org Thu Apr 27 22:00: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 33CEFD53D9F; Thu, 27 Apr 2017 22:00:05 +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 0341311F0; Thu, 27 Apr 2017 22:00:04 +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 v3RM04ni088415; Thu, 27 Apr 2017 22:00:04 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RM04YK088413; Thu, 27 Apr 2017 22:00:04 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201704272200.v3RM04YK088413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Thu, 27 Apr 2017 22:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317527 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . 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, 27 Apr 2017 22:00:05 -0000 Author: jpaetzel Date: Thu Apr 27 22:00:03 2017 New Revision: 317527 URL: https://svnweb.freebsd.org/changeset/base/317527 Log: MFV 316898 7613 ms_freetree[4] is only used in syncing context illumos/illumos-gate@5f145778012b555e084eacc858ead9e1e42bd149 https://github.com/illumos/illumos-gate/commit/5f145778012b555e084eacc858ead9e1e42bd149 https://www.illumos.org/issues/7613 metaslab_t:ms_freetree[TXG_SIZE] is only used in syncing context. We should replace it with two trees: the freeing tree (ranges that we are freeing this syncing txg) and the freed tree (ranges which have been freed this txg). Reviewed by: George Wilson Reviewed by: Alex Reece Approved by: Dan McDonald Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Apr 27 21:45:50 2017 (r317526) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Apr 27 22:00:03 2017 (r317527) @@ -533,7 +533,6 @@ metaslab_verify_space(metaslab_t *msp, u { spa_t *spa = msp->ms_group->mg_vd->vdev_spa; uint64_t allocated = 0; - uint64_t freed = 0; uint64_t sm_free_space, msp_free_space; ASSERT(MUTEX_HELD(&msp->ms_lock)); @@ -563,10 +562,9 @@ metaslab_verify_space(metaslab_t *msp, u allocated += range_tree_space(msp->ms_alloctree[(txg + t) & TXG_MASK]); } - freed = range_tree_space(msp->ms_freetree[TXG_CLEAN(txg) & TXG_MASK]); msp_free_space = range_tree_space(msp->ms_tree) + allocated + - msp->ms_deferspace + freed; + msp->ms_deferspace + range_tree_space(msp->ms_freedtree); VERIFY3U(sm_free_space, ==, msp_free_space); } @@ -1499,7 +1497,7 @@ metaslab_init(metaslab_group_t *mg, uint /* * We create the main range tree here, but we don't create the - * alloctree and freetree until metaslab_sync_done(). This serves + * other range trees until metaslab_sync_done(). This serves * two purposes: it allows metaslab_sync_done() to detect the * addition of new space; and for debugging, it ensures that we'd * data fault on any attempt to use this metaslab before it's ready. @@ -1557,10 +1555,11 @@ metaslab_fini(metaslab_t *msp) metaslab_unload(msp); range_tree_destroy(msp->ms_tree); + range_tree_destroy(msp->ms_freeingtree); + range_tree_destroy(msp->ms_freedtree); for (int t = 0; t < TXG_SIZE; t++) { range_tree_destroy(msp->ms_alloctree[t]); - range_tree_destroy(msp->ms_freetree[t]); } for (int t = 0; t < TXG_DEFER_SIZE; t++) { @@ -2171,7 +2170,6 @@ static void metaslab_condense(metaslab_t *msp, uint64_t txg, dmu_tx_t *tx) { spa_t *spa = msp->ms_group->mg_vd->vdev_spa; - range_tree_t *freetree = msp->ms_freetree[txg & TXG_MASK]; range_tree_t *condense_tree; space_map_t *sm = msp->ms_sm; @@ -2202,9 +2200,9 @@ metaslab_condense(metaslab_t *msp, uint6 /* * Remove what's been freed in this txg from the condense_tree. * Since we're in sync_pass 1, we know that all the frees from - * this txg are in the freetree. + * this txg are in the freeingtree. */ - range_tree_walk(freetree, range_tree_remove, condense_tree); + range_tree_walk(msp->ms_freeingtree, range_tree_remove, condense_tree); for (int t = 0; t < TXG_DEFER_SIZE; t++) { range_tree_walk(msp->ms_defertree[t], @@ -2260,9 +2258,6 @@ metaslab_sync(metaslab_t *msp, uint64_t spa_t *spa = vd->vdev_spa; objset_t *mos = spa_meta_objset(spa); range_tree_t *alloctree = msp->ms_alloctree[txg & TXG_MASK]; - range_tree_t **freetree = &msp->ms_freetree[txg & TXG_MASK]; - range_tree_t **freed_tree = - &msp->ms_freetree[TXG_CLEAN(txg) & TXG_MASK]; dmu_tx_t *tx; uint64_t object = space_map_object(msp->ms_sm); @@ -2271,14 +2266,14 @@ metaslab_sync(metaslab_t *msp, uint64_t /* * This metaslab has just been added so there's no work to do now. */ - if (*freetree == NULL) { + if (msp->ms_freeingtree == NULL) { ASSERT3P(alloctree, ==, NULL); return; } ASSERT3P(alloctree, !=, NULL); - ASSERT3P(*freetree, !=, NULL); - ASSERT3P(*freed_tree, !=, NULL); + ASSERT3P(msp->ms_freeingtree, !=, NULL); + ASSERT3P(msp->ms_freedtree, !=, NULL); /* * Normally, we don't want to process a metaslab if there @@ -2286,14 +2281,14 @@ metaslab_sync(metaslab_t *msp, uint64_t * is being forced to condense we need to let it through. */ if (range_tree_space(alloctree) == 0 && - range_tree_space(*freetree) == 0 && + range_tree_space(msp->ms_freeingtree) == 0 && !msp->ms_condense_wanted) return; /* * The only state that can actually be changing concurrently with * metaslab_sync() is the metaslab's ms_tree. No other thread can - * be modifying this txg's alloctree, freetree, freed_tree, or + * be modifying this txg's alloctree, freeingtree, freedtree, or * space_map_phys_t. Therefore, we only hold ms_lock to satify * space map ASSERTs. We drop it whenever we call into the DMU, * because the DMU can call down to us (e.g. via zio_free()) at @@ -2330,7 +2325,7 @@ metaslab_sync(metaslab_t *msp, uint64_t metaslab_condense(msp, txg, tx); } else { space_map_write(msp->ms_sm, alloctree, SM_ALLOC, tx); - space_map_write(msp->ms_sm, *freetree, SM_FREE, tx); + space_map_write(msp->ms_sm, msp->ms_freeingtree, SM_FREE, tx); } if (msp->ms_loaded) { @@ -2350,7 +2345,7 @@ metaslab_sync(metaslab_t *msp, uint64_t * to accurately reflect all free space even if some space * is not yet available for allocation (i.e. deferred). */ - space_map_histogram_add(msp->ms_sm, *freed_tree, tx); + space_map_histogram_add(msp->ms_sm, msp->ms_freedtree, tx); /* * Add back any deferred free space that has not been @@ -2372,7 +2367,7 @@ metaslab_sync(metaslab_t *msp, uint64_t * then we will lose some accuracy but will correct it the next * time we load the space map. */ - space_map_histogram_add(msp->ms_sm, *freetree, tx); + space_map_histogram_add(msp->ms_sm, msp->ms_freeingtree, tx); metaslab_group_histogram_add(mg, msp); metaslab_group_histogram_verify(mg); @@ -2380,20 +2375,21 @@ metaslab_sync(metaslab_t *msp, uint64_t /* * For sync pass 1, we avoid traversing this txg's free range tree - * and instead will just swap the pointers for freetree and - * freed_tree. We can safely do this since the freed_tree is + * and instead will just swap the pointers for freeingtree and + * freedtree. We can safely do this since the freed_tree is * guaranteed to be empty on the initial pass. */ if (spa_sync_pass(spa) == 1) { - range_tree_swap(freetree, freed_tree); + range_tree_swap(&msp->ms_freeingtree, &msp->ms_freedtree); } else { - range_tree_vacate(*freetree, range_tree_add, *freed_tree); + range_tree_vacate(msp->ms_freeingtree, + range_tree_add, msp->ms_freedtree); } range_tree_vacate(alloctree, NULL, NULL); ASSERT0(range_tree_space(msp->ms_alloctree[txg & TXG_MASK])); ASSERT0(range_tree_space(msp->ms_alloctree[TXG_CLEAN(txg) & TXG_MASK])); - ASSERT0(range_tree_space(msp->ms_freetree[txg & TXG_MASK])); + ASSERT0(range_tree_space(msp->ms_freeingtree)); mutex_exit(&msp->ms_lock); @@ -2415,7 +2411,6 @@ metaslab_sync_done(metaslab_t *msp, uint metaslab_group_t *mg = msp->ms_group; vdev_t *vd = mg->mg_vd; spa_t *spa = vd->vdev_spa; - range_tree_t **freed_tree; range_tree_t **defer_tree; int64_t alloc_delta, defer_delta; boolean_t defer_allowed = B_TRUE; @@ -2426,20 +2421,24 @@ metaslab_sync_done(metaslab_t *msp, uint /* * If this metaslab is just becoming available, initialize its - * alloctrees, freetrees, and defertree and add its capacity to - * the vdev. + * range trees and add its capacity to the vdev. */ - if (msp->ms_freetree[TXG_CLEAN(txg) & TXG_MASK] == NULL) { + if (msp->ms_freedtree == NULL) { for (int t = 0; t < TXG_SIZE; t++) { ASSERT(msp->ms_alloctree[t] == NULL); - ASSERT(msp->ms_freetree[t] == NULL); msp->ms_alloctree[t] = range_tree_create(NULL, msp, &msp->ms_lock); - msp->ms_freetree[t] = range_tree_create(NULL, msp, - &msp->ms_lock); } + ASSERT3P(msp->ms_freeingtree, ==, NULL); + msp->ms_freeingtree = range_tree_create(NULL, msp, + &msp->ms_lock); + + ASSERT3P(msp->ms_freedtree, ==, NULL); + msp->ms_freedtree = range_tree_create(NULL, msp, + &msp->ms_lock); + for (int t = 0; t < TXG_DEFER_SIZE; t++) { ASSERT(msp->ms_defertree[t] == NULL); @@ -2450,7 +2449,6 @@ metaslab_sync_done(metaslab_t *msp, uint vdev_space_update(vd, 0, 0, msp->ms_size); } - freed_tree = &msp->ms_freetree[TXG_CLEAN(txg) & TXG_MASK]; defer_tree = &msp->ms_defertree[txg % TXG_DEFER_SIZE]; uint64_t free_space = metaslab_class_get_space(spa_normal_class(spa)) - @@ -2462,7 +2460,7 @@ metaslab_sync_done(metaslab_t *msp, uint defer_delta = 0; alloc_delta = space_map_alloc_delta(msp->ms_sm); if (defer_allowed) { - defer_delta = range_tree_space(*freed_tree) - + defer_delta = range_tree_space(msp->ms_freedtree) - range_tree_space(*defer_tree); } else { defer_delta -= range_tree_space(*defer_tree); @@ -2470,9 +2468,6 @@ metaslab_sync_done(metaslab_t *msp, uint vdev_space_update(vd, alloc_delta + defer_delta, defer_delta, 0); - ASSERT0(range_tree_space(msp->ms_alloctree[txg & TXG_MASK])); - ASSERT0(range_tree_space(msp->ms_freetree[txg & TXG_MASK])); - /* * If there's a metaslab_load() in progress, wait for it to complete * so that we have a consistent view of the in-core space map. @@ -2488,9 +2483,9 @@ metaslab_sync_done(metaslab_t *msp, uint range_tree_vacate(*defer_tree, msp->ms_loaded ? range_tree_add : NULL, msp->ms_tree); if (defer_allowed) { - range_tree_swap(freed_tree, defer_tree); + range_tree_swap(&msp->ms_freedtree, defer_tree); } else { - range_tree_vacate(*freed_tree, + range_tree_vacate(msp->ms_freedtree, msp->ms_loaded ? range_tree_add : NULL, msp->ms_tree); } @@ -3250,10 +3245,10 @@ metaslab_free_dva(spa_t *spa, const dva_ range_tree_add(msp->ms_tree, offset, size); msp->ms_max_size = metaslab_block_maxsize(msp); } else { - if (range_tree_space(msp->ms_freetree[txg & TXG_MASK]) == 0) + VERIFY3U(txg, ==, spa->spa_syncing_txg); + if (range_tree_space(msp->ms_freeingtree) == 0) vdev_dirty(vd, VDD_METASLAB, msp, txg); - range_tree_add(msp->ms_freetree[txg & TXG_MASK], - offset, size); + range_tree_add(msp->ms_freeingtree, offset, size); } mutex_exit(&msp->ms_lock); @@ -3485,8 +3480,8 @@ metaslab_check_free(spa_t *spa, const bl if (msp->ms_loaded) range_tree_verify(msp->ms_tree, offset, size); - for (int j = 0; j < TXG_SIZE; j++) - range_tree_verify(msp->ms_freetree[j], offset, size); + range_tree_verify(msp->ms_freeingtree, offset, size); + range_tree_verify(msp->ms_freedtree, offset, size); for (int j = 0; j < TXG_DEFER_SIZE; j++) range_tree_verify(msp->ms_defertree[j], offset, size); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Thu Apr 27 21:45:50 2017 (r317526) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Thu Apr 27 22:00:03 2017 (r317527) @@ -255,21 +255,24 @@ struct metaslab_group { #define MAX_LBAS 64 /* - * Each metaslab maintains a set of in-core trees to track metaslab operations. - * The in-core free tree (ms_tree) contains the current list of free segments. - * As blocks are allocated, the allocated segment are removed from the ms_tree - * and added to a per txg allocation tree (ms_alloctree). As blocks are freed, - * they are added to the per txg free tree (ms_freetree). These per txg - * trees allow us to process all allocations and frees in syncing context - * where it is safe to update the on-disk space maps. One additional in-core - * tree is maintained to track deferred frees (ms_defertree). Once a block - * is freed it will move from the ms_freetree to the ms_defertree. A deferred - * free means that a block has been freed but cannot be used by the pool - * until TXG_DEFER_SIZE transactions groups later. For example, a block - * that is freed in txg 50 will not be available for reallocation until - * txg 52 (50 + TXG_DEFER_SIZE). This provides a safety net for uberblock - * rollback. A pool could be safely rolled back TXG_DEFERS_SIZE - * transactions groups and ensure that no block has been reallocated. + * Each metaslab maintains a set of in-core trees to track metaslab + * operations. The in-core free tree (ms_tree) contains the list of + * free segments which are eligible for allocation. As blocks are + * allocated, the allocated segments are removed from the ms_tree and + * added to a per txg allocation tree (ms_alloctree). This allows us to + * process all allocations in syncing context where it is safe to update + * the on-disk space maps. Frees are also processed in syncing context. + * Most frees are generated from syncing context, and those that are not + * are held in the spa_free_bplist for processing in syncing context. + * An additional set of in-core trees is maintained to track deferred + * frees (ms_defertree). Once a block is freed it will move from the + * ms_freedtree to the ms_defertree. A deferred free means that a block + * has been freed but cannot be used by the pool until TXG_DEFER_SIZE + * transactions groups later. For example, a block that is freed in txg + * 50 will not be available for reallocation until txg 52 (50 + + * TXG_DEFER_SIZE). This provides a safety net for uberblock rollback. + * A pool could be safely rolled back TXG_DEFERS_SIZE transactions + * groups and ensure that no block has been reallocated. * * The simplified transition diagram looks like this: * @@ -277,33 +280,34 @@ struct metaslab_group { * ALLOCATE * | * V - * free segment (ms_tree) --------> ms_alloctree ----> (write to space map) + * free segment (ms_tree) -----> ms_alloctree[4] ----> (write to space map) * ^ - * | - * | ms_freetree <--- FREE - * | | + * | ms_freeingtree <--- FREE * | | + * | v + * | ms_freedtree * | | - * +----------- ms_defertree <-------+---------> (write to space map) + * +-------- ms_defertree[2] <-------+---------> (write to space map) * * * Each metaslab's space is tracked in a single space map in the MOS, - * which is only updated in syncing context. Each time we sync a txg, - * we append the allocs and frees from that txg to the space map. - * The pool space is only updated once all metaslabs have finished syncing. - * - * To load the in-core free tree we read the space map from disk. - * This object contains a series of alloc and free records that are - * combined to make up the list of all free segments in this metaslab. These + * which is only updated in syncing context. Each time we sync a txg, + * we append the allocs and frees from that txg to the space map. The + * pool space is only updated once all metaslabs have finished syncing. + * + * To load the in-core free tree we read the space map from disk. This + * object contains a series of alloc and free records that are combined + * to make up the list of all free segments in this metaslab. These * segments are represented in-core by the ms_tree and are stored in an * AVL tree. * * As the space map grows (as a result of the appends) it will - * eventually become space-inefficient. When the metaslab's in-core free tree - * is zfs_condense_pct/100 times the size of the minimal on-disk - * representation, we rewrite it in its minimized form. If a metaslab - * needs to condense then we must set the ms_condensing flag to ensure - * that allocations are not performed on the metaslab that is being written. + * eventually become space-inefficient. When the metaslab's in-core + * free tree is zfs_condense_pct/100 times the size of the minimal + * on-disk representation, we rewrite it in its minimized form. If a + * metaslab needs to condense then we must set the ms_condensing flag to + * ensure that allocations are not performed on the metaslab that is + * being written. */ struct metaslab { kmutex_t ms_lock; @@ -315,10 +319,17 @@ struct metaslab { uint64_t ms_fragmentation; range_tree_t *ms_alloctree[TXG_SIZE]; - range_tree_t *ms_freetree[TXG_SIZE]; - range_tree_t *ms_defertree[TXG_DEFER_SIZE]; range_tree_t *ms_tree; + /* + * The following range trees are accessed only from syncing context. + * ms_free*tree only have entries while syncing, and are empty + * between syncs. + */ + range_tree_t *ms_freeingtree; /* to free this syncing txg */ + range_tree_t *ms_freedtree; /* already freed this syncing txg */ + range_tree_t *ms_defertree[TXG_DEFER_SIZE]; + boolean_t ms_condensing; /* condensing? */ boolean_t ms_condense_wanted; From owner-svn-src-head@freebsd.org Thu Apr 27 22:40: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 DBF96D53C21; Thu, 27 Apr 2017 22:40:40 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE30FFA8; Thu, 27 Apr 2017 22:40:40 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3RMedcG004942; Thu, 27 Apr 2017 22:40:39 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RMedne004940; Thu, 27 Apr 2017 22:40:39 GMT (envelope-from br@FreeBSD.org) Message-Id: <201704272240.v3RMedne004940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 27 Apr 2017 22:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317530 - in head/lib/libc/riscv: . 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, 27 Apr 2017 22:40:41 -0000 Author: br Date: Thu Apr 27 22:40:39 2017 New Revision: 317530 URL: https://svnweb.freebsd.org/changeset/base/317530 Log: Use unconditional jr (jump register) so cerror relocation offset fits. This fixes libc build on riscv64sf. Reviewed by: jhb Sponsored by: DARPA, AFRL Modified: head/lib/libc/riscv/SYS.h head/lib/libc/riscv/sys/vfork.S Modified: head/lib/libc/riscv/SYS.h ============================================================================== --- head/lib/libc/riscv/SYS.h Thu Apr 27 22:28:49 2017 (r317529) +++ head/lib/libc/riscv/SYS.h Thu Apr 27 22:40:39 2017 (r317530) @@ -54,8 +54,10 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ _SYSCALL(name); \ - bnez t0, cerror; \ + bnez t0, 1f; \ ret; \ +1: la t1, cerror; \ + jr t1; \ END(__sys_##name) #define RSYSCALL(name) \ @@ -63,6 +65,8 @@ ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ _SYSCALL(name); \ - bnez t0, cerror; \ + bnez t0, 1f; \ ret; \ +1: la t1, cerror; \ + jr t1; \ END(__sys_##name) Modified: head/lib/libc/riscv/sys/vfork.S ============================================================================== --- head/lib/libc/riscv/sys/vfork.S Thu Apr 27 22:28:49 2017 (r317529) +++ head/lib/libc/riscv/sys/vfork.S Thu Apr 27 22:40:39 2017 (r317530) @@ -42,10 +42,12 @@ ENTRY(__sys_vfork) mv a2, ra _SYSCALL(vfork) - bnez t0, cerror + bnez t0, 1f addi a1, a1, -1 and a0, a0, a1 mv ra, a2 ret +1: la t1, cerror + jr t1 END(__sys_vfork) From owner-svn-src-head@freebsd.org Thu Apr 27 23:31: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 955FBD5311F; Thu, 27 Apr 2017 23:31:39 +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 621C21377; Thu, 27 Apr 2017 23:31:39 +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 v3RNVclG027176; Thu, 27 Apr 2017 23:31:38 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3RNVc8B027174; Thu, 27 Apr 2017 23:31:38 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201704272331.v3RNVc8B027174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Thu, 27 Apr 2017 23:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317533 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . 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, 27 Apr 2017 23:31:39 -0000 Author: jpaetzel Date: Thu Apr 27 23:31:38 2017 New Revision: 317533 URL: https://svnweb.freebsd.org/changeset/base/317533 Log: MFV 316900 7743 per-vdev-zaps have no initialize path on upgrade illumos/illumos-gate@555da5111b0f2552c42d057b211aba89c9c79f6c https://github.com/illumos/illumos-gate/commit/555da5111b0f2552c42d057b211aba89c9c79f6c https://www.illumos.org/issues/7743 When loading a pool that had been created before the existance of per-vdev zaps, on a system that knows about per-vdev zaps, the per-vdev zaps will not be allocated and initialized. This appears to be because the logic that would have done so, in spa_sync_config_object(), is not reached under normal operation. It is only reached if spa_config_dirty_list is non-empty. The fix is to add another `AVZ_ACTION_` enum that will allow this code to be reached when we detect that we're loading an old pool, even when there are no dirty configs. Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Reviewed by: George Wilson Reviewed by: Don Brady Approved by: Robert Mustacchi Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Apr 27 23:14:01 2017 (r317532) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Apr 27 23:31:38 2017 (r317533) @@ -2731,10 +2731,14 @@ spa_load_impl(spa_t *spa, uint64_t pool_ error = spa_dir_prop(spa, DMU_POOL_VDEV_ZAP_MAP, &spa->spa_all_vdev_zaps); - if (error != ENOENT && error != 0) { + if (error == ENOENT) { + VERIFY(!nvlist_exists(mos_config, + ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS)); + spa->spa_avz_action = AVZ_ACTION_INITIALIZE; + ASSERT0(vdev_count_verify_zaps(spa->spa_root_vdev)); + } else if (error != 0) { return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); - } else if (error == 0 && !nvlist_exists(mos_config, - ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS)) { + } else if (!nvlist_exists(mos_config, ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS)) { /* * An older version of ZFS overwrote the sentinel value, so * we have orphaned per-vdev ZAPs in the MOS. Defer their @@ -6498,6 +6502,7 @@ spa_sync_config_object(spa_t *spa, dmu_t spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); ASSERT(spa->spa_avz_action == AVZ_ACTION_NONE || + spa->spa_avz_action == AVZ_ACTION_INITIALIZE || spa->spa_all_vdev_zaps != 0); if (spa->spa_avz_action == AVZ_ACTION_REBUILD) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Thu Apr 27 23:14:01 2017 (r317532) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Thu Apr 27 23:31:38 2017 (r317533) @@ -120,7 +120,8 @@ typedef struct spa_taskqs { typedef enum spa_all_vdev_zap_action { AVZ_ACTION_NONE = 0, AVZ_ACTION_DESTROY, /* Destroy all per-vdev ZAPs and the AVZ. */ - AVZ_ACTION_REBUILD /* Populate the new AVZ, see spa_avz_rebuild */ + AVZ_ACTION_REBUILD, /* Populate the new AVZ, see spa_avz_rebuild */ + AVZ_ACTION_INITIALIZE } spa_avz_action_t; struct spa { From owner-svn-src-head@freebsd.org Fri Apr 28 02: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 4F32AD542E1; Fri, 28 Apr 2017 02:11:31 +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 0FF5B34D; Fri, 28 Apr 2017 02:11:30 +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 v3S2BUDN091642; Fri, 28 Apr 2017 02:11:30 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3S2BTkO091640; Fri, 28 Apr 2017 02:11:29 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201704280211.v3S2BTkO091640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Fri, 28 Apr 2017 02:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317541 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . 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, 28 Apr 2017 02:11:31 -0000 Author: jpaetzel Date: Fri Apr 28 02:11:29 2017 New Revision: 317541 URL: https://svnweb.freebsd.org/changeset/base/317541 Log: MFV 316905 7740 fix for 6513 only works in hole punching case, not truncation illumos/illumos-gate@7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553 https://github.com/illumos/illumos-gate/commit/7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553 https://www.illumos.org/issues/7740 The problem is that dbuf_findbp will return ENOENT if the block it's trying to find is beyond the end of the file. If that happens, we assume there is no birth time, and so we lose that information when we write out new blkptrs. We should teach dbuf_findbp to look for things that are beyond the current end, but not beyond the absolute end of the file. To verify, create a large file, truncate it to a short length, and then write beyond the end. Check with zdb to make sure that there are no holes with birth time zero (will appear as gaps). Reviewed by: Steve Gonczi Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Apr 28 01:54:01 2017 (r317540) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Apr 28 02:11:29 2017 (r317541) @@ -2161,8 +2161,6 @@ static int dbuf_findbp(dnode_t *dn, int level, uint64_t blkid, int fail_sparse, dmu_buf_impl_t **parentp, blkptr_t **bpp) { - int nlevels, epbs; - *parentp = NULL; *bpp = NULL; @@ -2181,17 +2179,35 @@ dbuf_findbp(dnode_t *dn, int level, uint return (0); } - if (dn->dn_phys->dn_nlevels == 0) - nlevels = 1; - else - nlevels = dn->dn_phys->dn_nlevels; - - epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; + int nlevels = + (dn->dn_phys->dn_nlevels == 0) ? 1 : dn->dn_phys->dn_nlevels; + int epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; ASSERT3U(level * epbs, <, 64); ASSERT(RW_LOCK_HELD(&dn->dn_struct_rwlock)); + /* + * This assertion shouldn't trip as long as the max indirect block size + * is less than 1M. The reason for this is that up to that point, + * the number of levels required to address an entire object with blocks + * of size SPA_MINBLOCKSIZE satisfies nlevels * epbs + 1 <= 64. In + * other words, if N * epbs + 1 > 64, then if (N-1) * epbs + 1 > 55 + * (i.e. we can address the entire object), objects will all use at most + * N-1 levels and the assertion won't overflow. However, once epbs is + * 13, 4 * 13 + 1 = 53, but 5 * 13 + 1 = 66. Then, 4 levels will not be + * enough to address an entire object, so objects will have 5 levels, + * but then this assertion will overflow. + * + * All this is to say that if we ever increase DN_MAX_INDBLKSHIFT, we + * need to redo this logic to handle overflows. + */ + ASSERT(level >= nlevels || + ((nlevels - level - 1) * epbs) + + highbit64(dn->dn_phys->dn_nblkptr) <= 64); if (level >= nlevels || - (blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs)))) { + blkid >= ((uint64_t)dn->dn_phys->dn_nblkptr << + ((nlevels - level - 1) * epbs)) || + (fail_sparse && + blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs)))) { /* the buffer has no parent yet */ return (SET_ERROR(ENOENT)); } else if (level < nlevels-1) { @@ -2209,6 +2225,8 @@ dbuf_findbp(dnode_t *dn, int level, uint } *bpp = ((blkptr_t *)(*parentp)->db.db_data) + (blkid & ((1ULL << epbs) - 1)); + if (blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs))) + ASSERT(BP_IS_HOLE(*bpp)); return (0); } else { /* the block is referenced from the dnode */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Apr 28 01:54:01 2017 (r317540) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Apr 28 02:11:29 2017 (r317541) @@ -58,6 +58,12 @@ extern "C" { */ #define DNODE_SHIFT 9 /* 512 bytes */ #define DN_MIN_INDBLKSHIFT 12 /* 4k */ +/* + * If we ever increase this value beyond 20, we need to revisit all logic that + * does x << level * ebps to handle overflow. With a 1M indirect block size, + * 4 levels of indirect blocks would not be able to guarantee addressing an + * entire object, so 5 levels will be used, but 5 * (20 - 7) = 65. + */ #define DN_MAX_INDBLKSHIFT 17 /* 128k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ From owner-svn-src-head@freebsd.org Fri Apr 28 05:09: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 8E77BD53F02; Fri, 28 Apr 2017 05:09:52 +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 5E6B31B3D; Fri, 28 Apr 2017 05:09:52 +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 v3S59psq063817; Fri, 28 Apr 2017 05:09:51 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3S59pj6063815; Fri, 28 Apr 2017 05:09:51 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704280509.v3S59pj6063815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 28 Apr 2017 05:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317542 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 28 Apr 2017 05:09:52 -0000 Author: glebius Date: Fri Apr 28 05:09:51 2017 New Revision: 317542 URL: https://svnweb.freebsd.org/changeset/base/317542 Log: Make comments match the code. No functional change. Modified: head/usr.sbin/bhyve/pci_fbuf.c head/usr.sbin/bhyve/pci_xhci.c Modified: head/usr.sbin/bhyve/pci_fbuf.c ============================================================================== --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 02:11:29 2017 (r317541) +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:09:51 2017 (r317542) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); * BAR0 points to the current mode information. * BAR1 is the 32-bit framebuffer address. * - * -s ,fbuf,wait,tcp=:port,w=width,h=height + * -s ,fbuf,wait,vga=on|io|off,rfb=:port,w=width,h=height */ static int fbuf_debug = 1; Modified: head/usr.sbin/bhyve/pci_xhci.c ============================================================================== --- head/usr.sbin/bhyve/pci_xhci.c Fri Apr 28 02:11:29 2017 (r317541) +++ head/usr.sbin/bhyve/pci_xhci.c Fri Apr 28 05:09:51 2017 (r317542) @@ -28,7 +28,7 @@ -s ,xhci,{devices} devices: - ums USB tablet mouse + tablet USB tablet mouse */ #include __FBSDID("$FreeBSD$"); From owner-svn-src-head@freebsd.org Fri Apr 28 05:13: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 7E58AD5416F; Fri, 28 Apr 2017 05:13:28 +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 4A2681FC1; Fri, 28 Apr 2017 05:13:28 +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 v3S5DRih067518; Fri, 28 Apr 2017 05:13:27 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3S5DRYU067517; Fri, 28 Apr 2017 05:13:27 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704280513.v3S5DRYU067517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 28 Apr 2017 05:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317543 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 28 Apr 2017 05:13:28 -0000 Author: glebius Date: Fri Apr 28 05:13:27 2017 New Revision: 317543 URL: https://svnweb.freebsd.org/changeset/base/317543 Log: When no "rfb" configuration specified bind to the default VNC port instead of binding to a random one. Modified: head/usr.sbin/bhyve/pci_fbuf.c Modified: head/usr.sbin/bhyve/pci_fbuf.c ============================================================================== --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:09:51 2017 (r317542) +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:13:27 2017 (r317543) @@ -365,6 +365,8 @@ pci_fbuf_init(struct vmctx *ctx, struct sc->fsc_pi = pi; + sc->rfb_port = 5900; + error = pci_fbuf_parse_opts(sc, opts); if (error != 0) goto done; From owner-svn-src-head@freebsd.org Fri Apr 28 05:26: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 969FDD543A7; Fri, 28 Apr 2017 05:26:30 +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 4FA2E7E3; Fri, 28 Apr 2017 05:26:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id v1so3626825pgv.3; Thu, 27 Apr 2017 22:26:30 -0700 (PDT) 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=+EKRDsI70V4LDZDoaDY75p0hUunAbrFZ/MQbMgaOtoM=; b=Urn4YD2MQRARYamg2UVHq3XIfvEi2pTgRxqZNIaWt3ndqKmqZrh8oKMN1X0E0lKyZa 07MRRYMJKj9fIKzxu5yIAan/8PEGHTukqI4QenaxgGlvcw+1G3iUYBnzCks4mHS253ba yM7Vpogqf4j+ZbAgPfr46/ZfNOV5ZX+sCELYbyEjsC7aw1bWBHfcxGPmTVO5SwE/HTp7 Rt7RssTPQuHC0d/J9fqXbS8UqlldiBDeEM9/DBvADVs2phfh6cmZf2fPNaFYWlRm8y33 GR2DUmYLmArEAy2Y9mlDcIJ+nBlF4C6WdeU7d1s/gNAEO4rwHlp3s8tyxxY11UOqjOt9 B/3Q== 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=+EKRDsI70V4LDZDoaDY75p0hUunAbrFZ/MQbMgaOtoM=; b=spMiYgS5jxb98/F5sM10iwcOuxfNafI+BFS8993TMwlQLHszz+jxMJUbx3cSmwA11R xGSRw5LPeQPHVsnWJX22XleDcZjdLeAIxcUYPwOFyrCQr4PLdfMUCCMOwvnX/p0a+bvj Xx9ue9I/Mft5fqwMV6VJ2SxpL59daJ7XzTml1NVPYRDDntgzsLkMtjhb2styM7duye2b hw5Jqzj9qSQuA4vP3dFtHZn+SiQ1bKADJ/Ove9y6sSdbVeG37S7Z6Fmv5/t+U4IMG6iZ +xzZUzg7pfLyQvIaY2dyDcT5BOD9vIyKB1jPxOD8Hh7npEccftR8eLGHBt3oa8wKz7wN ivRQ== X-Gm-Message-State: AN3rC/5IYyOH+VAeYEbmj+AM6SM3dyA7VDK6X9FMXwlgtvGWJCybJ+yt nleD55zxrLTGhoZrld0= X-Received: by 10.84.231.136 with SMTP id g8mr12405198plk.12.1493357189665; Thu, 27 Apr 2017 22:26:29 -0700 (PDT) Received: from [192.168.50.91] (50-251-209-113-static.hfc.comcastbusiness.net. [50.251.209.113]) by smtp.gmail.com with ESMTPSA id m24sm7965836pfi.129.2017.04.27.22.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 22:26:29 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r317543 - head/usr.sbin/bhyve From: Ngie Cooper X-Mailer: iPhone Mail (14E304) In-Reply-To: <201704280513.v3S5DRYU067517@repo.freebsd.org> Date: Thu, 27 Apr 2017 22:26:28 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201704280513.v3S5DRYU067517@repo.freebsd.org> To: Gleb Smirnoff X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 28 Apr 2017 05:26:30 -0000 > On Apr 27, 2017, at 22:13, Gleb Smirnoff wrote: >=20 > Author: glebius > Date: Fri Apr 28 05:13:27 2017 > New Revision: 317543 > URL: https://svnweb.freebsd.org/changeset/base/317543 >=20 > Log: > When no "rfb" configuration specified bind to the default VNC > port instead of binding to a random one. >=20 > Modified: > head/usr.sbin/bhyve/pci_fbuf.c >=20 > Modified: head/usr.sbin/bhyve/pci_fbuf.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:09:51 2017 (r317542= ) > +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:13:27 2017 (r317543= ) > @@ -365,6 +365,8 @@ pci_fbuf_init(struct vmctx *ctx, struct=20 >=20 > sc->fsc_pi =3D pi; >=20 > + sc->rfb_port =3D 5900; > + Wouldn't it be better to use getservbyname? > error =3D pci_fbuf_parse_opts(sc, opts); > if (error !=3D 0) > goto done; >=20 From owner-svn-src-head@freebsd.org Fri Apr 28 05:32: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 250F0D5471C; Fri, 28 Apr 2017 05:32:28 +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 EB3F8E87; Fri, 28 Apr 2017 05:32:27 +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 v3S5WRw7075706; Fri, 28 Apr 2017 05:32:27 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3S5WQ7Z075704; Fri, 28 Apr 2017 05:32:26 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704280532.v3S5WQ7Z075704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 28 Apr 2017 05:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317544 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 28 Apr 2017 05:32:28 -0000 Author: glebius Date: Fri Apr 28 05:32:26 2017 New Revision: 317544 URL: https://svnweb.freebsd.org/changeset/base/317544 Log: - For security reasons by default listen on localhost address, not on wildcard. [1] - Move the default port assignment from pci_fbuf.c to rfb.c, to avoid polluting pci_fbuf.c with network things. Suggested by: grehan Modified: head/usr.sbin/bhyve/pci_fbuf.c head/usr.sbin/bhyve/rfb.c Modified: head/usr.sbin/bhyve/pci_fbuf.c ============================================================================== --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:13:27 2017 (r317543) +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:32:26 2017 (r317544) @@ -365,8 +365,6 @@ pci_fbuf_init(struct vmctx *ctx, struct sc->fsc_pi = pi; - sc->rfb_port = 5900; - error = pci_fbuf_parse_opts(sc, opts); if (error != 0) goto done; Modified: head/usr.sbin/bhyve/rfb.c ============================================================================== --- head/usr.sbin/bhyve/rfb.c Fri Apr 28 05:13:27 2017 (r317543) +++ head/usr.sbin/bhyve/rfb.c Fri Apr 28 05:32:26 2017 (r317544) @@ -897,11 +897,11 @@ rfb_init(char *hostname, int port, int w sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; - sin.sin_port = htons(port); + sin.sin_port = port ? htons(port) : htons(5900); if (hostname && strlen(hostname) > 0) inet_pton(AF_INET, hostname, &(sin.sin_addr)); else - sin.sin_addr.s_addr = htonl(INADDR_ANY); + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); if (bind(rc->sfd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("bind"); From owner-svn-src-head@freebsd.org Fri Apr 28 05:43: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 410E3D549B3; Fri, 28 Apr 2017 05:43:29 +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 EEA201566; Fri, 28 Apr 2017 05:43:28 +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 v3S5hSgi079809; Fri, 28 Apr 2017 05:43:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3S5hSBv079808; Fri, 28 Apr 2017 05:43:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704280543.v3S5hSBv079808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 28 Apr 2017 05:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317545 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 28 Apr 2017 05:43:29 -0000 Author: glebius Date: Fri Apr 28 05:43:27 2017 New Revision: 317545 URL: https://svnweb.freebsd.org/changeset/base/317545 Log: Document raw framebuffer device and XHCI device configurations. Modified: head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Fri Apr 28 05:32:26 2017 (r317544) +++ head/usr.sbin/bhyve/bhyve.8 Fri Apr 28 05:43:27 2017 (r317545) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2017 +.Dd April 27, 2017 .Dt BHYVE 8 .Os .Sh NAME @@ -188,6 +188,10 @@ PCI 16550 serial device. .It Li lpc LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports and a boot ROM. The LPC bridge emulation can only be configured on bus 0. +.It Li fbuf +Raw framebuffer device attached to VNC server. +.It Li xhci +XHCI USB controller. .El .It Op Ar conf This optional parameter describes the backend for device emulations. @@ -299,6 +303,40 @@ resize at present. Emergency write is advertised, but no-op at present. .El .El +.Pp +Raw framebuffer device: +.Pp +.Oo wait Oc Ns Oo ,vga= Ns Ar Oc Oo ,rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar w Oc Ns Oo ,h= Ns Ar h Oc +.Bl -tag -width [vga=on|io|off] +.It wait +Wait for a VNC client connection before booting the virtual machine. +The default is not to wait. +.It vga= Ns Ar on|io|off +Enable VGA emulation. +The default is +.Va io +mode: VGA is enabled, but only I/O ports are available, +no VGA memory is provided. +.It rfb= Ns Oo Ar IP: Oc Ns Ar port +Set the VNC server to listen at +.Va IP:port . +The default is to listen on localhost IPv4 address and default VNC port 5900. +Listening on a IPv6 address is not supported. +.It w= Ns Ar width +Set framebuffer width to +.Ar width . +The default width is 1920. +.It h= Ns Ar height +Set framebuffer height to +.Ar height . +The default height is 1080. +.El +.Pp +XHCI USB controller device: +.Bl -tag +.It Ar tablet +Emulate USB tablet mouse. +.El .El .It Fl S Wire guest memory. From owner-svn-src-head@freebsd.org Fri Apr 28 05:48: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 616F6D54AFA; Fri, 28 Apr 2017 05:48:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B83F175D; Fri, 28 Apr 2017 05:48:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v3S5m8Jv071697 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 27 Apr 2017 22:48:08 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v3S5m8Ti071696; Thu, 27 Apr 2017 22:48:08 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 27 Apr 2017 22:48:08 -0700 From: Gleb Smirnoff To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317543 - head/usr.sbin/bhyve Message-ID: <20170428054808.GV56922@FreeBSD.org> References: <201704280513.v3S5DRYU067517@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-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: Fri, 28 Apr 2017 05:48:10 -0000 On Thu, Apr 27, 2017 at 10:26:28PM -0700, Ngie Cooper wrote: N> > Author: glebius N> > Date: Fri Apr 28 05:13:27 2017 N> > New Revision: 317543 N> > URL: https://svnweb.freebsd.org/changeset/base/317543 N> > N> > Log: N> > When no "rfb" configuration specified bind to the default VNC N> > port instead of binding to a random one. N> > N> > Modified: N> > head/usr.sbin/bhyve/pci_fbuf.c N> > N> > Modified: head/usr.sbin/bhyve/pci_fbuf.c N> > ============================================================================== N> > --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:09:51 2017 (r317542) N> > +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:13:27 2017 (r317543) N> > @@ -365,6 +365,8 @@ pci_fbuf_init(struct vmctx *ctx, struct N> > N> > sc->fsc_pi = pi; N> > N> > + sc->rfb_port = 5900; N> > + N> N> Wouldn't it be better to use getservbyname? I decided to follow the KISS principle here. We are going to resolve only one constant name always, so running all the machinery around getservbyname seems overkill to me. If we had ability to specify non-default ports by name in the bhyve command line, then it would make sense to run getservbyname. On the other hand there is no good point in adding such ability to bhyve. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Fri Apr 28 09:17: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 84085D53558; Fri, 28 Apr 2017 09:17:17 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53DA21E7F; Fri, 28 Apr 2017 09:17:17 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3S9HGKZ064734; Fri, 28 Apr 2017 09:17:16 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3S9HGLU064733; Fri, 28 Apr 2017 09:17:16 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201704280917.v3S9HGLU064733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Fri, 28 Apr 2017 09:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317546 - head/usr.sbin/tcpdrop 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, 28 Apr 2017 09:17:17 -0000 Author: maxim Date: Fri Apr 28 09:17:16 2017 New Revision: 317546 URL: https://svnweb.freebsd.org/changeset/base/317546 Log: o Clean the whole array of IPv4 addresses not just a local part. PR: 218923 Submitted by: Daniel McRobb Modified: head/usr.sbin/tcpdrop/tcpdrop.c Modified: head/usr.sbin/tcpdrop/tcpdrop.c ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.c Fri Apr 28 05:43:27 2017 (r317545) +++ head/usr.sbin/tcpdrop/tcpdrop.c Fri Apr 28 09:17:16 2017 (r317546) @@ -321,7 +321,7 @@ tcpdropconn(const struct in_conninfo *in sizeof inc->inc6_faddr); foreign = (struct sockaddr *)&sin6[TCPDROP_FOREIGN]; } else { - memset(&sin4[TCPDROP_LOCAL], 0, sizeof sin4[TCPDROP_LOCAL]); + memset(sin4, 0, sizeof sin4); sin4[TCPDROP_LOCAL].sin_len = sizeof sin4[TCPDROP_LOCAL]; sin4[TCPDROP_LOCAL].sin_family = AF_INET; From owner-svn-src-head@freebsd.org Fri Apr 28 11:01: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 0FBE7D537EA; Fri, 28 Apr 2017 11:01:00 +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 C58AF1070; Fri, 28 Apr 2017 11:00:59 +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 v3SB0wKR005697; Fri, 28 Apr 2017 11:00:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SB0wgY005696; Fri, 28 Apr 2017 11:00:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704281100.v3SB0wgY005696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 28 Apr 2017 11:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317547 - 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, 28 Apr 2017 11:01:00 -0000 Author: mav Date: Fri Apr 28 11:00:58 2017 New Revision: 317547 URL: https://svnweb.freebsd.org/changeset/base/317547 Log: Allow some control over enabled capabilities for if_vlan. It improves interoperability with if_bridge, which may need to disable some capabilities not supported by other members. IMHO there is still open question about LRO capability, which may need to be disabled on physical interface. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Fri Apr 28 09:17:16 2017 (r317546) +++ head/sys/net/if_vlan.c Fri Apr 28 11:00:58 2017 (r317547) @@ -113,6 +113,7 @@ struct ifvlan { #define PARENT(ifv) ((ifv)->ifv_trunk->parent) void *ifv_cookie; int ifv_pflags; /* special flags we have set on parent */ + int ifv_capenable; struct ifv_linkmib { int ifvm_encaplen; /* encapsulation length */ int ifvm_mtufudge; /* MTU fudged by this much */ @@ -1294,6 +1295,7 @@ exists: ifv->ifv_encaplen = ETHER_VLAN_ENCAP_LEN; ifv->ifv_mintu = ETHERMIN; ifv->ifv_pflags = 0; + ifv->ifv_capenable = -1; /* * If the parent supports the VLAN_MTU capability, @@ -1545,9 +1547,14 @@ vlan_capabilities(struct ifvlan *ifv) struct ifnet *p = PARENT(ifv); struct ifnet *ifp = ifv->ifv_ifp; struct ifnet_hw_tsomax hw_tsomax; + int cap = 0, ena = 0, mena; + u_long hwa = 0; TRUNK_LOCK_ASSERT(TRUNK(ifv)); + /* Mask parent interface enabled capabilities disabled by user. */ + mena = p->if_capenable & ifv->ifv_capenable; + /* * If the parent interface can do checksum offloading * on VLANs, then propagate its hardware-assisted @@ -1555,20 +1562,18 @@ vlan_capabilities(struct ifvlan *ifv) * offloading requires hardware VLAN tagging. */ if (p->if_capabilities & IFCAP_VLAN_HWCSUM) - ifp->if_capabilities = - p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); - + cap |= p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); if (p->if_capenable & IFCAP_VLAN_HWCSUM && p->if_capenable & IFCAP_VLAN_HWTAGGING) { - ifp->if_capenable = - p->if_capenable & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); - ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | - CSUM_UDP | CSUM_SCTP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | - CSUM_SCTP_IPV6); - } else { - ifp->if_capenable = 0; - ifp->if_hwassist = 0; + ena |= mena & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); + if (ena & IFCAP_TXCSUM) + hwa |= p->if_hwassist & (CSUM_IP | CSUM_TCP | + CSUM_UDP | CSUM_SCTP); + if (ena & IFCAP_TXCSUM_IPV6) + hwa |= p->if_hwassist & (CSUM_TCP_IPV6 | + CSUM_UDP_IPV6 | CSUM_SCTP_IPV6); } + /* * If the parent interface can do TSO on VLANs then * propagate the hardware-assisted flag. TSO on VLANs @@ -1578,13 +1583,11 @@ vlan_capabilities(struct ifvlan *ifv) if_hw_tsomax_common(p, &hw_tsomax); if_hw_tsomax_update(ifp, &hw_tsomax); if (p->if_capabilities & IFCAP_VLAN_HWTSO) - ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; + cap |= p->if_capabilities & IFCAP_TSO; if (p->if_capenable & IFCAP_VLAN_HWTSO) { - ifp->if_capenable |= p->if_capenable & IFCAP_TSO; - ifp->if_hwassist |= p->if_hwassist & CSUM_TSO; - } else { - ifp->if_capenable &= ~(p->if_capenable & IFCAP_TSO); - ifp->if_hwassist &= ~(p->if_hwassist & CSUM_TSO); + ena |= mena & IFCAP_TSO; + if (ena & IFCAP_TSO) + hwa |= p->if_hwassist & CSUM_TSO; } /* @@ -1597,20 +1600,31 @@ vlan_capabilities(struct ifvlan *ifv) */ #define IFCAP_VLAN_TOE IFCAP_TOE if (p->if_capabilities & IFCAP_VLAN_TOE) - ifp->if_capabilities |= p->if_capabilities & IFCAP_TOE; + cap |= p->if_capabilities & IFCAP_TOE; if (p->if_capenable & IFCAP_VLAN_TOE) { TOEDEV(ifp) = TOEDEV(p); - ifp->if_capenable |= p->if_capenable & IFCAP_TOE; + ena |= mena & IFCAP_TOE; } + /* + * If the parent interface supports dynamic link state, so does the + * VLAN interface. + */ + cap |= (p->if_capabilities & IFCAP_LINKSTATE); + ena |= (mena & IFCAP_LINKSTATE); + #ifdef RATELIMIT /* * If the parent interface supports ratelimiting, so does the * VLAN interface. */ - ifp->if_capabilities |= (p->if_capabilities & IFCAP_TXRTLMT); - ifp->if_capenable |= (p->if_capenable & IFCAP_TXRTLMT); + cap |= (p->if_capabilities & IFCAP_TXRTLMT); + ena |= (mena & IFCAP_TXRTLMT); #endif + + ifp->if_capabilities = cap; + ifp->if_capenable = ena; + ifp->if_hwassist = hwa; } static void @@ -1814,6 +1828,18 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd vlan_tag_recalculate(ifv); break; + case SIOCSIFCAP: + VLAN_LOCK(); + ifv->ifv_capenable = ifr->ifr_reqcap; + trunk = TRUNK(ifv); + if (trunk != NULL) { + TRUNK_LOCK(trunk); + vlan_capabilities(ifv); + TRUNK_UNLOCK(trunk); + } + VLAN_UNLOCK(); + break; + default: error = EINVAL; break; From owner-svn-src-head@freebsd.org Fri Apr 28 15:38: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 9AB29D54CA8; Fri, 28 Apr 2017 15:38:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B0221FC; Fri, 28 Apr 2017 15:38:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3SFcY3t020595; Fri, 28 Apr 2017 15:38:34 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SFcY6v020594; Fri, 28 Apr 2017 15:38:34 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704281538.v3SFcY6v020594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 28 Apr 2017 15:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317558 - 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: Fri, 28 Apr 2017 15:38:35 -0000 Author: tuexen Date: Fri Apr 28 15:38:34 2017 New Revision: 317558 URL: https://svnweb.freebsd.org/changeset/base/317558 Log: Set the DF bit for responses to out-of-the-blue packets. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Apr 28 15:15:26 2017 (r317557) +++ head/sys/netinet/sctp_output.c Fri Apr 28 15:38:34 2017 (r317558) @@ -11147,7 +11147,7 @@ sctp_send_resp_msg(struct sockaddr *src, ip->ip_v = IPVERSION; ip->ip_hl = (sizeof(struct ip) >> 2); ip->ip_tos = 0; - ip->ip_off = 0; + ip->ip_off = htons(IP_DF); ip_fillid(ip); ip->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { From owner-svn-src-head@freebsd.org Fri Apr 28 16:16: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 28D4ED54ADD; Fri, 28 Apr 2017 16:16:24 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4FAE1A63; Fri, 28 Apr 2017 16:16:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3SGGMXM036816; Fri, 28 Apr 2017 16:16:22 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SGGMH5036815; Fri, 28 Apr 2017 16:16:22 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201704281616.v3SGGMH5036815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 28 Apr 2017 16:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317559 - head/bin/sh 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, 28 Apr 2017 16:16:24 -0000 Author: jilles Date: Fri Apr 28 16:16:22 2017 New Revision: 317559 URL: https://svnweb.freebsd.org/changeset/base/317559 Log: sh: Simplify handling of newlines in command substitution. Unless we need to split on newlines, just append them as normal and remove them at the end. Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Fri Apr 28 15:38:34 2017 (r317558) +++ head/bin/sh/expand.c Fri Apr 28 16:16:22 2017 (r317559) @@ -462,6 +462,7 @@ expbackq(union node *cmd, int quoted, in int quotes = flag & (EXP_GLOB | EXP_CASE); size_t nnl; const char *ifs; + int startloc; INTOFF; p = grabstackstr(dest); @@ -469,6 +470,7 @@ expbackq(union node *cmd, int quoted, in ungrabstackstr(p, dest); p = in.buf; + startloc = dest - stackblock(); nnl = 0; if (!quoted && flag & EXP_SPLIT) ifs = ifsset() ? ifsval() : " \t\n"; @@ -490,31 +492,24 @@ expbackq(union node *cmd, int quoted, in lastc = *p++; if (lastc == '\0') continue; - if (lastc == '\n') { - nnl++; - } else { - if (nnl > 0) { - if (strchr(ifs, '\n') != NULL) { - NEXTWORD('\n', flag, dest, dst); - nnl = 0; - } else { - CHECKSTRSPACE(nnl + 2, dest); - while (nnl > 0) { - nnl--; - USTPUTC('\n', dest); - } - } - } - if (strchr(ifs, lastc) != NULL) + if (nnl > 0 && lastc != '\n') { + NEXTWORD('\n', flag, dest, dst); + nnl = 0; + } + if (strchr(ifs, lastc) != NULL) { + if (lastc == '\n') + nnl++; + else NEXTWORD(lastc, flag, dest, dst); - else { - CHECKSTRSPACE(2, dest); - if (quotes && syntax[(int)lastc] == CCTL) - USTPUTC(CTLESC, dest); - USTPUTC(lastc, dest); - } + } else { + CHECKSTRSPACE(2, dest); + if (quotes && syntax[(int)lastc] == CCTL) + USTPUTC(CTLESC, dest); + USTPUTC(lastc, dest); } } + while (dest > stackblock() + startloc && STTOPC(dest) == '\n') + STUNPUTC(dest); if (in.fd >= 0) close(in.fd); From owner-svn-src-head@freebsd.org Fri Apr 28 16:23: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 B19D9D54D01; Fri, 28 Apr 2017 16:23:24 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 351FB1F15; Fri, 28 Apr 2017 16:23:24 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: by mail-lf0-x22a.google.com with SMTP id 88so36718202lfr.0; Fri, 28 Apr 2017 09:23:24 -0700 (PDT) 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=okPsjWD7cRHV4iN0uozH90p6KzpOf01TQu/5c8YRFdk=; b=gfxuR/1qCkgcklMkcDJdEbeQLwDtFzshtou4av4eTti9geb3TURR9F0T45InkxsE15 0204Q+0VCZ8an/ifrxK1QntFmt80VJgGZrNYFEc1Jn9tWpLVi5LP/S6jceLlVXfetn1m gjF/sZjq25jsSv7tnwHHgNbLohwLfzulKbm3ImymyvcVl+lVkN8H2Yeiqn7hG1SKIh+C RF1WKXcZAEjL/f19Z2CV9v1EUfSk50EVsJvWG8D4VxQ/UNyvvj+uG/qvGJhCjCUUB0Sg MSeEDDDtsj7Y9vHKPye1kKfuXO+Ey3X1CHuhwHwDe4vJmfjXhyjLXy4lQoczHuAtTkku ao9w== 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=okPsjWD7cRHV4iN0uozH90p6KzpOf01TQu/5c8YRFdk=; b=boUAITnIhMLzNT+tpGxR71aKswh8k5/nVgt55pNhRcbG1IBQGLClSShDhI5eLEz88O ExsdVsSLiK9gqPIJnpcbLO1ZyAaCigMziyJ5LnkHgyKjpmr1TXS35/v9vRtAgDvJTuZC e/69oEEqFcVLuG53P4+c1D05uq+Hn31NFHcQgPUulC/XnOWfVmi4wuVoQytcMW5Fq30Y uP0//ECw9XXNjupvDCaI/Tsinq3bnj7pTWCNIJ8pqkDzUS+4iJ9Gn1lXZq/UBdc911Uw 8hLCAt/BR6VXu7R5eveMZhRpIwLB63kcGrazkDWrVwnbO9Fe2cmv4I0bVhqyNvuj4d/j nR7Q== X-Gm-Message-State: AN3rC/7NGcv8+s+LWR0IXwocoY3xM96vHBVFKilM8NZeYuOk3+hl2Uoc Tthu+yOhbCouLelD X-Received: by 10.25.233.70 with SMTP id g67mr4210298lfh.131.1493396600676; Fri, 28 Apr 2017 09:23:20 -0700 (PDT) Received: from kloomba ([213.147.204.216]) by smtp.gmail.com with ESMTPSA id 25sm1134749lfu.52.2017.04.28.09.23.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Apr 2017 09:23:20 -0700 (PDT) Date: Fri, 28 Apr 2017 20:23:16 +0400 From: Roman Bogorodskiy To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317545 - head/usr.sbin/bhyve Message-ID: <20170428162314.GB5196@kloomba> References: <201704280543.v3S5hSBv079808@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tsOsTdHNUZQcU9Ye" Content-Disposition: inline In-Reply-To: <201704280543.v3S5hSBv079808@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: Fri, 28 Apr 2017 16:23:24 -0000 --tsOsTdHNUZQcU9Ye Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Gleb Smirnoff wrote: > Author: glebius > Date: Fri Apr 28 05:43:27 2017 > New Revision: 317545 > URL: https://svnweb.freebsd.org/changeset/base/317545 >=20 > Log: > Document raw framebuffer device and XHCI device configurations. Thanks for abandoning my work https://reviews.freebsd.org/D10014 (a link they I gave when you were talking about manpage stuff on #bhyve). You might want to pull some additional bits from that patch though. > Modified: > head/usr.sbin/bhyve/bhyve.8 >=20 > Modified: head/usr.sbin/bhyve/bhyve.8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/bhyve/bhyve.8 Fri Apr 28 05:32:26 2017 (r317544) > +++ head/usr.sbin/bhyve/bhyve.8 Fri Apr 28 05:43:27 2017 (r317545) > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd February 27, 2017 > +.Dd April 27, 2017 > .Dt BHYVE 8 > .Os > .Sh NAME > @@ -188,6 +188,10 @@ PCI 16550 serial device. > .It Li lpc > LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports and a boot ROM. > The LPC bridge emulation can only be configured on bus 0. > +.It Li fbuf > +Raw framebuffer device attached to VNC server. > +.It Li xhci > +XHCI USB controller. > .El > .It Op Ar conf > This optional parameter describes the backend for device emulations. > @@ -299,6 +303,40 @@ resize at present. > Emergency write is advertised, but no-op at present. > .El > .El > +.Pp > +Raw framebuffer device: > +.Pp > +.Oo wait Oc Ns Oo ,vga=3D Ns Ar Oc Oo ,rfb=3D Ns Oo Ar IP: O= c Ns Ar port Oc Ns Oo ,w=3D Ns Ar w Oc Ns Oo ,h=3D Ns Ar h Oc > +.Bl -tag -width [vga=3Don|io|off] > +.It wait > +Wait for a VNC client connection before booting the virtual machine. > +The default is not to wait. > +.It vga=3D Ns Ar on|io|off > +Enable VGA emulation. > +The default is > +.Va io > +mode: VGA is enabled, but only I/O ports are available, > +no VGA memory is provided. > +.It rfb=3D Ns Oo Ar IP: Oc Ns Ar port > +Set the VNC server to listen at > +.Va IP:port . > +The default is to listen on localhost IPv4 address and default VNC port = 5900. > +Listening on a IPv6 address is not supported. > +.It w=3D Ns Ar width > +Set framebuffer width to > +.Ar width . > +The default width is 1920. > +.It h=3D Ns Ar height > +Set framebuffer height to > +.Ar height . > +The default height is 1080. > +.El > +.Pp > +XHCI USB controller device: > +.Bl -tag > +.It Ar tablet > +Emulate USB tablet mouse. > +.El > .El > .It Fl S > Wire guest memory. > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Roman Bogorodskiy --tsOsTdHNUZQcU9Ye Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJZA2xyAAoJEMltX/4IwiJqKu0IALv1apkVx2Yp9xzU4IcvY0tN qCxyQI1YW5cGszFanMf3UZKng043bz2ED4s0cN9oY2B7O7eVssCIifIjpVd9ySB7 WCCnkNJbg43AZ2302jf92jCXZkJDBsT2EPgrB1kt8wh/BeLl5fZq4vUMikxZGcfi DVPvmIyZHzaoCJDWmy+DEX4gjAzYexgyZYkq+8KE9V2xywzO8kysaXBk9aXS3sgz SrmroRxHGk/bXHqHpkMTJz76jULjCC3gF3zBX90hnr+ZuM1IyIYoTOvlaYQqiluT 7kQgQ2wVxSHznbCdh/JlnkZa25+EVXqQRzd0rNKTRabHeqPWzHqQunSITzoEDms= =oRAm -----END PGP SIGNATURE----- --tsOsTdHNUZQcU9Ye-- From owner-svn-src-head@freebsd.org Fri Apr 28 16:39: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 6B8DDD54328; Fri, 28 Apr 2017 16:39:10 +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 33E4F999; Fri, 28 Apr 2017 16:39:10 +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 v3SGd9EN044865; Fri, 28 Apr 2017 16:39:09 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SGd9RL044864; Fri, 28 Apr 2017 16:39:09 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201704281639.v3SGd9RL044864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 28 Apr 2017 16:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317560 - head/sys/dev/vt 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, 28 Apr 2017 16:39:10 -0000 Author: jkim Date: Fri Apr 28 16:39:09 2017 New Revision: 317560 URL: https://svnweb.freebsd.org/changeset/base/317560 Log: Fix end coordinate of the drawable area of border. Although the name tr_end suggests it is the end coordinate, tr_end.tp_row is width and tr_end.tp_col is height of the drawable area in reality. PR: 202288 Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Apr 28 16:16:22 2017 (r317559) +++ head/sys/dev/vt/vt_core.c Fri Apr 28 16:39:09 2017 (r317560) @@ -1161,18 +1161,18 @@ vt_set_border(struct vt_window *vw, term for (x = 0; x < vd->vd_width; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); - for (y = vda->tr_begin.tp_row; y <= vda->tr_end.tp_row; y++) { + for (y = vda->tr_begin.tp_row; y < vda->tr_end.tp_row; y++) { /* Left bar. */ for (x = 0; x < vda->tr_begin.tp_col; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); /* Right bar. */ - for (x = vda->tr_end.tp_col + 1; x < vd->vd_width; x++) + for (x = vda->tr_end.tp_col; x < vd->vd_width; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); } /* Bottom bar. */ - for (y = vda->tr_end.tp_row + 1; y < vd->vd_height; y++) + for (y = vda->tr_end.tp_row; y < vd->vd_height; y++) for (x = 0; x < vd->vd_width; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); } From owner-svn-src-head@freebsd.org Fri Apr 28 16:42: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 11FF1D54563; Fri, 28 Apr 2017 16:42:54 +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 BDC18E53; Fri, 28 Apr 2017 16:42: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 v3SGgqYn048541; Fri, 28 Apr 2017 16:42:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SGgqE2048540; Fri, 28 Apr 2017 16:42:52 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201704281642.v3SGgqE2048540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 28 Apr 2017 16:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317561 - head/sys/dev/vt 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, 28 Apr 2017 16:42:54 -0000 Author: jkim Date: Fri Apr 28 16:42:52 2017 New Revision: 317561 URL: https://svnweb.freebsd.org/changeset/base/317561 Log: Simplify the code a bit. No functional change. Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Apr 28 16:39:09 2017 (r317560) +++ head/sys/dev/vt/vt_core.c Fri Apr 28 16:42:52 2017 (r317561) @@ -1150,29 +1150,28 @@ vt_mark_mouse_position_as_dirty(struct v #endif static void -vt_set_border(struct vt_window *vw, term_color_t c) +vt_set_border(struct vt_device *vd, term_color_t c) { - struct vt_device *vd = vw->vw_device; - term_rect_t *vda = &vw->vw_draw_area; + term_rect_t *tarea = &vd->vd_curwindow->vw_draw_area; int x, y; /* Top bar. */ - for (y = 0; y < vda->tr_begin.tp_row; y++) + for (y = 0; y < tarea->tr_begin.tp_row; y++) for (x = 0; x < vd->vd_width; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); - for (y = vda->tr_begin.tp_row; y < vda->tr_end.tp_row; y++) { + for (y = tarea->tr_begin.tp_row; y < tarea->tr_end.tp_row; y++) { /* Left bar. */ - for (x = 0; x < vda->tr_begin.tp_col; x++) + for (x = 0; x < tarea->tr_begin.tp_col; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); /* Right bar. */ - for (x = vda->tr_end.tp_col; x < vd->vd_width; x++) + for (x = tarea->tr_end.tp_col; x < vd->vd_width; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); } /* Bottom bar. */ - for (y = vda->tr_end.tp_row; y < vd->vd_height; y++) + for (y = tarea->tr_end.tp_row; y < vd->vd_height; y++) for (x = 0; x < vd->vd_width; x++) vd->vd_driver->vd_setpixel(vd, x, y, c); } @@ -1242,7 +1241,7 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_INVALID) { vd->vd_flags &= ~VDF_INVALID; - vt_set_border(vw, TC_BLACK); + vt_set_border(vd, TC_BLACK); vt_termrect(vd, vf, &tarea); if (vt_draw_logo_cpus) vtterm_draw_cpu_logos(vd); From owner-svn-src-head@freebsd.org Fri Apr 28 17:58: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 6DB37D54AC3; Fri, 28 Apr 2017 17:58:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F65F1D32; Fri, 28 Apr 2017 17:58:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3SHwG7h077210; Fri, 28 Apr 2017 17:58:16 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SHwG0n077209; Fri, 28 Apr 2017 17:58:16 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704281758.v3SHwG0n077209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 28 Apr 2017 17:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317566 - head/tests/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, 28 Apr 2017 17:58:17 -0000 Author: brooks Date: Fri Apr 28 17:58:15 2017 New Revision: 317566 URL: https://svnweb.freebsd.org/changeset/base/317566 Log: Don't pass size_t arguments to setsockopt(SO_SNDBUF/SO_RCVBUF). These command take an int. The tests work by accident on little-endian, 64-bit systems. PR: 218919 Tested with: qemu-cheri and CheriBSD built for mips64 Reviewed by: asomers, ngie Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10518 Modified: head/tests/sys/kern/unix_seqpacket_test.c Modified: head/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- head/tests/sys/kern/unix_seqpacket_test.c Fri Apr 28 17:57:07 2017 (r317565) +++ head/tests/sys/kern/unix_seqpacket_test.c Fri Apr 28 17:58:15 2017 (r317566) @@ -127,7 +127,7 @@ shutdown_send_sigpipe_handler(int __unus * Parameterized test function bodies */ static void -test_eagain(size_t sndbufsize, size_t rcvbufsize) +test_eagain(int sndbufsize, int rcvbufsize) { int i; int sv[2]; @@ -165,7 +165,7 @@ test_eagain(size_t sndbufsize, size_t rc } static void -test_sendrecv_symmetric_buffers(size_t bufsize, int blocking) { +test_sendrecv_symmetric_buffers(int bufsize, int blocking) { int s; int sv[2]; const ssize_t pktsize = bufsize / 2; @@ -209,7 +209,7 @@ test_sendrecv_symmetric_buffers(size_t b } static void -test_pipe_simulator(size_t sndbufsize, size_t rcvbufsize) +test_pipe_simulator(int sndbufsize, int rcvbufsize) { int num_sent, num_received; int sv[2]; @@ -341,7 +341,7 @@ test_pipe_reader(void* args) static void -test_pipe(size_t sndbufsize, size_t rcvbufsize) +test_pipe(int sndbufsize, int rcvbufsize) { test_pipe_thread_data_t writer_data, reader_data; pthread_t writer, reader; @@ -875,8 +875,8 @@ ATF_TC_WITHOUT_HEAD(emsgsize); ATF_TC_BODY(emsgsize, tc) { int sv[2]; - const size_t sndbufsize = 8192; - const size_t rcvbufsize = 8192; + const int sndbufsize = 8192; + const int rcvbufsize = 8192; const size_t pktsize = (sndbufsize + rcvbufsize) * 2; char sndbuf[pktsize]; ssize_t ssize; @@ -904,8 +904,8 @@ ATF_TC_WITHOUT_HEAD(emsgsize_nonblocking ATF_TC_BODY(emsgsize_nonblocking, tc) { int sv[2]; - const size_t sndbufsize = 8192; - const size_t rcvbufsize = 8192; + const int sndbufsize = 8192; + const int rcvbufsize = 8192; const size_t pktsize = (sndbufsize + rcvbufsize) * 2; char sndbuf[pktsize]; ssize_t ssize; @@ -962,8 +962,8 @@ ATF_TC_BODY(rcvbuf_oversized, tc) int i; int sv[2]; const ssize_t pktsize = 1024; - const size_t sndbufsize = 8192; - const size_t rcvbufsize = 131072; + const int sndbufsize = 8192; + const int rcvbufsize = 131072; const size_t geometric_mean_bufsize = 32768; const int numpkts = geometric_mean_bufsize / pktsize; char sndbuf[pktsize]; From owner-svn-src-head@freebsd.org Fri Apr 28 18:25: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 EE4C7D536F4; Fri, 28 Apr 2017 18:25:11 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B019A21B; Fri, 28 Apr 2017 18:25:11 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3SIPAkw089577; Fri, 28 Apr 2017 18:25:10 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SIPAnU089576; Fri, 28 Apr 2017 18:25:10 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704281825.v3SIPAnU089576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 28 Apr 2017 18:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317567 - head/sys/x86/x86 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, 28 Apr 2017 18:25:12 -0000 Author: cem Date: Fri Apr 28 18:25:10 2017 New Revision: 317567 URL: https://svnweb.freebsd.org/changeset/base/317567 Log: x86 MCA: Fix a deadlock in MCA exception processing In exceptional circumstances, an MCA exception will trigger when the freelist is exhausted. In such a case, no error will be logged on the list and 'mca_count' will not be incremented. Prior to this patch, all CPUs that received the exception would spin forever. With this change, the CPU that detects the error but finds the freelist empty will proceed to panic the machine, ending the deadlock. A follow-up to r260457. Reported by: Ryan Libby Reviewed by: jhb@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10536 Modified: head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Fri Apr 28 17:58:15 2017 (r317566) +++ head/sys/x86/x86/mca.c Fri Apr 28 18:25:10 2017 (r317567) @@ -653,7 +653,7 @@ amd_thresholding_update(enum scan_mode m * count of the number of valid MC records found. */ static int -mca_scan(enum scan_mode mode) +mca_scan(enum scan_mode mode, int *recoverablep) { struct mca_record rec; uint64_t mcg_cap, ucmask; @@ -704,7 +704,9 @@ mca_scan(enum scan_mode mode) } if (mode == POLLED) mca_fill_freelist(); - return (mode == MCE ? recoverable : count); + if (recoverablep != NULL) + *recoverablep = recoverable; + return (count); } /* @@ -726,7 +728,7 @@ mca_scan_cpus(void *context, int pending CPU_FOREACH(cpu) { sched_bind(td, cpu); thread_unlock(td); - count += mca_scan(POLLED); + count += mca_scan(POLLED, NULL); thread_lock(td); sched_unbind(td); } @@ -1150,7 +1152,7 @@ void mca_intr(void) { uint64_t mcg_status; - int old_count, recoverable; + int recoverable, count; if (!(cpu_feature & CPUID_MCA)) { /* @@ -1164,20 +1166,18 @@ mca_intr(void) } /* Scan the banks and check for any non-recoverable errors. */ - old_count = mca_count; - recoverable = mca_scan(MCE); + count = mca_scan(MCE, &recoverable); mcg_status = rdmsr(MSR_MCG_STATUS); if (!(mcg_status & MCG_STATUS_RIPV)) recoverable = 0; if (!recoverable) { /* - * Wait for at least one error to be logged before - * panic'ing. Some errors will assert a machine check - * on all CPUs, but only certain CPUs will find a valid - * bank to log. + * Only panic if the error was detected local to this CPU. + * Some errors will assert a machine check on all CPUs, but + * only certain CPUs will find a valid bank to log. */ - while (mca_count == old_count) + while (count == 0) cpu_spinwait(); panic("Unrecoverable machine check exception"); @@ -1199,7 +1199,7 @@ cmc_intr(void) * Serialize MCA bank scanning to prevent collisions from * sibling threads. */ - count = mca_scan(CMCI); + count = mca_scan(CMCI, NULL); /* If we found anything, log them to the console. */ if (count != 0) { From owner-svn-src-head@freebsd.org Fri Apr 28 19:38: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 82E46D542CE; Fri, 28 Apr 2017 19:38:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4485A1F5F; Fri, 28 Apr 2017 19:38:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3SJcvea018465; Fri, 28 Apr 2017 19:38:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SJcvmh018464; Fri, 28 Apr 2017 19:38:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201704281938.v3SJcvmh018464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 28 Apr 2017 19:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317568 - head/sys/dev/mlx5/mlx5_en 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, 28 Apr 2017 19:38:58 -0000 Author: hselasky Date: Fri Apr 28 19:38:57 2017 New Revision: 317568 URL: https://svnweb.freebsd.org/changeset/base/317568 Log: Improve sysadmin visibility of physical port error counters in the mlx5en driver. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Apr 28 18:25:10 2017 (r317567) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Apr 28 19:38:57 2017 (r317568) @@ -542,19 +542,33 @@ mlx5e_update_stats_work(struct work_stru s->tx_csum_offload = s->tx_packets - tx_offload_none; s->rx_csum_good = s->rx_packets - s->rx_csum_none; - /* Update per port counters */ + /* Get physical port counters */ mlx5e_update_pport_counters(priv); #if (__FreeBSD_version < 1100000) /* no get_counters interface in fbsd 10 */ ifp->if_ipackets = s->rx_packets; - ifp->if_ierrors = s->rx_error_packets; + ifp->if_ierrors = s->rx_error_packets + + priv->stats.pport.alignment_err + + priv->stats.pport.check_seq_err + + priv->stats.pport.crc_align_errors + + priv->stats.pport.drop_events + + priv->stats.pport.in_range_len_errors + + priv->stats.pport.jabbers + + priv->stats.pport.out_of_range_len + + priv->stats.pport.oversize_pkts + + priv->stats.pport.symbol_err + + priv->stats.pport.too_long_errors + + priv->stats.pport.undersize_pkts + + priv->stats.pport.unsupported_op_rx; ifp->if_iqdrops = s->rx_out_of_buffer; ifp->if_opackets = s->tx_packets; ifp->if_oerrors = s->tx_error_packets; ifp->if_snd.ifq_drops = s->tx_queue_dropped; ifp->if_ibytes = s->rx_bytes; ifp->if_obytes = s->tx_bytes; + ifp->if_collisions = + priv->stats.pport.collisions; #endif free_out: @@ -2449,7 +2463,19 @@ mlx5e_get_counter(struct ifnet *ifp, ift retval = priv->stats.vport.rx_packets; break; case IFCOUNTER_IERRORS: - retval = priv->stats.vport.rx_error_packets; + retval = priv->stats.vport.rx_error_packets + + priv->stats.pport.alignment_err + + priv->stats.pport.check_seq_err + + priv->stats.pport.crc_align_errors + + priv->stats.pport.drop_events + + priv->stats.pport.in_range_len_errors + + priv->stats.pport.jabbers + + priv->stats.pport.out_of_range_len + + priv->stats.pport.oversize_pkts + + priv->stats.pport.symbol_err + + priv->stats.pport.too_long_errors + + priv->stats.pport.undersize_pkts + + priv->stats.pport.unsupported_op_rx; break; case IFCOUNTER_IQDROPS: retval = priv->stats.vport.rx_out_of_buffer; @@ -2475,6 +2501,9 @@ mlx5e_get_counter(struct ifnet *ifp, ift case IFCOUNTER_OQDROPS: retval = priv->stats.vport.tx_queue_dropped; break; + case IFCOUNTER_COLLISIONS: + retval = priv->stats.pport.collisions; + break; default: retval = if_get_counter_default(ifp, cnt); break; From owner-svn-src-head@freebsd.org Fri Apr 28 21: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 40C51D55300; Fri, 28 Apr 2017 21:05:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 108BD10A3; Fri, 28 Apr 2017 21:05:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3SL5TXn061012; Fri, 28 Apr 2017 21:05:29 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SL5ToR061011; Fri, 28 Apr 2017 21:05:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704282105.v3SL5ToR061011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 28 Apr 2017 21:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317570 - head/lib/libedit 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, 28 Apr 2017 21:05:30 -0000 Author: cem Date: Fri Apr 28 21:05:28 2017 New Revision: 317570 URL: https://svnweb.freebsd.org/changeset/base/317570 Log: editline.3: Add missing argument to H_SET description The H_SET operation of the history() function takes an int argument which is the position of the item to which the cursor should be moved to. Submitted by: Abhinav Upadhyay Modified: head/lib/libedit/editline.3 Modified: head/lib/libedit/editline.3 ============================================================================== --- head/lib/libedit/editline.3 Fri Apr 28 20:51:18 2017 (r317569) +++ head/lib/libedit/editline.3 Fri Apr 28 21:05:28 2017 (r317570) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2016 +.Dd April 28, 2017 .Dt EDITLINE 3 .Os .Sh NAME @@ -767,7 +767,7 @@ Return the previous element in the histo Return the next element in the history. .It Dv H_CURR Return the current element in the history. -.It Dv H_SET +.It Dv H_SET , Fa "int position" Set the cursor to point to the requested element. .It Dv H_ADD , Fa "const char *str" Append From owner-svn-src-head@freebsd.org Fri Apr 28 22:25: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 9D307D54CE7; Fri, 28 Apr 2017 22:25:23 +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 6188C126B; Fri, 28 Apr 2017 22:25:23 +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 v3SMPMcU095774; Fri, 28 Apr 2017 22:25:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3SMPMrU095773; Fri, 28 Apr 2017 22:25:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704282225.v3SMPMrU095773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 28 Apr 2017 22:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317573 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace 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, 28 Apr 2017 22:25:23 -0000 Author: markj Date: Fri Apr 28 22:25:22 2017 New Revision: 317573 URL: https://svnweb.freebsd.org/changeset/base/317573 Log: Get rid of some ifdef soup in the fasttrap ioctl handler. No functional change intended. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Apr 28 22:24:21 2017 (r317572) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Apr 28 22:25:22 2017 (r317573) @@ -2269,10 +2269,6 @@ static int fasttrap_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int fflag, struct thread *td) { -#ifdef notyet - struct kinfo_proc kp; - const cred_t *cr = td->td_ucred; -#endif if (!dtrace_attached()) return (EAGAIN); @@ -2328,47 +2324,24 @@ fasttrap_ioctl(struct cdev *dev, u_long proc_t *p; pid_t pid = probe->ftps_pid; -#ifdef illumos mutex_enter(&pidlock); -#endif /* * Report an error if the process doesn't exist * or is actively being birthed. */ - sx_slock(&proctree_lock); - p = pfind(pid); - if (p) - fill_kinfo_proc(p, &kp); - sx_sunlock(&proctree_lock); - if (p == NULL || kp.ki_stat == SIDL) { -#ifdef illumos + if ((p = pfind(pid)) == NULL || p->p_stat == SIDL) { mutex_exit(&pidlock); -#endif return (ESRCH); } -#ifdef illumos mutex_enter(&p->p_lock); mutex_exit(&pidlock); -#else - PROC_LOCK_ASSERT(p, MA_OWNED); -#endif -#ifdef notyet if ((ret = priv_proc_cred_perm(cr, p, NULL, VREAD | VWRITE)) != 0) { -#ifdef illumos mutex_exit(&p->p_lock); -#else - PROC_UNLOCK(p); -#endif return (ret); } -#endif /* notyet */ -#ifdef illumos mutex_exit(&p->p_lock); -#else - PROC_UNLOCK(p); -#endif } #endif /* notyet */ @@ -2382,7 +2355,7 @@ err: fasttrap_instr_query_t instr; fasttrap_tracepoint_t *tp; uint_t index; -#ifdef illumos +#ifdef notyet int ret; #endif @@ -2396,48 +2369,25 @@ err: proc_t *p; pid_t pid = instr.ftiq_pid; -#ifdef illumos mutex_enter(&pidlock); -#endif /* * Report an error if the process doesn't exist * or is actively being birthed. */ - sx_slock(&proctree_lock); - p = pfind(pid); - if (p) - fill_kinfo_proc(p, &kp); - sx_sunlock(&proctree_lock); - if (p == NULL || kp.ki_stat == SIDL) { -#ifdef illumos + if ((p == pfind(pid)) == NULL || p->p_stat == SIDL) { mutex_exit(&pidlock); -#endif return (ESRCH); } -#ifdef illumos mutex_enter(&p->p_lock); mutex_exit(&pidlock); -#else - PROC_LOCK_ASSERT(p, MA_OWNED); -#endif -#ifdef notyet if ((ret = priv_proc_cred_perm(cr, p, NULL, VREAD)) != 0) { -#ifdef illumos mutex_exit(&p->p_lock); -#else - PROC_UNLOCK(p); -#endif return (ret); } -#endif /* notyet */ -#ifdef illumos mutex_exit(&p->p_lock); -#else - PROC_UNLOCK(p); -#endif } #endif /* notyet */ From owner-svn-src-head@freebsd.org Sat Apr 29 00:34: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 8631AD55D08; Sat, 29 Apr 2017 00:34:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5793EDCE; Sat, 29 Apr 2017 00:34:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3T0YrCo049444; Sat, 29 Apr 2017 00:34:53 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T0Yrh2049443; Sat, 29 Apr 2017 00:34:53 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704290034.v3T0Yrh2049443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 29 Apr 2017 00:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317576 - head/sys/fs/nfsclient 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, 29 Apr 2017 00:34:54 -0000 Author: rmacklem Date: Sat Apr 29 00:34:53 2017 New Revision: 317576 URL: https://svnweb.freebsd.org/changeset/base/317576 Log: Modify the NFSv4.1/pNFS client to ask for a maximum length of layout. The code specified the length of a layout as INT64_MAX instead of UINT64_MAX. This could result in getting a layout for less than the full file for extremely large files. Although having little practical effect, this patch corrects this in the code. Detected during recent testing of the pNFS server. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Fri Apr 28 23:40:53 2017 (r317575) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sat Apr 29 00:34:53 2017 (r317576) @@ -5238,7 +5238,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = stateidp->other[1]; stateid.other[2] = stateidp->other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, (uint64_t)0, INT64_MAX, + nfhp->nfh_len, iomode, (uint64_t)0, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } else { @@ -5248,7 +5248,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = lyp->nfsly_stateid.other[1]; stateid.other[2] = lyp->nfsly_stateid.other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, off, INT64_MAX, + nfhp->nfh_len, iomode, off, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } From owner-svn-src-head@freebsd.org Sat Apr 29 00:53: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 CE8C3D521FD; Sat, 29 Apr 2017 00:53:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DD86184A; Sat, 29 Apr 2017 00:53:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3T0rHLA057652; Sat, 29 Apr 2017 00:53:17 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T0rHT7057651; Sat, 29 Apr 2017 00:53:17 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201704290053.v3T0rHT7057651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 29 Apr 2017 00:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317578 - head/sys/sparc64/pci 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, 29 Apr 2017 00:53:18 -0000 Author: marius Date: Sat Apr 29 00:53:17 2017 New Revision: 317578 URL: https://svnweb.freebsd.org/changeset/base/317578 Log: Fix a bug introduced as part of r287726; use the right device_t for determining the softc of the bridge in psycho_route_interrupt(). [1] While at it, update the corresponding comment that the code in question is also necessary for U30s in addition to E450s (a fact that has been known for ages). PR: 218478 Submitted by: Yoshihiko Iwama Modified: head/sys/sparc64/pci/psycho.c Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Sat Apr 29 00:46:51 2017 (r317577) +++ head/sys/sparc64/pci/psycho.c Sat Apr 29 00:53:17 2017 (r317578) @@ -944,14 +944,14 @@ psycho_route_interrupt(device_t bridge, if (pin > 4) return (pin); /* - * Guess the INO; we always assume that this is a non-OBIO - * device, and that pin is a "real" intpin number. Determine - * the mapping register to be used by the slot number. - * We only need to do this on E450s, it seems; here, the slot numbers - * for bus A are one-based, while those for bus B seemingly have an - * offset of 2 (hence the factor of 3 below). + * Guess the INO; we always assume that this is a non-OBIO device, + * and that pin is a "real" intpin number. Determine the mapping + * register to be used by the slot number. + * We only need to do this on E450s and U30s, though; here, the + * slot numbers for bus A are one-based, while those for bus B + * seemingly have an offset of 2 (hence the factor of 3 below). */ - sc = device_get_softc(dev); + sc = device_get_softc(bridge); intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1; From owner-svn-src-head@freebsd.org Sat Apr 29 02:16: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 4CF37D5473F; Sat, 29 Apr 2017 02:16:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B063B1D9B; Sat, 29 Apr 2017 02:16:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v3T2GpF4079683 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 28 Apr 2017 19:16:51 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v3T2Gpsj079682; Fri, 28 Apr 2017 19:16:51 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 28 Apr 2017 19:16:51 -0700 From: Gleb Smirnoff To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317547 - head/sys/net Message-ID: <20170429021651.GZ56922@FreeBSD.org> References: <201704281100.v3SB0wgY005696@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704281100.v3SB0wgY005696@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-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: Sat, 29 Apr 2017 02:16:59 -0000 On Fri, Apr 28, 2017 at 11:00:58AM +0000, Alexander Motin wrote: A> Author: mav A> Date: Fri Apr 28 11:00:58 2017 A> New Revision: 317547 A> URL: https://svnweb.freebsd.org/changeset/base/317547 A> A> Log: A> Allow some control over enabled capabilities for if_vlan. A> A> It improves interoperability with if_bridge, which may need to disable A> some capabilities not supported by other members. IMHO there is still A> open question about LRO capability, which may need to be disabled on A> physical interface. A> A> MFC after: 2 weeks A> Sponsored by: iXsystems, Inc. On quick glance this looks like the opposite to what was done in r281885. As discussed back 2 years ago: - There are no NICs that are able to have different set of capabilities turned on on different VLANs, and unlikely such will appear. - Capabilities should be switched on VLAN trunk. - Allowing to switch capabilities on a VLAN with magical flip of properties of all the VLANs on the same trunk is an ugly design. This is something unexpected for a sysadmin. Better refuse that and make him toggle properties on the trunk explicitily. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Sat Apr 29 06:36: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 BD8FED54629; Sat, 29 Apr 2017 06:36:07 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE911297; Sat, 29 Apr 2017 06:36:07 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-lf0-x22e.google.com with SMTP id c80so43138270lfh.3; Fri, 28 Apr 2017 23:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cnUb883Gg3baZCajb8/0TLWvSgwR+cRKSKw2dvs5J2E=; b=mznmaCaG6x/TKGYgKz0HpXvvPbDG/KnuFwmHgKwE1kFLXGjO3GHcsTPZNXvHodcoe1 nOKeaiHv6FfqavU85omZr98tnH3gfIaiuKz0rG4opYi1hXPcwQG0TKxVJQywNWVC8gyV AoTm1ARWixn9Ok0vOIOf+6E10ua2IV8B5fyt8xz8WQmrbXacTijjcObHkayDgNTNqs2F AsfXHWXBbVgsT6bJNlgyK/EFlGYqdtmRq8uukqRKmz7+NGsCQU6UK6JkxnSwttQI5daz 0WLXer1NKUJe818RUe5mhF1JmRWBzVYJVieoxKdPEqCrvMDQlPt6pWTJbgWhzUef93Gi 7Kig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cnUb883Gg3baZCajb8/0TLWvSgwR+cRKSKw2dvs5J2E=; b=ClpWfDTsV5FaGuZ/ju5wa5Z+nohEnv6gkMKx58mbVZ3K9innt1kDUGn2qQF5ydg7sN id/IPkdJ+vbZlWRgp14NA3XUc3uoRgsLiqeE1/njsVBKEu4a/URO0CICiLDzh1YaxN4J ErN0Y4GjZMQ/rxitNk4ePKt3e/6Exl7/mZ9myp/vbmx/j37pQfN/fsrzfCaRRywN5Qd3 F8+k912f9bRk/hbjB3I1SXbnD1AQh70dTuBjn5U35pD6VHFn4BChHyifgagRHeA5qs2H jJFWaZeHmdSJnDNy5MCD7y4HVSNgD9Pu78eyPiHk7Oz/h1L3Xf35toheFzfAAS5kKYOc xvCA== X-Gm-Message-State: AN3rC/5WP1Byb0JhNiPiWvqMfzUhXgqDkdyyoSVSpOeFT7YeU3irI5yH kGCZVmQNwfXNe7+MTWo= X-Received: by 10.46.33.11 with SMTP id h11mr5975853ljh.57.1493447764424; Fri, 28 Apr 2017 23:36:04 -0700 (PDT) Received: from spectre.mavhome.dp.ua ([134.249.139.101]) by smtp.gmail.com with ESMTPSA id 26sm1446916lfr.7.2017.04.28.23.36.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Apr 2017 23:36:03 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r317547 - head/sys/net To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704281100.v3SB0wgY005696@repo.freebsd.org> <20170429021651.GZ56922@FreeBSD.org> From: Alexander Motin Message-ID: Date: Sat, 29 Apr 2017 09:36:02 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <20170429021651.GZ56922@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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, 29 Apr 2017 06:36:07 -0000 On 29.04.2017 05:16, Gleb Smirnoff wrote: > On Fri, Apr 28, 2017 at 11:00:58AM +0000, Alexander Motin wrote: > A> Author: mav > A> Date: Fri Apr 28 11:00:58 2017 > A> New Revision: 317547 > A> URL: https://svnweb.freebsd.org/changeset/base/317547 > A> > A> Log: > A> Allow some control over enabled capabilities for if_vlan. > A> > A> It improves interoperability with if_bridge, which may need to disable > A> some capabilities not supported by other members. IMHO there is still > A> open question about LRO capability, which may need to be disabled on > A> physical interface. > A> > A> MFC after: 2 weeks > A> Sponsored by: iXsystems, Inc. > > On quick glance this looks like the opposite to what was done in r281885. > > As discussed back 2 years ago: > > - There are no NICs that are able to have different set of capabilities > turned on on different VLANs, and unlikely such will appear. > - Capabilities should be switched on VLAN trunk. > - Allowing to switch capabilities on a VLAN with magical flip of properties > of all the VLANs on the same trunk is an ugly design. This is something > unexpected for a sysadmin. Better refuse that and make him toggle properties > on the trunk explicitily. Thanks for looking. I agree that all those arguments are valid for code removed in r281885. But if you look closer, my code is different. In its present state it does not propagate any capabilities change to the trunk or other vlans, affecting only the specified vlan. With my code there also may be some collisions, for example, if somebody first disable capability X for vlanN and then enable Y for trunk, Y may not get propagated to the vlanN since it wasn't present in the mask set there while disabling X. But I think it is a minor price to pay. I've made additional experiments with LRO flag, and they shown me that 1) that flag should be passed through from trunk to vlans, and 2) I do want to propagate that flag disable from vlan back to trunk, since its absence or disable for vlan does not change anything -- trunk continues feeding aggregated packets, which may not be welcome in case of later bridging. But I am not going to do it in so straightforward way it was done there previous time, since it was clearly broken, for example, for IFCAP_VLAN_HWTAGGING. -- Alexander Motin From owner-svn-src-head@freebsd.org Sat Apr 29 06:41: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 41139D5485B; Sat, 29 Apr 2017 06:41:53 +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 0DAD316AC; Sat, 29 Apr 2017 06:41:52 +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 v3T6fqER098183; Sat, 29 Apr 2017 06:41:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T6fpge098182; Sat, 29 Apr 2017 06:41:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704290641.v3T6fpge098182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 29 Apr 2017 06:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317583 - in head: sys/dev/sound/pcm usr.bin/unexpand 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, 29 Apr 2017 06:41:53 -0000 Author: pfg Date: Sat Apr 29 06:41:51 2017 New Revision: 317583 URL: https://svnweb.freebsd.org/changeset/base/317583 Log: Fix some cases where an index was used before its limits check. Obtained from: DragonFlyBSD (git 799ba435) MFC after: 5 days Modified: head/sys/dev/sound/pcm/feeder_matrix.c head/usr.bin/unexpand/unexpand.c Modified: head/sys/dev/sound/pcm/feeder_matrix.c ============================================================================== --- head/sys/dev/sound/pcm/feeder_matrix.c Sat Apr 29 06:33:37 2017 (r317582) +++ head/sys/dev/sound/pcm/feeder_matrix.c Sat Apr 29 06:41:51 2017 (r317583) @@ -750,8 +750,8 @@ feeder_matrix_oss_get_channel_order(stru tmpmap = 0x0000000000000000ULL; - for (i = 0; m->map[i].type != SND_CHN_T_MAX && - i < SND_CHN_OSS_MAX; i++) { + for (i = 0; i < SND_CHN_OSS_MAX && m->map[i].type != SND_CHN_T_MAX; + i++) { if ((1 << m->map[i].type) & ~SND_CHN_OSS_VALIDMASK) return (EINVAL); tmpmap |= Modified: head/usr.bin/unexpand/unexpand.c ============================================================================== --- head/usr.bin/unexpand/unexpand.c Sat Apr 29 06:33:37 2017 (r317582) +++ head/usr.bin/unexpand/unexpand.c Sat Apr 29 06:41:51 2017 (r317583) @@ -132,8 +132,8 @@ tabify(const char *curfile) tabstops[0]; continue; } else { - for (n = 0; tabstops[n] - 1 < dcol && - n < nstops; n++) + for (n = 0; n < nstops && + tabstops[n] - 1 < dcol; n++) ; if (n < nstops - 1 && tabstops[n] - 1 < limit) { dcol = tabstops[n]; @@ -154,7 +154,7 @@ tabify(const char *curfile) tabstops[0]; } } else { - for (n = 0; tabstops[n] - 1 < ocol && n < nstops; n++) + for (n = 0; n < nstops && tabstops[n] - 1 < ocol; n++) ; while (ocol < dcol && n < nstops && ocol < limit) { putwchar('\t'); From owner-svn-src-head@freebsd.org Sat Apr 29 07:59: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 9DA4AD55E35; Sat, 29 Apr 2017 07:59:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F7C0AA2; Sat, 29 Apr 2017 07:59:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3T7x9MG031492; Sat, 29 Apr 2017 07:59:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T7x9qR031491; Sat, 29 Apr 2017 07:59:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201704290759.v3T7x9qR031491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 29 Apr 2017 07:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317584 - head/share/man/man4 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, 29 Apr 2017 07:59:10 -0000 Author: hselasky Date: Sat Apr 29 07:59:09 2017 New Revision: 317584 URL: https://svnweb.freebsd.org/changeset/base/317584 Log: Correct manual page link to usbdi(9). MFC after: 1 week Modified: head/share/man/man4/usb.4 Modified: head/share/man/man4/usb.4 ============================================================================== --- head/share/man/man4/usb.4 Sat Apr 29 06:41:51 2017 (r317583) +++ head/share/man/man4/usb.4 Sat Apr 29 07:59:09 2017 (r317584) @@ -144,7 +144,7 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 4 , +.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , From owner-svn-src-head@freebsd.org Sat Apr 29 08:29: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 6B6E4D548D0; Sat, 29 Apr 2017 08:29:01 +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 36A58B8B; Sat, 29 Apr 2017 08:29:01 +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 v3T8T0w5043382; Sat, 29 Apr 2017 08:29:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T8T0HT043381; Sat, 29 Apr 2017 08:29:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704290829.v3T8T0HT043381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 29 Apr 2017 08:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317585 - 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: Sat, 29 Apr 2017 08:29:01 -0000 Author: mav Date: Sat Apr 29 08:28:59 2017 New Revision: 317585 URL: https://svnweb.freebsd.org/changeset/base/317585 Log: Propagate IFCAP_LRO from trunk to vlan interface. False positive here cost nothing, while false negative may lead to some confusions. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Apr 29 07:59:09 2017 (r317584) +++ head/sys/net/if_vlan.c Sat Apr 29 08:28:59 2017 (r317585) @@ -1591,6 +1591,16 @@ vlan_capabilities(struct ifvlan *ifv) } /* + * If the parent interface can do LRO and checksum offloading on + * VLANs, then guess it may do LRO on VLANs. False positive here + * cost nothing, while false negative may lead to some confusions. + */ + if (p->if_capabilities & IFCAP_VLAN_HWCSUM) + cap |= p->if_capabilities & IFCAP_LRO; + if (p->if_capenable & IFCAP_VLAN_HWCSUM) + ena |= p->if_capenable & IFCAP_LRO; + + /* * If the parent interface can offload TCP connections over VLANs then * propagate its TOE capability to the VLAN interface. * From owner-svn-src-head@freebsd.org Sat Apr 29 08:52: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 80952D5313D; Sat, 29 Apr 2017 08:52:08 +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 488D7189B; Sat, 29 Apr 2017 08:52:08 +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 v3T8q7c9054388; Sat, 29 Apr 2017 08:52:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T8q7PL054387; Sat, 29 Apr 2017 08:52:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704290852.v3T8q7PL054387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 29 Apr 2017 08:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317586 - 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: Sat, 29 Apr 2017 08:52:08 -0000 Author: mav Date: Sat Apr 29 08:52:07 2017 New Revision: 317586 URL: https://svnweb.freebsd.org/changeset/base/317586 Log: Make if_bridge complain if it can't disable some capabilities. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Apr 29 08:28:59 2017 (r317585) +++ head/sys/net/if_bridge.c Sat Apr 29 08:52:07 2017 (r317586) @@ -940,8 +940,12 @@ bridge_set_ifcap(struct bridge_softc *sc error = (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr); if (error) if_printf(sc->sc_ifp, - "error setting interface capabilities on %s\n", - ifp->if_xname); + "error setting capabilities on %s: %d\n", + ifp->if_xname, error); + if ((ifp->if_capenable & ~set) != 0) + if_printf(sc->sc_ifp, + "can't disable some capabilities on %s: 0x%x\n", + ifp->if_xname, ifp->if_capenable & ~set); } } From owner-svn-src-head@freebsd.org Sat Apr 29 09:47: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 24053D5478A; Sat, 29 Apr 2017 09:47:17 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F366FAAF; Sat, 29 Apr 2017 09:47:16 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3T9lGHR075922; Sat, 29 Apr 2017 09:47:16 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T9lF0r075921; Sat, 29 Apr 2017 09:47:15 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201704290947.v3T9lF0r075921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 29 Apr 2017 09:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317591 - head/sys/dev/drm2/radeon 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, 29 Apr 2017 09:47:17 -0000 Author: nyan Date: Sat Apr 29 09:47:15 2017 New Revision: 317591 URL: https://svnweb.freebsd.org/changeset/base/317591 Log: Add TUNABLE_INT to radeonkms driver parameters. They are required by PowerMac G5 DP. PR: 217852 Submitted by: Hiroo Ono MFC after: 1 week Modified: head/sys/dev/drm2/radeon/radeon_drv.c Modified: head/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.c Sat Apr 29 09:26:30 2017 (r317590) +++ head/sys/dev/drm2/radeon/radeon_drv.c Sat Apr 29 09:47:15 2017 (r317591) @@ -127,54 +127,71 @@ int radeon_pcie_gen2 = -1; int radeon_msi = -1; int radeon_lockup_timeout = 10000; +TUNABLE_INT("drm.radeon.no_wb", &radeon_no_wb); MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); module_param_named(no_wb, radeon_no_wb, int, 0444); +TUNABLE_INT("drm.radeon.modeset", &radeon_modeset); MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, radeon_modeset, int, 0400); +TUNABLE_INT("drm.radeon.dynclks", &radeon_dynclks); MODULE_PARM_DESC(dynclks, "Disable/Enable dynamic clocks"); module_param_named(dynclks, radeon_dynclks, int, 0444); +TUNABLE_INT("drm.radeon.r4xx_atom", &radeon_r4xx_atom); MODULE_PARM_DESC(r4xx_atom, "Enable ATOMBIOS modesetting for R4xx"); module_param_named(r4xx_atom, radeon_r4xx_atom, int, 0444); +TUNABLE_INT("drm.radeon.vramlimit", &radeon_vram_limit); MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing"); module_param_named(vramlimit, radeon_vram_limit, int, 0600); +TUNABLE_INT("drm.radeon.agpmode", &radeon_agpmode); MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)"); module_param_named(agpmode, radeon_agpmode, int, 0444); +TUNABLE_INT("drm.radeon.gartsize", &radeon_gart_size); MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc)"); module_param_named(gartsize, radeon_gart_size, int, 0600); +TUNABLE_INT("drm.radeon.benchmark", &radeon_benchmarking); MODULE_PARM_DESC(benchmark, "Run benchmark"); module_param_named(benchmark, radeon_benchmarking, int, 0444); +TUNABLE_INT("drm.radeon.test", &radeon_testing); MODULE_PARM_DESC(test, "Run tests"); module_param_named(test, radeon_testing, int, 0444); +TUNABLE_INT("drm.radeon.connector_table", &radeon_connector_table); MODULE_PARM_DESC(connector_table, "Force connector table"); module_param_named(connector_table, radeon_connector_table, int, 0444); +TUNABLE_INT("drm.radeon.tv", &radeon_tv); MODULE_PARM_DESC(tv, "TV enable (0 = disable)"); module_param_named(tv, radeon_tv, int, 0444); +TUNABLE_INT("drm.radeon.audio", &radeon_audio); MODULE_PARM_DESC(audio, "Audio enable (1 = enable)"); module_param_named(audio, radeon_audio, int, 0444); +TUNABLE_INT("drm.radeon.disp_priority", &radeon_disp_priority); MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); module_param_named(disp_priority, radeon_disp_priority, int, 0444); +TUNABLE_INT("drm.radeon.hw_i2c", &radeon_hw_i2c); MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)"); module_param_named(hw_i2c, radeon_hw_i2c, int, 0444); +TUNABLE_INT("drm.radeon.pcie_gen2", &radeon_pcie_gen2); MODULE_PARM_DESC(pcie_gen2, "PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = enable)"); module_param_named(pcie_gen2, radeon_pcie_gen2, int, 0444); +TUNABLE_INT("drm.radeon.msi", &radeon_msi); MODULE_PARM_DESC(msi, "MSI support (1 = enable, 0 = disable, -1 = auto)"); module_param_named(msi, radeon_msi, int, 0444); +TUNABLE_INT("drm.radeon.lockup_timeout", &radeon_lockup_timeout); MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (defaul 10000 = 10 seconds, 0 = disable)"); module_param_named(lockup_timeout, radeon_lockup_timeout, int, 0444); From owner-svn-src-head@freebsd.org Sat Apr 29 09:57: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 C9610D54B1A; Sat, 29 Apr 2017 09:57:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CD8615A; Sat, 29 Apr 2017 09:57:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3T9vRUL080128; Sat, 29 Apr 2017 09:57:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3T9vRNi080127; Sat, 29 Apr 2017 09:57:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704290957.v3T9vRNi080127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 29 Apr 2017 09:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317592 - 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: Sat, 29 Apr 2017 09:57:28 -0000 Author: tuexen Date: Sat Apr 29 09:57:27 2017 New Revision: 317592 URL: https://svnweb.freebsd.org/changeset/base/317592 Log: Don't set the DF-bit on timer based retransmissions. MFC after: 1 week Modified: head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Sat Apr 29 09:47:15 2017 (r317591) +++ head/sys/netinet/sctp_timer.c Sat Apr 29 09:57:27 2017 (r317592) @@ -667,6 +667,7 @@ start_again: stcb->asoc.peers_rwnd += SCTP_BASE_SYSCTL(sctp_peer_chunk_oh); } chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; SCTP_STAT_INCR(sctps_markedretrans); /* reset the TSN for striking and other FR stuff */ @@ -740,6 +741,7 @@ start_again: chk->whoTo = alt; if (chk->sent != SCTP_DATAGRAM_RESEND) { chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); cnt_mk++; } @@ -1084,6 +1086,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); } cookie->sent = SCTP_DATAGRAM_RESEND; + cookie->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* * Now call the output routine to kick out the cookie again, Note we * don't mark any chunks for retran so that FR will need to kick in @@ -1130,6 +1133,7 @@ sctp_strreset_timer(struct sctp_inpcb *i sctp_free_remote_addr(chk->whoTo); if (chk->sent != SCTP_DATAGRAM_RESEND) { chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); } chk->whoTo = alt; @@ -1147,6 +1151,7 @@ sctp_strreset_timer(struct sctp_inpcb *i if (strrst->sent != SCTP_DATAGRAM_RESEND) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); strrst->sent = SCTP_DATAGRAM_RESEND; + strrst->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* restart the timer */ sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, inp, stcb, strrst->whoTo); @@ -1211,6 +1216,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp chk->whoTo = alt; if (chk->sent != SCTP_DATAGRAM_RESEND) { chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); } atomic_add_int(&alt->ref_count, 1); @@ -1225,6 +1231,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp if (asconf->sent != SCTP_DATAGRAM_RESEND && chk->sent != SCTP_DATAGRAM_UNSENT) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; } if (!(net->dest_state & SCTP_ADDR_REACHABLE)) { /* @@ -1237,6 +1244,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp if (asconf->sent != SCTP_DATAGRAM_RESEND) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); asconf->sent = SCTP_DATAGRAM_RESEND; + asconf->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* send another ASCONF if any and we can do */ sctp_send_asconf(stcb, alt, SCTP_ADDR_NOT_LOCKED); From owner-svn-src-head@freebsd.org Sat Apr 29 10:06: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 5A83CD54F82; Sat, 29 Apr 2017 10:06:17 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from heemeyer.club (heemeyer.club [108.61.204.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 30D9990F; Sat, 29 Apr 2017 10:06:16 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from mordor.heemeyer.club (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.2/8.15.1) with ESMTPS id v3T9dlnE098023 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 29 Apr 2017 09:39:49 GMT (envelope-from dchagin@mordor.heemeyer.club) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be mordor.heemeyer.club Received: from mordor.heemeyer.club (localhost [127.0.0.1]) by mordor.heemeyer.club (8.15.2/8.15.1) with ESMTPS id v3T9dkTk002235 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 29 Apr 2017 12:39:46 +0300 (MSK) (envelope-from dchagin@mordor.heemeyer.club) Received: (from dchagin@localhost) by mordor.heemeyer.club (8.15.2/8.15.2/Submit) id v3T9dkZo002234; Sat, 29 Apr 2017 12:39:46 +0300 (MSK) (envelope-from dchagin) Date: Sat, 29 Apr 2017 12:39:46 +0300 From: Chagin Dmitry To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315526 - in head: contrib/netbsd-tests/lib/libc/sys include lib/libc/include lib/libc/sys lib/libc/tests/sys lib/libthr/thread share/man/man3 sys/compat/freebsd32 sys/kern sys/sys Message-ID: <20170429093946.GA2227@mordor.heemeyer.club> References: <201703190051.v2J0pDW9028513@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201703190051.v2J0pDW9028513@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 29 Apr 2017 10:06:17 -0000 On Sun, Mar 19, 2017 at 12:51:13AM +0000, Eric van Gyzen wrote: > Author: vangyzen > Date: Sun Mar 19 00:51:12 2017 > New Revision: 315526 > URL: https://svnweb.freebsd.org/changeset/base/315526 > > Log: > Add clock_nanosleep() hi, why it is not merged still? > From owner-svn-src-head@freebsd.org Sat Apr 29 15:35: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 A7554D55A90; Sat, 29 Apr 2017 15:35:31 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E9152EF; Sat, 29 Apr 2017 15:35:31 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3TFZUDO017656; Sat, 29 Apr 2017 15:35:30 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3TFZUYH017655; Sat, 29 Apr 2017 15:35:30 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201704291535.v3TFZUYH017655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Sat, 29 Apr 2017 15:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317593 - 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, 29 Apr 2017 15:35:31 -0000 Author: feld (ports committer) Date: Sat Apr 29 15:35:30 2017 New Revision: 317593 URL: https://svnweb.freebsd.org/changeset/base/317593 Log: Document in ifconfig(8) that gre(4) accepts tunnel commands - Also ensure wording is consistent for gif and gre Reviewed by: wblock Differential Revision: https://reviews.freebsd.org/D5667 Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sat Apr 29 09:57:27 2017 (r317592) +++ head/sbin/ifconfig/ifconfig.8 Sat Apr 29 15:35:30 2017 (r317593) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd January 18, 2017 +.Dd April 29, 2017 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2518,7 +2518,7 @@ means Disable lacp strict compliance on the interface. .El .Pp -The following parameters are specific to IP tunnel interfaces, +The following parameters apply to IP tunnel interfaces, .Xr gif 4 : .Bl -tag -width indent .It Cm tunnel Ar src_addr dest_addr @@ -2568,9 +2568,26 @@ Clear a flag .Cm send_rev_ethip_ver . .El .Pp -The following parameters are specific to GRE tunnel interfaces, +The following parameters apply to GRE tunnel interfaces, .Xr gre 4 : .Bl -tag -width indent +.It Cm tunnel Ar src_addr dest_addr +Configure the physical source and destination address for GRE tunnel +interfaces. +The arguments +.Ar src_addr +and +.Ar dest_addr +are interpreted as the outer source/destination for the encapsulating +IPv4/IPv6 header. +.It Fl tunnel +Unconfigure the physical source and destination address for GRE tunnel +interfaces previously configured with +.Cm tunnel . +.It Cm deletetunnel +Another name for the +.Fl tunnel +parameter. .It Cm grekey Ar key Configure the GRE key to be used for outgoing packets. Note that From owner-svn-src-head@freebsd.org Sat Apr 29 16:44: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 E2B2FD56277; Sat, 29 Apr 2017 16:44: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 B26F2C90; Sat, 29 Apr 2017 16:44: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 v3TGiaMn047656; Sat, 29 Apr 2017 16:44:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3TGiaDt047655; Sat, 29 Apr 2017 16:44:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704291644.v3TGiaDt047655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 29 Apr 2017 16:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317594 - head/share/man/man4 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, 29 Apr 2017 16:44:38 -0000 Author: ngie Date: Sat Apr 29 16:44:36 2017 New Revision: 317594 URL: https://svnweb.freebsd.org/changeset/base/317594 Log: usb(4): manpage cleanup 1. Wrap at <80 columns for readability when editing. Rewrap some lines prematurely wrapped to better fit in <80 columns and not waste vertical space. 2. Fix SEE ALSO sorting (sort by section first, then manpage name). 3. Tweak the compound device description slightly by adding soft stops via commas. MFC after: 1 week Reported by: igor [3], manlint [2] Sponsored by Dell EMC Isilon Modified: head/share/man/man4/usb.4 Modified: head/share/man/man4/usb.4 ============================================================================== --- head/share/man/man4/usb.4 Sat Apr 29 15:35:30 2017 (r317593) +++ head/share/man/man4/usb.4 Sat Apr 29 16:44:36 2017 (r317594) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2013 +.Dd April 29, 2017 .Dt USB 4 .Os .Sh NAME @@ -78,8 +78,7 @@ bus. .Pp The .Nm uhub -device will always be present as it is needed for the -root hub. +device will always be present as it is needed for the root hub. .Sh INTRODUCTION TO USB The .Tn USB @@ -94,38 +93,34 @@ The most common USB speeds are: Each .Tn USB has a USB controller that is the master of the bus. -The physical communication is simplex which means the host controller only communicates with one USB device at a time. +The physical communication is simplex which means the host controller only +communicates with one USB device at a time. .Pp There can be up to 127 devices connected to an USB HUB tree. -The addresses are assigned -dynamically by the host when each device is attached to the bus. +The addresses are assigned dynamically by the host when each device is +attached to the bus. .Pp Within each device there can be up to 16 endpoints. -Each endpoint -is individually addressed and the addresses are static. +Each endpoint is individually addressed and the addresses are static. Each of these endpoints will communicate in one of four different modes: .Em control , isochronous , bulk , or .Em interrupt . A device always has at least one endpoint. -This endpoint has address 0 and is a control -endpoint and is used to give commands to and extract basic data, -such as descriptors, from the device. +This endpoint has address 0 and is a control endpoint and is used to give +commands to and extract basic data, such as descriptors, from the device. Each endpoint, except the control endpoint, is unidirectional. .Pp The endpoints in a device are grouped into interfaces. -An interface is a logical unit within a device; e.g.\& -a compound device with both a keyboard and a trackball would present -one interface for each. -An interface can sometimes be set into different modes, -called alternate settings, which affects how it operates. -Different alternate settings can have different endpoints -within it. +An interface is a logical unit within a device, e.g., a compound device with +both a keyboard and a trackball, would present one interface for each. +An interface can sometimes be set into different modes, called alternate +settings, which affects how it operates. +Different alternate settings can have different endpoints within it. .Pp A device may operate in different configurations. -Depending on the -configuration, the device may present different sets of endpoints -and interfaces. +Depending on the configuration, the device may present different sets of +endpoints and interfaces. .Pp The bus enumeration of the .Tn USB @@ -144,7 +139,6 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , @@ -166,8 +160,9 @@ specifications can be found at: .Xr uplcom 4 , .Xr urio 4 , .Xr uvscom 4 , -.Xr usbconfig 8 , .Xr xhci 4 +.Xr usbconfig 8 , +.Xr usbdi 9 , .Sh STANDARDS The .Nm From owner-svn-src-head@freebsd.org Sat Apr 29 18:48: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 BE40ED56AAA; Sat, 29 Apr 2017 18:48:06 +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 8EBC71A3; Sat, 29 Apr 2017 18:48:06 +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 v3TIm5MV096803; Sat, 29 Apr 2017 18:48:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3TIm5xK096802; Sat, 29 Apr 2017 18:48:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704291848.v3TIm5xK096802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 29 Apr 2017 18:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317595 - 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: Sat, 29 Apr 2017 18:48:06 -0000 Author: pfg Date: Sat Apr 29 18:48:05 2017 New Revision: 317595 URL: https://svnweb.freebsd.org/changeset/base/317595 Log: : ftello() and fseeko() were in SUSv2, so extend visibility. See: http://pubs.opengroup.org/onlinepubs/007908799/xsh/fseek.html http://pubs.opengroup.org/onlinepubs/007908799/xsh/ftell.html Hinted from: DragonFlyBSD (git 58696e28) Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sat Apr 29 16:44:36 2017 (r317594) +++ head/include/stdio.h Sat Apr 29 18:48:05 2017 (r317595) @@ -338,7 +338,7 @@ int ferror_unlocked(FILE *); int fileno_unlocked(FILE *); #endif -#if __POSIX_VISIBLE >= 200112 +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 int fseeko(FILE *, __off_t, int); __off_t ftello(FILE *); #endif From owner-svn-src-head@freebsd.org Sat Apr 29 19:12: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 3534CD54271; Sat, 29 Apr 2017 19:12:46 +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 058FD125E; Sat, 29 Apr 2017 19:12:45 +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 v3TJCjk4008997; Sat, 29 Apr 2017 19:12:45 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3TJCjI5008996; Sat, 29 Apr 2017 19:12:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704291912.v3TJCjI5008996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 29 Apr 2017 19:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317596 - head/usr.sbin/mixer 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, 29 Apr 2017 19:12:46 -0000 Author: pfg Date: Sat Apr 29 19:12:44 2017 New Revision: 317596 URL: https://svnweb.freebsd.org/changeset/base/317596 Log: mixer(8): Prevent possible sscanf() overflow. Fix %s buffer sizes in sscanf(). Obtained from: DragonflyBSD (git dab952e2) MFC after: 5 days Modified: head/usr.sbin/mixer/mixer.c Modified: head/usr.sbin/mixer/mixer.c ============================================================================== --- head/usr.sbin/mixer/mixer.c Sat Apr 29 18:48:05 2017 (r317595) +++ head/usr.sbin/mixer/mixer.c Sat Apr 29 19:12:44 2017 (r317596) @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) { char mixer[PATH_MAX] = "/dev/mixer"; - char lstr[5], rstr[5]; + char lstr[8], rstr[8]; char *name, *eptr; int devmask = 0, recmask = 0, recsrc = 0, orecsrc; int dusage = 0, drecsrc = 0, sflag = 0, Sflag = 0; From owner-svn-src-head@freebsd.org Sat Apr 29 19:20: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 694D3D5452F; Sat, 29 Apr 2017 19:20:52 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 233E5166F; Sat, 29 Apr 2017 19:20:52 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3TJKpGi009348; Sat, 29 Apr 2017 19:20:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3TJKoFs009344; Sat, 29 Apr 2017 19:20:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704291920.v3TJKoFs009344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 29 Apr 2017 19:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317597 - 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: Sat, 29 Apr 2017 19:20:52 -0000 Author: tuexen Date: Sat Apr 29 19:20:50 2017 New Revision: 317597 URL: https://svnweb.freebsd.org/changeset/base/317597 Log: Allow SCTP to use the hostcache. This patch allows the MTU stored in the hostcache to be used as an initial value for SCTP paths. When an ICMP PTB message is received, store the MTU in the hostcache. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Apr 29 19:12:44 2017 (r317596) +++ head/sys/netinet/sctp_pcb.c Sat Apr 29 19:20:50 2017 (r317597) @@ -3933,6 +3933,7 @@ sctp_add_remote_addr(struct sctp_tcb *st stcb->asoc.vrf_id, stcb->sctp_ep->fibnum); + net->src_addr_selected = 0; if (SCTP_ROUTE_HAS_VALID_IFN(&net->ro)) { /* Get source address */ net->ro._s_addr = sctp_source_address_selection(stcb->sctp_ep, @@ -3942,18 +3943,18 @@ sctp_add_remote_addr(struct sctp_tcb *st 0, stcb->asoc.vrf_id); if (net->ro._s_addr != NULL) { + uint32_t imtu, rmtu, hcmtu; + net->src_addr_selected = 1; /* Now get the interface MTU */ if (net->ro._s_addr->ifn_p != NULL) { - net->mtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + imtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + } else { + imtu = 0; } - } else { - net->src_addr_selected = 0; - } - if (net->mtu > 0) { - uint32_t rmtu; - rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_rt); + hcmtu = sctp_hc_get_mtu(&net->ro._l_addr, stcb->sctp_ep->fibnum); + net->mtu = sctp_min_mtu(hcmtu, rmtu, imtu); if (rmtu == 0) { /* * Start things off to match mtu of @@ -3961,17 +3962,8 @@ sctp_add_remote_addr(struct sctp_tcb *st */ SCTP_SET_MTU_OF_ROUTE(&net->ro._l_addr.sa, net->ro.ro_rt, net->mtu); - } else { - /* - * we take the route mtu over the interface, - * since the route may be leading out the - * loopback, or a different interface. - */ - net->mtu = rmtu; } } - } else { - net->src_addr_selected = 0; } if (net->mtu == 0) { switch (newaddr->sa_family) { Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sat Apr 29 19:12:44 2017 (r317596) +++ head/sys/netinet/sctp_usrreq.c Sat Apr 29 19:20:50 2017 (r317597) @@ -225,6 +225,11 @@ sctp_notify(struct sctp_inpcb *inp, } if (net->mtu > next_mtu) { net->mtu = next_mtu; + if (net->port) { + sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu + sizeof(struct udphdr)); + } else { + sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu); + } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Apr 29 19:12:44 2017 (r317596) +++ head/sys/netinet/sctputil.c Sat Apr 29 19:20:50 2017 (r317597) @@ -49,6 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET6) || defined(INET) +#include +#endif #include #include #include @@ -7235,3 +7238,90 @@ sctp_over_udp_start(void) #endif return (0); } + +#if defined(INET6) || defined(INET) + +/* + * sctp_min_mtu ()returns the minimum of all non-zero arguments. + * If all arguments are zero, zero is returned. + */ +uint32_t +sctp_min_mtu(uint32_t mtu1, uint32_t mtu2, uint32_t mtu3) +{ + if (mtu1 > 0) { + if (mtu2 > 0) { + if (mtu3 > 0) { + return (min(mtu1, min(mtu2, mtu3))); + } else { + return (min(mtu1, mtu2)); + } + } else { + if (mtu3 > 0) { + return (min(mtu1, mtu3)); + } else { + return (mtu1); + } + } + } else { + if (mtu2 > 0) { + if (mtu3 > 0) { + return (min(mtu2, mtu3)); + } else { + return (mtu2); + } + } else { + return (mtu3); + } + } +} + +void +sctp_hc_set_mtu(union sctp_sockstore *addr, uint16_t fibnum, uint32_t mtu) +{ + struct in_conninfo inc; + + memset(&inc, 0, sizeof(struct in_conninfo)); + inc.inc_fibnum = fibnum; + switch (addr->sa.sa_family) { +#ifdef INET + case AF_INET: + inc.inc_faddr = addr->sin.sin_addr; + break; +#endif +#ifdef INET6 + case AF_INET6: + inc.inc_flags |= INC_ISIPV6; + inc.inc6_faddr = addr->sin6.sin6_addr; + break; +#endif + default: + return; + } + tcp_hc_updatemtu(&inc, (u_long)mtu); +} + +uint32_t +sctp_hc_get_mtu(union sctp_sockstore *addr, uint16_t fibnum) +{ + struct in_conninfo inc; + + memset(&inc, 0, sizeof(struct in_conninfo)); + inc.inc_fibnum = fibnum; + switch (addr->sa.sa_family) { +#ifdef INET + case AF_INET: + inc.inc_faddr = addr->sin.sin_addr; + break; +#endif +#ifdef INET6 + case AF_INET6: + inc.inc_flags |= INC_ISIPV6; + inc.inc6_faddr = addr->sin6.sin6_addr; + break; +#endif + default: + return (0); + } + return ((uint32_t)tcp_hc_getmtu(&inc)); +} +#endif Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sat Apr 29 19:12:44 2017 (r317596) +++ head/sys/netinet/sctputil.h Sat Apr 29 19:20:50 2017 (r317597) @@ -388,5 +388,10 @@ sctp_auditing(int, struct sctp_inpcb *, void sctp_audit_log(uint8_t, uint8_t); #endif +#if defined(INET6) || defined(INET) +uint32_t sctp_min_mtu(uint32_t, uint32_t, uint32_t); +void sctp_hc_set_mtu(union sctp_sockstore *, uint16_t, uint32_t); +uint32_t sctp_hc_get_mtu(union sctp_sockstore *, uint16_t); +#endif #endif /* _KERNEL */ #endif From owner-svn-src-head@freebsd.org Sat Apr 29 21:48: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 5F37DD568B4; Sat, 29 Apr 2017 21:48:13 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15BB67C3; Sat, 29 Apr 2017 21:48:13 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3TLmCQt070708; Sat, 29 Apr 2017 21:48:12 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3TLmCmm070707; Sat, 29 Apr 2017 21:48:12 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201704292148.v3TLmCmm070707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 29 Apr 2017 21:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317598 - head/usr.bin/printf 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, 29 Apr 2017 21:48:13 -0000 Author: jilles Date: Sat Apr 29 21:48:11 2017 New Revision: 317598 URL: https://svnweb.freebsd.org/changeset/base/317598 Log: printf: Output formatted data directly, instead of via asprintf. Long ago, sh used to have its own optimized and restricted string formatting implementation, which the printf builtin had to bypass via asprintf() to a temporary buffer. Since sh has used libc's string formatting implementation for a long time, remove the workaround. Add a check to keep printf %c '' working the same way (output nothing); POSIX allows both outputting nothing and outputting a NUL byte. Also, this change avoids silently discarding format directives for whose output asprintf() cannot allocate memory. Modified: head/usr.bin/printf/printf.c Modified: head/usr.bin/printf/printf.c ============================================================================== --- head/usr.bin/printf/printf.c Sat Apr 29 19:20:50 2017 (r317597) +++ head/usr.bin/printf/printf.c Sat Apr 29 21:48:11 2017 (r317598) @@ -70,20 +70,15 @@ static const char rcsid[] = #endif #define PF(f, func) do { \ - char *b = NULL; \ if (havewidth) \ if (haveprec) \ - (void)asprintf(&b, f, fieldwidth, precision, func); \ + (void)printf(f, fieldwidth, precision, func); \ else \ - (void)asprintf(&b, f, fieldwidth, func); \ + (void)printf(f, fieldwidth, func); \ else if (haveprec) \ - (void)asprintf(&b, f, precision, func); \ + (void)printf(f, precision, func); \ else \ - (void)asprintf(&b, f, func); \ - if (b) { \ - (void)fputs(b, stdout); \ - free(b); \ - } \ + (void)printf(f, func); \ } while (0) static int asciicode(void); @@ -394,7 +389,8 @@ printf_doformat(char *fmt, int *rval) char p; p = getchr(); - PF(start, p); + if (p != '\0') + PF(start, p); break; } case 's': { From owner-svn-src-head@freebsd.org Sat Apr 29 22:47: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 B9BB2D56726 for ; Sat, 29 Apr 2017 22:47:58 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-51.reflexion.net [208.70.210.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A67E1EED for ; Sat, 29 Apr 2017 22:47:57 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 22137 invoked from network); 29 Apr 2017 22:47:56 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 29 Apr 2017 22:47:56 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Sat, 29 Apr 2017 18:47:56 -0400 (EDT) Received: (qmail 22195 invoked from network); 29 Apr 2017 22:47:56 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 29 Apr 2017 22:47:56 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id A03B7EC81E7; Sat, 29 Apr 2017 15:47:55 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r317169 - head/release/tools Message-Id: Date: Sat, 29 Apr 2017 15:47:55 -0700 To: Glen Barber , svn-src-head@freebsd.org, FreeBSD Toolchain X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 29 Apr 2017 22:47:58 -0000 > Author: gjb > Date: Wed Apr 19 21:18:06 2017 > New Revision: 317169 > URL:=20 > https://svnweb.freebsd.org/changeset/base/317169 >=20 >=20 > Log: > Trim trailing '/release/..' when setting _OBJDIR so arm64/aarch64 > boot1.efifat is properly located when creating virtual machine = images. > =20 > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/release/tools/vmimage.subr >=20 > Modified: head/release/tools/vmimage.subr > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/release/tools/vmimage.subr Wed Apr 19 20:45:46 2017 = (r317168) > +++ head/release/tools/vmimage.subr Wed Apr 19 21:18:06 2017 = (r317169) > @@ -15,6 +15,7 @@ write_partition_layout() { > fi > =20 > _OBJDIR=3D"$(make -C ${WORLDDIR} -V .OBJDIR)" > + _OBJDIR=3D"$(realpath ${_OBJDIR})" > if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then > = BOOTFILES=3D"/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/bo= ot" > else In my experiments with making my own vmimage I had to make another change. Instead of just: _OBJDIR=3D"$(make -C ${WORLDDIR} -V .OBJDIR)" I had to add a use of realpath around ${WORLDDIR} to get the make -V .OBJDIR output to be correct: _OBJDIR=3D"$(make -C $(realpath ${WORLDDIR}) -V .OBJDIR)" The .. use in WORLDDIR blocked the -V .OBJDIR from returning the relevant/correct path. This in turn lead to -p efi:=3D${BOOTFILES}/efi/boot1/boot1.efifat \ reporting the boot1.efifat as not found. With the additional realpath use the relevant/correct path was returned by -V .OBJDIR and boot1.efifat was found. (This is among other more experimental personal-use changes not appropriate to be checked-in. But the additional realpath use seemed to be appropriate svn content.) Other minor notes: BOOTFILES ends up with a leading // in a lot of contexts (including via the else clause assignment not shown). (Not a problem for me.) Use of /usr/src as the source tree is effectively required? (Not a problem for me.) For some reason aarch64 always has NOSWAP=3D1 and no provision for a swap partition. (This is part of why I was experimenting.) While Makefile.vm has "SWAPSIZE?=3D 1G", much like it has "VMSIZE?=3D 20G", SWAPSIZE does not have an equivalent of: scripts/mk-vmimage.sh: VMSIZE=3D"${OPTARG}" and so any SWAPSIZE control is external and implicit. =3D=3D=3D Mark Millard markmi at dsl-only.net